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,33 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $DateUTC = GetIntrinsic('%Date.UTC%');
var $isFinite = require('math-intrinsics/isFinite');
var DateFromTime = require('./DateFromTime');
var Day = require('./Day');
var floor = require('./floor');
var modulo = require('./modulo');
var MonthFromTime = require('./MonthFromTime');
var ToInteger = require('./ToInteger');
var YearFromTime = require('./YearFromTime');
// https://262.ecma-international.org/5.1/#sec-15.9.1.12
module.exports = function MakeDay(year, month, date) {
if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) {
return NaN;
}
var y = ToInteger(year);
var m = ToInteger(month);
var dt = ToInteger(date);
var ym = y + floor(m / 12);
var mn = modulo(m, 12);
var t = $DateUTC(ym, mn, 1);
if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) {
return NaN;
}
return Day(t) + dt - 1;
};
@@ -0,0 +1,7 @@
/**
* No name because it must not be turned off.
* @type {Construct}
*/
export const content: Construct;
import type { Construct } from 'micromark-util-types';
//# sourceMappingURL=content.d.ts.map
@@ -0,0 +1,29 @@
'use strict';
var test = require('tape');
if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
test('has native Symbol support', function (t) {
t.equal(typeof Symbol, 'function');
t.equal(typeof Symbol(), 'symbol');
t.end();
});
// @ts-expect-error TS is stupid and doesn't know about top level return
return;
}
var hasSymbols = require('../../shams');
test('polyfilled Symbols', function (t) {
/* eslint-disable global-require */
t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling');
require('get-own-property-symbols');
require('../tests')(t);
var hasSymbolsAfter = hasSymbols();
t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling');
/* eslint-enable global-require */
t.end();
});
@@ -0,0 +1,599 @@
"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/bold/index.ts
var bold_exports = {};
__export(bold_exports, {
AlignBottomBoldIcon: () => AlignBottomBoldIcon,
AlignHorizontallyBoldIcon: () => AlignHorizontallyBoldIcon,
AlignLeftBoldIcon: () => AlignLeftBoldIcon,
AlignRightBoldIcon: () => AlignRightBoldIcon,
AlignTopBoldIcon: () => AlignTopBoldIcon,
AlignVerticallyBoldIcon: () => AlignVerticallyBoldIcon,
CalendarBoldIcon: () => CalendarBoldIcon,
ClockSquareBoldIcon: () => ClockSquareBoldIcon,
PetBoldIcon: () => PetBoldIcon,
PlusFilledIcon: () => PlusFilledIcon,
SendFilledIcon: () => SendFilledIcon,
ShoppingCartBoldIcon: () => ShoppingCartBoldIcon,
VolumeHighBoldIcon: () => VolumeHighBoldIcon,
VolumeLowBoldIcon: () => VolumeLowBoldIcon
});
module.exports = __toCommonJS(bold_exports);
// src/bold/align-top.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var AlignTopBoldIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.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_runtime.jsx)(
"path",
{
d: "M15.98 19.3789H17.02C18.61 19.3789 19.25 18.7789 19.25 17.2589V5.37891H13.75V17.2589C13.76 18.7789 14.4 19.3789 15.98 19.3789Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M7.48 14.3789H8.52C10.11 14.3789 10.75 13.7689 10.75 12.2589V5.37891H5.25V12.2589C5.26 13.7689 5.9 14.3789 7.48 14.3789Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M21.25 6.11891H2.75C2.34 6.11891 2 5.78891 2 5.37891C2 4.96891 2.34 4.62891 2.75 4.62891H21.25C21.66 4.62891 22 4.96891 22 5.37891C22 5.78891 21.66 6.11891 21.25 6.11891Z",
fill: "currentColor"
}
)
]
}
);
// src/bold/align-bottom.tsx
var import_jsx_runtime2 = require("react/jsx-runtime");
var AlignBottomBoldIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime2.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_runtime2.jsx)(
"path",
{
d: "M8.02 4.62109H6.98C5.39 4.62109 4.75 5.22109 4.75 6.74109V18.6211H10.25V6.74109C10.24 5.22109 9.6 4.62109 8.02 4.62109Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
"path",
{
d: "M16.52 9.62109H15.48C13.89 9.62109 13.25 10.2311 13.25 11.7411V18.6211H18.75V11.7411C18.75 10.2311 18.1 9.62109 16.52 9.62109Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
"path",
{
d: "M2.75 17.8789H21.25C21.66 17.8789 22 18.2189 22 18.6289C22 19.0389 21.66 19.3789 21.25 19.3789H2.75C2.34 19.3789 2 19.0389 2 18.6189C2 18.1989 2.34 17.8789 2.75 17.8789Z",
fill: "currentColor"
}
)
]
}
);
// src/bold/align-left.tsx
var import_jsx_runtime3 = require("react/jsx-runtime");
var AlignLeftBoldIcon = (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: "M19.3809 15.98V17.02C19.3809 18.61 18.7809 19.25 17.2609 19.25H5.38086V13.75H17.2609C18.7809 13.75 19.3809 14.39 19.3809 15.98Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"path",
{
d: "M14.3809 7.48V8.52C14.3809 10.11 13.7709 10.75 12.2609 10.75H5.38086V5.25H12.2609C13.7709 5.25 14.3809 5.89 14.3809 7.48Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"path",
{
d: "M5.37912 22C4.96912 22 4.62912 21.66 4.62912 21.25V2.75C4.61912 2.33 4.95912 2 5.37912 2C5.79912 2 6.12912 2.34 6.12912 2.75V21.25C6.11912 21.66 5.78912 22 5.37912 22Z",
fill: "currentColor"
}
)
]
}
);
// src/bold/align-right.tsx
var import_jsx_runtime4 = require("react/jsx-runtime");
var AlignRightBoldIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime4.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_runtime4.jsx)(
"path",
{
d: "M4.61914 15.98V17.02C4.61914 18.61 5.21914 19.25 6.73914 19.25H18.6191V13.75H6.73914C5.21914 13.75 4.61914 14.39 4.61914 15.98Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
"path",
{
d: "M9.61914 7.48V8.52C9.61914 10.11 10.2291 10.75 11.7391 10.75H18.6191V5.25H11.7391C10.2291 5.25 9.61914 5.89 9.61914 7.48Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
"path",
{
d: "M18.6191 22C18.2091 22 17.8691 21.66 17.8691 21.25V2.75C17.8691 2.34 18.2091 2 18.6191 2C19.0291 2 19.3691 2.34 19.3691 2.75V21.25C19.3791 21.66 19.0391 22 18.6191 22Z",
fill: "currentColor"
}
)
]
}
);
// src/bold/align-vertically.tsx
var import_jsx_runtime5 = require("react/jsx-runtime");
var AlignVerticallyBoldIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime5.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_runtime5.jsx)(
"path",
{
d: "M17.4 19.25H6.6C5.1 19.25 4.5 18.61 4.5 17.02V15.98C4.5 14.39 5.1 13.75 6.6 13.75H17.4C18.9 13.75 19.5 14.39 19.5 15.98V17.02C19.5 18.61 18.9 19.25 17.4 19.25Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
"path",
{
d: "M12.75 19.25V21.25C12.75 21.66 12.41 22 12 22C11.59 22 11.25 21.66 11.25 21.25V19.25H12.75Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12.75 10.75H11.25V13.75H12.75V10.75Z", fill: "currentColor" }),
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
"path",
{
d: "M12.75 2.75V5.25H11.25V2.75C11.25 2.34 11.59 2 12 2C12.41 2 12.75 2.34 12.75 2.75Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
"path",
{
d: "M15.4 10.75H8.6C7.1 10.75 6.5 10.11 6.5 8.52V7.48C6.5 5.89 7.1 5.25 8.6 5.25H15.4C16.9 5.25 17.5 5.89 17.5 7.48V8.52C17.5 10.11 16.9 10.75 15.4 10.75Z",
fill: "currentColor"
}
)
]
}
);
// src/bold/align-horizontally.tsx
var import_jsx_runtime6 = require("react/jsx-runtime");
var AlignHorizontallyBoldIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime6.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_runtime6.jsx)(
"path",
{
d: "M4.75 17.4V6.6C4.75 5.1 5.39 4.5 6.98 4.5H8.02C9.61 4.5 10.25 5.1 10.25 6.6V17.4C10.25 18.9 9.61 19.5 8.02 19.5H6.98C5.39 19.5 4.75 18.9 4.75 17.4Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
"path",
{
d: "M4.75 12.75H2.75C2.34 12.75 2 12.41 2 12C2 11.59 2.34 11.25 2.75 11.25H4.75V12.75Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M13.25 11.25H10.25V12.75H13.25V11.25Z", fill: "currentColor" }),
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
"path",
{
d: "M21.25 12.75H18.75V11.25H21.25C21.66 11.25 22 11.59 22 12C22 12.41 21.66 12.75 21.25 12.75Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
"path",
{
d: "M13.25 15.4V8.6C13.25 7.1 13.89 6.5 15.48 6.5H16.52C18.11 6.5 18.75 7.1 18.75 8.6V15.4C18.75 16.9 18.11 17.5 16.52 17.5H15.48C13.89 17.5 13.25 16.9 13.25 15.4Z",
fill: "currentColor"
}
)
]
}
);
// src/bold/pet.tsx
var import_jsx_runtime7 = require("react/jsx-runtime");
var PetBoldIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime7.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_runtime7.jsx)(
"path",
{
d: "M19.0803 15.7203C18.4903 12.1903 15.1003 9.32031 11.5203 9.32031C7.63028 9.32031 4.21028 12.4703 3.88028 16.3503C3.75028 17.8503 4.23028 19.2703 5.22028 20.3403C6.20028 21.4103 7.58028 22.0003 9.08028 22.0003H13.7603C15.4503 22.0003 16.9303 21.3403 17.9403 20.1503C18.9503 18.9603 19.3503 17.3803 19.0803 15.7203Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
"path",
{
d: "M10.2796 7.86C11.8978 7.86 13.2096 6.54819 13.2096 4.93C13.2096 3.31181 11.8978 2 10.2796 2C8.66141 2 7.34961 3.31181 7.34961 4.93C7.34961 6.54819 8.66141 7.86 10.2796 7.86Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
"path",
{
d: "M16.94 9.02844C18.2876 9.02844 19.38 7.93601 19.38 6.58844C19.38 5.24086 18.2876 4.14844 16.94 4.14844C15.5924 4.14844 14.5 5.24086 14.5 6.58844C14.5 7.93601 15.5924 9.02844 16.94 9.02844Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
"path",
{
d: "M20.5496 12.9313C21.6266 12.9313 22.4996 12.0582 22.4996 10.9812C22.4996 9.90429 21.6266 9.03125 20.5496 9.03125C19.4727 9.03125 18.5996 9.90429 18.5996 10.9812C18.5996 12.0582 19.4727 12.9313 20.5496 12.9313Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
"path",
{
d: "M3.94 10.9816C5.28757 10.9816 6.38 9.88914 6.38 8.54156C6.38 7.19399 5.28757 6.10156 3.94 6.10156C2.59243 6.10156 1.5 7.19399 1.5 8.54156C1.5 9.88914 2.59243 10.9816 3.94 10.9816Z",
fill: "currentColor"
}
)
]
}
);
// src/bold/volume-high.tsx
var import_jsx_runtime8 = require("react/jsx-runtime");
var VolumeHighBoldIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime8.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_runtime8.jsx)(
"path",
{
d: "M18.0003 16.7503C17.8403 16.7503 17.6903 16.7003 17.5503 16.6003C17.2203 16.3503 17.1503 15.8803 17.4003 15.5503C18.9703 13.4603 18.9703 10.5403 17.4003 8.45027C17.1503 8.12027 17.2203 7.65027 17.5503 7.40027C17.8803 7.15027 18.3503 7.22027 18.6003 7.55027C20.5603 10.1703 20.5603 13.8303 18.6003 16.4503C18.4503 16.6503 18.2303 16.7503 18.0003 16.7503Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
"path",
{
d: "M19.8284 19.2503C19.6684 19.2503 19.5184 19.2003 19.3784 19.1003C19.0484 18.8503 18.9784 18.3803 19.2284 18.0503C21.8984 14.4903 21.8984 9.51027 19.2284 5.95027C18.9784 5.62027 19.0484 5.15027 19.3784 4.90027C19.7084 4.65027 20.1784 4.72027 20.4284 5.05027C23.4984 9.14027 23.4984 14.8603 20.4284 18.9503C20.2884 19.1503 20.0584 19.2503 19.8284 19.2503Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
"path",
{
d: "M14.02 3.78168C12.9 3.16168 11.47 3.32168 10.01 4.23168L7.09 6.06168C6.89 6.18168 6.66 6.25168 6.43 6.25168H5.5H5C2.58 6.25168 1.25 7.58168 1.25 10.0017V14.0017C1.25 16.4217 2.58 17.7517 5 17.7517H5.5H6.43C6.66 17.7517 6.89 17.8217 7.09 17.9417L10.01 19.7717C10.89 20.3217 11.75 20.5917 12.55 20.5917C13.07 20.5917 13.57 20.4717 14.02 20.2217C15.13 19.6017 15.75 18.3117 15.75 16.5917V7.41168C15.75 5.69168 15.13 4.40168 14.02 3.78168Z",
fill: "currentColor"
}
)
]
}
);
// src/bold/volume-low.tsx
var import_jsx_runtime9 = require("react/jsx-runtime");
var VolumeLowBoldIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime9.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_runtime9.jsx)(
"path",
{
d: "M19.3284 16.7503C19.1684 16.7503 19.0184 16.7003 18.8784 16.6003C18.5484 16.3503 18.4784 15.8803 18.7284 15.5503C20.2984 13.4603 20.2984 10.5403 18.7284 8.45027C18.4784 8.12027 18.5484 7.65027 18.8784 7.40027C19.2084 7.15027 19.6784 7.22027 19.9284 7.55027C21.8984 10.1703 21.8984 13.8303 19.9284 16.4503C19.7884 16.6503 19.5584 16.7503 19.3284 16.7503Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
"path",
{
d: "M15.3481 3.78168C14.2281 3.16168 12.7981 3.32168 11.3381 4.23168L8.41813 6.06168C8.21813 6.18168 7.98813 6.25168 7.75813 6.25168H6.82812H6.32812C3.90812 6.25168 2.57812 7.58168 2.57812 10.0017V14.0017C2.57812 16.4217 3.90812 17.7517 6.32812 17.7517H6.82812H7.75813C7.98813 17.7517 8.21813 17.8217 8.41813 17.9417L11.3381 19.7717C12.2181 20.3217 13.0781 20.5917 13.8781 20.5917C14.3981 20.5917 14.8981 20.4717 15.3481 20.2217C16.4581 19.6017 17.0781 18.3117 17.0781 16.5917V7.41168C17.0781 5.69168 16.4581 4.40168 15.3481 3.78168Z",
fill: "currentColor"
}
)
]
}
);
// src/bold/shopping-cart.tsx
var import_jsx_runtime10 = require("react/jsx-runtime");
var ShoppingCartBoldIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime10.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_runtime10.jsx)(
"path",
{
d: "M16.25 22.5C17.2165 22.5 18 21.7165 18 20.75C18 19.7835 17.2165 19 16.25 19C15.2835 19 14.5 19.7835 14.5 20.75C14.5 21.7165 15.2835 22.5 16.25 22.5Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
"path",
{
d: "M8.25 22.5C9.2165 22.5 10 21.7165 10 20.75C10 19.7835 9.2165 19 8.25 19C7.2835 19 6.5 19.7835 6.5 20.75C6.5 21.7165 7.2835 22.5 8.25 22.5Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
"path",
{
d: "M4.84 3.94L4.64 6.39C4.6 6.86 4.97 7.25 5.44 7.25H20.75C21.17 7.25 21.52 6.93 21.55 6.51C21.68 4.74 20.33 3.3 18.56 3.3H6.27C6.17 2.86 5.97 2.44 5.66 2.09C5.16 1.56 4.46 1.25 3.74 1.25H2C1.59 1.25 1.25 1.59 1.25 2C1.25 2.41 1.59 2.75 2 2.75H3.74C4.05 2.75 4.34 2.88 4.55 3.1C4.76 3.33 4.86 3.63 4.84 3.94Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
"path",
{
d: "M20.5101 8.75H5.17005C4.75005 8.75 4.41005 9.07 4.37005 9.48L4.01005 13.83C3.87005 15.54 5.21005 17 6.92005 17H18.0401C19.5401 17 20.8601 15.77 20.9701 14.27L21.3001 9.6C21.3401 9.14 20.9801 8.75 20.5101 8.75Z",
fill: "currentColor"
}
)
]
}
);
// src/bold/send.tsx
var import_jsx_runtime11 = require("react/jsx-runtime");
var SendFilledIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime11.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_runtime11.jsx)("g", { clipPath: "url(#clip0_2703_16)", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
"path",
{
clipRule: "evenodd",
d: "M15.9518 16.8594L11.0969 19.2869C7.67397 20.9984 5.96247 21.8541 4.97025 21.5914C4.02634 21.3415 3.28914 20.6043 3.03925 19.6604C2.77657 18.6682 3.63232 16.9567 5.34381 13.5337C5.61861 12.9841 5.75602 12.7093 5.81297 12.4217C5.86816 12.143 5.86816 11.8561 5.81297 11.5774C5.75602 11.2898 5.61862 11.015 5.34381 10.4654C3.63232 7.0424 2.77657 5.3309 3.03925 4.33869C3.28914 3.39478 4.02635 2.65757 4.97025 2.40768C5.96247 2.145 7.67396 3.00075 11.097 4.71225L15.9518 7.13967C20.1929 9.26023 22.3135 10.3205 22.3135 11.9996C22.3135 13.6786 20.1929 14.7389 15.9518 16.8594ZM10.5157 11.9627C10.518 11.5485 10.8556 11.2146 11.2698 11.2169L17.1916 11.2497C17.6058 11.252 17.9397 11.5896 17.9374 12.0038C17.9351 12.418 17.5975 12.7519 17.1833 12.7497L11.2615 12.7168C10.8473 12.7145 10.5134 12.3769 10.5157 11.9627Z",
fill: "currentColor",
fillRule: "evenodd"
}
) }),
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("clipPath", { id: "clip0_2703_16", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { fill: "white", height: "24", width: "24" }) }) })
]
}
);
// src/bold/plus.tsx
var import_jsx_runtime12 = require("react/jsx-runtime");
var PlusFilledIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime12.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_runtime12.jsx)(
"path",
{
clipRule: "evenodd",
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 22ZM12.75 9C12.75 8.58579 12.4142 8.25 12 8.25C11.5858 8.25 11.25 8.58579 11.25 9L11.25 11.25H9C8.58579 11.25 8.25 11.5858 8.25 12C8.25 12.4142 8.58579 12.75 9 12.75H11.25V15C11.25 15.4142 11.5858 15.75 12 15.75C12.4142 15.75 12.75 15.4142 12.75 15L12.75 12.75H15C15.4142 12.75 15.75 12.4142 15.75 12C15.75 11.5858 15.4142 11.25 15 11.25H12.75V9Z",
fill: "currentColor",
fillRule: "evenodd"
}
)
}
);
// src/bold/calendar-bold.tsx
var import_jsx_runtime13 = require("react/jsx-runtime");
var CalendarBoldIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime13.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_runtime13.jsx)(
"path",
{
d: "M7.75 2.5a.75.75 0 0 0-1.5 0v1.58c-1.44.115-2.384.397-3.078 1.092c-.695.694-.977 1.639-1.093 3.078h19.842c-.116-1.44-.398-2.384-1.093-3.078c-.694-.695-1.639-.977-3.078-1.093V2.5a.75.75 0 0 0-1.5 0v1.513C15.585 4 14.839 4 14 4h-4c-.839 0-1.585 0-2.25.013z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
"path",
{
clipRule: "evenodd",
d: "M2 12c0-.839 0-1.585.013-2.25h19.974C22 10.415 22 11.161 22 12v2c0 3.771 0 5.657-1.172 6.828C19.657 22 17.771 22 14 22h-4c-3.771 0-5.657 0-6.828-1.172C2 19.657 2 17.771 2 14zm15 2a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 4a1 1 0 1 0 0-2a1 1 0 0 0 0 2m-4-5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-6-3a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 4a1 1 0 1 0 0-2a1 1 0 0 0 0 2",
fill: "currentColor",
fillRule: "evenodd"
}
)
]
}
);
// src/bold/clock-square-bold.tsx
var import_jsx_runtime14 = require("react/jsx-runtime");
var ClockSquareBoldIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime14.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_runtime14.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("mask", { id: "solarClockSquareBold0", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("g", { fill: "none", children: [
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
"path",
{
d: "M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12",
fill: "#fff"
}
),
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
"path",
{
clipRule: "evenodd",
d: "M12 7.25a.75.75 0 0 1 .75.75v3.69l2.28 2.28a.75.75 0 1 1-1.06 1.06l-2.5-2.5a.75.75 0 0 1-.22-.53V8a.75.75 0 0 1 .75-.75",
fill: "#000",
fillRule: "evenodd"
}
)
] }) }) }),
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M0 0h24v24H0z", fill: "currentColor", mask: "url(#solarClockSquareBold0)" })
]
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
AlignBottomBoldIcon,
AlignHorizontallyBoldIcon,
AlignLeftBoldIcon,
AlignRightBoldIcon,
AlignTopBoldIcon,
AlignVerticallyBoldIcon,
CalendarBoldIcon,
ClockSquareBoldIcon,
PetBoldIcon,
PlusFilledIcon,
SendFilledIcon,
ShoppingCartBoldIcon,
VolumeHighBoldIcon,
VolumeLowBoldIcon
});
@@ -0,0 +1,18 @@
'use strict';
var SameValueNonNumeric = require('./SameValueNonNumeric');
var Type = require('./Type');
var BigIntEqual = require('./BigInt/equal');
var NumberEqual = require('./Number/equal');
// https://262.ecma-international.org/13.0/#sec-isstrictlyequal
module.exports = function IsStrictlyEqual(x, y) {
if (Type(x) !== Type(y)) {
return false;
}
if (typeof x === 'number' || typeof x === 'bigint') {
return typeof x === 'number' ? NumberEqual(x, y) : BigIntEqual(x, y);
}
return SameValueNonNumeric(x, y);
};
@@ -0,0 +1,23 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import { type SyncParseReturnType, isAborted, isDirty, isValid } from "../helpers/parseUtil.js";
test("parseUtil isInvalid should use structural typing", () => {
// Test for issue #556: https://github.com/colinhacks/zod/issues/556
const aborted: SyncParseReturnType = { status: "aborted" };
const dirty: SyncParseReturnType = { status: "dirty", value: "whatever" };
const valid: SyncParseReturnType = { status: "valid", value: "whatever" };
expect(isAborted(aborted)).toBe(true);
expect(isAborted(dirty)).toBe(false);
expect(isAborted(valid)).toBe(false);
expect(isDirty(aborted)).toBe(false);
expect(isDirty(dirty)).toBe(true);
expect(isDirty(valid)).toBe(false);
expect(isValid(aborted)).toBe(false);
expect(isValid(dirty)).toBe(false);
expect(isValid(valid)).toBe(true);
});
@@ -0,0 +1 @@
module.exports={C:{"115":0.48356,"120":0.02198,"125":0.0055,"128":0.01649,"135":0.0055,"136":0.02198,"138":0.0055,"139":0.0055,"140":0.03297,"141":0.04946,"142":0.04396,"143":1.4342,"144":1.29133,"145":0.0055,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 121 122 123 124 126 127 129 130 131 132 133 134 137 146 147 3.5 3.6"},D:{"39":0.0055,"40":0.0055,"41":0.0055,"42":0.0055,"43":0.0055,"44":0.0055,"45":0.0055,"46":0.0055,"47":0.01099,"48":0.0055,"49":0.0055,"50":0.0055,"51":0.0055,"52":0.0055,"53":0.0055,"54":0.0055,"55":0.0055,"56":0.0055,"57":0.0055,"58":0.0055,"59":0.0055,"60":0.0055,"65":0.0055,"79":0.02198,"80":0.0055,"83":0.0055,"87":0.01099,"91":0.0055,"97":0.01099,"98":0.06594,"101":0.0055,"103":0.02198,"104":0.01099,"108":0.01099,"109":0.20332,"110":0.01649,"111":0.01099,"112":2.36285,"114":0.0055,"115":0.0055,"116":0.03847,"117":0.0055,"118":0.0055,"119":0.02748,"120":0.02748,"121":0.0055,"122":0.04396,"123":0.0055,"124":0.02748,"125":4.8411,"126":0.23629,"127":0.01649,"128":0.13738,"129":0.01649,"130":0.01649,"131":0.03847,"132":0.03847,"133":0.04396,"134":0.09342,"135":0.03297,"136":0.02748,"137":0.10441,"138":0.24178,"139":0.97262,"140":6.78633,"141":17.35321,"142":0.2198,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 66 67 68 69 70 71 72 73 74 75 76 77 78 81 84 85 86 88 89 90 92 93 94 95 96 99 100 102 105 106 107 113 143 144 145"},F:{"91":0.0055,"92":0.02198,"95":0.01099,"120":0.08792,"121":0.23629,"122":2.09909,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.01099,"109":0.0055,"114":0.28574,"122":0.0055,"126":0.0055,"129":0.0055,"131":0.03847,"132":0.0055,"133":0.0055,"134":0.06045,"136":0.0055,"137":0.01649,"138":0.02748,"139":0.03297,"140":0.89019,"141":4.65976,"142":0.02198,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 120 121 123 124 125 127 128 130 135"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 6.1 7.1 9.1 10.1 11.1 12.1 15.2-15.3 15.4 15.5 16.0 17.0 26.2","5.1":0.0055,"13.1":0.01099,"14.1":0.02198,"15.1":0.0055,"15.6":0.06594,"16.1":0.0055,"16.2":0.0055,"16.3":0.01099,"16.4":0.0055,"16.5":0.01099,"16.6":0.09342,"17.1":0.29124,"17.2":0.01099,"17.3":0.0055,"17.4":0.01099,"17.5":0.09342,"17.6":0.12639,"18.0":0.04396,"18.1":0.01099,"18.2":0.01649,"18.3":0.06045,"18.4":0.02748,"18.5-18.6":0.09342,"26.0":0.74183,"26.1":0.02748},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00111,"5.0-5.1":0,"6.0-6.1":0.00444,"7.0-7.1":0.00333,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00999,"10.0-10.2":0.00111,"10.3":0.01888,"11.0-11.2":0.27984,"11.3-11.4":0.00666,"12.0-12.1":0.00222,"12.2-12.5":0.05441,"13.0-13.1":0,"13.2":0.00555,"13.3":0.00222,"13.4-13.7":0.00888,"14.0-14.4":0.01888,"14.5-14.8":0.01999,"15.0-15.1":0.01888,"15.2-15.3":0.01444,"15.4":0.01666,"15.5":0.01888,"15.6-15.8":0.24653,"16.0":0.03331,"16.1":0.06219,"16.2":0.0322,"16.3":0.05775,"16.4":0.01444,"16.5":0.02554,"16.6-16.7":0.32981,"17.0":0.02332,"17.1":0.03554,"17.2":0.02554,"17.3":0.03776,"17.4":0.06663,"17.5":0.11438,"17.6-17.7":0.28873,"18.0":0.06552,"18.1":0.13548,"18.2":0.07329,"18.3":0.23542,"18.4":0.12104,"18.5-18.6":6.17206,"26.0":0.7629,"26.1":0.02776},P:{"4":0.02061,"21":0.01031,"22":0.01031,"23":0.01031,"24":0.02061,"25":0.01031,"26":0.08244,"27":0.04122,"28":2.08165,"29":0.14427,_:"20 5.0-5.4 6.2-6.4 8.2 9.2 10.1 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.03092,"11.1-11.2":0.01031},I:{"0":0.04049,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00002},K:{"0":0.22075,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.42347},Q:{_:"14.9"},O:{"0":0.02703},H:{"0":0},L:{"0":34.16356}};
@@ -0,0 +1 @@
{"version":3,"file":"prefer-exact-props.d.ts","sourceRoot":"","sources":["prefer-exact-props.js"],"names":[],"mappings":"wBAwBW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1 @@
{"version":3,"file":"injectable.d.ts","sourceRoot":"","sources":["../../../../src/metadata/decorators/injectable.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAOjE,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,cAAc,CAmB/D"}
@@ -0,0 +1,117 @@
# fresh
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][ci-image]][ci-url]
[![Test Coverage][coveralls-image]][coveralls-url]
HTTP response freshness testing
## Installation
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```
$ npm install fresh
```
## API
```js
var fresh = require('fresh')
```
### fresh(reqHeaders, resHeaders)
Check freshness of the response using request and response headers.
When the response is still "fresh" in the client's cache `true` is
returned, otherwise `false` is returned to indicate that the client
cache is now stale and the full response should be sent.
When a client sends the `Cache-Control: no-cache` request header to
indicate an end-to-end reload request, this module will return `false`
to make handling these requests transparent.
## Known Issues
This module is designed to only follow the HTTP specifications, not
to work-around all kinda of client bugs (especially since this module
typically does not receive enough information to understand what the
client actually is).
There is a known issue that in certain versions of Safari, Safari
will incorrectly make a request that allows this module to validate
freshness of the resource even when Safari does not have a
representation of the resource in the cache. The module
[jumanji](https://www.npmjs.com/package/jumanji) can be used in
an Express application to work-around this issue and also provides
links to further reading on this Safari bug.
## Example
### API usage
<!-- eslint-disable no-redeclare -->
```js
var reqHeaders = { 'if-none-match': '"foo"' }
var resHeaders = { etag: '"bar"' }
fresh(reqHeaders, resHeaders)
// => false
var reqHeaders = { 'if-none-match': '"foo"' }
var resHeaders = { etag: '"foo"' }
fresh(reqHeaders, resHeaders)
// => true
```
### Using with Node.js http server
```js
var fresh = require('fresh')
var http = require('http')
var server = http.createServer(function (req, res) {
// perform server logic
// ... including adding ETag / Last-Modified response headers
if (isFresh(req, res)) {
// client has a fresh copy of resource
res.statusCode = 304
res.end()
return
}
// send the resource
res.statusCode = 200
res.end('hello, world!')
})
function isFresh (req, res) {
return fresh(req.headers, {
etag: res.getHeader('ETag'),
'last-modified': res.getHeader('Last-Modified')
})
}
server.listen(3000)
```
## License
[MIT](LICENSE)
[ci-image]: https://img.shields.io/github/workflow/status/jshttp/fresh/ci/master?label=ci
[ci-url]: https://github.com/jshttp/fresh/actions/workflows/ci.yml
[npm-image]: https://img.shields.io/npm/v/fresh.svg
[npm-url]: https://npmjs.org/package/fresh
[node-version-image]: https://img.shields.io/node/v/fresh.svg
[node-version-url]: https://nodejs.org/en/
[coveralls-image]: https://img.shields.io/coveralls/jshttp/fresh/master.svg
[coveralls-url]: https://coveralls.io/r/jshttp/fresh?branch=master
[downloads-image]: https://img.shields.io/npm/dm/fresh.svg
[downloads-url]: https://npmjs.org/package/fresh
@@ -0,0 +1,172 @@
'use strict';
var _minimatch = require('minimatch');var _minimatch2 = _interopRequireDefault(_minimatch);
var _contextCompat = require('eslint-module-utils/contextCompat');
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
/**
* @param {MemberExpression} memberExpression
* @returns {string} the name of the member in the object expression, e.g. the `x` in `namespace.x`
*/
function getMemberPropertyName(memberExpression) {
return memberExpression.property.type === 'Identifier' ?
memberExpression.property.name :
memberExpression.property.value;
}
/**
* @param {ScopeManager} scopeManager
* @param {ASTNode} node
* @return {Set<string>}
*/ /**
* @fileoverview Rule to disallow namespace import
* @author Radek Benkel
*/function getVariableNamesInScope(scopeManager, node) {var currentNode = node;var scope = scopeManager.acquire(currentNode);
while (scope == null) {
currentNode = currentNode.parent;
scope = scopeManager.acquire(currentNode, true);
}
return new Set(scope.variables.concat(scope.upper.variables).map(function (variable) {return variable.name;}));
}
/**
*
* @param {*} names
* @param {*} nameConflicts
* @param {*} namespaceName
*/
function generateLocalNames(names, nameConflicts, namespaceName) {
var localNames = {};
names.forEach(function (name) {
var localName = void 0;
if (!nameConflicts[name].has(name)) {
localName = name;
} else if (!nameConflicts[name].has(String(namespaceName) + '_' + String(name))) {
localName = String(namespaceName) + '_' + String(name);
} else {
for (var i = 1; i < Infinity; i++) {
if (!nameConflicts[name].has(String(namespaceName) + '_' + String(name) + '_' + String(i))) {
localName = String(namespaceName) + '_' + String(name) + '_' + String(i);
break;
}
}
}
localNames[name] = localName;
});
return localNames;
}
/**
* @param {Identifier[]} namespaceIdentifiers
* @returns {boolean} `true` if the namespace variable is more than just a glorified constant
*/
function usesNamespaceAsObject(namespaceIdentifiers) {
return !namespaceIdentifiers.every(function (identifier) {
var parent = identifier.parent;
// `namespace.x` or `namespace['x']`
return (
parent &&
parent.type === 'MemberExpression' && (
parent.property.type === 'Identifier' || parent.property.type === 'Literal'));
});
}
module.exports = {
meta: {
type: 'suggestion',
docs: {
category: 'Style guide',
description: 'Forbid namespace (a.k.a. "wildcard" `*`) imports.',
url: (0, _docsUrl2['default'])('no-namespace') },
fixable: 'code',
schema: [{
type: 'object',
properties: {
ignore: {
type: 'array',
items: {
type: 'string' },
uniqueItems: true } } }] },
create: function () {function create(context) {
var firstOption = context.options[0] || {};
var ignoreGlobs = firstOption.ignore;
return {
ImportNamespaceSpecifier: function () {function ImportNamespaceSpecifier(node) {
if (ignoreGlobs && ignoreGlobs.find(function (glob) {return (0, _minimatch2['default'])(node.parent.source.value, glob, { matchBase: true });})) {
return;
}
var scopeVariables = (0, _contextCompat.getScope)(context, node).variables;
var namespaceVariable = scopeVariables.find(function (variable) {return variable.defs[0].node === node;});
var namespaceReferences = namespaceVariable.references;
var namespaceIdentifiers = namespaceReferences.map(function (reference) {return reference.identifier;});
var canFix = namespaceIdentifiers.length > 0 && !usesNamespaceAsObject(namespaceIdentifiers);
context.report({
node: node,
message: 'Unexpected namespace import.',
fix: canFix && function (fixer) {var _getSourceCode =
(0, _contextCompat.getSourceCode)(context),scopeManager = _getSourceCode.scopeManager;
var fixes = [];
// Pass 1: Collect variable names that are already in scope for each reference we want
// to transform, so that we can be sure that we choose non-conflicting import names
var importNameConflicts = {};
namespaceIdentifiers.forEach(function (identifier) {
var parent = identifier.parent;
if (parent && parent.type === 'MemberExpression') {
var importName = getMemberPropertyName(parent);
var localConflicts = getVariableNamesInScope(scopeManager, parent);
if (!importNameConflicts[importName]) {
importNameConflicts[importName] = localConflicts;
} else {
localConflicts.forEach(function (c) {return importNameConflicts[importName].add(c);});
}
}
});
// Choose new names for each import
var importNames = Object.keys(importNameConflicts);
var importLocalNames = generateLocalNames(
importNames,
importNameConflicts,
namespaceVariable.name);
// Replace the ImportNamespaceSpecifier with a list of ImportSpecifiers
var namedImportSpecifiers = importNames.map(function (importName) {return importName === importLocalNames[importName] ?
importName : String(
importName) + ' as ' + String(importLocalNames[importName]);});
fixes.push(fixer.replaceText(node, '{ ' + String(namedImportSpecifiers.join(', ')) + ' }'));
// Pass 2: Replace references to the namespace with references to the named imports
namespaceIdentifiers.forEach(function (identifier) {
var parent = identifier.parent;
if (parent && parent.type === 'MemberExpression') {
var importName = getMemberPropertyName(parent);
fixes.push(fixer.replaceText(parent, importLocalNames[importName]));
}
});
return fixes;
} });
}return ImportNamespaceSpecifier;}() };
}return create;}() };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1uYW1lc3BhY2UuanMiXSwibmFtZXMiOlsiZ2V0TWVtYmVyUHJvcGVydHlOYW1lIiwibWVtYmVyRXhwcmVzc2lvbiIsInByb3BlcnR5IiwidHlwZSIsIm5hbWUiLCJ2YWx1ZSIsImdldFZhcmlhYmxlTmFtZXNJblNjb3BlIiwic2NvcGVNYW5hZ2VyIiwibm9kZSIsImN1cnJlbnROb2RlIiwic2NvcGUiLCJhY3F1aXJlIiwicGFyZW50IiwiU2V0IiwidmFyaWFibGVzIiwiY29uY2F0IiwidXBwZXIiLCJtYXAiLCJ2YXJpYWJsZSIsImdlbmVyYXRlTG9jYWxOYW1lcyIsIm5hbWVzIiwibmFtZUNvbmZsaWN0cyIsIm5hbWVzcGFjZU5hbWUiLCJsb2NhbE5hbWVzIiwiZm9yRWFjaCIsImxvY2FsTmFtZSIsImhhcyIsImkiLCJJbmZpbml0eSIsInVzZXNOYW1lc3BhY2VBc09iamVjdCIsIm5hbWVzcGFjZUlkZW50aWZpZXJzIiwiZXZlcnkiLCJpZGVudGlmaWVyIiwibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJkb2NzIiwiY2F0ZWdvcnkiLCJkZXNjcmlwdGlvbiIsInVybCIsImZpeGFibGUiLCJzY2hlbWEiLCJwcm9wZXJ0aWVzIiwiaWdub3JlIiwiaXRlbXMiLCJ1bmlxdWVJdGVtcyIsImNyZWF0ZSIsImNvbnRleHQiLCJmaXJzdE9wdGlvbiIsIm9wdGlvbnMiLCJpZ25vcmVHbG9icyIsIkltcG9ydE5hbWVzcGFjZVNwZWNpZmllciIsImZpbmQiLCJnbG9iIiwic291cmNlIiwibWF0Y2hCYXNlIiwic2NvcGVWYXJpYWJsZXMiLCJuYW1lc3BhY2VWYXJpYWJsZSIsImRlZnMiLCJuYW1lc3BhY2VSZWZlcmVuY2VzIiwicmVmZXJlbmNlcyIsInJlZmVyZW5jZSIsImNhbkZpeCIsImxlbmd0aCIsInJlcG9ydCIsIm1lc3NhZ2UiLCJmaXgiLCJmaXhlciIsImZpeGVzIiwiaW1wb3J0TmFtZUNvbmZsaWN0cyIsImltcG9ydE5hbWUiLCJsb2NhbENvbmZsaWN0cyIsImMiLCJhZGQiLCJpbXBvcnROYW1lcyIsIk9iamVjdCIsImtleXMiLCJpbXBvcnRMb2NhbE5hbWVzIiwibmFtZWRJbXBvcnRTcGVjaWZpZXJzIiwicHVzaCIsInJlcGxhY2VUZXh0Iiwiam9pbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFLQSxzQztBQUNBOztBQUVBLHFDOztBQUVBOzs7O0FBSUEsU0FBU0EscUJBQVQsQ0FBK0JDLGdCQUEvQixFQUFpRDtBQUMvQyxTQUFPQSxpQkFBaUJDLFFBQWpCLENBQTBCQyxJQUExQixLQUFtQyxZQUFuQztBQUNIRixtQkFBaUJDLFFBQWpCLENBQTBCRSxJQUR2QjtBQUVISCxtQkFBaUJDLFFBQWpCLENBQTBCRyxLQUY5QjtBQUdEOztBQUVEOzs7O01BcEJBOzs7U0F5QkEsU0FBU0MsdUJBQVQsQ0FBaUNDLFlBQWpDLEVBQStDQyxJQUEvQyxFQUFxRCxDQUNuRCxJQUFJQyxjQUFjRCxJQUFsQixDQUNBLElBQUlFLFFBQVFILGFBQWFJLE9BQWIsQ0FBcUJGLFdBQXJCLENBQVo7QUFDQSxTQUFPQyxTQUFTLElBQWhCLEVBQXNCO0FBQ3BCRCxrQkFBY0EsWUFBWUcsTUFBMUI7QUFDQUYsWUFBUUgsYUFBYUksT0FBYixDQUFxQkYsV0FBckIsRUFBa0MsSUFBbEMsQ0FBUjtBQUNEO0FBQ0QsU0FBTyxJQUFJSSxHQUFKLENBQVFILE1BQU1JLFNBQU4sQ0FBZ0JDLE1BQWhCLENBQXVCTCxNQUFNTSxLQUFOLENBQVlGLFNBQW5DLEVBQThDRyxHQUE5QyxDQUFrRCxVQUFDQyxRQUFELFVBQWNBLFNBQVNkLElBQXZCLEVBQWxELENBQVIsQ0FBUDtBQUNEOztBQUVEOzs7Ozs7QUFNQSxTQUFTZSxrQkFBVCxDQUE0QkMsS0FBNUIsRUFBbUNDLGFBQW5DLEVBQWtEQyxhQUFsRCxFQUFpRTtBQUMvRCxNQUFNQyxhQUFhLEVBQW5CO0FBQ0FILFFBQU1JLE9BQU4sQ0FBYyxVQUFDcEIsSUFBRCxFQUFVO0FBQ3RCLFFBQUlxQixrQkFBSjtBQUNBLFFBQUksQ0FBQ0osY0FBY2pCLElBQWQsRUFBb0JzQixHQUFwQixDQUF3QnRCLElBQXhCLENBQUwsRUFBb0M7QUFDbENxQixrQkFBWXJCLElBQVo7QUFDRCxLQUZELE1BRU8sSUFBSSxDQUFDaUIsY0FBY2pCLElBQWQsRUFBb0JzQixHQUFwQixRQUEyQkosYUFBM0IsaUJBQTRDbEIsSUFBNUMsRUFBTCxFQUEwRDtBQUMvRHFCLHlCQUFlSCxhQUFmLGlCQUFnQ2xCLElBQWhDO0FBQ0QsS0FGTSxNQUVBO0FBQ0wsV0FBSyxJQUFJdUIsSUFBSSxDQUFiLEVBQWdCQSxJQUFJQyxRQUFwQixFQUE4QkQsR0FBOUIsRUFBbUM7QUFDakMsWUFBSSxDQUFDTixjQUFjakIsSUFBZCxFQUFvQnNCLEdBQXBCLFFBQTJCSixhQUEzQixpQkFBNENsQixJQUE1QyxpQkFBb0R1QixDQUFwRCxFQUFMLEVBQStEO0FBQzdERiw2QkFBZUgsYUFBZixpQkFBZ0NsQixJQUFoQyxpQkFBd0N1QixDQUF4QztBQUNBO0FBQ0Q7QUFDRjtBQUNGO0FBQ0RKLGVBQVduQixJQUFYLElBQW1CcUIsU0FBbkI7QUFDRCxHQWZEO0FBZ0JBLFNBQU9GLFVBQVA7QUFDRDs7QUFFRDs7OztBQUlBLFNBQVNNLHFCQUFULENBQStCQyxvQkFBL0IsRUFBcUQ7QUFDbkQsU0FBTyxDQUFDQSxxQkFBcUJDLEtBQXJCLENBQTJCLFVBQUNDLFVBQUQsRUFBZ0I7QUFDakQsUUFBTXBCLFNBQVNvQixXQUFXcEIsTUFBMUI7O0FBRUE7QUFDQTtBQUNFQTtBQUNHQSxhQUFPVCxJQUFQLEtBQWdCLGtCQURuQjtBQUVJUyxhQUFPVixRQUFQLENBQWdCQyxJQUFoQixLQUF5QixZQUF6QixJQUF5Q1MsT0FBT1YsUUFBUCxDQUFnQkMsSUFBaEIsS0FBeUIsU0FGdEUsQ0FERjs7QUFLRCxHQVRPLENBQVI7QUFVRDs7QUFFRDhCLE9BQU9DLE9BQVAsR0FBaUI7QUFDZkMsUUFBTTtBQUNKaEMsVUFBTSxZQURGO0FBRUppQyxVQUFNO0FBQ0pDLGdCQUFVLGFBRE47QUFFSkMsbUJBQWEsbURBRlQ7QUFHSkMsV0FBSywwQkFBUSxjQUFSLENBSEQsRUFGRjs7QUFPSkMsYUFBUyxNQVBMO0FBUUpDLFlBQVEsQ0FBQztBQUNQdEMsWUFBTSxRQURDO0FBRVB1QyxrQkFBWTtBQUNWQyxnQkFBUTtBQUNOeEMsZ0JBQU0sT0FEQTtBQUVOeUMsaUJBQU87QUFDTHpDLGtCQUFNLFFBREQsRUFGRDs7QUFLTjBDLHVCQUFhLElBTFAsRUFERSxFQUZMLEVBQUQsQ0FSSixFQURTOzs7Ozs7QUF1QmZDLFFBdkJlLCtCQXVCUkMsT0F2QlEsRUF1QkM7QUFDZCxVQUFNQyxjQUFjRCxRQUFRRSxPQUFSLENBQWdCLENBQWhCLEtBQXNCLEVBQTFDO0FBQ0EsVUFBTUMsY0FBY0YsWUFBWUwsTUFBaEM7O0FBRUEsYUFBTztBQUNMUSxnQ0FESyxpREFDb0IzQyxJQURwQixFQUMwQjtBQUM3QixnQkFBSTBDLGVBQWVBLFlBQVlFLElBQVosQ0FBaUIsVUFBQ0MsSUFBRCxVQUFVLDRCQUFVN0MsS0FBS0ksTUFBTCxDQUFZMEMsTUFBWixDQUFtQmpELEtBQTdCLEVBQW9DZ0QsSUFBcEMsRUFBMEMsRUFBRUUsV0FBVyxJQUFiLEVBQTFDLENBQVYsRUFBakIsQ0FBbkIsRUFBK0c7QUFDN0c7QUFDRDs7QUFFRCxnQkFBTUMsaUJBQWlCLDZCQUFTVCxPQUFULEVBQWtCdkMsSUFBbEIsRUFBd0JNLFNBQS9DO0FBQ0EsZ0JBQU0yQyxvQkFBb0JELGVBQWVKLElBQWYsQ0FBb0IsVUFBQ2xDLFFBQUQsVUFBY0EsU0FBU3dDLElBQVQsQ0FBYyxDQUFkLEVBQWlCbEQsSUFBakIsS0FBMEJBLElBQXhDLEVBQXBCLENBQTFCO0FBQ0EsZ0JBQU1tRCxzQkFBc0JGLGtCQUFrQkcsVUFBOUM7QUFDQSxnQkFBTTlCLHVCQUF1QjZCLG9CQUFvQjFDLEdBQXBCLENBQXdCLFVBQUM0QyxTQUFELFVBQWVBLFVBQVU3QixVQUF6QixFQUF4QixDQUE3QjtBQUNBLGdCQUFNOEIsU0FBU2hDLHFCQUFxQmlDLE1BQXJCLEdBQThCLENBQTlCLElBQW1DLENBQUNsQyxzQkFBc0JDLG9CQUF0QixDQUFuRDs7QUFFQWlCLG9CQUFRaUIsTUFBUixDQUFlO0FBQ2J4RCx3QkFEYTtBQUVieUQscURBRmE7QUFHYkMsbUJBQUtKLFVBQVcsVUFBQ0sLine truncated
@@ -0,0 +1 @@
module.exports = require('./lib').eventHandlers; // eslint-disable-line import/no-unresolved
@@ -0,0 +1,108 @@
/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
module.exports = simpleGet
const concat = require('simple-concat')
const decompressResponse = require('decompress-response') // excluded from browser build
const http = require('http')
const https = require('https')
const once = require('once')
const querystring = require('querystring')
const url = require('url')
const isStream = o => o !== null && typeof o === 'object' && typeof o.pipe === 'function'
function simpleGet (opts, cb) {
opts = Object.assign({ maxRedirects: 10 }, typeof opts === 'string' ? { url: opts } : opts)
cb = once(cb)
if (opts.url) {
const { hostname, port, protocol, auth, path } = url.parse(opts.url) // eslint-disable-line node/no-deprecated-api
delete opts.url
if (!hostname && !port && !protocol && !auth) opts.path = path // Relative redirect
else Object.assign(opts, { hostname, port, protocol, auth, path }) // Absolute redirect
}
const headers = { 'accept-encoding': 'gzip, deflate' }
if (opts.headers) Object.keys(opts.headers).forEach(k => (headers[k.toLowerCase()] = opts.headers[k]))
opts.headers = headers
let body
if (opts.body) {
body = opts.json && !isStream(opts.body) ? JSON.stringify(opts.body) : opts.body
} else if (opts.form) {
body = typeof opts.form === 'string' ? opts.form : querystring.stringify(opts.form)
opts.headers['content-type'] = 'application/x-www-form-urlencoded'
}
if (body) {
if (!opts.method) opts.method = 'POST'
if (!isStream(body)) opts.headers['content-length'] = Buffer.byteLength(body)
if (opts.json && !opts.form) opts.headers['content-type'] = 'application/json'
}
delete opts.body; delete opts.form
if (opts.json) opts.headers.accept = 'application/json'
if (opts.method) opts.method = opts.method.toUpperCase()
const originalHost = opts.hostname // hostname before potential redirect
const protocol = opts.protocol === 'https:' ? https : http // Support http/https urls
const req = protocol.request(opts, res => {
if (opts.followRedirects !== false && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
opts.url = res.headers.location // Follow 3xx redirects
delete opts.headers.host // Discard `host` header on redirect (see #32)
res.resume() // Discard response
const redirectHost = url.parse(opts.url).hostname // eslint-disable-line node/no-deprecated-api
// If redirected host is different than original host, drop headers to prevent cookie leak (#73)
if (redirectHost !== null && redirectHost !== originalHost) {
delete opts.headers.cookie
delete opts.headers.authorization
}
if (opts.method === 'POST' && [301, 302].includes(res.statusCode)) {
opts.method = 'GET' // On 301/302 redirect, change POST to GET (see #35)
delete opts.headers['content-length']; delete opts.headers['content-type']
}
if (opts.maxRedirects-- === 0) return cb(new Error('too many redirects'))
else return simpleGet(opts, cb)
}
const tryUnzip = typeof decompressResponse === 'function' && opts.method !== 'HEAD'
cb(null, tryUnzip ? decompressResponse(res) : res)
})
req.on('timeout', () => {
req.abort()
cb(new Error('Request timed out'))
})
req.on('error', cb)
if (isStream(body)) body.on('error', cb).pipe(req)
else req.end(body)
return req
}
simpleGet.concat = (opts, cb) => {
return simpleGet(opts, (err, res) => {
if (err) return cb(err)
concat(res, (err, data) => {
if (err) return cb(err)
if (opts.json) {
try {
data = JSON.parse(data.toString())
} catch (err) {
return cb(err, res, data)
}
}
cb(null, res, data)
})
})
}
;['get', 'post', 'put', 'patch', 'head', 'delete'].forEach(method => {
simpleGet[method] = (opts, cb) => {
if (typeof opts === 'string') opts = { url: opts }
return simpleGet(Object.assign({ method: method.toUpperCase() }, opts), cb)
}
})
@@ -0,0 +1,20 @@
'use strict';
var $TypeError = require('es-errors/type');
// var OrdinaryObjectCreate = require('es-abstract/2024/OrdinaryObjectCreate');
var Type = require('es-abstract/2024/Type');
// https://tc39.es/proposal-joint-iteration/#sec-getoptionsobject
module.exports = function GetOptionsObject(options) {
if (typeof options === 'undefined') { // step 1
// return OrdinaryObjectCreate(null); // step 1.a
return { __proto__: null }; // step 1.a
}
if (Type(options) === 'Object') { // step 2
return options; // step 2.a
}
throw new $TypeError('`options` must be an Object or undefined'); // step 3
};
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAWM,MAAM;IAiFX;;GAEC,GACD,OAAmB;QACjB,IAAI,MAAM,IAAI,0CAAW,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;QAC5D,IAAI,aAAa,GAAG,IAAI,CAAC,aAAa;QACtC,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO;QAC1B,IAAI,SAAS,GAAG,IAAI,CAAC,SAAS;QAC9B,IAAI,SAAS,GAAG,IAAI,CAAC,SAAS;QAC9B,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO;QAC1B,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ;QAC5B,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM;QACxB,IAAI,aAAa,GAAG,IAAI,CAAC,aAAa;QACtC,OAAO;IACT;IAjCA;;;;GAIC,GACD,YAAY,IAAY,EAAE,GAAQ,EAAE,IAAU,CAAE;QAC9C,IAAI,CAAC,IAAI,GAAG;QACZ,IAAI,CAAC,GAAG,GAAG;QACX,IAAI,CAAC,SAAS,GAAG;QACjB,IAAI,CAAC,OAAO,GAAG;QACf,IAAI,CAAC,IAAI,GAAG;QACZ,IAAI,CAAC,aAAa,GAAG;QACrB,IAAI,CAAC,QAAQ,GAAG;QAChB,IAAI,CAAC,OAAO,GAAG;QACf,IAAI,CAAC,SAAS,GAAG;QACjB,IAAI,CAAC,MAAM,GAAG;QACd,IAAI,CAAC,aAAa,GAAG;IACvB;AAiBF","sources":["packages/@react-stately/virtualizer/src/LayoutInfo.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 {Key} from '@react-types/shared';\nimport {Rect} from './Rect';\n\n/**\n * Instances of this lightweight class are created by `Layout` subclasses\n * to represent each item in the `Virtualizer`. LayoutInfo objects describe\n * various properties of an item, such as its position and size, and style information.\n * The virtualizer uses this information when creating actual DOM elements to display.\n */\nexport class LayoutInfo {\n /**\n * The type of element represented by this LayoutInfo. Should match the `type` of the corresponding collection node.\n */\n type: string;\n\n /**\n * A unique key for this LayoutInfo. Should match the `key` of the corresponding collection node.\n */\n key: Key;\n\n /**\n * The key for a parent LayoutInfo, if any.\n */\n parentKey: Key | null;\n\n /** \n * Content for this item if it was generated by the layout rather than coming from the Collection.\n */\n content: any | null;\n\n /**\n * The rectangle describing the size and position of this element.\n */\n rect: Rect;\n\n /**\n * Whether the size is estimated. `false` by default.\n * Items with estimated sizes will be measured the first time they are added to the DOM.\n * The estimated size is used to calculate the size and position of the scrollbar.\n * @default false\n */\n estimatedSize: boolean;\n\n /**\n * Whether the layout info sticks to the viewport when scrolling.\n * @default false\n */\n isSticky: boolean;\n\n /**\n * The element's opacity.\n * @default 1\n */\n opacity: number;\n\n /**\n * A CSS transform string to apply to the element. `null` by default.\n */\n transform: string | null;\n\n /**\n * The z-index of the element. 0 by default.\n */\n zIndex: number;\n\n /**\n * Whether the element allows its contents to overflow its container.\n * @default false\n */\n allowOverflow: boolean;\n\n /**\n * @param type The type of element represented by this LayoutInfo. Should match the `type` of the corresponding collection node.\n * @param key A unique key for this LayoutInfo. Should match the `key` of the corresponding collection node.\n * @param rect The rectangle describing the size and position of this element.\n */\n constructor(type: string, key: Key, rect: Rect) {\n this.type = type;\n this.key = key;\n this.parentKey = null;\n this.content = null;\n this.rect = rect;\n this.estimatedSize = false;\n this.isSticky = false;\n this.opacity = 1;\n this.transform = null;\n this.zIndex = 0;\n this.allowOverflow = false;\n }\n\n /**\n * Returns a copy of the LayoutInfo.\n */\n copy(): LayoutInfo {\n let res = new LayoutInfo(this.type, this.key, this.rect.copy());\n res.estimatedSize = this.estimatedSize;\n res.opacity = this.opacity;\n res.transform = this.transform;\n res.parentKey = this.parentKey;\n res.content = this.content;\n res.isSticky = this.isSticky;\n res.zIndex = this.zIndex;\n res.allowOverflow = this.allowOverflow;\n return res;\n }\n}\n"],"names":[],"version":3,"file":"LayoutInfo.module.js.map"}
@@ -0,0 +1 @@
{"version":3,"file":"setext-underline.d.ts","sourceRoot":"","sources":["setext-underline.js"],"names":[],"mappings":"AAgBA,wBAAwB;AACxB,8BADW,SAAS,CAKnB;+BAbS,sBAAsB"}
@@ -0,0 +1,6 @@
[![Test coverage](https://codecov.io/gh/inversify/monorepo/branch/main/graph/badge.svg?flag=%40inversifyjs%2Fcore)](https://codecov.io/gh/inversify/monorepo/branch/main/graph/badge.svg?flag=%40inversifyjs%2Fcore)
[![npm version](https://img.shields.io/github/package-json/v/inversify/monorepo?filename=packages%2Fcontainer%2Flibraries%2Fcore%2Fpackage.json&style=plastic)](https://www.npmjs.com/package/@inversifyjs/core)
# @inversifyjs/core
Inversify monorepo core modules.
@@ -0,0 +1,218 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _jsxAstUtils = require("jsx-ast-utils");
var _arrayPrototype = _interopRequireDefault(require("array.prototype.flatmap"));
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _hasAccessibleChild = _interopRequireDefault(require("../util/hasAccessibleChild"));
var _isPresentationRole = _interopRequireDefault(require("../util/isPresentationRole"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview Enforce all elements that require alternative text have it.
* @author Ethan Cohen
*/
// ----------------------------------------------------------------------------
// Rule Definition
// ----------------------------------------------------------------------------
var DEFAULT_ELEMENTS = ['img', 'object', 'area', 'input[type="image"]'];
var schema = (0, _schemas.generateObjSchema)({
elements: _schemas.arraySchema,
img: _schemas.arraySchema,
object: _schemas.arraySchema,
area: _schemas.arraySchema,
'input[type="image"]': _schemas.arraySchema
});
var ariaLabelHasValue = function ariaLabelHasValue(prop) {
var value = (0, _jsxAstUtils.getPropValue)(prop);
if (value === undefined) {
return false;
}
if (typeof value === 'string' && value.length === 0) {
return false;
}
return true;
};
var ruleByElement = {
img(context, node, nodeType) {
var altProp = (0, _jsxAstUtils.getProp)(node.attributes, 'alt');
// Missing alt prop error.
if (altProp === undefined) {
if ((0, _isPresentationRole["default"])(nodeType, node.attributes)) {
context.report({
node,
message: 'Prefer alt="" over a presentational role. First rule of aria is to not use aria if it can be achieved via native HTML.'
});
return;
}
// Check for `aria-label` to provide text alternative
// Don't create an error if the attribute is used correctly. But if it
// isn't, suggest that the developer use `alt` instead.
var ariaLabelProp = (0, _jsxAstUtils.getProp)(node.attributes, 'aria-label');
if (ariaLabelProp !== undefined) {
if (!ariaLabelHasValue(ariaLabelProp)) {
context.report({
node,
message: 'The aria-label attribute must have a value. The alt attribute is preferred over aria-label for images.'
});
}
return;
}
// Check for `aria-labelledby` to provide text alternative
// Don't create an error if the attribute is used correctly. But if it
// isn't, suggest that the developer use `alt` instead.
var ariaLabelledbyProp = (0, _jsxAstUtils.getProp)(node.attributes, 'aria-labelledby');
if (ariaLabelledbyProp !== undefined) {
if (!ariaLabelHasValue(ariaLabelledbyProp)) {
context.report({
node,
message: 'The aria-labelledby attribute must have a value. The alt attribute is preferred over aria-labelledby for images.'
});
}
return;
}
context.report({
node,
message: "".concat(nodeType, " elements must have an alt prop, either with meaningful text, or an empty string for decorative images.")
});
return;
}
// Check if alt prop is undefined.
var altValue = (0, _jsxAstUtils.getPropValue)(altProp);
var isNullValued = altProp.value === null; // <img alt />
if (altValue && !isNullValued || altValue === '') {
return;
}
// Undefined alt prop error.
context.report({
node,
message: "Invalid alt value for ".concat(nodeType, ". Use alt=\"\" for presentational images.")
});
},
object(context, node, unusedNodeType, elementType) {
var ariaLabelProp = (0, _jsxAstUtils.getProp)(node.attributes, 'aria-label');
var arialLabelledByProp = (0, _jsxAstUtils.getProp)(node.attributes, 'aria-labelledby');
var hasLabel = ariaLabelHasValue(ariaLabelProp) || ariaLabelHasValue(arialLabelledByProp);
var titleProp = (0, _jsxAstUtils.getLiteralPropValue)((0, _jsxAstUtils.getProp)(node.attributes, 'title'));
var hasTitleAttr = !!titleProp;
if (hasLabel || hasTitleAttr || (0, _hasAccessibleChild["default"])(node.parent, elementType)) {
return;
}
context.report({
node,
message: 'Embedded <object> elements must have alternative text by providing inner text, aria-label or aria-labelledby props.'
});
},
area(context, node) {
var ariaLabelProp = (0, _jsxAstUtils.getProp)(node.attributes, 'aria-label');
var arialLabelledByProp = (0, _jsxAstUtils.getProp)(node.attributes, 'aria-labelledby');
var hasLabel = ariaLabelHasValue(ariaLabelProp) || ariaLabelHasValue(arialLabelledByProp);
if (hasLabel) {
return;
}
var altProp = (0, _jsxAstUtils.getProp)(node.attributes, 'alt');
if (altProp === undefined) {
context.report({
node,
message: 'Each area of an image map must have a text alternative through the `alt`, `aria-label`, or `aria-labelledby` prop.'
});
return;
}
var altValue = (0, _jsxAstUtils.getPropValue)(altProp);
var isNullValued = altProp.value === null; // <area alt />
if (altValue && !isNullValued || altValue === '') {
return;
}
context.report({
node,
message: 'Each area of an image map must have a text alternative through the `alt`, `aria-label`, or `aria-labelledby` prop.'
});
},
'input[type="image"]': function inputImage(context, node, nodeType) {
// Only test input[type="image"]
if (nodeType === 'input') {
var typePropValue = (0, _jsxAstUtils.getPropValue)((0, _jsxAstUtils.getProp)(node.attributes, 'type'));
if (typePropValue !== 'image') {
return;
}
}
var ariaLabelProp = (0, _jsxAstUtils.getProp)(node.attributes, 'aria-label');
var arialLabelledByProp = (0, _jsxAstUtils.getProp)(node.attributes, 'aria-labelledby');
var hasLabel = ariaLabelHasValue(ariaLabelProp) || ariaLabelHasValue(arialLabelledByProp);
if (hasLabel) {
return;
}
var altProp = (0, _jsxAstUtils.getProp)(node.attributes, 'alt');
if (altProp === undefined) {
context.report({
node,
message: '<input> elements with type="image" must have a text alternative through the `alt`, `aria-label`, or `aria-labelledby` prop.'
});
return;
}
var altValue = (0, _jsxAstUtils.getPropValue)(altProp);
var isNullValued = altProp.value === null; // <area alt />
if (altValue && !isNullValued || altValue === '') {
return;
}
context.report({
node,
message: '<input> elements with type="image" must have a text alternative through the `alt`, `aria-label`, or `aria-labelledby` prop.'
});
}
};
var _default = exports["default"] = {
meta: {
docs: {
url: 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md',
description: 'Enforce all elements that require alternative text have meaningful information to relay back to end user.'
},
schema: [schema]
},
create: function create(context) {
var options = context.options[0] || {};
// Elements to validate for alt text.
var elementOptions = options.elements || DEFAULT_ELEMENTS;
// Get custom components for just the elements that will be tested.
var customComponents = (0, _arrayPrototype["default"])(elementOptions, function (element) {
return options[element];
});
var typesToValidate = new Set([].concat(customComponents, elementOptions).map(function (type) {
return type === 'input[type="image"]' ? 'input' : type;
}));
var elementType = (0, _getElementType["default"])(context);
return {
JSXOpeningElement(node) {
var nodeType = elementType(node);
if (!typesToValidate.has(nodeType)) {
return;
}
var DOMElement = nodeType;
if (DOMElement === 'input') {
DOMElement = 'input[type="image"]';
}
// Map nodeType to the DOM element if we are running this on a custom component.
if (elementOptions.indexOf(DOMElement) === -1) {
DOMElement = elementOptions.find(function (element) {
var customComponentsForElement = options[element] || [];
return customComponentsForElement.indexOf(nodeType) > -1;
});
}
ruleByElement[DOMElement](context, node, nodeType, elementType);
}
};
}
};
module.exports = exports.default;
@@ -0,0 +1,8 @@
"use client";
import {
modal_header_default
} from "./chunk-IGSAU2ZA.mjs";
import "./chunk-UX6VCJJD.mjs";
export {
modal_header_default as default
};
@@ -0,0 +1,5 @@
type RequiredProperty<Type, Keys extends keyof Type> = Type & {
[P in Keys]-?: Type[P];
};
export type { RequiredProperty as R };
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,oBAAoB,CAAC,gDAAgD,CAAC;AAC1F","sources":["packages/@react-aria/menu/intl/en-US.json"],"sourcesContent":["{\n \"longPressMessage\": \"Long press or press Alt + ArrowDown to open menu\"\n}\n"],"names":[],"version":3,"file":"en-US.main.js.map"}
@@ -0,0 +1,119 @@
# import/no-cycle
<!-- end auto-generated rule header -->
Ensures that there is no resolvable path back to this module via its dependencies.
This includes cycles of depth 1 (imported module imports me) to `"∞"` (or `Infinity`), if the
[`maxDepth`](#maxdepth) option is not set.
```js
// dep-b.js
import './dep-a.js'
export function b() { /* ... */ }
```
```js
// dep-a.js
import { b } from './dep-b.js' // reported: Dependency cycle detected.
```
This rule does _not_ detect imports that resolve directly to the linted module;
for that, see [`no-self-import`].
This rule ignores type-only imports in Flow and TypeScript syntax (`import type` and `import typeof`), which have no runtime effect.
## Rule Details
### Options
By default, this rule only detects cycles for ES6 imports, but see the [`no-unresolved` options](./no-unresolved.md#options) as this rule also supports the same `commonjs` and `amd` flags. However, these flags only impact which import types are _linted_; the
import/export infrastructure only registers `import` statements in dependencies, so
cycles created by `require` within imported modules may not be detected.
#### `maxDepth`
There is a `maxDepth` option available to prevent full expansion of very deep dependency trees:
```js
/*eslint import/no-cycle: [2, { maxDepth: 1 }]*/
// dep-c.js
import './dep-a.js'
```
```js
// dep-b.js
import './dep-c.js'
export function b() { /* ... */ }
```
```js
// dep-a.js
import { b } from './dep-b.js' // not reported as the cycle is at depth 2
```
This is not necessarily recommended, but available as a cost/benefit tradeoff mechanism
for reducing total project lint time, if needed.
#### `ignoreExternal`
An `ignoreExternal` option is available to prevent the cycle detection to expand to external modules:
```js
/*eslint import/no-cycle: [2, { ignoreExternal: true }]*/
// dep-a.js
import 'module-b/dep-b.js'
export function a() { /* ... */ }
```
```js
// node_modules/module-b/dep-b.js
import { a } from './dep-a.js' // not reported as this module is external
```
Its value is `false` by default, but can be set to `true` for reducing total project lint time, if needed.
#### `allowUnsafeDynamicCyclicDependency`
This option disable reporting of errors if a cycle is detected with at least one dynamic import.
```js
// bar.js
import { foo } from './foo';
export const bar = foo;
// foo.js
export const foo = 'Foo';
export function getBar() { return import('./bar'); }
```
> Cyclic dependency are **always** a dangerous anti-pattern as discussed extensively in [#2265](https://github.com/import-js/eslint-plugin-import/issues/2265). Please be extra careful about using this option.
#### `disableScc`
This option disables a pre-processing step that calculates [Strongly Connected Components](https://en.wikipedia.org/wiki/Strongly_connected_component), which are used for avoiding unnecessary work checking files in different SCCs for cycles.
However, under some configurations, this pre-processing may be more expensive than the time it saves.
When this option is `true`, we don't calculate any SCC graph, and check all files for cycles (leading to higher time-complexity). Default is `false`.
## When Not To Use It
This rule is comparatively computationally expensive. If you are pressed for lint
time, or don't think you have an issue with dependency cycles, you may not want
this rule enabled.
## Further Reading
- [Original inspiring issue](https://github.com/import-js/eslint-plugin-import/issues/941)
- Rule to detect that module imports itself: [`no-self-import`]
- [`import/external-module-folders`] setting
[`no-self-import`]: ./no-self-import.md
[`import/external-module-folders`]: ../../README.md#importexternal-module-folders
@@ -0,0 +1,31 @@
import $7yuSY$react, {createContext as $7yuSY$createContext, useContext as $7yuSY$useContext} from "react";
/*
* Copyright 2024 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $96b38030c423d352$export$60d741e20e0aa309 = /*#__PURE__*/ (0, $7yuSY$createContext)({});
function $96b38030c423d352$export$78efe591171d7d45(props) {
let { getContainer: getContainer } = props;
let { getContainer: ctxGetContainer } = $96b38030c423d352$export$9fc1347d4195ccb3();
return /*#__PURE__*/ (0, $7yuSY$react).createElement($96b38030c423d352$export$60d741e20e0aa309.Provider, {
value: {
getContainer: getContainer === null ? undefined : getContainer !== null && getContainer !== void 0 ? getContainer : ctxGetContainer
}
}, props.children);
}
function $96b38030c423d352$export$9fc1347d4195ccb3() {
var _useContext;
return (_useContext = (0, $7yuSY$useContext)($96b38030c423d352$export$60d741e20e0aa309)) !== null && _useContext !== void 0 ? _useContext : {};
}
export {$96b38030c423d352$export$60d741e20e0aa309 as PortalContext, $96b38030c423d352$export$78efe591171d7d45 as UNSAFE_PortalProvider, $96b38030c423d352$export$9fc1347d4195ccb3 as useUNSAFE_PortalContext};
//# sourceMappingURL=PortalProvider.module.js.map
@@ -0,0 +1,223 @@
/**
* @fileoverview Helpers to debug for code path analysis.
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const debug = require("debug")("eslint:code-path");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Gets id of a given segment.
* @param {CodePathSegment} segment A segment to get.
* @returns {string} Id of the segment.
*/
/* c8 ignore next */
// eslint-disable-next-line jsdoc/require-jsdoc -- Ignoring
function getId(segment) {
return segment.id + (segment.reachable ? "" : "!");
}
/**
* Get string for the given node and operation.
* @param {ASTNode} node The node to convert.
* @param {"enter" | "exit" | undefined} label The operation label.
* @returns {string} The string representation.
*/
function nodeToString(node, label) {
const suffix = label ? `:${label}` : "";
switch (node.type) {
case "Identifier":
return `${node.type}${suffix} (${node.name})`;
case "Literal":
return `${node.type}${suffix} (${node.value})`;
default:
return `${node.type}${suffix}`;
}
}
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
module.exports = {
/**
* A flag that debug dumping is enabled or not.
* @type {boolean}
*/
enabled: debug.enabled,
/**
* Dumps given objects.
* @param {...any} args objects to dump.
* @returns {void}
*/
dump: debug,
/**
* Dumps the current analyzing state.
* @param {ASTNode} node A node to dump.
* @param {CodePathState} state A state to dump.
* @param {boolean} leaving A flag whether or not it's leaving
* @returns {void}
*/
dumpState: !debug.enabled
? debug
: /* c8 ignore next */ function (node, state, leaving) {
for (let i = 0; i < state.currentSegments.length; ++i) {
const segInternal = state.currentSegments[i].internal;
if (leaving) {
const last = segInternal.nodes.length - 1;
if (
last >= 0 &&
segInternal.nodes[last] ===
nodeToString(node, "enter")
) {
segInternal.nodes[last] = nodeToString(
node,
void 0,
);
} else {
segInternal.nodes.push(nodeToString(node, "exit"));
}
} else {
segInternal.nodes.push(nodeToString(node, "enter"));
}
}
debug(
[
`${state.currentSegments.map(getId).join(",")})`,
`${node.type}${leaving ? ":exit" : ""}`,
].join(" "),
);
},
/**
* Dumps a DOT code of a given code path.
* The DOT code can be visualized with Graphvis.
* @param {CodePath} codePath A code path to dump.
* @returns {void}
* @see http://www.graphviz.org
* @see http://www.webgraphviz.com
*/
dumpDot: !debug.enabled
? debug
: /* c8 ignore next */ function (codePath) {
let text =
"\n" +
"digraph {\n" +
'node[shape=box,style="rounded,filled",fillcolor=white];\n' +
'initial[label="",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];\n';
if (codePath.returnedSegments.length > 0) {
text +=
'final[label="",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];\n';
}
if (codePath.thrownSegments.length > 0) {
text +=
'thrown[label="✘",shape=circle,width=0.3,height=0.3,fixedsize=true];\n';
}
const traceMap = Object.create(null);
const arrows = this.makeDotArrows(codePath, traceMap);
// eslint-disable-next-line guard-for-in -- Want ability to traverse prototype
for (const id in traceMap) {
const segment = traceMap[id];
text += `${id}[`;
if (segment.reachable) {
text += 'label="';
} else {
text +=
'style="rounded,dashed,filled",fillcolor="#FF9800",label="<<unreachable>>\\n';
}
if (segment.internal.nodes.length > 0) {
text += segment.internal.nodes.join("\\n");
} else {
text += "????";
}
text += '"];\n';
}
text += `${arrows}\n`;
text += "}";
debug("DOT", text);
},
/**
* Makes a DOT code of a given code path.
* The DOT code can be visualized with Graphvis.
* @param {CodePath} codePath A code path to make DOT.
* @param {Object} traceMap Optional. A map to check whether or not segments had been done.
* @returns {string} A DOT code of the code path.
*/
makeDotArrows(codePath, traceMap) {
const stack = [[codePath.initialSegment, 0]];
const done = traceMap || Object.create(null);
let lastId = codePath.initialSegment.id;
let text = `initial->${codePath.initialSegment.id}`;
while (stack.length > 0) {
const item = stack.pop();
const segment = item[0];
const index = item[1];
if (done[segment.id] && index === 0) {
continue;
}
done[segment.id] = segment;
const nextSegment = segment.allNextSegments[index];
if (!nextSegment) {
continue;
}
if (lastId === segment.id) {
text += `->${nextSegment.id}`;
} else {
text += `;\n${segment.id}->${nextSegment.id}`;
}
lastId = nextSegment.id;
stack.unshift([segment, 1 + index]);
stack.push([nextSegment, 0]);
}
codePath.returnedSegments.forEach(finalSegment => {
if (lastId === finalSegment.id) {
text += "->final";
} else {
text += `;\n${finalSegment.id}->final`;
}
lastId = null;
});
codePath.thrownSegments.forEach(finalSegment => {
if (lastId === finalSegment.id) {
text += "->thrown";
} else {
text += `;\n${finalSegment.id}->thrown`;
}
lastId = null;
});
return `${text};`;
},
};
@@ -0,0 +1,110 @@
{
"name": "fonteditor-core",
"version": "2.6.3",
"description": "fonts (ttf, woff, woff2, eot, svg, otf) parse, write, transform, glyph adjust.",
"keywords": [
"sfnt",
"font",
"editor",
"ttf",
"woff",
"woff2",
"svg",
"eot",
"otf"
],
"homepage": "https://github.com/kekee000/fonteditor-core",
"authors": [
{
"name": "kekee000",
"email": "kekee000@gmail.com"
},
{
"name": "junmer",
"email": "junmer@foxmail.com"
},
{
"name": "pumpkinzomb",
"email": "pumpkinzomb@gmail.com"
}
],
"bugs": {
"url": "https://github.com/kekee000/fonteditor-core/issues"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/kekee000/fonteditor-core/raw/master/LICENSE"
}
],
"scripts": {
"precommit": "npm run lint",
"publish:npm": "npm run build && npm publish --registry=https://registry.npmjs.org/",
"test": "npm run test:browser && npm run test:node && npm run test:esm",
"test:browser": "mocha --require @babel/register test/spec/*.spec.js test/spec/**/*.spec.js",
"test:node": "npm run build && mocha test/node-spec/**/*.spec.js ",
"test:esm": "cd test/esm && npm i && mocha --extension mjs index.mjs",
"test:example": "cd test/example && npm i && npm run test",
"dev": "webpack-dev-server --open --config ./config/webpack.dev.js",
"build": "babel src --out-dir lib",
"lint": "eslint ./src ./test",
"lint:fix": "eslint --fix ./src ./test"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{jsx,txs,ts,js,vue}": [
"eslint"
]
},
"repository": {
"type": "git",
"url": "git://github.com/kekee000/fonteditor-core.git"
},
"files": [
"index.d.ts",
"lib",
"src",
"woff2"
],
"main": "./lib/main.js",
"module": "./lib/main.esm.js",
"types": "./index.d.ts",
"exports": {
".": {
"import": "./lib/main.esm.js",
"require": "./lib/main.js",
"types": "./index.d.ts",
"default": "./lib/main.js"
},
"./lib/*": "./lib/*.js"
},
"type": "commonjs",
"devDependencies": {
"@babel/cli": "^7.20.7",
"@babel/core": "^7.20.12",
"@babel/preset-env": "^7.20.2",
"@babel/register": "^7.18.9",
"babel-loader": "^8.0.6",
"babel-plugin-module-resolver": "^4.1.0",
"commander": "^3.0.2",
"css-loader": "^3.2.0",
"eslint": "^7.9.0",
"eslint-plugin-import": "^2.23.4",
"html-webpack-plugin": "^3.2.0",
"husky": "^4.3.0",
"lint-staged": "^10.4.0",
"mocha": "^11.7.1",
"pako": "^1.0.10",
"style-loader": "^1.0.0",
"webpack": "^4.41.1",
"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.8.2"
},
"dependencies": {
"@xmldom/xmldom": "^0.8.3"
}
}
@@ -0,0 +1,47 @@
import { isHTMLElement } from 'motion-dom';
function calcInset(element, container) {
const inset = { x: 0, y: 0 };
let current = element;
while (current && current !== container) {
if (isHTMLElement(current)) {
inset.x += current.offsetLeft;
inset.y += current.offsetTop;
current = current.offsetParent;
}
else if (current.tagName === "svg") {
/**
* This isn't an ideal approach to measuring the offset of <svg /> tags.
* It would be preferable, given they behave like HTMLElements in most ways
* to use offsetLeft/Top. But these don't exist on <svg />. Likewise we
* can't use .getBBox() like most SVG elements as these provide the offset
* relative to the SVG itself, which for <svg /> is usually 0x0.
*/
const svgBoundingBox = current.getBoundingClientRect();
current = current.parentElement;
const parentBoundingBox = current.getBoundingClientRect();
inset.x += svgBoundingBox.left - parentBoundingBox.left;
inset.y += svgBoundingBox.top - parentBoundingBox.top;
}
else if (current instanceof SVGGraphicsElement) {
const { x, y } = current.getBBox();
inset.x += x;
inset.y += y;
let svg = null;
let parent = current.parentNode;
while (!svg) {
if (parent.tagName === "svg") {
svg = parent;
}
parent = current.parentNode;
}
current = svg;
}
else {
break;
}
}
return inset;
}
export { calcInset };
@@ -0,0 +1,63 @@
// Copyright (c) 2015 Ryan Prichard
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
// Convenience header library for using the high-resolution performance counter
// to measure how long some process takes.
#ifndef TIME_MEASUREMENT_H
#define TIME_MEASUREMENT_H
#include <windows.h>
#include <assert.h>
#include <stdint.h>
class TimeMeasurement {
public:
TimeMeasurement() {
static double freq = static_cast<double>(getFrequency());
m_freq = freq;
m_start = value();
}
double elapsed() {
uint64_t elapsedTicks = value() - m_start;
return static_cast<double>(elapsedTicks) / m_freq;
}
private:
uint64_t getFrequency() {
LARGE_INTEGER freq;
BOOL success = QueryPerformanceFrequency(&freq);
assert(success && "QueryPerformanceFrequency failed");
return freq.QuadPart;
}
uint64_t value() {
LARGE_INTEGER ret;
BOOL success = QueryPerformanceCounter(&ret);
assert(success && "QueryPerformanceCounter failed");
return ret.QuadPart;
}
uint64_t m_start;
double m_freq;
};
#endif // TIME_MEASUREMENT_H
@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/array.prototype.tosorted
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,253 @@
/**
* @fileoverview Rule to disallow mixed binary operators.
* @author Toru Nagashima
* @deprecated in ESLint v8.53.0
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils.js");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const ARITHMETIC_OPERATORS = ["+", "-", "*", "/", "%", "**"];
const BITWISE_OPERATORS = ["&", "|", "^", "~", "<<", ">>", ">>>"];
const COMPARISON_OPERATORS = ["==", "!=", "===", "!==", ">", ">=", "<", "<="];
const LOGICAL_OPERATORS = ["&&", "||"];
const RELATIONAL_OPERATORS = ["in", "instanceof"];
const TERNARY_OPERATOR = ["?:"];
const COALESCE_OPERATOR = ["??"];
const ALL_OPERATORS = [].concat(
ARITHMETIC_OPERATORS,
BITWISE_OPERATORS,
COMPARISON_OPERATORS,
LOGICAL_OPERATORS,
RELATIONAL_OPERATORS,
TERNARY_OPERATOR,
COALESCE_OPERATOR,
);
const DEFAULT_GROUPS = [
ARITHMETIC_OPERATORS,
BITWISE_OPERATORS,
COMPARISON_OPERATORS,
LOGICAL_OPERATORS,
RELATIONAL_OPERATORS,
];
const TARGET_NODE_TYPE = /^(?:Binary|Logical|Conditional)Expression$/u;
/**
* Normalizes options.
* @param {Object|undefined} options A options object to normalize.
* @returns {Object} Normalized option object.
*/
function normalizeOptions(options = {}) {
const hasGroups = options.groups && options.groups.length > 0;
const groups = hasGroups ? options.groups : DEFAULT_GROUPS;
const allowSamePrecedence = options.allowSamePrecedence !== false;
return {
groups,
allowSamePrecedence,
};
}
/**
* Checks whether any group which includes both given operator exists or not.
* @param {Array<string[]>} groups A list of groups to check.
* @param {string} left An operator.
* @param {string} right Another operator.
* @returns {boolean} `true` if such group existed.
*/
function includesBothInAGroup(groups, left, right) {
return groups.some(group => group.includes(left) && group.includes(right));
}
/**
* Checks whether the given node is a conditional expression and returns the test node else the left node.
* @param {ASTNode} node A node which can be a BinaryExpression or a LogicalExpression node.
* This parent node can be BinaryExpression, LogicalExpression
* , or a ConditionalExpression node
* @returns {ASTNode} node the appropriate node(left or test).
*/
function getChildNode(node) {
return node.type === "ConditionalExpression" ? node.test : node.left;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "no-mixed-operators",
url: "https://eslint.style/rules/no-mixed-operators",
},
},
],
},
type: "suggestion",
docs: {
description: "Disallow mixed binary operators",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-mixed-operators",
},
schema: [
{
type: "object",
properties: {
groups: {
type: "array",
items: {
type: "array",
items: { enum: ALL_OPERATORS },
minItems: 2,
uniqueItems: true,
},
uniqueItems: true,
},
allowSamePrecedence: {
type: "boolean",
default: true,
},
},
additionalProperties: false,
},
],
messages: {
unexpectedMixedOperator:
"Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations.",
},
},
create(context) {
const sourceCode = context.sourceCode;
const options = normalizeOptions(context.options[0]);
/**
* Checks whether a given node should be ignored by options or not.
* @param {ASTNode} node A node to check. This is a BinaryExpression
* node or a LogicalExpression node. This parent node is one of
* them, too.
* @returns {boolean} `true` if the node should be ignored.
*/
function shouldIgnore(node) {
const a = node;
const b = node.parent;
return (
!includesBothInAGroup(
options.groups,
a.operator,
b.type === "ConditionalExpression" ? "?:" : b.operator,
) ||
(options.allowSamePrecedence &&
astUtils.getPrecedence(a) === astUtils.getPrecedence(b))
);
}
/**
* Checks whether the operator of a given node is mixed with parent
* node's operator or not.
* @param {ASTNode} node A node to check. This is a BinaryExpression
* node or a LogicalExpression node. This parent node is one of
* them, too.
* @returns {boolean} `true` if the node was mixed.
*/
function isMixedWithParent(node) {
return (
node.operator !== node.parent.operator &&
!astUtils.isParenthesised(sourceCode, node)
);
}
/**
* Gets the operator token of a given node.
* @param {ASTNode} node A node to check. This is a BinaryExpression
* node or a LogicalExpression node.
* @returns {Token} The operator token of the node.
*/
function getOperatorToken(node) {
return sourceCode.getTokenAfter(
getChildNode(node),
astUtils.isNotClosingParenToken,
);
}
/**
* Reports both the operator of a given node and the operator of the
* parent node.
* @param {ASTNode} node A node to check. This is a BinaryExpression
* node or a LogicalExpression node. This parent node is one of
* them, too.
* @returns {void}
*/
function reportBothOperators(node) {
const parent = node.parent;
const left = getChildNode(parent) === node ? node : parent;
const right = getChildNode(parent) !== node ? node : parent;
const data = {
leftOperator: left.operator || "?:",
rightOperator: right.operator || "?:",
};
context.report({
node: left,
loc: getOperatorToken(left).loc,
messageId: "unexpectedMixedOperator",
data,
});
context.report({
node: right,
loc: getOperatorToken(right).loc,
messageId: "unexpectedMixedOperator",
data,
});
}
/**
* Checks between the operator of this node and the operator of the
* parent node.
* @param {ASTNode} node A node to check.
* @returns {void}
*/
function check(node) {
if (
TARGET_NODE_TYPE.test(node.parent.type) &&
isMixedWithParent(node) &&
!shouldIgnore(node)
) {
reportBothOperators(node);
}
}
return {
BinaryExpression: check,
LogicalExpression: check,
};
},
};
@@ -0,0 +1,35 @@
import { GetPacketStatusDepends } from '../../action/packet/GetPacketStatus';
import { Static } from '@sinclair/typebox';
declare const PayloadSchema: import("@sinclair/typebox").TObject<{
user_id: import("@sinclair/typebox").TString;
}>;
type PayloadType = Static<typeof PayloadSchema>;
declare const ReturnSchema: import("@sinclair/typebox").TObject<{
status: import("@sinclair/typebox").TNumber;
ext_status: import("@sinclair/typebox").TNumber;
}>;
type ReturnType = Static<typeof ReturnSchema>;
export declare class GetUserStatus extends GetPacketStatusDepends<PayloadType, ReturnType> {
actionName: "nc_get_user_status";
payloadSchema: import("@sinclair/typebox").TObject<{
user_id: import("@sinclair/typebox").TString;
}>;
returnSchema: import("@sinclair/typebox").TObject<{
status: import("@sinclair/typebox").TNumber;
ext_status: import("@sinclair/typebox").TNumber;
}>;
actionSummary: string;
actionTags: string[];
payloadExample: {
user_id: string;
};
returnExample: {
status: number;
ext_status: number;
};
_handle(payload: PayloadType): Promise<{
status: number;
ext_status: number;
}>;
}
export {};
@@ -0,0 +1 @@
{"name":"@react-aria/link","version":"3.7.7","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105972,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/main.js":{"checkedAt":1794532108478,"integrity":"sha512-cDDzywsbxGVARIBd2Eh1yYJz5WKyWIqpdVJNNjR1pZxBnSsSmKVhSiTj8dbX6gjw5SwRVumo9RWsqlUDIu8JtQ==","mode":420,"size":932},"dist/module.js":{"checkedAt":1794532108478,"integrity":"sha512-swD/W4jZj/jev7zTaLH3+EdT/vgS3rOYbevd1yWSKtcLf7XhEPcuMncfTgkBP1WpsjtHYQksl0SUpe/DFWGOfA==","mode":420,"size":812},"dist/useLink.main.js":{"checkedAt":1794532108478,"integrity":"sha512-jIyT2i1PTBo2BFOS9efPcNni9/VoApTlehmA8V14Yx8U3j9cwPD191lt+nX7oxn93pqLv0Ez1rXaAnSOUh1wWg==","mode":420,"size":3502},"dist/useLink.module.js":{"checkedAt":1794532108478,"integrity":"sha512-UHaNM/YLMH00MVGbKollxoqWg0KOE3Qt8Saa9TAwSEZSJRJmEEGWECcgBT49uMgYvo0ZatuqyLUkADD8iAhofA==","mode":420,"size":3401},"package.json":{"checkedAt":1794532108478,"integrity":"sha512-NROxDTWDXl3HiLu6DttB9pPdJpCghq7NSVfRhxOWm0YZzJKyhpk0JLbvxp7EsJvunjm9gUjYJJo+5i4pA8ud3Q==","mode":420,"size":971},"dist/main.js.map":{"checkedAt":1794532108478,"integrity":"sha512-aRtUh8+116fNTZtsN3CwlIPY6VWINHfNxtmk7yyMRhifWbDDCt2NpsQkkehgXpE0FgvhI94bU0YChvLQrb8/DA==","mode":420,"size":890},"dist/module.js.map":{"checkedAt":1794532108478,"integrity":"sha512-xGcs2c54S3T2sdOUnFEdqGPrVDMAosMShAK3WpkC0WcFJifc+N5wHl8j/IXZoAh5cH0bNXWX7iQQ+zf6A1nqug==","mode":420,"size":886},"dist/types.d.ts.map":{"checkedAt":1794532108478,"integrity":"sha512-SQ4iX09LgPWuuij4YHeWN8KwWe5ldAzp5q6xZwLS7nFzUiv34tJMPM7boYehIK/BC6/vpuBQOP6fcDlqewKl8w==","mode":420,"size":1325},"dist/useLink.main.js.map":{"checkedAt":1794532108479,"integrity":"sha512-HBc9zQ/6WJYIzmv0pjpCwL4K8nmq9DCkCenNf4MyjHy6eTLW4iK/CfqudDNSybJhJEv6CTgys5r7jHmCKIM9gQ==","mode":420,"size":4890},"dist/useLink.module.js.map":{"checkedAt":1794532108479,"integrity":"sha512-ORydRV3TwvhnjFTnQo7rdEaERpWGPEUfsgWQBSyUp/JwkejsI54ShKO6KOewKIz2KxlsFTQ0AGStrvXAdz41tA==","mode":420,"size":4885},"README.md":{"checkedAt":1794532108479,"integrity":"sha512-BvGU78eHl0jdztHJj2JfL785XrUjU50F2+pA+8iV7db6pH+HrlUCbNhvwqKS90RjN0EjOOTJmSh7yBnJyX2SAg==","mode":420,"size":134},"dist/import.mjs":{"checkedAt":1794532108479,"integrity":"sha512-tQ/rGYRAaqkV6nIUJeQw7sWS1i/Je3B95v26iFsRxbQq64iTbNhwwApuC45hJ2vySmqx7KxrjEP77ZyUhfgH5g==","mode":420,"size":806},"dist/useLink.mjs":{"checkedAt":1794532108478,"integrity":"sha512-UHaNM/YLMH00MVGbKollxoqWg0KOE3Qt8Saa9TAwSEZSJRJmEEGWECcgBT49uMgYvo0ZatuqyLUkADD8iAhofA==","mode":420,"size":3401},"src/index.ts":{"checkedAt":1794532108479,"integrity":"sha512-jmw5zDUR77oPOFba7dBbtVcHwLHYKivwyswXHHPV7YT6ODXKX5Iqv48fN9aFrGnQLBIhHEi6Vwy0GwQxtlvm/A==","mode":420,"size":713},"dist/types.d.ts":{"checkedAt":1794532108479,"integrity":"sha512-4Sq5vCzyvfuP141GT/Pc+V9i/6lGmZ25HbwHAhs8uxu+yLVIv/7J5USl0GVhaCsBBkWGC76k2UnuzcPN+3mZBg==","mode":420,"size":890},"src/useLink.ts":{"checkedAt":1794532108479,"integrity":"sha512-0G67vJSJnkNPlVVr648JJIHHyrFVyZwUIyTOHspmfAITtBxvWBL2DxIdXhFLiskvncVVKY9yx08pepw0zlfYXg==","mode":420,"size":3485}}}
@@ -0,0 +1,97 @@
"use strict";
// Public API of the protobuf-ts runtime.
// Note: we do not use `export * from ...` to help tree shakers,
// webpack verbose output hints that this should be useful
Object.defineProperty(exports, "__esModule", { value: true });
// Convenience JSON typings and corresponding type guards
var json_typings_1 = require("./json-typings");
Object.defineProperty(exports, "typeofJsonValue", { enumerable: true, get: function () { return json_typings_1.typeofJsonValue; } });
Object.defineProperty(exports, "isJsonObject", { enumerable: true, get: function () { return json_typings_1.isJsonObject; } });
// Base 64 encoding
var base64_1 = require("./base64");
Object.defineProperty(exports, "base64decode", { enumerable: true, get: function () { return base64_1.base64decode; } });
Object.defineProperty(exports, "base64encode", { enumerable: true, get: function () { return base64_1.base64encode; } });
// UTF8 encoding
var protobufjs_utf8_1 = require("./protobufjs-utf8");
Object.defineProperty(exports, "utf8read", { enumerable: true, get: function () { return protobufjs_utf8_1.utf8read; } });
// Binary format contracts, options for reading and writing, for example
var binary_format_contract_1 = require("./binary-format-contract");
Object.defineProperty(exports, "WireType", { enumerable: true, get: function () { return binary_format_contract_1.WireType; } });
Object.defineProperty(exports, "mergeBinaryOptions", { enumerable: true, get: function () { return binary_format_contract_1.mergeBinaryOptions; } });
Object.defineProperty(exports, "UnknownFieldHandler", { enumerable: true, get: function () { return binary_format_contract_1.UnknownFieldHandler; } });
// Standard IBinaryReader implementation
var binary_reader_1 = require("./binary-reader");
Object.defineProperty(exports, "BinaryReader", { enumerable: true, get: function () { return binary_reader_1.BinaryReader; } });
Object.defineProperty(exports, "binaryReadOptions", { enumerable: true, get: function () { return binary_reader_1.binaryReadOptions; } });
// Standard IBinaryWriter implementation
var binary_writer_1 = require("./binary-writer");
Object.defineProperty(exports, "BinaryWriter", { enumerable: true, get: function () { return binary_writer_1.BinaryWriter; } });
Object.defineProperty(exports, "binaryWriteOptions", { enumerable: true, get: function () { return binary_writer_1.binaryWriteOptions; } });
// Int64 and UInt64 implementations required for the binary format
var pb_long_1 = require("./pb-long");
Object.defineProperty(exports, "PbLong", { enumerable: true, get: function () { return pb_long_1.PbLong; } });
Object.defineProperty(exports, "PbULong", { enumerable: true, get: function () { return pb_long_1.PbULong; } });
// JSON format contracts, options for reading and writing, for example
var json_format_contract_1 = require("./json-format-contract");
Object.defineProperty(exports, "jsonReadOptions", { enumerable: true, get: function () { return json_format_contract_1.jsonReadOptions; } });
Object.defineProperty(exports, "jsonWriteOptions", { enumerable: true, get: function () { return json_format_contract_1.jsonWriteOptions; } });
Object.defineProperty(exports, "mergeJsonOptions", { enumerable: true, get: function () { return json_format_contract_1.mergeJsonOptions; } });
// Message type contract
var message_type_contract_1 = require("./message-type-contract");
Object.defineProperty(exports, "MESSAGE_TYPE", { enumerable: true, get: function () { return message_type_contract_1.MESSAGE_TYPE; } });
// Message type implementation via reflection
var message_type_1 = require("./message-type");
Object.defineProperty(exports, "MessageType", { enumerable: true, get: function () { return message_type_1.MessageType; } });
// Reflection info, generated by the plugin, exposed to the user, used by reflection ops
var reflection_info_1 = require("./reflection-info");
Object.defineProperty(exports, "ScalarType", { enumerable: true, get: function () { return reflection_info_1.ScalarType; } });
Object.defineProperty(exports, "LongType", { enumerable: true, get: function () { return reflection_info_1.LongType; } });
Object.defineProperty(exports, "RepeatType", { enumerable: true, get: function () { return reflection_info_1.RepeatType; } });
Object.defineProperty(exports, "normalizeFieldInfo", { enumerable: true, get: function () { return reflection_info_1.normalizeFieldInfo; } });
Object.defineProperty(exports, "readFieldOptions", { enumerable: true, get: function () { return reflection_info_1.readFieldOptions; } });
Object.defineProperty(exports, "readFieldOption", { enumerable: true, get: function () { return reflection_info_1.readFieldOption; } });
Object.defineProperty(exports, "readMessageOption", { enumerable: true, get: function () { return reflection_info_1.readMessageOption; } });
// Message operations via reflection
var reflection_type_check_1 = require("./reflection-type-check");
Object.defineProperty(exports, "ReflectionTypeCheck", { enumerable: true, get: function () { return reflection_type_check_1.ReflectionTypeCheck; } });
var reflection_create_1 = require("./reflection-create");
Object.defineProperty(exports, "reflectionCreate", { enumerable: true, get: function () { return reflection_create_1.reflectionCreate; } });
var reflection_scalar_default_1 = require("./reflection-scalar-default");
Object.defineProperty(exports, "reflectionScalarDefault", { enumerable: true, get: function () { return reflection_scalar_default_1.reflectionScalarDefault; } });
var reflection_merge_partial_1 = require("./reflection-merge-partial");
Object.defineProperty(exports, "reflectionMergePartial", { enumerable: true, get: function () { return reflection_merge_partial_1.reflectionMergePartial; } });
var reflection_equals_1 = require("./reflection-equals");
Object.defineProperty(exports, "reflectionEquals", { enumerable: true, get: function () { return reflection_equals_1.reflectionEquals; } });
var reflection_binary_reader_1 = require("./reflection-binary-reader");
Object.defineProperty(exports, "ReflectionBinaryReader", { enumerable: true, get: function () { return reflection_binary_reader_1.ReflectionBinaryReader; } });
var reflection_binary_writer_1 = require("./reflection-binary-writer");
Object.defineProperty(exports, "ReflectionBinaryWriter", { enumerable: true, get: function () { return reflection_binary_writer_1.ReflectionBinaryWriter; } });
var reflection_json_reader_1 = require("./reflection-json-reader");
Object.defineProperty(exports, "ReflectionJsonReader", { enumerable: true, get: function () { return reflection_json_reader_1.ReflectionJsonReader; } });
var reflection_json_writer_1 = require("./reflection-json-writer");
Object.defineProperty(exports, "ReflectionJsonWriter", { enumerable: true, get: function () { return reflection_json_writer_1.ReflectionJsonWriter; } });
var reflection_contains_message_type_1 = require("./reflection-contains-message-type");
Object.defineProperty(exports, "containsMessageType", { enumerable: true, get: function () { return reflection_contains_message_type_1.containsMessageType; } });
// Oneof helpers
var oneof_1 = require("./oneof");
Object.defineProperty(exports, "isOneofGroup", { enumerable: true, get: function () { return oneof_1.isOneofGroup; } });
Object.defineProperty(exports, "setOneofValue", { enumerable: true, get: function () { return oneof_1.setOneofValue; } });
Object.defineProperty(exports, "getOneofValue", { enumerable: true, get: function () { return oneof_1.getOneofValue; } });
Object.defineProperty(exports, "clearOneofValue", { enumerable: true, get: function () { return oneof_1.clearOneofValue; } });
Object.defineProperty(exports, "getSelectedOneofValue", { enumerable: true, get: function () { return oneof_1.getSelectedOneofValue; } });
// Enum object type guard and reflection util, may be interesting to the user.
var enum_object_1 = require("./enum-object");
Object.defineProperty(exports, "listEnumValues", { enumerable: true, get: function () { return enum_object_1.listEnumValues; } });
Object.defineProperty(exports, "listEnumNames", { enumerable: true, get: function () { return enum_object_1.listEnumNames; } });
Object.defineProperty(exports, "listEnumNumbers", { enumerable: true, get: function () { return enum_object_1.listEnumNumbers; } });
Object.defineProperty(exports, "isEnumObject", { enumerable: true, get: function () { return enum_object_1.isEnumObject; } });
// lowerCamelCase() is exported for plugin, rpc-runtime and other rpc packages
var lower_camel_case_1 = require("./lower-camel-case");
Object.defineProperty(exports, "lowerCamelCase", { enumerable: true, get: function () { return lower_camel_case_1.lowerCamelCase; } });
// assertion functions are exported for plugin, may also be useful to user
var assert_1 = require("./assert");
Object.defineProperty(exports, "assert", { enumerable: true, get: function () { return assert_1.assert; } });
Object.defineProperty(exports, "assertNever", { enumerable: true, get: function () { return assert_1.assertNever; } });
Object.defineProperty(exports, "assertInt32", { enumerable: true, get: function () { return assert_1.assertInt32; } });
Object.defineProperty(exports, "assertUInt32", { enumerable: true, get: function () { return assert_1.assertUInt32; } });
Object.defineProperty(exports, "assertFloat32", { enumerable: true, get: function () { return assert_1.assertFloat32; } });
@@ -0,0 +1,13 @@
/**
* @import {HtmlExtension} from 'micromark-util-types'
*/
/**
* Create an HTML extension for `micromark` to support GFM task list items when
* serializing to HTML.
*
* @returns {HtmlExtension}
* Extension for `micromark` that can be passed in `htmlExtensions` to
* support GFM task list items when serializing to HTML.
*/
export function gfmTaskListItemHtml(): HtmlExtension;
import type { HtmlExtension } from 'micromark-util-types';
@@ -0,0 +1,134 @@
{
"name": "vfile",
"version": "6.0.3",
"description": "Virtual file format for text processing",
"license": "MIT",
"keywords": [
"vfile",
"virtual",
"file",
"text",
"processing",
"message",
"warning",
"error",
"remark",
"retext",
"rehype"
],
"repository": "vfile/vfile",
"bugs": "https://github.com/vfile/vfile/issues",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"Brendan Abbott <brendan.abbott@temando.com>",
"Denys Dovhan <email@denysdovhan.com>",
"Kyle Mathews <mathews.kyle@gmail.com>",
"Shinnosuke Watanabe <snnskwtnb@gmail.com>",
"Sindre Sorhus <sindresorhus@gmail.com>"
],
"sideEffects": false,
"type": "module",
"exports": "./index.js",
"imports": {
"#minpath": {
"node": "./lib/minpath.js",
"default": "./lib/minpath.browser.js"
},
"#minproc": {
"node": "./lib/minproc.js",
"default": "./lib/minproc.browser.js"
},
"#minurl": {
"node": "./lib/minurl.js",
"default": "./lib/minurl.browser.js"
}
},
"files": [
"lib/",
"index.d.ts",
"index.js"
],
"dependencies": {
"@types/unist": "^3.0.0",
"vfile-message": "^4.0.0"
},
"devDependencies": {
"@types/node": "^22.0.0",
"c8": "^10.0.0",
"prettier": "^3.0.0",
"remark-cli": "^12.0.0",
"remark-preset-wooorm": "^10.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"xo": "^0.59.0"
},
"scripts": {
"prepack": "npm run build && npm run format",
"build": "tsc --build --clean && tsc --build && type-coverage",
"format": "remark . -qfo && prettier . -w --log-level warn && xo --fix",
"test-api": "node --conditions development test.js",
"test-coverage": "c8 --100 --reporter lcov npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
},
"prettier": {
"bracketSpacing": false,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false
},
"remarkConfig": {
"plugins": [
"remark-preset-wooorm",
[
"remark-lint-no-html",
false
]
]
},
"typeCoverage": {
"atLeast": 100,
"detail": true,
"ignoreCatch": true,
"strict": true
},
"xo": {
"overrides": [
{
"files": [
"**/*.d.ts"
],
"rules": {
"@typescript-eslint/array-type": [
"error",
{
"default": "generic"
}
],
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true
}
],
"@typescript-eslint/consistent-type-definitions": [
"error",
"interface"
]
}
}
],
"prettier": true,
"rules": {
"logical-assignment-operators": "off",
"unicorn/prefer-at": "off",
"unicorn/prefer-string-replace-all": "off"
}
}
}
@@ -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":"oB pB qB rB sB tB uB vB wB","2":"0 1 2 3 4 5 xC TC J ZB K D E F xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C","132":"6 7 8 9 N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB","164":"A B C L M G"},D:{"1":"0 1 2 3 4 5 jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"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","66":"iB"},E:{"2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"1":"0 1 2 3 4 5 BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB FD GD HD ID NC uC JD OC"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"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:{"2":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D","2":"2D"}},B:4,C:"Battery Status API",D:true};
@@ -0,0 +1,52 @@
import {PressResponderContext as $ae1eeba8b9eafd08$export$5165eccb35aaadb5} from "./context.mjs";
import {useObjectRef as $87RPk$useObjectRef, mergeProps as $87RPk$mergeProps, useSyncRef as $87RPk$useSyncRef} from "@react-aria/utils";
import $87RPk$react, {useRef as $87RPk$useRef, useContext as $87RPk$useContext, useEffect as $87RPk$useEffect, useMemo as $87RPk$useMemo} from "react";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $f1ab8c75478c6f73$export$3351871ee4b288b8 = /*#__PURE__*/ (0, $87RPk$react).forwardRef(({ children: children, ...props }, ref)=>{
let isRegistered = (0, $87RPk$useRef)(false);
let prevContext = (0, $87RPk$useContext)((0, $ae1eeba8b9eafd08$export$5165eccb35aaadb5));
ref = (0, $87RPk$useObjectRef)(ref || (prevContext === null || prevContext === void 0 ? void 0 : prevContext.ref));
let context = (0, $87RPk$mergeProps)(prevContext || {}, {
...props,
ref: ref,
register () {
isRegistered.current = true;
if (prevContext) prevContext.register();
}
});
(0, $87RPk$useSyncRef)(prevContext, ref);
(0, $87RPk$useEffect)(()=>{
if (!isRegistered.current) {
console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.");
isRegistered.current = true; // only warn once in strict mode.
}
}, []);
return /*#__PURE__*/ (0, $87RPk$react).createElement((0, $ae1eeba8b9eafd08$export$5165eccb35aaadb5).Provider, {
value: context
}, children);
});
function $f1ab8c75478c6f73$export$cf75428e0b9ed1ea({ children: children }) {
let context = (0, $87RPk$useMemo)(()=>({
register: ()=>{}
}), []);
return /*#__PURE__*/ (0, $87RPk$react).createElement((0, $ae1eeba8b9eafd08$export$5165eccb35aaadb5).Provider, {
value: context
}, children);
}
export {$f1ab8c75478c6f73$export$3351871ee4b288b8 as PressResponder, $f1ab8c75478c6f73$export$cf75428e0b9ed1ea as ClearPressResponder};
//# sourceMappingURL=PressResponder.module.js.map
@@ -0,0 +1,83 @@
{
"name": "hast-util-whitespace",
"version": "3.0.0",
"description": "hast utility to check if a node is inter-element whitespace",
"license": "MIT",
"keywords": [
"unist",
"hast",
"hast-util",
"util",
"utility",
"html",
"inter",
"element",
"inter-element",
"white-space",
"whitespace"
],
"repository": "syntax-tree/hast-util-whitespace",
"bugs": "https://github.com/syntax-tree/hast-util-whitespace/issues",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
],
"sideEffects": false,
"type": "module",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
"index.js"
],
"dependencies": {
"@types/hast": "^3.0.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"c8": "^8.0.0",
"prettier": "^3.0.0",
"remark-cli": "^11.0.0",
"remark-preset-wooorm": "^9.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"xo": "^0.55.0"
},
"scripts": {
"prepack": "npm run build && npm run format",
"build": "tsc --build --clean && tsc --build && type-coverage",
"format": "remark . -qfo && prettier . -w --log-level warn && xo --fix",
"test-api": "node --conditions development test.js",
"test-coverage": "c8 --100 --reporter lcov npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
},
"prettier": {
"bracketSpacing": false,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false
},
"remarkConfig": {
"plugins": [
"remark-preset-wooorm"
]
},
"typeCoverage": {
"atLeast": 100,
"detail": true,
"ignoreCatch": true,
"strict": true
},
"xo": {
"prettier": true,
"rules": {
"unicorn/prefer-string-replace-all": "off"
}
}
}
@@ -0,0 +1,478 @@
'use strict';
/**
* @fileoverview A utility for retrying failed async method calls.
*/
/* global setTimeout, clearTimeout */
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
const MAX_TASK_TIMEOUT = 60000;
const MAX_TASK_DELAY = 100;
const MAX_CONCURRENCY = 1000;
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
/**
* Logs a message to the console if the DEBUG environment variable is set.
* @param {string} message The message to log.
* @returns {void}
*/
function debug(message) {
if (globalThis?.process?.env.DEBUG === "@hwc/retry") {
console.debug(message);
}
}
/*
* The following logic has been extracted from graceful-fs.
*
* The ISC License
*
* Copyright (c) 2011-2023 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/**
* Checks if it is time to retry a task based on the timestamp and last attempt time.
* @param {RetryTask} task The task to check.
* @param {number} maxDelay The maximum delay for the queue.
* @returns {boolean} true if it is time to retry, false otherwise.
*/
function isTimeToRetry(task, maxDelay) {
const timeSinceLastAttempt = Date.now() - task.lastAttempt;
const timeSinceStart = Math.max(task.lastAttempt - task.timestamp, 1);
const desiredDelay = Math.min(timeSinceStart * 1.2, maxDelay);
return timeSinceLastAttempt >= desiredDelay;
}
/**
* Checks if it is time to bail out based on the given timestamp.
* @param {RetryTask} task The task to check.
* @param {number} timeout The timeout for the queue.
* @returns {boolean} true if it is time to bail, false otherwise.
*/
function isTimeToBail(task, timeout) {
return task.age > timeout;
}
/**
* Creates a new promise with resolve and reject functions.
* @returns {{promise:Promise<any>, resolve:(value:any) => any, reject: (value:any) => any}} A new promise.
*/
function createPromise() {
if (Promise.withResolvers) {
return Promise.withResolvers();
}
let resolve, reject;
const promise = new Promise((res, rej) => {
resolve = res;
reject = rej;
});
if (resolve === undefined || reject === undefined) {
throw new Error("Promise executor did not initialize resolve or reject.");
}
return { promise, resolve, reject };
}
/**
* A class to represent a task in the retry queue.
*/
class RetryTask {
/**
* The unique ID for the task.
* @type {string}
*/
id = Math.random().toString(36).slice(2);
/**
* The function to call.
* @type {Function}
*/
fn;
/**
* The error that was thrown.
* @type {Error}
*/
error;
/**
* The timestamp of the task.
* @type {number}
*/
timestamp = Date.now();
/**
* The timestamp of the last attempt.
* @type {number}
*/
lastAttempt = this.timestamp;
/**
* The resolve function for the promise.
* @type {Function}
*/
resolve;
/**
* The reject function for the promise.
* @type {Function}
*/
reject;
/**
* The AbortSignal to monitor for cancellation.
* @type {AbortSignal|undefined}
*/
signal;
/**
* Creates a new instance.
* @param {Function} fn The function to call.
* @param {Error} error The error that was thrown.
* @param {Function} resolve The resolve function for the promise.
* @param {Function} reject The reject function for the promise.
* @param {AbortSignal|undefined} signal The AbortSignal to monitor for cancellation.
*/
constructor(fn, error, resolve, reject, signal) {
this.fn = fn;
this.error = error;
this.timestamp = Date.now();
this.lastAttempt = Date.now();
this.resolve = resolve;
this.reject = reject;
this.signal = signal;
}
/**
* Gets the age of the task.
* @returns {number} The age of the task in milliseconds.
* @readonly
*/
get age() {
return Date.now() - this.timestamp;
}
}
//-----------------------------------------------------------------------------
// Exports
//-----------------------------------------------------------------------------
/**
* A class that manages a queue of retry jobs.
*/
class Retrier {
/**
* Represents the queue for processing tasks.
* @type {Array<RetryTask>}
*/
#retrying = [];
/**
* Represents the queue for pending tasks.
* @type {Array<Function>}
*/
#pending = [];
/**
* The number of tasks currently being processed.
* @type {number}
*/
#working = 0;
/**
* The timeout for the queue.
* @type {number}
*/
#timeout;
/**
* The maximum delay for the queue.
* @type {number}
*/
#maxDelay;
/**
* The setTimeout() timer ID.
* @type {NodeJS.Timeout|undefined}
*/
#timerId;
/**
* The function to call.
* @type {Function}
*/
#check;
/**
* The maximum number of concurrent tasks.
* @type {number}
*/
#concurrency;
/**
* Creates a new instance.
* @param {Function} check The function to call.
* @param {object} [options] The options for the instance.
* @param {number} [options.timeout] The timeout for the queue.
* @param {number} [options.maxDelay] The maximum delay for the queue.
* @param {number} [options.concurrency] The maximum number of concurrent tasks.
*/
constructor(check, { timeout = MAX_TASK_TIMEOUT, maxDelay = MAX_TASK_DELAY, concurrency = MAX_CONCURRENCY } = {}) {
if (typeof check !== "function") {
throw new Error("Missing function to check errors");
}
this.#check = check;
this.#timeout = timeout;
this.#maxDelay = maxDelay;
this.#concurrency = concurrency;
}
/**
* Gets the number of tasks waiting to be retried.
* @returns {number} The number of tasks in the retry queue.
*/
get retrying() {
return this.#retrying.length;
}
/**
* Gets the number of tasks waiting to be processed in the pending queue.
* @returns {number} The number of tasks in the pending queue.
*/
get pending() {
return this.#pending.length;
}
/**
* Gets the number of tasks currently being processed.
* @returns {number} The number of tasks currently being processed.
*/
get working() {
return this.#working;
}
/**
* Calls the function and retries if it fails.
* @param {Function} fn The function to call.
* @param {Object} options The options for the job.
* @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation.
* @param {Promise<any>} options.promise The promise to return when the function settles.
* @param {Function} options.resolve The resolve function for the promise.
* @param {Function} options.reject The reject function for the promise.
* @returns {Promise<any>} A promise that resolves when the function is
* called successfully.
*/
#call(fn, { signal, promise, resolve, reject }) {
let result;
try {
result = fn();
} catch (/** @type {any} */ error) {
reject(new Error(`Synchronous error: ${error.message}`, { cause: error }));
return promise;
}
// if the result is not a promise then reject an error
if (!result || typeof result.then !== "function") {
reject(new Error("Result is not a promise."));
return promise;
}
this.#working++;
promise.finally(() => {
this.#working--;
this.#processPending();
})
// `promise.finally` creates a new promise that may be rejected, so it must be handled.
.catch(() => { });
// call the original function and catch any ENFILE or EMFILE errors
Promise.resolve(result)
.then(value => {
debug("Function called successfully without retry.");
resolve(value);
})
.catch(error => {
if (!this.#check(error)) {
reject(error);
return;
}
const task = new RetryTask(fn, error, resolve, reject, signal);
debug(`Function failed, queuing for retry with task ${task.id}.`);
this.#retrying.push(task);
signal?.addEventListener("abort", () => {
debug(`Task ${task.id} was aborted due to AbortSignal.`);
reject(signal.reason);
});
this.#processQueue();
});
return promise;
}
/**
* Adds a new retry job to the queue.
* @template {(...args: unknown[]) => Promise<unknown>} Func
* @template {Awaited<ReturnType<Func>>} RetVal
* @param {Func} fn The function to call.
* @param {object} [options] The options for the job.
* @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation.
* @returns {Promise<RetVal>} A promise that resolves when the queue is processed.
*/
retry(fn, { signal } = {}) {
signal?.throwIfAborted();
const { promise, resolve, reject } = createPromise();
this.#pending.push(() => this.#call(fn, { signal, promise, resolve, reject }));
this.#processPending();
return promise;
}
/**
* Processes the pending queue and the retry queue.
* @returns {void}
*/
#processAll() {
if (this.pending) {
this.#processPending();
}
if (this.retrying) {
this.#processQueue();
}
}
/**
* Processes the pending queue to see which tasks can be started.
* @returns {void}
*/
#processPending() {
debug(`Processing pending tasks: ${this.pending} pending, ${this.working} working.`);
const available = this.#concurrency - this.working;
if (available <= 0) {
return;
}
const count = Math.min(this.pending, available);
for (let i = 0; i < count; i++) {
const task = this.#pending.shift();
task?.();
}
debug(`Processed pending tasks: ${this.pending} pending, ${this.working} working.`);
}
/**
* Processes the queue.
* @returns {void}
*/
#processQueue() {
// clear any timer because we're going to check right now
clearTimeout(this.#timerId);
this.#timerId = undefined;
debug(`Processing retry queue: ${this.retrying} retrying, ${this.working} working.`);
const processAgain = () => {
this.#timerId = setTimeout(() => this.#processAll(), 0);
};
// if there's nothing in the queue, we're done
const task = this.#retrying.shift();
if (!task) {
debug("Queue is empty, exiting.");
if (this.pending) {
processAgain();
}
return;
}
// if it's time to bail, then bail
if (isTimeToBail(task, this.#timeout)) {
debug(`Task ${task.id} was abandoned due to timeout.`);
task.reject(task.error);
processAgain();
return;
}
// if it's not time to retry, then wait and try again
if (!isTimeToRetry(task, this.#maxDelay)) {
debug(`Task ${task.id} is not ready to retry, skipping.`);
this.#retrying.push(task);
processAgain();
return;
}
// otherwise, try again
task.lastAttempt = Date.now();
// Promise.resolve needed in case it's a thenable but not a Promise
Promise.resolve(task.fn())
// @ts-ignore because we know it's any
.then(result => {
debug(`Task ${task.id} succeeded after ${task.age}ms.`);
task.resolve(result);
})
// @ts-ignore because we know it's any
.catch(error => {
if (!this.#check(error)) {
debug(`Task ${task.id} failed with non-retryable error: ${error.message}.`);
task.reject(error);
return;
}
// update the task timestamp and push to back of queue to try again
task.lastAttempt = Date.now();
this.#retrying.push(task);
debug(`Task ${task.id} failed, requeueing to try again.`);
})
.finally(() => {
this.#processAll();
});
}
}
exports.Retrier = Retrier;
@@ -0,0 +1 @@
{"version":3,"file":"replacers.js","sourceRoot":"","sources":["../../src/helpers/replacers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAOA,2BAAiD;AACjD,iCAA4B;AAC5B,+BAAwC;AAExC,oCAA4E;AAC5E,gDAAiD;AAQjD,SAAsB,eAAe,CACnC,MAAe,EACf,SAA0B,EAC1B,YAAuB;;;;;QAEvB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACjD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAC1B,MAAM,YAAY,GAAa,WAAG,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QAC7D,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC;QAGzD,MAAM,gBAAgB,GAAoB;YACxC,OAAO,EAAE;gBACP,OAAO,EAAE,IAAI;aACd;YACD,UAAU,EAAE;gBACV,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO;aAC1B;SACF,CAAC;QAGF,IAAI,MAAM,mCACL,gBAAgB,GAChB,SAAS,CACb,CAAC;QAGF,MAAM,CAAC,MAAM,CAAC,KAAK,CACjB,sDAAsD,EACtD,YAAY,CACb,CAAC;QACF,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAC1B,MAAM,CAAC,CAAC,CAAC,GAAG;gBACV,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,CAAC;aACR,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAChD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;;YACvC,KAA6B,eAAA,YAAA,cAAA,OAAO,CAAA,aAAA;gBAAP,uBAAO;gBAAP,WAAO;;oBAAzB,MAAM,QAAQ,KAAA,CAAA;oBACvB,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE;wBAEvB,IAAI,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;4BACvD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,EAAE,QAAQ,CAAC,CAAC;4BAC3D,MAAM,cAAc,GAAG,YACrB,gBAAgB,QAAQ,CAAC,CAAC,CAAC,WAAW,4CACvC,CAAC;4BACF,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;yBAC/C;wBAED,MAAM,IAAI,GAAG,MAAA,QAAQ,CAAC,CAAC,CAAC,0CAAE,IAAI,CAAC;wBAC/B,IAAI,CAAC,IAAI,EAAE;4BACT,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,EAAE,QAAQ,CAAC,CAAC;4BACvD,SAAS;yBACV;wBAED,MAAM,iBAAiB,GAAG,CAAO,UAAkB,EAAE,EAAE;;4BACrD,MAAM,cAAc,GAAG,YAAa,UAAU,4CAAC,CAAC;4BAChD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,0BAA0B,EAAE,cAAc,CAAC,CAAC;4BAChE,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,CAAC;4BAChD,IAAI,OAAO,gBAAgB,IAAI,UAAU,EAAE;gCACzC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;gCACxC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,IAAI,GAAG,CAAC,CAAC;6BAChD;iCAAM;gCACL,MAAM,CAAC,MAAM,CAAC,KAAK,CACjB,8BAA8B,IAAI,4BAA4B,CAC/D,CAAC;6BACH;wBACH,CAAC,CAAA,CAAC;wBAGF,MAAM,cAAc,GAAG,CAAC,IAAA,iBAAU,EAAC,IAAI,CAAC,CAAC;wBACzC,MAAM,IAAI,GAAG,cAAc,CAAC,CAAC,CAAC,aAAa,CAAC,IAAA,WAAI,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;wBAEpE,IAAI,IAAA,eAAU,EAAC,IAAI,CAAC,EAAE;4BACpB,IAAI;gCACF,MAAM,iBAAiB,CAAC,IAAI,CAAC,CAAC;gCAC9B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;gCAChD,SAAS;6BACV;4BAAC,WAAM,GAAE;yBACX;wBAGD,IAAI,cAAc,EAAE;4BAClB,KAAK,MAAM,UAAU,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,WAAI,EAAC,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE;gCACpE,IAAI;oCACF,MAAM,iBAAiB,CAAC,UAAU,CAAC,CAAC;oCACpC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC;oCACtD,SAAS;iCACV;gCAAC,WAAM,GAAE;6BACX;yBACF;wBAED,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,IAAI,GAAG,CAAC,CAAC;qBAC5D;;;;;aACF;;;;;;;;;QACD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;;CAC5D;AAlGD,0CAkGC;AASD,SAAsB,YAAY,CAChC,MAAe,EACf,IAAY,EACZ,eAAyB,EACzB,oBAA6B;;QAE7B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,EAAE,IAAI,CAAC,CAAC;QACvD,MAAM,IAAI,GAAG,MAAM,aAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC9C,MAAM,QAAQ,GAAG,kBAAkB,CACjC,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,eAAe,EACf,oBAAoB,CACrB,CAAC;QAEF,IAAI,IAAI,KAAK,QAAQ,EAAE;YACrB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,EAAE,IAAI,CAAC,CAAC;YACzD,MAAM,aAAG,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC5C,OAAO,IAAI,CAAC;SACb;QACD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAgC,EAAE,IAAI,CAAC,CAAC;QAC5D,OAAO,KAAK,CAAC;IACf,CAAC;CAAA;AAvBD,oCAuBC;AAUD,SAAgB,kBAAkB,CAChC,MAAe,EACf,IAAY,EACZ,IAAY,EACZ,eAAyB,EACzB,oBAA6B;IAE7B,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QACpC,IAAI,GAAG,IAAA,gCAAwB,EAAC,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CACnD,QAAQ,CAAC;YACP,IAAI;YACJ,IAAI;YACJ,MAAM;SACP,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;IAIH,IAAI,eAAe,EAAE;QACnB,IAAI,GAAG,IAAA,8BAAsB,EAAC,IAAI,EAAE,IAAI,EAAE,oBAAoB,CAAC,CAAC;KACjE;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAxBD,gDAwBC","sourcesContent":["/**\n * @file\n *\n * This file has all helperfunctions related to replacing.\n */\n\n/** */\nimport { existsSync, promises as fsp } from 'fs';\nimport { Dir } from 'mylas';\nimport { isAbsolute, join } from 'path';\nimport { IConfig, ReplacerOptions } from '../interfaces';\nimport { replaceSourceImportPaths, resolveFullImportPaths } from '../utils';\nimport normalizePath = require('normalize-path');\n\n/**\n * importReplacers imports replacers for tsc-alias to use.\n * @param {IConfig} config the tsc-alias config object.\n * @param {ReplacerOptions} replacers the tsc-alias replacer options.\n * @param {string[]} cmdReplacers array of filepaths to replacers from command-line.\n */\nexport async function importReplacers(\n config: IConfig,\n replacers: ReplacerOptions,\n cmdReplacers?: string[]\n) {\n config.output.debug('Started loading replacers');\n const dir = process.cwd();\n const node_modules: string[] = Dir.nodeModules({ cwd: dir });\n config.output.debug('Found node_modules:', node_modules);\n\Line truncated
@@ -0,0 +1,71 @@
import { Kind } from '../symbols/index.mjs';
import type { TSchema } from '../schema/index.mjs';
import type { Static } from '../static/index.mjs';
import type { Evaluate, Ensure, Assert } from '../helpers/index.mjs';
import { type TAny } from '../any/index.mjs';
import { type TBoolean } from '../boolean/index.mjs';
import { type TEnumRecord, type TEnum } from '../enum/index.mjs';
import { type TInteger } from '../integer/index.mjs';
import { type TLiteral, type TLiteralValue } from '../literal/index.mjs';
import { type TNever } from '../never/index.mjs';
import { type TNumber } from '../number/index.mjs';
import { type TObject, type TProperties, type TAdditionalProperties, type ObjectOptions } from '../object/index.mjs';
import { type TRegExp } from '../regexp/index.mjs';
import { type TString } from '../string/index.mjs';
import { type TUnion } from '../union/index.mjs';
import { TIsTemplateLiteralFinite, type TTemplateLiteral } from '../template-literal/index.mjs';
type TFromTemplateLiteralKeyInfinite<Key extends TTemplateLiteral, Type extends TSchema> = Ensure<TRecord<Key, Type>>;
type TFromTemplateLiteralKeyFinite<Key extends TTemplateLiteral, Type extends TSchema, I extends string = Static<Key>> = (Ensure<TObject<Evaluate<{
[_ in I]: Type;
}>>>);
type TFromTemplateLiteralKey<Key extends TTemplateLiteral, Type extends TSchema> = TIsTemplateLiteralFinite<Key> extends false ? TFromTemplateLiteralKeyInfinite<Key, Type> : TFromTemplateLiteralKeyFinite<Key, Type>;
type TFromEnumKey<Key extends Record<string, string | number>, Type extends TSchema> = Ensure<TObject<{
[_ in Key[keyof Key]]: Type;
}>>;
type TFromUnionKeyLiteralString<Key extends TLiteral<string>, Type extends TSchema> = {
[_ in Key['const']]: Type;
};
type TFromUnionKeyLiteralNumber<Key extends TLiteral<number>, Type extends TSchema> = {
[_ in Key['const']]: Type;
};
type TFromUnionKeyVariants<Keys extends TSchema[], Type extends TSchema, Result extends TProperties = {}> = Keys extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? (Left extends TUnion<infer Types extends TSchema[]> ? TFromUnionKeyVariants<Right, Type, Result & TFromUnionKeyVariants<Types, Type>> : Left extends TLiteral<string> ? TFromUnionKeyVariants<Right, Type, Result & TFromUnionKeyLiteralString<Left, Type>> : Left extends TLiteral<number> ? TFromUnionKeyVariants<Right, Type, Result & TFromUnionKeyLiteralNumber<Left, Type>> : {}) : Result;
type TFromUnionKey<Key extends TSchema[], Type extends TSchema, Properties extends TProperties = TFromUnionKeyVariants<Key, Type>> = (Ensure<TObject<Evaluate<Properties>>>);
type TFromLiteralKey<Key extends TLiteralValue, Type extends TSchema> = (Ensure<TObject<{
[_ in Assert<Key, PropertyKey>]: Type;
}>>);
type TFromRegExpKey<_Key extends TRegExp, Type extends TSchema> = (Ensure<TRecord<TRegExp, Type>>);
type TFromStringKey<_Key extends TString, Type extends TSchema> = (Ensure<TRecord<TString, Type>>);
type TFromAnyKey<_Key extends TAny, Type extends TSchema> = (Ensure<TRecord<TAny, Type>>);
type TFromNeverKey<_Key extends TNever, Type extends TSchema> = (Ensure<TRecord<TNever, Type>>);
type TFromBooleanKey<_Key extends TBoolean, Type extends TSchema> = (Ensure<TObject<{
true: Type;
false: Type;
}>>);
type TFromIntegerKey<_Key extends TSchema, Type extends TSchema> = (Ensure<TRecord<TNumber, Type>>);
type TFromNumberKey<_Key extends TSchema, Type extends TSchema> = (Ensure<TRecord<TNumber, Type>>);
type RecordStatic<Key extends TSchema, Type extends TSchema, P extends unknown[]> = (Evaluate<{
[_ in Assert<Static<Key>, PropertyKey>]: Static<Type, P>;
}>);
export interface TRecord<Key extends TSchema = TSchema, Type extends TSchema = TSchema> extends TSchema {
[Kind]: 'Record';
static: RecordStatic<Key, Type, this['params']>;
type: 'object';
patternProperties: {
[pattern: string]: Type;
};
additionalProperties: TAdditionalProperties;
}
export type TRecordOrObject<Key extends TSchema, Type extends TSchema> = (Key extends TTemplateLiteral ? TFromTemplateLiteralKey<Key, Type> : Key extends TEnum<infer Enum extends TEnumRecord> ? TFromEnumKey<Enum, Type> : Key extends TUnion<infer Types extends TSchema[]> ? TFromUnionKey<Types, Type> : Key extends TLiteral<infer Value extends TLiteralValue> ? TFromLiteralKey<Value, Type> : Key extends TBoolean ? TFromBooleanKey<Key, Type> : Key extends TInteger ? TFromIntegerKey<Key, Type> : Key extends TNumber ? TFromNumberKey<Key, Type> : Key extends TRegExp ? TFromRegExpKey<Key, Type> : Key extends TString ? TFromStringKey<Key, Type> : Key extends TAny ? TFromAnyKey<Key, Type> : Key extends TNever ? TFromNeverKey<Key, Type> : TNever);
/** `[Json]` Creates a Record type */
export declare function Record<Key extends TSchema, Type extends TSchema>(key: Key, type: Type, options?: ObjectOptions): TRecordOrObject<Key, Type>;
/** Gets the Records Pattern */
export declare function RecordPattern(record: TRecord): string;
/** Gets the Records Key Type */
export type TRecordKey<Type extends TRecord, Result extends TSchema = Type extends TRecord<infer Key extends TSchema, TSchema> ? (Key extends TNumber ? TNumber : Key extends TString ? TString : TString) : TString> = Result;
/** Gets the Records Key Type */
export declare function RecordKey<Type extends TRecord>(type: Type): TRecordKey<Type>;
/** Gets a Record Value Type */
export type TRecordValue<Type extends TRecord, Result extends TSchema = (Type extends TRecord<TSchema, infer Value extends TSchema> ? Value : TNever)> = Result;
/** Gets a Record Value Type */
export declare function RecordValue<Type extends TRecord>(type: Type): TRecordValue<Type>;
export {};
@@ -0,0 +1,375 @@
/**
* @fileoverview Disallows or enforces spaces inside of object literals.
* @author Jamund Ferguson
* @deprecated in ESLint v8.53.0
*/
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "object-curly-spacing",
url: "https://eslint.style/rules/object-curly-spacing",
},
},
],
},
type: "layout",
docs: {
description: "Enforce consistent spacing inside braces",
recommended: false,
url: "https://eslint.org/docs/latest/rules/object-curly-spacing",
},
fixable: "whitespace",
schema: [
{
enum: ["always", "never"],
},
{
type: "object",
properties: {
arraysInObjects: {
type: "boolean",
},
objectsInObjects: {
type: "boolean",
},
},
additionalProperties: false,
},
],
messages: {
requireSpaceBefore: "A space is required before '{{token}}'.",
requireSpaceAfter: "A space is required after '{{token}}'.",
unexpectedSpaceBefore:
"There should be no space before '{{token}}'.",
unexpectedSpaceAfter: "There should be no space after '{{token}}'.",
},
},
create(context) {
const spaced = context.options[0] === "always",
sourceCode = context.sourceCode;
/**
* Determines whether an option is set, relative to the spacing option.
* If spaced is "always", then check whether option is set to false.
* If spaced is "never", then check whether option is set to true.
* @param {Object} option The option to exclude.
* @returns {boolean} Whether or not the property is excluded.
*/
function isOptionSet(option) {
return context.options[1]
? context.options[1][option] === !spaced
: false;
}
const options = {
spaced,
arraysInObjectsException: isOptionSet("arraysInObjects"),
objectsInObjectsException: isOptionSet("objectsInObjects"),
};
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
/**
* Reports that there shouldn't be a space after the first token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportNoBeginningSpace(node, token) {
const nextToken = context.sourceCode.getTokenAfter(token, {
includeComments: true,
});
context.report({
node,
loc: { start: token.loc.end, end: nextToken.loc.start },
messageId: "unexpectedSpaceAfter",
data: {
token: token.value,
},
fix(fixer) {
return fixer.removeRange([
token.range[1],
nextToken.range[0],
]);
},
});
}
/**
* Reports that there shouldn't be a space before the last token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportNoEndingSpace(node, token) {
const previousToken = context.sourceCode.getTokenBefore(token, {
includeComments: true,
});
context.report({
node,
loc: { start: previousToken.loc.end, end: token.loc.start },
messageId: "unexpectedSpaceBefore",
data: {
token: token.value,
},
fix(fixer) {
return fixer.removeRange([
previousToken.range[1],
token.range[0],
]);
},
});
}
/**
* Reports that there should be a space after the first token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportRequiredBeginningSpace(node, token) {
context.report({
node,
loc: token.loc,
messageId: "requireSpaceAfter",
data: {
token: token.value,
},
fix(fixer) {
return fixer.insertTextAfter(token, " ");
},
});
}
/**
* Reports that there should be a space before the last token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportRequiredEndingSpace(node, token) {
context.report({
node,
loc: token.loc,
messageId: "requireSpaceBefore",
data: {
token: token.value,
},
fix(fixer) {
return fixer.insertTextBefore(token, " ");
},
});
}
/**
* Determines if spacing in curly braces is valid.
* @param {ASTNode} node The AST node to check.
* @param {Token} first The first token to check (should be the opening brace)
* @param {Token} second The second token to check (should be first after the opening brace)
* @param {Token} penultimate The penultimate token to check (should be last before closing brace)
* @param {Token} last The last token to check (should be closing brace)
* @returns {void}
*/
function validateBraceSpacing(node, first, second, penultimate, last) {
if (astUtils.isTokenOnSameLine(first, second)) {
const firstSpaced = sourceCode.isSpaceBetweenTokens(
first,
second,
);
if (options.spaced && !firstSpaced) {
reportRequiredBeginningSpace(node, first);
}
if (!options.spaced && firstSpaced && second.type !== "Line") {
reportNoBeginningSpace(node, first);
}
}
if (astUtils.isTokenOnSameLine(penultimate, last)) {
const shouldCheckPenultimate =
(options.arraysInObjectsException &&
astUtils.isClosingBracketToken(penultimate)) ||
(options.objectsInObjectsException &&
astUtils.isClosingBraceToken(penultimate));
const penultimateType =
shouldCheckPenultimate &&
sourceCode.getNodeByRangeIndex(penultimate.range[0]).type;
const closingCurlyBraceMustBeSpaced =
(options.arraysInObjectsException &&
penultimateType === "ArrayExpression") ||
(options.objectsInObjectsException &&
(penultimateType === "ObjectExpression" ||
penultimateType === "ObjectPattern"))
? !options.spaced
: options.spaced;
const lastSpaced = sourceCode.isSpaceBetweenTokens(
penultimate,
last,
);
if (closingCurlyBraceMustBeSpaced && !lastSpaced) {
reportRequiredEndingSpace(node, last);
}
if (!closingCurlyBraceMustBeSpaced && lastSpaced) {
reportNoEndingSpace(node, last);
}
}
}
/**
* Gets '}' token of an object node.
*
* Because the last token of object patterns might be a type annotation,
* this traverses tokens preceded by the last property, then returns the
* first '}' token.
* @param {ASTNode} node The node to get. This node is an
* ObjectExpression or an ObjectPattern. And this node has one or
* more properties.
* @returns {Token} '}' token.
*/
function getClosingBraceOfObject(node) {
const lastProperty = node.properties.at(-1);
return sourceCode.getTokenAfter(
lastProperty,
astUtils.isClosingBraceToken,
);
}
/**
* Reports a given object node if spacing in curly braces is invalid.
* @param {ASTNode} node An ObjectExpression or ObjectPattern node to check.
* @returns {void}
*/
function checkForObject(node) {
if (node.properties.length === 0) {
return;
}
const first = sourceCode.getFirstToken(node),
last = getClosingBraceOfObject(node),
second = sourceCode.getTokenAfter(first, {
includeComments: true,
}),
penultimate = sourceCode.getTokenBefore(last, {
includeComments: true,
});
validateBraceSpacing(node, first, second, penultimate, last);
}
/**
* Reports a given import node if spacing in curly braces is invalid.
* @param {ASTNode} node An ImportDeclaration node to check.
* @returns {void}
*/
function checkForImport(node) {
if (node.specifiers.length === 0) {
return;
}
let firstSpecifier = node.specifiers[0];
const lastSpecifier = node.specifiers.at(-1);
if (lastSpecifier.type !== "ImportSpecifier") {
return;
}
if (firstSpecifier.type !== "ImportSpecifier") {
firstSpecifier = node.specifiers[1];
}
const first = sourceCode.getTokenBefore(firstSpecifier),
last = sourceCode.getTokenAfter(
lastSpecifier,
astUtils.isNotCommaToken,
),
second = sourceCode.getTokenAfter(first, {
includeComments: true,
}),
penultimate = sourceCode.getTokenBefore(last, {
includeComments: true,
});
validateBraceSpacing(node, first, second, penultimate, last);
}
/**
* Reports a given export node if spacing in curly braces is invalid.
* @param {ASTNode} node An ExportNamedDeclaration node to check.
* @returns {void}
*/
function checkForExport(node) {
if (node.specifiers.length === 0) {
return;
}
const firstSpecifier = node.specifiers[0],
lastSpecifier = node.specifiers.at(-1),
first = sourceCode.getTokenBefore(firstSpecifier),
last = sourceCode.getTokenAfter(
lastSpecifier,
astUtils.isNotCommaToken,
),
second = sourceCode.getTokenAfter(first, {
includeComments: true,
}),
penultimate = sourceCode.getTokenBefore(last, {
includeComments: true,
});
validateBraceSpacing(node, first, second, penultimate, last);
}
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
return {
// var {x} = y;
ObjectPattern: checkForObject,
// var y = {x: 'y'}
ObjectExpression: checkForObject,
// import {y} from 'x';
ImportDeclaration: checkForImport,
// export {name} from 'yo';
ExportNamedDeclaration: checkForExport,
};
},
};
@@ -0,0 +1,8 @@
var $6ec1ed7729e948cc$exports = {};
$6ec1ed7729e948cc$exports = {
"breadcrumbs": `Popis cesty`
};
export {$6ec1ed7729e948cc$exports as default};
//# sourceMappingURL=cs-CZ.module.js.map
@@ -0,0 +1 @@
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/verify.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EAEZ,KAAK,aAAa,EAKnB,MAAM,eAAe,CAAC;AAKvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;GAEG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE;IAC3B,aAAa,EAAE,aAAa,CAAC;IAC7B,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,EAAE,WAAW,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,OAAO,CAAC,OAAO,CAAC,CAyBnB"}
@@ -0,0 +1,288 @@
/*!
Copyright 2013 Lovell Fuller and others.
SPDX-License-Identifier: Apache-2.0
*/
#include <cmath>
#include <cstdio>
#include <string>
#include <napi.h>
#include <vips/vips8>
#include <vips/vector.h>
#include "./common.h"
#include "./operations.h"
#include "./utilities.h"
/*
Get and set cache limits
*/
Napi::Value cache(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
// Set memory limit
if (info[size_t(0)].IsNumber()) {
vips_cache_set_max_mem(info[size_t(0)].As<Napi::Number>().Int32Value() * 1048576);
}
// Set file limit
if (info[size_t(1)].IsNumber()) {
vips_cache_set_max_files(info[size_t(1)].As<Napi::Number>().Int32Value());
}
// Set items limit
if (info[size_t(2)].IsNumber()) {
vips_cache_set_max(info[size_t(2)].As<Napi::Number>().Int32Value());
}
// Get memory stats
Napi::Object memory = Napi::Object::New(env);
memory.Set("current", round(vips_tracked_get_mem() / 1048576));
memory.Set("high", round(vips_tracked_get_mem_highwater() / 1048576));
memory.Set("max", round(vips_cache_get_max_mem() / 1048576));
// Get file stats
Napi::Object files = Napi::Object::New(env);
files.Set("current", vips_tracked_get_files());
files.Set("max", vips_cache_get_max_files());
// Get item stats
Napi::Object items = Napi::Object::New(env);
items.Set("current", vips_cache_get_size());
items.Set("max", vips_cache_get_max());
Napi::Object cache = Napi::Object::New(env);
cache.Set("memory", memory);
cache.Set("files", files);
cache.Set("items", items);
return cache;
}
/*
Get and set size of thread pool
*/
Napi::Value concurrency(const Napi::CallbackInfo& info) {
// Set concurrency
if (info[size_t(0)].IsNumber()) {
vips_concurrency_set(info[size_t(0)].As<Napi::Number>().Int32Value());
}
// Get concurrency
return Napi::Number::New(info.Env(), vips_concurrency_get());
}
/*
Get internal counters (queued tasks, processing tasks)
*/
Napi::Value counters(const Napi::CallbackInfo& info) {
Napi::Object counters = Napi::Object::New(info.Env());
counters.Set("queue", static_cast<int>(sharp::counterQueue));
counters.Set("process", static_cast<int>(sharp::counterProcess));
return counters;
}
/*
Get and set use of SIMD vector unit instructions
*/
Napi::Value simd(const Napi::CallbackInfo& info) {
// Set state
if (info[size_t(0)].IsBoolean()) {
vips_vector_set_enabled(info[size_t(0)].As<Napi::Boolean>().Value());
}
// Get state
return Napi::Boolean::New(info.Env(), vips_vector_isenabled());
}
/*
Get libvips version
*/
Napi::Value libvipsVersion(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::Object version = Napi::Object::New(env);
char semver[9];
std::snprintf(semver, sizeof(semver), "%d.%d.%d", vips_version(0), vips_version(1), vips_version(2));
version.Set("semver", Napi::String::New(env, semver));
#ifdef SHARP_USE_GLOBAL_LIBVIPS
version.Set("isGlobal", Napi::Boolean::New(env, true));
#else
version.Set("isGlobal", Napi::Boolean::New(env, false));
#endif
#ifdef __EMSCRIPTEN__
version.Set("isWasm", Napi::Boolean::New(env, true));
#else
version.Set("isWasm", Napi::Boolean::New(env, false));
#endif
return version;
}
/*
Get available input/output file/buffer/stream formats
*/
Napi::Value format(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::Object format = Napi::Object::New(env);
for (std::string const f : {
"jpeg", "png", "webp", "tiff", "magick", "openslide", "dz",
"ppm", "fits", "gif", "svg", "heif", "pdf", "vips", "jp2k", "jxl", "rad", "dcraw"
}) {
// Input
const VipsObjectClass *oc = vips_class_find("VipsOperation", (f + "load").c_str());
Napi::Boolean hasInputFile = Napi::Boolean::New(env, oc);
Napi::Boolean hasInputBuffer =
Napi::Boolean::New(env, vips_type_find("VipsOperation", (f + "load_buffer").c_str()));
Napi::Object input = Napi::Object::New(env);
input.Set("file", hasInputFile);
input.Set("buffer", hasInputBuffer);
input.Set("stream", hasInputBuffer);
if (hasInputFile) {
const VipsForeignClass *fc = VIPS_FOREIGN_CLASS(oc);
if (fc->suffs) {
Napi::Array fileSuffix = Napi::Array::New(env);
const char **suffix = fc->suffs;
for (int i = 0; *suffix; i++, suffix++) {
fileSuffix.Set(i, Napi::String::New(env, *suffix));
}
input.Set("fileSuffix", fileSuffix);
}
}
// Output
Napi::Boolean hasOutputFile =
Napi::Boolean::New(env, vips_type_find("VipsOperation", (f + "save").c_str()));
Napi::Boolean hasOutputBuffer =
Napi::Boolean::New(env, vips_type_find("VipsOperation", (f + "save_buffer").c_str()));
Napi::Object output = Napi::Object::New(env);
output.Set("file", hasOutputFile);
output.Set("buffer", hasOutputBuffer);
output.Set("stream", hasOutputBuffer);
// Other attributes
Napi::Object container = Napi::Object::New(env);
container.Set("id", f);
container.Set("input", input);
container.Set("output", output);
// Add to set of formats
format.Set(f, container);
}
// Raw, uncompressed data
Napi::Boolean supported = Napi::Boolean::New(env, true);
Napi::Boolean unsupported = Napi::Boolean::New(env, false);
Napi::Object rawInput = Napi::Object::New(env);
rawInput.Set("file", unsupported);
rawInput.Set("buffer", supported);
rawInput.Set("stream", supported);
Napi::Object rawOutput = Napi::Object::New(env);
rawOutput.Set("file", unsupported);
rawOutput.Set("buffer", supported);
rawOutput.Set("stream", supported);
Napi::Object raw = Napi::Object::New(env);
raw.Set("id", "raw");
raw.Set("input", rawInput);
raw.Set("output", rawOutput);
format.Set("raw", raw);
return format;
}
/*
(Un)block libvips operations at runtime.
*/
void block(const Napi::CallbackInfo& info) {
Napi::Array ops = info[size_t(0)].As<Napi::Array>();
bool const state = info[size_t(1)].As<Napi::Boolean>().Value();
for (unsigned int i = 0; i < ops.Length(); i++) {
vips_operation_block_set(ops.Get(i).As<Napi::String>().Utf8Value().c_str(), state);
}
}
/*
Synchronous, internal-only method used by some of the functional tests.
Calculates the maximum colour distance using the DE2000 algorithm
between two images of the same dimensions and number of channels.
*/
Napi::Value _maxColourDistance(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
// Open input files
VImage image1;
sharp::ImageType imageType1 = sharp::DetermineImageType(info[size_t(0)].As<Napi::String>().Utf8Value().data());
if (imageType1 != sharp::ImageType::UNKNOWN) {
try {
image1 = VImage::new_from_file(info[size_t(0)].As<Napi::String>().Utf8Value().c_str());
} catch (...) {
throw Napi::Error::New(env, "Input file 1 has corrupt header");
}
} else {
throw Napi::Error::New(env, "Input file 1 is of an unsupported image format");
}
VImage image2;
sharp::ImageType imageType2 = sharp::DetermineImageType(info[size_t(1)].As<Napi::String>().Utf8Value().data());
if (imageType2 != sharp::ImageType::UNKNOWN) {
try {
image2 = VImage::new_from_file(info[size_t(1)].As<Napi::String>().Utf8Value().c_str());
} catch (...) {
throw Napi::Error::New(env, "Input file 2 has corrupt header");
}
} else {
throw Napi::Error::New(env, "Input file 2 is of an unsupported image format");
}
// Ensure same number of channels
if (image1.bands() != image2.bands()) {
throw Napi::Error::New(env, "mismatchedBands");
}
// Ensure same dimensions
if (image1.width() != image2.width() || image1.height() != image2.height()) {
throw Napi::Error::New(env, "mismatchedDimensions");
}
double maxColourDistance;
try {
// Premultiply and remove alpha
if (image1.has_alpha()) {
image1 = image1.premultiply().extract_band(1, VImage::option()->set("n", image1.bands() - 1));
}
if (image2.has_alpha()) {
image2 = image2.premultiply().extract_band(1, VImage::option()->set("n", image2.bands() - 1));
}
// Calculate colour distance
maxColourDistance = image1.dE00(image2).max();
} catch (vips::VError const &err) {
throw Napi::Error::New(env, err.what());
}
// Clean up libvips' per-request data and threads
vips_error_clear();
vips_thread_shutdown();
return Napi::Number::New(env, maxColourDistance);
}
#if defined(__GNUC__)
// mallctl will be resolved by the runtime linker when jemalloc is being used
extern "C" {
int mallctl(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen) __attribute__((weak));
}
Napi::Value _isUsingJemalloc(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
return Napi::Boolean::New(env, mallctl != nullptr);
}
#else
Napi::Value _isUsingJemalloc(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
return Napi::Boolean::New(env, false);
}
#endif
#if defined(__GNUC__) && defined(__x86_64__)
// Are SSE 4.2 intrinsics available at runtime?
Napi::Value _isUsingX64V2(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
unsigned int eax, ebx, ecx, edx;
__asm__ __volatile__("cpuid"
: "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx)
: "a"(1));
return Napi::Boolean::New(env, (ecx & 1U << 20) != 0);
}
#else
Napi::Value _isUsingX64V2(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
return Napi::Boolean::New(env, false);
}
#endif
@@ -0,0 +1,735 @@
@dialects { jsx, ts }
@precedence {
typeargs,
typeMember,
typePrefix,
intersectionPrefixed @left,
intersection @left,
unionPrefixed @left,
union @left,
typeExtends @right,
else @right,
member,
readonly,
newArgs,
call,
instantiate,
taggedTemplate,
prefix,
postfix,
typeof,
exp @left,
times @left,
plus @left,
shift @left,
loop,
rel @left,
satisfies,
equal @left,
bitAnd @left,
bitXor @left,
bitOr @left,
and @left,
or @left,
ternary @right,
assign @right,
comma @left,
statement @cut,
predicate
}
@top Script { Hashbang? statement* }
@top SingleExpression { expression }
@top SingleClassItem { classItem }
statement[@isGroup=Statement] {
ExportDeclaration |
ImportDeclaration |
ForStatement { kw<"for"> ckw<"await">? (ForSpec | ForInSpec | ForOfSpec) statement } |
WhileStatement { kw<"while"> ParenthesizedExpression statement } |
WithStatement { kw<"with"> ParenthesizedExpression statement } |
DoStatement { kw<"do"> statement kw<"while"> ParenthesizedExpression semi } |
IfStatement { kw<"if"> ParenthesizedExpression statement (!else kw<"else"> statement)? } |
SwitchStatement { kw<"switch"> ParenthesizedExpression SwitchBody { "{" switchItem* "}" } } |
TryStatement {
kw<"try"> Block
CatchClause { kw<"catch"> ("(" pattern ")")? Block }?
FinallyClause { kw<"finally"> Block }?
} |
ReturnStatement { kw<"return"> (noSemi expression)? semi } |
ThrowStatement { kw<"throw"> expression semi } |
BreakStatement { kw<"break"> (noSemi Label)? semi } |
ContinueStatement { kw<"continue"> (noSemi Label)? semi } |
DebuggerStatement { kw<"debugger"> semi } |
Block |
LabeledStatement { Label ":" statement } |
declaration |
ExpressionStatement { expression semi } |
";"
}
ExportDeclaration {
kw<"export"> Star (ckw<"as"> (VariableName | String))? ckw<"from"> String semi |
kw<"export"> kw<"default"> (FunctionDeclaration | ClassDeclaration | expression semi) |
kw<"export"> tskw<"type">? declaration |
kw<"export"> tskw<"type">? ExportGroup (ckw<"from"> String)? semi |
kw<"export"> "=" expression semi
}
ExportGroup {
"{" commaSep<(VariableName | String | kw<"default">) (ckw<"as"> (VariableName { word } | String))?> "}"
}
ImportDeclaration {
kw<"import"> ckw<"defer">? tskw<"type">? (Star ckw<"as"> VariableDefinition | commaSep<VariableDefinition | ImportGroup>)
ckw<"from"> String semi |
kw<"import"> ckw<"defer">? String semi
}
ImportGroup {
"{" commaSep<tskw<"type">? (VariableDefinition | (VariableName | String | kw<"default">) ckw<"as"> VariableDefinition)> "}"
}
ForSpec {
"("
(VariableDeclaration | expression ";" | ";") expression? ";" expression?
")"
}
forXSpec<op> {
"("
(variableDeclarationKeyword pattern | VariableName | MemberExpression | ArrayPattern | ObjectPattern)
!loop op expression
")"
}
ForInSpec { forXSpec<kw<"in">> }
ForOfSpec { forXSpec<ckw<"of">> }
declaration {
FunctionDeclaration |
ClassDeclaration |
VariableDeclaration |
TypeAliasDeclaration |
InterfaceDeclaration |
EnumDeclaration |
NamespaceDeclaration |
AmbientDeclaration
}
FunctionDeclaration {
async? !statement kw<"function"> Star? VariableDefinition? functionSignature (Block | semi)
}
ClassDeclaration {
!statement Decorator* tskw<"abstract">? kw<"class"> VariableDefinition TypeParamList?
(kw<"extends"> ((VariableName | MemberExpression) !typeargs TypeArgList | expression))?
(tskw<"implements"> commaSep1<type>)?
ClassBody
}
classItem { MethodDeclaration | PropertyDeclaration | StaticBlock | ";" }
ClassBody { "{" classItem* "}" }
privacy {
@extend[@name=Privacy,@dialect=ts]<word, "public" | "private" | "protected">
}
privacyArg {
@extend[@name=Privacy,@dialect=ts]<identifier, "public" | "private" | "protected">
}
propModifier {
Decorator |
tsPkwMod<"declare"> |
privacy |
pkwMod<"static"> |
tsPkwMod<"abstract"> |
tsPkwMod<"override">
}
classPropName { propName | PrivatePropertyDefinition }
MethodDeclaration[group=ClassItem] {
propModifier*
pkwMod<"async">?
(pkwMod<"get"> | pkwMod<"set"> | Star)?
classPropName
functionSignature
(Block | semi)
}
StaticBlock[group=ClassItem] {
pkwMod<"static"> Block
}
PropertyDeclaration[group=ClassItem] {
propModifier*
(tsPkwMod<"readonly"> | pkwMod<"accessor">)?
classPropName
(Optional | LogicOp<"!">)?
TypeAnnotation?
("=" expressionNoComma)?
semi
}
variableDeclarationKeyword {
kw<"let"> | kw<"var"> | kw<"const"> | ckw<"await">? ckw<"using">
}
VariableDeclaration {
variableDeclarationKeyword commaSep1<patternAssignTyped> semi
}
TypeAliasDeclaration {
tskw<"type"> TypeDefinition TypeParamList? "=" type semi
}
InterfaceDeclaration {
tskw<"interface"> TypeDefinition TypeParamList? (kw<"extends"> commaSep1<type>)? ObjectType
}
EnumDeclaration {
kw<"const">? tskw<"enum"> TypeDefinition EnumBody { "{" commaSep<PropertyName ("=" expressionNoComma)?> "}" }
}
NamespaceDeclaration {
(tskw<"namespace"> | tskw<"module">) VariableDefinition ("." PropertyDefinition)* Block
}
AmbientDeclaration {
tskw<"declare"> (
VariableDeclaration |
TypeAliasDeclaration |
EnumDeclaration |
InterfaceDeclaration |
NamespaceDeclaration |
GlobalDeclaration { tskw<"global"> Block } |
ClassDeclaration {
tskw<"abstract">? kw<"class"> VariableDefinition TypeParamList?
(kw<"extends"> expression)?
(tskw<"implements"> commaSep1<type>)?
ClassBody { "{" (
MethodDeclaration |
PropertyDeclaration |
IndexSignature semi
)* "}" }
} |
AmbientFunctionDeclaration {
async? kw<"function"> Star? VariableDefinition? TypeParamList? ParamList (TypeAnnotation | TypePredicate) semi
}
)
}
decoratorExpression {
VariableName |
MemberExpression { decoratorExpression !member ("." | questionDot) (PropertyName | PrivatePropertyName) } |
CallExpression { decoratorExpression !call TypeArgList? questionDot? ArgList } |
ParenthesizedExpression
}
Decorator { "@" decoratorExpression }
pattern { VariableDefinition | ArrayPattern | ObjectPattern }
ArrayPattern { "[" commaSep<("..."? patternAssign)?> ~destructure "]" }
ObjectPattern { "{" commaSep<PatternProperty> ~destructure "}" }
patternAssign {
pattern ("=" expressionNoComma)?
}
TypeAnnotation { ":" type }
TypePredicate {
":" (
tskw<"asserts"> (VariableName | kw<"this">) !predicate (tskw<"is"> type)? |
(VariableName | kw<"this">) !predicate tskw<"is"> type
)
}
patternAssignTyped {
pattern Optional? TypeAnnotation? ("=" expressionNoComma)?
}
ParamList {
"(" commaSep<"..." patternAssignTyped | Decorator* privacyArg? tskw<"readonly">? patternAssignTyped | kw<"this"> TypeAnnotation> ")"
}
Block {
!statement "{" statement* "}"
}
switchItem {
CaseLabel { kw<"case"> expression ":" } |
DefaultLabel { kw<"default"> ":" } |
statement
}
expression[@isGroup=Expression] {
expressionNoComma | SequenceExpression
}
SequenceExpression {
expressionNoComma !comma ("," expressionNoComma)+
}
expressionNoComma {
Number |
String |
TemplateString |
VariableName |
boolean |
kw<"this"> |
kw<"null"> |
kw<"super"> |
RegExp |
ArrayExpression |
ObjectExpression { "{" commaSep<Property> ~destructure "}" } |
NewTarget { kw<"new"> "." PropertyName } |
NewExpression { kw<"new"> expressionNoComma (!newArgs ArgList)? } |
UnaryExpression |
YieldExpression |
AwaitExpression |
ParenthesizedExpression |
ClassExpression |
FunctionExpression |
ArrowFunction |
MemberExpression |
BinaryExpression |
ConditionalExpression { expressionNoComma !ternary questionOp expressionNoComma LogicOp<":"> expressionNoComma } |
AssignmentExpression |
PostfixExpression { expressionNoComma !postfix (incdec | LogicOp<"!">) } |
CallExpression { expressionNoComma !call questionDot? ArgList } |
InstantiationExpression { (VariableName | MemberExpression) !instantiate TypeArgList } |
TaggedTemplateExpression { expressionNoComma !taggedTemplate TemplateString } |
DynamicImport { kw<"import"> "(" expressionNoComma ")" } |
ImportMeta { kw<"import"> "." PropertyName } |
JSXElement |
PrefixCast { tsAngleOpen (type | kw<"const">) ~tsAngle ">" expressionNoComma } |
ArrowFunction[@dynamicPrecedence=1] {
TypeParamList { tsAngleOpen commaSep<typeParam> ">" } ParamList TypeAnnotation? "=>" (Block | expressionNoComma)
}
}
ParenthesizedExpression { "(" expression ")" }
ArrayExpression {
"[" commaSep1<"..."? expressionNoComma | ""> ~destructure "]"
}
propName { PropertyDefinition | "[" expression "]" ~destructure | Number ~destructure | String ~destructure }
Property {
pkwMod<"async">? (pkwMod<"get"> | pkwMod<"set"> | Star)? propName functionSignature Block |
propName ~destructure (":" expressionNoComma)? |
"..." expressionNoComma
}
PatternProperty {
"..." patternAssign |
((PropertyName | Number | String) ~destructure (":" pattern)? |
("[" expression "]" ~destructure ":" pattern)) ("=" expressionNoComma)?
}
ClassExpression {
kw<"class"> VariableDefinition? (kw<"extends"> expression)? ClassBody
}
functionSignature { TypeParamList? ParamList (TypeAnnotation | TypePredicate)? }
FunctionExpression {
async? kw<"function"> Star? VariableDefinition? functionSignature Block
}
YieldExpression[@dynamicPrecedence=1] {
!prefix ckw<"yield"> Star? expressionNoComma
}
AwaitExpression[@dynamicPrecedence=1] {
!prefix ckw<"await"> expressionNoComma
}
UnaryExpression {
!prefix (kw<"void"> | kw<"typeof"> | kw<"delete"> |
LogicOp<"!"> | BitOp<"~"> | incdec | incdecPrefix | plusMin)
expressionNoComma
}
BinaryExpression {
expressionNoComma !exp ArithOp<"**"> expressionNoComma |
expressionNoComma !times (divide | ArithOp<"%"> | ArithOp<"*">) expressionNoComma |
expressionNoComma !plus plusMin expressionNoComma |
expressionNoComma !shift BitOp<">>" ">"? | "<<"> expressionNoComma |
expressionNoComma !rel (LessThan | CompareOp<"<=" | ">" "="?> | kw<"instanceof">) expressionNoComma |
expressionNoComma !satisfies tskw<"satisfies"> type |
(expressionNoComma | PrivatePropertyName) !rel ~tsIn kw<"in"> expressionNoComma |
expressionNoComma !rel ckw<"as"> (kw<"const"> | type) |
expressionNoComma !rel tskw<"satisfies"> type |
expressionNoComma !equal CompareOp<"==" "="? | "!=" "="?> expressionNoComma |
expressionNoComma !bitOr BitOp { "|" } expressionNoComma |
expressionNoComma !bitXor BitOp<"^"> expressionNoComma |
expressionNoComma !bitAnd BitOp { "&" } expressionNoComma |
expressionNoComma !and LogicOp<"&&"> expressionNoComma |
expressionNoComma !or LogicOp<"||" | "??"> expressionNoComma
}
AssignmentExpression {
(VariableName | MemberExpression) !assign UpdateOp<($[+\-/%^] | "*" "*"? | "|" "|"? | "&" "&"? | "<<" | ">>" ">"? | "??") "=">
expressionNoComma |
(VariableName | MemberExpression | ArrayPattern | ObjectPattern) !assign "=" expressionNoComma
}
MemberExpression {
expressionNoComma !member (("." | questionDot) (PropertyName | PrivatePropertyName) | questionDot? "[" expression "]")
}
ArgList {
"(" commaSep<"..."? expressionNoComma> ")"
}
ArrowFunction {
async? (ParamList { VariableDefinition } | ParamList TypeAnnotation?) "=>" (Block | expressionNoComma)
}
TypeArgList[@dynamicPrecedence=1] {
@extend[@dialect=ts,@name="<"]<LessThan, "<"> commaSep<type> ">"
}
TypeParamList {
"<" commaSep<typeParam> ">"
}
typeParam { (kw<"in"> | tskw<"out"> | kw<"const">)? TypeDefinition ~tsAngle (kw<"extends"> type)? ("=" type)? }
typeofExpression {
MemberExpression { typeofExpression !member (("." | questionDot) PropertyName | "[" expression "]") } |
InstantiationExpression { typeofExpression !instantiate TypeArgList } |
VariableName
}
type[@isGroup=Type] {
ThisType { kw<"this"> } |
LiteralType {
plusMin? Number |
boolean |
String
} |
TemplateType |
NullType { kw<"null"> } |
VoidType { kw<"void"> } |
TypeofType { kw<"typeof"> typeofExpression } |
KeyofType { !typePrefix tskw<"keyof"> type } |
UniqueType { !typePrefix tskw<"unique"> type } |
ImportType { kw<"import"> "(" String ")" } |
InferredType { tskw<"infer"> TypeName } |
ParenthesizedType { "(" type ")" } |
FunctionSignature { TypeParamList? ParamTypeList "=>" type } |
NewSignature { kw<"new"> ParamTypeList "=>" type } |
IndexedType |
TupleType { "[" commaSep<(Label ":")? type | "..." type> ~destructure "]" } |
ArrayType { type noSemiType "[" "]" } |
ReadonlyType { tskw<"readonly"> !readonly type } |
ObjectType |
UnionType {
type (!union unionOp type)+ |
unionOp type (!unionPrefixed unionOp type)*
} |
IntersectionType {
type (!intersection intersectionOp type)+ |
intersectionOp type (!intersectionPrefixed intersectionOp type)*
} |
ConditionalType { type !typeExtends kw<"extends"> type questionOp ~arrow type LogicOp<":"> type } |
ParameterizedType { (TypeName | IndexedType) !typeargs TypeArgList } |
TypeName
}
IndexedType {
type !typeMember ("." TypeName | noSemiType "[" type "]")+
}
ObjectType {
"{" (
(MethodType |
PropertyType |
IndexSignature |
CallSignature { ParamTypeList (TypeAnnotation | TypePredicate) } |
NewSignature[@dynamicPrecedence=1] { @extend[@name=new]<word, "new"> ParamTypeList TypeAnnotation })
("," | semi)
)* ~destructure "}"
}
IndexSignature {
(plusMin? tsPkwMod<"readonly">)?
"[" PropertyDefinition { identifier } (TypeAnnotation | ~tsIn kw<"in"> type (ckw<"as"> type)?) "]"
(plusMin? Optional)?
TypeAnnotation
}
MethodType {
pkwMod<"async">?
(pkwMod<"get"> | pkwMod<"set"> | Star)?
propName
(plusMin? Optional)?
functionSignature
}
PropertyType {
(plusMin? tsPkwMod<"readonly">)?
propName
(plusMin? Optional)?
TypeAnnotation
}
ParamTypeList[@name=ParamList] {
"(" commaSep<"..."? pattern ~arrow Optional? ~arrow TypeAnnotation? | kw<"this"> TypeAnnotation> ")"
}
@skip {} {
TemplateString[isolate] {
templateStart (templateEscape | templateContent | templateExpr)* templateEnd
}
TemplateType[isolate] {
templateStart (templateContent | templateType)* templateEnd
}
String[isolate] {
'"' (stringContentDouble | Escape)* ('"' | "\n") |
"'" (stringContentSingle | Escape)* ("'" | "\n")
}
BlockComment[isolate] { "/*" (blockCommentContent | blockCommentNewline)* blockCommentEnd }
}
templateExpr[@name=Interpolation,isolate] { InterpolationStart expression? InterpolationEnd }
templateType[@name=Interpolation,isolate] { InterpolationStart type? InterpolationEnd }
@skip {} {
JSXElement {
JSXSelfClosingTag |
(JSXOpenTag | JSXFragmentTag) (JSXText | JSXElement | JSXEscape)* JSXCloseTag
}
}
JSXSelfClosingTag { JSXStartTag jsxElementName jsxAttribute* JSXSelfCloseEndTag }
JSXOpenTag { JSXStartTag jsxElementName jsxAttribute* JSXEndTag }
JSXFragmentTag { JSXStartTag JSXEndTag }
JSXCloseTag { JSXStartCloseTag jsxElementName? JSXEndTag }
jsxElementName {
JSXIdentifier |
JSXBuiltin { JSXLowerIdentifier } |
JSXNamespacedName |
JSXMemberExpression
}
JSXMemberExpression { (JSXMemberExpression | JSXIdentifier | JSXLowerIdentifier) "." (JSXIdentifier | JSXLowerIdentifier) }
JSXNamespacedName { (JSXIdentifier | JSXNamespacedName | JSXLowerIdentifier) ":" (JSXIdentifier | JSXLowerIdentifier) }
jsxAttribute {
JSXSpreadAttribute { "{" "..." expression "}" } |
JSXAttribute { (JSXIdentifier | JSXNamespacedName | JSXLowerIdentifier) ("=" jsxAttributeValue)? }
}
jsxAttributeValue {
JSXAttributeValue |
JSXEscape { "{" expression "}" } |
JSXElement
}
JSXEscape { "{" "..."? expression "}" }
commaSep<content> {
"" | content ("," content?)*
}
commaSep1<content> {
content ("," content)*
}
// Keywords
kw<term> { @specialize[@name={term}]<identifier, term> }
// Contextual keywords
ckw<term> { @extend[@name={term}]<identifier, term> }
tskw<term> { @extend[@name={term},@dialect=ts]<identifier, term> }
async { @extend[@name=async]<identifier, "async"> }
// Contextual keyword in property context
pkwMod<term> { @extend[@name={term}]<word, term> }
tsPkwMod<term> { @extend[@name={term},@dialect=ts]<word, term> }
semi { ";" | insertSemi }
boolean { @specialize[@name=BooleanLiteral]<identifier, "true" | "false"> }
Star { "*" }
VariableName { identifier ~arrow }
VariableDefinition { identifier ~arrow }
TypeDefinition { identifier }
TypeName { identifier ~arrow }
Label { identifier }
PropertyName { word ~propName }
PropertyDefinition { word ~propName }
PrivatePropertyName { privateIdentifier }
PrivatePropertyDefinition { privateIdentifier }
Optional { "?" }
questionOp[@name=LogicOp] { "?" }
unionOp[@name=LogicOp] { "|" }
plusMin { ArithOp<"+" | "-"> }
intersectionOp[@name=LogicOp] { "&" }
@skip { spaces | newline | LineComment | BlockComment }
@context trackNewline from "./tokens.js"
@external tokens noSemicolon from "./tokens" { noSemi }
@external tokens noSemicolonType from "./tokens" { noSemiType }
@external tokens operatorToken from "./tokens" {
incdec[@name=ArithOp],
incdecPrefix[@name=ArithOp]
questionDot[@name="?."]
}
@external tokens jsx from "./tokens" { JSXStartTag }
@local tokens {
InterpolationStart[closedBy=InterpolationEnd] { "${" }
templateEnd { "`" }
templateEscape[@name=Escape] { Escape }
@else templateContent
}
@local tokens {
blockCommentEnd { "*/" }
blockCommentNewline { "\n" }
@else blockCommentContent
}
@tokens {
spaces[@export] { $[\u0009 \u000b\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]+ }
newline[@export] { $[\r\n\u2028\u2029] }
LineComment[isolate] { "//" ![\n]* }
Hashbang { "#!" ![\n]* }
divide[@name=ArithOp] { "/" }
@precedence { "/*", LineComment, divide }
@precedence { "/*", LineComment, RegExp }
identifierChar { @asciiLetter | $[_$\u{a1}-\u{10ffff}] }
word { identifierChar (identifierChar | @digit)* }
identifier { word }
privateIdentifier { "#" word }
@precedence { spaces, newline, identifier }
@precedence { spaces, newline, JSXIdentifier, JSXLowerIdentifier }
@precedence { spaces, newline, word }
hex { @digit | $[a-fA-F] }
Number {
(@digit ("_" | @digit)* ("." ("_" | @digit)*)? | "." @digit ("_" | @digit)*)
(("e" | "E") ("+" | "-")? ("_" | @digit)+)? |
@digit ("_" | @digit)* "n" |
"0x" (hex | "_")+ "n"? |
"0b" $[01_]+ "n"? |
"0o" $[0-7_]+ "n"?
}
@precedence { Number "." }
Escape {
"\\" ("x" hex hex | "u" ("{" hex+ "}" | hex hex hex hex) | ![xu])
}
stringContentSingle { ![\\\n']+ }
stringContentDouble { ![\\\n"]+ }
templateStart { "`" }
InterpolationEnd[openedBy=InterpolationStart] { "}" }
ArithOp<expr> { expr }
LogicOp<expr> { expr }
BitOp<expr> { expr }
CompareOp<expr> { expr }
UpdateOp<expr> { expr }
@precedence { "*", ArithOp }
RegExp[isolate] { "/" (![/\\\n[] | "\\" ![\n] | "[" (![\n\\\]] | "\\" ![\n])* "]")+ ("/" $[dgimsuvy]*)? }
LessThan[@name=CompareOp] { "<" }
"="[@name=Equals]
"..."[@name=Spread]
"=>"[@name=Arrow]
"(" ")" "[" "]" "{" "}" "<" ">"
"." "," ";" ":" "@"
JSXIdentifier { $[A-Z_$\u{a1}-\u{10ffff}] (identifierChar | @digit | "-")* }
JSXLowerIdentifier[@name=JSXIdentifier] { $[a-z] (identifierChar | @digit | "-")* }
JSXAttributeValue { '"' !["]* '"' | "'" ![']* "'" }
JSXStartCloseTag { "</" }
JSXEndTag { ">" }
JSXSelfCloseEndTag { "/>" }
JSXText { ![<{]+ }
tsAngleOpen[@dialect=ts,@name="<"] { "<" }
}
@external tokens insertSemicolon from "./tokens" { insertSemi }
@external propSource jsHighlight from "./highlight"
@detectDelim
@@ -0,0 +1,109 @@
// Copyright (c) 2011-2015 Ryan Prichard
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
#ifndef CONSOLEINPUT_H
#define CONSOLEINPUT_H
#include <windows.h>
#include <stdint.h>
#include <memory>
#include <string>
#include <vector>
#include "Coord.h"
#include "InputMap.h"
#include "SmallRect.h"
class Win32Console;
class DsrSender;
class ConsoleInput
{
public:
ConsoleInput(HANDLE conin, int mouseMode, DsrSender &dsrSender,
Win32Console &console);
void writeInput(const std::string &input);
void flushIncompleteEscapeCode();
void setMouseWindowRect(SmallRect val) { m_mouseWindowRect = val; }
void updateInputFlags(bool forceTrace=false);
bool shouldActivateTerminalMouse();
private:
void doWrite(bool isEof);
void flushInputRecords(std::vector<INPUT_RECORD> &records);
int scanInput(std::vector<INPUT_RECORD> &records,
const char *input,
int inputSize,
bool isEof);
int scanMouseInput(std::vector<INPUT_RECORD> &records,
const char *input,
int inputSize);
void appendUtf8Char(std::vector<INPUT_RECORD> &records,
const char *charBuffer,
int charLen,
bool terminalAltEscape);
void appendKeyPress(std::vector<INPUT_RECORD> &records,
uint16_t virtualKey,
uint32_t winCodePointDn,
uint32_t winCodePointUp,
uint16_t winKeyState,
uint32_t vtCodePoint,
uint16_t vtKeyState);
public:
static void appendCPInputRecords(std::vector<INPUT_RECORD> &records,
BOOL keyDown,
uint16_t virtualKey,
uint32_t codePoint,
uint16_t keyState);
static void appendInputRecord(std::vector<INPUT_RECORD> &records,
BOOL keyDown,
uint16_t virtualKey,
wchar_t utf16Char,
uint16_t keyState);
private:
DWORD inputConsoleMode();
private:
Win32Console &m_console;
HANDLE m_conin = nullptr;
int m_mouseMode = 0;
DsrSender &m_dsrSender;
bool m_dsrSent = false;
std::string m_byteQueue;
InputMap m_inputMap;
DWORD m_lastWriteTick = 0;
DWORD m_mouseButtonState = 0;
struct DoubleClickDetection {
DWORD button = 0;
Coord pos;
DWORD tick = 0;
bool released = false;
} m_doubleClick;
bool m_enableExtendedEnabled = false;
bool m_mouseInputEnabled = false;
bool m_quickEditEnabled = false;
bool m_escapeInputEnabled = false;
SmallRect m_mouseWindowRect;
};
#endif // CONSOLEINPUT_H
@@ -0,0 +1,10 @@
"use strict";
const absFloor = require("./absFloor-CImRXpov.js");
const monthDiff = require("./monthDiff-DFAMKa42.js");
const parse = require("./parse.js");
function diffInYears(date, input, asFloat) {
const parsed = parse(input);
const output = monthDiff.monthDiff(date, parsed) / 12;
return asFloat ? output : absFloor.absFloor(output);
}
module.exports = diffInYears;
@@ -0,0 +1,105 @@
'use strict';
var stringifyNumber = require('../../stringify/stringifyNumber.js');
/** Internal types handle bigint as number, because TS can't figure it out. */
function parseSexagesimal(str, asBigInt) {
const sign = str[0];
const parts = sign === '-' || sign === '+' ? str.substring(1) : str;
const num = (n) => asBigInt ? BigInt(n) : Number(n);
const res = parts
.replace(/_/g, '')
.split(':')
.reduce((res, p) => res * num(60) + num(p), num(0));
return (sign === '-' ? num(-1) * res : res);
}
/**
* hhhh:mm:ss.sss
*
* Internal types handle bigint as number, because TS can't figure it out.
*/
function stringifySexagesimal(node) {
let { value } = node;
let num = (n) => n;
if (typeof value === 'bigint')
num = n => BigInt(n);
else if (isNaN(value) || !isFinite(value))
return stringifyNumber.stringifyNumber(node);
let sign = '';
if (value < 0) {
sign = '-';
value *= num(-1);
}
const _60 = num(60);
const parts = [value % _60]; // seconds, including ms
if (value < 60) {
parts.unshift(0); // at least one : is required
}
else {
value = (value - parts[0]) / _60;
parts.unshift(value % _60); // minutes
if (value >= 60) {
value = (value - parts[0]) / _60;
parts.unshift(value); // hours
}
}
return (sign +
parts
.map(n => String(n).padStart(2, '0'))
.join(':')
.replace(/000000\d*$/, '') // % 60 may introduce error
);
}
const intTime = {
identify: value => typeof value === 'bigint' || Number.isInteger(value),
default: true,
tag: 'tag:yaml.org,2002:int',
format: 'TIME',
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt),
stringify: stringifySexagesimal
};
const floatTime = {
identify: value => typeof value === 'number',
default: true,
tag: 'tag:yaml.org,2002:float',
format: 'TIME',
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
resolve: str => parseSexagesimal(str, false),
stringify: stringifySexagesimal
};
const timestamp = {
identify: value => value instanceof Date,
default: true,
tag: 'tag:yaml.org,2002:timestamp',
// If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part
// may be omitted altogether, resulting in a date format. In such a case, the time part is
// assumed to be 00:00:00Z (start of day, UTC).
test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd
'(?:' + // time is optional
'(?:t|T|[ \\t]+)' + // t | T | whitespace
'([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?
'(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30
')?$'),
resolve(str) {
const match = str.match(timestamp.test);
if (!match)
throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd');
const [, year, month, day, hour, minute, second] = match.map(Number);
const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0;
let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);
const tz = match[8];
if (tz && tz !== 'Z') {
let d = parseSexagesimal(tz, false);
if (Math.abs(d) < 30)
d *= 60;
date -= 60000 * d;
}
return new Date(date);
},
stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\.000Z$/, '') ?? ''
};
exports.floatTime = floatTime;
exports.intTime = intTime;
exports.timestamp = timestamp;
@@ -0,0 +1,31 @@
import { AriaLinkProps } from '@react-types/link';
import { DOMAttributes, FocusableElement } from '@react-types/shared';
import { RefObject } from 'react';
interface AriaLinkOptions extends AriaLinkProps {
/** Indicates the element that represents the current item within a container or set of related elements. */
"aria-current"?: DOMAttributes["aria-current"];
/** Whether the link is disabled. */
isDisabled?: boolean;
/** The role of the element */
role?: string;
/**
* The HTML element used to render the link, e.g. 'a', or 'span'.
* @default 'a'
*/
elementType?: string;
}
interface LinkAria {
/** Props for the link element. */
linkProps: DOMAttributes;
/** Whether the link is currently pressed. */
isPressed: boolean;
}
/**
* Provides the behavior and accessibility implementation for a link component.
* A link allows a user to navigate to another page or resource within a web page
* or application.
*/
declare function useAriaLink(props: AriaLinkOptions, ref: RefObject<FocusableElement>): LinkAria;
export { AriaLinkOptions, LinkAria, useAriaLink };
@@ -0,0 +1,20 @@
"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 __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./decode"), exports);
__exportStar(require("./encode"), exports);
__exportStar(require("./has"), exports);
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=injectFromHierarchy.spec.d.ts.map
@@ -0,0 +1 @@
{"name":"is-windows","version":"1.0.2","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532123461,"integrity":"sha512-V2cg01ZRCjVZ0fwNAz03TkH+A0BpsgBVZEQsnfWqCMdhVciJ7nGshTM3kPZp/pdKjGoT/NEn3DxDUCpj0/W8cA==","mode":420,"size":1412},"index.js":{"checkedAt":1794532123461,"integrity":"sha512-4CORni4xw3m3GVvNk2KW8lsXzeuoZl5BLXp94fGTIvxTVlibOw5l7hjow73JM7PLDkQmwOjZ5xP2ewRfNORQrA==","mode":420,"size":824},"LICENSE":{"checkedAt":1794532123461,"integrity":"sha512-kFcgZWk+6JZB3qUk4pRdcFlVfa51PMgDX3jMGcbwcFvVHkALvkHXpH7qXKubnDQ9Bo0c71R2aLSsGVWr2PTEjg==","mode":420,"size":1088},"README.md":{"checkedAt":1794532123461,"integrity":"sha512-xKTB8hKALmTAVW7qYA1Z/zvEQ/7CC7gG4zohVQ7nAZW/INEtnfNuqR/Xt+eUTIntyQiL1AqVd+rho5SjNEmdEQ==","mode":420,"size":4639}}}
@@ -0,0 +1 @@
{"name":"unc-path-regex","version":"0.1.2","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532123429,"integrity":"sha512-zaYJKDs1rfQ+75Bv//YVycgPhANX/CbfRihayXxFd2xiS7tMsCNA9WskzIIiVrLU/TJ+o41jQmMhnGhdkinETw==","mode":420,"size":1162},"README.md":{"checkedAt":1794532123429,"integrity":"sha512-f7j+4OjPMggbt6rCUMJHsvFkV4xoHmr88j1ySydHlYCaFTfdkGXnDKdxWZiCQ226HC0nCty4A3hPQPGDnMKwNw==","mode":420,"size":2578},"LICENSE":{"checkedAt":1794532123429,"integrity":"sha512-Pzk/oiavUErNJ+2Q1b5g1EPArVYQxVzQx4/walYwLVN7/eHoQhq7gKsPEb/xzHqN2Va5TjDYJGMyt4274Wkr6g==","mode":420,"size":1083},"index.js":{"checkedAt":1794532123429,"integrity":"sha512-Pf56FyFc1v2X9crFQluxbQHQ/XEokApOYNcbCqNXPhh0TtDdV0zbGKIBsNhc1ZHCzIIHwsJckswzcAtTbeB8Sw==","mode":420,"size":108}}}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=cacheNonRootPlanServiceNode.spec.d.ts.map
@@ -0,0 +1,10 @@
"use strict";
var _async_generator = require("./_async_generator.cjs");
function _wrap_async_generator(fn) {
return function() {
return new _async_generator._(fn.apply(this, arguments));
};
}
exports._ = _wrap_async_generator;
@@ -0,0 +1,40 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = traverseFast;
var _index = require("../definitions/index.js");
const _skip = Symbol();
const _stop = Symbol();
function traverseFast(node, enter, opts) {
if (!node) return false;
const keys = _index.VISITOR_KEYS[node.type];
if (!keys) return false;
opts = opts || {};
const ret = enter(node, opts);
if (ret !== undefined) {
switch (ret) {
case _skip:
return false;
case _stop:
return true;
}
}
for (const key of keys) {
const subNode = node[key];
if (!subNode) continue;
if (Array.isArray(subNode)) {
for (const node of subNode) {
if (traverseFast(node, enter, opts)) return true;
}
} else {
if (traverseFast(subNode, enter, opts)) return true;
}
}
return false;
}
traverseFast.skip = _skip;
traverseFast.stop = _stop;
//# sourceMappingURL=traverseFast.js.map
@@ -0,0 +1,33 @@
import {getChildNodes as $c5a24bc478652b5f$export$1005530eda016c13} from "./getChildNodes.mjs";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $453cc9f0df89c0a5$var$cache = new WeakMap();
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
let count = $453cc9f0df89c0a5$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, $c5a24bc478652b5f$export$1005530eda016c13)(item, collection));
else if (item.type === 'item') counter++;
}
};
countItems(collection);
$453cc9f0df89c0a5$var$cache.set(collection, counter);
return counter;
}
export {$453cc9f0df89c0a5$export$77d5aafae4e095b2 as getItemCount};
//# sourceMappingURL=getItemCount.module.js.map
@@ -0,0 +1 @@
{"mappings":";;;AAAA;;;;;;;;;;CAUC,GAED,gEAAgE;AAChE,gGAAgG;;;AAOhG,MAAM,yCAAmB;AAEzB,SAAS,oCAAc,IAAqB;IAC1C,OAAO,KAAK,GAAG,KAAK,WAChB,KAAK,IAAI,GAAG,yCACZ,IAAI,KAAK,IAAI,GAAG;AACtB;AAEA,SAAS,wCAAkB,IAAY;IACrC,IAAI,IAAI,OAAO;IACf,IAAI,IAAI,GACN,OAAO;QAAC;QAAU;KAAE;SAEpB,OAAO;QAAC;QAAiB,IAAI;KAAE;AAEnC;AAOO,MAAM,kDAAuB,CAAA,GAAA,yCAAgB;IAGlD,cAAc,EAAU,EAAgB;QACtC,IAAI,OAAO,KAAK,CAAC,cAAc;QAC/B,IAAI,eAAe,CAAA,GAAA,yCAAc,EAAE,KAAK,GAAG,EAAE,KAAK,IAAI;QACtD,IAAI,CAAC,KAAK,KAAK,GAAG,wCAAkB;QACpC,OAAO,IAAI,CAAA,GAAA,yCAAW,EAAE,IAAI,EAAE,KAAK,MAAM,KAAK,KAAK,EAAE,KAAK,GAAG;IAC/D;IAEA,YAAY,IAAqB,EAAU;QACzC,OAAO,KAAK,CAAC,YAAY,kCAAY;IACvC;IAEA,UAAoB;QAClB,OAAO;YAAC;YAAiB;SAAS;IACpC;IAEA,YAAY,IAA8B,EAAQ;QAChD,IAAI,CAAC,KAAK,KAAK,GAAG,wCAAkB,oCAAc;QAClD,KAAK,GAAG,GAAG;QACX,KAAK,IAAI,GAAG;IACd;IAEA,aAAa,IAAqB,EAAW;QAC3C,OAAO,KAAK,GAAG,KAAK;IACtB;IAEA,eAAe,IAAqB,EAAU;QAC5C,OAAO,KAAK,CAAC,eAAe,kCAAY;IAC1C;IAEA,cAAc,IAAqB,EAAU;QAC3C,OAAO,KAAK,GAAG,KAAK,kBAAkB,OAAO,OAAO;IACtD;;QAlCK,qBACL,aAAiC,MAAO,oBAAoB;;;AAkC9D;AAEA,SAAS,kCAAY,IAAqB;IACxC,IAAI,CAAC,KAAK,KAAK,GAAG,CAAA,GAAA,yCAAe,EAAE,oCAAc;IACjD,OAAO,IAAI,CAAA,GAAA,yCAAW,EACpB,KACA,MACA,KAAK,KAAK,EACV,KAAK,GAAG;AAEZ","sources":["packages/@internationalized/date/src/calendars/TaiwanCalendar.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, CalendarIdentifier} from '../types';\nimport {CalendarDate} from '../CalendarDate';\nimport {fromExtendedYear, getExtendedYear, GregorianCalendar} from './GregorianCalendar';\nimport {Mutable} from '../utils';\n\nconst TAIWAN_ERA_START = 1911;\n\nfunction gregorianYear(date: AnyCalendarDate) {\n return date.era === 'minguo'\n ? date.year + TAIWAN_ERA_START\n : 1 - date.year + TAIWAN_ERA_START;\n}\n\nfunction gregorianToTaiwan(year: number): [string, number] {\n let y = year - TAIWAN_ERA_START;\n if (y > 0) {\n return ['minguo', y];\n } else {\n return ['before_minguo', 1 - y];\n }\n}\n\n/**\n * The Taiwanese calendar is the same as the Gregorian calendar, but years\n * are numbered starting from 1912 (Gregorian). Two eras are supported:\n * 'before_minguo' and 'minguo'.\n */\nexport class TaiwanCalendar extends GregorianCalendar {\n identifier: CalendarIdentifier = 'roc'; // Republic of China\n\n fromJulianDay(jd: number): CalendarDate {\n let date = super.fromJulianDay(jd);\n let extendedYear = getExtendedYear(date.era, date.year);\n let [era, year] = gregorianToTaiwan(extendedYear);\n return new CalendarDate(this, era, year, date.month, date.day);\n }\n\n toJulianDay(date: AnyCalendarDate): number {\n return super.toJulianDay(toGregorian(date));\n }\n\n getEras(): string[] {\n return ['before_minguo', 'minguo'];\n }\n\n balanceDate(date: Mutable<AnyCalendarDate>): void {\n let [era, year] = gregorianToTaiwan(gregorianYear(date));\n date.era = era;\n date.year = year;\n }\n\n isInverseEra(date: AnyCalendarDate): boolean {\n return date.era === 'before_minguo';\n }\n\n getDaysInMonth(date: AnyCalendarDate): number {\n return super.getDaysInMonth(toGregorian(date));\n }\n\n getYearsInEra(date: AnyCalendarDate): number {\n return date.era === 'before_minguo' ? 9999 : 9999 - TAIWAN_ERA_START;\n }\n}\n\nfunction toGregorian(date: AnyCalendarDate) {\n let [era, year] = fromExtendedYear(gregorianYear(date));\n return new CalendarDate(\n era,\n year,\n date.month,\n date.day\n );\n}\n"],"names":[],"version":3,"file":"TaiwanCalendar.module.js.map"}
@@ -0,0 +1,21 @@
'use strict';
require('../auto');
var test = require('tape');
var supportsDescriptors = require('define-properties').supportsDescriptors;
var isEnumerable = Object.prototype.propertyIsEnumerable;
var runTests = require('./tests');
test('shimmed', function (t) {
t.test('enumerability', { skip: !supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Function.prototype, 'name'), 'Function#name is not enumerable');
et.equal(false, isEnumerable.call(function foo() {}, 'name'), 'a function’s name is not enumerable');
et.end();
});
runTests(function (fn) { return fn.name; }, t);
t.end();
});
@@ -0,0 +1,13 @@
import {
inputOtp
} from "../chunk-PTQZLHJA.mjs";
import "../chunk-CWYZ2GEH.mjs";
import "../chunk-GQT3YUX3.mjs";
import "../chunk-46U6G7UJ.mjs";
import "../chunk-DGTYPKBN.mjs";
import "../chunk-UWE6H66T.mjs";
import "../chunk-GIXI35A3.mjs";
import "../chunk-GH5E4FQB.mjs";
export {
inputOtp
};
@@ -0,0 +1,35 @@
import test from 'tape';
import { generateObjSchema, arraySchema, enumArraySchema } from '../../../src/util/schemas';
test('schemas', (t) => {
t.test('should generate an object schema with correct properties', (st) => {
const schema = generateObjSchema({
foo: 'bar',
baz: arraySchema,
});
const properties = schema.properties || {};
st.deepEqual(properties.foo, properties.foo, 'bar');
st.deepEqual(properties.baz.type, 'array');
st.end();
});
t.deepEqual(
enumArraySchema(),
{
additionalItems: false,
items: {
enum: [],
type: 'string',
},
minItems: 0,
type: 'array',
uniqueItems: true,
},
'enumArraySchema works with no arguments',
);
t.end();
});
@@ -0,0 +1 @@
{"name":"clsx","version":"2.1.1","requiresBuild":false,"files":{"license":{"checkedAt":1794532106291,"integrity":"sha512-i6YIwLi6LAoHlfXiVTw43Q0ZiRcQCv1FNCkjUPIILCoCba1PT0oTfRnGgTrRQOWMjj2ip9gQjPNEajOmCbYNyQ==","mode":420,"size":1104},"dist/clsx.js":{"checkedAt":1794532106291,"integrity":"sha512-MCcel7voL0j9CF48Fv88SOKX1XaUfSmcwu1u7b66uEBCLP7NOkSgAQ++jcMVKGIukQOx+1qa/xve/XoC8a47tA==","mode":420,"size":397},"dist/clsx.min.js":{"checkedAt":1794532106291,"integrity":"sha512-eoSOQgTpbUQTkG7JnJMeUjYRvit8udLVhyqZgD2LLlrc3B9tSVVuj9ZnnDpIuuCfhr8el4v9u8xuxqnOZjSmcA==","mode":420,"size":543},"dist/lite.js":{"checkedAt":1794532106291,"integrity":"sha512-rddzE1jSOoYTvZQa9OhiA17AGnHVG61p3C7r/WjA+bP8efFDpedqFlCTpifehjzySIzkzAfnDa/EDz9S4+7VYA==","mode":420,"size":161},"package.json":{"checkedAt":1794532106291,"integrity":"sha512-3g/XooMVasY9FJVvt1hJQDN8fAv54oLbB9Bf2dYH59zx8+F/6dlhd4SoKgiGsYYhMs2bzceRSUL+WcMm/5QvrA==","mode":420,"size":1192},"readme.md":{"checkedAt":1794532106291,"integrity":"sha512-CI8zXOtnMMD9ywgWwSuHxg5KefOVZn6oQ+y8CDupj06G7/zcR7HdSLmWdfhvCaniOFXXNO1RhEJjdEtK5mpDJg==","mode":420,"size":4003},"dist/clsx.mjs":{"checkedAt":1794532106292,"integrity":"sha512-YCjhl3gRHUilTKKZiwIOjtvKsNQQwXk6isEb/qHyJXQAJnjGj4GEWuJRBq6w/byDKsRm0k/Xr80PPRAO1glYPg==","mode":420,"size":388},"dist/lite.mjs":{"checkedAt":1794532106292,"integrity":"sha512-SyfgtQBHwTPnfcxzRRlyQP/K7oGI1+JajCvGpSeY0dLck1Lj9D8axB2Cg/MRvuO8QPHFmUjMYL3LbZVsyGdw+g==","mode":420,"size":152},"clsx.d.mts":{"checkedAt":1794532106292,"integrity":"sha512-zHFmFwvJdXzWKkGiB9nQKLxk0fOTSy3aPiQGkfKJZmawtBUoNkvWTglfZgcBwxhDZ20FB3RyWhLX+TbIBe6Ycg==","mode":420,"size":278},"clsx.d.ts":{"checkedAt":1794532106292,"integrity":"sha512-k64AmsaziPujXM4o7lR6XR1lDwlabfMsG9TaZg2wpAv1pxBSY66agA/LJ7DSqwCsorWDhxbw1woG2doJxRyKqA==","mode":420,"size":337}}}
@@ -0,0 +1,11 @@
SHELL := /bin/bash
test:
@./test/run.js
release:
git push
git push --tags
npm publish .
.PHONY: test
@@ -0,0 +1,26 @@
import { css, styled } from 'goober';
/**
* CSS Global function to declare global styles
* @type {Function}
*/
export let glob = css.bind({ g: 1 });
/**
* Creates the global styles component to be used as part of your tree.
* @returns {Function}
*/
export function createGlobalStyles() {
const fn = styled.call({ g: 1 }, 'div').apply(null, arguments);
/**
* This is the actual component that gets rendered.
*/
return function GlobalStyles(props) {
// Call the above styled.
fn(props);
// Returns a hole.
return null;
};
}
@@ -0,0 +1,789 @@
{
"lang": "eu",
"rules": {
"accesskeys": {
"description": "Accesskey atributurako balio bakoitza bakarra dela bermatzen du",
"help": "Accesskey atributuaren balioak bakarra izan behar du"
},
"area-alt": {
"description": "Irudi-mapetako <area> elementuek ordezko testua dutela bermatzen du",
"help": "<area> elementu aktiboek ordezko testua izan behar dute"
},
"aria-allowed-attr": {
"description": "ARIA atributuak elementu baten rolerako baimenduta daudela bermatzen du",
"help": "Elementuek atributu ARIA baimenduak baino ez dituzte erabili behar"
},
"aria-allowed-role": {
"description": "rol atributuak elementuarentzat balio egokia duela bermatzen du",
"help": "ARIA role egokia izan behar da elementuarentzat"
},
"aria-hidden-body": {
"description": "Bermatzen du aria-hidden = 'true' ez dagoela dokumentuaren 'body'an.",
"help": "aria-hidden = 'true' ez da dokumentuaren 'body'an egon behar"
},
"aria-hidden-focus": {
"description": "Bermatzen du 'aria-hidden' elementuek ez dutela fokua onartzen duen elementurik",
"help": "'ARIA hidden' elementuek ez dute fokua onartzen duen elementurik izan behar"
},
"aria-input-field-name": {
"description": "Bermatzen du 'ARIA input field' bakoitzak izen irisgarria duela",
"help": "'ARIA input fields' ek izen erabilerraza dute"
},
"aria-required-attr": {
"description": "Bermatzen du 'ARIA role' duten elementuek eskatzen diren atributu guztiak dituztela",
"help": "Eskatzen diren ARIA atributuak eman behar dira"
},
"aria-required-children": {
"description": "Bermatzen du 'ARIA role' bat duten eta 'child rol' bat behar duten elementuek",
"help": "Zenbait 'ARIA rolak' seme jakin batzuk izan behar dituzte"
},
"aria-required-parent": {
"description": "Bermatzen du 'ARIA role' bat duten eta 'parent rol'ak eskatzen dituzten elementuak haietan jasota daudela",
"help": "Zenbait 'ARIA rol' aita jakin batzuengan eduki behar dira"
},
"aria-roles": {
"description": "Role atributua duten elementu guztiek balio balioduna erabiltzen dutela bermatzen du",
"help": "Erabilitako 'ARIA rol'ek baliozko balioetarako baldintzak bete behar dituzte"
},
"aria-toggle-field-name": {
"description": "Bermatzen du 'ARIA toggle field' bakoitzak izen irisgarria duela",
"help": "'ARIA toggle fields'ek izen erabilerraza dute"
},
"aria-valid-attr-value": {
"description": "Atributu ARIA guztiek balio baliodunak dituztela bermatzen du",
"help": "ARIA Atributuek baliozko balioetarako baldintzak bete behar dituzte"
},
"aria-valid-attr": {
"description": "aria-z hasten diren atributuak baliozko atributu ARIA direla bermatzen du",
"help": "ARIA atributuek izen baliodunen baldintzak bete behar dituzte"
},
"audio-caption": {
"description": "<audio> elementuek azpitituluak dituztela bermatzen du",
"help": "<audio> elementuek azpititulu-pista bat izan behar dute"
},
"autocomplete-valid": {
"description": "autocomplete atributua formulario-eremurako zuzena eta egokia dela bermatzea",
"help": "autocomplete atributua behar bezala erabili behar da"
},
"avoid-inline-spacing": {
"description": "style atributuen bidez ezarritako testu-tartea estilo-orri pertsonalizatuekin doitu daitekeela bermatzea",
"help": "'inline' testu-tartea doitu egin behar da, estilo-orri pertsonalizatuen bidez."
},
"blink": {
"description": "Bermatzen du ez direla <blink> elementuak erabiltzen",
"help": "<blink> elementuak zaharkituta daude eta ez dira erabili behar"
},
"button-name": {
"description": "Botoiek testu bereizgarria dutela bermatzen du",
"help": "Botoiek testu bereizgarria izan behar dute"
},
"bypass": {
"description": "Orrialde bakoitzak gutxienez bitarteko bat duela bermatzen du, erabiltzaile batek nabigazioa gainditu eta edukira zuzenean pasatzeko aukera izan dezan",
"help": "Orriek bloke errepikatuak saltatzeko baliabideak izan behar dituzte"
},
"color-contrast": {
"description": "Lehen planoko eta hondoko koloreen arteko kontrasteak WCAG 2 AA kontrasterako ratioaren mugak betetzen dituela bermatzen du.",
"help": "Elementuek kolore-kontraste nahikoa izan behar dute"
},
"color-contrast-enhanced": {
"description": "Lehen planoko eta hondoko koloreen arteko kontrasteak WCAG 2 AAA kontrasterako ratioaren mugak betetzen dituela bermatzen du.",
"help": "Elementuek kolore-kontraste nahikoa izan behar dute"
},
"css-orientation-lock": {
"description": "Bermatzen du edukia ez dagoela blokeatuta pantailako orientazio espezifiko batean, eta edukia maneiagarria dela pantailako edozein orientabidetan.",
"help": "'CSS Media query'ak ez dira erabiltzen pantailaren orientazioa blokeatzeko "
},
"definition-list": {
"description": "<dl> elementuak behar bezala egituratuta daudela bermatzen du",
"help": "<dl> elementuek zuzenean eduki behar dituzte <dt> eta <dd> multzoak , behar bezala ordenatuta , edo <script> edo <tenplate> elementuak"
},
"dlitem": {
"description": "Bermatzen du <dt> eta <dd> elementuak <dl> batean daudela.",
"help": "<dt> eta <dd> elementuek < dl> batean egon behar dute"
},
"document-title": {
"description": "HTML dokumentu bakoitzak <title> hutsik ez duen elementu bat duela bermatzen du",
"help": "Dokumentuek <title> elementuak izan behar dituzte nabigazioan laguntzeko"
},
"duplicate-id-active": {
"description": "Elementu aktiboen id atributurako balio bakoitza bakarra dela bermatzen du",
"help": "Elementu aktiboen 'ID'ak bakarrak izan behar dira"
},
"duplicate-id-aria": {
"description": "ARIAn eta 'label'etan erabilitako id atributuaren balio bakoitza bakarra dela bermatzen du",
"help": "ARIA eta labelet-an erabiltzen diren 'ID'ak bakarrak izan behar dira"
},
"duplicate-id": {
"description": "id atributurako balio bakoitza bakarra dela bermatzen du",
"help": "id atributuaren balioak bakarra izan behar du"
},
"empty-heading": {
"description": "Goiburuek testu bereizgarria dutela bermatzen du",
"help": "Goiburuak ez dira hutsik egon behar"
},
"focus-order-semantics": {
"description": "Foku ordenako elementuek rol egokia dutela bermatzen du",
"help": "Foku ordenako elementuek rol egokia behar dute eduki interaktiborako"
},
"form-field-multiple-labels": {
"description": "Formulario-eremuak label elementu ugari ez dituela bermatzen du",
"help": "Formulario-eremuak ez du label elementu ugari izan behar"
},
"frame-tested": {
"description": "Bermatzen du <iframe> eta <frame> elementuek axe-core scripta dutela",
"help": "Markoak axe-core bidez probatu behar dira"
},
"frame-title-unique": {
"description": "Bermatzen du <iframe> eta <frame> elementuek izenburu bakarreko atributua dutela",
"help": "Markoek title atributu bakarra izan behar dute"
},
"frame-title": {
"description": "Bermatzen du <iframe> eta <frame> elementuek hutsik ez dagoen izenburuaren atributua dutela",
"help": "Markoek title atributua izan behar dute"
},
"heading-order": {
"description": "Goiburuen ordena semantikoki zuzena dela bermatzen du",
"help": "Goiburuen maila soilik 1 gehitu beharko litzateke"
},
"hidden-content": {
"description": "Erabiltzaileei ezkutuko edukiari buruzko informazioa ematen die.",
"help": "Orriaren ezkutuko edukia ezin da aztertu"
},
"html-has-lang": {
"description": "HTML dokumentu bakoitzak lang atributu bat duela bermatzen du",
"help": "<html> elementuak lang atributua izan behar du"
},
"html-lang-valid": {
"description": "Bermatzen du <html> elementuaren lang atributuak balio balioduna duela",
"help": "<html> elementuak balio balioduna izan behar du lang atributurako"
},
"html-xml-lang-mismatch": {
"description": "Lang zein xml:lang atributuak dituzten HTML elementuetan orrialdearen oinarrizko hizkuntzan komunztadura dagoela bermatzea",
"help": "lang eta xml:lang duten HTML elementuek oinarrizko hizkuntza bera izan behar dute"
},
"image-alt": {
"description": "Bermatzen du <img> elementuek ordezko testua edo none edo presentation rola dutela",
"help": "Irudiek ordezko testua izan behar dute"
},
"image-redundant-alt": {
"description": "Bermatzen du irudiaren alternatiba ez dela testu gisa errepikatuko",
"help": "Irudien testu alternatiboa ez da testu gisa errepikatu behar"
},
"input-button-name": {
"description": "'input button'ek testu bereizgarria dutela bermatzea",
"help": "'input button'ek testu bereizgarria izan behar dute"
},
"input-image-alt": {
"description": "Bermatzen du <input type =\"image\" > elementuek ordezko testua dutela",
"help": "'image buttons'ek testu alternatiboa izan behar dute"
},
"label-content-name-mismatch": {
"description": "Bere edukiaren bidez etiketatutako elementuetan, bere testu ikusgarriak bere izen irisgarriaren parte izan behar duela bermatzen du.",
"help": "Elementuek beren testua ikusgai izan behar dute, beren izenaren zati irisgarri gisa."
},
"label-title-only": {
"description": "Bermatzen du inprimakiko elementu bakoitza ez dagoela etiketatuta title edo aria-describedby atributuen bidez soilik.",
"help": "Formularioko elementuek etiketa bat izan behar dute ikusgai"
},
"label": {
"description": "Formularioko elementu bakoitzak etiketa bat duela bermatzen du",
"help": "Formularioko elementuek etiketak izan behar dituzte"
},
"landmark-banner-is-top-level": {
"description": "Banner erreferentzia-puntua goiko mailan dagoela bermatzen du",
"help": "Banner erreferentzia-puntuak ez du beste erreferentzia-puntu batean egon behar"
},
"landmark-complementary-is-top-level": {
"description": "Erreferentzia-puntu osagarria edo asidea goiko mailan dagoela bermatzen du ",
"help": "aside-k ez du beste erreferentzia-puntu batean egon behar"
},
"landmark-contentinfo-is-top-level": {
"description": "contentinfo erreferentzia-puntua goiko mailan dagoela bermatzen du",
"help": "contentinfo erreferentzia-puntuak ez du beste erreferentzia-puntu batean egon behar"
},
"landmark-main-is-top-level": {
"description": "Main erreferentzia puntua goi mailan dagoela bermatzen du",
"help": "main erreferentzia-puntuak ez du beste erreferentzia-puntu batean egon behar"
},
"landmark-no-duplicate-banner": {
"description": "Dokumentuak, gehienez ere, banner erreferentzia-puntu bat duela bermatzen du",
"help": "Dokumentuak ezin du banner erreferentzia-puntu bat baino gehiago izan"
},
"landmark-no-duplicate-contentinfo": {
"description": "Dokumentuak, gehienez ere, contentinfo erreferentzia-puntu bat duela bermatzen du",
"help": "Dokumentuak ez du izan behar contentinfo erreferentzia-puntu bat baino gehiago"
},
"landmark-one-main": {
"description": "Bermatzen du dokumentuak main erreferentzia-puntu bakarra duela, eta orrialdean sartutako esparru bakoitzak, gehienez ere, main erreferentzia-puntu bat duela.",
"help": "Dokumentuak main erreferentzia-puntu bat izan behar du"
},
"landmark-unique": {
"help": "Erreferentziazko puntuak bakarrak direla bermatzen du",
"description": "Erreferentzia-puntuek role edo role/label/title konbinazio bakarra izan behar dute (hau da, izen irisgarri bakarra)"
},
"link-in-text-block": {
"description": "Estekak kolorearen menpe egon gabe bereiz daitezke",
"help": "Estekak ondoko testutik bereizi behar dira, kolorearen menpe ez dagoen bitarteko batez."
},
"link-name": {
"description": "Estekek testu bereizgarria dutela bermatzen du",
"help": "Estekek testu bereizgarria izan behar dute"
},
"list": {
"description": "Zerrendak behar bezala egituratuta daudela bermatzen du",
"help": "<ul> eta <ol> zuzenean <li>, < script> edo < template> elementuak izan behar dituzte"
},
"listitem": {
"description": "<li> elementuak semantikoki erabiltzen direla bermatzen du",
"help": "< li> elementuek < ul> edo < ol> batean egon behar dute"
},
"marquee": {
"description": "Bermatzen du ez dela elementurik erabiltzen <marquee>",
"help": "<marquee> elementuak zaharkituta daude eta ez dira erabili behar"
},
"meta-refresh": {
"description": "Bermatzen du ez dela erabiltzen <meta http-equiv =\"refresh\" >",
"help": "Programatutako freskagarriak ez du egon behar"
},
"meta-viewport-large": {
"description": "Bermatzea <meta name =\"viewport\" > maila esanguratsuan zabal daitekeela",
"help": "Erabiltzaileek zooma egiteko eta testua %500era arte zabaltzeko aukera izan behar dute"
},
"meta-viewport": {
"description": "Bermatzen du <meta name =\"viewport\" > ez duela eragozten testua zabaltzea eta zooma egitea",
"help": "Zooma eta handitzea ez dira eragotzi behar"
},
"object-alt": {
"description": "Bermatzen du <object> elementuek ordezko testua dutela",
"help": "<object> elementuek testu alternatiboa izan behar dute"
},
"p-as-heading": {
"description": "p elementuak goiburuak diseinatzeko erabiltzen ez direla bermatzea",
"help": "Ez da letra lodiz, letra etzanez edo letra-iturri tamainaz idatzitako testurik erabiltzen p elementuei goiburu-estiloa emateko."
},
"page-has-heading-one": {
"description": "Orrialdeak, edo gutxienez bere esparruetako batek, 1. mailako goiburu bat duela bermatzea",
"help": "Orrialdeak 1. mailako goiburu bat izan behar du"
},
"region": {
"description": "Orrialdeko eduki guztia erreferentzia-puntuetan sartuta dagoela bermatzen du.",
"help": "Orrialdeko eduki guztiak erreferentzia-puntuetan sartuta egon behar du"
},
"role-img-alt": {
"description": "Elementuek [role = 'img'] testu alternatiboa dutela bermatzen du",
"help": "[role = 'img'] elementuek testu alternatibo bat dute"
},
"scope-attr-valid": {
"description": "scope atributua tauletan behar bezala erabiltzen dela bermatzen du",
"help": "Scope atributua behar bezala erabili beharko litzateke"
},
"scrollable-region-focusable": {
"description": "Bertikalki mugi daitekeen edukia duten elementuak ('scroll' formatuan) teklatuaren bidez eskuratu ahal izango lirateke.",
"help": "Joan-etorri bertikaleko eremuak ('scroll') teklatu bidezko sarbidea duela ziurtatzea"
},
"server-side-image-map": {
"description": "Zerbitzariaren aldeko irudi-maparik ez dela erabiltzen bermatzen du.",
"help": "Ez dira erabili behar zerbitzariaren aldeko irudi-mapak"
},
"skip-link": {
"description": "Salto-esteka guztiek ('skip') fokua onartzen duen helmuga dutela bermatzea",
"help": "Jauziko loturaren ('skip') helmugak egon beharko luke eta fokua onartu"
},
"tabindex": {
"description": "tabindex atributuaren balioak 0 baino handiagoak ez direla bermatzen du",
"help": "Elementuek ez lukete 0 baino tabindex handiagoa izan behar"
},
"table-duplicate-name": {
"description": "Taulek summary eta caption bera ez dutela bermatzea",
"help": "<caption> elementuak ez luke summary atributuaren testu bera izan behar"
},
"table-fake-caption": {
"description": "Titulua duten taulek <caption> elementua erabiltzen dutela bermatzea.",
"help": "Datuen edo goiburuen gelaxkak ez lirateke erabili behar datu-taula bati izenburua emateko."
},
"td-has-header": {
"description": "Taula handi batean hutsik ez dagoen datu-gelaxka bakoitzak taula-goiburu bat edo gehiago dituela bermatzea",
"help": "3 bider 3 baino taula handiagoko td elementu ez huts guztiek lotutako taula-goiburu bat izan behar dute"
},
"td-headers-attr": {
"description": "Taula bateko goiburuak erabiltzen dituen gelaxka bakoitzak taula horretako beste gelaxka bati erreferentzia egiten diola bermatzea",
"help": "headers atributua erabiltzen duten elementu table baten gelaxka guztiek taula bereko beste gelaxka batzuei bakarrik egin behar diete erreferentzia"
},
"th-has-data-cells": {
"description": "Datu-taula bateko taula-goiburu bakoitzak datu-gelaxkak aipatzen dituela bermatzea",
"help": "th eta 'role = columnheader/rowheader 'duten elementu guztiek deskribatzen duten datu-gelaxkak izan behar dituzte:"
},
"valid-lang": {
"description": "lang atributuek balio baliodunak dituztela bermatzen du",
"help": "lang atributuak balio balioduna izan behar du"
},
"video-caption": {
"description": "Bermatzen du <video> elementuek azpitituluak dituztela",
"help": "<bideo> elementuek azpitituluak izan behar dituzte"
}
},
"checks": {
"abstractrole": {
"pass": "Ez dira 'abstract rolak' erabiltzen",
"fail": "'abstract rolak 'ezin dira zuzenean erabili"
},
"aria-allowed-attr": {
"pass": "ARIA atributuak behar bezala erabiltzen dira zehaztutako rolerako",
"fail": {
"singular": "ARIAn, atributuak ez daude baimenduta : ${data.values}",
"plural": "ARIAn, atributua ez dago baimenduta : ${data.values}"
}
},
"aria-allowed-role": {
"pass": "ARIA rola baimenduta dago emandako elementurako",
"fail": {
"singular": "ARIAn, rolak ${data.values} -ak ez daude baimenduta emandako elementurako",
"plural": "ARIAn, rola ${data.values} -a ez dago baimenduta emandako elementurako"
},
"incomplete": {
"singular": "AREAN, rolak kendu behar dira ${data.values} elementua ikusgai egiten denean, zeren elementurako ez daude baimenduta",
"plural": "AREAN, rola kendu behar da ${data.values} elementua ikusgai egiten denean, zeren elementurako ez dago baimenduta"
}
},
"aria-hidden-body": {
"pass": "Ez dago dokumentuko 'body'ean agertzen den aria-hidden atributurik",
"fail": "aria-hidden = true ez da dokumentuaren 'body'ean egon behar"
},
"aria-errormessage": {
"pass": "Teknika onartu bat erabiltzen du aria-errormessagerako",
"fail": {
"singular": "aria-errormessagen, bailioaes ${data.values}`, mezua iragartzeko teknika bat erabili behar da (adibidez: aria-live, aria-describedby, role = alert, etab.).",
"plural": "aria-errormessagen, bailioa ${data.values}`, mezua iragartzeko teknika bat erabili behar da (adibidez: aria-live, aria-describedby, role = alert, etab.)."
}
},
"has-widget-role": {
"pass": "Elementuak widget rola du.",
"fail": "Elementuak ez du widget rolik."
},
"invalidrole": {
"pass": "ARIA rola baliozkoa da",
"fail": "Rolak baliozko ARIA rola izan behar du"
},
"no-implicit-explicit-label": {
"pass": "Ez dago desadostasunik <label> baten eta izen irisgarriaren artean",
"incomplete": "Egiaztatu < label> zenbakiak ez duela zertan ARIAren ${data} parte izan eremuaren izenerako"
},
"aria-required-attr": {
"pass": "ARIA atributu guztiak daude",
"fail": {
"singular": "Eskatutako atributuak ez daude: ${data.values}",
"plural": "Eskatutako atributua ez dago: ${data.values}"
}
},
"aria-required-children": {
"pass": {
"default": "Eskatutako ARIA semeak bertan daude"
},
"fail": {
"singular": "Esktatutako ARIARren semeak ez daude : ${data.values}",
"plural": "Esktatutako ARIARren semeaez dago : ${data.values}"
},
"incomplete": {
"singular": "ARIA rola semeentzako: ${data.values}",
"plural": "ARIA rola semearentzako: ${data.values}"
}
},
"aria-required-parent": {
"pass": "ARIAn eskatzen den aitaren rola bertan dago",
"fail": {
"singular": "ARIAn eskatutako aitentzako rola ez dago: ${data.values}",
"plural": "ARIAn eskatutako aitarentzako rola ez dago: ${data.values}"
}
},
"aria-unsupported-attr": {
"pass": "ARIA atributua onartuta dago",
"fail": "ARIA atributua ez dago oso onartuta pantaila-irakurgailuetan eta laguntza-teknologietan: ${data.values}"
},
"unsupportedrole": {
"pass": "ARIA rola onartuta dago",
"fail": "Erabilitako rola ez dago oso onartuta pantaila-irakurgailuetan eta laguntza-teknologietan: ${data.values}"
},
"aria-valid-attr-value": {
"pass": "ARIA atributuen balioak baliozkoak dira",
"fail": {
"singular": "Balioak ez dira baliozkoak ARIA atributorako: ${data.values}",
"plural": "Balioa ez da baliozkoa ARIA atributorako: ${data.values}"
},
"incomplete": {
"singular": "Elementuen atributua ARIA ID ez dago orrian: ${data.values}",
"plural": "Elementuaren atributua ARIA ID ez dago orrian: ${data.values}"
}
},
"aria-valid-attr": {
"pass": {
"singular": "Baliozko ARIA atributuen izenak",
"plural": "Baliozko ARIA atributuen izena"
},
"fail": {
"singular": "Baliogabeko ARIA atributuen izenak: ${data.values}",
"plural": "Baliogabeko ARIA atributuen izenak: ${data.values}"
}
},
"valid-scrollable-semantics": {
"pass": "Elementuak semantika balioduna du foku-ordenan dagoen elementu batentzat.",
"fail": "Elementuak foku-ordenan dagoen elementu batentzat baliozkoa ez den semantika bat du.."
},
"color-contrast": {
"pass": "Elementuak ${data.contrastRatio}-ko kolore-kontraste nahikoa du",
"fail": "Elementuaren ${data.contrastRatio}-ko kolore-kontrastea ez da nahikoa (ehen planoaren kolorea: ${data.fgColor}, hondoaren kolorea: ${data.bgColor}, letra-iturriaren tamaina: ${data.fontSize}, letra-iturriaren lodiera: ${data.fontWeight}). Espero den kontraste-ratioa: ${data.expectedContrastRatio}",
"incomplete": {
"bgImage": "Elementuaren hondoko kolorea ezin izan da zehaztu, hondoko irudi batengatik",
"bgGradient": "Elementuaren hondoko kolorea ezin izan da zehaztu hondoko degradatu baten ondorioz",
"imgNode": "Elementuaren hondoaren kolorea ezin izan da zehaztu, elementuak irudi-nodo bat duelako.",
"bgOverlap": "Hondoko kolorea ezin izan da zehaztu, gainjarritako beste elementu bat duelako",
"fgAlpha": "Hondoko kolorea ezin izan da zehaztu alfa gardentasun baten ondorioz",
"elmPartiallyObscured": "Hondoaren kolorea ezin izan da zehaztu, beste elementu batek partzialki ezkutatzen duelako",
"elmPartiallyObscuring": "Elementuaren hondoaren kolorea ezin izan da zehaztu, beste elementu batzuei partzialki gainjartzen baitzaie.",
"outsideViewport": "Elementuaren hondoko kolorea ezin izan da zehaztu, leiho grafikotik kanpo dagoelako ('viewport')",
"equalRatio": "Elementuak 1:1 kontraste-ratioa du hondoarekin",
"shortTextContent": "Elementuaren edukia laburregia da testu-edukia bera den zehazteko",
"default": "Ezinezkoa da kontraste-ratioa zehaztea"
}
},
"color-contrast-enhanced": {
"pass": "Elementuak ${data.contrastRatio}-ko kolore-kontraste nahikoa du",
"fail": "Elementuaren ${data.contrastRatio}-ko kolore-kontrastea ez da nahikoa (ehen planoaren kolorea: ${data.fgColor}, hondoaren kolorea: ${data.bgColor}, letra-iturriaren tamaina: ${data.fontSize}, letra-iturriaren lodiera: ${data.fontWeight}). Espero den kontraste-ratioa: ${data.expectedContrastRatio}",
"incomplete": {
"bgImage": "Elementuaren hondoko kolorea ezin izan da zehaztu, hondoko irudi batengatik",
"bgGradient": "Elementuaren hondoko kolorea ezin izan da zehaztu hondoko degradatu baten ondorioz",
"imgNode": "Elementuaren hondoaren kolorea ezin izan da zehaztu, elementuak irudi-nodo bat duelako.",
"bgOverlap": "Hondoko kolorea ezin izan da zehaztu, gainjarritako beste elementu bat duelako",
"fgAlpha": "Hondoko kolorea ezin izan da zehaztu alfa gardentasun baten ondorioz",
"elmPartiallyObscured": "Hondoaren kolorea ezin izan da zehaztu, beste elementu batek partzialki ezkutatzen duelako",
"elmPartiallyObscuring": "Elementuaren hondoaren kolorea ezin izan da zehaztu, beste elementu batzuei partzialki gainjartzen baitzaie.",
"outsideViewport": "Elementuaren hondoko kolorea ezin izan da zehaztu, leiho grafikotik kanpo dagoelako ('viewport')",
"equalRatio": "Elementuak 1:1 kontraste-ratioa du hondoarekin",
"shortTextContent": "Elementuaren edukia laburregia da testu-edukia bera den zehazteko",
"default": "Ezinezkoa da kontraste-ratioa zehaztea"
}
},
"link-in-text-block": {
"pass": "Estekak ondoko testuarekiko bereiz daitezke, koloretik kanpo",
"fail": "Alboko testuarekiko loturak koloretik kanpo bereizi behar dira",
"incomplete": {
"bgContrast": "Ezin izan da elementuaren kontraste-ratioa zehaztu. Hover/focus estilo desberdina dagoen egiaztatzea",
"bgImage": "Elementuaren kontraste-ratioa ezin izan da zehaztu, hondoko irudi batengatik",
"bgGradient": "Elementuaren kontraste-ratioa ezin izan da zehaztu hondoko degradatu baten ondorioz",
"imgNode": "Elementuaren kontraste-ratioa ezin izan da zehaztu, elementuak irudi-nodo bat duelako.",
"bgOverlap": "Elementuaren kontraste-ratioa ezin izan da zehaztu elementuen gainjartzeagatik",
"default": "Ezinezkoa da kontraste-ratioa zehaztea"
}
},
"autocomplete-appropriate": {
"pass": "autocompleteren balioa elementu egoki batean dago",
"fail": "autocompleteren balioa ez da egokia input mota horretarako"
},
"autocomplete-valid": {
"pass": "autocompleteren atributua behar bezala formateatuta dago",
"fail": "autocompleteren atributua gaizki formateatuta dago"
},
"accesskeys": {
"pass": "Accesskey atributuaren balioa bakarra da",
"fail": "Dokumentuak elementu ugari ditu accesskey berarekin"
},
"focusable-content": {
"pass": "Elementuak fokua onartzen duten elementuak ditu",
"fail": "Elementuak fokua onartzen duen edukia izan beharko luke"
},
"focusable-disabled": {
"pass": "Elementuaren barruan ez dago fokua onartzen duen elementurik",
"fail": "Fokuak onartzen duen edukia desaktibatu edo ezabatu egin beharko litzateke"
},
"focusable-element": {
"pass": "Elementuak fokua onartzen du",
"fail": "Elementuak fokua onartu beharko luke"
},
"focusable-no-name": {
"pass": "Elementua ez dago tabulazio-ordenan edo testu irisgarria du",
"fail": "Elementua tabulazio-ordenan dago eta ez du testu eskuragarririk"
},
"focusable-not-tabbable": {
"pass": "Elementuaren barruan ez dago fokua onartzen duen elementurik",
"fail": "Fokuak onartzen duen edukiak tabindex = '-1' izan beharko luke edo DOMetik ezabatu beharko litzateke"
},
"landmark-is-top-level": {
"pass": "${data.role} erreferentzia-puntua goiko mailan dago",
"fail": "${data.role} erreferentzia-puntua beste erreferentzia-puntu batean dago."
},
"page-has-heading-one": {
"pass": "Orrialdeak 1. mailako goiburu bat du, gutxienez.",
"fail": "Orrialdeak 1. mailako goiburu bat izan behar du"
},
"page-has-main": {
"pass": "Dokumentuak gutxienez main erreferentzia-puntu bat du",
"fail": "Dokumentuak ez du main erreferentzia-punturik"
},
"page-no-duplicate-banner": {
"pass": "Dokumentuak banner erreferentzia-puntu bat baino ez du",
"fail": "Dokumentuak banner erreferentzia-puntu bat baino gehiago du"
},
"page-no-duplicate-contentinfo": {
"pass": "Dokumentuak contentinfo erreferentzia-puntu bat baino ez du",
"fail": "Dokumentuak contentinfo erreferentzia-puntu bat baino gehiago du"
},
"page-no-duplicate-main": {
"pass": "Dokumentuak ez du main erreferentzia-puntu bat baino gehiago",
"fail": "Dokumentuak main erreferentzia-puntu bat baino gehiago du"
},
"tabindex": {
"pass": "Elementuak ez du 0 baino tabindex handiagoa",
"fail": "Elementuak 0 baino tabindex handiagoa du"
},
"alt-space-value": {
"pass": "Elementuak balio balioduna du alt atributurako",
"fail": "Elementuak espazio-karaktere bat soilik duen alt atributua du, pantaila-irakurgailu guztiek alde batera uzten ez dutena."
},
"duplicate-img-label": {
"pass": "Elementuak ez du bikoizten < img>-ren testu alternatiboan dagoen testua.",
"fail": "Elementuak <img> elementu bat dauka, lehendik dagoen testua bikoizten duen testu alternatiboarekin"
},
"explicit-label": {
"pass": "Formularioko elementuak <label> dauka ",
"fail": "Formularioko elementuak ez dauka <label> "
},
"help-same-as-label": {
"pass": "Laguntza-testuak (title o aria-describedby) ez du label testua bikoizten",
"fail": "Laguntza-testuak (title o aria-describedby) label testuaren bera da"
},
"hidden-explicit-label": {
"pass": "Formularioko elementuak badu <label> ageriko bat",
"fail": "Formularioko elementuak <label> esplizitu ezkutua dauka"
},
"implicit-label": {
"pass": "Formularioko elementuak <label> inplizitua du ('bilduta')",
"fail": "Formularioko elementuak ez dauka <label> inplizitu bat ('bilduta')"
},
"label-content-name-mismatch": {
"pass": "Elementuak testu ikusgarri bat dauka, bere izen irisgarriaren zati gisa.",
"fail": "Elementuko testua ez dago sartuta izen irisgarrian"
},
"multiple-label": {
"pass": "Formulario-eremuak ez du label elementu askorik",
"fail": "Label elementu asko ez dira asko onartzen laguntza-teknologietan"
},
"title-only": {
"pass": "Formularioko elementuak ez du soilik title atributua erabiltzen bere etiketarako",
"fail": "Formularioko elementu baten etiketa sortzeko baino ez da erabili title"
},
"landmark-is-unique": {
"pass": "Erreferentzia-puntuek role edo role/label/title konbinazio bakarra izan behar dute (hau da, izen irisgarri bakarra)",
"fail": "Erreferentzia-puntuak aria-label, aria-labelledby edo title bakarra izan behar du, erreferentzia-puntuak bereizgarriak izan daitezen."
},
"has-lang": {
"pass": "<html> elementuak lang atributua du",
"fail": "<html> elementuak ez du lang atributurik"
},
"valid-lang": {
"pass": "lang atributuaren balioa hizkuntza baliodunen zerrendan sartuta dago",
"fail": "lang atributuaren balioa ez dago hizkuntza baliodunen zerrendan"
},
"xml-lang-mismatch": {
"pass": "lang eta xml: lang atributuek oinarrizko hizkuntza bera dute",
"fail": "lang eta xml: lang atributuek ez dute oinarrizko hizkuntza bera"
},
"dlitem": {
"pass": "Deskribapen-zerrendako elementuak <dl> aita elementua du",
"fail": "Deskribapen-zerrendako elementuak ez dauka <dl> aita elementurik"
},
"listitem": {
"pass": "Zerrendaren elementuak < ul>, < ol> edo role=\"list\" duen elementu bat du",
"fail": "Zerrendaren elementuak ez du <ul>, <ol> o role=\"list\" elementu aitarik "
},
"only-dlitems": {
"pass": "Zerrendaren elementuak zuzeneko semeak baino ez ditu, <dt> edo <dd> elementuen barruan baimenduta daudenak.",
"fail": "Zerrendaren elementuak zuzeneko semeak ditu, <dt> edo <dd> elementuen barruan baimenduta ez daudenak"
},
"only-listitems": {
"pass": "Zerrendako elementuak zuzeneko seme-alabak baino ez ditu, <li> elementuen barruan baimenduta daudenak.",
"fail": "Zerrendako elementuak zuzeneko seme-alabak ditu, <li> elementuen barruan baimenduta ez daudenak"
},
"structured-dlitems": {
"pass": "Hutsik ez dagoenean, elementuak <dt> eta < dd> ditu.",
"fail": "Hutsik ez dagoenean, elementuak ez du gutxienez <dt> elementurik, eta ondoren, gutxienez <dd> elementurik."
},
"caption": {
"pass": "Multimedia-elementuak azpititulu-pista bat du",
"incomplete": "Elementurako azpitituluak daudela egiaztatu"
},
"frame-tested": {
"pass": "Sartutako markoa axe-core bidez probatu da",
"fail": "Sartutako markoa ezin izan da probatu axe-core bidez",
"incomplete": "Sartutako markoa axe-core bidez probatu behar da oraindik"
},
"css-orientation-lock": {
"pass": "Pantaila maneiagarria da eta ez dago orientazio-blokeorik",
"fail": "CSSak orientazioa blokeatzen du, eta pantaila ezin da orientatu.",
"incomplete": "Ezin da zehaztu CSS orientazio-blokeorik dagoen"
},
"meta-viewport-large": {
"pass": "<meta> etiketak ez du zum esanguratsurik eragozten gailu mugikorretan",
"fail": "<meta> etiketak gailu mugikorretan mugatzen du zooma"
},
"meta-viewport": {
"pass": "<meta> etiketak ez du zoom eragozten gailu mugikorretan",
"fail": "${data} < meta> etiketan, gailu mugikorretan zoom-a eragozten du"
},
"header-present": {
"pass": "Orriak 'header' bat dauka",
"fail": "Orriak ez dauka 'header' bat"
},
"heading-order": {
"pass": "Goiburuen hurrenkera zuzena da",
"fail": "Goiburuen hurrenkera ez da zuzena"
},
"internal-link-present": {
"pass": "Aurkitutako jauzi esteka ('skip') baliozkoa da",
"fail": "Ez dira aurkitu jauzi esteka ('skip') baliozkorik"
},
"landmark": {
"pass": "Orrialdeak herrialde bat du erreferentzia-puntu",
"fail": "Orrialdeak ez du herrialde erreferentzia-punturik"
},
"meta-refresh": {
"pass": "<meta> etiketak ez du orria freskatzen",
"fail": "<meta> etiketak orria freskatzen du"
},
"p-as-heading": {
"pass": "<p> elementuak ez dira goiburu gisa diseinatus",
"fail": "Goiburuko elementuak erabili beharko lirateke <p> estiloko elementuak erabili beharrean"
},
"region": {
"pass": "Orriaren eduki guztia erreferentzia-puntuetan sartuta dago.",
"fail": "Erreferentzia-puntuetan sartu gabeko edukia du orriak"
},
"skip-link": {
"pass": "Badago jauziko loturaren helmuga ('skip')",
"incomplete": "Jauzi-loturaren ('skip') helmuga agerian geratu beharko litzateke aktibazioan ",
"fail": "Ez dago helmugarik jauziko estekarako ('skip')"
},
"unique-frame-title": {
"pass": "Elementuaren title atributua bakarra da",
"fail": "Elementuaren title atributua ez da bakarra"
},
"duplicate-id-active": {
"pass": "Dokumentuak ez dauka id atributu bera partekatzen duen elementu aktiborik",
"fail": "Dokumentuak elementu aktiboak ditu, id atributu berarekin: ${data}"
},
"duplicate-id-aria": {
"pass": "Dokumentuak ez dauka id atributu bera partekatzen duen Aari edo etiketekin lotutako elementurik",
"fail": "Dokumentuak hainbat elementu ditu, id atributu bereko aria batekin lotuta: ${data}"
},
"duplicate-id": {
"pass": "Dokumentuak ez dauka id atributu bera partekatzen duen elementu estatikorik",
"fail": "Dokumentuak hainbat elementu estatiko ditu, id atributu berarekin"
},
"aria-label": {
"pass": "aria-label atributua existitzen da eta ez dago hutsik",
"fail": "aria-label atributua ez da existitzen edo hutsik dago"
},
"aria-labelledby": {
"pass": "aria-labelledby atributua existitzen da eta pantaila-irakurgailuetarako ikus daitezkeen elementuei egiten die erreferentzia",
"fail": "aria-labelledby atributua ez da existitzen, existitzen ez diren elementuei egiten die erreferentzia edo elementu hutsei egiten die erreferentzia"
},
"avoid-inline-spacing": {
"pass": "Ez da testu-tarteari eragiten dion '!important' estilorik zehaztu.",
"fail": {
"singular": "Ezabatu '!important' inline styleetatik ${data.values}, nabigatzaile gehienetan ez delako onartzen baliogabetzea.",
"plural": "Ezabatu '!important' inline styletik ${data.values}, nabigatzaile gehienetan ez delako onartzen baliogabetzea."
}
},
"button-has-visible-text": {
"pass": "Elementuak pantaila-irakurgailuek ikusteko moduko barne-testua du.",
"fail": "Elementuak ez du pantaila-irakurgailuek ikusteko moduko barne-testurik"
},
"doc-has-title": {
"pass": "Dokumentuak badu elementu bat <title> ez hutsik",
"fail": "Dokumentuak ez dauka <title> elementurik hutsik"
},
"exists": {
"pass": "Elementua ez da existitzen",
"fail": "Elementua existitzen da"
},
"has-alt": {
"pass": "Elementuak alt atributua du",
"fail": "Elementuak ez dauka alt atributurik"
},
"has-visible-text": {
"pass": "Elementuak pantaila-irakurgailuetarako testua du ikusgai",
"fail": "Elementuak ez du pantaila-irakurgailuetarako testu ikusgarririk"
},
"is-on-screen": {
"pass": "Elementua ez da ikusten",
"fail": "Elementua ikusten da"
},
"non-empty-alt": {
"pass": "Elementuak alt atributua du, eta ez dago hutsik",
"fail": "Elementuak ez du alt atributurik edo alt atributua hutsik dago"
},
"non-empty-if-present": {
"pass": {
"default": ", eta ez du balio-atributurik",
"has-label": "elementuak hutsik ez dagoen balio-atributua du balio-atributurik"
},
"fail": "Elementuak balio-atributua du, eta balio-atributua hutsik dago"
},
"non-empty-title": {
"pass": "Elementuak title atributua du",
"fail": "Elementuak ez du title atributurik edo title atributua hutsik dago"
},
"non-empty-value": {
"pass": "Elementuak hutsik ez dagoen balio-atributua du",
"fail": "Elementuak ez dauka balio-atributurik edo balio-atributua hutsik dago"
},
"role-none": {
"pass": "Elementuaren semantika lehenetsia role =\"none\" bidez deuseztatu da.",
"fail": "Elementuaren semantika lehenetsia ez da baliogabetu role bidez =\"none\""
},
"role-presentation": {
"pass": "Elementuaren semantika lehenetsia role =\"presentation\" bidez deuseztatu da.",
"fail": "Elementuaren semantika lehenetsia ez da ezeztatu role =\"presentation\" bidez"
},
"caption-faked": {
"pass": "Taula baten lehen lerroa ez da izenburu gisa erabiltzen ('caption')",
"fail": "Taularen lehen ilarak izenburu bat izan beharko luke ('caption'), taula-gelaxka baten ordez"
},
"html5-scope": {
"pass": "Scope atributua taulako goiburuen elementuetan bakarrik erabiltzen da (<th>)",
"fail": "HTML5en, scope atributuak taula-goiburuen elementuetan bakarrik erabil daitezke (<th>) "
},
"same-caption-summary": {
"pass": "Summary eta <caption> atributuaren edukia ez dago bikoiztuta",
"fail": "Summary atributuaren eta <caption> elementuaren edukia berdinak dira"
},
"scope-value": {
"pass": "Scope atributua ondo erabiltzen da",
"fail": "Scope atributuaren balioa 'row' edo 'col' bakarrik izan daiteke"
},
"td-has-header": {
"pass": "Hutsik ez dauden datu-gelaxka guztiek taula-goiburuak dituzte",
"fail": "Hutsik ez dauden datu-gelaxka batzuek ez dute taula-goibururik"
},
"td-headers-attr": {
"pass": "Headers atributua taulako beste gelaxka batzuei erreferentzia egiteko baino ez da erabiltzen",
"fail": "Headers atributua ez da soilik erabiltzen taulako beste gelaxka batzuei erreferentzia egiteko"
},
"th-has-data-cells": {
"pass": "Taulako goiburuen gelaxka guztiak datu-gelaxkak dira.",
"fail": "Taulako goiburuen gelaxka guztiak ez dira datu-gelaxkak.",
"incomplete": "Taulako datu-gelaxkak ez daude edo hutsik daude"
},
"hidden-content": {
"pass": "Orriaren eduki osoa aztertu da.",
"fail": "Arazoak egon ziren orrialde honen edukia aztertzean.",
"incomplete": "Orrian ezkutuko edukia dago, baina ez da aztertu. Eduki horren bistaratzea aktibatu beharko duzu, aztertzeko."
}
},
"failureSummaries": {
"any": {
"failureMessage": "Gorabehera hauetako edozein zuzentzea::{{~it:value}}\n {{=value.split('\\n').join('\\n ')}}{{~}}"
},
"none": {
"failureMessage": "Gorabehera hauek zuzentzea (guztiak):{{~it:value}}\n {{=value.split('\\n').join('\\n ')}}{{~}}"
}
}
}
@@ -0,0 +1,178 @@
<div align="center">
<img src="https://github.com/terkelg/globrex/raw/master/globrex.png" alt="globrex" width="500" />
</div>
<h1 align="center">globrex</h1>
<div align="center">
<a href="https://npmjs.org/package/globrex">
<img src="https://img.shields.io/npm/v/globrex.svg" alt="version" />
</a>
<a href="https://travis-ci.org/terkelg/globrex">
<img src="https://img.shields.io/travis/terkelg/globrex.svg" alt="travis" />
</a>
<a href="https://ci.appveyor.com/project/terkelg/globrex">
<img src="https://ci.appveyor.com/api/projects/status/ecbnb3whibj5iqcj?svg=true" alt="appveyor" />
</a>
<a href="https://npmjs.org/package/globrex">
<img src="https://img.shields.io/npm/dm/globrex.svg" alt="downloads" />
</a>
</div>
<div align="center">Simple but powerful glob to regular expression compiler.</div>
<br />
## Install
```
npm install globrex --save
```
## Core Features
- 💪 **extended globbing:** transform advance `ExtGlob` features
- 📦 **simple**: no dependencies
- 🛣️ **paths**: split paths into multiple `RegExp` segments
## Usage
```js
const globrex = require('globrex');
const result = globrex('p*uck')
// => { regex: /^p.*uck$/, string: '^p.*uck$', segments: [ /^p.*uck$/ ] }
result.regex.test('pluck'); // true
```
## API
### globrex(glob, options)
Type: `function`<br>
Returns: `Object`
Transform globs intp regular expressions.
Returns object with the following properties:
#### regex
Type: `RegExp`
JavaScript `RegExp` instance.
> **Note**: Read more about how to use [RegExp](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) on MDN.
#### path
This property only exists if the option `filepath` is true.
> **Note:** `filepath` is `false` by default
#### path.segments
Type: `Array`
Array of `RegExp` instances seperated by `/`.
This can be usable when working with file paths or urls.
Example array could be:
```js
[ /^foo$/, /^bar$/, /^([^\/]*)$/, '^baz\\.(md|js|txt)$' ]
```
#### path.regex
Type: `RegExp`
JavaScript `RegExp` instance build for testign against paths.
The regex have different path seperators depending on host OS.
### glob
Type: `String`
Glob string to transform.
### options.extended
Type: `Boolean`<br>
Default: `false`
Enable all advanced features from `extglob`.
Matching so called "extended" globs pattern like single character matching, matching ranges of characters, group matching, etc.
> **Note**: Interprets `[a-d]` as `[abcd]`. To match a literal `-`, include it as first or last character.
### options.globstar
Type: `Boolean`<br>
Default: `false`
When globstar is `false` globs like `'/foo/*'` are transformed to the following
`'^\/foo\/.*$'` which will match any string beginning with `'/foo/'`.
When the globstar option is `true`, the same `'/foo/*'` glob is transformed to
`'^\/foo\/[^/]*$'` which will match any string beginning with `'/foo/'` that **does not have** a `'/'` to the right of it. `'/foo/*'` will match: `'/foo/bar'`, `'/foo/bar.txt'` but not `'/foo/bar/baz'` or `'/foo/bar/baz.txt'`.
> **Note**: When globstar is `true`, `'/foo/**'` is equivelant to `'/foo/*'` when globstar is `false`.
### options.strict
Type: `Boolean`<br>
Default: `false`
Be forgiving about mutiple slashes, like `///` and make everything after the first `/` optional. This is how bash glob works.
### options.flags
Type: `String`<br>
Default: `''`
RegExp flags (e.g. `'i'` ) to pass to the RegExp constructor.
### options.filepath
Type: `Boolean`<br>
Default: `false`
Parse input strings as it was a file path for special path related features. This feature only makes sense if the input is a POSIX path like `/foo/bar/hello.js` or URLs.
When `true` the returned object will have an additional `path` object.
- `segment`: Array containing a `RegExp` object for each path segment.
- `regex`: OS specific file path `RegExp`. Path seperator used is based on the operating system.
- `globstar`: Regex string used to test for globstars.
> **Note: Please only use forward-slashes in file path glob expressions**
> Though windows uses either `/` or `\` as its path separator, only `/`
> characters are used by this glob implementation. You must use
> forward-slashes **only** in glob expressions. Back-slashes will always
> be interpreted as escape characters, not path separators.
## References
Learn more about advanced globbing here
- [mywiki.wooledge.org/glob](http://mywiki.wooledge.org/glob)
- [linuxjournal](http://www.linuxjournal.com/content/bash-extended-globbing)
## License
MIT © [Terkel Gjervig](https://terkel.com)
@@ -0,0 +1,9 @@
import { OB11EmitEventContent } from './index';
import { OB11HttpServerAdapter } from './http-server';
export declare class OB11HttpSSEServerAdapter extends OB11HttpServerAdapter {
private sseClients;
get isActive(): boolean;
handleRequest(req: any, res: any): Promise<void>;
private createSseSupport;
onEvent<T extends OB11EmitEventContent>(event: T): Promise<void>;
}
@@ -0,0 +1,10 @@
/**
* https://tc39.es/ecma402/#sec-getstringorbooleanoption
* @param opts
* @param prop
* @param values
* @param trueValue
* @param falsyValue
* @param fallback
*/
export declare function GetStringOrBooleanOption<T extends object, K extends keyof T>(opts: T, prop: K, values: T[K][] | undefined, trueValue: T[K] | boolean, falsyValue: T[K] | boolean, fallback: T[K] | boolean): T[K] | boolean;
@@ -0,0 +1,110 @@
/*! https://mths.be/cssesc v3.0.0 by @mathias */
'use strict';
var object = {};
var hasOwnProperty = object.hasOwnProperty;
var merge = function merge(options, defaults) {
if (!options) {
return defaults;
}
var result = {};
for (var key in defaults) {
// `if (defaults.hasOwnProperty(key) { … }` is not needed here, since
// only recognized option names are used.
result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key];
}
return result;
};
var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/;
var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/;
var regexAlwaysEscape = /['"\\]/;
var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
// https://mathiasbynens.be/notes/css-escapes#css
var cssesc = function cssesc(string, options) {
options = merge(options, cssesc.options);
if (options.quotes != 'single' && options.quotes != 'double') {
options.quotes = 'single';
}
var quote = options.quotes == 'double' ? '"' : '\'';
var isIdentifier = options.isIdentifier;
var firstChar = string.charAt(0);
var output = '';
var counter = 0;
var length = string.length;
while (counter < length) {
var character = string.charAt(counter++);
var codePoint = character.charCodeAt();
var value = void 0;
// If it’s not a printable ASCII character…
if (codePoint < 0x20 || codePoint > 0x7E) {
if (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) {
// It’s a high surrogate, and there is a next character.
var extra = string.charCodeAt(counter++);
if ((extra & 0xFC00) == 0xDC00) {
// next character is low surrogate
codePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000;
} else {
// It’s an unmatched surrogate; only append this code unit, in case
// the next code unit is the high surrogate of a surrogate pair.
counter--;
}
}
value = '\\' + codePoint.toString(16).toUpperCase() + ' ';
} else {
if (options.escapeEverything) {
if (regexAnySingleEscape.test(character)) {
value = '\\' + character;
} else {
value = '\\' + codePoint.toString(16).toUpperCase() + ' ';
}
} else if (/[\t\n\f\r\x0B]/.test(character)) {
value = '\\' + codePoint.toString(16).toUpperCase() + ' ';
} else if (character == '\\' || !isIdentifier && (character == '"' && quote == character || character == '\'' && quote == character) || isIdentifier && regexSingleEscape.test(character)) {
value = '\\' + character;
} else {
value = character;
}
}
output += value;
}
if (isIdentifier) {
if (/^-[-\d]/.test(output)) {
output = '\\-' + output.slice(1);
} else if (/\d/.test(firstChar)) {
output = '\\3' + firstChar + ' ' + output.slice(1);
}
}
// Remove spaces after `\HEX` escapes that are not followed by a hex digit,
// since they’re redundant. Note that this is only possible if the escape
// sequence isn’t preceded by an odd number of backslashes.
output = output.replace(regexExcessiveSpaces, function ($0, $1, $2) {
if ($1 && $1.length % 2) {
// It’s not safe to remove the space, so don’t.
return $0;
}
// Strip the space.
return ($1 || '') + $2;
});
if (!isIdentifier && options.wrap) {
return quote + output + quote;
}
return output;
};
// Expose default options (so they can be overridden globally).
cssesc.options = {
'escapeEverything': false,
'isIdentifier': false,
'quotes': 'single',
'wrap': false
};
cssesc.version = '3.0.0';
module.exports = cssesc;
@@ -0,0 +1,13 @@
import * as _heroui_system from '@heroui/system';
import { UseButtonProps } from './use-button.js';
import 'react';
import '@heroui/theme';
import '@heroui/use-aria-button';
import '@heroui/ripple';
import '@heroui/react-utils';
interface ButtonProps extends UseButtonProps {
}
declare const Button: _heroui_system.InternalForwardRefRenderFunction<"button", ButtonProps, never>;
export { ButtonProps, Button as default };
@@ -0,0 +1,16 @@
on:
push:
branches:
- main
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: python
package-name: gyp-next
bump-minor-pre-major: true
@@ -0,0 +1,28 @@
// src/linear/copy.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var CopyLinearIcon = (props) => /* @__PURE__ */ 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__ */ 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__ */ 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__ */ jsx("path", { d: "M16 12.9C16 9.4 14.6 8 11.1 8" })
]
}
);
export {
CopyLinearIcon
};
@@ -0,0 +1,92 @@
{
"name": "data-view-byte-length",
"version": "1.0.2",
"description": "Get the byteLength out of a DataView, robustly.",
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"types": "./index.d.ts",
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p . && attw -P",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"funding": {
"url": "https://github.com/sponsors/inspect-js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/inspect-js/data-view-byte-length.git"
},
"keywords": [
"javascript",
"ecmascript",
"dataview",
"data",
"view",
"byte",
"length",
"byteLength",
"robust"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/inspect-js/data-view-byte-length/issues"
},
"homepage": "https://github.com/inspect-js/data-view-byte-length#readme",
"dependencies": {
"call-bound": "^1.0.3",
"es-errors": "^1.3.0",
"is-data-view": "^1.0.2"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.1",
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.2.2",
"@types/es-value-fixtures": "^1.4.4",
"@types/for-each": "^0.3.3",
"@types/object-inspect": "^1.13.0",
"@types/tape": "^5.8.0",
"auto-changelog": "^2.5.0",
"es-value-fixtures": "^1.5.0",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}
@@ -0,0 +1,126 @@
import {Point as $3041db3296945e6e$export$baf26146a414f24a} from "./Point.module.js";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
class $60423f92c7f9ad87$export$c79fc6492f3af13d {
/**
* The maximum x-coordinate in the rectangle.
*/ get maxX() {
return this.x + this.width;
}
/**
* The maximum y-coordinate in the rectangle.
*/ get maxY() {
return this.y + this.height;
}
/**
* The area of the rectangle.
*/ get area() {
return this.width * this.height;
}
/**
* The top left corner of the rectangle.
*/ get topLeft() {
return new (0, $3041db3296945e6e$export$baf26146a414f24a)(this.x, this.y);
}
/**
* The top right corner of the rectangle.
*/ get topRight() {
return new (0, $3041db3296945e6e$export$baf26146a414f24a)(this.maxX, this.y);
}
/**
* The bottom left corner of the rectangle.
*/ get bottomLeft() {
return new (0, $3041db3296945e6e$export$baf26146a414f24a)(this.x, this.maxY);
}
/**
* The bottom right corner of the rectangle.
*/ get bottomRight() {
return new (0, $3041db3296945e6e$export$baf26146a414f24a)(this.maxX, this.maxY);
}
/**
* Returns whether this rectangle intersects another rectangle.
* @param rect - The rectangle to check.
*/ intersects(rect) {
let isTestEnv = process.env.NODE_ENV === 'test' && !process.env.VIRT_ON;
return (isTestEnv || this.area > 0 && rect.area > 0) && this.x <= rect.x + rect.width && rect.x <= this.x + this.width && this.y <= rect.y + rect.height && rect.y <= this.y + this.height;
}
/**
* Returns whether this rectangle fully contains another rectangle.
* @param rect - The rectangle to check.
*/ containsRect(rect) {
return this.x <= rect.x && this.y <= rect.y && this.maxX >= rect.maxX && this.maxY >= rect.maxY;
}
/**
* Returns whether the rectangle contains the given point.
* @param point - The point to check.
*/ containsPoint(point) {
return this.x <= point.x && this.y <= point.y && this.maxX >= point.x && this.maxY >= point.y;
}
/**
* Returns the first corner of this rectangle (from top to bottom, left to right)
* that is contained in the given rectangle, or null of the rectangles do not intersect.
* @param rect - The rectangle to check.
*/ getCornerInRect(rect) {
for (let key of [
'topLeft',
'topRight',
'bottomLeft',
'bottomRight'
]){
if (rect.containsPoint(this[key])) return key;
}
return null;
}
equals(rect) {
return rect.x === this.x && rect.y === this.y && rect.width === this.width && rect.height === this.height;
}
pointEquals(point) {
return this.x === point.x && this.y === point.y;
}
sizeEquals(size) {
return this.width === size.width && this.height === size.height;
}
/**
* Returns the union of this Rect and another.
*/ union(other) {
let x = Math.min(this.x, other.x);
let y = Math.min(this.y, other.y);
let width = Math.max(this.maxX, other.maxX) - x;
let height = Math.max(this.maxY, other.maxY) - y;
return new $60423f92c7f9ad87$export$c79fc6492f3af13d(x, y, width, height);
}
/**
* Returns the intersection of this Rect with another.
* If the rectangles do not intersect, an all zero Rect is returned.
*/ intersection(other) {
if (!this.intersects(other)) return new $60423f92c7f9ad87$export$c79fc6492f3af13d(0, 0, 0, 0);
let x = Math.max(this.x, other.x);
let y = Math.max(this.y, other.y);
return new $60423f92c7f9ad87$export$c79fc6492f3af13d(x, y, Math.min(this.maxX, other.maxX) - x, Math.min(this.maxY, other.maxY) - y);
}
/**
* Returns a copy of this rectangle.
*/ copy() {
return new $60423f92c7f9ad87$export$c79fc6492f3af13d(this.x, this.y, this.width, this.height);
}
constructor(x = 0, y = 0, width = 0, height = 0){
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
}
export {$60423f92c7f9ad87$export$c79fc6492f3af13d as Rect};
//# sourceMappingURL=Rect.module.js.map
@@ -0,0 +1,9 @@
export default (function (o, c, d) {
var proto = c.prototype;
proto.dayOfYear = function (input) {
// d(this) is for badMutable
var dayOfYear = Math.round((d(this).startOf('day') - d(this).startOf('year')) / 864e5) + 1;
return input == null ? dayOfYear : this.add(input - dayOfYear, 'day');
};
});
@@ -0,0 +1,57 @@
import {generateId as $99b62ae3ff97ec45$export$567fc7097e064344} from "./utils.mjs";
import {filterDOMProps as $dObGJ$filterDOMProps, useLinkProps as $dObGJ$useLinkProps, mergeProps as $dObGJ$mergeProps} from "@react-aria/utils";
import {useSelectableItem as $dObGJ$useSelectableItem} from "@react-aria/selection";
/*
* 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 $0175d55c2a017ebc$export$fdf4756d5b8ef90a(props, state, ref) {
let { key: key, isDisabled: propsDisabled, shouldSelectOnPressUp: shouldSelectOnPressUp } = props;
let { selectionManager: manager, selectedKey: selectedKey } = state;
let isSelected = key === selectedKey;
let isDisabled = propsDisabled || state.isDisabled || state.selectionManager.isDisabled(key);
let { itemProps: itemProps, isPressed: isPressed } = (0, $dObGJ$useSelectableItem)({
selectionManager: manager,
key: key,
ref: ref,
isDisabled: isDisabled,
shouldSelectOnPressUp: shouldSelectOnPressUp,
linkBehavior: 'selection'
});
let tabId = (0, $99b62ae3ff97ec45$export$567fc7097e064344)(state, key, 'tab');
let tabPanelId = (0, $99b62ae3ff97ec45$export$567fc7097e064344)(state, key, 'tabpanel');
let { tabIndex: tabIndex } = itemProps;
let item = state.collection.getItem(key);
let domProps = (0, $dObGJ$filterDOMProps)(item === null || item === void 0 ? void 0 : item.props, {
labelable: true
});
delete domProps.id;
let linkProps = (0, $dObGJ$useLinkProps)(item === null || item === void 0 ? void 0 : item.props);
return {
tabProps: (0, $dObGJ$mergeProps)(domProps, linkProps, itemProps, {
id: tabId,
'aria-selected': isSelected,
'aria-disabled': isDisabled || undefined,
'aria-controls': isSelected ? tabPanelId : undefined,
tabIndex: isDisabled ? undefined : tabIndex,
role: 'tab'
}),
isSelected: isSelected,
isDisabled: isDisabled,
isPressed: isPressed
};
}
export {$0175d55c2a017ebc$export$fdf4756d5b8ef90a as useTab};
//# sourceMappingURL=useTab.module.js.map
@@ -0,0 +1,655 @@
import * as proto from '../../../packet/transformer/proto';
import { OidbPacket, PacketTransformer } from '../../../packet/transformer/base';
declare class FetchC2CMessage extends PacketTransformer<typeof proto.SsoGetC2cMsgResponse> {
build(targetUid: string, startSeq: number, endSeq: number): OidbPacket;
parse(data: Buffer): import("napcat-protobuf").any;
messages: import("napcat-protobuf").MessageProtoFieldType<() => {
responseHead: import("napcat-protobuf").MessageProtoFieldType<() => {
fromUin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
fromUid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
type: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
sigMap: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
toUin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
toUid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
forward: import("napcat-protobuf").MessageProtoFieldType<() => {
friendName: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
}, true, false>;
grp: import("napcat-protobuf").MessageProtoFieldType<() => {
groupUin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
memberName: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
unknown5: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
groupName: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
}, true, false>;
}, false, false>;
contentHead: import("napcat-protobuf").MessageProtoFieldType<() => {
type: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
subType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
c2cCmd: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
ranDom: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
sequence: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
timeStamp: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
pkgNum: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, true, false>;
pkgIndex: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
divSeq: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
autoReply: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
ntMsgSeq: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
newId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, true, false>;
forward: import("napcat-protobuf").MessageProtoFieldType<() => {
field1: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
field2: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
field3: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
unknownBase64: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
avatar: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
}, true, false>;
}, false, false>;
body: import("napcat-protobuf").MessageProtoFieldType<() => {
richText: import("napcat-protobuf").MessageProtoFieldType<() => {
attr: import("napcat-protobuf").MessageProtoFieldType<() => {
codePage: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
time: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
random: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
color: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
size: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
effect: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
charSet: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
pitchAndFamily: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
fontName: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
reserveData: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, true, false>;
elems: import("napcat-protobuf").MessageProtoFieldType<() => {
text: import("napcat-protobuf").MessageProtoFieldType<() => {
str: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
lint: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
attr6Buf: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
attr7Buf: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
buf: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
pbReserve: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
}, true, false>;
face: import("napcat-protobuf").MessageProtoFieldType<() => {
index: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
old: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
buf: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
}, true, false>;
onlineImage: import("napcat-protobuf").MessageProtoFieldType<() => {
guid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
filePath: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
oldVerSendFile: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, true, false>;
notOnlineImage: import("napcat-protobuf").MessageProtoFieldType<() => {
filePath: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
fileLen: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
downloadPath: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
oldVerSendFile: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
imgType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
previewsImage: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
picMd5: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
picHeight: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
picWidth: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
resId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
flag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
thumbUrl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
original: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
bigUrl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
origUrl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
bizType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
result: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
index: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
opFaceBuf: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
oldPicMd5: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BOOL, false, false>;
thumbWidth: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
thumbHeight: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
fileId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
showLen: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
downloadLen: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
x400Url: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
x400Width: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
x400Height: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
pbRes: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
field3: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
field4: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
summary: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
field10: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
field20: import("napcat-protobuf").MessageProtoFieldType<() => {
field1: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
field2: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
field3: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
field4: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
field5: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
field7: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
}, false, false>;
url: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
md5Str: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
}, false, false>;
}, true, false>;
transElem: import("napcat-protobuf").MessageProtoFieldType<() => {
elemType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
elemValue: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, true, false>;
marketFace: import("napcat-protobuf").MessageProtoFieldType<() => {
faceName: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
itemType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
faceInfo: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
faceId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
tabId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
subType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
key: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
param: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
mediaType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
imageWidth: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
imageHeight: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
mobileparam: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
pbReserve: import("napcat-protobuf").MessageProtoFieldType<() => {
field8: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
}, false, false>;
}, true, false>;
customFace: import("napcat-protobuf").MessageProtoFieldType<() => {
guid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
filePath: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
shortcut: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
buffer: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
flag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
oldData: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
fileId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
serverIp: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
serverPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
fileType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
signature: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
useful: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
md5: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
thumbUrl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
bigUrl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
origUrl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
bizType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
repeatIndex: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
repeatImage: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
imageType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
index: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
width: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
height: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
source: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
size: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
origin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
thumbWidth: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
thumbHeight: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
showLen: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
downloadLen: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
x400Url: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
x400Width: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
x400Height: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
pbRes: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
summary: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
}, true, false>;
}, true, false>;
elemFlags2: import("napcat-protobuf").MessageProtoFieldType<() => {
colorTextId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
msgId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
whisperSessionId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
pttChangeBit: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
vipStatus: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
compatibleId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
insts: import("napcat-protobuf").MessageProtoFieldType<() => {
appId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
instId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, true>;
msgRptCnt: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
srcInst: import("napcat-protobuf").MessageProtoFieldType<() => {
appId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
instId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, false>;
longtitude: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
latitude: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
customFont: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
pcSupportDef: import("napcat-protobuf").MessageProtoFieldType<() => {
pcPtlBegin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
pcPtlEnd: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
macPtlBegin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
macPtlEnd: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
ptlsSupport: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, true>;
ptlsNotSupport: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, true>;
}, false, false>;
crmFlags: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
}, true, false>;
richMsg: import("napcat-protobuf").MessageProtoFieldType<() => {
template1: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
serviceId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
msgResId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
rand: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
seq: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
}, true, false>;
groupFile: import("napcat-protobuf").MessageProtoFieldType<() => {
filename: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
fileSize: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
fileId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
batchId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
fileKey: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
mark: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
sequence: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
batchItemId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
feedMsgTime: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
pbReserve: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, true, false>;
extraInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
nick: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
groupCard: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
level: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
flags: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
groupMask: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
msgTailId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
senderTitle: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
apnsTips: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
uin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
msgStateFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
apnsSoundType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
newGroupFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
}, true, false>;
videoFile: import("napcat-protobuf").MessageProtoFieldType<() => {
fileUuid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
fileMd5: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
fileName: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
fileFormat: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
fileTime: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
fileSize: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
thumbWidth: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
thumbHeight: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
thumbFileMd5: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
source: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
thumbFileSize: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
busiType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
fromChatType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
toChatType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
boolSupportProgressive: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BOOL, false, false>;
fileWidth: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
fileHeight: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
subBusiType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
videoAttr: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
bytesThumbFileUrls: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, true>;
bytesVideoFileUrls: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, true>;
thumbDownloadFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
videoDownloadFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
pbReserve: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, true, false>;
anonymousGroupMessage: import("napcat-protobuf").MessageProtoFieldType<() => {
flags: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
anonId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
anonNick: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
headPortrait: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
expireTime: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
bubbleId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
rankColor: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, true, false>;
customElem: import("napcat-protobuf").MessageProtoFieldType<() => {
desc: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
data: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
enumType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
ext: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
sound: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, true, false>;
generalFlags: import("napcat-protobuf").MessageProtoFieldType<() => {
bubbleDiyTextId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
groupFlagNew: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
uin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
rpId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
prpFold: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
longTextFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
longTextResId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
groupType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
toUinFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
glamourLevel: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
memberLevel: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
groupRankSeq: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
olympicTorch: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
babyqGuideMsgCookie: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
uin32ExpertFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
bubbleSubId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
pendantId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
rpIndex: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
pbReserve: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, true, false>;
srcMsg: import("napcat-protobuf").MessageProtoFieldType<() => {
origSeqs: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, true>;
senderUin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
time: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
flag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
elems: import("napcat-protobuf").MessageProtoFieldType<() => {
text: import("napcat-protobuf").MessageProtoFieldType<() => {
str: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
lint: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
attr6Buf: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
attr7Buf: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
buf: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
pbReserve: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
}, true, false>;
face: import("napcat-protobuf").MessageProtoFieldType<() => {
index: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
old: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
buf: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
}, true, false>;
onlineImage: import("napcat-protobuf").MessageProtoFieldType<() => {
guid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
filePath: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
oldVerSendFile: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, true, false>;
notOnlineImage: import("napcat-protobuf").MessageProtoFieldType<() => {
filePath: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
fileLen: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
downloadPath: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
oldVerSendFile: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
imgType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
previewsImage: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
picMd5: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
picHeight: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
picWidth: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
resId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
flag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
thumbUrl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
original: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
bigUrl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
origUrl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
bizType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
result: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
index: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
opFaceBuf: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
oldPicMd5: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BOOL, false, false>;
thumbWidth: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
thumbHeight: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
fileId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
showLen: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
downloadLen: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
x400Url: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
x400Width: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
x400Height: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
pbRes: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
field3: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
field4: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
summary: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
field10: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
field20: import("napcat-protobuf").MessageProtoFieldType<() => {
field1: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
field2: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
field3: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
field4: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
field5: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
field7: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
}, false, false>;
url: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
md5Str: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
}, false, false>;
}, true, false>;
transElem: import("napcat-protobuf").MessageProtoFieldType<() => {
elemType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
elemValue: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, true, false>;
marketFace: import("napcat-protobuf").MessageProtoFieldType<() => {
faceName: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
itemType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
faceInfo: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
faceId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
tabId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
subType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
key: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
param: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
mediaType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
imageWidth: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
imageHeight: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
mobileparam: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
pbReserve: import("napcat-protobuf").MessageProtoFieldType<() => {
field8: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
}, false, false>;
}, true, false>;
customFace: import("napcat-protobuf").MessageProtoFieldType<() => {
guid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
filePath: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
shortcut: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
buffer: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
flag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
oldData: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
fileId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
serverIp: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
serverPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
fileType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
signature: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
useful: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
md5: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
thumbUrl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
bigUrl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
origUrl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
bizType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
repeatIndex: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
repeatImage: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
imageType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
index: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
width: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
height: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
source: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
size: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
origin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
thumbWidth: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
thumbHeight: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
showLen: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
downloadLen: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
x400Url: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
x400Width: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
x400Height: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
pbRes: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
summary: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
}, true, false>;
}, true, false>;
elemFlags2: import("napcat-protobuf").MessageProtoFieldType<() => {
colorTextId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
msgId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
whisperSessionId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
pttChangeBit: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
vipStatus: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
compatibleId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
insts: import("napcat-protobuf").MessageProtoFieldType<() => {
appId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
instId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, true>;
msgRptCnt: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
srcInst: import("napcat-protobuf").MessageProtoFieldType<() => {
appId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
instId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, false>;
longtitude: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
latitude: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
customFont: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
pcSupportDef: import("napcat-protobuf").MessageProtoFieldType<() => {
pcPtlBegin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
pcPtlEnd: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
macPtlBegin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
macPtlEnd: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
ptlsSupport: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, true>;
ptlsNotSupport: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, true>;
}, false, false>;
crmFlags: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
}, true, false>;
richMsg: import("napcat-protobuf").MessageProtoFieldType<() => {
template1: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
serviceId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
msgResId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
rand: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
seq: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
}, true, false>;
groupFile: import("napcat-protobuf").MessageProtoFieldType<() => {
filename: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
fileSize: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
fileId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
batchId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
fileKey: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
mark: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
sequence: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
batchItemId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
feedMsgTime: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
pbReserve: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, true, false>;
extraInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
nick: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
groupCard: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
level: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
flags: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
groupMask: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
msgTailId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
senderTitle: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
apnsTips: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
uin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
msgStateFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
apnsSoundType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
newGroupFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
}, true, false>;
videoFile: import("napcat-protobuf").MessageProtoFieldType<() => {
fileUuid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
fileMd5: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
fileName: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
fileFormat: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
fileTime: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
fileSize: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
thumbWidth: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
thumbHeight: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
thumbFileMd5: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
source: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
thumbFileSize: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
busiType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
fromChatType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
toChatType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
boolSupportProgressive: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BOOL, false, false>;
fileWidth: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
fileHeight: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
subBusiType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
videoAttr: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
bytesThumbFileUrls: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, true>;
bytesVideoFileUrls: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, true>;
thumbDownloadFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
videoDownloadFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
pbReserve: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, true, false>;
anonymousGroupMessage: import("napcat-protobuf").MessageProtoFieldType<() => {
flags: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
anonId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
anonNick: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
headPortrait: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
expireTime: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
bubbleId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
rankColor: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, true, false>;
customElem: import("napcat-protobuf").MessageProtoFieldType<() => {
desc: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
data: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
enumType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
ext: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
sound: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, true, false>;
generalFlags: import("napcat-protobuf").MessageProtoFieldType<() => {
bubbleDiyTextId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
groupFlagNew: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
uin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
rpId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
prpFold: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
longTextFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
longTextResId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
groupType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
toUinFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
glamourLevel: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
memberLevel: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
groupRankSeq: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
olympicTorch: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
babyqGuideMsgCookie: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
uin32ExpertFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
bubbleSubId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
pendantId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
rpIndex: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
pbReserve: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, true, false>;
srcMsg: import("napcat-protobuf").MessageProtoFieldType</*elided*/ any, true, false>;
lightAppElem: import("napcat-protobuf").MessageProtoFieldType<() => {
data: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
msgResid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
}, true, false>;
commonElem: import("napcat-protobuf").MessageProtoFieldType<() => {
serviceType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
pbElem: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
businessType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, true, false>;
}, false, true>;
type: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
richMsg: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
pbReserve: import("napcat-protobuf").MessageProtoFieldType<() => {
messageId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
senderUid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
receiverUid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
friendSeq: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
}, true, false>;
sourceMsg: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
toUin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, true, false>;
troopName: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
}, true, false>;
lightAppElem: import("napcat-protobuf").MessageProtoFieldType<() => {
data: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
msgResid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
}, true, false>;
commonElem: import("napcat-protobuf").MessageProtoFieldType<() => {
serviceType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
pbElem: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
businessType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, true, false>;
}, false, true>;
notOnlineFile: import("napcat-protobuf").MessageProtoFieldType<() => {
fileType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
sig: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
fileUuid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
fileMd5: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
fileName: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
fileSize: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT64, true, false>;
note: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
reserved: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
subcmd: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
microCloud: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
bytesFileUrls: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, true>;
downloadFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
dangerEvel: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
lifeTime: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
uploadTime: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
absFileType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
clientType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
expireTime: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, true, false>;
pbReserve: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
fileHash: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
}, true, false>;
ptt: import("napcat-protobuf").MessageProtoFieldType<() => {
fileType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
srcUin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
fileUuid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
fileMd5: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
fileName: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
fileSize: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
reserve: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
fileId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
serverIp: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
serverPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
boolValid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BOOL, false, false>;
signature: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
shortcut: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
fileKey: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
magicPttIndex: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
voiceSwitch: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
pttUrl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
groupFileKey: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
time: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
downPara: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
format: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
pbReserve: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
bytesPttUrls: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, true>;
downloadFlag: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
}, true, false>;
}, true, false>;
msgContent: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
msgEncryptContent: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
}, true, false>;
}, false, true>;
}>;
}
declare const _default: FetchC2CMessage;
export default _default;
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Next UI
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,84 @@
"use strict";
//
// Main
//
Object.defineProperty(exports, "__esModule", { value: true });
exports.strategies = void 0;
exports.memoize = memoize;
function memoize(fn, options) {
var cache = options && options.cache ? options.cache : cacheDefault;
var serializer = options && options.serializer ? options.serializer : serializerDefault;
var strategy = options && options.strategy ? options.strategy : strategyDefault;
return strategy(fn, {
cache: cache,
serializer: serializer,
});
}
//
// Strategy
//
function isPrimitive(value) {
return (value == null || typeof value === 'number' || typeof value === 'boolean'); // || typeof value === "string" 'unsafe' primitive for our needs
}
function monadic(fn, cache, serializer, arg) {
var cacheKey = isPrimitive(arg) ? arg : serializer(arg);
var computedValue = cache.get(cacheKey);
if (typeof computedValue === 'undefined') {
computedValue = fn.call(this, arg);
cache.set(cacheKey, computedValue);
}
return computedValue;
}
function variadic(fn, cache, serializer) {
var args = Array.prototype.slice.call(arguments, 3);
var cacheKey = serializer(args);
var computedValue = cache.get(cacheKey);
if (typeof computedValue === 'undefined') {
computedValue = fn.apply(this, args);
cache.set(cacheKey, computedValue);
}
return computedValue;
}
function assemble(fn, context, strategy, cache, serialize) {
return strategy.bind(context, fn, cache, serialize);
}
function strategyDefault(fn, options) {
var strategy = fn.length === 1 ? monadic : variadic;
return assemble(fn, this, strategy, options.cache.create(), options.serializer);
}
function strategyVariadic(fn, options) {
return assemble(fn, this, variadic, options.cache.create(), options.serializer);
}
function strategyMonadic(fn, options) {
return assemble(fn, this, monadic, options.cache.create(), options.serializer);
}
//
// Serializer
//
var serializerDefault = function () {
return JSON.stringify(arguments);
};
//
// Cache
//
var ObjectWithoutPrototypeCache = /** @class */ (function () {
function ObjectWithoutPrototypeCache() {
this.cache = Object.create(null);
}
ObjectWithoutPrototypeCache.prototype.get = function (key) {
return this.cache[key];
};
ObjectWithoutPrototypeCache.prototype.set = function (key, value) {
this.cache[key] = value;
};
return ObjectWithoutPrototypeCache;
}());
var cacheDefault = {
create: function create() {
return new ObjectWithoutPrototypeCache();
},
};
exports.strategies = {
variadic: strategyVariadic,
monadic: strategyMonadic,
};
@@ -0,0 +1,531 @@
# mdast-util-mdx-expression
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
[![Sponsors][sponsors-badge]][collective]
[![Backers][backers-badge]][collective]
[![Chat][chat-badge]][chat]
[mdast][] extensions to parse and serialize [MDX][] expressions (`{Math.PI}`).
## Contents
* [What is this?](#what-is-this)
* [When to use this](#when-to-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`mdxExpressionFromMarkdown()`](#mdxexpressionfrommarkdown)
* [`mdxExpressionToMarkdown()`](#mdxexpressiontomarkdown)
* [`MdxFlowExpression`](#mdxflowexpression)
* [`MdxTextExpression`](#mdxtextexpression)
* [`MdxFlowExpressionHast`](#mdxflowexpressionhast)
* [`MdxTextExpressionHast`](#mdxtextexpressionhast)
* [HTML](#html)
* [Syntax](#syntax)
* [Syntax tree](#syntax-tree)
* [Nodes](#nodes)
* [Content model](#content-model)
* [Types](#types)
* [Compatibility](#compatibility)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This package contains two extensions that add support for MDX expression syntax
in markdown to [mdast][].
These extensions plug into
[`mdast-util-from-markdown`][mdast-util-from-markdown] (to support parsing
expressions in markdown into a syntax tree) and
[`mdast-util-to-markdown`][mdast-util-to-markdown] (to support serializing
expressions in syntax trees to markdown).
## When to use this
You can use these extensions when you are working with
`mdast-util-from-markdown` and `mdast-util-to-markdown` already.
When working with `mdast-util-from-markdown`, you must combine this package
with [`micromark-extension-mdx-expression`][extension].
When you are working with syntax trees and want all of MDX, use
[`mdast-util-mdx`][mdast-util-mdx] instead.
All these packages are used in [`remark-mdx`][remark-mdx], which
focusses on making it easier to transform content by abstracting these
internals away.
## Install
This package is [ESM only][esm].
In Node.js (version 16+), install with [npm][]:
```sh
npm install mdast-util-mdx-expression
```
In Deno with [`esm.sh`][esmsh]:
```js
import {mdxExpressionFromMarkdown, mdxExpressionToMarkdown} from 'https://esm.sh/mdast-util-mdx-expression@2'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import {mdxExpressionFromMarkdown, mdxExpressionToMarkdown} from 'https://esm.sh/mdast-util-mdx-expression@2?bundle'
</script>
```
## Use
Say our document `example.mdx` contains:
```mdx
{
a + 1
}
b {true}.
```
…and our module `example.js` looks as follows:
```js
import fs from 'node:fs/promises'
import * as acorn from 'acorn'
import {mdxExpression} from 'micromark-extension-mdx-expression'
import {fromMarkdown} from 'mdast-util-from-markdown'
import {mdxExpressionFromMarkdown, mdxExpressionToMarkdown} from 'mdast-util-mdx-expression'
import {toMarkdown} from 'mdast-util-to-markdown'
const doc = await fs.readFile('example.mdx')
const tree = fromMarkdown(doc, {
extensions: [mdxExpression({acorn, addResult: true})],
mdastExtensions: [mdxExpressionFromMarkdown()]
})
console.log(tree)
const out = toMarkdown(tree, {extensions: [mdxExpressionToMarkdown()]})
console.log(out)
```
…now running `node example.js` yields (positional info removed for brevity):
```js
{
type: 'root',
children: [
{
type: 'mdxFlowExpression',
value: '\na + 1\n',
data: {
estree: {
type: 'Program',
body: [
{
type: 'ExpressionStatement',
expression: {
type: 'BinaryExpression',
left: {type: 'Identifier', name: 'a'},
operator: '+',
right: {type: 'Literal', value: 1, raw: '1'}
}
}
],
sourceType: 'module'
}
}
},
{
type: 'paragraph',
children: [
{type: 'text', value: 'b '},
{
type: 'mdxTextExpression',
value: 'true',
data: {
estree: {
type: 'Program',
body: [
{
type: 'ExpressionStatement',
expression: {type: 'Literal', value: true, raw: 'true'}
}
],
sourceType: 'module'
}
}
},
{type: 'text', value: '.'}
]
}
]
}
```
```markdown
{
a + 1
}
b {true}.
```
## API
This package exports the identifiers
[`mdxExpressionFromMarkdown`][api-mdx-expression-from-markdown] and
[`mdxExpressionToMarkdown`][api-mdx-expression-to-markdown].
There is no default export.
### `mdxExpressionFromMarkdown()`
Create an extension for [`mdast-util-from-markdown`][mdast-util-from-markdown]
to enable MDX expressions in markdown.
When using the [micromark syntax extension][extension] with `addResult`, nodes
will have a `data.estree` field set to an ESTree [`Program`][program] node.
###### Returns
Extension for `mdast-util-from-markdown` to enable MDX expressions
([`FromMarkdownExtension`][from-markdown-extension]).
### `mdxExpressionToMarkdown()`
Create an extension for [`mdast-util-to-markdown`][mdast-util-to-markdown]
to enable MDX expressions in markdown.
###### Returns
Extension for `mdast-util-to-markdown` to enable MDX expressions
([`ToMarkdownExtension`][to-markdown-extension]).
### `MdxFlowExpression`
MDX expression node, occurring in flow (block) (TypeScript type).
###### Type
```ts
import type {Program} from 'estree-jsx'
import type {Data, Literal} from 'mdast'
interface MdxFlowExpression extends Literal {
type: 'mdxFlowExpression'
data?: MdxFlowExpressionData | undefined
}
interface MdxFlowExpressionData extends Data {
estree?: Program | null | undefined
}
```
### `MdxTextExpression`
MDX expression node, occurring in text (block) (TypeScript type).
###### Type
```ts
import type {Program} from 'estree-jsx'
import type {Data, Literal} from 'mdast'
interface MdxTextExpression extends Literal {
type: 'mdxTextExpression'
data?: MdxTextExpressionData | undefined
}
interface MdxTextExpressionData extends Data {
estree?: Program | null | undefined
}
```
### `MdxFlowExpressionHast`
Same as [`MdxFlowExpression`][api-mdx-flow-expression], but registered with
`@types/hast` (TypeScript type).
###### Type
```ts
import type {Program} from 'estree-jsx'
import type {Data, Literal} from 'hast'
interface MdxFlowExpressionHast extends Literal {
type: 'mdxFlowExpression'
data?: MdxFlowExpressionData | undefined
}
interface MdxFlowExpressionData extends Data {
estree?: Program | null | undefined
}
```
### `MdxTextExpressionHast`
Same as [`MdxTextExpression`][api-mdx-text-expression], but registered with
`@types/hast` (TypeScript type).
###### Type
```ts
import type {Program} from 'estree-jsx'
import type {Data, Literal} from 'hast'
interface MdxTextExpressionHast extends Literal {
type: 'mdxTextExpression'
data?: MdxTextExpressionData | undefined
}
interface MdxTextExpressionData extends Data {
estree?: Program | null | undefined
}
```
## HTML
MDX expressions have no representation in HTML.
Though, when you are dealing with MDX, you will likely go *through* hast.
You can enable passing MDX expressions through to hast by configuring
[`mdast-util-to-hast`][mdast-util-to-hast] with
`passThrough: ['mdxFlowExpression', 'mdxTextExpression']`.
## Syntax
See [Syntax in `micromark-extension-mdx-expression`][syntax].
## Syntax tree
The following interfaces are added to **[mdast][]** by this utility.
### Nodes
#### `MdxFlowExpression`
```idl
interface MdxFlowExpression <: Literal {
type: 'mdxFlowExpression'
}
```
**MdxFlowExpression** (**[Literal][dfn-literal]**) represents a JavaScript
expression embedded in flow (block).
It can be used where **[flow][dfn-flow-content]** content is expected.
Its content is represented by its `value` field.
For example, the following markdown:
```markdown
{
1 + 1
}
```
Yields:
```js
{type: 'mdxFlowExpression', value: '\n1 + 1\n'}
```
#### `MdxTextExpression`
```idl
interface MdxTextExpression <: Literal {
type: 'mdxTextExpression"
}
```
**MdxTextExpression** (**[Literal][dfn-literal]**) represents a JavaScript
expression embedded in text (span, inline).
It can be used where **[phrasing][dfn-phrasing-content]** content is expected.
Its content is represented by its `value` field.
For example, the following markdown:
```markdown
a {1 + 1} b.
```
Yields:
```js
{type: 'mdxTextExpression', value: '1 + 1'}
```
### Content model
#### `FlowContent` (MDX expression)
```idl
type FlowContentMdxExpression = MdxFlowExpression | FlowContent
```
#### `PhrasingContent` (MDX expression)
```idl
type PhrasingContentMdxExpression = MdxTextExpression | PhrasingContent
```
## Types
This package is fully typed with [TypeScript][].
It exports the additional types [`MdxFlowExpression`][api-mdx-flow-expression],
[`MdxFlowExpressionHast`][api-mdx-flow-expression-hast],
[`MdxTextExpression`][api-mdx-text-expression], and
[`MdxTextExpressionHast`][api-mdx-text-expression-hast].
It also registers the node types with `@types/mdast` and `@types/hast`.
If you’re working with the syntax tree, make sure to import this utility
somewhere in your types, as that registers the new node types in the tree.
```js
/**
* @import {} from 'mdast-util-mdx-expression'
* @import {Root} from 'mdast'
*/
import {visit} from 'unist-util-visit'
/** @type {Root} */
const tree = getMdastNodeSomeHow()
visit(tree, function (node) {
// `node` can now be an expression node.
})
```
## Compatibility
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line,
`mdast-util-mdx-expression@^2`, compatible with Node.js 16.
This utility works with `mdast-util-from-markdown` version 2+ and
`mdast-util-to-markdown` version 2+.
## Related
* [`remarkjs/remark-mdx`][remark-mdx]
— remark plugin to support MDX
* [`syntax-tree/mdast-util-mdx`][mdast-util-mdx]
— mdast utility to support MDX
* [`micromark/micromark-extension-mdx-expression`][extension]
— micromark extension to parse MDX expressions
## Contribute
See [`contributing.md`][contributing] in [`syntax-tree/.github`][health] for
ways to get started.
See [`support.md`][support] for ways to get help.
This project has a [code of conduct][coc].
By interacting with this repository, organization, or community you agree to
abide by its terms.
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[build-badge]: https://github.com/syntax-tree/mdast-util-mdx-expression/workflows/main/badge.svg
[build]: https://github.com/syntax-tree/mdast-util-mdx-expression/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/mdast-util-mdx-expression.svg
[coverage]: https://codecov.io/github/syntax-tree/mdast-util-mdx-expression
[downloads-badge]: https://img.shields.io/npm/dm/mdast-util-mdx-expression.svg
[downloads]: https://www.npmjs.com/package/mdast-util-mdx-expression
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=mdast-util-mdx-expression
[size]: https://bundlejs.com/?q=mdast-util-mdx-expression
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[collective]: https://opencollective.com/unified
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/syntax-tree/unist/discussions
[npm]: https://docs.npmjs.com/cli/install
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[esmsh]: https://esm.sh
[typescript]: https://www.typescriptlang.org
[license]: license
[author]: https://wooorm.com
[health]: https://github.com/syntax-tree/.github
[contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md
[support]: https://github.com/syntax-tree/.github/blob/main/support.md
[coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md
[mdast]: https://github.com/syntax-tree/mdast
[mdast-util-to-hast]: https://github.com/syntax-tree/mdast-util-to-hast
[mdast-util-from-markdown]: https://github.com/syntax-tree/mdast-util-from-markdown
[mdast-util-to-markdown]: https://github.com/syntax-tree/mdast-util-to-markdown
[mdast-util-mdx]: https://github.com/syntax-tree/mdast-util-mdx
[extension]: https://github.com/micromark/micromark-extension-mdx-expression
[syntax]: https://github.com/micromark/micromark-extension-mdx-expression#syntax
[program]: https://github.com/estree/estree/blob/master/es2015.md#programs
[dfn-literal]: https://github.com/syntax-tree/mdast#literal
[remark-mdx]: https://mdxjs.com/packages/remark-mdx/
[mdx]: https://mdxjs.com
[from-markdown-extension]: https://github.com/syntax-tree/mdast-util-from-markdown#extension
[to-markdown-extension]: https://github.com/syntax-tree/mdast-util-to-markdown#options
[api-mdx-expression-from-markdown]: #mdxexpressionfrommarkdown
[api-mdx-expression-to-markdown]: #mdxexpressiontomarkdown
[api-mdx-flow-expression]: #mdxflowexpression
[api-mdx-text-expression]: #mdxtextexpression
[api-mdx-flow-expression-hast]: #mdxflowexpressionhast
[api-mdx-text-expression-hast]: #mdxtextexpressionhast
[dfn-flow-content]: #flowcontent-mdx-expression
[dfn-phrasing-content]: #phrasingcontent-mdx-expression
@@ -0,0 +1,29 @@
import type { Readable } from 'node:stream';
import { AbstractStreamReader } from "./AbstractStreamReader.js";
/**
* Node.js Readable Stream Reader
* Ref: https://nodejs.org/api/stream.html#readable-streams
*/
export declare class StreamReader extends AbstractStreamReader {
private s;
/**
* Deferred used for postponed read request (as not data is yet available to read)
*/
private deferred;
constructor(s: Readable);
/**
* Read chunk from stream
* @param buffer Target Uint8Array (or Buffer) to store data read from stream in
* @param mayBeLess - If true, may fill the buffer partially
* @returns Number of bytes read
*/
protected readFromStream(buffer: Uint8Array, mayBeLess: boolean): Promise<number>;
/**
* Process deferred read request
* @param request Deferred read request
*/
private readDeferred;
private reject;
abort(): Promise<void>;
close(): Promise<void>;
}
@@ -0,0 +1,119 @@
"use strict";
// give it a pattern, and it'll be able to tell you if
// a given path should be ignored.
// Ignoring a path ignores its children if the pattern ends in /**
// Ignores are always parsed in dot:true mode
Object.defineProperty(exports, "__esModule", { value: true });
exports.Ignore = void 0;
const minimatch_1 = require("minimatch");
const pattern_js_1 = require("./pattern.js");
const defaultPlatform = (typeof process === 'object' &&
process &&
typeof process.platform === 'string') ?
process.platform
: 'linux';
/**
* Class used to process ignored patterns
*/
class Ignore {
relative;
relativeChildren;
absolute;
absoluteChildren;
platform;
mmopts;
constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform, }) {
this.relative = [];
this.absolute = [];
this.relativeChildren = [];
this.absoluteChildren = [];
this.platform = platform;
this.mmopts = {
dot: true,
nobrace,
nocase,
noext,
noglobstar,
optimizationLevel: 2,
platform,
nocomment: true,
nonegate: true,
};
for (const ign of ignored)
this.add(ign);
}
add(ign) {
// this is a little weird, but it gives us a clean set of optimized
// minimatch matchers, without getting tripped up if one of them
// ends in /** inside a brace section, and it's only inefficient at
// the start of the walk, not along it.
// It'd be nice if the Pattern class just had a .test() method, but
// handling globstars is a bit of a pita, and that code already lives
// in minimatch anyway.
// Another way would be if maybe Minimatch could take its set/globParts
// as an option, and then we could at least just use Pattern to test
// for absolute-ness.
// Yet another way, Minimatch could take an array of glob strings, and
// a cwd option, and do the right thing.
const mm = new minimatch_1.Minimatch(ign, this.mmopts);
for (let i = 0; i < mm.set.length; i++) {
const parsed = mm.set[i];
const globParts = mm.globParts[i];
/* c8 ignore start */
if (!parsed || !globParts) {
throw new Error('invalid pattern object');
}
// strip off leading ./ portions
// https://github.com/isaacs/node-glob/issues/570
while (parsed[0] === '.' && globParts[0] === '.') {
parsed.shift();
globParts.shift();
}
/* c8 ignore stop */
const p = new pattern_js_1.Pattern(parsed, globParts, 0, this.platform);
const m = new minimatch_1.Minimatch(p.globString(), this.mmopts);
const children = globParts[globParts.length - 1] === '**';
const absolute = p.isAbsolute();
if (absolute)
this.absolute.push(m);
else
this.relative.push(m);
if (children) {
if (absolute)
this.absoluteChildren.push(m);
else
this.relativeChildren.push(m);
}
}
}
ignored(p) {
const fullpath = p.fullpath();
const fullpaths = `${fullpath}/`;
const relative = p.relative() || '.';
const relatives = `${relative}/`;
for (const m of this.relative) {
if (m.match(relative) || m.match(relatives))
return true;
}
for (const m of this.absolute) {
if (m.match(fullpath) || m.match(fullpaths))
return true;
}
return false;
}
childrenIgnored(p) {
const fullpath = p.fullpath() + '/';
const relative = (p.relative() || '.') + '/';
for (const m of this.relativeChildren) {
if (m.match(relative))
return true;
}
for (const m of this.absoluteChildren) {
if (m.match(fullpath))
return true;
}
return false;
}
}
exports.Ignore = Ignore;
//# sourceMappingURL=ignore.js.map
@@ -0,0 +1,101 @@
var $9Icr4$reactariautils = require("@react-aria/utils");
var $9Icr4$react = require("react");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useInteractOutside", () => $edcfa848c42f94f4$export$872b660ac5a1ff98);
/*
* 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 react.
// Original licensing for the following can be found in the
// NOTICE file in the root directory of this source tree.
// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions
function $edcfa848c42f94f4$export$872b660ac5a1ff98(props) {
let { ref: ref, onInteractOutside: onInteractOutside, isDisabled: isDisabled, onInteractOutsideStart: onInteractOutsideStart } = props;
let stateRef = (0, $9Icr4$react.useRef)({
isPointerDown: false,
ignoreEmulatedMouseEvents: false
});
let onPointerDown = (0, $9Icr4$reactariautils.useEffectEvent)((e)=>{
if (onInteractOutside && $edcfa848c42f94f4$var$isValidEvent(e, ref)) {
if (onInteractOutsideStart) onInteractOutsideStart(e);
stateRef.current.isPointerDown = true;
}
});
let triggerInteractOutside = (0, $9Icr4$reactariautils.useEffectEvent)((e)=>{
if (onInteractOutside) onInteractOutside(e);
});
(0, $9Icr4$react.useEffect)(()=>{
let state = stateRef.current;
if (isDisabled) return;
const element = ref.current;
const documentObject = (0, $9Icr4$reactariautils.getOwnerDocument)(element);
// Use pointer events if available. Otherwise, fall back to mouse and touch events.
if (typeof PointerEvent !== 'undefined') {
let onPointerUp = (e)=>{
if (state.isPointerDown && $edcfa848c42f94f4$var$isValidEvent(e, ref)) triggerInteractOutside(e);
state.isPointerDown = false;
};
// changing these to capture phase fixed combobox
documentObject.addEventListener('pointerdown', onPointerDown, true);
documentObject.addEventListener('pointerup', onPointerUp, true);
return ()=>{
documentObject.removeEventListener('pointerdown', onPointerDown, true);
documentObject.removeEventListener('pointerup', onPointerUp, true);
};
} else {
let onMouseUp = (e)=>{
if (state.ignoreEmulatedMouseEvents) state.ignoreEmulatedMouseEvents = false;
else if (state.isPointerDown && $edcfa848c42f94f4$var$isValidEvent(e, ref)) triggerInteractOutside(e);
state.isPointerDown = false;
};
let onTouchEnd = (e)=>{
state.ignoreEmulatedMouseEvents = true;
if (state.isPointerDown && $edcfa848c42f94f4$var$isValidEvent(e, ref)) triggerInteractOutside(e);
state.isPointerDown = false;
};
documentObject.addEventListener('mousedown', onPointerDown, true);
documentObject.addEventListener('mouseup', onMouseUp, true);
documentObject.addEventListener('touchstart', onPointerDown, true);
documentObject.addEventListener('touchend', onTouchEnd, true);
return ()=>{
documentObject.removeEventListener('mousedown', onPointerDown, true);
documentObject.removeEventListener('mouseup', onMouseUp, true);
documentObject.removeEventListener('touchstart', onPointerDown, true);
documentObject.removeEventListener('touchend', onTouchEnd, true);
};
}
}, [
ref,
isDisabled,
onPointerDown,
triggerInteractOutside
]);
}
function $edcfa848c42f94f4$var$isValidEvent(event, ref) {
if (event.button > 0) return false;
if (event.target) {
// if the event target is no longer in the document, ignore
const ownerDocument = event.target.ownerDocument;
if (!ownerDocument || !ownerDocument.documentElement.contains(event.target)) return false;
// If the target is within a top layer element (e.g. toasts), ignore.
if (event.target.closest('[data-react-aria-top-layer]')) return false;
}
return ref.current && !ref.current.contains(event.target);
}
//# sourceMappingURL=useInteractOutside.main.js.map
@@ -0,0 +1,871 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4-mini";
import type { util } from "zod/v4/core";
test("z.boolean", () => {
const a = z.boolean();
expect(z.parse(a, true)).toEqual(true);
expect(z.parse(a, false)).toEqual(false);
expect(() => z.parse(a, 123)).toThrow();
expect(() => z.parse(a, "true")).toThrow();
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<boolean>();
});
test("z.bigint", () => {
const a = z.bigint();
expect(z.parse(a, BigInt(123))).toEqual(BigInt(123));
expect(() => z.parse(a, 123)).toThrow();
expect(() => z.parse(a, "123")).toThrow();
});
test("z.symbol", () => {
const a = z.symbol();
const sym = Symbol();
expect(z.parse(a, sym)).toEqual(sym);
expect(() => z.parse(a, "symbol")).toThrow();
});
test("z.date", () => {
const a = z.date();
const date = new Date();
expect(z.parse(a, date)).toEqual(date);
expect(() => z.parse(a, "date")).toThrow();
});
test("z.coerce.string", () => {
const a = z.coerce.string();
expect(z.parse(a, 123)).toEqual("123");
expect(z.parse(a, true)).toEqual("true");
expect(z.parse(a, null)).toEqual("null");
expect(z.parse(a, undefined)).toEqual("undefined");
});
test("z.coerce.number", () => {
const a = z.coerce.number();
expect(z.parse(a, "123")).toEqual(123);
expect(z.parse(a, "123.45")).toEqual(123.45);
expect(z.parse(a, true)).toEqual(1);
expect(z.parse(a, false)).toEqual(0);
expect(() => z.parse(a, "abc")).toThrow();
});
test("z.coerce.boolean", () => {
const a = z.coerce.boolean();
// test booleans
expect(z.parse(a, true)).toEqual(true);
expect(z.parse(a, false)).toEqual(false);
expect(z.parse(a, "true")).toEqual(true);
expect(z.parse(a, "false")).toEqual(true);
expect(z.parse(a, 1)).toEqual(true);
expect(z.parse(a, 0)).toEqual(false);
expect(z.parse(a, {})).toEqual(true);
expect(z.parse(a, [])).toEqual(true);
expect(z.parse(a, undefined)).toEqual(false);
expect(z.parse(a, null)).toEqual(false);
expect(z.parse(a, "")).toEqual(false);
});
test("z.coerce.bigint", () => {
const a = z.coerce.bigint();
expect(z.parse(a, "123")).toEqual(BigInt(123));
expect(z.parse(a, 123)).toEqual(BigInt(123));
expect(() => z.parse(a, "abc")).toThrow();
});
test("z.coerce.date", () => {
const a = z.coerce.date();
const date = new Date();
expect(z.parse(a, date.toISOString())).toEqual(date);
expect(z.parse(a, date.getTime())).toEqual(date);
expect(() => z.parse(a, "invalid date")).toThrow();
});
test("z.iso.datetime", () => {
const d1 = "2021-01-01T00:00:00Z";
const d2 = "2021-01-01T00:00:00.123Z";
const d3 = "2021-01-01T00:00:00";
const d4 = "2021-01-01T00:00:00+07:00";
const d5 = "bad data";
// local: false, offset: false, precision: null
const a = z.iso.datetime();
expect(z.safeParse(a, d1).success).toEqual(true);
expect(z.safeParse(a, d2).success).toEqual(true);
expect(z.safeParse(a, d3).success).toEqual(false);
expect(z.safeParse(a, d4).success).toEqual(false);
expect(z.safeParse(a, d5).success).toEqual(false);
const b = z.iso.datetime({ local: true });
expect(z.safeParse(b, d1).success).toEqual(true);
expect(z.safeParse(b, d2).success).toEqual(true);
expect(z.safeParse(b, d3).success).toEqual(true);
expect(z.safeParse(b, d4).success).toEqual(false);
expect(z.safeParse(b, d5).success).toEqual(false);
const c = z.iso.datetime({ offset: true });
expect(z.safeParse(c, d1).success).toEqual(true);
expect(z.safeParse(c, d2).success).toEqual(true);
expect(z.safeParse(c, d3).success).toEqual(false);
expect(z.safeParse(c, d4).success).toEqual(true);
expect(z.safeParse(c, d5).success).toEqual(false);
const d = z.iso.datetime({ precision: 3 });
expect(z.safeParse(d, d1).success).toEqual(false);
expect(z.safeParse(d, d2).success).toEqual(true);
expect(z.safeParse(d, d3).success).toEqual(false);
expect(z.safeParse(d, d4).success).toEqual(false);
expect(z.safeParse(d, d5).success).toEqual(false);
});
test("z.iso.date", () => {
const d1 = "2021-01-01";
const d2 = "bad data";
const a = z.iso.date();
expect(z.safeParse(a, d1).success).toEqual(true);
expect(z.safeParse(a, d2).success).toEqual(false);
const b = z.string().check(z.iso.date());
expect(z.safeParse(b, d1).success).toEqual(true);
expect(z.safeParse(b, d2).success).toEqual(false);
});
test("z.iso.time", () => {
const d1 = "00:00:00";
const d2 = "00:00:00.123";
const d3 = "bad data";
const a = z.iso.time();
expect(z.safeParse(a, d1).success).toEqual(true);
expect(z.safeParse(a, d2).success).toEqual(true);
expect(z.safeParse(a, d3).success).toEqual(false);
const b = z.iso.time({ precision: 3 });
expect(z.safeParse(b, d1).success).toEqual(false);
expect(z.safeParse(b, d2).success).toEqual(true);
expect(z.safeParse(b, d3).success).toEqual(false);
const c = z.string().check(z.iso.time());
expect(z.safeParse(c, d1).success).toEqual(true);
expect(z.safeParse(c, d2).success).toEqual(true);
expect(z.safeParse(c, d3).success).toEqual(false);
});
test("z.iso.duration", () => {
const d1 = "P3Y6M4DT12H30M5S";
const d2 = "bad data";
const a = z.iso.duration();
expect(z.safeParse(a, d1).success).toEqual(true);
expect(z.safeParse(a, d2).success).toEqual(false);
const b = z.string().check(z.iso.duration());
expect(z.safeParse(b, d1).success).toEqual(true);
expect(z.safeParse(b, d2).success).toEqual(false);
});
test("z.undefined", () => {
const a = z.undefined();
expect(z.parse(a, undefined)).toEqual(undefined);
expect(() => z.parse(a, "undefined")).toThrow();
});
test("z.null", () => {
const a = z.null();
expect(z.parse(a, null)).toEqual(null);
expect(() => z.parse(a, "null")).toThrow();
});
test("z.any", () => {
const a = z.any();
expect(z.parse(a, "hello")).toEqual("hello");
expect(z.parse(a, 123)).toEqual(123);
expect(z.parse(a, true)).toEqual(true);
expect(z.parse(a, null)).toEqual(null);
expect(z.parse(a, undefined)).toEqual(undefined);
z.parse(a, {});
z.parse(a, []);
z.parse(a, Symbol());
z.parse(a, new Date());
});
test("z.unknown", () => {
const a = z.unknown();
expect(z.parse(a, "hello")).toEqual("hello");
expect(z.parse(a, 123)).toEqual(123);
expect(z.parse(a, true)).toEqual(true);
expect(z.parse(a, null)).toEqual(null);
expect(z.parse(a, undefined)).toEqual(undefined);
z.parse(a, {});
z.parse(a, []);
z.parse(a, Symbol());
z.parse(a, new Date());
});
test("z.never", () => {
const a = z.never();
expect(() => z.parse(a, "hello")).toThrow();
});
test("z.void", () => {
const a = z.void();
expect(z.parse(a, undefined)).toEqual(undefined);
expect(() => z.parse(a, null)).toThrow();
});
test("z.array", () => {
const a = z.array(z.string());
expect(z.parse(a, ["hello", "world"])).toEqual(["hello", "world"]);
expect(() => z.parse(a, [123])).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
});
test("z.union", () => {
const a = z.union([z.string(), z.number()]);
expect(z.parse(a, "hello")).toEqual("hello");
expect(z.parse(a, 123)).toEqual(123);
expect(() => z.parse(a, true)).toThrow();
});
test("z.intersection", () => {
const a = z.intersection(z.object({ a: z.string() }), z.object({ b: z.number() }));
expect(z.parse(a, { a: "hello", b: 123 })).toEqual({ a: "hello", b: 123 });
expect(() => z.parse(a, { a: "hello" })).toThrow();
expect(() => z.parse(a, { b: 123 })).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
});
test("z.tuple", () => {
const a = z.tuple([z.string(), z.number()]);
expect(z.parse(a, ["hello", 123])).toEqual(["hello", 123]);
expect(() => z.parse(a, ["hello", "world"])).toThrow();
expect(() => z.parse(a, [123, 456])).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
// tuple with rest
const b = z.tuple([z.string(), z.number(), z.optional(z.string())], z.boolean());
type b = z.output<typeof b>;
expectTypeOf<b>().toEqualTypeOf<[string, number, string?, ...boolean[]]>();
const datas = [
["hello", 123],
["hello", 123, "world"],
["hello", 123, "world", true],
["hello", 123, "world", true, false, true],
];
for (const data of datas) {
expect(z.parse(b, data)).toEqual(data);
}
expect(() => z.parse(b, ["hello", 123, 123])).toThrow();
expect(() => z.parse(b, ["hello", 123, "world", 123])).toThrow();
// tuple with readonly args
const cArgs = [z.string(), z.number(), z.optional(z.string())] as const;
const c = z.tuple(cArgs, z.boolean());
type c = z.output<typeof c>;
expectTypeOf<c>().toEqualTypeOf<[string, number, string?, ...boolean[]]>();
});
test("z.record", () => {
// record schema with enum keys
const a = z.record(z.string(), z.string());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<Record<string, string>>();
const b = z.record(z.union([z.string(), z.number(), z.symbol()]), z.string());
type b = z.output<typeof b>;
expectTypeOf<b>().toEqualTypeOf<Record<string | number | symbol, string>>();
expect(z.parse(b, { a: "hello", 1: "world", [Symbol.for("asdf")]: "symbol" })).toEqual({
a: "hello",
1: "world",
[Symbol.for("asdf")]: "symbol",
});
// enum keys
const c = z.record(z.enum(["a", "b", "c"]), z.string());
type c = z.output<typeof c>;
expectTypeOf<c>().toEqualTypeOf<Record<"a" | "b" | "c", string>>();
expect(z.parse(c, { a: "hello", b: "world", c: "world" })).toEqual({
a: "hello",
b: "world",
c: "world",
});
// missing keys
expect(() => z.parse(c, { a: "hello", b: "world" })).toThrow();
// extra keys
expect(() => z.parse(c, { a: "hello", b: "world", c: "world", d: "world" })).toThrow();
});
test("z.map", () => {
const a = z.map(z.string(), z.number());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<Map<string, number>>();
expect(z.parse(a, new Map([["hello", 123]]))).toEqual(new Map([["hello", 123]]));
expect(() => z.parse(a, new Map([["hello", "world"]]))).toThrow();
expect(() => z.parse(a, new Map([[1243, "world"]]))).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
const r1 = z.safeParse(a, new Map([[123, 123]]));
expect(r1.error?.issues[0].code).toEqual("invalid_type");
expect(r1.error?.issues[0].path).toEqual([123]);
const r2: any = z.safeParse(a, new Map([[BigInt(123), 123]]));
expect(r2.error!.issues[0].code).toEqual("invalid_key");
expect(r2.error!.issues[0].path).toEqual([]);
const r3: any = z.safeParse(a, new Map([["hello", "world"]]));
expect(r3.error!.issues[0].code).toEqual("invalid_type");
expect(r3.error!.issues[0].path).toEqual(["hello"]);
});
test("z.map invalid_element", () => {
const a = z.map(z.bigint(), z.number());
const r1 = z.safeParse(a, new Map([[BigInt(123), BigInt(123)]]));
expect(r1.error!.issues[0].code).toEqual("invalid_element");
expect(r1.error!.issues[0].path).toEqual([]);
});
test("z.map async", async () => {
const a = z.map(z.string().check(z.refine(async () => true)), z.number().check(z.refine(async () => true)));
const d1 = new Map([["hello", 123]]);
expect(await z.parseAsync(a, d1)).toEqual(d1);
await expect(z.parseAsync(a, new Map([[123, 123]]))).rejects.toThrow();
await expect(z.parseAsync(a, new Map([["hi", "world"]]))).rejects.toThrow();
await expect(z.parseAsync(a, new Map([[1243, "world"]]))).rejects.toThrow();
await expect(z.parseAsync(a, "hello")).rejects.toThrow();
const r = await z.safeParseAsync(a, new Map([[123, 123]]));
expect(r.success).toEqual(false);
expect(r.error!.issues[0].code).toEqual("invalid_type");
expect(r.error!.issues[0].path).toEqual([123]);
});
test("z.set", () => {
const a = z.set(z.string());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<Set<string>>();
expect(z.parse(a, new Set(["hello", "world"]))).toEqual(new Set(["hello", "world"]));
expect(() => z.parse(a, new Set([123]))).toThrow();
expect(() => z.parse(a, ["hello", "world"])).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
const b = z.set(z.number());
expect(z.parse(b, new Set([1, 2, 3]))).toEqual(new Set([1, 2, 3]));
expect(() => z.parse(b, new Set(["hello"]))).toThrow();
expect(() => z.parse(b, [1, 2, 3])).toThrow();
expect(() => z.parse(b, 123)).toThrow();
});
test("z.enum", () => {
const a = z.enum(["A", "B", "C"]);
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<"A" | "B" | "C">();
expect(z.parse(a, "A")).toEqual("A");
expect(z.parse(a, "B")).toEqual("B");
expect(z.parse(a, "C")).toEqual("C");
expect(() => z.parse(a, "D")).toThrow();
expect(() => z.parse(a, 123)).toThrow();
// expect(a.enum.A).toEqual("A");
// expect(a.enum.B).toEqual("B");
// expect(a.enum.C).toEqual("C");
// expect((a.enum as any).D).toEqual(undefined);
});
test("z.enum - native", () => {
enum NativeEnum {
A = "A",
B = "B",
C = "C",
}
const a = z.enum(NativeEnum);
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<NativeEnum>();
expect(z.parse(a, NativeEnum.A)).toEqual(NativeEnum.A);
expect(z.parse(a, NativeEnum.B)).toEqual(NativeEnum.B);
expect(z.parse(a, NativeEnum.C)).toEqual(NativeEnum.C);
expect(() => z.parse(a, "D")).toThrow();
expect(() => z.parse(a, 123)).toThrow();
// test a.enum
a;
// expect(a.enum.A).toEqual(NativeEnum.A);
// expect(a.enum.B).toEqual(NativeEnum.B);
// expect(a.enum.C).toEqual(NativeEnum.C);
});
test("z.nativeEnum", () => {
enum NativeEnum {
A = "A",
B = "B",
C = "C",
}
const a = z.nativeEnum(NativeEnum);
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<NativeEnum>();
expect(z.parse(a, NativeEnum.A)).toEqual(NativeEnum.A);
expect(z.parse(a, NativeEnum.B)).toEqual(NativeEnum.B);
expect(z.parse(a, NativeEnum.C)).toEqual(NativeEnum.C);
expect(() => z.parse(a, "D")).toThrow();
expect(() => z.parse(a, 123)).toThrow();
// test a.enum
a;
// expect(a.enum.A).toEqual(NativeEnum.A);
// expect(a.enum.B).toEqual(NativeEnum.B);
// expect(a.enum.C).toEqual(NativeEnum.C);
});
test("z.literal", () => {
const a = z.literal("hello");
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<"hello">();
expect(z.parse(a, "hello")).toEqual("hello");
expect(() => z.parse(a, "world")).toThrow();
expect(() => z.parse(a, 123)).toThrow();
z.literal(["adf"] as const);
});
test("z.file", () => {
const a = z.file();
const file = new File(["content"], "filename.txt", { type: "text/plain" });
expect(z.parse(a, file)).toEqual(file);
expect(() => z.parse(a, "file")).toThrow();
expect(() => z.parse(a, 123)).toThrow();
});
test("z.transform", () => {
const a = z.pipe(
z.string(),
z.transform((val) => val.toUpperCase())
);
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
expect(z.parse(a, "hello")).toEqual("HELLO");
expect(() => z.parse(a, 123)).toThrow();
});
test("z.transform async", async () => {
const a = z.pipe(
z.string(),
z.transform(async (val) => val.toUpperCase())
);
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
expect(await z.parseAsync(a, "hello")).toEqual("HELLO");
await expect(() => z.parseAsync(a, 123)).rejects.toThrow();
});
test("z.preprocess", () => {
const a = z.pipe(
z.transform((val) => String(val).toUpperCase()),
z.string()
);
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
expect(z.parse(a, 123)).toEqual("123");
expect(z.parse(a, true)).toEqual("TRUE");
expect(z.parse(a, BigInt(1234))).toEqual("1234");
// expect(() => z.parse(a, Symbol("asdf"))).toThrow();
});
// test("z.preprocess async", () => {
// const a = z.preprocess(async (val) => String(val), z.string());
// type a = z.output<typeof a>;
// expectTypeOf<a>().toEqualTypeOf<string>();
// expect(z.parse(a, 123)).toEqual("123");
// expect(z.parse(a, true)).toEqual("true");
// expect(() => z.parse(a, {})).toThrow();
// });
test("z.optional", () => {
const a = z.optional(z.string());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string | undefined>();
expect(z.parse(a, "hello")).toEqual("hello");
expect(z.parse(a, undefined)).toEqual(undefined);
expect(() => z.parse(a, 123)).toThrow();
});
test("z.nullable", () => {
const a = z.nullable(z.string());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string | null>();
expect(z.parse(a, "hello")).toEqual("hello");
expect(z.parse(a, null)).toEqual(null);
expect(() => z.parse(a, 123)).toThrow();
});
test("z.default", () => {
const a = z._default(z.string(), "default");
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
expect(z.parse(a, undefined)).toEqual("default");
expect(z.parse(a, "hello")).toEqual("hello");
expect(() => z.parse(a, 123)).toThrow();
const b = z._default(z.string(), () => "default");
expect(z.parse(b, undefined)).toEqual("default");
expect(z.parse(b, "hello")).toEqual("hello");
expect(() => z.parse(b, 123)).toThrow();
});
test("z.catch", () => {
const a = z.catch(z.string(), "default");
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
expect(z.parse(a, "hello")).toEqual("hello");
expect(z.parse(a, 123)).toEqual("default");
const b = z.catch(z.string(), () => "default");
expect(z.parse(b, "hello")).toEqual("hello");
expect(z.parse(b, 123)).toEqual("default");
const c = z.catch(z.string(), (ctx) => {
return `${ctx.error.issues.length}issues`;
});
expect(z.parse(c, 1234)).toEqual("1issues");
});
test("z.nan", () => {
const a = z.nan();
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<number>();
expect(z.parse(a, Number.NaN)).toEqual(Number.NaN);
expect(() => z.parse(a, 123)).toThrow();
expect(() => z.parse(a, "NaN")).toThrow();
});
test("z.pipe", () => {
const a = z.pipe(
z.pipe(
z.string(),
z.transform((val) => val.length)
),
z.number()
);
type a_in = z.input<typeof a>;
expectTypeOf<a_in>().toEqualTypeOf<string>();
type a_out = z.output<typeof a>;
expectTypeOf<a_out>().toEqualTypeOf<number>();
expect(z.parse(a, "123")).toEqual(3);
expect(z.parse(a, "hello")).toEqual(5);
expect(() => z.parse(a, 123)).toThrow();
});
test("z.readonly", () => {
const a = z.readonly(z.string());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<Readonly<string>>();
expect(z.parse(a, "hello")).toEqual("hello");
expect(() => z.parse(a, 123)).toThrow();
});
test("z.templateLiteral", () => {
const a = z.templateLiteral([z.string(), z.number()]);
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<`${string}${number}`>();
expect(z.parse(a, "hello123")).toEqual("hello123");
expect(() => z.parse(a, "hello")).toThrow();
expect(() => z.parse(a, 123)).toThrow();
// multipart
const b = z.templateLiteral([z.string(), z.number(), z.string()]);
type b = z.output<typeof b>;
expectTypeOf<b>().toEqualTypeOf<`${string}${number}${string}`>();
expect(z.parse(b, "hello123world")).toEqual("hello123world");
expect(z.parse(b, "123")).toEqual("123");
expect(() => z.parse(b, "hello")).toThrow();
expect(() => z.parse(b, 123)).toThrow();
// include boolean
const c = z.templateLiteral([z.string(), z.boolean()]);
type c = z.output<typeof c>;
expectTypeOf<c>().toEqualTypeOf<`${string}${boolean}`>();
expect(z.parse(c, "hellotrue")).toEqual("hellotrue");
expect(z.parse(c, "hellofalse")).toEqual("hellofalse");
expect(() => z.parse(c, "hello")).toThrow();
expect(() => z.parse(c, 123)).toThrow();
// include literal prefix
const d = z.templateLiteral([z.literal("hello"), z.number()]);
type d = z.output<typeof d>;
expectTypeOf<d>().toEqualTypeOf<`hello${number}`>();
expect(z.parse(d, "hello123")).toEqual("hello123");
expect(() => z.parse(d, 123)).toThrow();
expect(() => z.parse(d, "world123")).toThrow();
// include literal union
const e = z.templateLiteral([z.literal(["aa", "bb"]), z.number()]);
type e = z.output<typeof e>;
expectTypeOf<e>().toEqualTypeOf<`aa${number}` | `bb${number}`>();
expect(z.parse(e, "aa123")).toEqual("aa123");
expect(z.parse(e, "bb123")).toEqual("bb123");
expect(() => z.parse(e, "cc123")).toThrow();
expect(() => z.parse(e, 123)).toThrow();
});
// this returns both a schema and a check
test("z.custom", () => {
const a = z.custom((val) => {
return typeof val === "string";
});
expect(z.parse(a, "hello")).toEqual("hello");
expect(() => z.parse(a, 123)).toThrow();
const b = z.string().check(z.custom((val) => val.length > 3));
expect(z.parse(b, "hello")).toEqual("hello");
expect(() => z.parse(b, "hi")).toThrow();
});
test("z.check", () => {
// this is a more flexible version of z.custom that accepts an arbitrary _parse logic
// the function should return core.$ZodResult
const a = z.any().check(
z.check<string>((ctx) => {
if (typeof ctx.value === "string") return;
ctx.issues.push({
code: "custom",
origin: "custom",
message: "Expected a string",
input: ctx.value,
});
})
);
expect(z.safeParse(a, "hello")).toMatchObject({
success: true,
data: "hello",
});
expect(z.safeParse(a, 123)).toMatchObject({
success: false,
error: { issues: [{ code: "custom", message: "Expected a string" }] },
});
});
test("z.instanceof", () => {
class A {}
const a = z.instanceof(A);
expect(z.parse(a, new A())).toBeInstanceOf(A);
expect(() => z.parse(a, {})).toThrow();
});
test("z.refine", () => {
const a = z.number().check(
z.refine((val) => val > 3),
z.refine((val) => val < 10)
);
expect(z.parse(a, 5)).toEqual(5);
expect(() => z.parse(a, 2)).toThrow();
expect(() => z.parse(a, 11)).toThrow();
expect(() => z.parse(a, "hi")).toThrow();
});
// test("z.superRefine", () => {
// const a = z.number([
// z.superRefine((val, ctx) => {
// if (val < 3) {
// return ctx.addIssue({
// code: "custom",
// origin: "custom",
// message: "Too small",
// input: val,
// });
// }
// if (val > 10) {
// return ctx.addIssue("Too big");
// }
// }),
// ]);
// expect(z.parse(a, 5)).toEqual(5);
// expect(() => z.parse(a, 2)).toThrow();
// expect(() => z.parse(a, 11)).toThrow();
// expect(() => z.parse(a, "hi")).toThrow();
// });
test("z.transform", () => {
const a = z.transform((val: number) => {
return `${val}`;
});
type a_in = z.input<typeof a>;
expectTypeOf<a_in>().toEqualTypeOf<number>();
type a_out = z.output<typeof a>;
expectTypeOf<a_out>().toEqualTypeOf<string>();
expect(z.parse(a, 123)).toEqual("123");
});
test("z.$brand()", () => {
const a = z.string().brand<"my-brand">();
type a = z.output<typeof a>;
const branded = (_: a) => {};
// @ts-expect-error
branded("asdf");
});
test("z.lazy", () => {
const a = z.lazy(() => z.string());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
expect(z.parse(a, "hello")).toEqual("hello");
expect(() => z.parse(a, 123)).toThrow();
});
// schema that validates JSON-like data
test("z.json", () => {
const a = z.json();
type a = z.output<typeof a>;
a._zod.output;
expectTypeOf<a>().toEqualTypeOf<util.JSONType>();
expect(z.parse(a, "hello")).toEqual("hello");
expect(z.parse(a, 123)).toEqual(123);
expect(z.parse(a, true)).toEqual(true);
expect(z.parse(a, null)).toEqual(null);
expect(z.parse(a, {})).toEqual({});
expect(z.parse(a, { a: "hello" })).toEqual({ a: "hello" });
expect(z.parse(a, [1, 2, 3])).toEqual([1, 2, 3]);
expect(z.parse(a, [{ a: "hello" }])).toEqual([{ a: "hello" }]);
// fail cases
expect(() => z.parse(a, new Date())).toThrow();
expect(() => z.parse(a, Symbol())).toThrow();
expect(() => z.parse(a, { a: new Date() })).toThrow();
expect(() => z.parse(a, undefined)).toThrow();
expect(() => z.parse(a, { a: undefined })).toThrow();
});
test("z.stringbool", () => {
const a = z.stringbool();
expect(z.parse(a, "true")).toEqual(true);
expect(z.parse(a, "yes")).toEqual(true);
expect(z.parse(a, "1")).toEqual(true);
expect(z.parse(a, "on")).toEqual(true);
expect(z.parse(a, "y")).toEqual(true);
expect(z.parse(a, "enabled")).toEqual(true);
expect(z.parse(a, "TRUE")).toEqual(true);
expect(z.parse(a, "false")).toEqual(false);
expect(z.parse(a, "no")).toEqual(false);
expect(z.parse(a, "0")).toEqual(false);
expect(z.parse(a, "off")).toEqual(false);
expect(z.parse(a, "n")).toEqual(false);
expect(z.parse(a, "disabled")).toEqual(false);
expect(z.parse(a, "FALSE")).toEqual(false);
expect(z.safeParse(a, "other")).toMatchObject({ success: false });
expect(z.safeParse(a, "")).toMatchObject({ success: false });
expect(z.safeParse(a, undefined)).toMatchObject({ success: false });
expect(z.safeParse(a, {})).toMatchObject({ success: false });
expect(z.safeParse(a, true)).toMatchObject({ success: false });
expect(z.safeParse(a, false)).toMatchObject({ success: false });
const b = z.stringbool({
truthy: ["y"],
falsy: ["n"],
});
expect(z.parse(b, "y")).toEqual(true);
expect(z.parse(b, "n")).toEqual(false);
expect(z.safeParse(b, "true")).toMatchObject({ success: false });
expect(z.safeParse(b, "false")).toMatchObject({ success: false });
const c = z.stringbool({
case: "sensitive",
});
expect(z.parse(c, "true")).toEqual(true);
expect(z.safeParse(c, "TRUE")).toMatchObject({ success: false });
});
// promise
test("z.promise", async () => {
const a = z.promise(z.string());
type a = z.output<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
expect(await z.safeParseAsync(a, Promise.resolve("hello"))).toMatchObject({
success: true,
data: "hello",
});
expect(await z.safeParseAsync(a, Promise.resolve(123))).toMatchObject({
success: false,
});
const b = z.string();
expect(() => z.parse(b, Promise.resolve("hello"))).toThrow();
});
// test("type assertions", () => {
// const schema = z.pipe(
// z.string(),
// z.transform((val) => val.length)
// );
// schema.assertInput<string>();
// // @ts-expect-error
// schema.assertInput<number>();
// schema.assertOutput<number>();
// // @ts-expect-error
// schema.assertOutput<string>();
// });
test("z.pipe type enforcement", () => {
z.pipe(
z.pipe(
z.string().check(z.regex(/asdf/)),
z.transform((v) => new Date(v))
),
z.date().check(z.maximum(new Date()))
);
});
test("def typing", () => {
z.string().def.type satisfies "string";
z.email().def.format satisfies "email";
z.number().def.type satisfies "number";
z.float64().def.format satisfies z.core.$ZodNumberFormats;
z.bigint().def.type satisfies "bigint";
z.boolean().def.type satisfies "boolean";
z.date().def.type satisfies "date";
z.symbol().def.type satisfies "symbol";
z.undefined().def.type satisfies "undefined";
z.nullable(z.string()).def.type satisfies "nullable";
z.null().def.type satisfies "null";
z.any().def.type satisfies "any";
z.unknown().def.type satisfies "unknown";
z.never().def.type satisfies "never";
z.void().def.type satisfies "void";
z.array(z.string()).def.type satisfies "array";
z.object({ key: z.string() }).def.type satisfies "object";
z.union([z.string(), z.number()]).def.type satisfies "union";
z.intersection(z.string(), z.number()).def.type satisfies "intersection";
z.tuple([z.string(), z.number()]).def.type satisfies "tuple";
z.record(z.string(), z.number()).def.type satisfies "record";
z.map(z.string(), z.number()).def.type satisfies "map";
z.set(z.string()).def.type satisfies "set";
z.literal("example").def.type satisfies "literal";
expectTypeOf(z.literal("example").def.values).toEqualTypeOf<"example"[]>();
z.enum(["a", "b", "c"]).def.type satisfies "enum";
z.promise(z.string()).def.type satisfies "promise";
z.lazy(() => z.string()).def.type satisfies "lazy";
z.optional(z.string()).def.type satisfies "optional";
z._default(z.string(), "default").def.type satisfies "default";
z.templateLiteral([z.literal("a"), z.literal("b")]).def.type satisfies "template_literal";
z.custom<string>((val) => typeof val === "string").def.type satisfies "custom";
z.transform((val) => val as string).def.type satisfies "transform";
z.nonoptional(z.string()).def.type satisfies "nonoptional";
z.readonly(z.unknown()).def.type satisfies "readonly";
z.nan().def.type satisfies "nan";
z.pipe(z.unknown(), z.number()).def.type satisfies "pipe";
z.success(z.string()).def.type satisfies "success";
z.catch(z.string(), "fallback").def.type satisfies "catch";
z.file().def.type satisfies "file";
});
@@ -0,0 +1,4 @@
/** @type {Array<Unsafe>} */
export const unsafe: Array<Unsafe>;
import type { Unsafe } from 'mdast-util-to-markdown';
//# sourceMappingURL=unsafe.d.ts.map
@@ -0,0 +1,5 @@
<svg viewbox="0 0 18 18">
<line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line>
<line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"></line>
<line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"></line>
</svg>

After

Width:  |  Height:  |  Size: 223 B

@@ -0,0 +1,14 @@
import type { Action, Dispatch } from 'redux'
export function createInvalidArgFactory(arg: unknown, name: string) {
return (
dispatch: Dispatch<Action<string>>,
options: { readonly wrappedComponentName: string },
) => {
throw new Error(
`Invalid value of type ${typeof arg} for ${name} argument when connecting component ${
options.wrappedComponentName
}.`,
)
}
}
@@ -0,0 +1 @@
{"version":3,"names":["JSXAttribute","node","print","name","value","token","JSXIdentifier","word","JSXNamespacedName","namespace","JSXMemberExpression","object","property","JSXSpreadAttribute","argument","rightBrace","JSXExpressionContainer","expression","JSXSpreadChild","JSXText","raw","getPossibleRaw","undefined","JSXElement","open","openingElement","selfClosing","indent","child","children","dedent","closingElement","spaceSeparator","space","JSXOpeningElement","typeArguments","typeParameters","attributes","length","printJoin","JSXClosingElement","JSXEmptyExpression","printInnerComments","JSXFragment","openingFragment","closingFragment","JSXOpeningFragment","JSXClosingFragment"],"sources":["../../src/generators/jsx.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport type * as t from \"@babel/types\";\n\nexport function JSXAttribute(this: Printer, node: t.JSXAttribute) {\n this.print(node.name);\n if (node.value) {\n this.token(\"=\");\n this.print(node.value);\n }\n}\n\nexport function JSXIdentifier(this: Printer, node: t.JSXIdentifier) {\n this.word(node.name);\n}\n\nexport function JSXNamespacedName(this: Printer, node: t.JSXNamespacedName) {\n this.print(node.namespace);\n this.token(\":\");\n this.print(node.name);\n}\n\nexport function JSXMemberExpression(\n this: Printer,\n node: t.JSXMemberExpression,\n) {\n this.print(node.object);\n this.token(\".\");\n this.print(node.property);\n}\n\nexport function JSXSpreadAttribute(this: Printer, node: t.JSXSpreadAttribute) {\n this.token(\"{\");\n this.token(\"...\");\n this.print(node.argument);\n this.rightBrace(node);\n}\n\nexport function JSXExpressionContainer(\n this: Printer,\n node: t.JSXExpressionContainer,\n) {\n this.token(\"{\");\n this.print(node.expression);\n this.rightBrace(node);\n}\n\nexport function JSXSpreadChild(this: Printer, node: t.JSXSpreadChild) {\n this.token(\"{\");\n this.token(\"...\");\n this.print(node.expression);\n this.rightBrace(node);\n}\n\nexport function JSXText(this: Printer, node: t.JSXText) {\n const raw = this.getPossibleRaw(node);\n\n if (raw !== undefined) {\n this.token(raw, true);\n } else {\n this.token(node.value, true);\n }\n}\n\nexport function JSXElement(this: Printer, node: t.JSXElement) {\n const open = node.openingElement;\n this.print(open);\n if (open.selfClosing) return;\n\n this.indent();\n for (const child of node.children) {\n this.print(child);\n }\n this.dedent();\n\n this.print(node.closingElement);\n}\n\nfunction spaceSeparator(this: Printer) {\n this.space();\n}\n\nexport function JSXOpeningElement(this: Printer, node: t.JSXOpeningElement) {\n this.token(\"<\");\n this.print(node.name);\n if (process.env.BABEL_8_BREAKING) {\n //@ts-ignore(Babel 7 vs Babel 8) Babel 8 AST\n this.print(node.typeArguments);\n } else {\n if (node.typeArguments) {\n this.print(node.typeArguments); // Flow AST\n }\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n this.print(node.typeParameters); // Legacy TS AST\n }\n\n if (node.attributes.length > 0) {\n this.space();\n this.printJoin(node.attributes, undefined, undefined, spaceSeparator);\n }\n if (node.selfClosing) {\n this.space();\n this.token(\"/\");\n }\n this.token(\">\");\n}\n\nexport function JSXClosingElement(this: Printer, node: t.JSXClosingElement) {\n this.token(\"<\");\n this.token(\"/\");\n this.print(node.name);\n this.token(\">\");\n}\n\nexport function JSXEmptyExpression(this: Printer) {\n // This node is empty, so forcefully print its inner comments.\n this.printInnerComments();\n}\n\nexport function JSXFragment(this: Printer, node: t.JSXFragment) {\n this.print(node.openingFragment);\n\n this.indent();\n for (const child of node.children) {\n this.print(child);\n }\n this.dedent();\n\n this.print(node.closingFragment);\n}\n\nexport function JSXOpeningFragment(this: Printer) {\n this.token(\"<\");\n this.token(\">\");\n}\n\nexport function JSXClosingFragment(this: Printer) {\n this.token(\"</\");\n this.token(\">\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGO,SAASA,YAAYA,CAAgBC,IAAoB,EAAE;EAChE,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,IAAI,CAAC;EACrB,IAAIF,IAAI,CAACG,KAAK,EAAE;IACd,IAAI,CAACC,SAAK,GAAI,CAAC;IACf,IAAI,CAACH,KAAK,CAACD,IAAI,CAACG,KAAK,CAAC;EACxB;AACF;AAEO,SAASE,aAAaA,CAAgBL,IAAqB,EAAE;EAClE,IAAI,CAACM,IAAI,CAACN,IAAI,CAACE,IAAI,CAAC;AACtB;AAEO,SAASK,iBAAiBA,CAAgBP,IAAyB,EAAE;EAC1E,IAAI,CAACC,KAAK,CAACD,IAAI,CAACQ,SAAS,CAAC;EAC1B,IAAI,CAACJ,SAAK,GAAI,CAAC;EACf,IAAI,CAACH,KAAK,CAACD,IAAI,CAACE,IAAI,CAAC;AACvB;AAEO,SAASO,mBAAmBA,CAEjCT,IAA2B,EAC3B;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACU,MAAM,CAAC;EACvB,IAAI,CAACN,SAAK,GAAI,CAAC;EACf,IAAI,CAACH,KAAK,CAACD,IAAI,CAACW,QAAQ,CAAC;AAC3B;AAEO,SAASC,kBAAkBA,CAAgBZ,IAA0B,EAAE;EAC5E,IAAI,CAACI,SAAK,IAAI,CAAC;EACf,IAAI,CAACA,KAAK,CAAC,KAAK,CAAC;EACjB,IAAI,CAACH,KAAK,CAACD,IAAI,CAACa,QAAQ,CAAC;EACzB,IAAI,CAACC,UAAU,CAACd,IAAI,CAAC;AACvB;AAEO,SAASe,sBAAsBA,CAEpLine truncated
@@ -0,0 +1,60 @@
# By default gyp/msbuild build for 32-bit Windows. This gyp include file
# defines configurations for both 32-bit and 64-bit Windows. To use it, run:
#
# C:\...\winpty\src>gyp -I configurations.gypi
#
# This command generates Visual Studio project files with a Release
# configuration and two Platforms--Win32 and x64. Both can be built:
#
# C:\...\winpty\src>msbuild winpty.sln /p:Platform=Win32
# C:\...\winpty\src>msbuild winpty.sln /p:Platform=x64
#
# The output is placed in:
#
# C:\...\winpty\src\Release\Win32
# C:\...\winpty\src\Release\x64
#
# Windows XP note: By default, the project files will use the default "toolset"
# for the given MSVC version. For MSVC 2013 and MSVC 2015, the default toolset
# generates binaries that do not run on Windows XP. To target Windows XP,
# select the XP-specific toolset by passing
# -D WINPTY_MSBUILD_TOOLSET={v120_xp,v140_xp} to gyp (v120_xp == MSVC 2013,
# v140_xp == MSVC 2015). Unfortunately, it isn't possible to have a single
# project file with configurations for both XP and post-XP. This seems to be a
# limitation of the MSVC project file format.
#
# This file is not included by default, because I suspect it would interfere
# with node-gyp, which has a different system for building 32-vs-64-bit
# binaries. It uses a common.gypi, and the project files it generates can only
# build a single architecture, the output paths are not differentiated by
# architecture.
{
'variables': {
'WINPTY_MSBUILD_TOOLSET%': '',
},
'target_defaults': {
'default_configuration': 'Release_Win32',
'configurations': {
'Release_Win32': {
'msvs_configuration_platform': 'Win32',
},
'Release_x64': {
'msvs_configuration_platform': 'x64',
},
},
'msvs_configuration_attributes': {
'OutputDirectory': '$(SolutionDir)$(ConfigurationName)\\$(Platform)',
'IntermediateDirectory': '$(ConfigurationName)\\$(Platform)\\obj\\$(ProjectName)',
},
'msvs_settings': {
'VCLinkerTool': {
'SubSystem': '1', # /SUBSYSTEM:CONSOLE
},
'VCCLCompilerTool': {
'RuntimeLibrary': '0', # MultiThreaded (/MT)
},
},
'msbuild_toolset' : '<(WINPTY_MSBUILD_TOOLSET)',
}
}
@@ -0,0 +1,605 @@
# mdast-util-gfm-table
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
[![Sponsors][sponsors-badge]][collective]
[![Backers][backers-badge]][collective]
[![Chat][chat-badge]][chat]
[mdast][] extensions to parse and serialize [GFM][] tables.
## Contents
* [What is this?](#what-is-this)
* [When to use this](#when-to-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`gfmTableFromMarkdown`](#gfmtablefrommarkdown)
* [`gfmTableToMarkdown(options?)`](#gfmtabletomarkdownoptions)
* [`Options`](#options)
* [Examples](#examples)
* [Example: `stringLength`](#example-stringlength)
* [HTML](#html)
* [Syntax](#syntax)
* [Syntax tree](#syntax-tree)
* [Nodes](#nodes)
* [Enumeration](#enumeration)
* [Content model](#content-model)
* [Types](#types)
* [Compatibility](#compatibility)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This package contains two extensions that add support for GFM table syntax in
markdown to [mdast][].
These extensions plug into
[`mdast-util-from-markdown`][mdast-util-from-markdown] (to support parsing
tables in markdown into a syntax tree) and
[`mdast-util-to-markdown`][mdast-util-to-markdown] (to support serializing
tables in syntax trees to markdown).
## When to use this
You can use these extensions when you are working with
`mdast-util-from-markdown` and `mdast-util-to-markdown` already.
When working with `mdast-util-from-markdown`, you must combine this package
with [`micromark-extension-gfm-table`][extension].
When you don’t need a syntax tree, you can use [`micromark`][micromark]
directly with `micromark-extension-gfm-table`.
When you are working with syntax trees and want all of GFM, use
[`mdast-util-gfm`][mdast-util-gfm] instead.
All these packages are used [`remark-gfm`][remark-gfm], which
focusses on making it easier to transform content by abstracting these
internals away.
This utility does not handle how markdown is turned to HTML.
That’s done by [`mdast-util-to-hast`][mdast-util-to-hast].
## Install
This package is [ESM only][esm].
In Node.js (version 16+), install with [npm][]:
```sh
npm install mdast-util-gfm-table
```
In Deno with [`esm.sh`][esmsh]:
```js
import {gfmTableFromMarkdown, gfmTableToMarkdown} from 'https://esm.sh/mdast-util-gfm-table@2'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import {gfmTableFromMarkdown, gfmTableToMarkdown} from 'https://esm.sh/mdast-util-gfm-table@2?bundle'
</script>
```
## Use
Say our document `example.md` contains:
```markdown
| a | b | c | d |
| - | :- | -: | :-: |
| e | f |
| g | h | i | j | k |
```
…and our module `example.js` looks as follows:
```js
import fs from 'node:fs/promises'
import {gfmTable} from 'micromark-extension-gfm-table'
import {fromMarkdown} from 'mdast-util-from-markdown'
import {gfmTableFromMarkdown, gfmTableToMarkdown} from 'mdast-util-gfm-table'
import {toMarkdown} from 'mdast-util-to-markdown'
const doc = await fs.readFile('example.md')
const tree = fromMarkdown(doc, {
extensions: [gfmTable()],
mdastExtensions: [gfmTableFromMarkdown()]
})
console.log(tree)
const out = toMarkdown(tree, {extensions: [gfmTableToMarkdown()]})
console.log(out)
```
…now running `node example.js` yields (positional info removed for brevity):
```js
{
type: 'root',
children: [
{
type: 'table',
align: [null, 'left', 'right', 'center'],
children: [
{
type: 'tableRow',
children: [
{type: 'tableCell', children: [{type: 'text', value: 'a'}]},
{type: 'tableCell', children: [{type: 'text', value: 'b'}]},
{type: 'tableCell', children: [{type: 'text', value: 'c'}]},
{type: 'tableCell', children: [{type: 'text', value: 'd'}]}
]
},
{
type: 'tableRow',
children: [
{type: 'tableCell', children: [{type: 'text', value: 'e'}]},
{type: 'tableCell', children: [{type: 'text', value: 'f'}]}
]
},
{
type: 'tableRow',
children: [
{type: 'tableCell', children: [{type: 'text', value: 'g'}]},
{type: 'tableCell', children: [{type: 'text', value: 'h'}]},
{type: 'tableCell', children: [{type: 'text', value: 'i'}]},
{type: 'tableCell', children: [{type: 'text', value: 'j'}]},
{type: 'tableCell', children: [{type: 'text', value: 'k'}]}
]
}
]
}
]
}
```
```markdown
| a | b | c | d | |
| - | :- | -: | :-: | - |
| e | f | | | |
| g | h | i | j | k |
```
## API
This package exports the identifiers
[`gfmTableFromMarkdown`][api-gfm-table-from-markdown] and
[`gfmTableToMarkdown`][api-gfm-table-to-markdown].
There is no default export.
### `gfmTableFromMarkdown`
Create an extension for [`mdast-util-from-markdown`][mdast-util-from-markdown]
to enable GFM tables in markdown.
###### Returns
Extension for `mdast-util-from-markdown` to enable GFM tables
([`FromMarkdownExtension`][from-markdown-extension]).
### `gfmTableToMarkdown(options?)`
Create an extension for [`mdast-util-to-markdown`][mdast-util-to-markdown] to
enable GFM tables in markdown.
###### Parameters
* `options` ([`Options`][api-options], optional)
— configuration
###### Returns
Extension for `mdast-util-to-markdown` to enable GFM tables
([`ToMarkdownExtension`][to-markdown-extension]).
### `Options`
Configuration (TypeScript type).
###### Fields
* `tableCellPadding` (`boolean`, default: `true`)
— whether to add a space of padding between delimiters and cells
* `tablePipeAlign` (`boolean`, default: `true`)
— whether to align the delimiters
* `stringLength` (`((value: string) => number)`, default: `s => s.length`)
— function to detect the length of table cell content, used when aligning
the delimiters between cells
## Examples
### Example: `stringLength`
It’s possible to align tables based on the visual width of cells.
First, let’s show the problem:
```js
import {gfmTable} from 'micromark-extension-gfm-table'
import {fromMarkdown} from 'mdast-util-from-markdown'
import {gfmTableFromMarkdown, gfmTableToMarkdown} from 'mdast-util-gfm-table'
import {toMarkdown} from 'mdast-util-to-markdown'
const doc = `| Alpha | Bravo |
| - | - |
| 中文 | Charlie |
| 👩‍❤️‍👩 | Delta |`
const tree = fromMarkdown(doc, {
extensions: [gfmTable],
mdastExtensions: [gfmTableFromMarkdown]
})
console.log(toMarkdown(tree, {extensions: [gfmTableToMarkdown()]}))
```
The above code shows how these utilities can be used to format markdown.
The output is as follows:
```markdown
| Alpha | Bravo |
| -------- | ------- |
| 中文 | Charlie |
| 👩‍❤️‍👩 | Delta |
```
To improve the alignment of these full-width characters and emoji, pass a
`stringLength` function that calculates the visual width of cells.
One such algorithm is [`string-width`][string-width].
It can be used like so:
```diff
@@ -2,6 +2,7 @@ import {gfmTable} from 'micromark-extension-gfm-table'
import {fromMarkdown} from 'mdast-util-from-markdown'
import {gfmTableFromMarkdown, gfmTableToMarkdown} from 'mdast-util-gfm-table'
import {toMarkdown} from 'mdast-util-to-markdown'
+import stringWidth from 'string-width'
const doc = `| Alpha | Bravo |
| - | - |
@@ -13,4 +14,8 @@ const tree = fromMarkdown(doc, {
mdastExtensions: [gfmTableFromMarkdown()]
})
-console.log(toMarkdown(tree, {extensions: [gfmTableToMarkdown()]}))
+console.log(
+ toMarkdown(tree, {
+ extensions: [gfmTableToMarkdown({stringLength: stringWidth})]
+ })
+)
```
The output of our code with these changes is as follows:
```markdown
| Alpha | Bravo |
| ----- | ------- |
| 中文 | Charlie |
| 👩‍❤️‍👩 | Delta |
```
## HTML
This utility does not handle how markdown is turned to HTML.
That’s done by [`mdast-util-to-hast`][mdast-util-to-hast].
## Syntax
See [Syntax in `micromark-extension-gfm-table`][syntax].
## Syntax tree
The following interfaces are added to **[mdast][]** by this utility.
### Nodes
#### `Table`
```idl
interface Table <: Parent {
type: 'table'
align: [alignType]?
children: [TableContent]
}
```
**Table** (**[Parent][dfn-parent]**) represents two-dimensional data.
**Table** can be used where **[flow][dfn-flow-content]** content is expected.
Its content model is **[table][dfn-table-content]** content.
The *[head][term-head]* of the node represents the labels of the columns.
An `align` field can be present.
If present, it must be a list of **[alignTypes][dfn-enum-align-type]**.
It represents how cells in columns are aligned.
For example, the following markdown:
```markdown
| foo | bar |
| :-- | :-: |
| baz | qux |
```
Yields:
```js
{
type: 'table',
align: ['left', 'center'],
children: [
{
type: 'tableRow',
children: [
{
type: 'tableCell',
children: [{type: 'text', value: 'foo'}]
},
{
type: 'tableCell',
children: [{type: 'text', value: 'bar'}]
}
]
},
{
type: 'tableRow',
children: [
{
type: 'tableCell',
children: [{type: 'text', value: 'baz'}]
},
{
type: 'tableCell',
children: [{type: 'text', value: 'qux'}]
}
]
}
]
}
```
#### `TableRow`
```idl
interface TableRow <: Parent {
type: "tableRow"
children: [RowContent]
}
```
**TableRow** (**[Parent][dfn-parent]**) represents a row of cells in a table.
**TableRow** can be used where **[table][dfn-table-content]** content is
expected.
Its content model is **[row][dfn-row-content]** content.
If the node is a *[head][term-head]*, it represents the labels of the columns
for its parent **[Table][dfn-table]**.
For an example, see **[Table][dfn-table]**.
#### `TableCell`
```idl
interface TableCell <: Parent {
type: "tableCell"
children: [PhrasingContent]
}
```
**TableCell** (**[Parent][dfn-parent]**) represents a header cell in a
**[Table][dfn-table]**, if its parent is a *[head][term-head]*, or a data
cell otherwise.
**TableCell** can be used where **[row][dfn-row-content]** content is expected.
Its content model is **[phrasing][dfn-phrasing-content]** content excluding
**[Break][dfn-break]** nodes.
For an example, see **[Table][dfn-table]**.
### Enumeration
#### `alignType`
```idl
enum alignType {
'center' | 'left' | 'right' | null
}
```
**alignType** represents how phrasing content is aligned
([\[CSSTEXT\]][css-text]).
* **`'left'`**: See the [`left`][css-left] value of the `text-align` CSS
property
* **`'right'`**: See the [`right`][css-right] value of the `text-align`
CSS property
* **`'center'`**: See the [`center`][css-center] value of the `text-align`
CSS property
* **`null`**: phrasing content is aligned as defined by the host environment
### Content model
#### `FlowContent` (GFM table)
```idl
type FlowContentGfm = Table | FlowContent
```
#### `TableContent`
```idl
type TableContent = TableRow
```
**Table** content represent the rows in a table.
#### `RowContent`
```idl
type RowContent = TableCell
```
**Row** content represent the cells in a row.
## Types
This package is fully typed with [TypeScript][].
It exports the additional type [`Options`][api-options].
The `Table`, `TableRow`, and `TableCell` types of the mdast nodes are exposed
from `@types/mdast`.
## Compatibility
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line, `mdast-util-gfm-table@^2`,
compatible with Node.js 16.
This utility works with `mdast-util-from-markdown` version 2+ and
`mdast-util-to-markdown` version 2+.
## Related
* [`remarkjs/remark-gfm`][remark-gfm]
— remark plugin to support GFM
* [`syntax-tree/mdast-util-gfm`][mdast-util-gfm]
— same but all of GFM (autolink literals, footnotes, strikethrough, tables,
tasklists)
* [`micromark/micromark-extension-gfm-table`][extension]
— micromark extension to parse GFM tables
## Contribute
See [`contributing.md`][contributing] in [`syntax-tree/.github`][health] for
ways to get started.
See [`support.md`][support] for ways to get help.
This project has a [code of conduct][coc].
By interacting with this repository, organization, or community you agree to
abide by its terms.
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[build-badge]: https://github.com/syntax-tree/mdast-util-gfm-table/workflows/main/badge.svg
[build]: https://github.com/syntax-tree/mdast-util-gfm-table/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/mdast-util-gfm-table.svg
[coverage]: https://codecov.io/github/syntax-tree/mdast-util-gfm-table
[downloads-badge]: https://img.shields.io/npm/dm/mdast-util-gfm-table.svg
[downloads]: https://www.npmjs.com/package/mdast-util-gfm-table
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=mdast-util-gfm-table
[size]: https://bundlejs.com/?q=mdast-util-gfm-table
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[collective]: https://opencollective.com/unified
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/syntax-tree/unist/discussions
[npm]: https://docs.npmjs.com/cli/install
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[esmsh]: https://esm.sh
[typescript]: https://www.typescriptlang.org
[license]: license
[author]: https://wooorm.com
[health]: https://github.com/syntax-tree/.github
[contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md
[support]: https://github.com/syntax-tree/.github/blob/main/support.md
[coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md
[remark-gfm]: https://github.com/remarkjs/remark-gfm
[mdast]: https://github.com/syntax-tree/mdast
[mdast-util-gfm]: https://github.com/syntax-tree/mdast-util-gfm
[mdast-util-from-markdown]: https://github.com/syntax-tree/mdast-util-from-markdown
[mdast-util-to-markdown]: https://github.com/syntax-tree/mdast-util-to-markdown
[mdast-util-to-hast]: https://github.com/syntax-tree/mdast-util-to-hast
[micromark]: https://github.com/micromark/micromark
[extension]: https://github.com/micromark/micromark-extension-gfm-table
[syntax]: https://github.com/micromark/micromark-extension-gfm-table#syntax
[gfm]: https://github.github.com/gfm/
[string-width]: https://github.com/sindresorhus/string-width
[css-text]: https://drafts.csswg.org/css-text/
[css-left]: https://drafts.csswg.org/css-text/#valdef-text-align-left
[css-right]: https://drafts.csswg.org/css-text/#valdef-text-align-right
[css-center]: https://drafts.csswg.org/css-text/#valdef-text-align-center
[term-head]: https://github.com/syntax-tree/unist#head
[dfn-parent]: https://github.com/syntax-tree/mdast#parent
[dfn-phrasing-content]: https://github.com/syntax-tree/mdast#phrasingcontent
[dfn-break]: https://github.com/syntax-tree/mdast#break
[from-markdown-extension]: https://github.com/syntax-tree/mdast-util-from-markdown#extension
[to-markdown-extension]: https://github.com/syntax-tree/mdast-util-to-markdown#options
[api-gfm-table-from-markdown]: #gfmtablefrommarkdown
[api-gfm-table-to-markdown]: #gfmtabletomarkdownoptions
[api-options]: #options
[dfn-flow-content]: #flowcontent-gfm-table
[dfn-table-content]: #tablecontent
[dfn-enum-align-type]: #aligntype
[dfn-row-content]: #rowcontent
[dfn-table]: #table
@@ -0,0 +1,236 @@
"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/avatar.tsx
var avatar_exports = {};
__export(avatar_exports, {
default: () => avatar_default
});
module.exports = __toCommonJS(avatar_exports);
var import_react2 = require("react");
var import_system2 = require("@heroui/system");
// src/avatar-icon.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var AvatarIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
"svg",
{
"aria-hidden": "true",
fill: "none",
height: "80%",
role: "presentation",
viewBox: "0 0 24 24",
width: "80%",
children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M12 2C9.38 2 7.25 4.13 7.25 6.75C7.25 9.32 9.26 11.4 11.88 11.49C11.96 11.48 12.04 11.48 12.1 11.49C12.12 11.49 12.13 11.49 12.15 11.49C12.16 11.49 12.16 11.49 12.17 11.49C14.73 11.4 16.74 9.32 16.75 6.75C16.75 4.13 14.62 2 12 2Z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M17.0809 14.1489C14.2909 12.2889 9.74094 12.2889 6.93094 14.1489C5.66094 14.9989 4.96094 16.1489 4.96094 17.3789C4.96094 18.6089 5.66094 19.7489 6.92094 20.5889C8.32094 21.5289 10.1609 21.9989 12.0009 21.9989C13.8409 21.9989 15.6809 21.5289 17.0809 20.5889C18.3409 19.7389 19.0409 18.5989 19.0409 17.3589C19.0309 16.1289 18.3409 14.9889 17.0809 14.1489Z",
fill: "currentColor"
}
)
]
}
);
// src/use-avatar.ts
var import_theme = require("@heroui/theme");
var import_system = require("@heroui/system");
var import_utils = require("@react-aria/utils");
var import_react_utils2 = require("@heroui/react-utils");
var import_shared_utils = require("@heroui/shared-utils");
var import_focus = require("@react-aria/focus");
var import_react = require("react");
var import_use_image = require("@heroui/use-image");
var import_interactions = require("@react-aria/interactions");
// src/avatar-group-context.ts
var import_react_utils = require("@heroui/react-utils");
var [AvatarGroupProvider, useAvatarGroupContext] = (0, import_react_utils.createContext)({
name: "AvatarGroupContext",
strict: false
});
// src/use-avatar.ts
function useAvatar(originalProps = {}) {
var _a, _b, _c, _d, _e, _f;
const globalContext = (0, import_system.useProviderContext)();
const groupContext = useAvatarGroupContext();
const isInGroup = !!groupContext;
const {
as,
ref,
src,
name,
icon,
classNames,
fallback,
alt = name || "avatar",
imgRef: imgRefProp,
color = (_a = groupContext == null ? void 0 : groupContext.color) != null ? _a : "default",
radius = (_b = groupContext == null ? void 0 : groupContext.radius) != null ? _b : "full",
size = (_c = groupContext == null ? void 0 : groupContext.size) != null ? _c : "md",
isBordered = (_d = groupContext == null ? void 0 : groupContext.isBordered) != null ? _d : false,
isDisabled = (_e = groupContext == null ? void 0 : groupContext.isDisabled) != null ? _e : false,
isFocusable = false,
getInitials = import_shared_utils.safeText,
ignoreFallback = false,
showFallback: showFallbackProp = false,
ImgComponent = "img",
imgProps,
className,
onError,
disableAnimation: disableAnimationProp,
...otherProps
} = originalProps;
const Component = as || "span";
const domRef = (0, import_react_utils2.useDOMRef)(ref);
const imgRef = (0, import_react_utils2.useDOMRef)(imgRefProp);
const { isFocusVisible, isFocused, focusProps } = (0, import_focus.useFocusRing)();
const { isHovered, hoverProps } = (0, import_interactions.useHover)({ isDisabled });
const disableAnimation = (_f = disableAnimationProp != null ? disableAnimationProp : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _f : false;
const imageStatus = (0, import_use_image.useImage)({ src, onError, ignoreFallback });
const isImgLoaded = imageStatus === "loaded";
const shouldFilterDOMProps = typeof ImgComponent === "string";
const showFallback = (!src || !isImgLoaded) && showFallbackProp;
const slots = (0, import_react.useMemo)(
() => {
var _a2;
return (0, import_theme.avatar)({
color,
radius,
size,
isBordered,
isDisabled,
isInGroup,
disableAnimation,
isInGridGroup: (_a2 = groupContext == null ? void 0 : groupContext.isGrid) != null ? _a2 : false
});
},
[
color,
radius,
size,
isBordered,
isDisabled,
disableAnimation,
isInGroup,
groupContext == null ? void 0 : groupContext.isGrid
]
);
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className);
const canBeFocused = (0, import_react.useMemo)(() => {
return isFocusable || as === "button";
}, [isFocusable, as]);
const getAvatarProps = (0, import_react.useCallback)(
(props = {}) => ({
ref: domRef,
tabIndex: canBeFocused ? 0 : -1,
"data-hover": (0, import_shared_utils.dataAttr)(isHovered),
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
className: slots.base({
class: (0, import_shared_utils.clsx)(baseStyles, props == null ? void 0 : props.className)
}),
...(0, import_utils.mergeProps)(otherProps, hoverProps, canBeFocused ? focusProps : {})
}),
[canBeFocused, slots, baseStyles, focusProps, otherProps]
);
const getImageProps = (0, import_react.useCallback)(
(props = {}) => ({
ref: imgRef,
src,
"data-loaded": (0, import_shared_utils.dataAttr)(isImgLoaded),
className: slots.img({ class: classNames == null ? void 0 : classNames.img }),
...(0, import_utils.mergeProps)(
imgProps,
props,
(0, import_react_utils2.filterDOMProps)({ disableAnimation }, {
enabled: shouldFilterDOMProps
})
)
}),
[slots, isImgLoaded, imgProps, disableAnimation, src, imgRef, shouldFilterDOMProps]
);
return {
Component,
ImgComponent,
src,
alt,
icon,
name,
imgRef,
slots,
classNames,
fallback,
isImgLoaded,
showFallback,
ignoreFallback,
getInitials,
getAvatarProps,
getImageProps
};
}
// src/avatar.tsx
var import_jsx_runtime2 = require("react/jsx-runtime");
var Avatar = (0, import_system2.forwardRef)((props, ref) => {
const {
Component,
ImgComponent,
src,
icon = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AvatarIcon, {}),
alt,
classNames,
slots,
name,
showFallback,
fallback: fallbackComponent,
getInitials,
getAvatarProps,
getImageProps
} = useAvatar({
...props,
ref
});
const fallback = (0, import_react2.useMemo)(() => {
if (!showFallback && src)
return null;
if (fallbackComponent) {
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { "aria-label": alt, className: slots.fallback({ class: classNames == null ? void 0 : classNames.fallback }), role: "img", children: fallbackComponent });
}
return name ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-label": alt, className: slots.name({ class: classNames == null ? void 0 : classNames.name }), role: "img", children: getInitials(name) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "aria-label": alt, className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }), role: "img", children: icon });
}, [showFallback, src, fallbackComponent, name, classNames]);
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Component, { ...getAvatarProps(), children: [
src && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ImgComponent, { ...getImageProps(), alt }),
fallback
] });
});
Avatar.displayName = "HeroUI.Avatar";
var avatar_default = Avatar;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
@@ -0,0 +1,31 @@
/**
* https://tc39.es/ecma402/#sec-getstringorbooleanoption
* @param opts
* @param prop
* @param values
* @param trueValue
* @param falsyValue
* @param fallback
*/
import { ToString } from './262';
export function GetStringOrBooleanOption(opts, prop, values, trueValue, falsyValue, fallback) {
var value = opts[prop];
if (value === undefined) {
return fallback;
}
if (value === true) {
return trueValue;
}
var valueBoolean = Boolean(value);
if (valueBoolean === false) {
return falsyValue;
}
value = ToString(value);
if (value === 'true' || value === 'false') {
return fallback;
}
if ((values || []).indexOf(value) === -1) {
throw new RangeError("Invalid value ".concat(value));
}
return value;
}
@@ -0,0 +1,94 @@
/**
* @author Jamund Ferguson
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "require error handling in callbacks",
category: "Possible Errors",
recommended: false,
url:
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/handle-callback-err.md",
},
fixable: null,
schema: [
{
type: "string",
},
],
messages: {
expected: "Expected error to be handled.",
},
},
create(context) {
const errorArgument = context.options[0] || "err"
/**
* Checks if the given argument should be interpreted as a regexp pattern.
* @param {string} stringToCheck The string which should be checked.
* @returns {boolean} Whether or not the string should be interpreted as a pattern.
*/
function isPattern(stringToCheck) {
const firstChar = stringToCheck[0]
return firstChar === "^"
}
/**
* Checks if the given name matches the configured error argument.
* @param {string} name The name which should be compared.
* @returns {boolean} Whether or not the given name matches the configured error variable name.
*/
function matchesConfiguredErrorName(name) {
if (isPattern(errorArgument)) {
const regexp = new RegExp(errorArgument, "u")
return regexp.test(name)
}
return name === errorArgument
}
/**
* Get the parameters of a given function scope.
* @param {Object} scope The function scope.
* @returns {Array} All parameters of the given scope.
*/
function getParameters(scope) {
return scope.variables.filter(
variable =>
variable.defs[0] && variable.defs[0].type === "Parameter"
)
}
/**
* Check to see if we're handling the error object properly.
* @param {ASTNode} node The AST node to check.
* @returns {void}
*/
function checkForError(node) {
const scope = context.getScope()
const parameters = getParameters(scope)
const firstParameter = parameters[0]
if (
firstParameter &&
matchesConfiguredErrorName(firstParameter.name)
) {
if (firstParameter.references.length === 0) {
context.report({ node, messageId: "expected" })
}
}
}
return {
FunctionDeclaration: checkForError,
FunctionExpression: checkForError,
ArrowFunctionExpression: checkForError,
}
},
}
@@ -0,0 +1,4 @@
'use strict'
exports.TrackerGroup = require('./tracker-group.js')
exports.Tracker = require('./tracker.js')
exports.TrackerStream = require('./tracker-stream.js')
@@ -0,0 +1,3 @@
# @react-aria/listbox
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
@@ -0,0 +1,39 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const {
definePrototypeMethodHandler,
} = require("../util/define-prototype-method-handler")
module.exports = {
meta: {
docs: {
description: "disallow the `String.prototype.trim` method.",
category: "ES5",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-string-prototype-trim.html",
},
fixable: null,
messages: {
forbidden: "ES5 '{{name}}' method is forbidden.",
},
schema: [
{
type: "object",
properties: {
aggressive: { type: "boolean" },
},
additionalProperties: false,
},
],
type: "problem",
},
create(context) {
return definePrototypeMethodHandler(context, {
String: ["trim"],
})
},
}
@@ -0,0 +1,136 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.1.2](https://github.com/ljharb/function-bind/compare/v1.1.1...v1.1.2) - 2023-10-12
### Merged
- Point to the correct file [`#16`](https://github.com/ljharb/function-bind/pull/16)
### Commits
- [Tests] migrate tests to Github Actions [`4f8b57c`](https://github.com/ljharb/function-bind/commit/4f8b57c02f2011fe9ae353d5e74e8745f0988af8)
- [Tests] remove `jscs` [`90eb2ed`](https://github.com/ljharb/function-bind/commit/90eb2edbeefd5b76cd6c3a482ea3454db169b31f)
- [meta] update `.gitignore` [`53fcdc3`](https://github.com/ljharb/function-bind/commit/53fcdc371cd66634d6e9b71c836a50f437e89fed)
- [Tests] up to `node` `v11.10`, `v10.15`, `v9.11`, `v8.15`, `v6.16`, `v4.9`; use `nvm install-latest-npm`; run audit script in tests [`1fe8f6e`](https://github.com/ljharb/function-bind/commit/1fe8f6e9aed0dfa8d8b3cdbd00c7f5ea0cd2b36e)
- [meta] add `auto-changelog` [`1921fcb`](https://github.com/ljharb/function-bind/commit/1921fcb5b416b63ffc4acad051b6aad5722f777d)
- [Robustness] remove runtime dependency on all builtins except `.apply` [`f743e61`](https://github.com/ljharb/function-bind/commit/f743e61aa6bb2360358c04d4884c9db853d118b7)
- Docs: enable badges; update wording [`503cb12`](https://github.com/ljharb/function-bind/commit/503cb12d998b5f91822776c73332c7adcd6355dd)
- [readme] update badges [`290c5db`](https://github.com/ljharb/function-bind/commit/290c5dbbbda7264efaeb886552a374b869a4bb48)
- [Tests] switch to nyc for coverage [`ea360ba`](https://github.com/ljharb/function-bind/commit/ea360ba907fc2601ed18d01a3827fa2d3533cdf8)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`cae5e9e`](https://github.com/ljharb/function-bind/commit/cae5e9e07a5578dc6df26c03ee22851ce05b943c)
- [meta] add `funding` field; create FUNDING.yml [`c9f4274`](https://github.com/ljharb/function-bind/commit/c9f4274aa80ea3aae9657a3938fdba41a3b04ca6)
- [Tests] fix eslint errors from #15 [`f69aaa2`](https://github.com/ljharb/function-bind/commit/f69aaa2beb2fdab4415bfb885760a699d0b9c964)
- [actions] fix permissions [`99a0cd9`](https://github.com/ljharb/function-bind/commit/99a0cd9f3b5bac223a0d572f081834cd73314be7)
- [meta] use `npmignore` to autogenerate an npmignore file [`f03b524`](https://github.com/ljharb/function-bind/commit/f03b524ca91f75a109a5d062f029122c86ecd1ae)
- [Dev Deps] update `@ljharb/eslint‑config`, `eslint`, `tape` [`7af9300`](https://github.com/ljharb/function-bind/commit/7af930023ae2ce7645489532821e4fbbcd7a2280)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`64a9127`](https://github.com/ljharb/function-bind/commit/64a9127ab0bd331b93d6572eaf6e9971967fc08c)
- [Tests] use `aud` instead of `npm audit` [`e75069c`](https://github.com/ljharb/function-bind/commit/e75069c50010a8fcce2a9ce2324934c35fdb4386)
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`d03555c`](https://github.com/ljharb/function-bind/commit/d03555ca59dea3b71ce710045e4303b9e2619e28)
- [meta] add `safe-publish-latest` [`9c8f809`](https://github.com/ljharb/function-bind/commit/9c8f8092aed027d7e80c94f517aa892385b64f09)
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`baf6893`](https://github.com/ljharb/function-bind/commit/baf6893e27f5b59abe88bc1995e6f6ed1e527397)
- [meta] create SECURITY.md [`4db1779`](https://github.com/ljharb/function-bind/commit/4db17799f1f28ae294cb95e0081ca2b591c3911b)
- [Tests] add `npm run audit` [`c8b38ec`](https://github.com/ljharb/function-bind/commit/c8b38ec40ed3f85dabdee40ed4148f1748375bc2)
- Revert "Point to the correct file" [`05cdf0f`](https://github.com/ljharb/function-bind/commit/05cdf0fa205c6a3c5ba40bbedd1dfa9874f915c9)
## [v1.1.1](https://github.com/ljharb/function-bind/compare/v1.1.0...v1.1.1) - 2017-08-28
### Commits
- [Tests] up to `node` `v8`; newer npm breaks on older node; fix scripts [`817f7d2`](https://github.com/ljharb/function-bind/commit/817f7d28470fdbff8ef608d4d565dd4d1430bc5e)
- [Dev Deps] update `eslint`, `jscs`, `tape`, `@ljharb/eslint-config` [`854288b`](https://github.com/ljharb/function-bind/commit/854288b1b6f5c555f89aceb9eff1152510262084)
- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`83e639f`](https://github.com/ljharb/function-bind/commit/83e639ff74e6cd6921285bccec22c1bcf72311bd)
- Only apps should have lockfiles [`5ed97f5`](https://github.com/ljharb/function-bind/commit/5ed97f51235c17774e0832e122abda0f3229c908)
- Use a SPDX-compliant “license” field. [`5feefea`](https://github.com/ljharb/function-bind/commit/5feefea0dc0193993e83e5df01ded424403a5381)
## [v1.1.0](https://github.com/ljharb/function-bind/compare/v1.0.2...v1.1.0) - 2016-02-14
### Commits
- Update `eslint`, `tape`; use my personal shared `eslint` config [`9c9062a`](https://github.com/ljharb/function-bind/commit/9c9062abbe9dd70b59ea2c3a3c3a81f29b457097)
- Add `npm run eslint` [`dd96c56`](https://github.com/ljharb/function-bind/commit/dd96c56720034a3c1ffee10b8a59a6f7c53e24ad)
- [New] return the native `bind` when available. [`82186e0`](https://github.com/ljharb/function-bind/commit/82186e03d73e580f95ff167e03f3582bed90ed72)
- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`a3dd767`](https://github.com/ljharb/function-bind/commit/a3dd76720c795cb7f4586b0544efabf8aa107b8b)
- Update `eslint` [`3dae2f7`](https://github.com/ljharb/function-bind/commit/3dae2f7423de30a2d20313ddb1edc19660142fe9)
- Update `tape`, `covert`, `jscs` [`a181eee`](https://github.com/ljharb/function-bind/commit/a181eee0cfa24eb229c6e843a971f36e060a2f6a)
- [Tests] up to `node` `v5.6`, `v4.3` [`964929a`](https://github.com/ljharb/function-bind/commit/964929a6a4ddb36fb128de2bcc20af5e4f22e1ed)
- Test up to `io.js` `v2.1` [`2be7310`](https://github.com/ljharb/function-bind/commit/2be7310f2f74886a7124ca925be411117d41d5ea)
- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`45f3d68`](https://github.com/ljharb/function-bind/commit/45f3d6865c6ca93726abcef54febe009087af101)
- [Dev Deps] update `tape`, `jscs` [`6e1340d`](https://github.com/ljharb/function-bind/commit/6e1340d94642deaecad3e717825db641af4f8b1f)
- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`d9bad2b`](https://github.com/ljharb/function-bind/commit/d9bad2b778b1b3a6dd2876087b88b3acf319f8cc)
- Update `eslint` [`935590c`](https://github.com/ljharb/function-bind/commit/935590caa024ab356102e4858e8fc315b2ccc446)
- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`8c9a1ef`](https://github.com/ljharb/function-bind/commit/8c9a1efd848e5167887aa8501857a0940a480c57)
- Test on `io.js` `v2.2` [`9a3a38c`](https://github.com/ljharb/function-bind/commit/9a3a38c92013aed6e108666e7bd40969b84ac86e)
- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`69afc26`](https://github.com/ljharb/function-bind/commit/69afc2617405b147dd2a8d8ae73ca9e9283f18b4)
- [Dev Deps] Update `tape`, `eslint` [`36c1be0`](https://github.com/ljharb/function-bind/commit/36c1be0ab12b45fe5df6b0fdb01a5d5137fd0115)
- Update `tape`, `jscs` [`98d8303`](https://github.com/ljharb/function-bind/commit/98d8303cd5ca1c6b8f985469f86b0d44d7d45f6e)
- Update `jscs` [`9633a4e`](https://github.com/ljharb/function-bind/commit/9633a4e9fbf82051c240855166e468ba8ba0846f)
- Update `tape`, `jscs` [`c80ef0f`](https://github.com/ljharb/function-bind/commit/c80ef0f46efc9791e76fa50de4414092ac147831)
- Test up to `io.js` `v3.0` [`7e2c853`](https://github.com/ljharb/function-bind/commit/7e2c8537d52ab9cf5a655755561d8917684c0df4)
- Test on `io.js` `v2.4` [`5a199a2`](https://github.com/ljharb/function-bind/commit/5a199a27ba46795ba5eaf0845d07d4b8232895c9)
- Test on `io.js` `v2.3` [`a511b88`](https://github.com/ljharb/function-bind/commit/a511b8896de0bddf3b56862daa416c701f4d0453)
- Fixing a typo from 822b4e1938db02dc9584aa434fd3a45cb20caf43 [`732d6b6`](https://github.com/ljharb/function-bind/commit/732d6b63a9b33b45230e630dbcac7a10855d3266)
- Update `jscs` [`da52a48`](https://github.com/ljharb/function-bind/commit/da52a4886c06d6490f46ae30b15e4163ba08905d)
- Lock covert to v1.0.0. [`d6150fd`](https://github.com/ljharb/function-bind/commit/d6150fda1e6f486718ebdeff823333d9e48e7430)
## [v1.0.2](https://github.com/ljharb/function-bind/compare/v1.0.1...v1.0.2) - 2014-10-04
## [v1.0.1](https://github.com/ljharb/function-bind/compare/v1.0.0...v1.0.1) - 2014-10-03
### Merged
- make CI build faster [`#3`](https://github.com/ljharb/function-bind/pull/3)
### Commits
- Using my standard jscs.json [`d8ee94c`](https://github.com/ljharb/function-bind/commit/d8ee94c993eff0a84cf5744fe6a29627f5cffa1a)
- Adding `npm run lint` [`7571ab7`](https://github.com/ljharb/function-bind/commit/7571ab7dfdbd99b25a1dbb2d232622bd6f4f9c10)
- Using consistent indentation [`e91a1b1`](https://github.com/ljharb/function-bind/commit/e91a1b13a61e99ec1e530e299b55508f74218a95)
- Updating jscs [`7e17892`](https://github.com/ljharb/function-bind/commit/7e1789284bc629bc9c1547a61c9b227bbd8c7a65)
- Using consistent quotes [`c50b57f`](https://github.com/ljharb/function-bind/commit/c50b57fcd1c5ec38320979c837006069ebe02b77)
- Adding keywords [`cb94631`](https://github.com/ljharb/function-bind/commit/cb946314eed35f21186a25fb42fc118772f9ee00)
- Directly export a function expression instead of using a declaration, and relying on hoisting. [`5a33c5f`](https://github.com/ljharb/function-bind/commit/5a33c5f45642de180e0d207110bf7d1843ceb87c)
- Naming npm URL and badge in README; use SVG [`2aef8fc`](https://github.com/ljharb/function-bind/commit/2aef8fcb79d54e63a58ae557c4e60949e05d5e16)
- Naming deps URLs in README [`04228d7`](https://github.com/ljharb/function-bind/commit/04228d766670ee45ca24e98345c1f6a7621065b5)
- Naming travis-ci URLs in README; using SVG [`62c810c`](https://github.com/ljharb/function-bind/commit/62c810c2f54ced956cd4d4ab7b793055addfe36e)
- Make sure functions are invoked correctly (also passing coverage tests) [`2b289b4`](https://github.com/ljharb/function-bind/commit/2b289b4dfbf037ffcfa4dc95eb540f6165e9e43a)
- Removing the strict mode pragmas; they make tests fail. [`1aa701d`](https://github.com/ljharb/function-bind/commit/1aa701d199ddc3782476e8f7eef82679be97b845)
- Adding myself as a contributor [`85fd57b`](https://github.com/ljharb/function-bind/commit/85fd57b0860e5a7af42de9a287f3f265fc6d72fc)
- Adding strict mode pragmas [`915b08e`](https://github.com/ljharb/function-bind/commit/915b08e084c86a722eafe7245e21db74aa21ca4c)
- Adding devDeps URLs to README [`4ccc731`](https://github.com/ljharb/function-bind/commit/4ccc73112c1769859e4ca3076caf4086b3cba2cd)
- Fixing the description. [`a7a472c`](https://github.com/ljharb/function-bind/commit/a7a472cf649af515c635cf560fc478fbe48999c8)
- Using a function expression instead of a function declaration. [`b5d3e4e`](https://github.com/ljharb/function-bind/commit/b5d3e4ea6aaffc63888953eeb1fbc7ff45f1fa14)
- Updating tape [`f086be6`](https://github.com/ljharb/function-bind/commit/f086be6029fb56dde61a258c1340600fa174d1e0)
- Updating jscs [`5f9bdb3`](https://github.com/ljharb/function-bind/commit/5f9bdb375ab13ba48f30852aab94029520c54d71)
- Updating jscs [`9b409ba`](https://github.com/ljharb/function-bind/commit/9b409ba6118e23395a4e5d83ef39152aab9d3bfc)
- Run coverage as part of tests. [`8e1b6d4`](https://github.com/ljharb/function-bind/commit/8e1b6d459f047d1bd4fee814e01247c984c80bd0)
- Run linter as part of tests [`c1ca83f`](https://github.com/ljharb/function-bind/commit/c1ca83f832df94587d09e621beba682fabfaa987)
- Updating covert [`701e837`](https://github.com/ljharb/function-bind/commit/701e83774b57b4d3ef631e1948143f43a72f4bb9)
## [v1.0.0](https://github.com/ljharb/function-bind/compare/v0.2.0...v1.0.0) - 2014-08-09
### Commits
- Make sure old and unstable nodes don't fail Travis [`27adca3`](https://github.com/ljharb/function-bind/commit/27adca34a4ab6ad67b6dfde43942a1b103ce4d75)
- Fixing an issue when the bound function is called as a constructor in ES3. [`e20122d`](https://github.com/ljharb/function-bind/commit/e20122d267d92ce553859b280cbbea5d27c07731)
- Adding `npm run coverage` [`a2e29c4`](https://github.com/ljharb/function-bind/commit/a2e29c4ecaef9e2f6cd1603e868c139073375502)
- Updating tape [`b741168`](https://github.com/ljharb/function-bind/commit/b741168b12b235b1717ff696087645526b69213c)
- Upgrading tape [`63631a0`](https://github.com/ljharb/function-bind/commit/63631a04c7fbe97cc2fa61829cc27246d6986f74)
- Updating tape [`363cb46`](https://github.com/ljharb/function-bind/commit/363cb46dafb23cb3e347729a22f9448051d78464)
## v0.2.0 - 2014-03-23
### Commits
- Updating test coverage to match es5-shim. [`aa94d44`](https://github.com/ljharb/function-bind/commit/aa94d44b8f9d7f69f10e060db7709aa7a694e5d4)
- initial [`942ee07`](https://github.com/ljharb/function-bind/commit/942ee07e94e542d91798137bc4b80b926137e066)
- Setting the bound function's length properly. [`079f46a`](https://github.com/ljharb/function-bind/commit/079f46a2d3515b7c0b308c2c13fceb641f97ca25)
- Ensuring that some older browsers will throw when given a regex. [`36ac55b`](https://github.com/ljharb/function-bind/commit/36ac55b87f460d4330253c92870aa26fbfe8227f)
- Removing npm scripts that don't have dependencies [`9d2be60`](https://github.com/ljharb/function-bind/commit/9d2be600002cb8bc8606f8f3585ad3e05868c750)
- Updating tape [`297a4ac`](https://github.com/ljharb/function-bind/commit/297a4acc5464db381940aafb194d1c88f4e678f3)
- Skipping length tests for now. [`d9891ea`](https://github.com/ljharb/function-bind/commit/d9891ea4d2aaffa69f408339cdd61ff740f70565)
- don't take my tea [`dccd930`](https://github.com/ljharb/function-bind/commit/dccd930bfd60ea10cb178d28c97550c3bc8c1e07)
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from '../types.js';
import 'react';
declare const CopyDocumentBulkIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { CopyDocumentBulkIcon };
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more