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,65 @@
# Browserslist
<img width="120" height="120" alt="Browserslist logo by Anton Popov"
src="https://browsersl.ist/logo.svg" align="right">
The config to share target browsers and Node.js versions between different
front-end tools. It is used in:
* [Autoprefixer]
* [Babel]
* [postcss-preset-env]
* [eslint-plugin-compat]
* [stylelint-no-unsupported-browser-features]
* [postcss-normalize]
* [obsolete-webpack-plugin]
All tools will find target browsers automatically,
when you add the following to `package.json`:
```json
"browserslist": [
"defaults and fully supports es6-module",
"maintained node versions"
]
```
Or in `.browserslistrc` config:
```yaml
# Browsers that we support
defaults and fully supports es6-module
maintained node versions
```
Developers set their version lists using queries like `last 2 versions`
to be free from updating versions manually.
Browserslist will use [`caniuse-lite`] with [Can I Use] data for this queries.
You can check how config works at our playground: [`browsersl.ist`](https://browsersl.ist/)
<a href="https://browsersl.ist/">
<img src="/img/screenshot.webp" alt="browsersl.ist website">
</a>
<br>
<br>
<div align="center">
<a href="https://evilmartians.com/?utm_source=browserslist"><img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54"></a>  <a href="https://cube.dev/?ref=eco-browserslist-github"><img src="https://user-images.githubusercontent.com/986756/154330861-d79ab8ec-aacb-4af8-9e17-1b28f1eccb01.svg" alt="Supported by Cube" width="227" height="46"></a>
</div>
[stylelint-no-unsupported-browser-features]: https://github.com/ismay/stylelint-no-unsupported-browser-features
[obsolete-webpack-plugin]: https://github.com/ElemeFE/obsolete-webpack-plugin
[eslint-plugin-compat]: https://github.com/amilajack/eslint-plugin-compat
[Browserslist Example]: https://github.com/browserslist/browserslist-example
[postcss-preset-env]: https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env
[postcss-normalize]: https://github.com/csstools/postcss-normalize
[`browsersl.ist`]: https://browsersl.ist/
[`caniuse-lite`]: https://github.com/ben-eb/caniuse-lite
[Autoprefixer]: https://github.com/postcss/autoprefixer
[Can I Use]: https://caniuse.com/
[Babel]: https://github.com/babel/babel/tree/master/packages/babel-preset-env
## Docs
Read full docs **[here](https://github.com/browserslist/browserslist#readme)**.
@@ -0,0 +1 @@
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/config/errors.ts"],"names":[],"mappings":"AAMA,eAAe;IACb,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,KAAK,EAAE;QACL,wBAAwB,EAAE,CAAC;QAC3B,gBAAgB,EAAE,CAAC;QACnB,oBAAoB,EAAE,CAAC;QACvB,kBAAkB,EAAE,CAAC;QACrB,iBAAiB,EAAE,CAAC;KACrB;CACqB,CAAA"}
@@ -0,0 +1,31 @@
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value;
return value != null && (type == 'object' || type == 'function');
}
export default isObject;
@@ -0,0 +1 @@
{"mappings":";;;AAAA;;;;;;;;;;CAUC,GAED,gEAAgE;AAChE,gGAAgG;;;AAMhG,MAAM,2CAAqB;AAOpB,MAAM,kDAAyB,CAAA,GAAA,yCAAgB;IAGpD,cAAc,EAAU,EAAgB;QACtC,IAAI,gBAAgB,KAAK,CAAC,cAAc;QACxC,IAAI,OAAO,CAAA,GAAA,yCAAc,EAAE,cAAc,GAAG,EAAE,cAAc,IAAI;QAChE,OAAO,IAAI,CAAA,GAAA,yCAAW,EACpB,IAAI,EACJ,OAAO,0CACP,cAAc,KAAK,EACnB,cAAc,GAAG;IAErB;IAEA,YAAY,IAAqB,EAAU;QACzC,OAAO,KAAK,CAAC,YAAY,kCAAY;IACvC;IAEA,UAAoB;QAClB,OAAO;YAAC;SAAK;IACf;IAEA,eAAe,IAAqB,EAAU;QAC5C,OAAO,KAAK,CAAC,eAAe,kCAAY;IAC1C;IAEA,cAAoB,CAAC;;QA1BhB,qBACL,aAAiC;;AA0BnC;AAEA,SAAS,kCAAY,IAAqB;IACxC,IAAI,CAAC,KAAK,KAAK,GAAG,CAAA,GAAA,yCAAe,EAAE,KAAK,IAAI,GAAG;IAC/C,OAAO,IAAI,CAAA,GAAA,yCAAW,EACpB,KACA,MACA,KAAK,KAAK,EACV,KAAK,GAAG;AAEZ","sources":["packages/@internationalized/date/src/calendars/BuddhistCalendar.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';\n\nconst BUDDHIST_ERA_START = -543;\n\n/**\n * The Buddhist calendar is the same as the Gregorian calendar, but counts years\n * starting from the birth of Buddha in 543 BC (Gregorian). It supports only one\n * era, identified as 'BE'.\n */\nexport class BuddhistCalendar extends GregorianCalendar {\n identifier: CalendarIdentifier = 'buddhist';\n\n fromJulianDay(jd: number): CalendarDate {\n let gregorianDate = super.fromJulianDay(jd);\n let year = getExtendedYear(gregorianDate.era, gregorianDate.year);\n return new CalendarDate(\n this,\n year - BUDDHIST_ERA_START,\n gregorianDate.month,\n gregorianDate.day\n );\n }\n\n toJulianDay(date: AnyCalendarDate): number {\n return super.toJulianDay(toGregorian(date));\n }\n\n getEras(): string[] {\n return ['BE'];\n }\n\n getDaysInMonth(date: AnyCalendarDate): number {\n return super.getDaysInMonth(toGregorian(date));\n }\n\n balanceDate(): void {}\n}\n\nfunction toGregorian(date: AnyCalendarDate) {\n let [era, year] = fromExtendedYear(date.year + BUDDHIST_ERA_START);\n return new CalendarDate(\n era,\n year,\n date.month,\n date.day\n );\n}\n"],"names":[],"version":3,"file":"BuddhistCalendar.module.js.map"}
@@ -0,0 +1,4 @@
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
export { _interop_require_default as _ };
@@ -0,0 +1,54 @@
# Buffer Fill
A [ponyfill](https://ponyfill.com) for `Buffer.fill`.
Works as Node.js: `v6.4.0` <br>
Works on Node.js: `v0.10.0`
## Installation
```sh
npm install --save buffer-fill
```
## Usage
```js
const fill = require('buffer-fill')
const buf = Buffer.allocUnsafe(5)
console.log(buf.fill(8))
//=> <Buffer 08 08 08 08 08>
console.log(buf.fill(9, 2, 4))
//=> <Buffer 08 08 09 09 08>
console.log(buf.fill('linus', 'latin1'))
//=> <Buffer 6c 69 6e 75 73>
console.log(buf.fill('\u0222'))
//=> <Buffer c8 a2 c8 a2 c8>
```
## API
### fill(buf, value[, offset[, end]][, encoding])
- `value` &lt;String&gt; | &lt;Buffer&gt; | &lt;Integer&gt; The value to fill `buf` with
- `offset` &lt;Integer&gt; Where to start filling `buf`. **Default:** `0`
- `end` &lt;Integer&gt; Where to stop filling `buf` (not inclusive). **Default:** `buf.length`
- `encoding` &lt;String&gt; If `value` is a string, this is its encoding. **Default:** `'utf8'`
- Return: &lt;Buffer&gt; A reference to `buf`
Fills `buf` with the specified `value`. If the `offset` and `end` are not given,
the entire `buf` will be filled. This is meant to be a small simplification to
allow the creation and filling of a `Buffer` to be done on a single line.
If the final write of a `fill()` operation falls on a multi-byte character, then
only the first bytes of that character that fit into `buf` are written.
## See also
- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe`
- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc`
- [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from`
@@ -0,0 +1,87 @@
"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/use-scroll-shadow.ts
var use_scroll_shadow_exports = {};
__export(use_scroll_shadow_exports, {
useScrollShadow: () => useScrollShadow
});
module.exports = __toCommonJS(use_scroll_shadow_exports);
var import_system = require("@heroui/system");
var import_theme = require("@heroui/theme");
var import_react_utils = require("@heroui/react-utils");
var import_use_data_scroll_overflow = require("@heroui/use-data-scroll-overflow");
var import_react = require("react");
var import_shared_utils = require("@heroui/shared-utils");
function useScrollShadow(originalProps) {
var _a;
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.scrollShadow.variantKeys);
const {
ref,
as,
children,
className,
style,
size = 40,
offset = 0,
visibility = "auto",
isEnabled = true,
onVisibilityChange,
...otherProps
} = props;
const Component = as || "div";
const domRef = (0, import_react_utils.useDOMRef)(ref);
(0, import_use_data_scroll_overflow.useDataScrollOverflow)({
domRef,
offset,
visibility,
isEnabled,
onVisibilityChange,
updateDeps: [children],
overflowCheck: (_a = originalProps.orientation) != null ? _a : "vertical"
});
const styles = (0, import_react.useMemo)(
() => (0, import_theme.scrollShadow)({
...variantProps,
className
}),
[(0, import_shared_utils.objectToDeps)(variantProps), className]
);
const getBaseProps = (props2 = {}) => {
var _a2;
return {
ref: domRef,
className: styles,
"data-orientation": (_a2 = originalProps.orientation) != null ? _a2 : "vertical",
style: {
"--scroll-shadow-size": `${size}px`,
...style,
...props2.style
},
...otherProps,
...props2
};
};
return { Component, styles, domRef, children, getBaseProps };
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
useScrollShadow
});
@@ -0,0 +1,102 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getBindingIdentifiers;
var _index = require("../validators/generated/index.js");
function getBindingIdentifiers(node, duplicates, outerOnly, newBindingsOnly) {
const search = [].concat(node);
const ids = Object.create(null);
while (search.length) {
const id = search.shift();
if (!id) continue;
if (newBindingsOnly && ((0, _index.isAssignmentExpression)(id) || (0, _index.isUnaryExpression)(id) || (0, _index.isUpdateExpression)(id))) {
continue;
}
if ((0, _index.isIdentifier)(id)) {
if (duplicates) {
const _ids = ids[id.name] = ids[id.name] || [];
_ids.push(id);
} else {
ids[id.name] = id;
}
continue;
}
if ((0, _index.isExportDeclaration)(id) && !(0, _index.isExportAllDeclaration)(id)) {
if ((0, _index.isDeclaration)(id.declaration)) {
search.push(id.declaration);
}
continue;
}
if (outerOnly) {
if ((0, _index.isFunctionDeclaration)(id)) {
search.push(id.id);
continue;
}
if ((0, _index.isFunctionExpression)(id)) {
continue;
}
}
const keys = getBindingIdentifiers.keys[id.type];
if (keys) {
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
const nodes = id[key];
if (nodes) {
if (Array.isArray(nodes)) {
search.push(...nodes);
} else {
search.push(nodes);
}
}
}
}
}
return ids;
}
const keys = {
DeclareClass: ["id"],
DeclareFunction: ["id"],
DeclareModule: ["id"],
DeclareVariable: ["id"],
DeclareInterface: ["id"],
DeclareTypeAlias: ["id"],
DeclareOpaqueType: ["id"],
InterfaceDeclaration: ["id"],
TypeAlias: ["id"],
OpaqueType: ["id"],
CatchClause: ["param"],
LabeledStatement: ["label"],
UnaryExpression: ["argument"],
AssignmentExpression: ["left"],
ImportSpecifier: ["local"],
ImportNamespaceSpecifier: ["local"],
ImportDefaultSpecifier: ["local"],
ImportDeclaration: ["specifiers"],
TSImportEqualsDeclaration: ["id"],
ExportSpecifier: ["exported"],
ExportNamespaceSpecifier: ["exported"],
ExportDefaultSpecifier: ["exported"],
FunctionDeclaration: ["id", "params"],
FunctionExpression: ["id", "params"],
ArrowFunctionExpression: ["params"],
ObjectMethod: ["params"],
ClassMethod: ["params"],
ClassPrivateMethod: ["params"],
ForInStatement: ["left"],
ForOfStatement: ["left"],
ClassDeclaration: ["id"],
ClassExpression: ["id"],
RestElement: ["argument"],
UpdateExpression: ["argument"],
ObjectProperty: ["value"],
AssignmentPattern: ["left"],
ArrayPattern: ["elements"],
ObjectPattern: ["properties"],
VariableDeclaration: ["declarations"],
VariableDeclarator: ["id"]
};
getBindingIdentifiers.keys = keys;
//# sourceMappingURL=getBindingIdentifiers.js.map
@@ -0,0 +1 @@
!function(e,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],s):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_lv=s(e.dayjs)}(this,(function(e){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=s(e),d={name:"lv",weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),weekStart:1,weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},relativeTime:{future:"pēc %s",past:"pirms %s",s:"dažām sekundēm",m:"minūtes",mm:"%d minūtēm",h:"stundas",hh:"%d stundām",d:"dienas",dd:"%d dienām",M:"mēneša",MM:"%d mēnešiem",y:"gada",yy:"%d gadiem"}};return t.default.locale(d,null,!0),d}));
@@ -0,0 +1,16 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export type {TextFieldAria} from './useTextField';
export {useTextField} from './useTextField';
export {useFormattedTextField} from './useFormattedTextField';
export type {AriaTextFieldOptions} from './useTextField';
export type {AriaTextFieldProps} from '@react-types/textfield';
@@ -0,0 +1,32 @@
import { press, frame } from 'motion-dom';
import { extractEventInfo } from '../events/event-info.mjs';
import { Feature } from '../motion/features/Feature.mjs';
function handlePressEvent(node, event, lifecycle) {
const { props } = node;
if (node.current instanceof HTMLButtonElement && node.current.disabled) {
return;
}
if (node.animationState && props.whileTap) {
node.animationState.setActive("whileTap", lifecycle === "Start");
}
const eventName = ("onTap" + (lifecycle === "End" ? "" : lifecycle));
const callback = props[eventName];
if (callback) {
frame.postRender(() => callback(event, extractEventInfo(event)));
}
}
class PressGesture extends Feature {
mount() {
const { current } = this.node;
if (!current)
return;
this.unmount = press(current, (_element, startEvent) => {
handlePressEvent(this.node, startEvent, "Start");
return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? "End" : "Cancel");
}, { useGlobalTarget: this.node.props.globalTapTarget });
}
unmount() { }
}
export { PressGesture };
@@ -0,0 +1,122 @@
import type { Uint8Array_ } from '../types/index.js';
/**
* Fundamental values that are needed to discern the more specific COSE public key types below.
*
* The use of `Maps` here is due to CBOR encoding being used with public keys, and the CBOR "Map"
* type is being decoded to JavaScript's `Map` type instead of, say, a basic Object as us JS
* developers might prefer.
*
* These types are an unorthodox way of saying "these Maps should involve these discrete lists of
* keys", but it works.
* @module
*/
/**
* COSE public key common values
*/
export type COSEPublicKey = {
get(key: COSEKEYS.kty): COSEKTY | undefined;
get(key: COSEKEYS.alg): COSEALG | undefined;
set(key: COSEKEYS.kty, value: COSEKTY): void;
set(key: COSEKEYS.alg, value: COSEALG): void;
};
/**
* Values specific to Octet Key Pair public keys
*/
export type COSEPublicKeyOKP = COSEPublicKey & {
get(key: COSEKEYS.crv): number | undefined;
get(key: COSEKEYS.x): Uint8Array_ | undefined;
set(key: COSEKEYS.crv, value: number): void;
set(key: COSEKEYS.x, value: Uint8Array_): void;
};
/**
* Values specific to Elliptic Curve Cryptography public keys
*/
export type COSEPublicKeyEC2 = COSEPublicKey & {
get(key: COSEKEYS.crv): number | undefined;
get(key: COSEKEYS.x): Uint8Array_ | undefined;
get(key: COSEKEYS.y): Uint8Array_ | undefined;
set(key: COSEKEYS.crv, value: number): void;
set(key: COSEKEYS.x, value: Uint8Array_): void;
set(key: COSEKEYS.y, value: Uint8Array_): void;
};
/**
* Values specific to RSA public keys
*/
export type COSEPublicKeyRSA = COSEPublicKey & {
get(key: COSEKEYS.n): Uint8Array_ | undefined;
get(key: COSEKEYS.e): Uint8Array_ | undefined;
set(key: COSEKEYS.n, value: Uint8Array_): void;
set(key: COSEKEYS.e, value: Uint8Array_): void;
};
/**
* A type guard for determining if a COSE public key is an OKP key pair
*/
export declare function isCOSEPublicKeyOKP(cosePublicKey: COSEPublicKey): cosePublicKey is COSEPublicKeyOKP;
/**
* A type guard for determining if a COSE public key is an EC2 key pair
*/
export declare function isCOSEPublicKeyEC2(cosePublicKey: COSEPublicKey): cosePublicKey is COSEPublicKeyEC2;
/**
* A type guard for determining if a COSE public key is an RSA key pair
*/
export declare function isCOSEPublicKeyRSA(cosePublicKey: COSEPublicKey): cosePublicKey is COSEPublicKeyRSA;
/**
* COSE Keys
*
* https://www.iana.org/assignments/cose/cose.xhtml#key-common-parameters
* https://www.iana.org/assignments/cose/cose.xhtml#key-type-parameters
*/
export declare enum COSEKEYS {
kty = 1,
alg = 3,
crv = -1,
x = -2,
y = -3,
n = -1,
e = -2
}
/**
* COSE Key Types
*
* https://www.iana.org/assignments/cose/cose.xhtml#key-type
*/
export declare enum COSEKTY {
OKP = 1,
EC2 = 2,
RSA = 3
}
export declare function isCOSEKty(kty: number | undefined): kty is COSEKTY;
/**
* COSE Curves
*
* https://www.iana.org/assignments/cose/cose.xhtml#elliptic-curves
*/
export declare enum COSECRV {
P256 = 1,
P384 = 2,
P521 = 3,
ED25519 = 6,
SECP256K1 = 8
}
export declare function isCOSECrv(crv: number | undefined): crv is COSECRV;
/**
* COSE Algorithms
*
* https://www.iana.org/assignments/cose/cose.xhtml#algorithms
*/
export declare enum COSEALG {
ES256 = -7,
EdDSA = -8,
ES384 = -35,
ES512 = -36,
PS256 = -37,
PS384 = -38,
PS512 = -39,
ES256K = -47,
RS256 = -257,
RS384 = -258,
RS512 = -259,
RS1 = -65535
}
export declare function isCOSEAlg(alg: number | undefined): alg is COSEALG;
//# sourceMappingURL=cose.d.ts.map
@@ -0,0 +1,41 @@
"use strict"
const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
const { getSourceCode } = require("eslint-compat-utils")
module.exports = {
meta: {
docs: {
description: "disallow `escape` and `unescape`",
category: "legacy",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-escape-unescape.html",
},
fixable: null,
messages: {
forbidden: "Annex B feature '{{name}}' is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"(program) {
const sourceCode = getSourceCode(context)
const tracker = new ReferenceTracker(
sourceCode.getScope(program),
)
for (const { node, path } of tracker.iterateGlobalReferences({
escape: { [READ]: true },
unescape: { [READ]: true },
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,470 @@
import _debug from 'debug'
import * as fs from 'fs'
import globRex from 'globrex'
import { resolve } from 'path'
import type {
TSConfckParseNativeResult,
TSConfckParseOptions,
TSConfckParseResult,
} from 'tsconfck'
import type { CompilerOptions } from 'typescript'
import { inspect } from 'util'
import { normalizePath, Plugin, searchForWorkspaceRoot } from 'vite'
import { resolvePathMappings } from './mappings'
import { basename, dirname, isAbsolute, join, relative } from './path'
import { PluginOptions } from './types'
import { debug, debugResolve } from './debug'
const notApplicable = [undefined, false] as const
const notFound = [undefined, true] as const
type ViteResolve = (id: string, importer: string) => Promise<string | undefined>
type Resolver = (
viteResolve: ViteResolve,
id: string,
importer: string
) => Promise<readonly [resolved: string | undefined, matched: boolean]>
export type { PluginOptions }
export default (opts: PluginOptions = {}): Plugin => {
let resolversByDir: Record<string, Resolver[]>
return {
name: 'vite-tsconfig-paths',
enforce: 'pre',
async configResolved(config) {
let projectRoot = config.root
let workspaceRoot!: string
let { root } = opts
if (root) {
root = resolve(projectRoot, root)
} else {
workspaceRoot = searchForWorkspaceRoot(projectRoot)
}
debug('options.root ==', root)
debug('project root ==', projectRoot)
debug('workspace root ==', workspaceRoot)
// The "root" option overrides both of these.
if (root) {
projectRoot = root
workspaceRoot = root
}
const tsconfck = await import('tsconfck')
const projects = opts.projects
? opts.projects.map((file) => {
if (!file.endsWith('.json')) {
file = join(file, 'tsconfig.json')
}
return resolve(projectRoot, file)
})
: await tsconfck.findAll(workspaceRoot, {
configNames: opts.configNames || ['tsconfig.json', 'jsconfig.json'],
skip(dir) {
if (dir === '.git' || dir === 'node_modules') {
return true
}
if (typeof opts.skip === 'function') {
return opts.skip(dir)
}
return false
},
})
debug('projects:', projects)
let hasTypeScriptDep = false
if (opts.parseNative) {
try {
const pkgJson = fs.readFileSync(
join(workspaceRoot, 'package.json'),
'utf8'
)
const pkg = JSON.parse(pkgJson)
const deps = { ...pkg.dependencies, ...pkg.devDependencies }
hasTypeScriptDep = 'typescript' in deps
} catch (e: any) {
if (e.code != 'ENOENT') {
throw e
}
}
}
let firstError: any
const parseOptions: TSConfckParseOptions = {
cache: new tsconfck.TSConfckCache(),
}
const parsedProjects = new Set(
await Promise.all(
projects.map((tsconfigFile) => {
if (tsconfigFile === null) {
debug('tsconfig file not found:', tsconfigFile)
return null
}
return (
hasTypeScriptDep
? tsconfck.parseNative(tsconfigFile, parseOptions)
: tsconfck.parse(tsconfigFile, parseOptions)
).catch((error) => {
if (opts.ignoreConfigErrors) {
debug('tsconfig file caused a parsing error:', tsconfigFile)
} else {
config.logger.error(
'[tsconfig-paths] An error occurred while parsing "' +
tsconfigFile +
'". See below for details.' +
(firstError
? ''
: ' To disable this message, set the `ignoreConfigErrors` option to true.'),
{ error }
)
if (config.logger.hasErrorLogged(error)) {
console.error(error)
}
firstError = error
}
return null
})
})
)
)
resolversByDir = {}
parsedProjects.forEach((project) => {
if (!project) {
return
}
// Don't create a resolver for projects with a references array.
// Instead, create a resolver for each project in that array.
if (project.referenced) {
project.referenced.forEach((projectRef) => {
parsedProjects.add(projectRef)
})
// Reinsert the parent project so it's tried last. This is
// important because project references can be used to
// override the parent project.
parsedProjects.delete(project)
parsedProjects.add(project)
project.referenced = undefined
} else {
const resolver = createResolver(project)
if (resolver) {
const projectDir = normalizePath(dirname(project.tsconfigFile))
const resolvers = (resolversByDir[projectDir] ||= [])
resolvers.push(resolver)
}
}
})
},
async resolveId(id, importer, options) {
if (debugResolve.enabled) {
debugResolve('resolving:', { id, importer })
}
if (!importer) {
debugResolve('importer is empty or undefined. skipping...')
return
}
if (relativeImportRE.test(id)) {
debugResolve('id is a relative import. skipping...')
return
}
if (isAbsolute(id)) {
debugResolve('id is an absolute path. skipping...')
return
}
if (id.includes('\0')) {
debugResolve('id is a virtual module. skipping...')
return
}
// For Vite 4 and under, skipSelf needs to be set.
const resolveOptions = { ...options, skipSelf: true }
const viteResolve: ViteResolve = async (id, importer) =>
(await this.resolve(id, importer, resolveOptions))?.id
let prevProjectDir: string | undefined
let projectDir = normalizePath(dirname(importer))
// Find the nearest directory with a matching tsconfig file.
loop: while (projectDir && projectDir != prevProjectDir) {
const resolvers = resolversByDir[projectDir]
if (resolvers) {
for (const resolve of resolvers) {
const [resolved, matched] = await resolve(viteResolve, id, importer)
if (resolved) {
return resolved
}
if (matched) {
// Once a matching resolver is found, stop looking.
break loop
}
}
}
prevProjectDir = projectDir
projectDir = dirname(prevProjectDir)
}
},
}
type TsConfig = {
files?: string[]
include?: string[]
exclude?: string[]
compilerOptions?: CompilerOptions
}
function resolvePathsRootDir(
project: TSConfckParseResult | TSConfckParseNativeResult
): string {
if ('result' in project) {
return (
project.result.options?.pathsBasePath ?? dirname(project.tsconfigFile)
)
}
const baseUrl = (project.tsconfig as TsConfig).compilerOptions?.baseUrl
if (baseUrl) {
return baseUrl
}
const projectWithPaths = project.extended?.find(
(p) => (p.tsconfig as TsConfig).compilerOptions?.paths
)
return dirname((projectWithPaths ?? project).tsconfigFile)
}
function createResolver(
project: TSConfckParseResult | TSConfckParseNativeResult
): Resolver | null {
const configPath = normalizePath(project.tsconfigFile)
const config = project.tsconfig as TsConfig
debug('config loaded:', inspect({ configPath, config }, false, 10, true))
// Sometimes a tsconfig is not meant to be used for path resolution,
// but rather for pointing to other tsconfig files and possibly
// being extended by them. This is represented by an explicitly
// empty "files" array and a missing/empty "include" array.
if (config.files?.length == 0 && !config.include?.length) {
debug(
`[!] skipping "${configPath}" as no files can be matched since "files" is empty and "include" is missing or empty`
)
return null
}
const options = config.compilerOptions || {}
const { baseUrl, paths } = options
if (!baseUrl && !paths) {
debug(`[!] missing baseUrl and paths: "${configPath}"`)
return null
}
type InternalResolver = (
viteResolve: ViteResolve,
id: string,
importer: string
) => Promise<string | undefined>
const resolveWithBaseUrl: InternalResolver | undefined = baseUrl
? (viteResolve, id, importer) => {
const absoluteId = join(baseUrl, id)
debugResolve('trying with baseUrl:', absoluteId)
return viteResolve(absoluteId, importer)
}
: undefined
let resolveId: InternalResolver
if (paths) {
const pathsRootDir = resolvePathsRootDir(project)
const pathMappings = resolvePathMappings(paths, pathsRootDir)
const resolveWithPaths: InternalResolver = async (
viteResolve,
id,
importer
) => {
for (const mapping of pathMappings) {
const match = id.match(mapping.pattern)
if (!match) {
continue
}
for (let pathTemplate of mapping.paths) {
let starCount = 0
const mappedId = pathTemplate.replace(/\*/g, () => {
// There may exist more globs in the path template than in
// the match pattern. In that case, we reuse the final
// glob match.
const matchIndex = Math.min(++starCount, match.length - 1)
return match[matchIndex]
})
debugResolve('found match, trying to resolve:', mappedId)
const resolved = await viteResolve(mappedId, importer)
if (resolved) {
return resolved
}
}
}
}
if (resolveWithBaseUrl) {
resolveId = (viteResolve, id, importer) =>
resolveWithPaths(viteResolve, id, importer).then((resolved) => {
return resolved ?? resolveWithBaseUrl(viteResolve, id, importer)
})
} else {
resolveId = resolveWithPaths
}
} else {
resolveId = resolveWithBaseUrl!
}
const configDir = dirname(configPath)
// When `tsconfck.parseNative` is used, the outDir is absolute,
// which is not what `getIncluder` expects.
let { outDir } = options
if (outDir && isAbsolute(outDir)) {
outDir = relative(configDir, outDir)
}
const isIncludedRelative = getIncluder(
config.include?.map((p) => ensureRelative(configDir, p)),
config.exclude?.map((p) => ensureRelative(configDir, p)),
outDir
)
const importerExtRE = opts.loose
? /./
: options.allowJs || basename(configPath).startsWith('jsconfig.')
? jsLikeRE
: /\.[mc]?tsx?$/
const resolutionCache = new Map<string, string>()
return async (viteResolve, id, importer) => {
// Ideally, Vite would normalize the importer path for us.
importer = normalizePath(importer)
// Remove query and hash parameters from the importer path.
const importerFile = importer.replace(/[#?].+$/, '')
// Ignore importers with unsupported extensions.
if (!importerExtRE.test(importerFile)) {
debugResolve('importer has unsupported extension. skipping...')
return notApplicable
}
// Respect the include/exclude properties.
const relativeImporterFile = relative(configDir, importerFile)
if (!isIncludedRelative(relativeImporterFile)) {
debugResolve('importer is not included. skipping...')
return notApplicable
}
// Find and remove Vite's suffix (e.g. "?url") if present.
// If the path is resolved, the suffix will be added back.
const suffix = /\?.+$/.exec(id)?.[0]
if (suffix) {
id = id.slice(0, -suffix.length)
}
let resolvedId = resolutionCache.get(id)
if (!resolvedId) {
resolvedId = await resolveId(viteResolve, id, importer)
if (!resolvedId) {
return notFound
}
resolutionCache.set(id, resolvedId)
if (debugResolve.enabled) {
debugResolve('resolved without error:', {
id,
importer,
resolvedId,
configPath,
})
}
}
// Restore the suffix if one was removed earlier.
if (suffix) {
resolvedId += suffix
}
return [resolvedId, true]
}
}
}
const jsLikeRE = /\.(vue|svelte|mdx|[mc]?[jt]sx?)$/
const relativeImportRE = /^\.\.?(\/|$)/
const defaultInclude = ['**/*']
const defaultExclude = [
'**/node_modules',
'**/bower_components',
'**/jspm_packages',
]
/**
* The returned function does not support absolute paths.
* Be sure to call `path.relative` on your path first.
*/
function getIncluder(
includePaths = defaultInclude,
excludePaths = defaultExclude,
outDir?: string
) {
if (outDir) {
excludePaths = excludePaths.concat(outDir)
}
if (includePaths.length || excludePaths.length) {
const includers: RegExp[] = []
const excluders: RegExp[] = []
includePaths.forEach(addCompiledGlob, includers)
excludePaths.forEach(addCompiledGlob, excluders)
debug(`compiled globs:`, { includers, excluders })
return (path: string) => {
path = path.replace(/\?.+$/, '')
if (!relativeImportRE.test(path)) {
path = './' + path
}
const test = (glob: RegExp) => glob.test(path)
return includers.some(test) && !excluders.some(test)
}
}
return () => true
}
function addCompiledGlob(this: RegExp[], glob: string) {
const endsWithGlob = glob.split('/').pop()!.includes('*')
const relativeGlob = relativeImportRE.test(glob) ? glob : './' + glob
if (endsWithGlob) {
this.push(compileGlob(relativeGlob))
} else {
// Append a globstar to possible directories.
this.push(compileGlob(relativeGlob + '/**'))
// Try to match specific files (must have file extension).
if (/\.\w+$/.test(glob)) {
this.push(compileGlob(relativeGlob))
}
}
}
function compileGlob(glob: string) {
return globRex(glob, {
extended: true,
globstar: true,
}).regex
}
function ensureRelative(dir: string, path: string) {
return isAbsolute(path) ? relative(dir, path) : path
}
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSModuleNameDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class TSModuleNameDefinition extends DefinitionBase_1.DefinitionBase {
isTypeDefinition = true;
isVariableDefinition = true;
constructor(name, node) {
super(DefinitionType_1.DefinitionType.TSModuleName, name, node, null);
}
}
exports.TSModuleNameDefinition = TSModuleNameDefinition;
@@ -0,0 +1,18 @@
"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("./object"), exports);
@@ -0,0 +1,9 @@
'use strict';
var implementation = require('./implementation');
module.exports = function getPolyfill() {
return typeof Iterator === 'function' && typeof Iterator.prototype.reduce === 'function'
? Iterator.prototype.reduce
: implementation;
};
@@ -0,0 +1,67 @@
# define-data-property <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
Define a data property on an object. Will fall back to assignment in an engine without descriptors.
The three `non*` argument can also be passed `null`, which will use the existing state if available.
The `loose` argument will mean that if you attempt to set a non-normal data property, in an environment without descriptor support, it will fall back to normal assignment.
## Usage
```javascript
var defineDataProperty = require('define-data-property');
var assert = require('assert');
var obj = {};
defineDataProperty(obj, 'key', 'value');
defineDataProperty(
obj,
'key2',
'value',
true, // nonEnumerable, optional
false, // nonWritable, optional
true, // nonConfigurable, optional
false // loose, optional
);
assert.deepEqual(
Object.getOwnPropertyDescriptors(obj),
{
key: {
configurable: true,
enumerable: true,
value: 'value',
writable: true,
},
key2: {
configurable: false,
enumerable: false,
value: 'value',
writable: true,
},
}
);
```
[package-url]: https://npmjs.org/package/define-data-property
[npm-version-svg]: https://versionbadg.es/ljharb/define-data-property.svg
[deps-svg]: https://david-dm.org/ljharb/define-data-property.svg
[deps-url]: https://david-dm.org/ljharb/define-data-property
[dev-deps-svg]: https://david-dm.org/ljharb/define-data-property/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/define-data-property#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/define-data-property.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/define-data-property.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/define-data-property.svg
[downloads-url]: https://npm-stat.com/charts.html?package=define-data-property
[codecov-image]: https://codecov.io/gh/ljharb/define-data-property/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/define-data-property/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/define-data-property
[actions-url]: https://github.com/ljharb/define-data-property/actions
@@ -0,0 +1,641 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExtendsResult = exports.ExtendsResolverError = void 0;
exports.ExtendsCheck = ExtendsCheck;
const index_1 = require("../any/index");
const index_2 = require("../function/index");
const index_3 = require("../number/index");
const index_4 = require("../string/index");
const index_5 = require("../unknown/index");
const index_6 = require("../template-literal/index");
const index_7 = require("../patterns/index");
const index_8 = require("../symbols/index");
const index_9 = require("../error/index");
const index_10 = require("../guard/index");
class ExtendsResolverError extends index_9.TypeBoxError {
}
exports.ExtendsResolverError = ExtendsResolverError;
var ExtendsResult;
(function (ExtendsResult) {
ExtendsResult[ExtendsResult["Union"] = 0] = "Union";
ExtendsResult[ExtendsResult["True"] = 1] = "True";
ExtendsResult[ExtendsResult["False"] = 2] = "False";
})(ExtendsResult || (exports.ExtendsResult = ExtendsResult = {}));
// ------------------------------------------------------------------
// IntoBooleanResult
// ------------------------------------------------------------------
// prettier-ignore
function IntoBooleanResult(result) {
return result === ExtendsResult.False ? result : ExtendsResult.True;
}
// ------------------------------------------------------------------
// Throw
// ------------------------------------------------------------------
// prettier-ignore
function Throw(message) {
throw new ExtendsResolverError(message);
}
// ------------------------------------------------------------------
// StructuralRight
// ------------------------------------------------------------------
// prettier-ignore
function IsStructuralRight(right) {
return (index_10.TypeGuard.IsNever(right) ||
index_10.TypeGuard.IsIntersect(right) ||
index_10.TypeGuard.IsUnion(right) ||
index_10.TypeGuard.IsUnknown(right) ||
index_10.TypeGuard.IsAny(right));
}
// prettier-ignore
function StructuralRight(left, right) {
return (index_10.TypeGuard.IsNever(right) ? FromNeverRight(left, right) :
index_10.TypeGuard.IsIntersect(right) ? FromIntersectRight(left, right) :
index_10.TypeGuard.IsUnion(right) ? FromUnionRight(left, right) :
index_10.TypeGuard.IsUnknown(right) ? FromUnknownRight(left, right) :
index_10.TypeGuard.IsAny(right) ? FromAnyRight(left, right) :
Throw('StructuralRight'));
}
// ------------------------------------------------------------------
// Any
// ------------------------------------------------------------------
// prettier-ignore
function FromAnyRight(left, right) {
return ExtendsResult.True;
}
// prettier-ignore
function FromAny(left, right) {
return (index_10.TypeGuard.IsIntersect(right) ? FromIntersectRight(left, right) :
(index_10.TypeGuard.IsUnion(right) && right.anyOf.some((schema) => index_10.TypeGuard.IsAny(schema) || index_10.TypeGuard.IsUnknown(schema))) ? ExtendsResult.True :
index_10.TypeGuard.IsUnion(right) ? ExtendsResult.Union :
index_10.TypeGuard.IsUnknown(right) ? ExtendsResult.True :
index_10.TypeGuard.IsAny(right) ? ExtendsResult.True :
ExtendsResult.Union);
}
// ------------------------------------------------------------------
// Array
// ------------------------------------------------------------------
// prettier-ignore
function FromArrayRight(left, right) {
return (index_10.TypeGuard.IsUnknown(left) ? ExtendsResult.False :
index_10.TypeGuard.IsAny(left) ? ExtendsResult.Union :
index_10.TypeGuard.IsNever(left) ? ExtendsResult.True :
ExtendsResult.False);
}
// prettier-ignore
function FromArray(left, right) {
return (index_10.TypeGuard.IsObject(right) && IsObjectArrayLike(right) ? ExtendsResult.True :
IsStructuralRight(right) ? StructuralRight(left, right) :
!index_10.TypeGuard.IsArray(right) ? ExtendsResult.False :
IntoBooleanResult(Visit(left.items, right.items)));
}
// ------------------------------------------------------------------
// AsyncIterator
// ------------------------------------------------------------------
// prettier-ignore
function FromAsyncIterator(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
!index_10.TypeGuard.IsAsyncIterator(right) ? ExtendsResult.False :
IntoBooleanResult(Visit(left.items, right.items)));
}
// ------------------------------------------------------------------
// BigInt
// ------------------------------------------------------------------
// prettier-ignore
function FromBigInt(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
index_10.TypeGuard.IsRecord(right) ? FromRecordRight(left, right) :
index_10.TypeGuard.IsBigInt(right) ? ExtendsResult.True :
ExtendsResult.False);
}
// ------------------------------------------------------------------
// Boolean
// ------------------------------------------------------------------
// prettier-ignore
function FromBooleanRight(left, right) {
return (index_10.TypeGuard.IsLiteralBoolean(left) ? ExtendsResult.True :
index_10.TypeGuard.IsBoolean(left) ? ExtendsResult.True :
ExtendsResult.False);
}
// prettier-ignore
function FromBoolean(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
index_10.TypeGuard.IsRecord(right) ? FromRecordRight(left, right) :
index_10.TypeGuard.IsBoolean(right) ? ExtendsResult.True :
ExtendsResult.False);
}
// ------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------
// prettier-ignore
function FromConstructor(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
!index_10.TypeGuard.IsConstructor(right) ? ExtendsResult.False :
left.parameters.length > right.parameters.length ? ExtendsResult.False :
(!left.parameters.every((schema, index) => IntoBooleanResult(Visit(right.parameters[index], schema)) === ExtendsResult.True)) ? ExtendsResult.False :
IntoBooleanResult(Visit(left.returns, right.returns)));
}
// ------------------------------------------------------------------
// Date
// ------------------------------------------------------------------
// prettier-ignore
function FromDate(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
index_10.TypeGuard.IsRecord(right) ? FromRecordRight(left, right) :
index_10.TypeGuard.IsDate(right) ? ExtendsResult.True :
ExtendsResult.False);
}
// ------------------------------------------------------------------
// Function
// ------------------------------------------------------------------
// prettier-ignore
function FromFunction(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
!index_10.TypeGuard.IsFunction(right) ? ExtendsResult.False :
left.parameters.length > right.parameters.length ? ExtendsResult.False :
(!left.parameters.every((schema, index) => IntoBooleanResult(Visit(right.parameters[index], schema)) === ExtendsResult.True)) ? ExtendsResult.False :
IntoBooleanResult(Visit(left.returns, right.returns)));
}
// ------------------------------------------------------------------
// Integer
// ------------------------------------------------------------------
// prettier-ignore
function FromIntegerRight(left, right) {
return (index_10.TypeGuard.IsLiteral(left) && index_10.ValueGuard.IsNumber(left.const) ? ExtendsResult.True :
index_10.TypeGuard.IsNumber(left) || index_10.TypeGuard.IsInteger(left) ? ExtendsResult.True :
ExtendsResult.False);
}
// prettier-ignore
function FromInteger(left, right) {
return (index_10.TypeGuard.IsInteger(right) || index_10.TypeGuard.IsNumber(right) ? ExtendsResult.True :
IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
index_10.TypeGuard.IsRecord(right) ? FromRecordRight(left, right) :
ExtendsResult.False);
}
// ------------------------------------------------------------------
// Intersect
// ------------------------------------------------------------------
// prettier-ignore
function FromIntersectRight(left, right) {
return right.allOf.every((schema) => Visit(left, schema) === ExtendsResult.True)
? ExtendsResult.True
: ExtendsResult.False;
}
// prettier-ignore
function FromIntersect(left, right) {
return left.allOf.some((schema) => Visit(schema, right) === ExtendsResult.True)
? ExtendsResult.True
: ExtendsResult.False;
}
// ------------------------------------------------------------------
// Iterator
// ------------------------------------------------------------------
// prettier-ignore
function FromIterator(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
!index_10.TypeGuard.IsIterator(right) ? ExtendsResult.False :
IntoBooleanResult(Visit(left.items, right.items)));
}
// ------------------------------------------------------------------
// Literal
// ------------------------------------------------------------------
// prettier-ignore
function FromLiteral(left, right) {
return (index_10.TypeGuard.IsLiteral(right) && right.const === left.const ? ExtendsResult.True :
IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
index_10.TypeGuard.IsRecord(right) ? FromRecordRight(left, right) :
index_10.TypeGuard.IsString(right) ? FromStringRight(left, right) :
index_10.TypeGuard.IsNumber(right) ? FromNumberRight(left, right) :
index_10.TypeGuard.IsInteger(right) ? FromIntegerRight(left, right) :
index_10.TypeGuard.IsBoolean(right) ? FromBooleanRight(left, right) :
ExtendsResult.False);
}
// ------------------------------------------------------------------
// Never
// ------------------------------------------------------------------
// prettier-ignore
function FromNeverRight(left, right) {
return ExtendsResult.False;
}
// prettier-ignore
function FromNever(left, right) {
return ExtendsResult.True;
}
// ------------------------------------------------------------------
// Not
// ------------------------------------------------------------------
// prettier-ignore
function UnwrapTNot(schema) {
let [current, depth] = [schema, 0];
while (true) {
if (!index_10.TypeGuard.IsNot(current))
break;
current = current.not;
depth += 1;
}
return depth % 2 === 0 ? current : (0, index_5.Unknown)();
}
// prettier-ignore
function FromNot(left, right) {
// TypeScript has no concept of negated types, and attempts to correctly check the negated
// type at runtime would put TypeBox at odds with TypeScripts ability to statically infer
// the type. Instead we unwrap to either unknown or T and continue evaluating.
// prettier-ignore
return (index_10.TypeGuard.IsNot(left) ? Visit(UnwrapTNot(left), right) :
index_10.TypeGuard.IsNot(right) ? Visit(left, UnwrapTNot(right)) :
Throw('Invalid fallthrough for Not'));
}
// ------------------------------------------------------------------
// Null
// ------------------------------------------------------------------
// prettier-ignore
function FromNull(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
index_10.TypeGuard.IsRecord(right) ? FromRecordRight(left, right) :
index_10.TypeGuard.IsNull(right) ? ExtendsResult.True :
ExtendsResult.False);
}
// ------------------------------------------------------------------
// Number
// ------------------------------------------------------------------
// prettier-ignore
function FromNumberRight(left, right) {
return (index_10.TypeGuard.IsLiteralNumber(left) ? ExtendsResult.True :
index_10.TypeGuard.IsNumber(left) || index_10.TypeGuard.IsInteger(left) ? ExtendsResult.True :
ExtendsResult.False);
}
// prettier-ignore
function FromNumber(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
index_10.TypeGuard.IsRecord(right) ? FromRecordRight(left, right) :
index_10.TypeGuard.IsInteger(right) || index_10.TypeGuard.IsNumber(right) ? ExtendsResult.True :
ExtendsResult.False);
}
// ------------------------------------------------------------------
// Object
// ------------------------------------------------------------------
// prettier-ignore
function IsObjectPropertyCount(schema, count) {
return Object.getOwnPropertyNames(schema.properties).length === count;
}
// prettier-ignore
function IsObjectStringLike(schema) {
return IsObjectArrayLike(schema);
}
// prettier-ignore
function IsObjectSymbolLike(schema) {
return IsObjectPropertyCount(schema, 0) || (IsObjectPropertyCount(schema, 1) && 'description' in schema.properties && index_10.TypeGuard.IsUnion(schema.properties.description) && schema.properties.description.anyOf.length === 2 && ((index_10.TypeGuard.IsString(schema.properties.description.anyOf[0]) &&
index_10.TypeGuard.IsUndefined(schema.properties.description.anyOf[1])) || (index_10.TypeGuard.IsString(schema.properties.description.anyOf[1]) &&
index_10.TypeGuard.IsUndefined(schema.properties.description.anyOf[0]))));
}
// prettier-ignore
function IsObjectNumberLike(schema) {
return IsObjectPropertyCount(schema, 0);
}
// prettier-ignore
function IsObjectBooleanLike(schema) {
return IsObjectPropertyCount(schema, 0);
}
// prettier-ignore
function IsObjectBigIntLike(schema) {
return IsObjectPropertyCount(schema, 0);
}
// prettier-ignore
function IsObjectDateLike(schema) {
return IsObjectPropertyCount(schema, 0);
}
// prettier-ignore
function IsObjectUint8ArrayLike(schema) {
return IsObjectArrayLike(schema);
}
// prettier-ignore
function IsObjectFunctionLike(schema) {
const length = (0, index_3.Number)();
return IsObjectPropertyCount(schema, 0) || (IsObjectPropertyCount(schema, 1) && 'length' in schema.properties && IntoBooleanResult(Visit(schema.properties['length'], length)) === ExtendsResult.True);
}
// prettier-ignore
function IsObjectConstructorLike(schema) {
return IsObjectPropertyCount(schema, 0);
}
// prettier-ignore
function IsObjectArrayLike(schema) {
const length = (0, index_3.Number)();
return IsObjectPropertyCount(schema, 0) || (IsObjectPropertyCount(schema, 1) && 'length' in schema.properties && IntoBooleanResult(Visit(schema.properties['length'], length)) === ExtendsResult.True);
}
// prettier-ignore
function IsObjectPromiseLike(schema) {
const then = (0, index_2.Function)([(0, index_1.Any)()], (0, index_1.Any)());
return IsObjectPropertyCount(schema, 0) || (IsObjectPropertyCount(schema, 1) && 'then' in schema.properties && IntoBooleanResult(Visit(schema.properties['then'], then)) === ExtendsResult.True);
}
// ------------------------------------------------------------------
// Property
// ------------------------------------------------------------------
// prettier-ignore
function Property(left, right) {
return (Visit(left, right) === ExtendsResult.False ? ExtendsResult.False :
index_10.TypeGuard.IsOptional(left) && !index_10.TypeGuard.IsOptional(right) ? ExtendsResult.False :
ExtendsResult.True);
}
// prettier-ignore
function FromObjectRight(left, right) {
return (index_10.TypeGuard.IsUnknown(left) ? ExtendsResult.False :
index_10.TypeGuard.IsAny(left) ? ExtendsResult.Union : (index_10.TypeGuard.IsNever(left) ||
(index_10.TypeGuard.IsLiteralString(left) && IsObjectStringLike(right)) ||
(index_10.TypeGuard.IsLiteralNumber(left) && IsObjectNumberLike(right)) ||
(index_10.TypeGuard.IsLiteralBoolean(left) && IsObjectBooleanLike(right)) ||
(index_10.TypeGuard.IsSymbol(left) && IsObjectSymbolLike(right)) ||
(index_10.TypeGuard.IsBigInt(left) && IsObjectBigIntLike(right)) ||
(index_10.TypeGuard.IsString(left) && IsObjectStringLike(right)) ||
(index_10.TypeGuard.IsSymbol(left) && IsObjectSymbolLike(right)) ||
(index_10.TypeGuard.IsNumber(left) && IsObjectNumberLike(right)) ||
(index_10.TypeGuard.IsInteger(left) && IsObjectNumberLike(right)) ||
(index_10.TypeGuard.IsBoolean(left) && IsObjectBooleanLike(right)) ||
(index_10.TypeGuard.IsUint8Array(left) && IsObjectUint8ArrayLike(right)) ||
(index_10.TypeGuard.IsDate(left) && IsObjectDateLike(right)) ||
(index_10.TypeGuard.IsConstructor(left) && IsObjectConstructorLike(right)) ||
(index_10.TypeGuard.IsFunction(left) && IsObjectFunctionLike(right))) ? ExtendsResult.True :
(index_10.TypeGuard.IsRecord(left) && index_10.TypeGuard.IsString(RecordKey(left))) ? (() => {
// When expressing a Record with literal key values, the Record is converted into a Object with
// the Hint assigned as `Record`. This is used to invert the extends logic.
return right[index_8.Hint] === 'Record' ? ExtendsResult.True : ExtendsResult.False;
})() :
(index_10.TypeGuard.IsRecord(left) && index_10.TypeGuard.IsNumber(RecordKey(left))) ? (() => {
return IsObjectPropertyCount(right, 0) ? ExtendsResult.True : ExtendsResult.False;
})() :
ExtendsResult.False);
}
// prettier-ignore
function FromObject(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsRecord(right) ? FromRecordRight(left, right) :
!index_10.TypeGuard.IsObject(right) ? ExtendsResult.False :
(() => {
for (const key of Object.getOwnPropertyNames(right.properties)) {
if (!(key in left.properties) && !index_10.TypeGuard.IsOptional(right.properties[key])) {
return ExtendsResult.False;
}
if (index_10.TypeGuard.IsOptional(right.properties[key])) {
return ExtendsResult.True;
}
if (Property(left.properties[key], right.properties[key]) === ExtendsResult.False) {
return ExtendsResult.False;
}
}
return ExtendsResult.True;
})());
}
// ------------------------------------------------------------------
// Promise
// ------------------------------------------------------------------
// prettier-ignore
function FromPromise(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) && IsObjectPromiseLike(right) ? ExtendsResult.True :
!index_10.TypeGuard.IsPromise(right) ? ExtendsResult.False :
IntoBooleanResult(Visit(left.item, right.item)));
}
// ------------------------------------------------------------------
// Record
// ------------------------------------------------------------------
// prettier-ignore
function RecordKey(schema) {
return (index_7.PatternNumberExact in schema.patternProperties ? (0, index_3.Number)() :
index_7.PatternStringExact in schema.patternProperties ? (0, index_4.String)() :
Throw('Unknown record key pattern'));
}
// prettier-ignore
function RecordValue(schema) {
return (index_7.PatternNumberExact in schema.patternProperties ? schema.patternProperties[index_7.PatternNumberExact] :
index_7.PatternStringExact in schema.patternProperties ? schema.patternProperties[index_7.PatternStringExact] :
Throw('Unable to get record value schema'));
}
// prettier-ignore
function FromRecordRight(left, right) {
const [Key, Value] = [RecordKey(right), RecordValue(right)];
return ((index_10.TypeGuard.IsLiteralString(left) && index_10.TypeGuard.IsNumber(Key) && IntoBooleanResult(Visit(left, Value)) === ExtendsResult.True) ? ExtendsResult.True :
index_10.TypeGuard.IsUint8Array(left) && index_10.TypeGuard.IsNumber(Key) ? Visit(left, Value) :
index_10.TypeGuard.IsString(left) && index_10.TypeGuard.IsNumber(Key) ? Visit(left, Value) :
index_10.TypeGuard.IsArray(left) && index_10.TypeGuard.IsNumber(Key) ? Visit(left, Value) :
index_10.TypeGuard.IsObject(left) ? (() => {
for (const key of Object.getOwnPropertyNames(left.properties)) {
if (Property(Value, left.properties[key]) === ExtendsResult.False) {
return ExtendsResult.False;
}
}
return ExtendsResult.True;
})() :
ExtendsResult.False);
}
// prettier-ignore
function FromRecord(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
!index_10.TypeGuard.IsRecord(right) ? ExtendsResult.False :
Visit(RecordValue(left), RecordValue(right)));
}
// ------------------------------------------------------------------
// RegExp
// ------------------------------------------------------------------
// prettier-ignore
function FromRegExp(left, right) {
// Note: RegExp types evaluate as strings, not RegExp objects.
// Here we remap either into string and continue evaluating.
const L = index_10.TypeGuard.IsRegExp(left) ? (0, index_4.String)() : left;
const R = index_10.TypeGuard.IsRegExp(right) ? (0, index_4.String)() : right;
return Visit(L, R);
}
// ------------------------------------------------------------------
// String
// ------------------------------------------------------------------
// prettier-ignore
function FromStringRight(left, right) {
return (index_10.TypeGuard.IsLiteral(left) && index_10.ValueGuard.IsString(left.const) ? ExtendsResult.True :
index_10.TypeGuard.IsString(left) ? ExtendsResult.True :
ExtendsResult.False);
}
// prettier-ignore
function FromString(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
index_10.TypeGuard.IsRecord(right) ? FromRecordRight(left, right) :
index_10.TypeGuard.IsString(right) ? ExtendsResult.True :
ExtendsResult.False);
}
// ------------------------------------------------------------------
// Symbol
// ------------------------------------------------------------------
// prettier-ignore
function FromSymbol(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
index_10.TypeGuard.IsRecord(right) ? FromRecordRight(left, right) :
index_10.TypeGuard.IsSymbol(right) ? ExtendsResult.True :
ExtendsResult.False);
}
// ------------------------------------------------------------------
// TemplateLiteral
// ------------------------------------------------------------------
// prettier-ignore
function FromTemplateLiteral(left, right) {
// TemplateLiteral types are resolved to either unions for finite expressions or string
// for infinite expressions. Here we call to TemplateLiteralResolver to resolve for
// either type and continue evaluating.
return (index_10.TypeGuard.IsTemplateLiteral(left) ? Visit((0, index_6.TemplateLiteralToUnion)(left), right) :
index_10.TypeGuard.IsTemplateLiteral(right) ? Visit(left, (0, index_6.TemplateLiteralToUnion)(right)) :
Throw('Invalid fallthrough for TemplateLiteral'));
}
// ------------------------------------------------------------------
// Tuple
// ------------------------------------------------------------------
// prettier-ignore
function IsArrayOfTuple(left, right) {
return (index_10.TypeGuard.IsArray(right) &&
left.items !== undefined &&
left.items.every((schema) => Visit(schema, right.items) === ExtendsResult.True));
}
// prettier-ignore
function FromTupleRight(left, right) {
return (index_10.TypeGuard.IsNever(left) ? ExtendsResult.True :
index_10.TypeGuard.IsUnknown(left) ? ExtendsResult.False :
index_10.TypeGuard.IsAny(left) ? ExtendsResult.Union :
ExtendsResult.False);
}
// prettier-ignore
function FromTuple(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) && IsObjectArrayLike(right) ? ExtendsResult.True :
index_10.TypeGuard.IsArray(right) && IsArrayOfTuple(left, right) ? ExtendsResult.True :
!index_10.TypeGuard.IsTuple(right) ? ExtendsResult.False :
(index_10.ValueGuard.IsUndefined(left.items) && !index_10.ValueGuard.IsUndefined(right.items)) || (!index_10.ValueGuard.IsUndefined(left.items) && index_10.ValueGuard.IsUndefined(right.items)) ? ExtendsResult.False :
(index_10.ValueGuard.IsUndefined(left.items) && !index_10.ValueGuard.IsUndefined(right.items)) ? ExtendsResult.True :
left.items.every((schema, index) => Visit(schema, right.items[index]) === ExtendsResult.True) ? ExtendsResult.True :
ExtendsResult.False);
}
// ------------------------------------------------------------------
// Uint8Array
// ------------------------------------------------------------------
// prettier-ignore
function FromUint8Array(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
index_10.TypeGuard.IsRecord(right) ? FromRecordRight(left, right) :
index_10.TypeGuard.IsUint8Array(right) ? ExtendsResult.True :
ExtendsResult.False);
}
// ------------------------------------------------------------------
// Undefined
// ------------------------------------------------------------------
// prettier-ignore
function FromUndefined(left, right) {
return (IsStructuralRight(right) ? StructuralRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
index_10.TypeGuard.IsRecord(right) ? FromRecordRight(left, right) :
index_10.TypeGuard.IsVoid(right) ? FromVoidRight(left, right) :
index_10.TypeGuard.IsUndefined(right) ? ExtendsResult.True :
ExtendsResult.False);
}
// ------------------------------------------------------------------
// Union
// ------------------------------------------------------------------
// prettier-ignore
function FromUnionRight(left, right) {
return right.anyOf.some((schema) => Visit(left, schema) === ExtendsResult.True)
? ExtendsResult.True
: ExtendsResult.False;
}
// prettier-ignore
function FromUnion(left, right) {
return left.anyOf.every((schema) => Visit(schema, right) === ExtendsResult.True)
? ExtendsResult.True
: ExtendsResult.False;
}
// ------------------------------------------------------------------
// Unknown
// ------------------------------------------------------------------
// prettier-ignore
function FromUnknownRight(left, right) {
return ExtendsResult.True;
}
// prettier-ignore
function FromUnknown(left, right) {
return (index_10.TypeGuard.IsNever(right) ? FromNeverRight(left, right) :
index_10.TypeGuard.IsIntersect(right) ? FromIntersectRight(left, right) :
index_10.TypeGuard.IsUnion(right) ? FromUnionRight(left, right) :
index_10.TypeGuard.IsAny(right) ? FromAnyRight(left, right) :
index_10.TypeGuard.IsString(right) ? FromStringRight(left, right) :
index_10.TypeGuard.IsNumber(right) ? FromNumberRight(left, right) :
index_10.TypeGuard.IsInteger(right) ? FromIntegerRight(left, right) :
index_10.TypeGuard.IsBoolean(right) ? FromBooleanRight(left, right) :
index_10.TypeGuard.IsArray(right) ? FromArrayRight(left, right) :
index_10.TypeGuard.IsTuple(right) ? FromTupleRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
index_10.TypeGuard.IsUnknown(right) ? ExtendsResult.True :
ExtendsResult.False);
}
// ------------------------------------------------------------------
// Void
// ------------------------------------------------------------------
// prettier-ignore
function FromVoidRight(left, right) {
return (index_10.TypeGuard.IsUndefined(left) ? ExtendsResult.True :
index_10.TypeGuard.IsUndefined(left) ? ExtendsResult.True :
ExtendsResult.False);
}
// prettier-ignore
function FromVoid(left, right) {
return (index_10.TypeGuard.IsIntersect(right) ? FromIntersectRight(left, right) :
index_10.TypeGuard.IsUnion(right) ? FromUnionRight(left, right) :
index_10.TypeGuard.IsUnknown(right) ? FromUnknownRight(left, right) :
index_10.TypeGuard.IsAny(right) ? FromAnyRight(left, right) :
index_10.TypeGuard.IsObject(right) ? FromObjectRight(left, right) :
index_10.TypeGuard.IsVoid(right) ? ExtendsResult.True :
ExtendsResult.False);
}
// prettier-ignore
function Visit(left, right) {
return (
// resolvable
(index_10.TypeGuard.IsTemplateLiteral(left) || index_10.TypeGuard.IsTemplateLiteral(right)) ? FromTemplateLiteral(left, right) :
(index_10.TypeGuard.IsRegExp(left) || index_10.TypeGuard.IsRegExp(right)) ? FromRegExp(left, right) :
(index_10.TypeGuard.IsNot(left) || index_10.TypeGuard.IsNot(right)) ? FromNot(left, right) :
// standard
index_10.TypeGuard.IsAny(left) ? FromAny(left, right) :
index_10.TypeGuard.IsArray(left) ? FromArray(left, right) :
index_10.TypeGuard.IsBigInt(left) ? FromBigInt(left, right) :
index_10.TypeGuard.IsBoolean(left) ? FromBoolean(left, right) :
index_10.TypeGuard.IsAsyncIterator(left) ? FromAsyncIterator(left, right) :
index_10.TypeGuard.IsConstructor(left) ? FromConstructor(left, right) :
index_10.TypeGuard.IsDate(left) ? FromDate(left, right) :
index_10.TypeGuard.IsFunction(left) ? FromFunction(left, right) :
index_10.TypeGuard.IsInteger(left) ? FromInteger(left, right) :
index_10.TypeGuard.IsIntersect(left) ? FromIntersect(left, right) :
index_10.TypeGuard.IsIterator(left) ? FromIterator(left, right) :
index_10.TypeGuard.IsLiteral(left) ? FromLiteral(left, right) :
index_10.TypeGuard.IsNever(left) ? FromNever(left, right) :
index_10.TypeGuard.IsNull(left) ? FromNull(left, right) :
index_10.TypeGuard.IsNumber(left) ? FromNumber(left, right) :
index_10.TypeGuard.IsObject(left) ? FromObject(left, right) :
index_10.TypeGuard.IsRecord(left) ? FromRecord(left, right) :
index_10.TypeGuard.IsString(left) ? FromString(left, right) :
index_10.TypeGuard.IsSymbol(left) ? FromSymbol(left, right) :
index_10.TypeGuard.IsTuple(left) ? FromTuple(left, right) :
index_10.TypeGuard.IsPromise(left) ? FromPromise(left, right) :
index_10.TypeGuard.IsUint8Array(left) ? FromUint8Array(left, right) :
index_10.TypeGuard.IsUndefined(left) ? FromUndefined(left, right) :
index_10.TypeGuard.IsUnion(left) ? FromUnion(left, right) :
index_10.TypeGuard.IsUnknown(left) ? FromUnknown(left, right) :
index_10.TypeGuard.IsVoid(left) ? FromVoid(left, right) :
Throw(`Unknown left type operand '${left[index_8.Kind]}'`));
}
function ExtendsCheck(left, right) {
return Visit(left, right);
}
@@ -0,0 +1,15 @@
import { n as normalizeUnit } from "./normalizeUnit-bp5SODxw.mjs";
import endOf from "./endOf.mjs";
import parse from "./parse.mjs";
import startOf from "./startOf.mjs";
function isSame(date, input, unit) {
unit = normalizeUnit(unit);
const inputMs = +parse(input);
if (!unit) {
return +date === inputMs;
}
return +startOf(new Date(date), unit) <= inputMs && inputMs <= +endOf(new Date(date), unit);
}
export {
isSame as default
};
@@ -0,0 +1,108 @@
var $78605a5d7424e31b$exports = require("./useLayoutEffect.main.js");
var $19a2307bfabafaf1$exports = require("./useValueEffect.main.js");
var $dG5aF$react = require("react");
var $dG5aF$reactariassr = require("@react-aria/ssr");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useId", () => $8c61827343eed941$export$f680877a34711e37);
$parcel$export(module.exports, "mergeIds", () => $8c61827343eed941$export$cd8c9cb68f842629);
$parcel$export(module.exports, "useSlotId", () => $8c61827343eed941$export$b4cc09c592e8fdb8);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
// copied from SSRProvider.tsx to reduce exports, if needed again, consider sharing
let $8c61827343eed941$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);
let $8c61827343eed941$export$d41a04c74483c6ef = new Map();
// This allows us to clean up the idsUpdaterMap when the id is no longer used.
// Map is a strong reference, so unused ids wouldn't be cleaned up otherwise.
// This can happen in suspended components where mount/unmount is not called.
let $8c61827343eed941$var$registry;
if (typeof FinalizationRegistry !== 'undefined') $8c61827343eed941$var$registry = new FinalizationRegistry((heldValue)=>{
$8c61827343eed941$export$d41a04c74483c6ef.delete(heldValue);
});
function $8c61827343eed941$export$f680877a34711e37(defaultId) {
let [value, setValue] = (0, $dG5aF$react.useState)(defaultId);
let nextId = (0, $dG5aF$react.useRef)(null);
let res = (0, $dG5aF$reactariassr.useSSRSafeId)(value);
let cleanupRef = (0, $dG5aF$react.useRef)(null);
if ($8c61827343eed941$var$registry) $8c61827343eed941$var$registry.register(cleanupRef, res);
if ($8c61827343eed941$var$canUseDOM) {
const cacheIdRef = $8c61827343eed941$export$d41a04c74483c6ef.get(res);
if (cacheIdRef && !cacheIdRef.includes(nextId)) cacheIdRef.push(nextId);
else $8c61827343eed941$export$d41a04c74483c6ef.set(res, [
nextId
]);
}
(0, $78605a5d7424e31b$exports.useLayoutEffect)(()=>{
let r = res;
return ()=>{
// In Suspense, the cleanup function may be not called
// when it is though, also remove it from the finalization registry.
if ($8c61827343eed941$var$registry) $8c61827343eed941$var$registry.unregister(cleanupRef);
$8c61827343eed941$export$d41a04c74483c6ef.delete(r);
};
}, [
res
]);
// This cannot cause an infinite loop because the ref is always cleaned up.
// eslint-disable-next-line
(0, $dG5aF$react.useEffect)(()=>{
let newId = nextId.current;
if (newId) setValue(newId);
return ()=>{
if (newId) nextId.current = null;
};
});
return res;
}
function $8c61827343eed941$export$cd8c9cb68f842629(idA, idB) {
if (idA === idB) return idA;
let setIdsA = $8c61827343eed941$export$d41a04c74483c6ef.get(idA);
if (setIdsA) {
setIdsA.forEach((ref)=>ref.current = idB);
return idB;
}
let setIdsB = $8c61827343eed941$export$d41a04c74483c6ef.get(idB);
if (setIdsB) {
setIdsB.forEach((ref)=>ref.current = idA);
return idA;
}
return idB;
}
function $8c61827343eed941$export$b4cc09c592e8fdb8(depArray = []) {
let id = $8c61827343eed941$export$f680877a34711e37();
let [resolvedId, setResolvedId] = (0, $19a2307bfabafaf1$exports.useValueEffect)(id);
let updateId = (0, $dG5aF$react.useCallback)(()=>{
setResolvedId(function*() {
yield id;
yield document.getElementById(id) ? id : undefined;
});
}, [
id,
setResolvedId
]);
(0, $78605a5d7424e31b$exports.useLayoutEffect)(updateId, [
id,
updateId,
...depArray
]);
return resolvedId;
}
//# sourceMappingURL=useId.main.js.map
@@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = pathRotate;
/**
* @file 路径旋转
* @author mengke01(kekee000@gmail.com)
*/
/**
* 对path坐标进行调整
*
* @param {Object} contour 坐标点
* @param {number} angle 角度
* @param {number} centerX x偏移
* @param {number} centerY y偏移
*
* @return {Object} contour 坐标点
*/
function pathRotate(contour, angle, centerX, centerY) {
angle = angle === undefined ? 0 : angle;
var x = centerX || 0;
var y = centerY || 0;
var cos = Math.cos(angle);
var sin = Math.sin(angle);
var px;
var py;
var p;
// x1=cos(angle)*x-sin(angle)*y;
// y1=cos(angle)*y+sin(angle)*x;
for (var i = 0, l = contour.length; i < l; i++) {
p = contour[i];
px = cos * (p.x - x) - sin * (p.y - y);
py = cos * (p.y - y) + sin * (p.x - x);
p.x = px + x;
p.y = py + y;
}
return contour;
}
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Unknown = Unknown;
const type_1 = require("../create/type");
const index_1 = require("../symbols/index");
/** `[Json]` Creates an Unknown type */
function Unknown(options) {
return (0, type_1.CreateType)({ [index_1.Kind]: 'Unknown' }, options);
}
@@ -0,0 +1,17 @@
var $fe732cdb32124ea8$exports = {};
$fe732cdb32124ea8$exports = {
"deselectedItem": (args)=>`${args.item} \u{5DC}\u{5D0} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`,
"longPressToSelect": `\u{5D4}\u{5E7}\u{5E9}\u{5D4} \u{5D0}\u{5E8}\u{5D5}\u{5DB}\u{5D4} \u{5DC}\u{5DB}\u{5E0}\u{5D9}\u{5E1}\u{5D4} \u{5DC}\u{5DE}\u{5E6}\u{5D1} \u{5D1}\u{5D7}\u{5D9}\u{5E8}\u{5D4}.`,
"select": `\u{5D1}\u{5D7}\u{5E8}`,
"selectedAll": `\u{5DB}\u{5DC} \u{5D4}\u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD} \u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}.`,
"selectedCount": (args, formatter)=>`${formatter.plural(args.count, {
"=0": `\u{5DC}\u{5D0} \u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD}`,
one: ()=>`\u{5E4}\u{5E8}\u{5D9}\u{5D8} ${formatter.number(args.count)} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,
other: ()=>`${formatter.number(args.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD} \u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}`
})}.`,
"selectedItem": (args)=>`${args.item} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`
};
export {$fe732cdb32124ea8$exports as default};
//# sourceMappingURL=he-IL.module.js.map
@@ -0,0 +1,210 @@
/**
* @import {
* Code,
* Construct,
* Resolver,
* State,
* TokenizeContext,
* Tokenizer
* } from 'micromark-util-types'
*/
import {ok as assert} from 'devlop'
import {factorySpace} from 'micromark-factory-space'
import {markdownLineEnding, markdownSpace} from 'micromark-util-character'
import {codes, types} from 'micromark-util-symbol'
/** @type {Construct} */
export const setextUnderline = {
name: 'setextUnderline',
resolveTo: resolveToSetextUnderline,
tokenize: tokenizeSetextUnderline
}
/** @type {Resolver} */
function resolveToSetextUnderline(events, context) {
// To do: resolve like `markdown-rs`.
let index = events.length
/** @type {number | undefined} */
let content
/** @type {number | undefined} */
let text
/** @type {number | undefined} */
let definition
// Find the opening of the content.
// It’ll always exist: we don’t tokenize if it isn’t there.
while (index--) {
if (events[index][0] === 'enter') {
if (events[index][1].type === types.content) {
content = index
break
}
if (events[index][1].type === types.paragraph) {
text = index
}
}
// Exit
else {
if (events[index][1].type === types.content) {
// Remove the content end (if needed we’ll add it later)
events.splice(index, 1)
}
if (!definition && events[index][1].type === types.definition) {
definition = index
}
}
}
assert(text !== undefined, 'expected a `text` index to be found')
assert(content !== undefined, 'expected a `text` index to be found')
assert(events[content][2] === context, 'enter context should be same')
assert(
events[events.length - 1][2] === context,
'enter context should be same'
)
const heading = {
type: types.setextHeading,
start: {...events[content][1].start},
end: {...events[events.length - 1][1].end}
}
// Change the paragraph to setext heading text.
events[text][1].type = types.setextHeadingText
// If we have definitions in the content, we’ll keep on having content,
// but we need move it.
if (definition) {
events.splice(text, 0, ['enter', heading, context])
events.splice(definition + 1, 0, ['exit', events[content][1], context])
events[content][1].end = {...events[definition][1].end}
} else {
events[content][1] = heading
}
// Add the heading exit at the end.
events.push(['exit', heading, context])
return events
}
/**
* @this {TokenizeContext}
* Context.
* @type {Tokenizer}
*/
function tokenizeSetextUnderline(effects, ok, nok) {
const self = this
/** @type {NonNullable<Code>} */
let marker
return start
/**
* At start of heading (setext) underline.
*
* ```markdown
* | aa
* > | ==
* ^
* ```
*
* @type {State}
*/
function start(code) {
let index = self.events.length
/** @type {boolean | undefined} */
let paragraph
assert(
code === codes.dash || code === codes.equalsTo,
'expected `=` or `-`'
)
// Find an opening.
while (index--) {
// Skip enter/exit of line ending, line prefix, and content.
// We can now either have a definition or a paragraph.
if (
self.events[index][1].type !== types.lineEnding &&
self.events[index][1].type !== types.linePrefix &&
self.events[index][1].type !== types.content
) {
paragraph = self.events[index][1].type === types.paragraph
break
}
}
// To do: handle lazy/pierce like `markdown-rs`.
// To do: parse indent like `markdown-rs`.
if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) {
effects.enter(types.setextHeadingLine)
marker = code
return before(code)
}
return nok(code)
}
/**
* After optional whitespace, at `-` or `=`.
*
* ```markdown
* | aa
* > | ==
* ^
* ```
*
* @type {State}
*/
function before(code) {
effects.enter(types.setextHeadingLineSequence)
return inside(code)
}
/**
* In sequence.
*
* ```markdown
* | aa
* > | ==
* ^
* ```
*
* @type {State}
*/
function inside(code) {
if (code === marker) {
effects.consume(code)
return inside
}
effects.exit(types.setextHeadingLineSequence)
return markdownSpace(code)
? factorySpace(effects, after, types.lineSuffix)(code)
: after(code)
}
/**
* After sequence, after optional whitespace.
*
* ```markdown
* | aa
* > | ==
* ^
* ```
*
* @type {State}
*/
function after(code) {
if (code === codes.eof || markdownLineEnding(code)) {
effects.exit(types.setextHeadingLine)
return ok(code)
}
return nok(code)
}
}
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/query/react/rtkqImports.ts","../../../src/query/react/module.ts","../../../src/query/utils/capitalize.ts","../../../src/query/utils/countObjectKeys.ts","../../../src/query/endpointDefinitions.ts","../../../src/query/tsHelpers.ts","../../../src/query/react/buildHooks.ts","../../../src/query/react/reactImports.ts","../../../src/query/react/reactReduxImports.ts","../../../src/query/react/constants.ts","../../../src/query/react/useSerializedStableValue.ts","../../../src/query/react/useShallowStableValue.ts","../../../src/query/react/index.ts","../../../src/query/react/ApiProvider.tsx"],"sourcesContent":["export { buildCreateApi, coreModule, copyWithStructuralSharing, setupListeners, QueryStatus, skipToken } from '@reduxjs/toolkit/query';","import { formatProdErrorMessage as _formatProdErrorMessage } from \"@reduxjs/toolkit\";\nimport type { Api, BaseQueryFn, EndpointDefinitions, InfiniteQueryDefinition, Module, MutationDefinition, PrefetchOptions, QueryArgFrom, QueryDefinition, QueryKeys } from '@reduxjs/toolkit/query';\nimport { batch as rrBatch, useDispatch as rrUseDispatch, useSelector as rrUseSelector, useStore as rrUseStore } from 'react-redux';\nimport { createSelector as _createSelector } from 'reselect';\nimport { isInfiniteQueryDefinition, isMutationDefinition, isQueryDefinition } from '../endpointDefinitions';\nimport { safeAssign } from '../tsHelpers';\nimport { capitalize, countObjectKeys } from '../utils';\nimport type { InfiniteQueryHooks, MutationHooks, QueryHooks } from './buildHooks';\nimport { buildHooks } from './buildHooks';\nimport type { HooksWithUniqueNames } from './namedHooks';\nexport const reactHooksModuleName = /* @__PURE__ */Symbol();\nexport type ReactHooksModule = typeof reactHooksModuleName;\ndeclare module '@reduxjs/toolkit/query' {\n export interface ApiModules<\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ReducerPath extends string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n TagTypes extends string> {\n [reactHooksModuleName]: {\n /**\n * Endpoints based on the input endpoints provided to `createApi`, containing `select`, `hooks` and `action matchers`.\n */\n endpoints: { [K in keyof Definitions]: Definitions[K] extends QueryDefinition<any, any, any, any, any> ? QueryHooks<Definitions[K]> : Definitions[K] extends MutationDefinition<any, any, any, any, any> ? MutationHooks<Definitions[K]> : Definitions[K] extends InfiniteQueryDefinition<any, any, any, any, any> ? InfiniteQueryHooks<Definitions[K]> : never };\n /**\n * A hook that accepts a string endpoint name, and provides a callback that when called, pre-fetches the data for that endpoint.\n */\n usePrefetch<EndpointName extends QueryKeys<Definitions>>(endpointName: EndpointName, options?: PrefetchOptions): (arg: QueryArgFrom<Definitions[EndpointName]>, options?: PrefetchOptions) => void;\n } & HooksWithUniqueNames<Definitions>;\n }\n}\ntype RR = typeof import('react-redux');\nexport interface ReactHooksModuleOptions {\n /**\n * The hooks from React Redux to be used\n */\n hooks?: {\n /**\n * The version of the `useDispatch` hook to be used\n */\n useDispatch: RR['useDispatch'];\n /**\n * The version of the `useSelector` hook to be used\n */\n useSelector: RR['useSelector'];\n /**\n * The version of the `useStore` hook to be used\n */\n useStore: RR['useStore'];\n };\n /**\n * The version of the `batchedUpdates` function to be used\n */\n batch?: RR['batch'];\n /**\n * Enables performing asynchronous tasks immediately within a render.\n *\n * @example\n *\n * ```ts\n * import {\n * buildCreateApi,\n * coreModule,\n * reactHooksModule\n * } from '@reduxjs/toolkit/query/react'\n *\n * const createApi = buildCreateApi(\n * coreModule(),\n * reactHooksModule({ unstable__sideEffectsInRender: true })\n * )\n * ```\n */\n unstable__sideEffectsInRender?: boolean;\n /**\n * A selector creator (usually from `reselect`, or matching the same signature)\n */\n createSelector?: typeof _createSelector;\n}\n\n/**\n * Creates a module that generates react hooks from endpoints, for use with `buildCreateApi`.\n *\n * @example\n * ```ts\n * const MyContext = React.createContext<ReactReduxContextValue | null>(null);\n * const customCreateApi = buildCreateApi(\n * coreModule(),\n * reactHooksModule({\n * hooks: {\n * useDispatch: createDispatchHook(MyContext),\n * useSelector: createSelectorHook(MyContext),\n * useStore: createStoreHook(MyContext)\n * }\n * })\n * );\n * ```\n *\n * @returns A module for use with `buildCreateApi`\n */\nexport const reactHooksModule = ({\n batch = rrBatch,\n hooks = {\n useDispatch: rrUseDispatch,\Line truncated
@@ -0,0 +1,85 @@
import { isNode } from '../nodes/identity.js';
import { createStringifyContext, stringify } from './stringify.js';
import { indentComment, lineComment } from './stringifyComment.js';
function stringifyDocument(doc, options) {
const lines = [];
let hasDirectives = options.directives === true;
if (options.directives !== false && doc.directives) {
const dir = doc.directives.toString(doc);
if (dir) {
lines.push(dir);
hasDirectives = true;
}
else if (doc.directives.docStart)
hasDirectives = true;
}
if (hasDirectives)
lines.push('---');
const ctx = createStringifyContext(doc, options);
const { commentString } = ctx.options;
if (doc.commentBefore) {
if (lines.length !== 1)
lines.unshift('');
const cs = commentString(doc.commentBefore);
lines.unshift(indentComment(cs, ''));
}
let chompKeep = false;
let contentComment = null;
if (doc.contents) {
if (isNode(doc.contents)) {
if (doc.contents.spaceBefore && hasDirectives)
lines.push('');
if (doc.contents.commentBefore) {
const cs = commentString(doc.contents.commentBefore);
lines.push(indentComment(cs, ''));
}
// top-level block scalars need to be indented if followed by a comment
ctx.forceBlockIndent = !!doc.comment;
contentComment = doc.contents.comment;
}
const onChompKeep = contentComment ? undefined : () => (chompKeep = true);
let body = stringify(doc.contents, ctx, () => (contentComment = null), onChompKeep);
if (contentComment)
body += lineComment(body, '', commentString(contentComment));
if ((body[0] === '|' || body[0] === '>') &&
lines[lines.length - 1] === '---') {
// Top-level block scalars with a preceding doc marker ought to use the
// same line for their header.
lines[lines.length - 1] = `--- ${body}`;
}
else
lines.push(body);
}
else {
lines.push(stringify(doc.contents, ctx));
}
if (doc.directives?.docEnd) {
if (doc.comment) {
const cs = commentString(doc.comment);
if (cs.includes('\n')) {
lines.push('...');
lines.push(indentComment(cs, ''));
}
else {
lines.push(`... ${cs}`);
}
}
else {
lines.push('...');
}
}
else {
let dc = doc.comment;
if (dc && chompKeep)
dc = dc.replace(/^\n+/, '');
if (dc) {
if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '')
lines.push('');
lines.push(indentComment(commentString(dc), ''));
}
}
return lines.join('\n') + '\n';
}
export { stringifyDocument };
@@ -0,0 +1,181 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/components/code.ts
var code_exports = {};
__export(code_exports, {
code: () => code
});
module.exports = __toCommonJS(code_exports);
// src/utils/tv.ts
var import_tailwind_variants = require("tailwind-variants");
// src/utils/tw-merge-config.ts
var COMMON_UNITS = ["small", "medium", "large"];
var twMergeConfig = {
theme: {
opacity: ["disabled"],
spacing: ["divider"],
borderWidth: COMMON_UNITS,
borderRadius: COMMON_UNITS
},
classGroups: {
shadow: [{ shadow: COMMON_UNITS }],
"font-size": [{ text: ["tiny", ...COMMON_UNITS] }],
"bg-image": [
"bg-stripe-gradient-default",
"bg-stripe-gradient-primary",
"bg-stripe-gradient-secondary",
"bg-stripe-gradient-success",
"bg-stripe-gradient-warning",
"bg-stripe-gradient-danger"
]
}
};
// src/utils/tv.ts
var tv = (options, config) => {
var _a, _b, _c;
return (0, import_tailwind_variants.tv)(options, {
...config,
twMerge: (_a = config == null ? void 0 : config.twMerge) != null ? _a : true,
twMergeConfig: {
...config == null ? void 0 : config.twMergeConfig,
theme: {
...(_b = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _b.theme,
...twMergeConfig.theme
},
classGroups: {
...(_c = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _c.classGroups,
...twMergeConfig.classGroups
}
}
});
};
// src/utils/variants.ts
var solid = {
default: "bg-default text-default-foreground",
primary: "bg-primary text-primary-foreground",
secondary: "bg-secondary text-secondary-foreground",
success: "bg-success text-success-foreground",
warning: "bg-warning text-warning-foreground",
danger: "bg-danger text-danger-foreground",
foreground: "bg-foreground text-background"
};
var shadow = {
default: "shadow-lg shadow-default/50 bg-default text-default-foreground",
primary: "shadow-lg shadow-primary/40 bg-primary text-primary-foreground",
secondary: "shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",
success: "shadow-lg shadow-success/40 bg-success text-success-foreground",
warning: "shadow-lg shadow-warning/40 bg-warning text-warning-foreground",
danger: "shadow-lg shadow-danger/40 bg-danger text-danger-foreground",
foreground: "shadow-lg shadow-foreground/40 bg-foreground text-background"
};
var bordered = {
default: "bg-transparent border-default text-foreground",
primary: "bg-transparent border-primary text-primary",
secondary: "bg-transparent border-secondary text-secondary",
success: "bg-transparent border-success text-success",
warning: "bg-transparent border-warning text-warning",
danger: "bg-transparent border-danger text-danger",
foreground: "bg-transparent border-foreground text-foreground"
};
var flat = {
default: "bg-default/40 text-default-700",
primary: "bg-primary/20 text-primary-600",
secondary: "bg-secondary/20 text-secondary-600",
success: "bg-success/20 text-success-700 dark:text-success",
warning: "bg-warning/20 text-warning-700 dark:text-warning",
danger: "bg-danger/20 text-danger-600 dark:text-danger-500",
foreground: "bg-foreground/10 text-foreground"
};
var faded = {
default: "border-default bg-default-100 text-default-foreground",
primary: "border-default bg-default-100 text-primary",
secondary: "border-default bg-default-100 text-secondary",
success: "border-default bg-default-100 text-success",
warning: "border-default bg-default-100 text-warning",
danger: "border-default bg-default-100 text-danger",
foreground: "border-default bg-default-100 text-foreground"
};
var light = {
default: "bg-transparent text-default-foreground",
primary: "bg-transparent text-primary",
secondary: "bg-transparent text-secondary",
success: "bg-transparent text-success",
warning: "bg-transparent text-warning",
danger: "bg-transparent text-danger",
foreground: "bg-transparent text-foreground"
};
var ghost = {
default: "border-default text-default-foreground",
primary: "border-primary text-primary",
secondary: "border-secondary text-secondary",
success: "border-success text-success",
warning: "border-warning text-warning",
danger: "border-danger text-danger",
foreground: "border-foreground text-foreground hover:!bg-foreground"
};
var colorVariants = {
solid,
shadow,
bordered,
flat,
faded,
light,
ghost
};
// src/components/code.ts
var code = tv({
base: ["px-2", "py-1", "h-fit", "font-mono", "font-normal", "inline-block", "whitespace-nowrap"],
variants: {
color: {
default: colorVariants.flat.default,
primary: colorVariants.flat.primary,
secondary: colorVariants.flat.secondary,
success: colorVariants.flat.success,
warning: colorVariants.flat.warning,
danger: colorVariants.flat.danger
},
size: {
sm: "text-small",
md: "text-medium",
lg: "text-large"
},
radius: {
none: "rounded-none",
sm: "rounded-small",
md: "rounded-medium",
lg: "rounded-large",
full: "rounded-full"
}
},
defaultVariants: {
color: "default",
size: "sm",
radius: "sm"
}
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
code
});
@@ -0,0 +1,67 @@
'use strict'
const u = require('universalify').fromPromise
const path = require('path')
const fs = require('../fs')
const { mkdirs, mkdirsSync } = require('../mkdirs')
const { symlinkPaths, symlinkPathsSync } = require('./symlink-paths')
const { symlinkType, symlinkTypeSync } = require('./symlink-type')
const { pathExists } = require('../path-exists')
const { areIdentical } = require('../util/stat')
async function createSymlink (srcpath, dstpath, type) {
let stats
try {
stats = await fs.lstat(dstpath)
} catch { }
if (stats && stats.isSymbolicLink()) {
const [srcStat, dstStat] = await Promise.all([
fs.stat(srcpath),
fs.stat(dstpath)
])
if (areIdentical(srcStat, dstStat)) return
}
const relative = await symlinkPaths(srcpath, dstpath)
srcpath = relative.toDst
const toType = await symlinkType(relative.toCwd, type)
const dir = path.dirname(dstpath)
if (!(await pathExists(dir))) {
await mkdirs(dir)
}
return fs.symlink(srcpath, dstpath, toType)
}
function createSymlinkSync (srcpath, dstpath, type) {
let stats
try {
stats = fs.lstatSync(dstpath)
} catch { }
if (stats && stats.isSymbolicLink()) {
const srcStat = fs.statSync(srcpath)
const dstStat = fs.statSync(dstpath)
if (areIdentical(srcStat, dstStat)) return
}
const relative = symlinkPathsSync(srcpath, dstpath)
srcpath = relative.toDst
type = symlinkTypeSync(relative.toCwd, type)
const dir = path.dirname(dstpath)
const exists = fs.existsSync(dir)
if (exists) return fs.symlinkSync(srcpath, dstpath, type)
mkdirsSync(dir)
return fs.symlinkSync(srcpath, dstpath, type)
}
module.exports = {
createSymlink: u(createSymlink),
createSymlinkSync
}
@@ -0,0 +1,2 @@
"use strict";var _e=Object.defineProperty;var jt=Object.getOwnPropertyDescriptor;var zt=Object.getOwnPropertyNames;var Wt=Object.prototype.hasOwnProperty;var $t=(e,n)=>{for(var y in n)_e(e,y,{get:n[y],enumerable:!0})},Yt=(e,n,y,m)=>{if(n&&typeof n=="object"||typeof n=="function")for(let p of zt(n))!Wt.call(e,p)&&p!==y&&_e(e,p,{get:()=>n[p],enumerable:!(m=jt(n,p))||m.enumerable});return e};var Jt=e=>Yt(_e({},"__esModule",{value:!0}),e);var pn={};$t(pn,{NamedSchemaError:()=>de,QueryStatus:()=>He,_NEVER:()=>Mt,buildCreateApi:()=>Ke,copyWithStructuralSharing:()=>Se,coreModule:()=>Le,coreModuleName:()=>Me,createApi:()=>Ht,defaultSerializeQueryArgs:()=>ke,fakeBaseQuery:()=>wt,fetchBaseQuery:()=>ut,retry:()=>dt,setupListeners:()=>mt,skipToken:()=>Be});module.exports=Jt(pn);var He=(p=>(p.uninitialized="uninitialized",p.pending="pending",p.fulfilled="fulfilled",p.rejected="rejected",p))(He||{}),Y="uninitialized",Ce="pending",ge="fulfilled",Qe="rejected";function Ve(e){return{status:e,isUninitialized:e===Y,isLoading:e===Ce,isSuccess:e===ge,isError:e===Qe}}var s=require("@reduxjs/toolkit");var tt=s.isPlainObject;function Se(e,n){if(e===n||!(tt(e)&&tt(n)||Array.isArray(e)&&Array.isArray(n)))return n;let y=Object.keys(n),m=Object.keys(e),p=y.length===m.length,S=Array.isArray(n)?[]:{};for(let Q of y)S[Q]=Se(e[Q],n[Q]),p&&(p=e[Q]===S[Q]);return p?e:S}function xe(e,n,y){return e.reduce((m,p,S)=>(n(p,S)&&m.push(y(p,S)),m),[]).flat()}function nt(e){return new RegExp("(^|:)//").test(e)}function rt(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function De(e){return e!=null}function je(e){return[...e?.values()??[]].filter(De)}function it(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var Gt=e=>e.replace(/\/$/,""),Zt=e=>e.replace(/^\//,"");function at(e,n){if(!e)return n;if(!n)return e;if(nt(n))return n;let y=e.endsWith("/")||!n.startsWith("?")?"/":"";return e=Gt(e),n=Zt(n),`${e}${y}${n}`}function ue(e,n,y){return e.has(n)?e.get(n):e.set(n,y(n)).get(n)}var Ee=()=>new Map;var ot=(...e)=>fetch(...e),Xt=e=>e.status>=200&&e.status<=299,en=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function st(e){if(!(0,s.isPlainObject)(e))return e;let n={...e};for(let[y,m]of Object.entries(n))m===void 0&&delete n[y];return n}var tn=e=>typeof e=="object"&&((0,s.isPlainObject)(e)||Array.isArray(e)||typeof e.toJSON=="function");function ut({baseUrl:e,prepareHeaders:n=h=>h,fetchFn:y=ot,paramsSerializer:m,isJsonContentType:p=en,jsonContentType:S="application/json",jsonReplacer:Q,timeout:k,responseHandler:M,validateStatus:x,...D}={}){return typeof fetch>"u"&&y===ot&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(R,b,C)=>{let{getState:P,extra:f,endpoint:A,forced:B,type:u}=b,l,{url:r,headers:T=new Headers(D.headers),params:E=void 0,responseHandler:g=M??"json",validateStatus:c=x??Xt,timeout:a=k,...t}=typeof R=="string"?{url:R}:R,i,o=b.signal;a&&(i=new AbortController,b.signal.addEventListener("abort",i.abort),o=i.signal);let d={...D,signal:o,...t};T=new Headers(st(T)),d.headers=await n(T,{getState:P,arg:R,extra:f,endpoint:A,forced:B,type:u,extraOptions:C})||T;let w=tn(d.body);if(d.body!=null&&!w&&typeof d.body!="string"&&d.headers.delete("content-type"),!d.headers.has("content-type")&&w&&d.headers.set("content-type",S),w&&p(d.headers)&&(d.body=JSON.stringify(d.body,Q)),d.headers.has("accept")||(g==="json"?d.headers.set("accept","application/json"):g==="text"&&d.headers.set("accept","text/plain, text/html, */*")),E){let U=~r.indexOf("?")?"&":"?",V=m?m(E):new URLSearchParams(st(E));r+=U+V}r=at(e,r);let v=new Request(r,d);l={request:new Request(r,d)};let F,I=!1,N=i&&setTimeout(()=>{I=!0,i.abort()},a);try{F=await y(v)}catch(U){return{error:{status:I?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(U)},meta:l}}finally{N&&clearTimeout(N),i?.signal.removeEventListener("abort",i.abort)}let j=F.clone();l.response=j;let z,J="";try{let U;if(await Promise.all([h(F,g).then(V=>z=V,V=>U=V),j.text().then(V=>J=V,()=>{})]),U)throw U}catch(U){return{error:{status:"PARSING_ERROR",originalStatus:F.status,data:J,error:String(U)},meta:l}}return c(F,z)?{data:z,meta:l}:{error:{status:F.status,data:z},meta:l}};async function h(R,b){if(typeof b=="function")return b(R);if(b==="content-type"&&(b=p(R.headers)?"json":"text"),b==="json"){let C=await R.text();return C.length?JSON.parse(C):null}return R.text()}}var X=class{constructor(n,y=void 0){this.value=n;this.meta=y}};async function nn(e=0,n=5,y){let m=Math.min(e,n),p=~~((Math.random()+.4)*(300<<m));await new Promise((S,Q)=>{let k=setTimeout(()=>S(),p);if(y){let M=()=>{clearTimeout(k),Q(new Error("Aborted"))};y.aborted?(clearTimeout(k),Q(new Error("Aborted"))):y.addEventListener("abort",M,{once:!0})}})}function pt(e,n){throw Object.assign(new X({error:e,meta:n}),{throwImmediately:!0})}function ze(e){e.aborted&&pt({status:"CUSTOM_ERROR",error:"Aborted"})}var yt={},rn=(e,n)=>asyncLine truncated
//# sourceMappingURL=rtk-query.production.min.cjs.map
@@ -0,0 +1,7 @@
declare global {
interface Object {
should: Chai.Assertion;
}
}
export {};
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = getImplicitRole;
var _ariaQuery = require("aria-query");
var _implicitRoles = _interopRequireDefault(require("./implicitRoles"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* Returns an element's implicit role given its attributes and type.
* Some elements only have an implicit role when certain props are defined.
*/
function getImplicitRole(type, attributes) {
var implicitRole;
if (_implicitRoles["default"][type]) {
implicitRole = _implicitRoles["default"][type](attributes);
}
if (_ariaQuery.roles.has(implicitRole)) {
return implicitRole;
}
return null;
}
module.exports = exports.default;
@@ -0,0 +1,12 @@
'use strict';
var l=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,u=e=>!e||typeof e!="object"||Object.keys(e).length===0,x=(e,o)=>JSON.stringify(e)===JSON.stringify(o),A=e=>typeof e=="boolean";function i(e,o){e.forEach(function(r){Array.isArray(r)?i(r,o):o.push(r);});}function y(e){let o=[];return i(e,o),o}var a=(...e)=>y(e).filter(Boolean),p=(e,o)=>{let r={},c=Object.keys(e),f=Object.keys(o);for(let t of c)if(f.includes(t)){let s=e[t],n=o[t];typeof s=="object"&&typeof n=="object"?r[t]=p(s,n):Array.isArray(s)||Array.isArray(n)?r[t]=a(n,s):r[t]=n+" "+s;}else r[t]=e[t];for(let t of f)c.includes(t)||(r[t]=o[t]);return r},g=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();
exports.falsyToString = l;
exports.flatArray = y;
exports.flatMergeArrays = a;
exports.isBoolean = A;
exports.isEmptyObject = u;
exports.isEqual = x;
exports.mergeObjects = p;
exports.removeExtraSpaces = g;
@@ -0,0 +1,63 @@
{
"name": "flat-cache",
"version": "4.0.1",
"description": "A stupidly simple key/value storage using files to persist some data",
"repository": "jaredwray/flat-cache",
"license": "MIT",
"author": {
"name": "Jared Wray",
"url": "https://jaredwray.com"
},
"main": "src/cache.js",
"files": [
"src/cache.js",
"src/del.js",
"src/utils.js"
],
"engines": {
"node": ">=16"
},
"precommit": [
"npm run verify --silent"
],
"prepush": [
"npm run verify --silent"
],
"scripts": {
"eslint": "eslint --cache --cache-location=node_modules/.cache/ ./src/**/*.js ./test/**/*.js",
"clean": "rimraf ./node_modules ./package-lock.json ./yarn.lock ./coverage",
"eslint-fix": "npm run eslint -- --fix",
"autofix": "npm run eslint-fix",
"check": "npm run eslint",
"verify": "npm run eslint && npm run test:cache",
"test:cache": "c8 mocha -R spec test/specs",
"test:ci:cache": "c8 --reporter=lcov mocha -R spec test/specs",
"test": "npm run verify --silent",
"format": "prettier --write ."
},
"keywords": [
"json cache",
"simple cache",
"file cache",
"key par",
"key value",
"cache"
],
"devDependencies": {
"c8": "^9.1.0",
"chai": "^4.3.10",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-mocha": "^10.2.0",
"glob-expand": "^0.2.1",
"mocha": "^10.3.0",
"prettier": "^3.2.4",
"rimraf": "^5.0.5",
"sinon": "^17.0.1",
"write": "^2.0.0"
},
"dependencies": {
"flatted": "^3.2.9",
"keyv": "^4.5.4"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"ServiceResolutionManager.js","sourceRoot":"","sources":["../../../../src/container/services/ServiceResolutionManager.ts"],"names":[],"mappings":";;;AAAA,gDAI6B;AAC7B,4CAe2B;AAE3B,wFAAqF;AACrF,gGAA6F;AAI7F,MAAa,wBAAwB;IAC1B,SAAS,CAAU;IACnB,aAAa,CAAe;IAC5B,8BAA8B,CAEkB;IACzD,kBAAkB,CAAoB;IAC7B,eAAe,CAGX;IACJ,4BAA4B,CAA8B;IAC1D,wBAAwB,CAA0B;IAE3D,YACE,2BAAwD,EACxD,uBAAgD,EAChD,QAAiB,EACjB,YAA0B;QAE1B,IAAI,CAAC,4BAA4B,GAAG,2BAA2B,CAAC;QAChE,IAAI,CAAC,wBAAwB,GAAG,uBAAuB,CAAC;QACxD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,uBAAuB,EAAE,CAAC;QACzD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;QAElC,IAAI,CAAC,8BAA8B,GAAG,CACpC,iBAAgD,EACK,EAAE,CACvD,IAAI,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,GAAG,CAAC,iBAAiB,CAExD,CAAC;QAEhB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAE1B,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,GAAG,EAAE;YACzC,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC;IAUM,GAAG,CACR,iBAAuC,EACvC,OAAoB;QAEpB,MAAM,UAAU,GAAe,IAAI,CAAC,gBAAgB,CAClD,KAAK,EACL,iBAAiB,EACjB,OAAO,CACR,CAAC;QAEF,MAAM,aAAa,GACjB,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;QAEtC,IAAI,IAAA,kBAAS,EAAC,aAAa,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,iDAAuB,CAC/B,yDAA2B,CAAC,gBAAgB,EAC5C,2DAA2D,IAAA,mCAA0B,EAAC,iBAAiB,CAAC,GAAG,CAC5G,CAAC;QACJ,CAAC;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;IAEM,MAAM,CACX,iBAAuC,EACvC,OAAuB;QAEvB,MAAM,UAAU,GAAe,IAAI,CAAC,gBAAgB,CAClD,IAAI,EACJ,iBAAiB,EACjB,OAAO,CACR,CAAC;QAEF,MAAM,aAAa,GACjB,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;QAEtC,IAAI,IAAA,kBAAS,EAAC,aAAa,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,iDAAuB,CAC/B,yDAA2B,CAAC,gBAAgB,EAC5C,2DAA2D,IAAA,mCAA0B,EAAC,iBAAiB,CAAC,GAAG,CAC5G,CAAC;QACJ,CAAC;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;IAEM,KAAK,CAAC,WAAW,CACtB,iBAAuC,EACvC,OAAuB;QAEvB,MAAM,UAAU,GAAe,IAAI,CAAC,gBAAgB,CAClD,IAAI,EACJ,iBAAiB,EACjB,OAAO,CACR,CAAC;QAEF,OAAO,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IAUM,KAAK,CAAC,QAAQ,CACnB,iBAAuC,EACvC,OAAoB;QAEpB,MAAM,UAAU,GAAe,IAAI,CAAC,gBAAgB,CAClD,KAAK,EACL,iBAAiB,EACjB,OAAO,CACR,CAAC;QAEF,OAAO,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IAEM,MAAM,CACX,OAA8D;QAE9D,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAED,wBAAwB;QACtB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,uBAAuB,EAAE,CAAC;IAC3D,CAAC;IAED,oBAAoB,CAClB,UAAmB,EACnB,iBAAoC,EACpC,OAA+C;QAE/C,MAAM,IAAI,GAA6B,OAAO,EAAE,IAAI,CAAC;QACrD,MAAM,QAAQ,GAAY,OAAO,EAAE,QAAQ,IAAI,KAAK,CAAC;QACrD,MAAM,GAAG,GAAwC,OAAO,EAAE,GAAG,CAAC;QAE9D,IAAI,UAAU,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EACJ,OAA8C,EAAE,OAAO,IAAI,KAAK;gBACnE,UAAU;gBACV,IAAI;gBACJ,QAAQ;gBACR,iBAAiB;gBACjB,GAAG;aACJ,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO;gBACL,UAAU;gBACV,IAAI;gBACJ,QAAQ;gBACR,iBAAiB;gBACjB,GAAG;aACJ,CAAC;QACJ,CAAC;IACH,CAAC;IAED,gBAAgB,CACd,iBAAoC,EACpC,UAAmB,EACnB,OAAoC;QAEpC,MAAM,UAAU,GAAe;YAC7B,eAAe,EACb,CAAC,OAAO,EAAE,QAAQ,IAAI,IAAI,CAAC,SAAS,CAAC;gBACnC,CAAC,CAAC;oBACE,KAAK,EAAE,IAAI,CAAC,aAAa;iBAC1B;gBACH,CAAC,CAAC,SAAS;YACf,UAAU,EAAE,IAAI,CAAC,4BAA4B,CAAC,oBAAoB;YAClE,eAAe,EAAE,IAAI,CAAC,2BAA2B,CAC/C,iBAAiB,EACjB,UAAU,EACV,OAAO,CACR;YACD,cAAc,EAAE,EAAE;SACnB,CAAC;QAEF,IAAI,CAAC,gCAAgC,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAE3D,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,2BAA2B,CACzB,iBAAoC,EACpC,UAAmB,EACnB,OAAoC;QAEpC,IAAI,UAAU,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EACJ,OAA8C,EAAE,OAAO,IAAI,KAAK;gBACnE,UAAU;gBACV,iBAAiB;aAClB,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO;gBACL,UAAU;gBACV,iBAAiB;aAClB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,gBAAgB,CACd,UAAmB,EACnB,iBAAoC,EACpC,OAA+C;QAE/C,MAAM,cAAc,GAAmB,IAAI,CAAC,oBAAoB,CAC9D,UAAU,EACV,iBAAiB,EACjB,OAAO,CACR,CAAC;QAEF,MAAM,mBAAmB,GACvB,IAAI,CAAC,wBAAwB,CAAC,sBAAsB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAE3E,IAAI,mBAAmB,KAAK,SAAS,EAAE,CAAC;YACtC,OAAO,mBAAmB,CAAC;QAC7B,CAAC;QAED,MAAM,UAAU,GAAe,IAAA,WAAI,EACjC,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,UAAU,EAAE,OAAO,CAAC,CAC9D,CAAC;QAEF,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YAC3C,OAAO,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;QACtC,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,uBAAuB;QACrB,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;YACxB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;YAC9B,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC;YACxC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;SACnC,CAAC;IACJ,CAAC;IAED,6EAA6E;IAC7E,kBAAkB,CAAI,UAAsB;QAC1C,OAAO,IAAA,cAAO,EAAC;YACb,OAAO,EAAE,IAAI,CAAC,kBAAkB;YAChC,cAAc,EAAE,IAAI,CAAC,8BAA8B;YACnD,UAAU;YACV,iBAAiB,EAAE,IAAI,GAAG,EAAE;SAC7B,CAAM,CAAC;IACV,CAAC;IAED,gCAAgC,CAC9B,UAAsB,EACtB,OAA+C;QAE/C,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO;QACT,CAAC;QAED,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,UAAU,CAAC,eAAe,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACjD,CAAC;QAED,IAAI,OAAO,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;YAC9B,UAAU,CAAC,eAAe,CAAC,UAAU,GAAG,IAAI,CAAC;QAC/C,CAAC;QAED,IAAI,OAAO,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;YAC9B,UAAU,CAAC,eAAe,CAAC,GAAG,GAAG;gBAC/B,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG;gBACpB,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,KAAK;aACzB,CAAC;QACJ,CAAC;QAED,IAAI,UAAU,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;YAC1C,UAAU,CAAC,eAAe,CAAC,OAAO;gBAC/B,OAA8C,EAAE,OAAO,IAAI,KAAK,CAAC;QACtE,CAAC;IACH,CAAC;CACF;AAlSD,4DAkSC"}
@@ -0,0 +1,29 @@
import type { Directives } from '../doc/directives';
import type { ParsedNode } from '../nodes/Node';
import type { ParseOptions } from '../options';
import type { SourceToken, Token } from '../parse/cst';
import type { Schema } from '../schema/Schema';
import type { ComposeErrorHandler } from './composer';
export interface ComposeContext {
atKey: boolean;
atRoot: boolean;
directives: Directives;
options: Readonly<Required<Omit<ParseOptions, 'lineCounter'>>>;
schema: Readonly<Schema>;
}
interface Props {
spaceBefore: boolean;
comment: string;
anchor: SourceToken | null;
tag: SourceToken | null;
newlineAfterProp: SourceToken | null;
end: number;
}
declare const CN: {
composeNode: typeof composeNode;
composeEmptyNode: typeof composeEmptyNode;
};
export type ComposeNode = typeof CN;
export declare function composeNode(ctx: ComposeContext, token: Token, props: Props, onError: ComposeErrorHandler): ParsedNode;
export declare function composeEmptyNode(ctx: ComposeContext, offset: number, before: Token[] | undefined, pos: number | null, { spaceBefore, comment, anchor, tag, end }: Props, onError: ComposeErrorHandler): import('../index').Scalar.Parsed;
export {};
@@ -0,0 +1,8 @@
// Generated using scripts/write-decode-map.ts
export const htmlDecodeTree: Uint16Array = /* #__PURE__ */ new Uint16Array(
// prettier-ignore
/* #__PURE__ */ "\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\uLine truncated
.split("")
.map((c) => c.charCodeAt(0)),
);
@@ -0,0 +1,130 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.config = config;
/**
* Utility function to make it easy to strictly type your "Flat" config file
* @example
* ```js
* // @ts-check
*
* import eslint from '@eslint/js';
* import tseslint from 'typescript-eslint';
*
* export default tseslint.config(
* eslint.configs.recommended,
* tseslint.configs.recommended,
* {
* rules: {
* '@typescript-eslint/array-type': 'error',
* },
* },
* );
* ```
*
* @deprecated ESLint core now provides this functionality via `defineConfig()`,
* which we now recommend instead. See {@link https://typescript-eslint.io/packages/typescript-eslint/#config-deprecated}.
*/
function config(...configs) {
return configImpl(...configs);
}
// Implementation of the config function without assuming the runtime type of
// the input.
function configImpl(...configs) {
const flattened = configs.flat(Infinity);
return flattened.flatMap((configWithExtends, configIndex) => {
if (configWithExtends == null ||
typeof configWithExtends !== 'object' ||
!('extends' in configWithExtends)) {
// Unless the object is a config object with extends key, just forward it
// along to eslint.
return configWithExtends;
}
const { extends: extendsArr, ..._config } = configWithExtends;
const config = _config;
if (extendsArr == null) {
// If the extends value is nullish, just forward along the rest of the
// config object to eslint.
return config;
}
const name = (() => {
if ('name' in configWithExtends && configWithExtends.name != null) {
if (typeof configWithExtends.name !== 'string') {
throw new Error(`tseslint.config(): Config at index ${configIndex} has a 'name' property that is not a string.`);
}
return configWithExtends.name;
}
return undefined;
})();
const nameErrorPhrase = name != null ? `, named "${name}",` : ' (anonymous)';
if (!Array.isArray(extendsArr)) {
throw new TypeError(`tseslint.config(): Config at index ${configIndex}${nameErrorPhrase} has an 'extends' property that is not an array.`);
}
const extendsArrFlattened = extendsArr.flat(Infinity);
const nonObjectExtensions = [];
for (const [extensionIndex, extension] of extendsArrFlattened.entries()) {
// special error message to be clear we don't support eslint's stringly typed extends.
// https://eslint.org/docs/latest/use/configure/configuration-files#extending-configurations
if (typeof extension === 'string') {
throw new Error(`tseslint.config(): Config at index ${configIndex}${nameErrorPhrase} has an 'extends' array that contains a string (${JSON.stringify(extension)}) at index ${extensionIndex}.` +
" This is a feature of eslint's `defineConfig()` helper and is not supported by typescript-eslint." +
' Please provide a config object instead.');
}
if (extension == null || typeof extension !== 'object') {
nonObjectExtensions.push(extensionIndex);
continue;
}
// https://github.com/eslint/rewrite/blob/82d07fd0e8e06780b552a41f8bcbe2a4f8741d42/packages/config-helpers/src/define-config.js#L448-L450
if ('basePath' in extension) {
throw new TypeError(`tseslint.config(): Config at index ${configIndex}${nameErrorPhrase} has an 'extends' array that contains a config with a 'basePath' property at index ${extensionIndex}.` +
` 'basePath' in 'extends' is not allowed.`);
}
if ('extends' in extension) {
throw new TypeError(`tseslint.config(): Config at index ${configIndex}${nameErrorPhrase} has an 'extends' array that contains a config with an 'extends' property at index ${extensionIndex}.` +
` Nested 'extends' is not allowed.`);
}
}
if (nonObjectExtensions.length > 0) {
const extensionIndices = nonObjectExtensions.join(', ');
throw new TypeError(`tseslint.config(): Config at index ${configIndex}${nameErrorPhrase} contains non-object` +
` extensions at the following indices: ${extensionIndices}.`);
}
const configArray = [];
for (const _extension of extendsArrFlattened) {
const extension = _extension;
const resolvedConfigName = [name, extension.name]
.filter(Boolean)
.join('__');
if (isPossiblyGlobalIgnores(extension)) {
// If it's a global ignores, then just pass it along
configArray.push({
...extension,
...(resolvedConfigName !== '' ? { name: resolvedConfigName } : {}),
});
}
else {
configArray.push({
...extension,
...(config.files ? { files: config.files } : {}),
...(config.ignores ? { ignores: config.ignores } : {}),
...(config.basePath ? { basePath: config.basePath } : {}),
...(resolvedConfigName !== '' ? { name: resolvedConfigName } : {}),
});
}
}
// If the base config could form a global ignores object, then we mustn't include
// it in the output. Otherwise, we must add it in order for it to have effect.
if (!isPossiblyGlobalIgnores(config)) {
configArray.push(config);
}
return configArray;
});
}
/**
* This utility function returns false if the config objects contains any field
* that would prevent it from being considered a global ignores object and true
* otherwise. Note in particular that the `ignores` field may not be present and
* the return value can still be true.
*/
function isPossiblyGlobalIgnores(config) {
return Object.keys(config).every(key => ['name', 'ignores', 'basePath'].includes(key));
}
@@ -0,0 +1,124 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var comboboxRole = {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-activedescendant': null,
'aria-autocomplete': null,
'aria-errormessage': null,
'aria-invalid': null,
'aria-readonly': null,
'aria-required': null,
'aria-expanded': 'false',
'aria-haspopup': 'listbox'
},
relatedConcepts: [{
concept: {
attributes: [{
constraints: ['set'],
name: 'list'
}, {
name: 'type',
value: 'email'
}],
name: 'input'
},
module: 'HTML'
}, {
concept: {
attributes: [{
constraints: ['set'],
name: 'list'
}, {
name: 'type',
value: 'search'
}],
name: 'input'
},
module: 'HTML'
}, {
concept: {
attributes: [{
constraints: ['set'],
name: 'list'
}, {
name: 'type',
value: 'tel'
}],
name: 'input'
},
module: 'HTML'
}, {
concept: {
attributes: [{
constraints: ['set'],
name: 'list'
}, {
name: 'type',
value: 'text'
}],
name: 'input'
},
module: 'HTML'
}, {
concept: {
attributes: [{
constraints: ['set'],
name: 'list'
}, {
name: 'type',
value: 'url'
}],
name: 'input'
},
module: 'HTML'
}, {
concept: {
attributes: [{
constraints: ['set'],
name: 'list'
}, {
name: 'type',
value: 'url'
}],
name: 'input'
},
module: 'HTML'
}, {
concept: {
attributes: [{
constraints: ['undefined'],
name: 'multiple'
}, {
constraints: ['undefined'],
name: 'size'
}],
constraints: ['the multiple attribute is not set and the size attribute does not have a value greater than 1'],
name: 'select'
},
module: 'HTML'
}, {
concept: {
name: 'select'
},
module: 'XForms'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {
'aria-controls': null,
'aria-expanded': 'false'
},
superClass: [['roletype', 'widget', 'input']]
};
var _default = exports.default = comboboxRole;
@@ -0,0 +1,26 @@
'use strict';
var $TypeError = require('es-errors/type');
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/15.0/#sec-makefullyear
module.exports = function MakeFullYear(year) {
if (typeof year !== 'number') {
throw new $TypeError('Assertion failed: `year` must be a Number');
}
if (isNaN(year)) {
return NaN; // step 1
}
var truncated = ToIntegerOrInfinity(year); // step 2
if (0 <= truncated && truncated <= 99) {
return 1900 + truncated; // step 3
}
return truncated; // step 4
};
@@ -0,0 +1,12 @@
import * as _heroui_system from '@heroui/system';
import { UseBreadcrumbItemProps } from './use-breadcrumb-item.js';
import 'react';
import '@heroui/theme';
import '@react-types/breadcrumbs';
import '@heroui/react-utils';
interface BreadcrumbItemProps extends UseBreadcrumbItemProps {
}
declare const Breadcrumbs: _heroui_system.InternalForwardRefRenderFunction<"li", BreadcrumbItemProps, never>;
export { BreadcrumbItemProps, Breadcrumbs as default };
@@ -0,0 +1,70 @@
import { compile } from '../compile';
const template = (str, ...defs) => {
return (props) => compile(str, defs, props);
};
describe('compile', () => {
it('simple', () => {
expect(template`prop: 1;`({})).toEqual('prop: 1;');
});
it('vnode', () => {
expect(template`prop: 1; ${() => ({ props: { className: 'class' } })}`({})).toEqual(
'prop: 1; .class'
);
// Empty or falsy
expect(template`prop: 1; ${() => ({ props: { foo: 1 } })}`({})).toEqual('prop: 1; ');
});
it('vanilla classname', () => {
expect(template`prop: 1; ${() => 'go0ber'}`({})).toEqual('prop: 1; .go0ber');
});
it('value interpolations', () => {
// This interpolations are testing the ability to interpolate thruty and falsy values
expect(template`prop: 1; ${() => 0},${() => undefined},${() => null},${2}`({})).toEqual(
'prop: 1; 0,,,2'
);
const tmpl = template`
background: dodgerblue;
${(props) =>
props.padding === 'bloo' &&
`
padding: ${props.padding}px;
`}
border: 1px solid blue;
`;
expect(tmpl({})).toEqual(`
background: dodgerblue;
border: 1px solid blue;
`);
});
describe('objects', () => {
it('normal', () => {
expect(template`prop: 1;${(p) => ({ color: p.color })}`({ color: 'red' })).toEqual(
'prop: 1;color:red;'
);
});
it('styled-system', () => {
const color = (p) => ({ color: p.color });
const background = (p) => ({ backgroundColor: p.backgroundColor });
const props = { color: 'red', backgroundColor: 'blue' };
const res = template`
prop: 1;
${color}
${background}
`(props);
expect(res.replace(/([\s|\n]+)/gm, '').trim()).toEqual(
'prop:1;color:red;background-color:blue;'
);
});
});
});
@@ -0,0 +1,5 @@
'use strict'
const SemVer = require('../classes/semver')
const minor = (a, loose) => new SemVer(a, loose).minor
module.exports = minor
@@ -0,0 +1,15 @@
The ISC License
Copyright (c) npm, Inc. 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.
@@ -0,0 +1,172 @@
# v1.4.1
- fix .prettierignore
- add source trasformation example
# v1.4.0
- ESM compatibility improvements; fixes #159, #161
# v1.3.1
- allow for valid empty jsdoc; fixes #128
# v1.3.0
- add support for custom block markers
# v1.2.4
- reverting engine constraint back to ^12.0.0
# v1.2.3
- publishing missing fix: point package's main to .cjs file
# v1.2.2
- re-export ./util on the top-level for compatibility with older Node
- point package's main to .cjs file
# v1.2.1
- bump `engines` per `exports` issues in earlier Node versions
# v1.2.0
- keep and handle appropriately CR line endings
# v1.1.6-beta.3
- process CRs as a separate .lineEnd toke
# v1.1.6-beta.2
- ESM/CJS compatibility fixes
# v1.1.6-beta.1
- support native ESM
# v1.1.6-beta.0
- keep original CR line endings
- allow to normalize line endings with `crlf` transform
# v1.1.5
- drop unused variables
- add .editorconfig
# v1.1.4
- `bugfix` fix unsynced lib/
# v1.1.3
- export primitive type on the top level: Markers, Block, Spec, Line, Tokens, Problem
# v1.1.2
- `bugfix` Allow to build nested tags from `name.subname` even if `name` wasn't d
- `bugfix` Preserve indentation when extracting comments
# v1.1.1
- add helpers for rewiring Spec.source <-> Spec.tags.source
# v1.1.0
- split tokenizers into separate modules
- allow multiline {type} definitions - issue #109
- allow using "=>" in [name=default] defaults – issue #112
- allow using "=" in quoted [name=default] defaults – issue #112
- add tokenizers usage example - issue #111
# v1.0.0
- complete rewrite in TS with more flexible API
# v0.7.6
- distinct non-critical errors by providing `err.warning`
# v0.7.5
- name parsing fixes
# v0.7.4
- node 8 backward compatibility fixes
# v0.7.3
- make stringify result more close to the source
# v0.7.2
- make stringify to start each line with * in multiline comments
# v0.7.1
- ensure non-space characters after asterisk are included in source
# v0.7.0
- allow fenced blocks in tag description, see opts.fence
# v0.6.2
- document TypeScript definitions
# v0.6.1
- adjust strigifier indentation
# v0.6.0
- soft-drop node@6 support
- migrate to ES6 syntax
- allow to generate comments out of parsed data
# v0.5.5
- allow loose tag names, e.g. @.tag, @-tag
# v0.5.4
- allow quoted literal names, e.g. `@tag "My Var" description`
# v0.5.3
- corrected TypeScript definitions
# v0.5.2
- added TypeScript definitions
- removed `readable-stream` dependency
# v0.5.1
- Support for tab as separator between tag components.
- Docs: Indicate when `optional` is `true`; `default` property
# v0.5.0
- line wrapping control with `opts.join`
# v0.4.2
- tolerate inconsistent lines alignment within block
# v0.4.1
- refactored parsing, allow to not start lines with "* " inside block
# v0.3.2
- fix RegExp for `description` extraction to allow $ char
# v0.3.1
- use `readable-stream` fro Node 0.8 comatibility
- allow to pass optional parameters to `parse.file(path [,opts], done)`
- allow `parse.stream` to work with Buffers in addition to strings
# v0.3.0
- `feature` allow to use custom parsers
- `feature` always include source, no `raw_value` option needed
- `bugfix` always provide `optional` tag property
- `refactor` clean up tests
# v0.2.3
- `bugfix` Accept `/** one line */` comments
- `refactor` Get rid of `lodash` to avoid unnecessary extra size when bundled
# v0.2.2
- `feature` allow spaces in default values `@my-tag {my.type} [name=John Doe]`
# v0.2.1
- `refactor` make line pasing mechanism more tolerable
# v0.2.0
- `feature` include source line numbers in parsed data
- `feature` optionally prevent dotten names expanding
# v0.1.2
- `bugfix` Allow to build nested tags from `name.subname` even if `name` wasn't d
- `bugfix` Preserve indentation when extracting comments
# v0.1.1
- `improvement` `parse(source)` returns array of all blocks found in source or an empty array
- `bugfix` fixed indented blocks parsing
# v0.1.0
Initial implementation
@@ -0,0 +1,56 @@
var $a333d78d58ab4731$exports = require("./isElementVisible.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "isFocusable", () => $506b33fd893eab7d$export$4c063cf1350e6fed);
$parcel$export(module.exports, "isTabbable", () => $506b33fd893eab7d$export$bebd5a1431fec25d);
/*
* Copyright 2025 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 $506b33fd893eab7d$var$focusableElements = [
'input:not([disabled]):not([type=hidden])',
'select:not([disabled])',
'textarea:not([disabled])',
'button:not([disabled])',
'a[href]',
'area[href]',
'summary',
'iframe',
'object',
'embed',
'audio[controls]',
'video[controls]',
'[contenteditable]:not([contenteditable^="false"])',
'permission'
];
const $506b33fd893eab7d$var$FOCUSABLE_ELEMENT_SELECTOR = $506b33fd893eab7d$var$focusableElements.join(':not([hidden]),') + ',[tabindex]:not([disabled]):not([hidden])';
$506b33fd893eab7d$var$focusableElements.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
const $506b33fd893eab7d$var$TABBABLE_ELEMENT_SELECTOR = $506b33fd893eab7d$var$focusableElements.join(':not([hidden]):not([tabindex="-1"]),');
function $506b33fd893eab7d$export$4c063cf1350e6fed(element) {
return element.matches($506b33fd893eab7d$var$FOCUSABLE_ELEMENT_SELECTOR) && (0, $a333d78d58ab4731$exports.isElementVisible)(element) && !$506b33fd893eab7d$var$isInert(element);
}
function $506b33fd893eab7d$export$bebd5a1431fec25d(element) {
return element.matches($506b33fd893eab7d$var$TABBABLE_ELEMENT_SELECTOR) && (0, $a333d78d58ab4731$exports.isElementVisible)(element) && !$506b33fd893eab7d$var$isInert(element);
}
function $506b33fd893eab7d$var$isInert(element) {
let node = element;
while(node != null){
if (node instanceof node.ownerDocument.defaultView.HTMLElement && node.inert) return true;
node = node.parentElement;
}
return false;
}
//# sourceMappingURL=isFocusable.main.js.map
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,kBAAkB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,kEAAY,CAAC;IACxE,qBAAqB,CAAC,yRAA+C,CAAC;IACtE,UAAU,CAAC,iDAAO,CAAC;IACnB,eAAe,CAAC,iIAAqB,CAAC;IACtC,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,qJAAuB,CAAC;YAAE,KAAK,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,6FAAe,CAAC;YAAE,OAAO,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,kHAAkB,CAAC;QAAA,GAAG,CAAC,CAAC;IAC1O,gBAAgB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,mDAAS,CAAC;AACnD","sources":["packages/@react-aria/grid/intl/ru-RU.json"],"sourcesContent":["{\n \"deselectedItem\": \"{item} не выбрано.\",\n \"longPressToSelect\": \"Нажмите и удерживайте для входа в режим выбора.\",\n \"select\": \"Выбрать\",\n \"selectedAll\": \"Выбраны все элементы.\",\n \"selectedCount\": \"{count, plural, =0 {Нет выбранных элементов} one {# элемент выбран} other {# элементов выбрано}}.\",\n \"selectedItem\": \"{item} выбрано.\"\n}\n"],"names":[],"version":3,"file":"ru-RU.module.js.map"}
@@ -0,0 +1,300 @@
/**
* @typedef {import('mdast').InlineCode} InlineCode
* @typedef {import('mdast').Table} Table
* @typedef {import('mdast').TableCell} TableCell
* @typedef {import('mdast').TableRow} TableRow
*
* @typedef {import('markdown-table').Options} MarkdownTableOptions
*
* @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext
* @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension
* @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle
*
* @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension
* @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle
* @typedef {import('mdast-util-to-markdown').State} State
* @typedef {import('mdast-util-to-markdown').Info} Info
*/
/**
* @typedef Options
* Configuration.
* @property {boolean | null | undefined} [tableCellPadding=true]
* Whether to add a space of padding between delimiters and cells (default:
* `true`).
* @property {boolean | null | undefined} [tablePipeAlign=true]
* Whether to align the delimiters (default: `true`).
* @property {MarkdownTableOptions['stringLength'] | null | undefined} [stringLength]
* Function to detect the length of table cell content, used when aligning
* the delimiters between cells (optional).
*/
import {ok as assert} from 'devlop'
import {markdownTable} from 'markdown-table'
import {defaultHandlers} from 'mdast-util-to-markdown'
/**
* Create an extension for `mdast-util-from-markdown` to enable GFM tables in
* markdown.
*
* @returns {FromMarkdownExtension}
* Extension for `mdast-util-from-markdown` to enable GFM tables.
*/
export function gfmTableFromMarkdown() {
return {
enter: {
table: enterTable,
tableData: enterCell,
tableHeader: enterCell,
tableRow: enterRow
},
exit: {
codeText: exitCodeText,
table: exitTable,
tableData: exit,
tableHeader: exit,
tableRow: exit
}
}
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterTable(token) {
const align = token._align
assert(align, 'expected `_align` on table')
this.enter(
{
type: 'table',
align: align.map(function (d) {
return d === 'none' ? null : d
}),
children: []
},
token
)
this.data.inTable = true
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitTable(token) {
this.exit(token)
this.data.inTable = undefined
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterRow(token) {
this.enter({type: 'tableRow', children: []}, token)
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exit(token) {
this.exit(token)
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterCell(token) {
this.enter({type: 'tableCell', children: []}, token)
}
// Overwrite the default code text data handler to unescape escaped pipes when
// they are in tables.
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitCodeText(token) {
let value = this.resume()
if (this.data.inTable) {
value = value.replace(/\\([\\|])/g, replace)
}
const node = this.stack[this.stack.length - 1]
assert(node.type === 'inlineCode')
node.value = value
this.exit(token)
}
/**
* @param {string} $0
* @param {string} $1
* @returns {string}
*/
function replace($0, $1) {
// Pipes work, backslashes don’t (but can’t escape pipes).
return $1 === '|' ? $1 : $0
}
/**
* Create an extension for `mdast-util-to-markdown` to enable GFM tables in
* markdown.
*
* @param {Options | null | undefined} [options]
* Configuration.
* @returns {ToMarkdownExtension}
* Extension for `mdast-util-to-markdown` to enable GFM tables.
*/
export function gfmTableToMarkdown(options) {
const settings = options || {}
const padding = settings.tableCellPadding
const alignDelimiters = settings.tablePipeAlign
const stringLength = settings.stringLength
const around = padding ? ' ' : '|'
return {
unsafe: [
{character: '\r', inConstruct: 'tableCell'},
{character: '\n', inConstruct: 'tableCell'},
// A pipe, when followed by a tab or space (padding), or a dash or colon
// (unpadded delimiter row), could result in a table.
{atBreak: true, character: '|', after: '[\t :-]'},
// A pipe in a cell must be encoded.
{character: '|', inConstruct: 'tableCell'},
// A colon must be followed by a dash, in which case it could start a
// delimiter row.
{atBreak: true, character: ':', after: '-'},
// A delimiter row can also start with a dash, when followed by more
// dashes, a colon, or a pipe.
// This is a stricter version than the built in check for lists, thematic
// breaks, and setex heading underlines though:
// <https://github.com/syntax-tree/mdast-util-to-markdown/blob/51a2038/lib/unsafe.js#L57>
{atBreak: true, character: '-', after: '[:|-]'}
],
handlers: {
inlineCode: inlineCodeWithTable,
table: handleTable,
tableCell: handleTableCell,
tableRow: handleTableRow
}
}
/**
* @type {ToMarkdownHandle}
* @param {Table} node
*/
function handleTable(node, _, state, info) {
return serializeData(handleTableAsData(node, state, info), node.align)
}
/**
* This function isn’t really used normally, because we handle rows at the
* table level.
* But, if someone passes in a table row, this ensures we make somewhat sense.
*
* @type {ToMarkdownHandle}
* @param {TableRow} node
*/
function handleTableRow(node, _, state, info) {
const row = handleTableRowAsData(node, state, info)
const value = serializeData([row])
// `markdown-table` will always add an align row
return value.slice(0, value.indexOf('\n'))
}
/**
* @type {ToMarkdownHandle}
* @param {TableCell} node
*/
function handleTableCell(node, _, state, info) {
const exit = state.enter('tableCell')
const subexit = state.enter('phrasing')
const value = state.containerPhrasing(node, {
...info,
before: around,
after: around
})
subexit()
exit()
return value
}
/**
* @param {Array<Array<string>>} matrix
* @param {Array<string | null | undefined> | null | undefined} [align]
*/
function serializeData(matrix, align) {
return markdownTable(matrix, {
align,
// @ts-expect-error: `markdown-table` types should support `null`.
alignDelimiters,
// @ts-expect-error: `markdown-table` types should support `null`.
padding,
// @ts-expect-error: `markdown-table` types should support `null`.
stringLength
})
}
/**
* @param {Table} node
* @param {State} state
* @param {Info} info
*/
function handleTableAsData(node, state, info) {
const children = node.children
let index = -1
/** @type {Array<Array<string>>} */
const result = []
const subexit = state.enter('table')
while (++index < children.length) {
result[index] = handleTableRowAsData(children[index], state, info)
}
subexit()
return result
}
/**
* @param {TableRow} node
* @param {State} state
* @param {Info} info
*/
function handleTableRowAsData(node, state, info) {
const children = node.children
let index = -1
/** @type {Array<string>} */
const result = []
const subexit = state.enter('tableRow')
while (++index < children.length) {
// Note: the positional info as used here is incorrect.
// Making it correct would be impossible due to aligning cells?
// And it would need copy/pasting `markdown-table` into this project.
result[index] = handleTableCell(children[index], node, state, info)
}
subexit()
return result
}
/**
* @type {ToMarkdownHandle}
* @param {InlineCode} node
*/
function inlineCodeWithTable(node, parent, state) {
let value = defaultHandlers.inlineCode(node, parent, state)
if (state.stack.includes('tableCell')) {
value = value.replace(/\|/g, '\\$&')
}
return value
}
}
@@ -0,0 +1,27 @@
export enum LogLevel {
DEBUG = "debug",
INFO = "info",
WARN = "warn",
ERROR = "error",
FATAL = "fatal"
}
export interface ILogWrapper {
fileLogEnabled: boolean;
consoleLogEnabled: boolean;
cleanOldLogs(logDir: string): void;
setFileAndConsoleLogLevel(fileLogLevel: LogLevel, consoleLogLevel: LogLevel): void;
setLogSelfInfo(selfInfo: {
nick: string;
uid: string;
}): void;
setFileLogEnabled(isEnabled: boolean): void;
setConsoleLogEnabled(isEnabled: boolean): void;
formatMsg(msg: any[]): string;
_log(level: LogLevel, ...args: any[]): void;
log(...args: any[]): void;
logDebug(...args: any[]): void;
logError(...args: any[]): void;
logWarn(...args: any[]): void;
logFatal(...args: any[]): void;
logMessage(msg: unknown, selfInfo: unknown): void;
}
@@ -0,0 +1,180 @@
2.0.0 / 2021-12-17
==================
* Drop support for Node.js 0.6
* Remove `I'mateapot` export; use `ImATeapot` instead
* Remove support for status being non-first argument
* Rename `UnorderedCollection` constructor to `TooEarly`
* deps: depd@2.0.0
- Replace internal `eval` usage with `Function` constructor
- Use instance methods on `process` to check for listeners
* deps: statuses@2.0.1
- Fix messaging casing of `418 I'm a Teapot`
- Remove code 306
- Rename `425 Unordered Collection` to standard `425 Too Early`
2021-11-14 / 1.8.1
==================
* deps: toidentifier@1.0.1
2020-06-29 / 1.8.0
==================
* Add `isHttpError` export to determine if value is an HTTP error
* deps: setprototypeof@1.2.0
2019-06-24 / 1.7.3
==================
* deps: inherits@2.0.4
2019-02-18 / 1.7.2
==================
* deps: setprototypeof@1.1.1
2018-09-08 / 1.7.1
==================
* Fix error creating objects in some environments
2018-07-30 / 1.7.0
==================
* Set constructor name when possible
* Use `toidentifier` module to make class names
* deps: statuses@'>= 1.5.0 < 2'
2018-03-29 / 1.6.3
==================
* deps: depd@~1.1.2
- perf: remove argument reassignment
* deps: setprototypeof@1.1.0
* deps: statuses@'>= 1.4.0 < 2'
2017-08-04 / 1.6.2
==================
* deps: depd@1.1.1
- Remove unnecessary `Buffer` loading
2017-02-20 / 1.6.1
==================
* deps: setprototypeof@1.0.3
- Fix shim for old browsers
2017-02-14 / 1.6.0
==================
* Accept custom 4xx and 5xx status codes in factory
* Add deprecation message to `"I'mateapot"` export
* Deprecate passing status code as anything except first argument in factory
* Deprecate using non-error status codes
* Make `message` property enumerable for `HttpError`s
2016-11-16 / 1.5.1
==================
* deps: inherits@2.0.3
- Fix issue loading in browser
* deps: setprototypeof@1.0.2
* deps: statuses@'>= 1.3.1 < 2'
2016-05-18 / 1.5.0
==================
* Support new code `421 Misdirected Request`
* Use `setprototypeof` module to replace `__proto__` setting
* deps: statuses@'>= 1.3.0 < 2'
- Add `421 Misdirected Request`
- perf: enable strict mode
* perf: enable strict mode
2016-01-28 / 1.4.0
==================
* Add `HttpError` export, for `err instanceof createError.HttpError`
* deps: inherits@2.0.1
* deps: statuses@'>= 1.2.1 < 2'
- Fix message for status 451
- Remove incorrect nginx status code
2015-02-02 / 1.3.1
==================
* Fix regression where status can be overwritten in `createError` `props`
2015-02-01 / 1.3.0
==================
* Construct errors using defined constructors from `createError`
* Fix error names that are not identifiers
- `createError["I'mateapot"]` is now `createError.ImATeapot`
* Set a meaningful `name` property on constructed errors
2014-12-09 / 1.2.8
==================
* Fix stack trace from exported function
* Remove `arguments.callee` usage
2014-10-14 / 1.2.7
==================
* Remove duplicate line
2014-10-02 / 1.2.6
==================
* Fix `expose` to be `true` for `ClientError` constructor
2014-09-28 / 1.2.5
==================
* deps: statuses@1
2014-09-21 / 1.2.4
==================
* Fix dependency version to work with old `npm`s
2014-09-21 / 1.2.3
==================
* deps: statuses@~1.1.0
2014-09-21 / 1.2.2
==================
* Fix publish error
2014-09-21 / 1.2.1
==================
* Support Node.js 0.6
* Use `inherits` instead of `util`
2014-09-09 / 1.2.0
==================
* Fix the way inheriting functions
* Support `expose` being provided in properties argument
2014-09-08 / 1.1.0
==================
* Default status to 500
* Support provided `error` to extend
2014-09-08 / 1.0.1
==================
* Fix accepting string message
2014-09-08 / 1.0.0
==================
* Initial release
@@ -0,0 +1 @@
export declare function hasViewportRelativeCoordinates(event: Event): event is Event & Pick<PointerEvent, 'clientX' | 'clientY'>;
@@ -0,0 +1,24 @@
/**
* Check if the value is a valid date
*
* 校验是否是一个有效的日期
*
* @example
* ```js
* import { isValidDate } from 'is-what-type';
*
* isValidDate(new Date()); // true
* isValidDate(new Date('2023-10-01')); // true
* isValidDate(new Date(NaN)); // false
* isValidDate('2023-10-01'); // false
* isValidDate(123456789); // false
* isValidDate(null); // false
* isValidDate(undefined); // false
* isValidDate({}); // false
* isValidDate(new Date('invalid-date')); // false
* ```
*
* @param value - The value to check
* @returns `true` if the value is a valid date, else `false`
*/
export declare function isValidDate(value: unknown): value is Date;
@@ -0,0 +1,75 @@
var $20aJV$reactariautils = require("@react-aria/utils");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "disableTextSelection", () => $f7e14e656343df57$export$16a4697467175487);
$parcel$export(module.exports, "restoreTextSelection", () => $f7e14e656343df57$export$b0d6fa1ab32e3295);
/*
* 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.
*/
// Note that state only matters here for iOS. Non-iOS gets user-select: none applied to the target element
// rather than at the document level so we just need to apply/remove user-select: none for each pressed element individually
let $f7e14e656343df57$var$state = 'default';
let $f7e14e656343df57$var$savedUserSelect = '';
let $f7e14e656343df57$var$modifiedElementMap = new WeakMap();
function $f7e14e656343df57$export$16a4697467175487(target) {
if ((0, $20aJV$reactariautils.isIOS)()) {
if ($f7e14e656343df57$var$state === 'default') {
const documentObject = (0, $20aJV$reactariautils.getOwnerDocument)(target);
$f7e14e656343df57$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;
documentObject.documentElement.style.webkitUserSelect = 'none';
}
$f7e14e656343df57$var$state = 'disabled';
} else if (target instanceof HTMLElement || target instanceof SVGElement) {
// If not iOS, store the target's original user-select and change to user-select: none
// Ignore state since it doesn't apply for non iOS
$f7e14e656343df57$var$modifiedElementMap.set(target, target.style.userSelect);
target.style.userSelect = 'none';
}
}
function $f7e14e656343df57$export$b0d6fa1ab32e3295(target) {
if ((0, $20aJV$reactariautils.isIOS)()) {
// If the state is already default, there's nothing to do.
// If it is restoring, then there's no need to queue a second restore.
if ($f7e14e656343df57$var$state !== 'disabled') return;
$f7e14e656343df57$var$state = 'restoring';
// There appears to be a delay on iOS where selection still might occur
// after pointer up, so wait a bit before removing user-select.
setTimeout(()=>{
// Wait for any CSS transitions to complete so we don't recompute style
// for the whole page in the middle of the animation and cause jank.
(0, $20aJV$reactariautils.runAfterTransition)(()=>{
// Avoid race conditions
if ($f7e14e656343df57$var$state === 'restoring') {
const documentObject = (0, $20aJV$reactariautils.getOwnerDocument)(target);
if (documentObject.documentElement.style.webkitUserSelect === 'none') documentObject.documentElement.style.webkitUserSelect = $f7e14e656343df57$var$savedUserSelect || '';
$f7e14e656343df57$var$savedUserSelect = '';
$f7e14e656343df57$var$state = 'default';
}
});
}, 300);
} else if (target instanceof HTMLElement || target instanceof SVGElement) // If not iOS, restore the target's original user-select if any
// Ignore state since it doesn't apply for non iOS
{
if (target && $f7e14e656343df57$var$modifiedElementMap.has(target)) {
let targetOldUserSelect = $f7e14e656343df57$var$modifiedElementMap.get(target);
if (target.style.userSelect === 'none') target.style.userSelect = targetOldUserSelect;
if (target.getAttribute('style') === '') target.removeAttribute('style');
$f7e14e656343df57$var$modifiedElementMap.delete(target);
}
}
}
//# sourceMappingURL=textSelection.main.js.map
@@ -0,0 +1,825 @@
export default `flf2a$ 8 7 20 -1 7
DIAMOND by Ron Fritz 8/94
Figlet Release 2.0
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
/\\\\@
/\\\\@
/\\\\@
/\\ @
/\\ @
@
/\\\\@
@@
/\\ /\\@
/\\ /\\@
@
@
@
@
@
@@
@
/\\\\ /\\\\ @
/\\\\\\\\\\\\ /\\\\\\\\@
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\\\\\\\\\ /\\\\\\\\@
/\\\\ /\\\\ @
@@
/\\\\ @
/\\ /\\\\ @
/\\\\ @
/\\\\ @
/\\\\@
/\\\\ /\\\\ @
/\\\\ @
@@
@
/\\\\ /\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ /\\\\ @
@@
/\\ @
/\\\\ /\\\\@
/\\\\ @
/\\\\\\ @
/\\\\ @
/\\\\ /\\\\@
/\\ @
@@
/\\\\@
/\\@
@
@
@
@
@
@@
/\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\@
@@
/\\\\ @
/\\\\ @
/\\\\@
/\\\\@
/\\\\@
/\\\\ @
/\\\\ @
@@
/\\\\ @
/\\\\ /\\\\ /\\\\@
/\\ /\\ /\\\\ @
/\\\\\\\\ /\\\\\\\\\\\\\\@
/\\ /\\ /\\\\ @
/\\\\ /\\\\ /\\\\@
/\\\\ @
@@
@
/\\\\ @
/\\\\ @
/\\\\\\ /\\\\\\\\\\@
/\\\\ @
/\\\\ @
@
@@
@
@
@
@
@
@
/\\\\@
/\\@@
@
@
@
/\\\\\\\\\\@
@
@
@
@@
@
@
@
@
@
@
/\\\\@
@@
/\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
@@
@
/\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\@
/\\\\ /\\\\ @
/\\\\\\ @
@@
@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\\\\\@
@@
@
/\\ /\\\\ @
/\\ /\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\\\\\\\\\\\\\@
@@
@
/\\\\ /\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\@
/\\\\\\\\\\ @
@@
@
/\\\\ @
/ /\\\\ @
/\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\\\\\ /\\ /\\\\@
/\\\\ @
@@
@
/\\\\ /\\\\\\ @
/\\\\ @
/\\\\\\ @
/\\\\ @
/\\\\@
/\\\\\\ /\\\\ @
@@
@
/\\\\ @
/\\\\ @
/\\\\ @
/\\ /\\\\ @
/\\\\ /\\\\@
/\\\\ /\\\\ @
@@
@
/\\\\\\\\\\ /\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
@@
@
/\\ @
/\\\\ /\\\\ @
/\\\\ /\\ @
/\\\\ /\\ @
/\\\\ /\\\\@
/\\\\\\\\ @
@@
@
/\\ /\\\\ @
/\\\\ /\\\\@
/\\ /\\\\ @
/\\ /\\\\ @
/\\\\ @
/\\\\ @
@@
@
@
@
@
/\\\\@
@
/\\\\@
@@
@
@
@
@
/\\\\@
@
/\\\\@
/\\@@
/\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\@
@@
@
@
/\\\\\\\\\\\\@
@
/\\\\\\\\\\\\@
@
@
@@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
@@
/\\\\\\ @
/\\\\ @
/\\\\@
/\\\\ @
/\\\\ @
@
/\\\\ @
@@
@
/\\\\\\ @
/\\ /\\\\ @
/\\ /\\\\ /\\\\@
/\\\\ /\\\\/ /\\\\@
/\\\\ \`\`\` @
/\\\\ @
@@
/\\ @
/\\ \\\\ @
/\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\\\\\\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\@
@@
/\\\\ /\\\\ @
/\\ /\\\\ @
/\\ /\\\\@
/\\\\\\ /\\ @
/\\ /\\\\@
/\\ /\\@
/\\\\\\\\ /\\\\ @
@@
/\\\\ @
/\\\\ /\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ /\\\\@
/\\\\\\\\ @
@@
/\\\\\\\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\ @
/\\\\\\\\\\ @
@@
/\\\\\\\\\\\\\\\\@
/\\\\ @
/\\\\ @
/\\\\\\\\\\\\ @
/\\\\ @
/\\\\ @
/\\\\\\\\\\\\\\\\@
@@
/\\\\\\\\\\\\\\\\@
/\\\\ @
/\\\\ @
/\\\\\\\\\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
@@
/\\\\\\\\ @
/\\ /\\\\ @
/\\\\ @
/\\\\ @
/\\\\ /\\\\\\\\@
/\\\\ /\\ @
/\\\\\\\\\\ @
@@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\\\\\\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\@
@@
/\\\\@
/\\\\@
/\\\\@
/\\\\@
/\\\\@
/\\\\@
/\\\\@
@@
/\\\\@
/\\\\@
/\\\\@
/\\\\@
/\\\\@
/\\ /\\\\@
/\\\\\\\\ @
@@
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\ /\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\@
@@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\\\\\\\\\\\\\@
@@
/\\\\ /\\\\@
/\\ /\\\\ /\\\\\\@
/\\\\ /\\\\ / /\\\\@
/\\\\ /\\\\ /\\\\@
/\\\\ /\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\@
@@
/\\\\\\ /\\\\@
/\\ /\\\\ /\\\\@
/\\\\ /\\\\ /\\\\@
/\\\\ /\\\\ /\\\\@
/\\\\ /\\ /\\\\@
/\\\\ /\\ \\\\@
/\\\\ /\\\\@
@@
/\\\\\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\ @
/\\\\\\\\ @
@@
/\\\\\\\\\\\\\\ @
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\\\\\\\\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
@@
/\\\\\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\ /\\\\ @
/\\\\ \\\\ @
/\\ @@
/\\\\\\\\\\\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\@
@@
/\\\\ \\\\ @
/\\\\ /\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ /\\\\@
/\\\\ \\\\ @
@@
/\\\\\\ /\\\\\\\\\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
@@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\\\\\\\ @
@@
/\\\\ /\\\\@
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\\\\\ @
/\\\\ @
@@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\ /\\\\@
/\\\\ /\\\\ /\\\\@
/\\\\ /\\ /\\\\ /\\\\@
/\\ /\\ /\\\\\\\\@
/\\\\ /\\\\@
@@
/\\\\ /\\\\@
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\@
@@
/\\\\ /\\\\@
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
@@
/\\\\\\\\\\\\\\ /\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\\\\\\\\\\\\\\\\\\\@
@@
/\\\\\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\\\\\@
@@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\@
@@
/\\\\\\\\@
/\\\\@
/\\\\@
/\\\\@
/\\\\@
/\\\\@
/\\\\\\\\@
@@
/\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\@
@
@
@
@
@@
@
@
@
@
@
@
@
/\\\\\\\\\\@@
/\\\\@
/\\ @
@
@
@
@
@
@@
@
@
/\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\\\@
@@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\ @
@@
@
@
/\\\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\\\@
@@
/\\\\@
/\\\\@
/\\\\@
/\\\\ /\\\\@
/\\ /\\\\@
/\\ /\\\\@
/\\\\ /\\\\@
@@
@
@
/\\\\ @
/\\ /\\\\ @
/\\\\\\\\\\ /\\\\@
/\\ @
/\\\\\\\\ @
@@
/\\\\@
/\\ @
/\\/\\ /\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
@@
@
@
/\\\\ @
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ @
/\\\\ @@
@
/\\\\ @
/\\\\ @
/\\ /\\ @
/\\\\ /\\\\@
/\\ /\\\\@
/\\\\ /\\\\@
@@
@
/\\@
@
/\\\\@
/\\\\@
/\\\\@
/\\\\@
@@
@
/\\\\@
@
/\\\\@
/\\\\@
/\\\\@
/\\\\@
/\\\\\\ @@
/\\\\ @
/\\\\ @
/\\\\ /\\\\@
/\\\\ /\\\\ @
/\\/\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\@
@@
/\\\\@
/\\\\@
/\\\\@
/\\\\@
/\\\\@
/\\\\@
/\\\\\\@
@@
@
@
/\\\\\\ /\\\\ /\\\\ @
/\\\\ /\\ /\\\\@
/\\\\ /\\ /\\\\@
/\\\\ /\\ /\\\\@
/\\\\\\ /\\ /\\\\@
@@
@
@
/\\\\ /\\\\ @
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\\\ /\\\\@
@@
@
@
/\\\\ @
/\\\\ /\\\\ @
/\\\\ /\\\\@
/\\\\ /\\\\ @
/\\\\ @
@@
@
@
/\\ /\\\\ @
/\\ /\\\\ @
/\\ /\\\\@
/\\\\ /\\\\ @
/\\\\ @
/\\\\ @@
@
@
/\\\\ @
/\\ /\\\\ @
/\\ /\\\\ @
/\\\\/\\\\ @
/\\\\ @
/\\\\\\@@
@
@
/\\ /\\\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\\\ @
@@
@
@
/\\\\\\\\ @
/\\\\ @
/\\\\\\ @
/\\\\@
/\\\\ /\\\\@
@@
/\\\\ @
/\\\\ @
/\\/\\ /\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @
@@
@
@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\ /\\\\@
/\\\\/\\\\@
@@
@
@
/\\\\ /\\\\@
/\\\\ /\\\\ @
/\\\\ /\\\\ @
/\\/\\\\ @
/\\\\ @
@@
@
@
/\\\\ /\\\\\\@
/\\\\ \\ /\\\\@
/\\\\ /\\ /\\\\@
/\\ /\\ /\\/\\\\@
/\\\\\\ /\\\\\\@
@@
@
@
/\\\\ /\\\\@
/\\ /\\\\ @
/\\ @
/\\ /\\\\ @
/\\\\ /\\\\@
@@
@
@
/\\\\ /\\\\@
/\\\\ /\\\\ @
/\\\\\\ @
/\\\\ @
/\\\\ @
/\\\\ @@
@
@
/\\\\\\\\ /\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\\\\\\\\\\\\\@
@@
/\\\\@
/\\\\ @
/\\\\ @
/\\\\\\ @
/\\\\ @
/\\\\ @
/\\\\@
@@
/\\@
/\\@
/\\@
@
/\\@
/\\@
/\\@
@@
/\\\\ @
/\\\\ @
/\\\\ @
/\\\\@
/\\\\ @
/\\\\ @
/\\\\ @
@@
/\\\\ /\\ @
/\\ /\\\\@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,10 @@
import { PluginFunc } from 'dayjs'
declare const plugin: PluginFunc
export = plugin
declare module 'dayjs' {
export function isMoment(input: any): boolean
}
@@ -0,0 +1,20 @@
/**
* @import {Info, State} from 'mdast-util-to-markdown'
* @import {Paragraph, Parents} from 'mdast'
*/
/**
* @param {Paragraph} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
export function paragraph(node, _, state, info) {
const exit = state.enter('paragraph')
const subexit = state.enter('phrasing')
const value = state.containerPhrasing(node, info)
subexit()
exit()
return value
}
@@ -0,0 +1 @@
{"version":3,"file":"isoBase64URL.d.ts","sourceRoot":"","sources":["../../../src/helpers/iso/isoBase64URL.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEzE;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,eAAe,EAAE,MAAM,EACvB,IAAI,GAAE,QAAQ,GAAG,WAAyB,GACzC,WAAW,CAGb;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,WAAW,EACnB,EAAE,GAAE,QAAQ,GAAG,WAAyB,GACvC,MAAM,CAOR;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAIxD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIlD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,CAEnE"}
@@ -0,0 +1,46 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
const { getSourceCode } = require("eslint-compat-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `String.fromCodePoint` method.",
category: "ES2015",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-string-fromcodepoint.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"(program) {
const sourceCode = getSourceCode(context)
const tracker = new ReferenceTracker(
sourceCode.getScope(program),
)
for (const { node, path } of tracker.iterateGlobalReferences({
String: {
fromCodePoint: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,52 @@
{
"name": "@heroui/react-utils",
"version": "2.1.4",
"description": "A set of utilities for react on client side",
"keywords": [
"react-utils"
],
"author": "Junior Garcia <jrgarciadev@gmail.com>",
"homepage": "https://heroui.com",
"license": "MIT",
"main": "dist/index.js",
"sideEffects": false,
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/heroui-inc/heroui.git",
"directory": "packages/utilities/react-utils"
},
"bugs": {
"url": "https://github.com/heroui-inc/heroui/issues"
},
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0"
},
"dependencies": {
"@heroui/shared-utils": "2.1.3",
"@heroui/react-rsc-utils": "2.1.2"
},
"clean-package": "../../../clean-package.config.json",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "tsup src --dts",
"build:fast": "tsup src",
"dev": "pnpm build:fast --watch",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit"
}
}
@@ -0,0 +1,128 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _AXObjectsMap = _interopRequireDefault(require("./AXObjectsMap"));
var _iterationDecorator = _interopRequireDefault(require("./util/iterationDecorator"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var elementAXObjects = [];
var _iterator = _createForOfIteratorHelper(_AXObjectsMap.default.entries()),
_step;
try {
var _loop = function _loop() {
var _step$value = _slicedToArray(_step.value, 2),
name = _step$value[0],
def = _step$value[1];
var relatedConcepts = def.relatedConcepts;
if (Array.isArray(relatedConcepts)) {
relatedConcepts.forEach(function (relation) {
if (relation.module === 'HTML') {
var concept = relation.concept;
if (concept != null) {
var conceptStr = JSON.stringify(concept);
var axObjects;
var index = 0;
for (; index < elementAXObjects.length; index++) {
var key = elementAXObjects[index][0];
if (JSON.stringify(key) === conceptStr) {
axObjects = elementAXObjects[index][1];
break;
}
}
if (!Array.isArray(axObjects)) {
axObjects = [];
}
var loc = axObjects.findIndex(function (item) {
return item === name;
});
if (loc === -1) {
axObjects.push(name);
}
if (index < elementAXObjects.length) {
elementAXObjects.splice(index, 1, [concept, axObjects]);
} else {
elementAXObjects.push([concept, axObjects]);
}
}
}
});
}
};
for (_iterator.s(); !(_step = _iterator.n()).done;) {
_loop();
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
function deepAxObjectModelRelationshipConceptAttributeCheck(a, b) {
if (a === undefined && b !== undefined) {
return false;
}
if (a !== undefined && b === undefined) {
return false;
}
if (a !== undefined && b !== undefined) {
if (a.length != b.length) {
return false;
}
// dequal checks position equality
// https://github.com/lukeed/dequal/blob/5ecd990c4c055c4658c64b4bdfc170f219604eea/src/index.js#L17-L22
for (var i = 0; i < a.length; i++) {
if (b[i].name !== a[i].name || b[i].value !== a[i].value) {
return false;
}
}
}
return true;
}
var elementAXObjectMap = {
entries: function entries() {
return elementAXObjects;
},
forEach: function forEach(fn) {
var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
for (var _i = 0, _elementAXObjects = elementAXObjects; _i < _elementAXObjects.length; _i++) {
var _elementAXObjects$_i = _slicedToArray(_elementAXObjects[_i], 2),
key = _elementAXObjects$_i[0],
values = _elementAXObjects$_i[1];
fn.call(thisArg, values, key, elementAXObjects);
}
},
get: function get(key) {
var item = elementAXObjects.find(function (tuple) {
return key.name === tuple[0].name && deepAxObjectModelRelationshipConceptAttributeCheck(key.attributes, tuple[0].attributes);
});
return item && item[1];
},
has: function has(key) {
return !!elementAXObjectMap.get(key);
},
keys: function keys() {
return elementAXObjects.map(function (_ref) {
var _ref2 = _slicedToArray(_ref, 1),
key = _ref2[0];
return key;
});
},
values: function values() {
return elementAXObjects.map(function (_ref3) {
var _ref4 = _slicedToArray(_ref3, 2),
values = _ref4[1];
return values;
});
}
};
var _default = (0, _iterationDecorator.default)(elementAXObjectMap, elementAXObjectMap.entries());
exports.default = _default;
@@ -0,0 +1 @@
{"version":3,"names":["_is","require","_deprecationWarning","assert","type","node","opts","is","Error","JSON","stringify","assertArrayExpression","assertAssignmentExpression","assertBinaryExpression","assertInterpreterDirective","assertDirective","assertDirectiveLiteral","assertBlockStatement","assertBreakStatement","assertCallExpression","assertCatchClause","assertConditionalExpression","assertContinueStatement","assertDebuggerStatement","assertDoWhileStatement","assertEmptyStatement","assertExpressionStatement","assertFile","assertForInStatement","assertForStatement","assertFunctionDeclaration","assertFunctionExpression","assertIdentifier","assertIfStatement","assertLabeledStatement","assertStringLiteral","assertNumericLiteral","assertNullLiteral","assertBooleanLiteral","assertRegExpLiteral","assertLogicalExpression","assertMemberExpression","assertNewExpression","assertProgram","assertObjectExpression","assertObjectMethod","assertObjectProperty","assertRestElement","assertReturnStatement","assertSequenceExpression","assertParenthesizedExpression","assertSwitchCase","assertSwitchStatement","assertThisExpression","assertThrowStatement","assertTryStatement","assertUnaryExpression","assertUpdateExpression","assertVariableDeclaration","assertVariableDeclarator","assertWhileStatement","assertWithStatement","assertAssignmentPattern","assertArrayPattern","assertArrowFunctionExpression","assertClassBody","assertClassExpression","assertClassDeclaration","assertExportAllDeclaration","assertExportDefaultDeclaration","assertExportNamedDeclaration","assertExportSpecifier","assertForOfStatement","assertImportDeclaration","assertImportDefaultSpecifier","assertImportNamespaceSpecifier","assertImportSpecifier","assertImportExpression","assertMetaProperty","assertClassMethod","assertObjectPattern","assertSpreadElement","assertSuper","assertTaggedTemplateExpression","assertTemplateElement","assertTemplateLiteral","assertYieldExpression","assertAwaitExpression","assertImport","assertBigIntLiteral","assertExportNamespaceSpecifier","assertOptionalMemberExpression","assertOptionalCallExpression","assertClassProperty","assertClassAccessorProperty","assertClassPrivateProperty","assertClassPrivateMethod","assertPrivateName","assertStaticBlock","assertImportAttribute","assertAnyTypeAnnotation","assertArrayTypeAnnotation","assertBooleanTypeAnnotation","assertBooleanLiteralTypeAnnotation","assertNullLiteralTypeAnnotation","assertClassImplements","assertDeclareClass","assertDeclareFunction","assertDeclareInterface","assertDeclareModule","assertDeclareModuleExports","assertDeclareTypeAlias","assertDeclareOpaqueType","assertDeclareVariable","assertDeclareExportDeclaration","assertDeclareExportAllDeclaration","assertDeclaredPredicate","assertExistsTypeAnnotation","assertFunctionTypeAnnotation","assertFunctionTypeParam","assertGenericTypeAnnotation","assertInferredPredicate","assertInterfaceExtends","assertInterfaceDeclaration","assertInterfaceTypeAnnotation","assertIntersectionTypeAnnotation","assertMixedTypeAnnotation","assertEmptyTypeAnnotation","assertNullableTypeAnnotation","assertNumberLiteralTypeAnnotation","assertNumberTypeAnnotation","assertObjectTypeAnnotation","assertObjectTypeInternalSlot","assertObjectTypeCallProperty","assertObjectTypeIndexer","assertObjectTypeProperty","assertObjectTypeSpreadProperty","assertOpaqueType","assertQualifiedTypeIdentifier","assertStringLiteralTypeAnnotation","assertStringTypeAnnotation","assertSymbolTypeAnnotation","assertThisTypeAnnotation","assertTupleTypeAnnotation","assertTypeofTypeAnnotation","assertTypeAlias","assertTypeAnnotation","assertTypeCastExpression","assertTypeParameter","assertTypeParameterDeclaration","assertTypeParameterInstantiation","assertUnionTypeAnnotation","assertVariance","assertVoidTypeAnnotation","assertEnumDeclaration","assertEnumBooleanBody","assertEnumNumberBody","assertEnumStringBody","assertEnumSymbolBody","assertEnumBooleanMember","assertEnumNumberMember","assertEnumStringMember","assertEnumDefaultedMember","assertIndexedAccessType","assertOptionalIndexedAccessType","assertJSXAttribute","assertJSXClosingElement","assertJSXElement","assertJSXEmptyExpression","assertJSXExpressionContainer","assertJSXSpreadChild","assertJSXIdentifier","assertJSXMemberExpression","assertJSXNamespacedName","assertJSXOpeningElement","assertJSXSpreadAttribute","assertJSXText","assertJSXFragment","assertJSXOpeningFragment","assertJSXClosingFragment","assertNoop","assertPlaceholder","assertV8IntrinsicIdentifier","assertArgumentPlaceholder","assertBindExpression","assertDecorator","assertDoExpression","assertExportDefaultSpecifier","assertRecordExpression","assertTupleExpression","assertDecimalLiteral","assertModuleExpression","assertTopicReference","assertPipelineTopicExpression","assertPipelineBareFunction","assertPipelinePrimaryTopicReference","assertVoidPattern","assertTSParameterProperty","assertTSDeclareFunction","assertTSDeclareMethod","assertTSQualifiedName","assertTSCallSignatureLine truncated
@@ -0,0 +1,402 @@
{
"1.0.1": {
"axe.js": "sha256-F14wfpbaL6+ZafS2ufmz74/R6CD1L777gCOJVuLn5Ao=",
"axe.min.js": "sha256-GfbQgd6aKJKQT21HaQfVUuGEbMUfSKhi7RsWrrih7SM="
},
"1.1.0": {
"axe.js": "sha256-nG9+LLksY/HS6yG4x0iS08U7RAmTucy50uXQS5ndQnM=",
"axe.min.js": "sha256-5Lfk3/s+ieHttrDTOCVuepGjDgH2D1neTDDtXnJdIT0="
},
"1.1.1": {
"axe.js": "sha256-K0MLUClls79s14CT01F82LPc+ZubTBwt6fZDdN5iyFw=",
"axe.min.js": "sha256-UWXq259l36QypXwd2e4K2V1Lli2qHeSPmKfDXy+7uIM="
},
"2.0.5": {
"axe.js": "sha256-KVA5sj4tNmFLneuHPPbg4iEp3MBzsHvn3+s9CxfMrmc=",
"axe.min.js": "sha256-lt5eNq/L7IBUaoSUSAbQ7MEO02DThMGdVm/oxeA88gk="
},
"2.0.6": {
"axe.js": "sha256-cLV1ABoE5NjfwLaRAJYIstAJCmciDXZ55/TrQS5rR/M=",
"axe.min.js": "sha256-fnbwW70tA7/ya+5q5Oimc8wCRsdiv3WrU0MElp/euvY="
},
"2.0.7": {
"axe.js": "sha256-HjHe1xKQqP6i3eGpDlARb5HkFsZxvAslvr1JJhUlp60=",
"axe.min.js": "sha256-vo7Qs4YxFxzFEW5DG9u05JdAUCsFxx7dBIoBP5rzmKA="
},
"2.1.7": {
"axe.js": "sha256-kXUowSb3HQy6AChF4LYR4cvNxKEHCWqCcuiSxvY6E1s=",
"axe.min.js": "sha256-xJPQwkKDFmgwYDLqrt/esIHlc2HLUB2ogf9c1uS1BXA="
},
"2.2.0": {
"axe.js": "sha256-0iX4Q9QT3uHAo+oxS5NWsrU4DNZKB30JRf7m+jjZcX0=",
"axe.min.js": "sha256-3UsQJdfWbhtVd0QzcYi2VAJEfs8DMzxrRvr3h9WbMiE="
},
"2.2.1": {
"axe.js": "sha256-1kuZOWtoYszbvrtG7TYfl/FuO48uwZeFpN4aNnebABk=",
"axe.min.js": "sha256-WSHVQ1/IJaG9ZOydoFg+QXHLjOq8x/mhYkRAyN1yAdI="
},
"2.2.2": {
"axe.js": "sha256-jTirRblNTKinTlmCK3FqDG6POtZVbP/bJNdrXZhCuqk=",
"axe.min.js": "sha256-zpmYSLTgHx09UyYIvYrS5K6uj4VuBbspk54kHk5hPqo="
},
"2.2.3": {
"axe.js": "sha256-dV8RkE0hyyzj7qgValVkoP7Rtu8789BmbyeHZmidvqA=",
"axe.min.js": "sha256-BrNWjOcDL265Me8eKQosGWerJ6ju2g+G9+RvMWiBGOA="
},
"2.3.0": {
"axe.js": "sha256-rkyHB2lHjs+tissQLBUxuxIvWlzRbS4f4cdaH+TjQvo=",
"axe.min.js": "sha256-MGWkallV18uw6bSq6w8cjbGsf9v4rJtXP+NDtMEbO14="
},
"2.3.1": {
"axe.js": "sha256-63oq1xHBiOhX9jlvn5sJmoL8TwJ8JaLYIB91gyb74RI=",
"axe.min.js": "sha256-BGAllCBTUJjJXw3yOPMVai2Bj+1PVaEhK2na699nI/o="
},
"2.4.1": {
"axe.js": "sha256-nR7Ix22wBzWJJw7bNukb3n8Bw16bvHdpGKW86+G8dU4=",
"axe.min.js": "sha256-xVpSddrzxbQVFp90jaOUOQGp3fwCwK4sYxYmkIU3N2c="
},
"2.4.2": {
"axe.js": "sha256-x1Yy3nmIKx4qWNKjPy+jtpXSozwbuFsLez1iHliFgEQ=",
"axe.min.js": "sha256-v8V4N5vGmwEq7XbSIyUkGN9TrjhGBHjM1ZuAAIhgp6o="
},
"2.5.0": {
"axe.js": "sha256-NYUXSdma9KjPfzmpt7jw/hlbmeAha8K3zEA2UOW+eWw=",
"axe.min.js": "sha256-7MV3BvKtgHeecwFjYOBYJbmOhvh2wdTGU7odxgpcrG0="
},
"2.6.0": {
"axe.js": "sha256-zK6kpREBDqi1wucJ1GoH9UafxT0E0+XUnrSzg03wdmw=",
"axe.min.js": "sha256-vqKSLjjqbp9J3seCuphn1h/3OC6o5jntS8LtlIftvdY="
},
"2.6.1": {
"axe.js": "sha256-fFHgLOnvH7mY6LNF58cvts9CXZCsyUgd++hhHeZpowo=",
"axe.min.js": "sha256-arpGpcEwKuAfd4XQmHqNdmXP/nUvm4eMonLh+L0s6cc="
},
"3.0.0-alpha.7": {
"axe.js": "sha256-10kIurI2DW5bjegHOgc/MMSHiiXK2CAVWCQfoN6h0fs=",
"axe.min.js": "sha256-cDpGlEEbGsAh0MI82ZFwvX+oOpD5j+uo+kjKH/gJ5t4="
},
"3.0.0-alpha.8": {
"axe.js": "sha256-1ZYjd7ajlao8zM/E8GJLh7u0H/uoMgO5K1fayVUOW5Q=",
"axe.min.js": "sha256-hqbtoVFN2hNjaNhgH2anN1itc31jUDUnOX2cj/6SR2M="
},
"3.0.0-alpha.9": {
"axe.js": "sha256-9eUbLQe6YDrwxRsdNnAeTGoBV3lTIrzokBmP2gaStBI=",
"axe.min.js": "sha256-2nIufAEb6J4t/f/mnSa3D16vrdcBd0fPjEFy81F+N7k="
},
"3.0.0-beta.1": {
"axe.js": "sha256-F9UktrEmuvDZZ3uYq5WVR9pyfgS+IP+RmRMq8WY6NzU=",
"axe.min.js": "sha256-K0dHFoOFTxCCdRuVrey4KVRGQx6Oj5afJyp3YVpZNz0="
},
"3.0.0-beta.2": {
"axe.js": "sha256-cMk6LIQ0mYRm54wqfZ6O2U/6BT6XpHPjqIPVyhMMHYU=",
"axe.min.js": "sha256-66fXkU5+wmx5X9sURMglHTsWKO8R+LoOIcBwB8N9dPI="
},
"3.0.0-beta.3": {
"axe.js": "sha256-9le58CGdN3pVlavrlAiyCmo276kXpnTKIIgFRlUhauI=",
"axe.min.js": "sha256-yzD9M6lgRosBZtC6x3acx5XaiLgR2jAWe1dDMqutmbs="
},
"3.0.0": {
"axe.js": "sha256-1wR8RsA0/NYF2caKkmvgOqcCoyZXOZK2q7/EfZ4Y8Fo=",
"axe.min.js": "sha256-6SQ3NZobDnpEoUWc8h2u+4G3H2/yzt53VX3nv9PZ8g8="
},
"3.0.1": {
"axe.js": "sha256-Vf/arxSrHppK2X5x6VgBZLJnCy8yK6P6uH99WwzQ30s=",
"axe.min.js": "sha256-vMPyo7vifw5RTaVEAlnfwGFa9VyHymsNqanCsHh3Q8c="
},
"3.0.2": {
"axe.js": "sha256-D24i3Yy35gMxOZNTNZyQLAyL3W3wVvW1wUYakK5v1VI=",
"axe.min.js": "sha256-Hsc1oDUNhkVBP4gVUaC9jNm9t0qmLpTJzXW4uzx10bo="
},
"3.0.3": {
"axe.js": "sha256-QhYA1btt0EGa6HUDloEPZ5p6ZArWsL8J9C7PDoqi320=",
"axe.min.js": "sha256-Xlzi+kk/RJRo2x/+w04BppEgcrO/Cy9xTSbuIp6m/CU="
},
"3.0.4": {
"axe.js": "sha256-l8dI6H61gah8+nZRMFdcZkCU08rxvMgpUaRx0Hs/lL8=",
"axe.min.js": "sha256-cqgH55deHQaFac6ItvRSV9eRcUbf4dlqjc3Nwp1jUUI="
},
"3.1.0": {
"axe.js": "sha256-qUMvWIpNXGal2tqBIDJsrXde0clrbTcATxlteQSyA4M=",
"axe.min.js": "sha256-q1K/bHXBTINVndnMyDdntNSJHTAei0YhN/kNqeaGD5A="
},
"3.1.1": {
"axe.js": "sha256-54k0QW1jMWPC2Lq/pTSX2xu8ky7QSd39uEqcy3Yk35o=",
"axe.min.js": "sha256-Zs6maznrnIa0ko83hAWIKlhPPeBLmKmRmfphyuqBJbA="
},
"3.1.2": {
"axe.js": "sha256-goUY5vBRPoITOCdg7HK/vfHRs50+RdQRQQkNCU3lnMs=",
"axe.min.js": "sha256-wIvlzfT77n6fOnSL6/oLbzB873rY7QHTW/e0Z0mOoYs="
},
"3.1.3": {
"axe.js": "sha256-X/FaOBNaYhVis9NrSYGNPLyjzkmTD1OqSc8o7A9y2RA=",
"axe.min.js": "sha256-KpiyZmcHc5wnCsMY7WLhvQEuB3wz1mjV7UA//ifbCK4="
},
"3.2.0": {
"axe.js": "sha256-wdCvSfDepBhwcvTqB0gm586ywpla6Yi81qLCHjegILM=",
"axe.min.js": "sha256-Tvf4toyAt1NFmmkuLsgStXW+4pcG5GG9ugopPoOvOwg="
},
"3.2.1": {
"axe.js": "sha256-VPX1ngRx0XWqC5BP9XdHoDd8YlbgXGK39cz14GBL9bg=",
"axe.min.js": "sha256-ynN9JxvxoI9VpL7IbdTVCUCLhy3N7Ygrnit2r7a2vK8="
},
"3.2.2": {
"axe.js": "sha256-ekZaZcmreeOq0/Hm0MYYpjK2k/HfLIBchbdzynX2s1A=",
"axe.min.js": "sha256-WUsm7HQhfTPm48UUbRuQCZ6mXZXpO+trPivOXYelKM0="
},
"3.2.3": {
"axe.js": "sha256-l36pxPggxG0w7W9WFK21lyw9uaObTj3M5gS1Fl7ZABo=",
"axe.min.js": "sha256-c+LGvM2VcJVUXwaqzmDeKLDBMJSZgKUhnW9GK3JkZ5o="
},
"3.2.4": {
"axe.js": "sha256-EBY9p4epOAuqOfHhHDmA03TuKUqarplY3FA97bGDwyY=",
"axe.min.js": "sha256-heYXBvx3dOPu5dGnEKhOr2FyynWFxWht0bslELqiUAo="
},
"3.3.0": {
"axe.js": "sha256-9qKFcrJohPVSRdWg+nYMf1cnxUz00rojnrcDbRpofP4=",
"axe.min.js": "sha256-t2QDE4+vMfgX52JfOztdvXHLxDJLc9Gc1O583kc4l/s="
},
"3.3.1": {
"axe.js": "sha256-MdbXT1qQi6W6AGWVUzUROzk8KhsTy6ePEpa3pBhO1S4=",
"axe.min.js": "sha256-x2j+s50F+GHZZWsTK2GWiJtcHo4MDvc5zpuIFTwXioY="
},
"3.3.2": {
"axe.js": "sha256-0gx9+aOF0I9F91zdACXlV8C0eZRP0bjKORUPDFuGOkw=",
"axe.min.js": "sha256-eMkj7GARritK91GFkbOxZind0uesDKEOXS/AggeFJ4E="
},
"3.3.3": {
"axe.js": "sha256-cWikFVL1B7T3kafsX1ESurvIh/+2bFrhX8CKJJUNnQ0=",
"axe.min.js": "sha256-L/faUr+k2zA3fuo4l2T7mIpMxL8vPB3CWsSujoLyKLk="
},
"3.3.4": {
"axe.js": "sha256-hcKoJVuQBu5iOURV1//SJrAFn4Gx8rooN/SmKOr5o9g=",
"axe.min.js": "sha256-P/yLNTZPLmpl/OLh4pfocIWG8J6HDuv9oXNhFIRvIOc="
},
"3.4.0": {
"axe.js": "sha256-J7v+KmmfiDeImDENld25aBnvcJyhg2Z/PayxJyJmL3A=",
"axe.min.js": "sha256-3uvAwJcMTsYRtepeqr32rrpy5zZ/fMYjiKEKPZM6Rtc="
},
"3.4.1": {
"axe.js": "sha256-2mBsmz6UhYUk3gYnRiMkzuJTiHd86XCEA/Rxf3tN7l8=",
"axe.min.js": "sha256-z1eK+dbxVx44jv/XqW4xYJlyA9T9zXuxMlJbNJfTvOg="
},
"3.4.2": {
"axe.js": "sha256-1O2tV4TBC/8pYjxbIwj192fUX1SJvsjn8KQH3PdJUuU=",
"axe.min.js": "sha256-XXgQWSZNsMKcqEQnEU2BDkIfCzV6gCjOjrwnrzioYm4="
},
"3.4.3": {
"axe.js": "sha256-SaFKkccPxaPG6ZNeF2DOwDpKSQlZ/AIrfLJq3R7IDQ4=",
"axe.min.js": "sha256-riQur+AZD7BQyyNzplymxhdhwsEBQHiaJwM5ozy3ISw="
},
"3.5.0": {
"axe.js": "sha256-w/zYk9v7UUawn15gNmZHGrh8WdzCI1bSxmRM2N7Uk4o=",
"axe.min.js": "sha256-p3SZwFLtGBl/V92T6V9wJvUEkr5GvLswqkPy8rt49S0="
},
"3.5.1": {
"axe.js": "sha256-J5+J6tFJyKx7Jyn9xK3rJhAyJCGAPR6kOwzXjpdFbEM=",
"axe.min.js": "sha256-wo0QYtgoayRMifoYIHc8Spw5NmeFN4ojGLSqmrUuhX8="
},
"3.5.2": {
"axe.js": "sha256-wf7AYQ0YxwohIAqhYIfQ6y1VDQmP2zbgGhL6mb8a+Eg=",
"axe.min.js": "sha256-suutTbfowm19n2znRYpsLOcHOkwv9g+ximjS8TLJ6/8="
},
"3.5.3": {
"axe.js": "sha256-lO/Zp+gRgYruJbjyvHOfqWqqroJ2ogTLJ64DwunyUz4=",
"axe.min.js": "sha256-Oh5/ClgfAAKQWyCvlU3F+Ud6QDsS0myLJr866QFt67w="
},
"3.5.4": {
"axe.js": "sha256-4f1ZZbAr3xgoAputB3oZK5ASoazrNIw6SU2M1Nnb4bg=",
"axe.min.js": "sha256-XDhCakYtcQtOpujvhE876/a4fUyZjiKtNn8xniP03Ek="
},
"3.5.5": {
"axe.js": "sha256-u+Xkb1EmxyRof8YJD9nPMbq9e3VXBj5cO99aEtr2uEs=",
"axe.min.js": "sha256-ODhTB+pG6Fxp1+zEO2uNekC30gj1q8gQ4iCZZpMQhuE="
},
"3.5.6": {
"axe.js": "sha256-kEgieHQSxGEe1pEXRrbCXuzUtQe3riQHWP3b9GCB2vc=",
"axe.min.js": "sha256-0fQXgcsl+WahejLCUoWzSNSPChr65aPlw5P7jsCpoVc="
},
"4.0.0": {
"axe.js": "sha256-F408iSv2h/vUtSWZ0hzzKvfoV6TVr25kzqD4CZE3gnk=",
"axe.min.js": "sha256-TtQRMYXl4FFwO5r1PgEpv9qfeYUQTUKv4w6M0Mu3wnE="
},
"4.0.1": {
"axe.js": "sha256-qt/1RCmnUExiG4pAxxvS14Rv5WG2mUl3D/9ZG5hIOoo=",
"axe.min.js": "sha256-UX2nqe7C94kL3oes720eLjMxFcJgNYjwEYgAeIVpdMM="
},
"4.0.2": {
"axe.js": "sha256-J5lSA5Tjmd8TJgXJw1nplpRsm+0oZdxZhzh3svJCRTA=",
"axe.min.js": "sha256-Lalcd7gfejE06N+Tl7ZMgGdmyHp77fT8Jlu4mQLH7Nc="
},
"4.0.3": {
"axe.js": "sha256-VQi0wRLTfYCI6xi/IuxJw54g36VbqYkmR61gKkop0f8=",
"axe.min.js": "sha256-lQoBfvmYSxUMKoH5XANiG3ubapXmQ7v+iYjlJ9UngWA="
},
"4.1.0": {
"axe.js": "sha256-CpsJouSBpr1ARLhTtIKjZlS1eMWKAdb6k2USgtNGHQI=",
"axe.min.js": "sha256-Slv1vTH024BG87L3ztHvVdlKpeQXG+wN5BcNMcHp1qk="
},
"4.1.1": {
"axe.js": "sha256-Tz6yShAcKxP8ce//YhbRkOLinUj+htEK2MjIi5yjY58=",
"axe.min.js": "sha256-43geecotYZGPnRt6o9Uu7Pjl3GthxnDacXrzCGv11go="
},
"4.1.2": {
"axe.js": "sha256-wnrhK+P+FXp6U/oYQrYVu6/6PrpO0chRAkik/2ENuS0=",
"axe.min.js": "sha256-TzERMakAkktf5sw0quZYuHVmniguowRhWRIVYpjbLbA="
},
"4.1.3": {
"axe.js": "sha256-T1FukaTlhjibBqAm8SBwYmo8GLAHdn45r52XRllMdv8=",
"axe.min.js": "sha256-2Z3/OrInIQjAzZ5kMvTBZ2CDUiAgUG/2J5ca1XpNfYw="
},
"4.1.4": {
"axe.js": "sha256-MURsYMNnII8EGBcbmd0FGY36x9dICBq6IDOz+hnaJns=",
"axe.min.js": "sha256-dYHtyLO/5lpm5JgQFWzcf3DFg4BvMTf9MDfZG7nxMEM="
},
"4.2.0": {
"axe.js": "sha256-RWY2EhLV83s/DmYMCNZM1ZNSVeVWyYMIXosbCvbSvUs=",
"axe.min.js": "sha256-DGi+8Cpa4CzwJcmtJI/xUnpEDLfhn6mgyescUhP8W8g="
},
"4.2.1": {
"axe.js": "sha256-DK0go8gPzyLAfXpA0r1wKNnpIYqSAtKJx2XkUxw3cp8=",
"axe.min.js": "sha256-GY7NT5JqpkYWliaJ+xXDHf0t5o30jVvEHb5KRVXykXA="
},
"4.2.2": {
"axe.js": "sha256-K3oF47ZvKGUvc3E1qiF7l3pyLK9WoxuUobm1EuWJFiQ=",
"axe.min.js": "sha256-uUSPcE2E0gEuXZYQaEoMQAn1Q34H7JSfjUzDwvVaB8A="
},
"4.2.3": {
"axe.js": "sha256-YpHE4EYgzaX6R5zc08TtcjCwyDoQf2Dczv+W2vhkdEg=",
"axe.min.js": "sha256-7kmyHEX64EqrQmlKiBetbDbidBg++T1OK7pJ0Ch0tVE="
},
"4.2.4": {
"axe.js": "sha256-5COa2/D9CE8AshTHVGhvT0A1FZXaTZy+Kh0x177VAww=",
"axe.min.js": "sha256-rsECe0URvW9YH4nley2GHQLI7bC9Ucan8zY9AaZdyrY="
},
"4.3.0": {
"axe.js": "sha256-V36WfTm/iDPLDQHIKkUfj1lPRPloIKZxS+7syZp7gzw=",
"axe.min.js": "sha256-zG5ql3CjWawSvMuVGJI9C8OvXR5MZAXK1IhBt83psrA="
},
"4.3.1": {
"axe.js": "sha256-59tFDkuadP3UQaLuRg51nCnT6M22O3+I1lBIuiTer8U=",
"axe.min.js": "sha256-QJtI5W/X35A3qw39uNE/Ho4iei3arUL4zrWillwv2oA="
},
"4.3.2": {
"axe.js": "sha256-q0wpLH5m3+m2qIpuhiAfNx2BMxC6E8O5BLBQ52P6AvM=",
"axe.min.js": "sha256-eGWJWadXBOoWLwGBXmtbrpqclaIxMoIRVIN9mJ5/idw="
},
"4.3.3": {
"axe.js": "sha256-Zvxy3UIxivqa1hGYQez9LNFxm6JBX826VrkGlH4x6hk=",
"axe.min.js": "sha256-KqKNp9dAHi8QV4BZv/lB28ZJt3ROsN8Y7vVRbxewSJ8="
},
"4.3.4": {
"axe.js": "sha256-C62RaRaF4cx65nFcFNMq5qhRPs0K3syB/x32hxSnDFM=",
"axe.min.js": "sha256-Qw1EkY/ShOt08vZ7tZXSskZI3bQ6HGw9t9F6Rq05MAo="
},
"4.3.5": {
"axe.js": "sha256-pBzsgJIL4mZHcw50O3sj5f1ZYkMYLG659lHq6Qrkuzc=",
"axe.min.js": "sha256-PVZfyAKgcOWwy7tmB01H7BVjKLjtFW5QO94AIXxWkcw="
},
"4.4.0": {
"axe.js": "sha256-gXqUZOaNO3O6o8WlFgwgeyPBiVS+CKGohTW7gC1vreE=",
"axe.min.js": "sha256-0+zQT47ZDlw7BjxlDClFCx2/NA0XcRmpXSn33IL/ua4="
},
"4.4.1": {
"axe.js": "sha256-3JaN+ADNfrGA15wszgRmfF5HiotL+1zjZznNmgzCYj4=",
"axe.min.js": "sha256-hGavf/+WwgIndgE1q4LjwtSlyHJjEdkQq1iilUUafC8="
},
"4.4.2": {
"axe.js": "sha256-s3Ip/Rm7jkD6tDMBfUvDdj1Okyjm+wMBKf60/39jaug=",
"axe.min.js": "sha256-LPnPAiGlol21Bn7pq9yM1TkCvztX37pp59UhYeSwShM="
},
"4.4.3": {
"axe.js": "sha256-R+pmfA40BsLNJsCD6FrO4KRXoV2mV3NKNUZuxFSJk6g=",
"axe.min.js": "sha256-aX6mx+3/D+KJt7vs8f97kBUkm8g0tAmjSM0GDfgK66A="
},
"4.5.0": {
"axe.js": "sha256-AYLBIQscniY92RkIlsESUAIu3cOplhUmJ3Y4/DKR4SE=",
"axe.min.js": "sha256-cdG6H1F9kSiSIpyWgjGYXkbV3mcfc6/SvE7Zbq2km/A="
},
"4.5.1": {
"axe.js": "sha256-IkK+029qUdULyO88zkDU2TeO5kQB8AjncJvjmFKqBHQ=",
"axe.min.js": "sha256-Ost3Bp9ymk0FCZFL9pOU2g/ph8u06GuVCm8go6W+THw="
},
"4.5.2": {
"axe.js": "sha256-GY6QNA/wTZYR80KdSFkH5BevH8QfsZGGbJ9qFzCkneY=",
"axe.min.js": "sha256-4Jw5rCVL57KrRYPfrx9AC87f3txwWIpgTM5n/LbSPTQ="
},
"4.6.0": {
"axe.js": "sha256-THkPfmokl4bJu3OupcpOt0ndrVCtSuKHPAbmah9KOfI=",
"axe.min.js": "sha256-14jwyUq9PSLhUTnee2RUaKm1i5z93fVEhUTgPCLzGO0="
},
"4.6.1": {
"axe.js": "sha256-5YoRtLPmXJjZaeVXOVTTPf6DtevHdYBfD4oxaCBDCXw=",
"axe.min.js": "sha256-8CV1yJR7ZBS/j8HkUf1OwOEib+WUH+QovSg8xOh9MVI="
},
"4.6.2": {
"axe.js": "sha256-6BCLF6TcLdHG7Ok3yyV7HOKF/Se1yJQgzgAiz3AnzX0=",
"axe.min.js": "sha256-US+MWxPC7r+aFzKfSCl+effrzN0Qoz4tS2wxlIpmsCM="
},
"4.6.3": {
"axe.js": "sha256-N8N7PwDRFNyzsL80UoXAE5ibkfu/KJ71Ixw0zWYX+yM=",
"axe.min.js": "sha256-vOhlk9sgryrpUZOv6801a9uYhuG6Z/NBJmOJb0aAQQQ="
},
"4.7.0": {
"axe.js": "sha256-JxLtVRh3EvdwPhr6ipXNnoN2ugUYvpwIAx4usr5jKcU=",
"axe.min.js": "sha256-q5YvHv5paIlrWyys5xKDb79XtmXYpiAHFVZcg61Qick="
},
"4.7.1": {
"axe.js": "sha256-1ruJfhOP+fO+uuQiIs1U9P4ILYOxnFc5MCH7LzaH+Lc=",
"axe.min.js": "sha256-ReDVBpTYnDCOjYC3eTfhCwsWtAcleTtuoekVW8eoU38="
},
"4.7.2": {
"axe.js": "sha256-EE+7F84cDAG4yvmWb/Cbb3WmQaNAGj4FwU4cKxJZqjg=",
"axe.min.js": "sha256-VTWaX4yE65/ofnyeohwMLLKvU1GEYDoWOCbKlcqFMs8="
},
"4.8.0": {
"axe.js": "sha256-Rd1U88z7mahhAvxYhchoCfwWxV8R/H+BcSoX6XTQ0gY=",
"axe.min.js": "sha256-1oZiCfWnUt2rwqLWzpkoxlcEaOH53/QFYke0jo+KecA="
},
"4.8.1": {
"axe.js": "sha256-xAiDRfIT8BFIcORsehvJYCROe4K+U0Ak5MVJMaCvn9k=",
"axe.min.js": "sha256-EkEySwRAuCQljOYWJ29XQp4s80KPPlsmKwFtKFn6Vr0="
},
"4.8.2": {
"axe.js": "sha256-VZuuruUDDRwfzCo4ZDDzXiVefuy4pSW6BlGx+D/ucC0=",
"axe.min.js": "sha256-O9U055OcfxyKV61g3Qn7N9mvpJNht0RCPcFw+QjWTG4="
},
"4.8.3": {
"axe.js": "sha256-YWpAAdIo7fwKmLq8nJx1f6pwt7HAXwWm15RSGJKbxhw=",
"axe.min.js": "sha256-/mct+I/4SJnZ30Ce+j9T7ll9zPwzbJVrjdKpbKIP+NA="
},
"4.8.4": {
"axe.js": "sha256-RRn+EjX3fX893zHeLzMQebvK4/HR3yZpVFNxsV3Pbm0=",
"axe.min.js": "sha256-HXl1GEx0+LwVB27fLmwgdXCmeTM2beVwwFosWvFzLmo="
},
"4.9.0": {
"axe.js": "sha256-76H9rp5bFFzCQrHiNlIEZniM30DftZzZ5pUJd/ZG4Qg=",
"axe.min.js": "sha256-leYBst5Y3dlncZ2YVBpe5s//BhrMC7XbK9yhUCAyPNA="
},
"4.9.1": {
"axe.js": "sha256-t7u8FiO2U54AN0dyGu2hAMcYdgpuXEkM6n+Eup6lMyQ=",
"axe.min.js": "sha256-GCpA3F2CB+YmwJhhrWUCfUXoXjpW0BBF0Gji6I7kMuo="
},
"4.10.0": {
"axe.js": "sha256-n/KN+TQhojZXnh49uUEY3/Df5WszWcCEothu0P58qDY=",
"axe.min.js": "sha256-SDpP7Usv5Wz9lKWFZQIMhjmD+EFeKCfzSB3ONecO/7U="
},
"4.10.1": {
"axe.js": "sha256-KQDnBck/AyiC+OE3x0AJ/EQYykYTnH+1z7punr4Xc0c=",
"axe.min.js": "sha256-OBXf33U9n+qCj0mI9MLkiVyC1nCzabDnmopjyuv1gZ4="
},
"4.10.2": {
"axe.js": "sha256-+gZL/deLqt1La/rK9St/UzNzWa4co71yGT5I07FuZuE=",
"axe.min.js": "sha256-tRHNnewBx29LKtFyO2a22zfUwutO0ZkHbhgp2e57deM="
},
"4.10.3": {
"axe.js": "sha256-vurbjUBDRYSCqEMt0ievkm0brzeP+81jiI6R7AyoU10=",
"axe.min.js": "sha256-iAlwwIFwc2DmTzTOol/5GJL1vJVnWwd2kluXCd2KaLs="
},
"4.11.0": {
"axe.js": "sha256-RKE4K0g6QAePcUi+Tcnr567YKVEwnoToqe+Qd7w1mzo=",
"axe.min.js": "sha256-6eWGPDOodPCbwBrNkjS348hxR59e74gC+lglREZebQE="
}
}
@@ -0,0 +1,84 @@
/**
* @author Jamund Ferguson
* See LICENSE file in root directory for full license.
*/
"use strict"
const { getScope, getAncestors } = require("../util/eslint-compat")
const ACCEPTABLE_PARENTS = [
"AssignmentExpression",
"VariableDeclarator",
"MemberExpression",
"ExpressionStatement",
"CallExpression",
"ConditionalExpression",
"Program",
"VariableDeclaration",
]
/**
* Finds the eslint-scope reference in the given scope.
* @param {import('eslint').Scope.Scope} scope The scope to search.
* @param {import('estree').Node} node The identifier node.
* @returns {import('eslint').Scope.Reference|undefined} Returns the found reference or null if none were found.
*/
function findReference(scope, node) {
return scope.references.find(
reference =>
reference.identifier.range?.[0] === node.range?.[0] &&
reference.identifier.range?.[1] === node.range?.[1]
)
}
/**
* Checks if the given identifier node is shadowed in the given scope.
* @param {import('eslint').Scope.Scope} scope The current scope.
* @param {import('estree').Node} node The identifier node to check.
* @returns {boolean} Whether or not the name is shadowed.
*/
function isShadowed(scope, node) {
const reference = findReference(scope, node)
return Boolean(reference?.resolved?.defs?.length)
}
/** @type {import('./rule-module').RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description:
"require `require()` calls to be placed at top-level module scope",
recommended: false,
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/global-require.md",
},
fixable: null,
schema: [],
messages: {
unexpected: "Unexpected require().",
},
},
create(context) {
return {
CallExpression(node) {
const currentScope = getScope(context, node)
if (
node.callee.type === "Identifier" &&
node.callee.name === "require" &&
!isShadowed(currentScope, node.callee)
) {
const isGoodRequire = getAncestors(context, node).every(
parent => ACCEPTABLE_PARENTS.indexOf(parent.type) > -1
)
if (!isGoodRequire) {
context.report({ node, messageId: "unexpected" })
}
}
},
}
},
}
@@ -0,0 +1,107 @@
{
"name": "tailwind-variants",
"version": "0.1.20",
"description": "🦄 Tailwindcss first-class variant API",
"author": "Junior Garcia <jrgarciadev@gmail.com>",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/nextui-org/tailwind-variants"
},
"bugs": {
"url": "https://github.com/nextui-org/tailwind-variants/issues"
},
"type": "module",
"main": "dist/index.cjs",
"types": "dist/index.d.ts",
"sideEffects": false,
"files": [
"dist",
"transformer.js",
"transformer.d.ts",
"README.md",
"LICENSE"
],
"scripts": {
"build": "tsup && node copy-types.cjs",
"typecheck": "tsc --noEmit",
"prepack": "clean-package",
"benchmark": "node benchmark.js",
"postpack": "clean-package restore",
"lint": "eslint -c .eslintrc.json ./src/**/*.{ts,tsx}",
"lint:fix": "eslint --fix -c .eslintrc.json ./src/**/*.{ts,tsx}",
"test": "jest --verbose"
},
"dependencies": {
"tailwind-merge": "^1.14.0"
},
"devDependencies": {
"@commitlint/cli": "^17.2.0",
"@commitlint/config-conventional": "^17.2.0",
"@jest/globals": "^29.7.0",
"@swc-node/jest": "^1.5.2",
"@swc/cli": "0.1.57",
"@swc/core": "1.2.198",
"@swc/helpers": "^0.4.14",
"@types/jest": "28.1.1",
"@types/node": "^18.11.18",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
"benchmark": "2.1.4",
"clean-package": "2.1.1",
"eslint": "^7.29.0",
"eslint-config-prettier": "^8.2.0",
"eslint-config-ts-lambdas": "^1.2.3",
"eslint-import-resolver-typescript": "^2.4.0",
"eslint-loader": "^4.0.2",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^6.0.0",
"expect": "^29.7.0",
"jest": "28.1.1",
"prettier": "^2.2.1",
"prettier-eslint": "^12.0.0",
"prettier-eslint-cli": "^5.0.1",
"tailwindcss": "^3.2.7",
"ts-node": "^10.9.1",
"tslib": "^2.4.1",
"tsup": "6.6.3",
"typescript": "5.1.3",
"webpack": "^5.53.0"
},
"peerDependencies": {
"tailwindcss": "*"
},
"keywords": [
"tailwindcss",
"classes",
"responsive",
"variants",
"styled",
"styles"
],
"engines": {
"node": ">=16.x",
"pnpm": ">=7.x"
},
"module": "dist/index.js",
"exports": {
".": {
"require": "./dist/index.cjs",
"import": "./dist/index.js",
"types": "./types/index.d.ts"
},
"./dist/*": "./dist/*",
"./transformer": {
"require": "./dist/transformer.cjs",
"types": "./dist/transformer.d.ts",
"default": "./dist/transformer.js"
},
"./package.json": "./package.json"
}
}
@@ -0,0 +1,15 @@
var debug;
module.exports = function () {
if (!debug) {
try {
/* eslint global-require: off */
debug = require("debug")("follow-redirects");
}
catch (error) { /* */ }
if (typeof debug !== "function") {
debug = function () { /* */ };
}
}
debug.apply(null, arguments);
};
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAYM,MAAM;IAaX,mBAAmB,GAAW,EAAE,MAAc,EAAU;QACtD,IAAI,UAAU,IAAI,CAAC,QAAQ,CAAC,OAAO;QACnC,IAAI,CAAC,SAAS;YACZ,UAAU,0CAAoB,QAAQ,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa;YACvE,IAAI,CAAC,QAAQ,CAAC,OAAO,GAAG;QAC1B;QAEA,IAAI,SAAS,OAAO,CAAC,IAAI;QACzB,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,CAAC,4BAA4B,EAAE,IAAI,IAAI,EAAE,OAAO,OAAO,CAAC;QAG1E,OAAO;IACT;IAtBA,YAAY,QAA0B,EAAE,gBAAwB,OAAO,CAAE;QACvE,yDAAyD;QACzD,uGAAuG;QACvG,IAAI,CAAC,QAAQ,GAAG,OAAO,WAAW,CAChC,OAAO,OAAO,CAAC,UAAU,MAAM,CAAC,CAAC,GAAG,EAAE,GAAK;QAE7C,IAAI,CAAC,aAAa,GAAG;IACvB;AAgBF;AAEA,SAAS,0CAAoB,MAAc,EAAE,OAAyB,EAAE,gBAAgB,OAAO;IAC7F,sCAAsC;IACtC,IAAI,OAAO,CAAC,OAAO,EACjB,OAAO,OAAO,CAAC,OAAO;IAGxB,iDAAiD;IACjD,2EAA2E;IAC3E,8CAA8C;IAC9C,uEAAuE;IACvE,sDAAsD;IACtD,IAAI,WAAW,kCAAY;IAC3B,IAAI,OAAO,CAAC,SAAS,EACnB,OAAO,OAAO,CAAC,SAAS;IAG1B,IAAK,IAAI,OAAO,QAAS;QACvB,IAAI,IAAI,UAAU,CAAC,WAAW,MAC5B,OAAO,OAAO,CAAC,IAAI;IAEvB;IAEA,8BAA8B;IAC9B,OAAO,OAAO,CAAC,cAAc;AAC/B;AAEA,SAAS,kCAAY,MAAc;IACjC,IAAI,KAAK,MAAM,EACb,OAAO,IAAI,KAAK,MAAM,CAAC,QAAQ,QAAQ;IAGzC,OAAO,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE;AAC7B","sources":["packages/@internationalized/message/src/MessageDictionary.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport type LocalizedStrings = {\n [lang: string]: {\n [key: string]: string\n }\n};\n\n/**\n * Stores a mapping of localized strings. Can be used to find the\n * closest available string for a given locale.\n */\nexport class MessageDictionary {\n private messages: LocalizedStrings;\n private defaultLocale: string;\n\n constructor(messages: LocalizedStrings, defaultLocale: string = 'en-US') {\n // Clone messages so we don't modify the original object.\n // Filter out entries with falsy values which may have been caused by applying optimize-locales-plugin.\n this.messages = Object.fromEntries(\n Object.entries(messages).filter(([, v]) => v)\n );\n this.defaultLocale = defaultLocale;\n }\n\n getStringForLocale(key: string, locale: string): string {\n let strings = this.messages[locale];\n if (!strings) {\n strings = getStringsForLocale(locale, this.messages, this.defaultLocale);\n this.messages[locale] = strings;\n }\n\n let string = strings[key];\n if (!string) {\n throw new Error(`Could not find intl message ${key} in ${locale} locale`);\n }\n\n return string;\n }\n}\n\nfunction getStringsForLocale(locale: string, strings: LocalizedStrings, defaultLocale = 'en-US') {\n // If there is an exact match, use it.\n if (strings[locale]) {\n return strings[locale];\n }\n\n // Attempt to find the closest match by language.\n // For example, if the locale is fr-CA (French Canadian), but there is only\n // an fr-FR (France) set of strings, use that.\n // This could be replaced with Intl.LocaleMatcher once it is supported.\n // https://github.com/tc39/proposal-intl-localematcher\n let language = getLanguage(locale);\n if (strings[language]) {\n return strings[language];\n }\n\n for (let key in strings) {\n if (key.startsWith(language + '-')) {\n return strings[key];\n }\n }\n\n // Nothing close, use english.\n return strings[defaultLocale];\n}\n\nfunction getLanguage(locale: string) {\n if (Intl.Locale) {\n return new Intl.Locale(locale).language;\n }\n\n return locale.split('-')[0];\n}\n"],"names":[],"version":3,"file":"MessageDictionary.module.js.map"}
@@ -0,0 +1,5 @@
export declare function decorate(decorators: ClassDecorator | ClassDecorator[], target: Function): void;
export declare function decorate(decorators: ParameterDecorator | ParameterDecorator[], target: Function, parameterIndex: number): void;
export declare function decorate(decorators: ParameterDecorator | ParameterDecorator[], target: Function, methodName: string | symbol, parameterIndex: number): void;
export declare function decorate(decorators: MethodDecorator | PropertyDecorator | MethodDecorator[] | PropertyDecorator[], target: Function, property: string | symbol): void;
//# sourceMappingURL=decorate.d.ts.map
@@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e||self).goober={})}(this,function(e){let t={data:""},r=e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||t},n=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,l=/\/\*[^]*?\*\/| +/g,o=/\n+/g,a=(e,t)=>{let r="",n="",l="";for(let o in e){let s=e[o];"@"==o[0]?"i"==o[1]?r=o+" "+s+";":n+="f"==o[1]?a(s,o):o+"{"+a(s,"k"==o[1]?"":t)+"}":"object"==typeof s?n+=a(s,t?t.replace(/([^,])+/g,e=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=s&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),l+=a.p?a.p(o,s):o+":"+s+";")}return r+(t&&l?t+"{"+l+"}":l)+n},s={},c=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+c(e[r]);return t}return e},i=(e,t,r,i,f)=>{let d=c(e),p=s[d]||(s[d]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(d));if(!s[p]){let t=d!==e?e:(e=>{let t,r,a=[{}];for(;t=n.exec(e.replace(l,""));)t[4]?a.shift():t[3]?(r=t[3].replace(o," ").trim(),a.unshift(a[0][r]=a[0][r]||{})):a[0][t[1]]=t[2].replace(o," ").trim();return a[0]})(e);s[p]=a(f?{["@keyframes "+p]:t}:t,r?"":"."+p)}let u=r&&s.g?s.g:null;return r&&(s.g=s[p]),((e,t,r,n)=>{n?t.data=t.data.replace(n,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e)})(s[p],t,i,u),p},f=(e,t,r)=>e.reduce((e,n,l)=>{let o=t[l];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":a(e,""):!1===e?"":e}return e+n+(null==o?"":o)},"");function d(e){let t=this||{},n=e.call?e(t.p):e;return i(n.unshift?n.raw?f(n,[].slice.call(arguments,1),t.p):n.reduce((e,r)=>Object.assign(e,r&&r.call?r(t.p):r),{}):n,r(t.target),t.g,t.o,t.k)}let p,u,g,b=d.bind({g:1}),h=d.bind({k:1});e.css=d,e.extractCss=e=>{let t=r(e),n=t.data;return t.data="",n},e.glob=b,e.keyframes=h,e.setup=function(e,t,r,n){a.p=t,p=e,u=r,g=n},e.styled=function(e,t){let r=this||{};return function(){let n=arguments;function l(o,a){let s=Object.assign({},o),c=s.className||l.className;r.p=Object.assign({theme:u&&u()},s),r.o=/ *go\d+/.test(c),s.className=d.apply(r,n)+(c?" "+c:""),t&&(s.ref=a);let i=e;return e[0]&&(i=s.as||e,delete s.as),g&&i[0]&&g(s),p(i,s)}return t?t(l):l}}});
@@ -0,0 +1 @@
module.exports={A:{D:{"1":"0 1 2 3 4 5 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 iB jB kB lB mB nB oB pB qB rB sB"},L:{"1":"I"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC J ZB K D E F 0C 1C","33":"6 7 8 9 A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB"},M:{"1":"MC"},A:{"2":"K D E F A B wC"},F:{"1":"0 1 2 3 4 5 gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB FD GD HD ID NC uC JD OC"},K:{"1":"H","2":"A B C NC uC OC"},E:{"1":"B C L M G NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD","2":"J ZB 2C ZC 3C ED","33":"K D E F A 4C 5C 6C aC"},G:{"1":"TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC LD","33":"E MD ND OD PD QD RD SD"},P:{"1":"6 7 8 9 AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD","2":"J"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"}},B:6,C:"plaintext from unicode-bidi",D:undefined};
@@ -0,0 +1,291 @@
var path = require('path');
var crypto = require('crypto');
module.exports = {
createFromFile: function (filePath, useChecksum) {
var fname = path.basename(filePath);
var dir = path.dirname(filePath);
return this.create(fname, dir, useChecksum);
},
create: function (cacheId, _path, useChecksum) {
var fs = require('fs');
var flatCache = require('flat-cache');
var cache = flatCache.load(cacheId, _path);
var normalizedEntries = {};
var removeNotFoundFiles = function removeNotFoundFiles() {
const cachedEntries = cache.keys();
// remove not found entries
cachedEntries.forEach(function remover(fPath) {
try {
fs.statSync(fPath);
} catch (err) {
if (err.code === 'ENOENT') {
cache.removeKey(fPath);
}
}
});
};
removeNotFoundFiles();
return {
/**
* the flat cache storage used to persist the metadata of the `files
* @type {Object}
*/
cache: cache,
/**
* Given a buffer, calculate md5 hash of its content.
* @method getHash
* @param {Buffer} buffer buffer to calculate hash on
* @return {String} content hash digest
*/
getHash: function (buffer) {
return crypto.createHash('md5').update(buffer).digest('hex');
},
/**
* Return whether or not a file has changed since last time reconcile was called.
* @method hasFileChanged
* @param {String} file the filepath to check
* @return {Boolean} wheter or not the file has changed
*/
hasFileChanged: function (file) {
return this.getFileDescriptor(file).changed;
},
/**
* given an array of file paths it return and object with three arrays:
* - changedFiles: Files that changed since previous run
* - notChangedFiles: Files that haven't change
* - notFoundFiles: Files that were not found, probably deleted
*
* @param {Array} files the files to analyze and compare to the previous seen files
* @return {[type]} [description]
*/
analyzeFiles: function (files) {
var me = this;
files = files || [];
var res = {
changedFiles: [],
notFoundFiles: [],
notChangedFiles: [],
};
me.normalizeEntries(files).forEach(function (entry) {
if (entry.changed) {
res.changedFiles.push(entry.key);
return;
}
if (entry.notFound) {
res.notFoundFiles.push(entry.key);
return;
}
res.notChangedFiles.push(entry.key);
});
return res;
},
getFileDescriptor: function (file) {
var fstat;
try {
fstat = fs.statSync(file);
} catch (ex) {
this.removeEntry(file);
return { key: file, notFound: true, err: ex };
}
if (useChecksum) {
return this._getFileDescriptorUsingChecksum(file);
}
return this._getFileDescriptorUsingMtimeAndSize(file, fstat);
},
_getFileDescriptorUsingMtimeAndSize: function (file, fstat) {
var meta = cache.getKey(file);
var cacheExists = !!meta;
var cSize = fstat.size;
var cTime = fstat.mtime.getTime();
var isDifferentDate;
var isDifferentSize;
if (!meta) {
meta = { size: cSize, mtime: cTime };
} else {
isDifferentDate = cTime !== meta.mtime;
isDifferentSize = cSize !== meta.size;
}
var nEntry = (normalizedEntries[file] = {
key: file,
changed: !cacheExists || isDifferentDate || isDifferentSize,
meta: meta,
});
return nEntry;
},
_getFileDescriptorUsingChecksum: function (file) {
var meta = cache.getKey(file);
var cacheExists = !!meta;
var contentBuffer;
try {
contentBuffer = fs.readFileSync(file);
} catch (ex) {
contentBuffer = '';
}
var isDifferent = true;
var hash = this.getHash(contentBuffer);
if (!meta) {
meta = { hash: hash };
} else {
isDifferent = hash !== meta.hash;
}
var nEntry = (normalizedEntries[file] = {
key: file,
changed: !cacheExists || isDifferent,
meta: meta,
});
return nEntry;
},
/**
* Return the list o the files that changed compared
* against the ones stored in the cache
*
* @method getUpdated
* @param files {Array} the array of files to compare against the ones in the cache
* @returns {Array}
*/
getUpdatedFiles: function (files) {
var me = this;
files = files || [];
return me
.normalizeEntries(files)
.filter(function (entry) {
return entry.changed;
})
.map(function (entry) {
return entry.key;
});
},
/**
* return the list of files
* @method normalizeEntries
* @param files
* @returns {*}
*/
normalizeEntries: function (files) {
files = files || [];
var me = this;
var nEntries = files.map(function (file) {
return me.getFileDescriptor(file);
});
//normalizeEntries = nEntries;
return nEntries;
},
/**
* Remove an entry from the file-entry-cache. Useful to force the file to still be considered
* modified the next time the process is run
*
* @method removeEntry
* @param entryName
*/
removeEntry: function (entryName) {
delete normalizedEntries[entryName];
cache.removeKey(entryName);
},
/**
* Delete the cache file from the disk
* @method deleteCacheFile
*/
deleteCacheFile: function () {
cache.removeCacheFile();
},
/**
* remove the cache from the file and clear the memory cache
*/
destroy: function () {
normalizedEntries = {};
cache.destroy();
},
_getMetaForFileUsingCheckSum: function (cacheEntry) {
var contentBuffer = fs.readFileSync(cacheEntry.key);
var hash = this.getHash(contentBuffer);
var meta = Object.assign(cacheEntry.meta, { hash: hash });
delete meta.size;
delete meta.mtime;
return meta;
},
_getMetaForFileUsingMtimeAndSize: function (cacheEntry) {
var stat = fs.statSync(cacheEntry.key);
var meta = Object.assign(cacheEntry.meta, {
size: stat.size,
mtime: stat.mtime.getTime(),
});
delete meta.hash;
return meta;
},
/**
* Sync the files and persist them to the cache
* @method reconcile
*/
reconcile: function (noPrune) {
removeNotFoundFiles();
noPrune = typeof noPrune === 'undefined' ? true : noPrune;
var entries = normalizedEntries;
var keys = Object.keys(entries);
if (keys.length === 0) {
return;
}
var me = this;
keys.forEach(function (entryName) {
var cacheEntry = entries[entryName];
try {
var meta = useChecksum
? me._getMetaForFileUsingCheckSum(cacheEntry)
: me._getMetaForFileUsingMtimeAndSize(cacheEntry);
cache.setKey(entryName, meta);
} catch (err) {
// if the file does not exists we don't save it
// other errors are just thrown
if (err.code !== 'ENOENT') {
throw err;
}
}
});
cache.save(noPrune);
},
};
},
};
@@ -0,0 +1,51 @@
# jsx-a11y/aria-role
💼 This rule is enabled in the following configs: ☑️ `recommended`, 🔒 `strict`.
<!-- end auto-generated rule header -->
Elements with ARIA roles must use a valid, non-abstract ARIA role. A reference to role definitions can be found at [WAI-ARIA](https://www.w3.org/TR/wai-aria/#role_definitions) site.
## Rule options
This rule takes one optional object argument of type object:
```json
{
"rules": {
"jsx-a11y/aria-role": [ 2, {
"allowedInvalidRoles": ["text"],
"ignoreNonDOM": true
}],
}
}
```
`allowedInvalidRules` is an optional string array of custom roles that should be allowed in addition to the ARIA spec, such as for cases when you [need to use a non-standard role](https://axesslab.com/text-splitting).
For the `ignoreNonDOM` option, this determines if developer created components are checked.
### Succeed
```jsx
<div role="button"></div> <!-- Good: "button" is a valid ARIA role -->
<div role={role}></div> <!-- Good: role is a variable & cannot be determined until runtime. -->
<div></div> <!-- Good: No ARIA role -->
<Foo role={role}></Foo> <!-- Good: ignoreNonDOM is set to true -->
```
### Fail
```jsx
<div role="datepicker"></div> <!-- Bad: "datepicker" is not an ARIA role -->
<div role="range"></div> <!-- Bad: "range" is an _abstract_ ARIA role -->
<div role=""></div> <!-- Bad: An empty ARIA role is not allowed -->
<Foo role={role}></Foo> <!-- Bad: ignoreNonDOM is set to false or not set -->
```
## Accessibility guidelines
- [WCAG 4.1.2](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value)
### Resources
- [Chrome Audit Rules, AX_ARIA_01](https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_aria_01)
- [DPUB-ARIA roles](https://www.w3.org/TR/dpub-aria-1.0/)
- [MDN: Using ARIA: Roles, states, and properties](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques)
@@ -0,0 +1,62 @@
import colors from 'picocolors'
import log from './util/log'
let defaults = {
optimizeUniversalDefaults: false,
generalizedModifiers: true,
disableColorOpacityUtilitiesByDefault: false,
relativeContentPathsByDefault: false,
}
let featureFlags = {
future: [
'hoverOnlyWhenSupported',
'respectDefaultRingColorOpacity',
'disableColorOpacityUtilitiesByDefault',
'relativeContentPathsByDefault',
],
experimental: ['optimizeUniversalDefaults', 'generalizedModifiers'],
}
export function flagEnabled(config, flag) {
if (featureFlags.future.includes(flag)) {
return config.future === 'all' || (config?.future?.[flag] ?? defaults[flag] ?? false)
}
if (featureFlags.experimental.includes(flag)) {
return (
config.experimental === 'all' || (config?.experimental?.[flag] ?? defaults[flag] ?? false)
)
}
return false
}
function experimentalFlagsEnabled(config) {
if (config.experimental === 'all') {
return featureFlags.experimental
}
return Object.keys(config?.experimental ?? {}).filter(
(flag) => featureFlags.experimental.includes(flag) && config.experimental[flag]
)
}
export function issueFlagNotices(config) {
if (process.env.JEST_WORKER_ID !== undefined) {
return
}
if (experimentalFlagsEnabled(config).length > 0) {
let changes = experimentalFlagsEnabled(config)
.map((s) => colors.yellow(s))
.join(', ')
log.warn('experimental-flags-enabled', [
`You have enabled experimental features: ${changes}`,
'Experimental features in Tailwind CSS are not covered by semver, may introduce breaking changes, and can change at any time.',
])
}
}
export default featureFlags
@@ -0,0 +1,59 @@
function _usingCtx() {
var r = "function" == typeof SuppressedError ? SuppressedError : function (r, e) {
var n = Error();
return n.name = "SuppressedError", n.error = r, n.suppressed = e, n;
},
e = {},
n = [];
function using(r, e) {
if (null != e) {
if (Object(e) !== e) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");
if (r) var o = e[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")];
if (void 0 === o && (o = e[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r)) var t = o;
if ("function" != typeof o) throw new TypeError("Object is not disposable.");
t && (o = function o() {
try {
t.call(e);
} catch (r) {
return Promise.reject(r);
}
}), n.push({
v: e,
d: o,
a: r
});
} else r && n.push({
d: e,
a: r
});
return e;
}
return {
e: e,
u: using.bind(null, !1),
a: using.bind(null, !0),
d: function d() {
var o,
t = this.e,
s = 0;
function next() {
for (; o = n.pop();) try {
if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next);
if (o.d) {
var r = o.d.call(o.v);
if (o.a) return s |= 2, Promise.resolve(r).then(next, err);
} else s |= 1;
} catch (r) {
return err(r);
}
if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve();
if (t !== e) throw t;
}
function err(n) {
return t = t !== e ? new r(n, t) : n, next();
}
return next();
}
};
}
module.exports = _usingCtx, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1 @@
{"version":3,"names":["Buffer","constructor","map","indentChar","_map","_buf","_str","_appendCount","_last","_queue","_queueCursor","_canMarkIdName","_indentChar","_fastIndentations","_position","line","column","_sourcePosition","identifierName","undefined","identifierNamePos","filename","i","push","repeat","_allocQueue","queue","char","_pushQueue","cursor","length","item","_popQueue","Error","get","_flush","result","code","trimRight","decodedMap","getDecoded","__mergedMap","resultMap","value","Object","defineProperty","writable","rawMappings","mappings","getRawMappings","append","str","maybeNewline","_append","appendChar","_appendChar","sourcePosition","queueIndentation","queueCursor","sourcePos","fastIndentation","String","fromCharCode","_mark","len","position","charCodeAt","indexOf","last","_this$_map","mark","removeTrailingNewline","removeLastSemicolon","getLastChar","getNewlineCount","count","endsWithCharAndNewline","lastCp","hasContent","exactSource","loc","cb","source","prop","_normalizePosition","sourceWithOffset","columnOffset","pos","target","Math","max","getCurrentColumn","lastIndex","getCurrentLine","exports","default"],"sources":["../src/buffer.ts"],"sourcesContent":["import type SourceMap from \"./source-map.ts\";\n\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charcodes from \"charcodes\";\n\nexport type Pos = {\n line: number;\n column: number;\n index: number;\n};\nexport type Loc = {\n start?: Pos;\n end?: Pos;\n filename?: string;\n};\ntype SourcePos = {\n line: number | undefined;\n column: number | undefined;\n identifierName: string | undefined;\n filename: string | undefined;\n};\ntype InternalSourcePos = SourcePos & { identifierNamePos: Pos | undefined };\n\ntype QueueItem = {\n char: number;\n repeat: number;\n line: number | undefined;\n column: number | undefined;\n identifierName: undefined; // Not used, it always undefined.\n identifierNamePos: undefined; // Not used, it always undefined.\n filename: string | undefined;\n};\n\nexport default class Buffer {\n constructor(map: SourceMap | null, indentChar: string) {\n this._map = map;\n this._indentChar = indentChar;\n\n for (let i = 0; i < 64; i++) {\n this._fastIndentations.push(indentChar.repeat(i));\n }\n\n this._allocQueue();\n }\n\n _map: SourceMap | null = null;\n _buf = \"\";\n _str = \"\";\n _appendCount = 0;\n _last = 0;\n _queue: QueueItem[] = [];\n _queueCursor = 0;\n _canMarkIdName = true;\n _indentChar = \"\";\n _fastIndentations: string[] = [];\n\n _position = {\n line: 1,\n column: 0,\n };\n _sourcePosition: InternalSourcePos = {\n identifierName: undefined,\n identifierNamePos: undefined,\n line: undefined,\n column: undefined,\n filename: undefined,\n };\n\n _allocQueue() {\n const queue = this._queue;\n\n for (let i = 0; i < 16; i++) {\n queue.push({\n char: 0,\n repeat: 1,\n line: undefined,\n column: undefined,\n identifierName: undefined,\n identifierNamePos: undefined,\n filename: \"\",\n });\n }\n }\n\n _pushQueue(\n char: number,\n repeat: number,\n line: number | undefined,\n column: number | undefined,\n filename: string | undefined,\n ) {\n const cursor = this._queueCursor;\n if (cursor === this._queue.length) {\n this._allocQueue();\n }\n const item = this._queue[cursor];\n item.char = char;\n item.repeat = repeat;\n item.line = line;\n item.column = column;\n item.filename = filename;\n\n this._queueCursor++;\n }\n\n _popQueue(): QueueItem {\n if (this._queueCursor === 0) {\n throw new Error(\"Cannot pop from empty queue\");\n }\n return this._queue[--this._queueCursor];\n }\n\n /**\n * Get the final string output from the buffer, along with the sourcemap if one exists.\n */\n\n get() {\n this._flush();\n\n const map = this._map;\n const result = {\n // Whatever trim is used here should not execute a regex against the\n // source string since it may be arbitrarily large after all transformations\n code: (this._buf + this._str).trimRight(),\n // Decoded sourcemap is free to generate.\n decodedMap: map?.getDecoded(),\n // Used as a marker for backwards compatibility. We moved input map merging\n // into the generator. We cannot merge the input map a second time, so the\n // presence of this field tells us we've already done the work.\n get __mergedMap() {\n return this.map;\n },\n // Encoding the sourcemap is moderately CPU expensive.\n get map() {\n const resultMap = map ? map.get() : null;\n result.map = resultMap;\n return resultMap;\n },\n set map(value) {\n Object.defineProperty(result, \"map\", { value, writable: true });\n },\n // Retrieving the raw mappings is very memory intensive.\n get rawMappiLine truncated
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var WindowRole = {
relatedConcepts: [],
type: 'window'
};
var _default = WindowRole;
exports.default = _default;
@@ -0,0 +1,416 @@
"use client";
// src/use-input.ts
import { mapPropsVariants, useProviderContext } from "@heroui/system";
import { useSafeLayoutEffect } from "@heroui/use-safe-layout-effect";
import { useFocusRing } from "@react-aria/focus";
import { input } from "@heroui/theme";
import { useDOMRef, filterDOMProps } from "@heroui/react-utils";
import { useFocusWithin, useHover, usePress } from "@react-aria/interactions";
import { clsx, dataAttr, isEmpty, objectToDeps, safeAriaLabel } from "@heroui/shared-utils";
import { useControlledState } from "@react-stately/utils";
import { useMemo, useCallback, useState } from "react";
import { chain, mergeProps } from "@react-aria/utils";
import { useTextField } from "@react-aria/textfield";
import { FormContext, useSlottedContext } from "@heroui/form";
function useInput(originalProps) {
var _a, _b, _c, _d;
const globalContext = useProviderContext();
const { validationBehavior: formValidationBehavior } = useSlottedContext(FormContext) || {};
const [props, variantProps] = mapPropsVariants(originalProps, input.variantKeys);
const {
ref,
as,
type,
label,
baseRef,
wrapperRef,
description,
className,
classNames,
autoFocus,
startContent,
endContent,
onClear,
onChange,
validationState,
validationBehavior = (_a = formValidationBehavior != null ? formValidationBehavior : globalContext == null ? void 0 : globalContext.validationBehavior) != null ? _a : "native",
innerWrapperRef: innerWrapperRefProp,
onValueChange = () => {
},
...otherProps
} = props;
const handleValueChange = useCallback(
(value) => {
onValueChange(value != null ? value : "");
},
[onValueChange]
);
const [isFocusWithin, setFocusWithin] = useState(false);
const Component = as || "div";
const disableAnimation = (_c = (_b = originalProps.disableAnimation) != null ? _b : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _c : false;
const domRef = useDOMRef(ref);
const baseDomRef = useDOMRef(baseRef);
const inputWrapperRef = useDOMRef(wrapperRef);
const innerWrapperRef = useDOMRef(innerWrapperRefProp);
const [inputValue, setInputValue] = useControlledState(
props.value,
(_d = props.defaultValue) != null ? _d : "",
handleValueChange
);
const isFilledByDefault = ["date", "time", "month", "week", "range"].includes(type);
const isFilled = !isEmpty(inputValue) || isFilledByDefault;
const isFilledWithin = isFilled || isFocusWithin;
const isHiddenType = type === "hidden";
const isMultiline = originalProps.isMultiline;
const isFileTypeInput = type === "file";
const baseStyles = clsx(classNames == null ? void 0 : classNames.base, className, isFilled ? "is-filled" : "");
const handleClear = useCallback(() => {
var _a2;
setInputValue("");
onClear == null ? void 0 : onClear();
(_a2 = domRef.current) == null ? void 0 : _a2.focus();
}, [setInputValue, onClear]);
useSafeLayoutEffect(() => {
if (!domRef.current)
return;
setInputValue(domRef.current.value);
}, [domRef.current]);
const {
labelProps,
inputProps,
isInvalid: isAriaInvalid,
validationErrors,
validationDetails,
descriptionProps,
errorMessageProps
} = useTextField(
{
...originalProps,
validationBehavior,
autoCapitalize: originalProps.autoCapitalize,
value: inputValue,
"aria-label": safeAriaLabel(
originalProps["aria-label"],
originalProps.label,
originalProps.placeholder
),
inputElementType: isMultiline ? "textarea" : "input",
onChange: setInputValue
},
domRef
);
if (isFileTypeInput) {
delete inputProps.value;
delete inputProps.onChange;
}
const { isFocusVisible, isFocused, focusProps } = useFocusRing({
autoFocus,
isTextInput: true
});
const { isHovered, hoverProps } = useHover({ isDisabled: !!(originalProps == null ? void 0 : originalProps.isDisabled) });
const { isHovered: isLabelHovered, hoverProps: labelHoverProps } = useHover({
isDisabled: !!(originalProps == null ? void 0 : originalProps.isDisabled)
});
const { focusProps: clearFocusProps, isFocusVisible: isClearButtonFocusVisible } = useFocusRing();
const { focusWithinProps } = useFocusWithin({
onFocusWithinChange: setFocusWithin
});
const { pressProps: clearPressProps } = usePress({
isDisabled: !!(originalProps == null ? void 0 : originalProps.isDisabled) || !!(originalProps == null ? void 0 : originalProps.isReadOnly),
onPress: handleClear
});
const isInvalid = validationState === "invalid" || isAriaInvalid;
const labelPlacement = useMemo(() => {
var _a2;
if ((!originalProps.labelPlacement || originalProps.labelPlacement === "inside") && !label) {
return "outside";
}
return (_a2 = originalProps.labelPlacement) != null ? _a2 : "inside";
}, [originalProps.labelPlacement, label]);
const errorMessage = typeof props.errorMessage === "function" ? props.errorMessage({ isInvalid, validationErrors, validationDetails }) : props.errorMessage || (validationErrors == null ? void 0 : validationErrors.join(" "));
const isClearable = !!onClear || originalProps.isClearable;
const hasElements = !!label || !!description || !!errorMessage;
const hasPlaceholder = !!props.placeholder;
const hasLabel = !!label;
const hasHelper = !!description || !!errorMessage;
const shouldLabelBeOutside = labelPlacement === "outside" || labelPlacement === "outside-left";
const shouldLabelBeInside = labelPlacement === "inside";
const isPlaceholderShown = domRef.current ? (!domRef.current.value || domRef.current.value === "" || !inputValue || inputValue === "") && hasPlaceholder : false;
const isOutsideLeft = labelPlacement === "outside-left";
const hasStartContent = !!startContent;
const isLabelOutside = shouldLabelBeOutside ? labelPlacement === "outside-left" || hasPlaceholder || labelPlacement === "outside" && hasStartContent : false;
const isLabelOutsideAsPlaceholder = labelPlacement === "outside" && !hasPlaceholder && !hasStartContent;
const slots = useMemo(
() => input({
...variantProps,
isInvalid,
labelPlacement,
isClearable,
disableAnimation
}),
[
objectToDeps(variantProps),
isInvalid,
labelPlacement,
isClearable,
hasStartContent,
disableAnimation
]
);
const getBaseProps = useCallback(
(props2 = {}) => {
return {
ref: baseDomRef,
className: slots.base({ class: baseStyles }),
"data-slot": "base",
"data-filled": dataAttr(
isFilled || hasPlaceholder || hasStartContent || isPlaceholderShown || isFileTypeInput
),
"data-filled-within": dataAttr(
isFilledWithin || hasPlaceholder || hasStartContent || isPlaceholderShown || isFileTypeInput
),
"data-focus-within": dataAttr(isFocusWithin),
"data-focus-visible": dataAttr(isFocusVisible),
"data-readonly": dataAttr(originalProps.isReadOnly),
"data-focus": dataAttr(isFocused),
"data-hover": dataAttr(isHovered || isLabelHovered),
"data-required": dataAttr(originalProps.isRequired),
"data-invalid": dataAttr(isInvalid),
"data-disabled": dataAttr(originalProps.isDisabled),
"data-has-elements": dataAttr(hasElements),
"data-has-helper": dataAttr(hasHelper),
"data-has-label": dataAttr(hasLabel),
"data-has-value": dataAttr(!isPlaceholderShown),
"data-hidden": dataAttr(isHiddenType),
...focusWithinProps,
...props2
};
},
[
slots,
baseStyles,
isFilled,
isFocused,
isHovered,
isLabelHovered,
isInvalid,
hasHelper,
hasLabel,
hasElements,
isPlaceholderShown,
hasStartContent,
isFocusWithin,
isFocusVisible,
isFilledWithin,
hasPlaceholder,
focusWithinProps,
isHiddenType,
originalProps.isReadOnly,
originalProps.isRequired,
originalProps.isDisabled
]
);
const getLabelProps = useCallback(
(props2 = {}) => {
return {
"data-slot": "label",
className: slots.label({ class: classNames == null ? void 0 : classNames.label }),
...mergeProps(labelProps, labelHoverProps, props2)
};
},
[slots, isLabelHovered, labelProps, classNames == null ? void 0 : classNames.label]
);
const getInputProps = useCallback(
(props2 = {}) => {
return {
"data-slot": "input",
"data-filled": dataAttr(isFilled),
"data-filled-within": dataAttr(isFilledWithin),
"data-has-start-content": dataAttr(hasStartContent),
"data-has-end-content": dataAttr(!!endContent),
className: slots.input({
class: clsx(classNames == null ? void 0 : classNames.input, isFilled ? "is-filled" : "", isMultiline ? "pe-0" : "")
}),
...mergeProps(
focusProps,
inputProps,
filterDOMProps(otherProps, {
enabled: true,
labelable: true,
omitEventNames: new Set(Object.keys(inputProps))
}),
props2
),
"aria-readonly": dataAttr(originalProps.isReadOnly),
onChange: chain(inputProps.onChange, onChange),
ref: domRef
};
},
[
slots,
inputValue,
focusProps,
inputProps,
otherProps,
isFilled,
isFilledWithin,
hasStartContent,
endContent,
classNames == null ? void 0 : classNames.input,
originalProps.isReadOnly,
originalProps.isRequired,
onChange
]
);
const getInputWrapperProps = useCallback(
(props2 = {}) => {
return {
ref: inputWrapperRef,
"data-slot": "input-wrapper",
"data-hover": dataAttr(isHovered || isLabelHovered),
"data-focus-visible": dataAttr(isFocusVisible),
"data-focus": dataAttr(isFocused),
className: slots.inputWrapper({
class: clsx(classNames == null ? void 0 : classNames.inputWrapper, isFilled ? "is-filled" : "")
}),
...mergeProps(props2, hoverProps),
onClick: (e) => {
if (domRef.current && e.currentTarget === e.target) {
domRef.current.focus();
}
},
style: {
cursor: "text",
...props2.style
}
};
},
[
slots,
isHovered,
isLabelHovered,
isFocusVisible,
isFocused,
inputValue,
classNames == null ? void 0 : classNames.inputWrapper
]
);
const getInnerWrapperProps = useCallback(
(props2 = {}) => {
return {
...props2,
ref: innerWrapperRef,
"data-slot": "inner-wrapper",
onClick: (e) => {
if (domRef.current && e.currentTarget === e.target) {
domRef.current.focus();
}
},
className: slots.innerWrapper({
class: clsx(classNames == null ? void 0 : classNames.innerWrapper, props2 == null ? void 0 : props2.className)
})
};
},
[slots, classNames == null ? void 0 : classNames.innerWrapper]
);
const getMainWrapperProps = useCallback(
(props2 = {}) => {
return {
...props2,
"data-slot": "main-wrapper",
className: slots.mainWrapper({
class: clsx(classNames == null ? void 0 : classNames.mainWrapper, props2 == null ? void 0 : props2.className)
})
};
},
[slots, classNames == null ? void 0 : classNames.mainWrapper]
);
const getHelperWrapperProps = useCallback(
(props2 = {}) => {
return {
...props2,
"data-slot": "helper-wrapper",
className: slots.helperWrapper({
class: clsx(classNames == null ? void 0 : classNames.helperWrapper, props2 == null ? void 0 : props2.className)
})
};
},
[slots, classNames == null ? void 0 : classNames.helperWrapper]
);
const getDescriptionProps = useCallback(
(props2 = {}) => {
return {
...props2,
...descriptionProps,
"data-slot": "description",
className: slots.description({ class: clsx(classNames == null ? void 0 : classNames.description, props2 == null ? void 0 : props2.className) })
};
},
[slots, classNames == null ? void 0 : classNames.description]
);
const getErrorMessageProps = useCallback(
(props2 = {}) => {
return {
...props2,
...errorMessageProps,
"data-slot": "error-message",
className: slots.errorMessage({ class: clsx(classNames == null ? void 0 : classNames.errorMessage, props2 == null ? void 0 : props2.className) })
};
},
[slots, errorMessageProps, classNames == null ? void 0 : classNames.errorMessage]
);
const getClearButtonProps = useCallback(
(props2 = {}) => {
return {
...props2,
type: "button",
tabIndex: -1,
disabled: originalProps.isDisabled,
"aria-label": "clear input",
"data-slot": "clear-button",
"data-focus-visible": dataAttr(isClearButtonFocusVisible),
className: slots.clearButton({
class: clsx(classNames == null ? void 0 : classNames.clearButton, props2 == null ? void 0 : props2.className)
}),
...mergeProps(clearPressProps, clearFocusProps)
};
},
[slots, isClearButtonFocusVisible, clearPressProps, clearFocusProps, classNames == null ? void 0 : classNames.clearButton]
);
return {
Component,
classNames,
domRef,
label,
description,
startContent,
endContent,
labelPlacement,
isClearable,
hasHelper,
hasStartContent,
isLabelOutside,
isOutsideLeft,
isLabelOutsideAsPlaceholder,
shouldLabelBeOutside,
shouldLabelBeInside,
hasPlaceholder,
isInvalid,
errorMessage,
getBaseProps,
getLabelProps,
getInputProps,
getMainWrapperProps,
getInputWrapperProps,
getInnerWrapperProps,
getHelperWrapperProps,
getDescriptionProps,
getErrorMessageProps,
getClearButtonProps
};
}
export {
useInput
};
@@ -0,0 +1,527 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Parser = void 0;
const Tokenizer_js_1 = __importStar(require("./Tokenizer.js"));
const decode_1 = require("entities/decode");
const formTags = new Set([
"input",
"option",
"optgroup",
"select",
"button",
"datalist",
"textarea",
]);
const pTag = new Set(["p"]);
const tableSectionTags = new Set(["thead", "tbody"]);
const ddtTags = new Set(["dd", "dt"]);
const rtpTags = new Set(["rt", "rp"]);
const openImpliesClose = new Map([
["tr", new Set(["tr", "th", "td"])],
["th", new Set(["th"])],
["td", new Set(["thead", "th", "td"])],
["body", new Set(["head", "link", "script"])],
["li", new Set(["li"])],
["p", pTag],
["h1", pTag],
["h2", pTag],
["h3", pTag],
["h4", pTag],
["h5", pTag],
["h6", pTag],
["select", formTags],
["input", formTags],
["output", formTags],
["button", formTags],
["datalist", formTags],
["textarea", formTags],
["option", new Set(["option"])],
["optgroup", new Set(["optgroup", "option"])],
["dd", ddtTags],
["dt", ddtTags],
["address", pTag],
["article", pTag],
["aside", pTag],
["blockquote", pTag],
["details", pTag],
["div", pTag],
["dl", pTag],
["fieldset", pTag],
["figcaption", pTag],
["figure", pTag],
["footer", pTag],
["form", pTag],
["header", pTag],
["hr", pTag],
["main", pTag],
["nav", pTag],
["ol", pTag],
["pre", pTag],
["section", pTag],
["table", pTag],
["ul", pTag],
["rt", rtpTags],
["rp", rtpTags],
["tbody", tableSectionTags],
["tfoot", tableSectionTags],
]);
const voidElements = new Set([
"area",
"base",
"basefont",
"br",
"col",
"command",
"embed",
"frame",
"hr",
"img",
"input",
"isindex",
"keygen",
"link",
"meta",
"param",
"source",
"track",
"wbr",
]);
const foreignContextElements = new Set(["math", "svg"]);
const htmlIntegrationElements = new Set([
"mi",
"mo",
"mn",
"ms",
"mtext",
"annotation-xml",
"foreignobject",
"desc",
"title",
]);
const reNameEnd = /\s|\//;
class Parser {
constructor(cbs, options = {}) {
var _a, _b, _c, _d, _e, _f;
this.options = options;
/** The start index of the last event. */
this.startIndex = 0;
/** The end index of the last event. */
this.endIndex = 0;
/**
* Store the start index of the current open tag,
* so we can update the start index for attributes.
*/
this.openTagStart = 0;
this.tagname = "";
this.attribname = "";
this.attribvalue = "";
this.attribs = null;
this.stack = [];
this.buffers = [];
this.bufferOffset = 0;
/** The index of the last written buffer. Used when resuming after a `pause()`. */
this.writeIndex = 0;
/** Indicates whether the parser has finished running / `.end` has been called. */
this.ended = false;
this.cbs = cbs !== null && cbs !== void 0 ? cbs : {};
this.htmlMode = !this.options.xmlMode;
this.lowerCaseTagNames = (_a = options.lowerCaseTags) !== null && _a !== void 0 ? _a : this.htmlMode;
this.lowerCaseAttributeNames =
(_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : this.htmlMode;
this.recognizeSelfClosing =
(_c = options.recognizeSelfClosing) !== null && _c !== void 0 ? _c : !this.htmlMode;
this.tokenizer = new ((_d = options.Tokenizer) !== null && _d !== void 0 ? _d : Tokenizer_js_1.default)(this.options, this);
this.foreignContext = [!this.htmlMode];
(_f = (_e = this.cbs).onparserinit) === null || _f === void 0 ? void 0 : _f.call(_e, this);
}
// Tokenizer event handlers
/** @internal */
ontext(start, endIndex) {
var _a, _b;
const data = this.getSlice(start, endIndex);
this.endIndex = endIndex - 1;
(_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data);
this.startIndex = endIndex;
}
/** @internal */
ontextentity(cp, endIndex) {
var _a, _b;
this.endIndex = endIndex - 1;
(_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, (0, decode_1.fromCodePoint)(cp));
this.startIndex = endIndex;
}
/**
* Checks if the current tag is a void element. Override this if you want
* to specify your own additional void elements.
*/
isVoidElement(name) {
return this.htmlMode && voidElements.has(name);
}
/** @internal */
onopentagname(start, endIndex) {
this.endIndex = endIndex;
let name = this.getSlice(start, endIndex);
if (this.lowerCaseTagNames) {
name = name.toLowerCase();
}
this.emitOpenTag(name);
}
emitOpenTag(name) {
var _a, _b, _c, _d;
this.openTagStart = this.startIndex;
this.tagname = name;
const impliesClose = this.htmlMode && openImpliesClose.get(name);
if (impliesClose) {
while (this.stack.length > 0 && impliesClose.has(this.stack[0])) {
const element = this.stack.shift();
(_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, element, true);
}
}
if (!this.isVoidElement(name)) {
this.stack.unshift(name);
if (this.htmlMode) {
if (foreignContextElements.has(name)) {
this.foreignContext.unshift(true);
}
else if (htmlIntegrationElements.has(name)) {
this.foreignContext.unshift(false);
}
}
}
(_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, name);
if (this.cbs.onopentag)
this.attribs = {};
}
endOpenTag(isImplied) {
var _a, _b;
this.startIndex = this.openTagStart;
if (this.attribs) {
(_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs, isImplied);
this.attribs = null;
}
if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) {
this.cbs.onclosetag(this.tagname, true);
}
this.tagname = "";
}
/** @internal */
onopentagend(endIndex) {
this.endIndex = endIndex;
this.endOpenTag(false);
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
onclosetag(start, endIndex) {
var _a, _b, _c, _d, _e, _f, _g, _h;
this.endIndex = endIndex;
let name = this.getSlice(start, endIndex);
if (this.lowerCaseTagNames) {
name = name.toLowerCase();
}
if (this.htmlMode &&
(foreignContextElements.has(name) ||
htmlIntegrationElements.has(name))) {
this.foreignContext.shift();
}
if (!this.isVoidElement(name)) {
const pos = this.stack.indexOf(name);
if (pos !== -1) {
for (let index = 0; index <= pos; index++) {
const element = this.stack.shift();
// We know the stack has sufficient elements.
(_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, element, index !== pos);
}
}
else if (this.htmlMode && name === "p") {
// Implicit open before close
this.emitOpenTag("p");
this.closeCurrentTag(true);
}
}
else if (this.htmlMode && name === "br") {
// We can't use `emitOpenTag` for implicit open, as `br` would be implicitly closed.
(_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, "br");
(_f = (_e = this.cbs).onopentag) === null || _f === void 0 ? void 0 : _f.call(_e, "br", {}, true);
(_h = (_g = this.cbs).onclosetag) === null || _h === void 0 ? void 0 : _h.call(_g, "br", false);
}
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
onselfclosingtag(endIndex) {
this.endIndex = endIndex;
if (this.recognizeSelfClosing || this.foreignContext[0]) {
this.closeCurrentTag(false);
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
else {
// Ignore the fact that the tag is self-closing.
this.onopentagend(endIndex);
}
}
closeCurrentTag(isOpenImplied) {
var _a, _b;
const name = this.tagname;
this.endOpenTag(isOpenImplied);
// Self-closing tags will be on the top of the stack
if (this.stack[0] === name) {
// If the opening tag isn't implied, the closing tag has to be implied.
(_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name, !isOpenImplied);
this.stack.shift();
}
}
/** @internal */
onattribname(start, endIndex) {
this.startIndex = start;
const name = this.getSlice(start, endIndex);
this.attribname = this.lowerCaseAttributeNames
? name.toLowerCase()
: name;
}
/** @internal */
onattribdata(start, endIndex) {
this.attribvalue += this.getSlice(start, endIndex);
}
/** @internal */
onattribentity(cp) {
this.attribvalue += (0, decode_1.fromCodePoint)(cp);
}
/** @internal */
onattribend(quote, endIndex) {
var _a, _b;
this.endIndex = endIndex;
(_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote === Tokenizer_js_1.QuoteType.Double
? '"'
: quote === Tokenizer_js_1.QuoteType.Single
? "'"
: quote === Tokenizer_js_1.QuoteType.NoValue
? undefined
: null);
if (this.attribs &&
!Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) {
this.attribs[this.attribname] = this.attribvalue;
}
this.attribvalue = "";
}
getInstructionName(value) {
const index = value.search(reNameEnd);
let name = index < 0 ? value : value.substr(0, index);
if (this.lowerCaseTagNames) {
name = name.toLowerCase();
}
return name;
}
/** @internal */
ondeclaration(start, endIndex) {
this.endIndex = endIndex;
const value = this.getSlice(start, endIndex);
if (this.cbs.onprocessinginstruction) {
const name = this.getInstructionName(value);
this.cbs.onprocessinginstruction(`!${name}`, `!${value}`);
}
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
onprocessinginstruction(start, endIndex) {
this.endIndex = endIndex;
const value = this.getSlice(start, endIndex);
if (this.cbs.onprocessinginstruction) {
const name = this.getInstructionName(value);
this.cbs.onprocessinginstruction(`?${name}`, `?${value}`);
}
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
oncomment(start, endIndex, offset) {
var _a, _b, _c, _d;
this.endIndex = endIndex;
(_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, this.getSlice(start, endIndex - offset));
(_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c);
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
oncdata(start, endIndex, offset) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
this.endIndex = endIndex;
const value = this.getSlice(start, endIndex - offset);
if (!this.htmlMode || this.options.recognizeCDATA) {
(_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a);
(_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);
(_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e);
}
else {
(_h = (_g = this.cbs).oncomment) === null || _h === void 0 ? void 0 : _h.call(_g, `[CDATA[${value}]]`);
(_k = (_j = this.cbs).oncommentend) === null || _k === void 0 ? void 0 : _k.call(_j);
}
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
onend() {
var _a, _b;
if (this.cbs.onclosetag) {
// Set the end index for all remaining tags
this.endIndex = this.startIndex;
for (let index = 0; index < this.stack.length; index++) {
this.cbs.onclosetag(this.stack[index], true);
}
}
(_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a);
}
/**
* Resets the parser to a blank state, ready to parse a new HTML document
*/
reset() {
var _a, _b, _c, _d;
(_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a);
this.tokenizer.reset();
this.tagname = "";
this.attribname = "";
this.attribs = null;
this.stack.length = 0;
this.startIndex = 0;
this.endIndex = 0;
(_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this);
this.buffers.length = 0;
this.foreignContext.length = 0;
this.foreignContext.unshift(!this.htmlMode);
this.bufferOffset = 0;
this.writeIndex = 0;
this.ended = false;
}
/**
* Resets the parser, then parses a complete document and
* pushes it to the handler.
*
* @param data Document to parse.
*/
parseComplete(data) {
this.reset();
this.end(data);
}
getSlice(start, end) {
while (start - this.bufferOffset >= this.buffers[0].length) {
this.shiftBuffer();
}
let slice = this.buffers[0].slice(start - this.bufferOffset, end - this.bufferOffset);
while (end - this.bufferOffset > this.buffers[0].length) {
this.shiftBuffer();
slice += this.buffers[0].slice(0, end - this.bufferOffset);
}
return slice;
}
shiftBuffer() {
this.bufferOffset += this.buffers[0].length;
this.writeIndex--;
this.buffers.shift();
}
/**
* Parses a chunk of data and calls the corresponding callbacks.
*
* @param chunk Chunk to parse.
*/
write(chunk) {
var _a, _b;
if (this.ended) {
(_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(".write() after done!"));
return;
}
this.buffers.push(chunk);
if (this.tokenizer.running) {
this.tokenizer.write(chunk);
this.writeIndex++;
}
}
/**
* Parses the end of the buffer and clears the stack, calls onend.
*
* @param chunk Optional final chunk to parse.
*/
end(chunk) {
var _a, _b;
if (this.ended) {
(_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(".end() after done!"));
return;
}
if (chunk)
this.write(chunk);
this.ended = true;
this.tokenizer.end();
}
/**
* Pauses parsing. The parser won't emit events until `resume` is called.
*/
pause() {
this.tokenizer.pause();
}
/**
* Resumes parsing after `pause` was called.
*/
resume() {
this.tokenizer.resume();
while (this.tokenizer.running &&
this.writeIndex < this.buffers.length) {
this.tokenizer.write(this.buffers[this.writeIndex++]);
}
if (this.ended)
this.tokenizer.end();
}
/**
* Alias of `write`, for backwards compatibility.
*
* @param chunk Chunk to parse.
* @deprecated
*/
parseChunk(chunk) {
this.write(chunk);
}
/**
* Alias of `end`, for backwards compatibility.
*
* @param chunk Optional final chunk to parse.
* @deprecated
*/
done(chunk) {
this.end(chunk);
}
}
exports.Parser = Parser;
//# sourceMappingURL=Parser.js.map
@@ -0,0 +1,59 @@
'use strict';
// Note: we can't get significant speed boost here.
// So write code to minimize size - no pregenerated tables
// and array tools dependencies.
// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment in the product documentation would be
// appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.
// Use ordinary array, since untyped makes no boost here
const makeTable = () => {
let c, table = [];
for (var n = 0; n < 256; n++) {
c = n;
for (var k = 0; k < 8; k++) {
c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
}
table[n] = c;
}
return table;
};
// Create table on load. Just 255 signed longs. Not a problem.
const crcTable = new Uint32Array(makeTable());
const crc32 = (crc, buf, len, pos) => {
const t = crcTable;
const end = pos + len;
crc ^= -1;
for (let i = pos; i < end; i++) {
crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
}
return (crc ^ (-1)); // >>> 0;
};
module.exports = crc32;
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,gBAAU,CAAC;AAC3C","sources":["packages/@react-aria/overlays/intl/hu-HU.json"],"sourcesContent":["{\n \"dismiss\": \"Elutasítás\"\n}\n"],"names":[],"version":3,"file":"hu-HU.module.js.map"}
@@ -0,0 +1,11 @@
import { TypeBoxError } from '../../type/error/index.mjs';
import type { TSchema } from '../../type/schema/index.mjs';
import type { Static } from '../../type/static/index.mjs';
export declare class ValueCheckUnknownTypeError extends TypeBoxError {
readonly schema: TSchema;
constructor(schema: TSchema);
}
/** Returns true if the value matches the given type. */
export declare function Check<T extends TSchema>(schema: T, references: TSchema[], value: unknown): value is Static<T>;
/** Returns true if the value matches the given type. */
export declare function Check<T extends TSchema>(schema: T, value: unknown): value is Static<T>;
@@ -0,0 +1,9 @@
import { MetadataName } from '../../metadata/models/MetadataName';
import { GetOptionsTagConstraint } from './GetOptionsTagConstraint';
export interface GetOptions {
autobind?: boolean;
name?: MetadataName;
optional?: boolean;
tag?: GetOptionsTagConstraint;
}
//# sourceMappingURL=GetOptions.d.ts.map
@@ -0,0 +1,3 @@
/*! For license information please see quill.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Quill=e():t.Quill=e()}(self,(function(){return function(){var t={9698:function(t,e,n){"use strict";n.d(e,{Ay:function(){return c},Ji:function(){return d},mG:function(){return h},zo:function(){return u}});var r=n(6003),i=n(5232),s=n.n(i),o=n(3036),l=n(4850),a=n(5508);class c extends r.BlockBlot{cache={};delta(){return null==this.cache.delta&&(this.cache.delta=h(this)),this.cache.delta}deleteAt(t,e){super.deleteAt(t,e),this.cache={}}formatAt(t,e,n,i){e<=0||(this.scroll.query(n,r.Scope.BLOCK)?t+e===this.length()&&this.format(n,i):super.formatAt(t,Math.min(e,this.length()-t-1),n,i),this.cache={})}insertAt(t,e,n){if(null!=n)return super.insertAt(t,e,n),void(this.cache={});if(0===e.length)return;const r=e.split("\n"),i=r.shift();i.length>0&&(t<this.length()-1||null==this.children.tail?super.insertAt(Math.min(t,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let s=this;r.reduce(((t,e)=>(s=s.split(t,!0),s.insertAt(0,e),e.length)),t+i.length)}insertBefore(t,e){const{head:n}=this.children;super.insertBefore(t,e),n instanceof o.A&&n.remove(),this.cache={}}length(){return null==this.cache.length&&(this.cache.length=super.length()+1),this.cache.length}moveChildren(t,e){super.moveChildren(t,e),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e&&(0===t||t>=this.length()-1)){const e=this.clone();return 0===t?(this.parent.insertBefore(e,this),this):(this.parent.insertBefore(e,this.next),e)}const n=super.split(t,e);return this.cache={},n}}c.blotName="block",c.tagName="P",c.defaultChild=o.A,c.allowedChildren=[o.A,l.A,r.EmbedBlot,a.A];class u extends r.EmbedBlot{attach(){super.attach(),this.attributes=new r.AttributorStore(this.domNode)}delta(){return(new(s())).insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,e){const n=this.scroll.query(t,r.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}formatAt(t,e,n,r){this.format(n,r)}insertAt(t,e,n){if(null!=n)return void super.insertAt(t,e,n);const r=e.split("\n"),i=r.pop(),s=r.map((t=>{const e=this.scroll.create(c.blotName);return e.insertAt(0,t),e})),o=this.split(t);s.forEach((t=>{this.parent.insertBefore(t,o)})),i&&this.parent.insertBefore(this.scroll.create("text",i),o)}}function h(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.descendants(r.LeafBlot).reduce(((t,n)=>0===n.length()?t:t.insert(n.value(),d(n,{},e))),new(s())).insert("\n",d(t))}function d(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return null==t?e:("formats"in t&&"function"==typeof t.formats&&(e={...e,...t.formats()},n&&delete e["code-token"]),null==t.parent||"scroll"===t.parent.statics.blotName||t.parent.statics.scope!==t.statics.scope?e:d(t.parent,e,n))}u.scope=r.Scope.BLOCK_BLOT},3036:function(t,e,n){"use strict";var r=n(6003);class i extends r.EmbedBlot{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}i.blotName="break",i.tagName="BR",e.A=i},580:function(t,e,n){"use strict";var r=n(6003);class i extends r.ContainerBlot{}e.A=i},4541:function(t,e,n){"use strict";var r=n(6003),i=n(5508);class s extends r.EmbedBlot{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\ufeff";static value(){}constructor(t,e,n){super(t,e),this.selection=n,this.textNode=document.createTextNode(s.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){null!=this.parent&&this.parent.removeChild(this)}format(t,e){if(0!==this.savedLength)return void super.format(t,e);let n=this,i=0;for(;null!=n&&n.statics.scope!==r.Scope.BLOCK_BLOT;)i+=n.offset(n.parent),n=n.parent;null!=n&&(this.savedLength=s.CONTENTS.length,n.optimize(),n.formatAt(i,s.CONTENTS.length,t,e),this.savedLength=0)}index(t,e){return t===this.textNode?0:super.index(t,e)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||null==this.parent)return null;const t=this.selection.getNativeRange();for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const e=this.prev instanceof i.A?this.prev:null,n=e?e.length():0,r=this.next instanceof i.A?this.next:null,o=r?r.text:"",{textNode:l}=this,a=l.data.split(s.CONTENTS).join("");let c;if(l.data=s.CONTENTS,e)c=e,(a||r)&&(e.insertAt(e.length(),a+o),r&&r.remove());else if(r)c=r,r.insertAt(0,a);else{const t=document.createTextNode(a);c=this.scroll.create(t),this.parent.insertBefore(c,this)}if(this.reLine truncated
//# sourceMappingURL=quill.js.map
@@ -0,0 +1,927 @@
import { NodeProp } from '@lezer/common';
let nextTagID = 0;
/**
Highlighting tags are markers that denote a highlighting category.
They are [associated](#highlight.styleTags) with parts of a syntax
tree by a language mode, and then mapped to an actual CSS style by
a [highlighter](#highlight.Highlighter).
Because syntax tree node types and highlight styles have to be
able to talk the same language, CodeMirror uses a mostly _closed_
[vocabulary](#highlight.tags) of syntax tags (as opposed to
traditional open string-based systems, which make it hard for
highlighting themes to cover all the tokens produced by the
various languages).
It _is_ possible to [define](#highlight.Tag^define) your own
highlighting tags for system-internal use (where you control both
the language package and the highlighter), but such tags will not
be picked up by regular highlighters (though you can derive them
from standard tags to allow highlighters to fall back to those).
*/
class Tag {
/**
@internal
*/
constructor(
/**
The optional name of the base tag @internal
*/
name,
/**
The set of this tag and all its parent tags, starting with
this one itself and sorted in order of decreasing specificity.
*/
set,
/**
The base unmodified tag that this one is based on, if it's
modified @internal
*/
base,
/**
The modifiers applied to this.base @internal
*/
modified) {
this.name = name;
this.set = set;
this.base = base;
this.modified = modified;
/**
@internal
*/
this.id = nextTagID++;
}
toString() {
let { name } = this;
for (let mod of this.modified)
if (mod.name)
name = `${mod.name}(${name})`;
return name;
}
static define(nameOrParent, parent) {
let name = typeof nameOrParent == "string" ? nameOrParent : "?";
if (nameOrParent instanceof Tag)
parent = nameOrParent;
if (parent === null || parent === void 0 ? void 0 : parent.base)
throw new Error("Can not derive from a modified tag");
let tag = new Tag(name, [], null, []);
tag.set.push(tag);
if (parent)
for (let t of parent.set)
tag.set.push(t);
return tag;
}
/**
Define a tag _modifier_, which is a function that, given a tag,
will return a tag that is a subtag of the original. Applying the
same modifier to a twice tag will return the same value (`m1(t1)
== m1(t1)`) and applying multiple modifiers will, regardless or
order, produce the same tag (`m1(m2(t1)) == m2(m1(t1))`).
When multiple modifiers are applied to a given base tag, each
smaller set of modifiers is registered as a parent, so that for
example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,
`m1(m3(t1)`, and so on.
*/
static defineModifier(name) {
let mod = new Modifier(name);
return (tag) => {
if (tag.modified.indexOf(mod) > -1)
return tag;
return Modifier.get(tag.base || tag, tag.modified.concat(mod).sort((a, b) => a.id - b.id));
};
}
}
let nextModifierID = 0;
class Modifier {
constructor(name) {
this.name = name;
this.instances = [];
this.id = nextModifierID++;
}
static get(base, mods) {
if (!mods.length)
return base;
let exists = mods[0].instances.find(t => t.base == base && sameArray(mods, t.modified));
if (exists)
return exists;
let set = [], tag = new Tag(base.name, set, base, mods);
for (let m of mods)
m.instances.push(tag);
let configs = powerSet(mods);
for (let parent of base.set)
if (!parent.modified.length)
for (let config of configs)
set.push(Modifier.get(parent, config));
return tag;
}
}
function sameArray(a, b) {
return a.length == b.length && a.every((x, i) => x == b[i]);
}
function powerSet(array) {
let sets = [[]];
for (let i = 0; i < array.length; i++) {
for (let j = 0, e = sets.length; j < e; j++) {
sets.push(sets[j].concat(array[i]));
}
}
return sets.sort((a, b) => b.length - a.length);
}
/**
This function is used to add a set of tags to a language syntax
via [`NodeSet.extend`](#common.NodeSet.extend) or
[`LRParser.configure`](#lr.LRParser.configure).
The argument object maps node selectors to [highlighting
tags](#highlight.Tag) or arrays of tags.
Node selectors may hold one or more (space-separated) node paths.
Such a path can be a [node name](#common.NodeType.name), or
multiple node names (or `*` wildcards) separated by slash
characters, as in `"Block/Declaration/VariableName"`. Such a path
matches the final node but only if its direct parent nodes are the
other nodes mentioned. A `*` in such a path matches any parent,
but only a single level—wildcards that match multiple parents
aren't supported, both for efficiency reasons and because Lezer
trees make it rather hard to reason about what they would match.)
A path can be ended with `/...` to indicate that the tag assigned
to the node should also apply to all child nodes, even if they
match their own style (by default, only the innermost style is
used).
When a path ends in `!`, as in `Attribute!`, no further matching
happens for the node's child nodes, and the entire node gets the
given style.
In this notation, node names that contain `/`, `!`, `*`, or `...`
must be quoted as JSON strings.
For example:
```javascript
parser.configure({props: [
styleTags({
// Style Number and BigNumber nodes
"Number BigNumber": tags.number,
// Style Escape nodes whose parent is String
"String/Escape": tags.escape,
// Style anything inside Attributes nodes
"Attributes!": tags.meta,
// Add a style to all content inside Italic nodes
"Italic/...": tags.emphasis,
// Style InvalidString nodes as both `string` and `invalid`
"InvalidString": [tags.string, tags.invalid],
// Style the node named "/" as punctuation
'"/"': tags.punctuation
})
]})
```
*/
function styleTags(spec) {
let byName = Object.create(null);
for (let prop in spec) {
let tags = spec[prop];
if (!Array.isArray(tags))
tags = [tags];
for (let part of prop.split(" "))
if (part) {
let pieces = [], mode = 2 /* Mode.Normal */, rest = part;
for (let pos = 0;;) {
if (rest == "..." && pos > 0 && pos + 3 == part.length) {
mode = 1 /* Mode.Inherit */;
break;
}
let m = /^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(rest);
if (!m)
throw new RangeError("Invalid path: " + part);
pieces.push(m[0] == "*" ? "" : m[0][0] == '"' ? JSON.parse(m[0]) : m[0]);
pos += m[0].length;
if (pos == part.length)
break;
let next = part[pos++];
if (pos == part.length && next == "!") {
mode = 0 /* Mode.Opaque */;
break;
}
if (next != "/")
throw new RangeError("Invalid path: " + part);
rest = part.slice(pos);
}
let last = pieces.length - 1, inner = pieces[last];
if (!inner)
throw new RangeError("Invalid path: " + part);
let rule = new Rule(tags, mode, last > 0 ? pieces.slice(0, last) : null);
byName[inner] = rule.sort(byName[inner]);
}
}
return ruleNodeProp.add(byName);
}
const ruleNodeProp = new NodeProp({
combine(a, b) {
let cur, root, take;
while (a || b) {
if (!a || b && a.depth >= b.depth) {
take = b;
b = b.next;
}
else {
take = a;
a = a.next;
}
if (cur && cur.mode == take.mode && !take.context && !cur.context)
continue;
let copy = new Rule(take.tags, take.mode, take.context);
if (cur)
cur.next = copy;
else
root = copy;
cur = copy;
}
return root;
}
});
class Rule {
constructor(tags, mode, context, next) {
this.tags = tags;
this.mode = mode;
this.context = context;
this.next = next;
}
get opaque() { return this.mode == 0 /* Mode.Opaque */; }
get inherit() { return this.mode == 1 /* Mode.Inherit */; }
sort(other) {
if (!other || other.depth < this.depth) {
this.next = other;
return this;
}
other.next = this.sort(other.next);
return other;
}
get depth() { return this.context ? this.context.length : 0; }
}
Rule.empty = new Rule([], 2 /* Mode.Normal */, null);
/**
Define a [highlighter](#highlight.Highlighter) from an array of
tag/class pairs. Classes associated with more specific tags will
take precedence.
*/
function tagHighlighter(tags, options) {
let map = Object.create(null);
for (let style of tags) {
if (!Array.isArray(style.tag))
map[style.tag.id] = style.class;
else
for (let tag of style.tag)
map[tag.id] = style.class;
}
let { scope, all = null } = options || {};
return {
style: (tags) => {
let cls = all;
for (let tag of tags) {
for (let sub of tag.set) {
let tagClass = map[sub.id];
if (tagClass) {
cls = cls ? cls + " " + tagClass : tagClass;
break;
}
}
}
return cls;
},
scope
};
}
function highlightTags(highlighters, tags) {
let result = null;
for (let highlighter of highlighters) {
let value = highlighter.style(tags);
if (value)
result = result ? result + " " + value : value;
}
return result;
}
/**
Highlight the given [tree](#common.Tree) with the given
[highlighter](#highlight.Highlighter). Often, the higher-level
[`highlightCode`](#highlight.highlightCode) function is easier to
use.
*/
function highlightTree(tree, highlighter,
/**
Assign styling to a region of the text. Will be called, in order
of position, for any ranges where more than zero classes apply.
`classes` is a space separated string of CSS classes.
*/
putStyle,
/**
The start of the range to highlight.
*/
from = 0,
/**
The end of the range.
*/
to = tree.length) {
let builder = new HighlightBuilder(from, Array.isArray(highlighter) ? highlighter : [highlighter], putStyle);
builder.highlightRange(tree.cursor(), from, to, "", builder.highlighters);
builder.flush(to);
}
/**
Highlight the given tree with the given highlighter, calling
`putText` for every piece of text, either with a set of classes or
with the empty string when unstyled, and `putBreak` for every line
break.
*/
function highlightCode(code, tree, highlighter, putText, putBreak, from = 0, to = code.length) {
let pos = from;
function writeTo(p, classes) {
if (p <= pos)
return;
for (let text = code.slice(pos, p), i = 0;;) {
let nextBreak = text.indexOf("\n", i);
let upto = nextBreak < 0 ? text.length : nextBreak;
if (upto > i)
putText(text.slice(i, upto), classes);
if (nextBreak < 0)
break;
putBreak();
i = nextBreak + 1;
}
pos = p;
}
highlightTree(tree, highlighter, (from, to, classes) => {
writeTo(from, "");
writeTo(to, classes);
}, from, to);
writeTo(to, "");
}
class HighlightBuilder {
constructor(at, highlighters, span) {
this.at = at;
this.highlighters = highlighters;
this.span = span;
this.class = "";
}
startSpan(at, cls) {
if (cls != this.class) {
this.flush(at);
if (at > this.at)
this.at = at;
this.class = cls;
}
}
flush(to) {
if (to > this.at && this.class)
this.span(this.at, to, this.class);
}
highlightRange(cursor, from, to, inheritedClass, highlighters) {
let { type, from: start, to: end } = cursor;
if (start >= to || end <= from)
return;
if (type.isTop)
highlighters = this.highlighters.filter(h => !h.scope || h.scope(type));
let cls = inheritedClass;
let rule = getStyleTags(cursor) || Rule.empty;
let tagCls = highlightTags(highlighters, rule.tags);
if (tagCls) {
if (cls)
cls += " ";
cls += tagCls;
if (rule.mode == 1 /* Mode.Inherit */)
inheritedClass += (inheritedClass ? " " : "") + tagCls;
}
this.startSpan(Math.max(from, start), cls);
if (rule.opaque)
return;
let mounted = cursor.tree && cursor.tree.prop(NodeProp.mounted);
if (mounted && mounted.overlay) {
let inner = cursor.node.enter(mounted.overlay[0].from + start, 1);
let innerHighlighters = this.highlighters.filter(h => !h.scope || h.scope(mounted.tree.type));
let hasChild = cursor.firstChild();
for (let i = 0, pos = start;; i++) {
let next = i < mounted.overlay.length ? mounted.overlay[i] : null;
let nextPos = next ? next.from + start : end;
let rangeFrom = Math.max(from, pos), rangeTo = Math.min(to, nextPos);
if (rangeFrom < rangeTo && hasChild) {
while (cursor.from < rangeTo) {
this.highlightRange(cursor, rangeFrom, rangeTo, inheritedClass, highlighters);
this.startSpan(Math.min(rangeTo, cursor.to), cls);
if (cursor.to >= nextPos || !cursor.nextSibling())
break;
}
}
if (!next || nextPos > to)
break;
pos = next.to + start;
if (pos > from) {
this.highlightRange(inner.cursor(), Math.max(from, next.from + start), Math.min(to, pos), "", innerHighlighters);
this.startSpan(Math.min(to, pos), cls);
}
}
if (hasChild)
cursor.parent();
}
else if (cursor.firstChild()) {
if (mounted)
inheritedClass = "";
do {
if (cursor.to <= from)
continue;
if (cursor.from >= to)
break;
this.highlightRange(cursor, from, to, inheritedClass, highlighters);
this.startSpan(Math.min(to, cursor.to), cls);
} while (cursor.nextSibling());
cursor.parent();
}
}
}
/**
Match a syntax node's [highlight rules](#highlight.styleTags). If
there's a match, return its set of tags, and whether it is
opaque (uses a `!`) or applies to all child nodes (`/...`).
*/
function getStyleTags(node) {
let rule = node.type.prop(ruleNodeProp);
while (rule && rule.context && !node.matchContext(rule.context))
rule = rule.next;
return rule || null;
}
const t = Tag.define;
const comment = t(), name = t(), typeName = t(name), propertyName = t(name), literal = t(), string = t(literal), number = t(literal), content = t(), heading = t(content), keyword = t(), operator = t(), punctuation = t(), bracket = t(punctuation), meta = t();
/**
The default set of highlighting [tags](#highlight.Tag).
This collection is heavily biased towards programming languages,
and necessarily incomplete. A full ontology of syntactic
constructs would fill a stack of books, and be impractical to
write themes for. So try to make do with this set. If all else
fails, [open an
issue](https://github.com/codemirror/codemirror.next) to propose a
new tag, or [define](#highlight.Tag^define) a local custom tag for
your use case.
Note that it is not obligatory to always attach the most specific
tag possible to an element—if your grammar can't easily
distinguish a certain type of element (such as a local variable),
it is okay to style it as its more general variant (a variable).
For tags that extend some parent tag, the documentation links to
the parent.
*/
const tags = {
/**
A comment.
*/
comment,
/**
A line [comment](#highlight.tags.comment).
*/
lineComment: t(comment),
/**
A block [comment](#highlight.tags.comment).
*/
blockComment: t(comment),
/**
A documentation [comment](#highlight.tags.comment).
*/
docComment: t(comment),
/**
Any kind of identifier.
*/
name,
/**
The [name](#highlight.tags.name) of a variable.
*/
variableName: t(name),
/**
A type [name](#highlight.tags.name).
*/
typeName: typeName,
/**
A tag name (subtag of [`typeName`](#highlight.tags.typeName)).
*/
tagName: t(typeName),
/**
A property or field [name](#highlight.tags.name).
*/
propertyName: propertyName,
/**
An attribute name (subtag of [`propertyName`](#highlight.tags.propertyName)).
*/
attributeName: t(propertyName),
/**
The [name](#highlight.tags.name) of a class.
*/
className: t(name),
/**
A label [name](#highlight.tags.name).
*/
labelName: t(name),
/**
A namespace [name](#highlight.tags.name).
*/
namespace: t(name),
/**
The [name](#highlight.tags.name) of a macro.
*/
macroName: t(name),
/**
A literal value.
*/
literal,
/**
A string [literal](#highlight.tags.literal).
*/
string,
/**
A documentation [string](#highlight.tags.string).
*/
docString: t(string),
/**
A character literal (subtag of [string](#highlight.tags.string)).
*/
character: t(string),
/**
An attribute value (subtag of [string](#highlight.tags.string)).
*/
attributeValue: t(string),
/**
A number [literal](#highlight.tags.literal).
*/
number,
/**
An integer [number](#highlight.tags.number) literal.
*/
integer: t(number),
/**
A floating-point [number](#highlight.tags.number) literal.
*/
float: t(number),
/**
A boolean [literal](#highlight.tags.literal).
*/
bool: t(literal),
/**
Regular expression [literal](#highlight.tags.literal).
*/
regexp: t(literal),
/**
An escape [literal](#highlight.tags.literal), for example a
backslash escape in a string.
*/
escape: t(literal),
/**
A color [literal](#highlight.tags.literal).
*/
color: t(literal),
/**
A URL [literal](#highlight.tags.literal).
*/
url: t(literal),
/**
A language keyword.
*/
keyword,
/**
The [keyword](#highlight.tags.keyword) for the self or this
object.
*/
self: t(keyword),
/**
The [keyword](#highlight.tags.keyword) for null.
*/
null: t(keyword),
/**
A [keyword](#highlight.tags.keyword) denoting some atomic value.
*/
atom: t(keyword),
/**
A [keyword](#highlight.tags.keyword) that represents a unit.
*/
unit: t(keyword),
/**
A modifier [keyword](#highlight.tags.keyword).
*/
modifier: t(keyword),
/**
A [keyword](#highlight.tags.keyword) that acts as an operator.
*/
operatorKeyword: t(keyword),
/**
A control-flow related [keyword](#highlight.tags.keyword).
*/
controlKeyword: t(keyword),
/**
A [keyword](#highlight.tags.keyword) that defines something.
*/
definitionKeyword: t(keyword),
/**
A [keyword](#highlight.tags.keyword) related to defining or
interfacing with modules.
*/
moduleKeyword: t(keyword),
/**
An operator.
*/
operator,
/**
An [operator](#highlight.tags.operator) that dereferences something.
*/
derefOperator: t(operator),
/**
Arithmetic-related [operator](#highlight.tags.operator).
*/
arithmeticOperator: t(operator),
/**
Logical [operator](#highlight.tags.operator).
*/
logicOperator: t(operator),
/**
Bit [operator](#highlight.tags.operator).
*/
bitwiseOperator: t(operator),
/**
Comparison [operator](#highlight.tags.operator).
*/
compareOperator: t(operator),
/**
[Operator](#highlight.tags.operator) that updates its operand.
*/
updateOperator: t(operator),
/**
[Operator](#highlight.tags.operator) that defines something.
*/
definitionOperator: t(operator),
/**
Type-related [operator](#highlight.tags.operator).
*/
typeOperator: t(operator),
/**
Control-flow [operator](#highlight.tags.operator).
*/
controlOperator: t(operator),
/**
Program or markup punctuation.
*/
punctuation,
/**
[Punctuation](#highlight.tags.punctuation) that separates
things.
*/
separator: t(punctuation),
/**
Bracket-style [punctuation](#highlight.tags.punctuation).
*/
bracket,
/**
Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`
tokens).
*/
angleBracket: t(bracket),
/**
Square [brackets](#highlight.tags.bracket) (usually `[` and `]`
tokens).
*/
squareBracket: t(bracket),
/**
Parentheses (usually `(` and `)` tokens). Subtag of
[bracket](#highlight.tags.bracket).
*/
paren: t(bracket),
/**
Braces (usually `{` and `}` tokens). Subtag of
[bracket](#highlight.tags.bracket).
*/
brace: t(bracket),
/**
Content, for example plain text in XML or markup documents.
*/
content,
/**
[Content](#highlight.tags.content) that represents a heading.
*/
heading,
/**
A level 1 [heading](#highlight.tags.heading).
*/
heading1: t(heading),
/**
A level 2 [heading](#highlight.tags.heading).
*/
heading2: t(heading),
/**
A level 3 [heading](#highlight.tags.heading).
*/
heading3: t(heading),
/**
A level 4 [heading](#highlight.tags.heading).
*/
heading4: t(heading),
/**
A level 5 [heading](#highlight.tags.heading).
*/
heading5: t(heading),
/**
A level 6 [heading](#highlight.tags.heading).
*/
heading6: t(heading),
/**
A prose [content](#highlight.tags.content) separator (such as a horizontal rule).
*/
contentSeparator: t(content),
/**
[Content](#highlight.tags.content) that represents a list.
*/
list: t(content),
/**
[Content](#highlight.tags.content) that represents a quote.
*/
quote: t(content),
/**
[Content](#highlight.tags.content) that is emphasized.
*/
emphasis: t(content),
/**
[Content](#highlight.tags.content) that is styled strong.
*/
strong: t(content),
/**
[Content](#highlight.tags.content) that is part of a link.
*/
link: t(content),
/**
[Content](#highlight.tags.content) that is styled as code or
monospace.
*/
monospace: t(content),
/**
[Content](#highlight.tags.content) that has a strike-through
style.
*/
strikethrough: t(content),
/**
Inserted text in a change-tracking format.
*/
inserted: t(),
/**
Deleted text.
*/
deleted: t(),
/**
Changed text.
*/
changed: t(),
/**
An invalid or unsyntactic element.
*/
invalid: t(),
/**
Metadata or meta-instruction.
*/
meta,
/**
[Metadata](#highlight.tags.meta) that applies to the entire
document.
*/
documentMeta: t(meta),
/**
[Metadata](#highlight.tags.meta) that annotates or adds
attributes to a given syntactic element.
*/
annotation: t(meta),
/**
Processing instruction or preprocessor directive. Subtag of
[meta](#highlight.tags.meta).
*/
processingInstruction: t(meta),
/**
[Modifier](#highlight.Tag^defineModifier) that indicates that a
given element is being defined. Expected to be used with the
various [name](#highlight.tags.name) tags.
*/
definition: Tag.defineModifier("definition"),
/**
[Modifier](#highlight.Tag^defineModifier) that indicates that
something is constant. Mostly expected to be used with
[variable names](#highlight.tags.variableName).
*/
constant: Tag.defineModifier("constant"),
/**
[Modifier](#highlight.Tag^defineModifier) used to indicate that
a [variable](#highlight.tags.variableName) or [property
name](#highlight.tags.propertyName) is being called or defined
as a function.
*/
function: Tag.defineModifier("function"),
/**
[Modifier](#highlight.Tag^defineModifier) that can be applied to
[names](#highlight.tags.name) to indicate that they belong to
the language's standard environment.
*/
standard: Tag.defineModifier("standard"),
/**
[Modifier](#highlight.Tag^defineModifier) that indicates a given
[names](#highlight.tags.name) is local to some scope.
*/
local: Tag.defineModifier("local"),
/**
A generic variant [modifier](#highlight.Tag^defineModifier) that
can be used to tag language-specific alternative variants of
some common tag. It is recommended for themes to define special
forms of at least the [string](#highlight.tags.string) and
[variable name](#highlight.tags.variableName) tags, since those
come up a lot.
*/
special: Tag.defineModifier("special")
};
for (let name in tags) {
let val = tags[name];
if (val instanceof Tag)
val.name = name;
}
/**
This is a highlighter that adds stable, predictable classes to
tokens, for styling with external CSS.
The following tags are mapped to their name prefixed with `"tok-"`
(for example `"tok-comment"`):
* [`link`](#highlight.tags.link)
* [`heading`](#highlight.tags.heading)
* [`emphasis`](#highlight.tags.emphasis)
* [`strong`](#highlight.tags.strong)
* [`keyword`](#highlight.tags.keyword)
* [`atom`](#highlight.tags.atom)
* [`bool`](#highlight.tags.bool)
* [`url`](#highlight.tags.url)
* [`labelName`](#highlight.tags.labelName)
* [`inserted`](#highlight.tags.inserted)
* [`deleted`](#highlight.tags.deleted)
* [`literal`](#highlight.tags.literal)
* [`string`](#highlight.tags.string)
* [`number`](#highlight.tags.number)
* [`variableName`](#highlight.tags.variableName)
* [`typeName`](#highlight.tags.typeName)
* [`namespace`](#highlight.tags.namespace)
* [`className`](#highlight.tags.className)
* [`macroName`](#highlight.tags.macroName)
* [`propertyName`](#highlight.tags.propertyName)
* [`operator`](#highlight.tags.operator)
* [`comment`](#highlight.tags.comment)
* [`meta`](#highlight.tags.meta)
* [`punctuation`](#highlight.tags.punctuation)
* [`invalid`](#highlight.tags.invalid)
In addition, these mappings are provided:
* [`regexp`](#highlight.tags.regexp),
[`escape`](#highlight.tags.escape), and
[`special`](#highlight.tags.special)[`(string)`](#highlight.tags.string)
are mapped to `"tok-string2"`
* [`special`](#highlight.tags.special)[`(variableName)`](#highlight.tags.variableName)
to `"tok-variableName2"`
* [`local`](#highlight.tags.local)[`(variableName)`](#highlight.tags.variableName)
to `"tok-variableName tok-local"`
* [`definition`](#highlight.tags.definition)[`(variableName)`](#highlight.tags.variableName)
to `"tok-variableName tok-definition"`
* [`definition`](#highlight.tags.definition)[`(propertyName)`](#highlight.tags.propertyName)
to `"tok-propertyName tok-definition"`
*/
const classHighlighter = tagHighlighter([
{ tag: tags.link, class: "tok-link" },
{ tag: tags.heading, class: "tok-heading" },
{ tag: tags.emphasis, class: "tok-emphasis" },
{ tag: tags.strong, class: "tok-strong" },
{ tag: tags.keyword, class: "tok-keyword" },
{ tag: tags.atom, class: "tok-atom" },
{ tag: tags.bool, class: "tok-bool" },
{ tag: tags.url, class: "tok-url" },
{ tag: tags.labelName, class: "tok-labelName" },
{ tag: tags.inserted, class: "tok-inserted" },
{ tag: tags.deleted, class: "tok-deleted" },
{ tag: tags.literal, class: "tok-literal" },
{ tag: tags.string, class: "tok-string" },
{ tag: tags.number, class: "tok-number" },
{ tag: [tags.regexp, tags.escape, tags.special(tags.string)], class: "tok-string2" },
{ tag: tags.variableName, class: "tok-variableName" },
{ tag: tags.local(tags.variableName), class: "tok-variableName tok-local" },
{ tag: tags.definition(tags.variableName), class: "tok-variableName tok-definition" },
{ tag: tags.special(tags.variableName), class: "tok-variableName2" },
{ tag: tags.definition(tags.propertyName), class: "tok-propertyName tok-definition" },
{ tag: tags.typeName, class: "tok-typeName" },
{ tag: tags.namespace, class: "tok-namespace" },
{ tag: tags.className, class: "tok-className" },
{ tag: tags.macroName, class: "tok-macroName" },
{ tag: tags.propertyName, class: "tok-propertyName" },
{ tag: tags.operator, class: "tok-operator" },
{ tag: tags.comment, class: "tok-comment" },
{ tag: tags.meta, class: "tok-meta" },
{ tag: tags.invalid, class: "tok-invalid" },
{ tag: tags.punctuation, class: "tok-punctuation" }
]);
export { Tag, classHighlighter, getStyleTags, highlightCode, highlightTree, styleTags, tagHighlighter, tags };
@@ -0,0 +1,13 @@
import { animations } from '../../../motion/features/animations.mjs';
import { drag } from '../../../motion/features/drag.mjs';
import { gestureAnimations } from '../../../motion/features/gestures.mjs';
import { layout } from '../../../motion/features/layout.mjs';
const featureBundle = {
...animations,
...gestureAnimations,
...drag,
...layout,
};
export { featureBundle };
@@ -0,0 +1,412 @@
export default `flf2a$ 4 4 20 1 2
serifcap by Bruce M. Binder
$$@
$$@
$$@
$$@@
_ @
/ \\@
\\_/@
(_)@@
_ _ @
(_(_)@
@
@@
@
@
@
@@
@
@
@
@@
_ _ @
(_)/ ) @
/ /_ @
(_/(_)@@
___ @
( __) @
/ _) )@
\\___/ @@
_ @
/_)@
@
@@
_ @
/ )@
( ( @
\\_)@@
_ @
( \\ @
) )@
(_/ @@
@
@
@
@@
_ @
_( )_ @
(_ _)@
(_) @@
@
@
_ @
/_)@@
@
___ @
(___)@
@@
@
@
_ @
(_)@@
_ @
/ )@
/ / @
(_/ @@
__ @
/ \\ @
( () )@
\\__/ @@
__ @
( )@
)( @
(__)@@
___ @
(__ \\@
/ __/@
\\___)@@
___ @
(__ )@
(_ \\@
(___/@@
__ @
/ ,) @
(_ _)@
(_) @@
___ @
/ __)@
\\__ \\@
(___/@@
_ @
/ ) @
/ , \\@
\\___/@@
___ @
(__ )@
/ / @
(_/ @@
___ @
( , )@
/ , \\@
\\___/@@
___ @
/ , \\@
\\ /@
(_/ @@
_ @
(_)@
_ @
(_)@@
_ @
(_)@
_ @
/_)@@
_ @
/ )@
( ( @
\\_)@@
___ @
(___)@
___ @
(___)@@
_ @
( \\ @
) )@
(_/ @@
___ @
(__ )@
(_/ @
(_) @@
@
@
@
@@
__ @
( ) @
/__\\ @
(_)(_)@@
___ @
( ,)@
) ,\\@
(___/@@
__ @
/ _)@
( (_ @
\\__)@@
___ @
( \\ @
) ) )@
(___/ @@
___ @
( _)@
) _)@
(___)@@
___ @
( _)@
) _)@
(_) @@
__ @
/ _)@
( (/\\@
\\__/@@
_ _ @
( )( )@
)__( @
(_)(_)@@
__ @
( )@
)( @
(__)@@
__ @
( )@
__)( @
(___/ @@
_ _ @
( ) ) @
) \\ @
(_)\\_)@@
__ @
( ) @
)(__ @
(____)@@
__ __ @
( \\/ )@
) ( @
(_/\\/\\_)@@
_ _ @
( \\( )@
) ( @
(_)\\_)@@
__ @
/ \\ @
( () )@
\\__/ @@
___ @
( ,\\@
) _/@
(_) @@
__ @
/ \\ @
( () )@
\\___\\@@
___ @
( ,) @
) \\ @
(_)\\_)@@
___ @
/ __)@
\\__ \\@
(___/@@
____ @
(_ _)@
)( @
(__) @@
_ _ @
( )( )@
)()( @
\\__/ @@
_ _ @
( )( )@
\\\\// @
(__) @@
_ _ @
( \\/\\/ )@
\\ / @
\\/\\/ @@
_ _ @
( \\/ )@
) ( @
(_/\\_)@@
_ _ @
( \\/ )@
\\ / @
(__/ @@
___ @
(_ )@
/ / @
(___)@@
@
@
@
@@
_ @
( \\ @
\\ \\ @
\\_)@@
@
@
@
@@
__ @
/ \\ @
(_/\\_)@
@@
@
@
___ @
(___)@@
_ @
(_\\@
@
@@
__ @
( ) @
/__\\ @
(_)(_)@@
___ @
( ,)@
) ,\\@
(___/@@
__ @
/ _)@
( (_ @
\\__)@@
___ @
( \\ @
) ) )@
(___/ @@
___ @
( _)@
) _)@
(___)@@
___ @
( _)@
) _)@
(_) @@
__ @
/ _)@
( (/\\@
\\__/@@
_ _ @
( )( )@
)__( @
(_)(_)@@
__ @
( )@
)( @
(__)@@
__ @
( )@
__)( @
(___/ @@
_ _ @
( ) ) @
) \\ @
(_)\\_)@@
__ @
( ) @
)(__ @
(____)@@
__ __ @
( \\/ )@
) ( @
(_/\\/\\_)@@
_ _ @
( \\( )@
) ( @
(_)\\_)@@
__ @
/ \\ @
( () )@
\\__/ @@
___ @
( ,\\@
) _/@
(_) @@
__ @
/ \\ @
( () )@
\\___\\@@
___ @
( ,) @
) \\ @
(_)\\_)@@
___ @
/ __)@
\\__ \\@
(___/@@
____ @
(_ _)@
)( @
(__) @@
_ _ @
( )( )@
)()( @
\\__/ @@
_ _ @
( )( )@
\\\\// @
(__) @@
_ _ @
( \\/\\/ )@
\\ / @
\\/\\/ @@
_ _ @
( \\/ )@
) ( @
(_/\\_)@@
_ _ @
( \\/ )@
\\ / @
(__/ @@
___ @
(_ )@
/ / @
(___)@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
`
@@ -0,0 +1 @@
{"version":3,"file":"image.js","names":["EmbedBlot","sanitize","ATTRIBUTES","Image","blotName","tagName","create","value","node","setAttribute","formats","domNode","reduce","attribute","hasAttribute","getAttribute","match","url","test","format","name","indexOf","removeAttribute"],"sources":["../../src/formats/image.ts"],"sourcesContent":["import { EmbedBlot } from 'parchment';\nimport { sanitize } from './link.js';\n\nconst ATTRIBUTES = ['alt', 'height', 'width'];\n\nclass Image extends EmbedBlot {\n static blotName = 'image';\n static tagName = 'IMG';\n\n static create(value: string) {\n const node = super.create(value) as Element;\n if (typeof value === 'string') {\n node.setAttribute('src', this.sanitize(value));\n }\n return node;\n }\n\n static formats(domNode: Element) {\n return ATTRIBUTES.reduce(\n (formats: Record<string, string | null>, attribute) => {\n if (domNode.hasAttribute(attribute)) {\n formats[attribute] = domNode.getAttribute(attribute);\n }\n return formats;\n },\n {},\n );\n }\n\n static match(url: string) {\n return /\\.(jpe?g|gif|png)$/.test(url) || /^data:image\\/.+;base64/.test(url);\n }\n\n static sanitize(url: string) {\n return sanitize(url, ['http', 'https', 'data']) ? url : '//:0';\n }\n\n static value(domNode: Element) {\n return domNode.getAttribute('src');\n }\n\n domNode: HTMLImageElement;\n\n format(name: string, value: string) {\n if (ATTRIBUTES.indexOf(name) > -1) {\n if (value) {\n this.domNode.setAttribute(name, value);\n } else {\n this.domNode.removeAttribute(name);\n }\n } else {\n super.format(name, value);\n }\n }\n}\n\nexport default Image;\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,WAAW;AACrC,SAASC,QAAQ,QAAQ,WAAW;AAEpC,MAAMC,UAAU,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC;AAE7C,MAAMC,KAAK,SAASH,SAAS,CAAC;EAC5B,OAAOI,QAAQ,GAAG,OAAO;EACzB,OAAOC,OAAO,GAAG,KAAK;EAEtB,OAAOC,MAAMA,CAACC,KAAa,EAAE;IAC3B,MAAMC,IAAI,GAAG,KAAK,CAACF,MAAM,CAACC,KAAK,CAAY;IAC3C,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;MAC7BC,IAAI,CAACC,YAAY,CAAC,KAAK,EAAE,IAAI,CAACR,QAAQ,CAACM,KAAK,CAAC,CAAC;IAChD;IACA,OAAOC,IAAI;EACb;EAEA,OAAOE,OAAOA,CAACC,OAAgB,EAAE;IAC/B,OAAOT,UAAU,CAACU,MAAM,CACtB,CAACF,OAAsC,EAAEG,SAAS,KAAK;MACrD,IAAIF,OAAO,CAACG,YAAY,CAACD,SAAS,CAAC,EAAE;QACnCH,OAAO,CAACG,SAAS,CAAC,GAAGF,OAAO,CAACI,YAAY,CAACF,SAAS,CAAC;MACtD;MACA,OAAOH,OAAO;IAChB,CAAC,EACD,CAAC,CACH,CAAC;EACH;EAEA,OAAOM,KAAKA,CAACC,GAAW,EAAE;IACxB,OAAO,oBAAoB,CAACC,IAAI,CAACD,GAAG,CAAC,IAAI,wBAAwB,CAACC,IAAI,CAACD,GAAG,CAAC;EAC7E;EAEA,OAAOhB,QAAQA,CAACgB,GAAW,EAAE;IAC3B,OAAOhB,QAAQ,CAACgB,GAAG,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,GAAGA,GAAG,GAAG,MAAM;EAChE;EAEA,OAAOV,KAAKA,CAACI,OAAgB,EAAE;IAC7B,OAAOA,OAAO,CAACI,YAAY,CAAC,KAAK,CAAC;EACpC;EAIAI,MAAMA,CAACC,IAAY,EAAEb,KAAa,EAAE;IAClC,IAAIL,UAAU,CAACmB,OAAO,CAACD,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE;MACjC,IAAIb,KAAK,EAAE;QACT,IAAI,CAACI,OAAO,CAACF,YAAY,CAACW,IAAI,EAAEb,KAAK,CAAC;MACxC,CAAC,MAAM;QACL,IAAI,CAACI,OAAO,CAACW,eAAe,CAACF,IAAI,CAAC;MACpC;IACF,CAAC,MAAM;MACL,KAAK,CAACD,MAAM,CAACC,IAAI,EAAEb,KAAK,CAAC;IAC3B;EACF;AACF;AAEA,eAAeJ,KAAK","ignoreList":[]}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","16":"C"},C:{"1":"0 1 2 3 4 5 9 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 xC TC J ZB K D E F A B C L M G N O P aB 0C 1C"},D:{"1":"0 1 2 3 4 5 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB"},E:{"1":"D E F A B C L M G 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB 2C ZC 3C","16":"K"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F B C FD GD HD ID NC uC JD OC"},G:{"1":"E ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC LD MD"},H:{"2":"hD"},I:{"1":"I mD nD","2":"TC J iD jD kD lD vC"},J:{"1":"A","2":"D"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"ChildNode.remove()",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["find.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,6BATW,MAAM,SAGN,MAAM,GAGJ,IAAI,CAqChB;4BA3EwB,sBAAsB;qBAI5B,gBAAgB"}
@@ -0,0 +1,10 @@
import { TypeMap } from "./index";
export default class Mime {
constructor(mimes: TypeMap);
lookup(path: string, fallback?: string): string;
extension(mime: string): string | undefined;
load(filepath: string): void;
define(mimes: TypeMap): void;
}
@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./lib/picomatch');
@@ -0,0 +1,46 @@
import { IsObject, IsDate, IsArray, IsTypedArray, IsValueType } from '../guard/index.mjs';
// ------------------------------------------------------------------
// Equality Checks
// ------------------------------------------------------------------
function ObjectType(left, right) {
if (!IsObject(right))
return false;
const leftKeys = [...Object.keys(left), ...Object.getOwnPropertySymbols(left)];
const rightKeys = [...Object.keys(right), ...Object.getOwnPropertySymbols(right)];
if (leftKeys.length !== rightKeys.length)
return false;
return leftKeys.every((key) => Equal(left[key], right[key]));
}
function DateType(left, right) {
return IsDate(right) && left.getTime() === right.getTime();
}
function ArrayType(left, right) {
if (!IsArray(right) || left.length !== right.length)
return false;
return left.every((value, index) => Equal(value, right[index]));
}
function TypedArrayType(left, right) {
if (!IsTypedArray(right) || left.length !== right.length || Object.getPrototypeOf(left).constructor.name !== Object.getPrototypeOf(right).constructor.name)
return false;
return left.every((value, index) => Equal(value, right[index]));
}
function ValueType(left, right) {
return left === right;
}
// ------------------------------------------------------------------
// Equal
// ------------------------------------------------------------------
/** Returns true if the left value deep-equals the right */
export function Equal(left, right) {
if (IsDate(left))
return DateType(left, right);
if (IsTypedArray(left))
return TypedArrayType(left, right);
if (IsArray(left))
return ArrayType(left, right);
if (IsObject(left))
return ObjectType(left, right);
if (IsValueType(left))
return ValueType(left, right);
throw new Error('ValueEquals: Unable to compare value');
}
@@ -0,0 +1,103 @@
// 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 AGENT_H
#define AGENT_H
#include <windows.h>
#include <stdint.h>
#include <memory>
#include <string>
#include "DsrSender.h"
#include "EventLoop.h"
#include "Win32Console.h"
class ConsoleInput;
class NamedPipe;
class ReadBuffer;
class Scraper;
class WriteBuffer;
class Win32ConsoleBuffer;
class Agent : public EventLoop, public DsrSender
{
public:
Agent(LPCWSTR controlPipeName,
uint64_t agentFlags,
int mouseMode,
int initialCols,
int initialRows);
virtual ~Agent();
void sendDsr() override;
private:
NamedPipe &connectToControlPipe(LPCWSTR pipeName);
NamedPipe &createDataServerPipe(bool write, const wchar_t *kind);
private:
void pollControlPipe();
void handlePacket(ReadBuffer &packet);
void writePacket(WriteBuffer &packet);
void handleStartProcessPacket(ReadBuffer &packet);
void handleSetSizePacket(ReadBuffer &packet);
void handleGetConsoleProcessListPacket(ReadBuffer &packet);
void pollConinPipe();
protected:
virtual void onPollTimeout() override;
virtual void onPipeIo(NamedPipe &namedPipe) override;
private:
void autoClosePipesForShutdown();
std::unique_ptr<Win32ConsoleBuffer> openPrimaryBuffer();
void resizeWindow(int cols, int rows);
void scrapeBuffers();
void syncConsoleTitle();
private:
const bool m_useConerr;
const bool m_plainMode;
const int m_mouseMode;
Win32Console m_console;
std::unique_ptr<Scraper> m_primaryScraper;
std::unique_ptr<Scraper> m_errorScraper;
std::unique_ptr<Win32ConsoleBuffer> m_errorBuffer;
NamedPipe *m_controlPipe = nullptr;
NamedPipe *m_coninPipe = nullptr;
NamedPipe *m_conoutPipe = nullptr;
NamedPipe *m_conerrPipe = nullptr;
bool m_autoShutdown = false;
bool m_exitAfterShutdown = false;
bool m_closingOutputPipes = false;
std::unique_ptr<ConsoleInput> m_consoleInput;
HANDLE m_childProcess = nullptr;
// If the title is initialized to the empty string, then cmd.exe will
// sometimes print this error:
// Not enough storage is available to process this command.
// It happens on Windows 7 when logged into a Cygwin SSH session, for
// example. Using a title of a single space character avoids the problem.
// See https://github.com/rprichard/winpty/issues/74.
std::wstring m_currentTitle = L" ";
};
#endif // AGENT_H
@@ -0,0 +1 @@
{"version":3,"file":"cursor.js","names":["EmbedBlot","Scope","TextBlot","Cursor","blotName","className","tagName","CONTENTS","value","undefined","constructor","scroll","domNode","selection","textNode","document","createTextNode","appendChild","savedLength","detach","parent","removeChild","format","name","target","index","statics","scope","BLOCK_BLOT","offset","length","optimize","formatAt","node","position","data","remove","restore","composing","range","getNativeRange","lastChild","parentNode","insertBefore","prevTextBlot","prev","prevTextLength","nextTextBlot","next","nextText","text","newText","split","join","mergedTextBlot","insertAt","newTextNode","create","remapOffset","start","end","startNode","startOffset","endNode","endOffset","update","mutations","context","some","mutation","type","isolate","unwrap"],"sources":["../../src/blots/cursor.ts"],"sourcesContent":["import { EmbedBlot, Scope } from 'parchment';\nimport type { Parent, ScrollBlot } from 'parchment';\nimport type Selection from '../core/selection.js';\nimport TextBlot from './text.js';\nimport type { EmbedContextRange } from './embed.js';\n\nclass Cursor extends EmbedBlot {\n static blotName = 'cursor';\n static className = 'ql-cursor';\n static tagName = 'span';\n static CONTENTS = '\\uFEFF'; // Zero width no break space\n\n static value() {\n return undefined;\n }\n\n selection: Selection;\n textNode: Text;\n savedLength: number;\n\n constructor(scroll: ScrollBlot, domNode: HTMLElement, selection: Selection) {\n super(scroll, domNode);\n this.selection = selection;\n this.textNode = document.createTextNode(Cursor.CONTENTS);\n this.domNode.appendChild(this.textNode);\n this.savedLength = 0;\n }\n\n detach() {\n // super.detach() will also clear domNode.__blot\n if (this.parent != null) this.parent.removeChild(this);\n }\n\n format(name: string, value: unknown) {\n if (this.savedLength !== 0) {\n super.format(name, value);\n return;\n }\n // TODO: Fix this next time the file is edited.\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let target: Parent | this = this;\n let index = 0;\n while (target != null && target.statics.scope !== Scope.BLOCK_BLOT) {\n index += target.offset(target.parent);\n target = target.parent;\n }\n if (target != null) {\n this.savedLength = Cursor.CONTENTS.length;\n // @ts-expect-error TODO: allow empty context in Parchment\n target.optimize();\n target.formatAt(index, Cursor.CONTENTS.length, name, value);\n this.savedLength = 0;\n }\n }\n\n index(node: Node, offset: number) {\n if (node === this.textNode) return 0;\n return super.index(node, offset);\n }\n\n length() {\n return this.savedLength;\n }\n\n position(): [Text, number] {\n return [this.textNode, this.textNode.data.length];\n }\n\n remove() {\n super.remove();\n // @ts-expect-error Fix me later\n this.parent = null;\n }\n\n restore(): EmbedContextRange | null {\n if (this.selection.composing || this.parent == null) return null;\n const range = this.selection.getNativeRange();\n // Browser may push down styles/nodes inside the cursor blot.\n // https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#push-down-values\n while (\n this.domNode.lastChild != null &&\n this.domNode.lastChild !== this.textNode\n ) {\n // @ts-expect-error Fix me later\n this.domNode.parentNode.insertBefore(\n this.domNode.lastChild,\n this.domNode,\n );\n }\n\n const prevTextBlot = this.prev instanceof TextBlot ? this.prev : null;\n const prevTextLength = prevTextBlot ? prevTextBlot.length() : 0;\n const nextTextBlot = this.next instanceof TextBlot ? this.next : null;\n // @ts-expect-error TODO: make TextBlot.text public\n const nextText = nextTextBlot ? nextTextBlot.text : '';\n const { textNode } = this;\n // take text from inside this blot and reset it\n const newText = textNode.data.split(Cursor.CONTENTS).join('');\n textNode.data = Cursor.CONTENTS;\n\n // proactively merge TextBlots around cursor so that optimization\n // doesn't lose the cursor. the reason we are here in cursor.restore\n // could be that the user clicked in prevTextBlot or nextTextBlot, or\n // the user typed something.\n let mergedTextBlot;\n if (prevTextBlot) {\n mergedTextBlot = prevTextBlot;\n if (newText || nextTextBlot) {\n prevTextBlot.insertAt(prevTextBlot.length(), newText + nextText);\n if (nextTextBlot) {\n nextTextBlot.remove();\n }\n }\n } else if (nextTextBlot) {\n mergedTextBlot = nextTextBlot;\n nextTextBlot.insertAt(0, newText);\n } else {\n const newTextNode = document.createTextNode(newText);\n mergedTextBlot = this.scroll.create(newTextNode);\n this.parent.insertBefore(mergedTextBlot, this);\n }\n\n this.remove();\n if (range) {\n // caLine truncated
@@ -0,0 +1,5 @@
import { ConstantValueBinding } from '../../binding/models/ConstantValueBinding';
import { ResolutionParams } from '../models/ResolutionParams';
import { Resolved } from '../models/Resolved';
export declare function resolveConstantValueBindingCallback<TActivated>(_params: ResolutionParams, binding: ConstantValueBinding<TActivated>): Resolved<TActivated>;
//# sourceMappingURL=resolveConstantValueBindingCallback.d.ts.map
@@ -0,0 +1,7 @@
import type { TSchema, SchemaOptions } from '../schema/index';
import type { TFunction } from '../function/index';
import { type TTuple } from '../tuple/index';
import { type TNever } from '../never/index';
export type TParameters<Type extends TSchema> = (Type extends TFunction<infer Parameters extends TSchema[], infer _ReturnType extends TSchema> ? TTuple<Parameters> : TNever);
/** `[JavaScript]` Extracts the Parameters from the given Function type */
export declare function Parameters<Type extends TSchema>(schema: Type, options?: SchemaOptions): TParameters<Type>;
@@ -0,0 +1,19 @@
Copyright (c) 2014 IndigoUnited
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.
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more