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

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

No files matched your search

@@ -0,0 +1,47 @@
{
"name": "micromark-util-html-tag-name",
"version": "2.0.1",
"description": "micromark utility with list of html tag names",
"license": "MIT",
"keywords": [
"micromark",
"util",
"utility",
"html",
"tag",
"name"
],
"repository": "https://github.com/micromark/micromark/tree/main/packages/micromark-util-html-tag-name",
"bugs": "https://github.com/micromark/micromark/issues",
"funding": [
{
"type": "GitHub Sponsors",
"url": "https://github.com/sponsors/unifiedjs"
},
{
"type": "OpenCollective",
"url": "https://opencollective.com/unified"
}
],
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
],
"sideEffects": false,
"type": "module",
"files": [
"index.d.ts.map",
"index.d.ts",
"index.js"
],
"exports": "./index.js",
"xo": {
"envs": [
"shared-node-browser"
],
"prettier": true,
"rules": {
"unicorn/prefer-code-point": "off"
}
}
}
@@ -0,0 +1,38 @@
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
var IsDataDescriptor = require('./IsDataDescriptor');
var isPropertyKey = require('../helpers/isPropertyKey');
var SameValue = require('./SameValue');
// https://262.ecma-international.org/6.0/#sec-createmethodproperty
module.exports = function CreateMethodProperty(O, P, V) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
var newDesc = {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': V,
'[[Writable]]': true
};
return DefineOwnProperty(
IsDataDescriptor,
SameValue,
FromPropertyDescriptor,
O,
P,
newDesc
);
};
@@ -0,0 +1,51 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.verifyAttestationFIDOU2F = verifyAttestationFIDOU2F;
const convertCOSEtoPKCS_js_1 = require("../../helpers/convertCOSEtoPKCS.js");
const convertCertBufferToPEM_js_1 = require("../../helpers/convertCertBufferToPEM.js");
const validateCertificatePath_js_1 = require("../../helpers/validateCertificatePath.js");
const verifySignature_js_1 = require("../../helpers/verifySignature.js");
const index_js_1 = require("../../helpers/iso/index.js");
const cose_js_1 = require("../../helpers/cose.js");
/**
* Verify an attestation response with fmt 'fido-u2f'
*/
async function verifyAttestationFIDOU2F(options) {
const { attStmt, clientDataHash, rpIdHash, credentialID, credentialPublicKey, aaguid, rootCertificates, } = options;
const reservedByte = Uint8Array.from([0x00]);
const publicKey = (0, convertCOSEtoPKCS_js_1.convertCOSEtoPKCS)(credentialPublicKey);
const signatureBase = index_js_1.isoUint8Array.concat([
reservedByte,
rpIdHash,
clientDataHash,
credentialID,
publicKey,
]);
const sig = attStmt.get('sig');
const x5c = attStmt.get('x5c');
if (!x5c) {
throw new Error('No attestation certificate provided in attestation statement (FIDOU2F)');
}
if (!sig) {
throw new Error('No attestation signature provided in attestation statement (FIDOU2F)');
}
// FIDO spec says that aaguid _must_ equal 0x00 here to be legit
const aaguidToHex = Number.parseInt(index_js_1.isoUint8Array.toHex(aaguid), 16);
if (aaguidToHex !== 0x00) {
throw new Error(`AAGUID "${aaguidToHex}" was not expected value`);
}
try {
// Try validating the certificate path using the root certificates set via SettingsService
await (0, validateCertificatePath_js_1.validateCertificatePath)(x5c.map(convertCertBufferToPEM_js_1.convertCertBufferToPEM), rootCertificates);
}
catch (err) {
const _err = err;
throw new Error(`${_err.message} (FIDOU2F)`);
}
return (0, verifySignature_js_1.verifySignature)({
signature: sig,
data: signatureBase,
x509Certificate: x5c[0],
hashAlgorithm: cose_js_1.COSEALG.ES256,
});
}
@@ -0,0 +1,35 @@
import type { TSchema, SchemaOptions } from '../schema/index';
import type { Evaluate, Ensure } from '../helpers/index';
import type { TMappedResult } from '../mapped/index';
import { type TReadonlyOptional } from '../readonly-optional/index';
import { type TComputed } from '../computed/index';
import { type TOptional } from '../optional/index';
import { type TReadonly } from '../readonly/index';
import { type TRecursive } from '../recursive/index';
import { type TObject, type TProperties } from '../object/index';
import { type TIntersect } from '../intersect/index';
import { type TUnion } from '../union/index';
import { type TRef } from '../ref/index';
import { type TBigInt } from '../bigint/index';
import { type TBoolean } from '../boolean/index';
import { type TInteger } from '../integer/index';
import { type TLiteral } from '../literal/index';
import { type TNull } from '../null/index';
import { type TNumber } from '../number/index';
import { type TString } from '../string/index';
import { type TSymbol } from '../symbol/index';
import { type TUndefined } from '../undefined/index';
import { type TRequiredFromMappedResult } from './required-from-mapped-result';
type TFromComputed<Target extends string, Parameters extends TSchema[]> = Ensure<TComputed<'Required', [TComputed<Target, Parameters>]>>;
type TFromRef<Ref extends string> = Ensure<TComputed<'Required', [TRef<Ref>]>>;
type TFromProperties<Properties extends TProperties> = Evaluate<{
[K in keyof Properties]: Properties[K] extends (TReadonlyOptional<infer S>) ? TReadonly<S> : Properties[K] extends (TReadonly<infer S>) ? TReadonly<S> : Properties[K] extends (TOptional<infer S>) ? S : Properties[K];
}>;
type TFromObject<_Type extends TObject, Properties extends TProperties, MappedProperties extends TProperties = TFromProperties<Properties>, Result extends TSchema = TObject<MappedProperties>> = Result;
type TFromRest<Types extends TSchema[], Result extends TSchema[] = []> = (Types extends [infer L extends TSchema, ...infer R extends TSchema[]] ? TFromRest<R, [...Result, TRequired<L>]> : Result);
export type TRequired<Type extends TSchema> = (Type extends TRecursive<infer Type extends TSchema> ? TRecursive<TRequired<Type>> : Type extends TComputed<infer Target extends string, infer Parameters extends TSchema[]> ? TFromComputed<Target, Parameters> : Type extends TRef<infer Ref extends string> ? TFromRef<Ref> : Type extends TIntersect<infer Types extends TSchema[]> ? TIntersect<TFromRest<Types>> : Type extends TUnion<infer Types extends TSchema[]> ? TUnion<TFromRest<Types>> : Type extends TObject<infer Properties extends TProperties> ? TFromObject<TObject, Properties> : Type extends TBigInt ? Type : Type extends TBoolean ? Type : Type extends TInteger ? Type : Type extends TLiteral ? Type : Type extends TNull ? Type : Type extends TNumber ? Type : Type extends TString ? Type : Type extends TSymbol ? Type : Type extends TUndefined ? Type : TObject<{}>);
/** `[Json]` Constructs a type where all properties are required */
export declare function Required<MappedResult extends TMappedResult>(type: MappedResult, options?: SchemaOptions): TRequiredFromMappedResult<MappedResult>;
/** `[Json]` Constructs a type where all properties are required */
export declare function Required<Type extends TSchema>(type: Type, options?: SchemaOptions): TRequired<Type>;
export {};
@@ -0,0 +1,37 @@
// Copyright 2013 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// API for parallel Brotli compression
// Note that this is only a proof of concept currently and not part of the
// final API yet.
#ifndef BROTLI_ENC_ENCODE_PARALLEL_H_
#define BROTLI_ENC_ENCODE_PARALLEL_H_
#include <stddef.h>
#include <stdint.h>
#include "./encode.h"
namespace brotli {
int BrotliCompressBufferParallel(BrotliParams params,
size_t input_size,
const uint8_t* input_buffer,
size_t* encoded_size,
uint8_t* encoded_buffer);
} // namespace brotli
#endif // BROTLI_ENC_ENCODE_PARALLEL_H_
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"A B","2":"K D E F wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC J ZB 0C 1C","36":"K D E F A B C"},D:{"1":"0 1 2 3 4 5 6 7 8 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 S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"J ZB K D","36":"E F A B C L M G N O P aB"},E:{"1":"K 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"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z OC","2":"F B C FD GD HD ID NC uC JD"},G:{"1":"E MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC LD"},H:{"2":"hD"},I:{"1":"I","2":"iD jD kD","36":"TC J lD vC mD nD"},J:{"1":"A","2":"D"},K:{"1":"H OC","2":"A B C NC uC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:5,C:"Blob constructing",D:true};
@@ -0,0 +1,15 @@
import { Delay } from "../delay.base";
export class SkipFirstDelay extends Delay {
public async apply() {
return this.isFirstAttempt ? true : super.apply();
}
private get isFirstAttempt() {
return this.attempt === 0;
}
protected get numOfDelayedAttempts() {
return this.attempt - 1;
}
}
@@ -0,0 +1,2 @@
export {toString} from './lib/index.js'
export type Options = import('./lib/index.js').Options
@@ -0,0 +1,6 @@
export * from "./parameters";
export * from "./algorithms";
export * from "./object_identifiers";
export * from "./other_prime_info";
export * from "./rsa_private_key";
export * from "./rsa_public_key";
@@ -0,0 +1,188 @@
import { decodeXML, decodeHTML, DecodingMode } from "./decode.js";
import { encodeHTML, encodeNonAsciiHTML } from "./encode.js";
import {
encodeXML,
escapeUTF8,
escapeAttribute,
escapeText,
} from "./escape.js";
/** The level of entities to support. */
export enum EntityLevel {
/** Support only XML entities. */
XML = 0,
/** Support HTML entities, which are a superset of XML entities. */
HTML = 1,
}
export enum EncodingMode {
/**
* The output is UTF-8 encoded. Only characters that need escaping within
* XML will be escaped.
*/
UTF8,
/**
* The output consists only of ASCII characters. Characters that need
* escaping within HTML, and characters that aren't ASCII characters will
* be escaped.
*/
ASCII,
/**
* Encode all characters that have an equivalent entity, as well as all
* characters that are not ASCII characters.
*/
Extensive,
/**
* Encode all characters that have to be escaped in HTML attributes,
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
*/
Attribute,
/**
* Encode all characters that have to be escaped in HTML text,
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
*/
Text,
}
export interface DecodingOptions {
/**
* The level of entities to support.
* @default {@link EntityLevel.XML}
*/
level?: EntityLevel;
/**
* Decoding mode. If `Legacy`, will support legacy entities not terminated
* with a semicolon (`;`).
*
* Always `Strict` for XML. For HTML, set this to `true` if you are parsing
* an attribute value.
*
* The deprecated `decodeStrict` function defaults this to `Strict`.
*
* @default {@link DecodingMode.Legacy}
*/
mode?: DecodingMode | undefined;
}
/**
* Decodes a string with entities.
*
* @param input String to decode.
* @param options Decoding options.
*/
export function decode(
input: string,
options: DecodingOptions | EntityLevel = EntityLevel.XML,
): string {
const level = typeof options === "number" ? options : options.level;
if (level === EntityLevel.HTML) {
const mode = typeof options === "object" ? options.mode : undefined;
return decodeHTML(input, mode);
}
return decodeXML(input);
}
/**
* Decodes a string with entities. Does not allow missing trailing semicolons for entities.
*
* @param input String to decode.
* @param options Decoding options.
* @deprecated Use `decode` with the `mode` set to `Strict`.
*/
export function decodeStrict(
input: string,
options: DecodingOptions | EntityLevel = EntityLevel.XML,
): string {
const normalizedOptions =
typeof options === "number" ? { level: options } : options;
normalizedOptions.mode ??= DecodingMode.Strict;
return decode(input, normalizedOptions);
}
/**
* Options for `encode`.
*/
export interface EncodingOptions {
/**
* The level of entities to support.
* @default {@link EntityLevel.XML}
*/
level?: EntityLevel;
/**
* Output format.
* @default {@link EncodingMode.Extensive}
*/
mode?: EncodingMode;
}
/**
* Encodes a string with entities.
*
* @param input String to encode.
* @param options Encoding options.
*/
export function encode(
input: string,
options: EncodingOptions | EntityLevel = EntityLevel.XML,
): string {
const { mode = EncodingMode.Extensive, level = EntityLevel.XML } =
typeof options === "number" ? { level: options } : options;
switch (mode) {
case EncodingMode.UTF8: {
return escapeUTF8(input);
}
case EncodingMode.Attribute: {
return escapeAttribute(input);
}
case EncodingMode.Text: {
return escapeText(input);
}
case EncodingMode.ASCII: {
return level === EntityLevel.HTML
? encodeNonAsciiHTML(input)
: encodeXML(input);
}
// eslint-disable-next-line unicorn/no-useless-switch-case
case EncodingMode.Extensive:
default: {
return level === EntityLevel.HTML
? encodeHTML(input)
: encodeXML(input);
}
}
}
export {
encodeXML,
escape,
escapeUTF8,
escapeAttribute,
escapeText,
} from "./escape.js";
export {
encodeHTML,
encodeNonAsciiHTML,
// Legacy aliases (deprecated)
encodeHTML as encodeHTML4,
encodeHTML as encodeHTML5,
} from "./encode.js";
export {
EntityDecoder,
DecodingMode,
decodeXML,
decodeHTML,
decodeHTMLStrict,
decodeHTMLAttribute,
// Legacy aliases (deprecated)
decodeHTML as decodeHTML4,
decodeHTML as decodeHTML5,
decodeHTMLStrict as decodeHTML4Strict,
decodeHTMLStrict as decodeHTML5Strict,
decodeXML as decodeXMLStrict,
} from "./decode.js";
@@ -0,0 +1,179 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Font", {
enumerable: true,
get: function get() {
return _font.Font;
}
});
Object.defineProperty(exports, "OTFReader", {
enumerable: true,
get: function get() {
return _otfreader.default;
}
});
Object.defineProperty(exports, "Reader", {
enumerable: true,
get: function get() {
return _reader.default;
}
});
Object.defineProperty(exports, "TTF", {
enumerable: true,
get: function get() {
return _ttf.default;
}
});
Object.defineProperty(exports, "TTFReader", {
enumerable: true,
get: function get() {
return _ttfreader.default;
}
});
Object.defineProperty(exports, "TTFWriter", {
enumerable: true,
get: function get() {
return _ttfwriter.default;
}
});
Object.defineProperty(exports, "Writer", {
enumerable: true,
get: function get() {
return _writer.default;
}
});
Object.defineProperty(exports, "createFont", {
enumerable: true,
get: function get() {
return _font.createFont;
}
});
exports.default = void 0;
Object.defineProperty(exports, "eot2ttf", {
enumerable: true,
get: function get() {
return _eot2ttf.default;
}
});
Object.defineProperty(exports, "otf2ttfobject", {
enumerable: true,
get: function get() {
return _otf2ttfobject.default;
}
});
Object.defineProperty(exports, "svg2ttfobject", {
enumerable: true,
get: function get() {
return _svg2ttfobject.default;
}
});
exports.toBuffer = exports.toArrayBuffer = void 0;
Object.defineProperty(exports, "ttf2base64", {
enumerable: true,
get: function get() {
return _ttf2base.default;
}
});
Object.defineProperty(exports, "ttf2eot", {
enumerable: true,
get: function get() {
return _ttf2eot.default;
}
});
Object.defineProperty(exports, "ttf2icon", {
enumerable: true,
get: function get() {
return _ttf2icon.default;
}
});
Object.defineProperty(exports, "ttf2svg", {
enumerable: true,
get: function get() {
return _ttf2svg.default;
}
});
Object.defineProperty(exports, "ttf2woff", {
enumerable: true,
get: function get() {
return _ttf2woff.default;
}
});
Object.defineProperty(exports, "ttftowoff2", {
enumerable: true,
get: function get() {
return _ttftowoff.default;
}
});
Object.defineProperty(exports, "woff2", {
enumerable: true,
get: function get() {
return _index.default;
}
});
Object.defineProperty(exports, "woff2tottf", {
enumerable: true,
get: function get() {
return _woff2tottf.default;
}
});
Object.defineProperty(exports, "woff2ttf", {
enumerable: true,
get: function get() {
return _woff2ttf.default;
}
});
var _font = require("./ttf/font");
var _ttf = _interopRequireDefault(require("./ttf/ttf"));
var _ttfreader = _interopRequireDefault(require("./ttf/ttfreader"));
var _ttfwriter = _interopRequireDefault(require("./ttf/ttfwriter"));
var _ttf2eot = _interopRequireDefault(require("./ttf/ttf2eot"));
var _eot2ttf = _interopRequireDefault(require("./ttf/eot2ttf"));
var _ttf2woff = _interopRequireDefault(require("./ttf/ttf2woff"));
var _woff2ttf = _interopRequireDefault(require("./ttf/woff2ttf"));
var _ttf2svg = _interopRequireDefault(require("./ttf/ttf2svg"));
var _svg2ttfobject = _interopRequireDefault(require("./ttf/svg2ttfobject"));
var _reader = _interopRequireDefault(require("./ttf/reader"));
var _writer = _interopRequireDefault(require("./ttf/writer"));
var _otfreader = _interopRequireDefault(require("./ttf/otfreader"));
var _otf2ttfobject = _interopRequireDefault(require("./ttf/otf2ttfobject"));
var _ttf2base = _interopRequireDefault(require("./ttf/ttf2base64"));
var _ttf2icon = _interopRequireDefault(require("./ttf/ttf2icon"));
var _ttftowoff = _interopRequireDefault(require("./ttf/ttftowoff2"));
var _woff2tottf = _interopRequireDefault(require("./ttf/woff2tottf"));
var _index = _interopRequireDefault(require("../woff2/index"));
var _buffer = _interopRequireDefault(require("./nodejs/buffer"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file 主函数
* @author mengke01(kekee000@gmail.com)
*/
var toArrayBuffer = exports.toArrayBuffer = _buffer.default.toArrayBuffer;
var toBuffer = exports.toBuffer = _buffer.default.toBuffer;
var _default = exports.default = {
createFont: _font.createFont,
Font: _font.Font,
TTF: _ttf.default,
TTFReader: _ttfreader.default,
TTFWriter: _ttfwriter.default,
ttf2eot: _ttf2eot.default,
eot2ttf: _eot2ttf.default,
ttf2woff: _ttf2woff.default,
woff2ttf: _woff2ttf.default,
ttf2svg: _ttf2svg.default,
svg2ttfobject: _svg2ttfobject.default,
Reader: _reader.default,
Writer: _writer.default,
OTFReader: _otfreader.default,
otf2ttfobject: _otf2ttfobject.default,
ttf2base64: _ttf2base.default,
ttf2icon: _ttf2icon.default,
ttftowoff2: _ttftowoff.default,
woff2tottf: _woff2tottf.default,
woff2: _index.default,
toArrayBuffer: _buffer.default.toArrayBuffer,
toBuffer: _buffer.default.toBuffer
};
@@ -0,0 +1 @@
{"version":3,"names":["_getPrototypeOf","o","exports","default","Object","setPrototypeOf","getPrototypeOf","bind","__proto__"],"sources":["../../src/helpers/getPrototypeOf.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nexport default function _getPrototypeOf(o: object): any {\n // @ts-expect-error explicitly assign to function\n _getPrototypeOf = Object.setPrototypeOf\n ? // @ts-expect-error -- intentionally omitting the argument\n Object.getPrototypeOf.bind(/* undefined */)\n : function _getPrototypeOf<T extends object>(o: T) {\n return (o as any).__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n"],"mappings":";;;;;;AAEe,SAASA,eAAeA,CAACC,CAAS,EAAO;EAEtDC,OAAA,CAAAC,OAAA,GAAAH,eAAe,GAAGI,MAAM,CAACC,cAAc,GAEnCD,MAAM,CAACE,cAAc,CAACC,IAAI,CAAgB,CAAC,GAC3C,SAASP,eAAeA,CAAmBC,CAAI,EAAE;IAC/C,OAAQA,CAAC,CAASO,SAAS,IAAIJ,MAAM,CAACE,cAAc,CAACL,CAAC,CAAC;EACzD,CAAC;EACL,OAAOD,eAAe,CAACC,CAAC,CAAC;AAC3B","ignoreList":[]}
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,kBAAkB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,YAAY,CAAC;IACxE,qBAAqB,CAAC,iEAAkD,CAAC;IACzE,UAAU,CAAC,SAAS,CAAC;IACrB,eAAe,CAAC,2BAA2B,CAAC;IAC5C,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,uBAAuB,CAAC;YAAE,KAAK,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,iBAAiB,CAAC;YAAE,OAAO,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,mBAAmB,CAAC;QAAA,GAAG,CAAC,CAAC;IAC7O,gBAAgB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,UAAU,CAAC;AACpD","sources":["packages/@react-aria/grid/intl/ro-RO.json"],"sourcesContent":["{\n \"deselectedItem\": \"{item} neselectat.\",\n \"longPressToSelect\": \"Apăsați lung pentru a intra în modul de selectare.\",\n \"select\": \"Selectare\",\n \"selectedAll\": \"Toate elementele selectate.\",\n \"selectedCount\": \"{count, plural, =0 {Niciun element selectat} one {# element selectat} other {# elemente selectate}}.\",\n \"selectedItem\": \"{item} selectat.\"\n}\n"],"names":[],"version":3,"file":"ro-RO.module.js.map"}
@@ -0,0 +1,5 @@
/**
* http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist
* @param locales
*/
export declare function CanonicalizeLocaleList(locales?: string | ReadonlyArray<string>): string[];
@@ -0,0 +1,54 @@
import * as framer_motion from 'framer-motion';
import * as _heroui_theme from '@heroui/theme';
import * as React from 'react';
import * as _heroui_system from '@heroui/system';
import * as _react_stately_overlays from '@react-stately/overlays';
declare const PopoverProvider: React.Provider<{
state: _react_stately_overlays.OverlayTriggerState;
Component: _heroui_system.As<any>;
children: React.ReactNode;
classNames: _heroui_theme.SlotsToClasses<"base" | "content" | "trigger" | "backdrop" | "arrow"> | undefined;
showArrow: boolean;
triggerRef: React.RefObject<HTMLElement>;
placement: "center" | "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end" | null;
isNonModal: boolean;
popoverRef: React.RefObject<HTMLDivElement>;
portalContainer: Element | undefined;
isOpen: boolean;
onClose: () => void;
disableAnimation: boolean;
shouldBlockScroll: boolean;
backdrop: "transparent" | "opaque" | "blur";
motionProps: framer_motion.HTMLMotionProps<"div"> | undefined;
getBackdropProps: _heroui_system.PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getPopoverProps: _heroui_system.PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getTriggerProps: _heroui_system.PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getDialogProps: _heroui_system.PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getContentProps: _heroui_system.PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
}>;
declare const usePopoverContext: () => {
state: _react_stately_overlays.OverlayTriggerState;
Component: _heroui_system.As<any>;
children: React.ReactNode;
classNames: _heroui_theme.SlotsToClasses<"base" | "content" | "trigger" | "backdrop" | "arrow"> | undefined;
showArrow: boolean;
triggerRef: React.RefObject<HTMLElement>;
placement: "center" | "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end" | null;
isNonModal: boolean;
popoverRef: React.RefObject<HTMLDivElement>;
portalContainer: Element | undefined;
isOpen: boolean;
onClose: () => void;
disableAnimation: boolean;
shouldBlockScroll: boolean;
backdrop: "transparent" | "opaque" | "blur";
motionProps: framer_motion.HTMLMotionProps<"div"> | undefined;
getBackdropProps: _heroui_system.PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getPopoverProps: _heroui_system.PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getTriggerProps: _heroui_system.PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getDialogProps: _heroui_system.PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getContentProps: _heroui_system.PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
};
export { PopoverProvider, usePopoverContext };
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = extractValueFromNewExpression;
/**
* Extractor function for a NewExpression type value node.
* A new expression instantiates an object with `new` keyword.
*
* @returns - an empty object.
*/
function extractValueFromNewExpression() {
return new Object(); // eslint-disable-line
}
@@ -0,0 +1 @@
{"version":3,"file":"isAnyAncestorBindingConstraints.spec.d.ts","sourceRoot":"","sources":["../../../../src/binding/calculations/isAnyAncestorBindingConstraints.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;AAcM,SAAS,0CAAe,UAAuB,EAAE,OAAoB;IAC1E,IAAI,UAAU,qCAAe,YAAY,SAAS;IAClD,IAAI,UAAU,qCAAe,YAAY,SAAS;IAClD,IAAI,QAAQ,QAAQ,WAAW;IAC/B,IAAI,SAAS,QAAQ,YAAY;IACjC,IAAI,IAAI,WAAW,UAAU;IAC7B,IAAI,IAAI,WAAW,SAAS;IAE5B,6DAA6D;IAC7D,IAAI,kBAAC,cAAc,mBAAE,eAAe,EAAC,GAAG,iBAAiB;IACzD,IAAI,kBAAkB,WAAW,UAAU,GAAG,SAAS,iBAAiB;IACxE,IAAI,kBAAkB,WAAW,SAAS,GAAG,SAAS,gBAAgB;IACtE,gFAAgF;IAChF,IAAI,OAAO,kBAAkB,WAAW,WAAW;IACnD,IAAI,OAAO,kBAAkB,WAAW,YAAY;IAEpD,IAAI,WAAW,GACb,IAAI,UAAU,SAAS,iBAAiB;SACnC,IAAI,UAAU,QAAQ,MAC3B,KAAK,UAAU,QAAQ;IAEzB,IAAI,WAAW,iBACb,IAAI,UAAU,SAAS,gBAAgB;SAClC,IAAI,UAAU,SAAS,MAC5B,KAAK,UAAU,SAAS;IAE1B,WAAW,UAAU,GAAG;IACxB,WAAW,SAAS,GAAG;AACzB;AAEA;;;CAGC,GACD,SAAS,qCAAe,QAAqB,EAAE,KAAkB,EAAE,IAAkB;IACnF,MAAM,OAAO,SAAS,SAAS,eAAe;IAC9C,IAAI,MAAM;IACV,MAAO,MAAM,YAAY,CAAE;QACzB,OAAO,KAAK,CAAC,KAAK;QAClB,IAAI,MAAM,YAAY,KAAK,UAEzB;aACK,IAAI,MAAM,YAAY,CAAC,QAAQ,CAAC,WAAW;YAChD,8DAA8D;YAC9D,iEAAiE;YACjE,2DAA2D;YAC3D,OAAO,QAAQ,CAAC,KAAK;YACrB;QACF;QACA,QAAQ,MAAM,YAAY;IAC5B;IACA,OAAO;AACT;AAOO,SAAS,0CAAmB,aAA6B,EAAE,IAA6B;IAC7F,IAAI,iBAAiB,SAAS,QAAQ,CAAC,gBAAgB;QACrD,IAAI,OAAO,SAAS,gBAAgB,IAAI,SAAS,eAAe;QAChE,IAAI,oBAAoB,OAAO,gBAAgB,CAAC,MAAM,QAAQ,KAAK;QACnE,4JAA4J;QAC5J,IAAI,CAAC,mBAAmB;gBAGtB,0HAA0H;YAC1H,6JAA6J;YAC7J;YAJA,IAAI,EAAC,MAAM,YAAY,EAAE,KAAK,WAAW,EAAC,GAAG,cAAc,qBAAqB;YAIhF,0BAAA,qCAAA,gCAAA,cAAe,cAAc,cAA7B,oDAAA,mCAAA,eAAgC;gBAAC,OAAO;YAAS;YACjD,IAAI,EAAC,MAAM,OAAO,EAAE,KAAK,MAAM,EAAC,GAAG,cAAc,qBAAqB;YACtE,kDAAkD;YAClD,IAAI,AAAC,KAAK,GAAG,CAAC,eAAe,WAAW,KAAO,KAAK,GAAG,CAAC,cAAc,UAAU,GAAI;oBAClF,wCAAA,yBACA;gBADA,iBAAA,4BAAA,0BAAA,KAAM,iBAAiB,cAAvB,+CAAA,yCAAA,wBAAyB,cAAc,cAAvC,6DAAA,4CAAA,yBAA0C;oBAAC,OAAO;oBAAU,QAAQ;gBAAQ;iBAC5E,iCAAA,cAAc,cAAc,cAA5B,qDAAA,oCAAA,eAA+B;oBAAC,OAAO;gBAAS;YAClD;QACF,OAAO;YACL,IAAI,gBAAgB,CAAA,GAAA,0CAAe,EAAE;YACrC,+JAA+J;YAC/J,KAAK,IAAI,gBAAgB,cACvB,0CAAe,cAA6B;QAEhD;IACF;AACF","sources":["packages/@react-aria/utils/src/scrollIntoView.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getScrollParents} from './getScrollParents';\n\ninterface ScrollIntoViewportOpts {\n /** The optional containing element of the target to be centered in the viewport. */\n containingElement?: Element | null\n}\n\n/**\n * Scrolls `scrollView` so that `element` is visible.\n * Similar to `element.scrollIntoView({block: 'nearest'})` (not supported in Edge),\n * but doesn't affect parents above `scrollView`.\n */\nexport function scrollIntoView(scrollView: HTMLElement, element: HTMLElement) {\n let offsetX = relativeOffset(scrollView, element, 'left');\n let offsetY = relativeOffset(scrollView, element, 'top');\n let width = element.offsetWidth;\n let height = element.offsetHeight;\n let x = scrollView.scrollLeft;\n let y = scrollView.scrollTop;\n\n // Account for top/left border offsetting the scroll top/Left\n let {borderTopWidth, borderLeftWidth} = getComputedStyle(scrollView);\n let borderAdjustedX = scrollView.scrollLeft + parseInt(borderLeftWidth, 10);\n let borderAdjustedY = scrollView.scrollTop + parseInt(borderTopWidth, 10);\n // Ignore end/bottom border via clientHeight/Width instead of offsetHeight/Width\n let maxX = borderAdjustedX + scrollView.clientWidth;\n let maxY = borderAdjustedY + scrollView.clientHeight;\n\n if (offsetX <= x) {\n x = offsetX - parseInt(borderLeftWidth, 10);\n } else if (offsetX + width > maxX) {\n x += offsetX + width - maxX;\n }\n if (offsetY <= borderAdjustedY) {\n y = offsetY - parseInt(borderTopWidth, 10);\n } else if (offsetY + height > maxY) {\n y += offsetY + height - maxY;\n }\n scrollView.scrollLeft = x;\n scrollView.scrollTop = y;\n}\n\n/**\n * Computes the offset left or top from child to ancestor by accumulating\n * offsetLeft or offsetTop through intervening offsetParents.\n */\nfunction relativeOffset(ancestor: HTMLElement, child: HTMLElement, axis: 'left'|'top') {\n const prop = axis === 'left' ? 'offsetLeft' : 'offsetTop';\n let sum = 0;\n while (child.offsetParent) {\n sum += child[prop];\n if (child.offsetParent === ancestor) {\n // Stop once we have found the ancestor we are interested in.\n break;\n } else if (child.offsetParent.contains(ancestor)) {\n // If the ancestor is not `position:relative`, then we stop at\n // _its_ offset parent, and we subtract off _its_ offset, so that\n // we end up with the proper offset frLine truncated
@@ -0,0 +1,26 @@
/** Used for built-in method references. */
var funcProto = Function.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to convert.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return (func + '');
} catch (e) {}
}
return '';
}
module.exports = toSource;
@@ -0,0 +1 @@
var Module=typeof Module!="undefined"?Module:{};var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;function logExceptionOnExit(e){if(e instanceof ExitStatus)return;let toLog=e;err("exiting due to exception: "+toLog)}var fs;var nodePath;var requireNodeFS;if(ENVIRONMENT_IS_NODE){if(ENVIRONMENT_IS_WORKER){scriptDirectory=require("path").dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}requireNodeFS=(()=>{if(!nodePath){fs=require("fs");nodePath=require("path")}});read_=function shell_read(filename,binary){requireNodeFS();filename=nodePath["normalize"](filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=(filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret});readAsync=((filename,onload,onerror)=>{requireNodeFS();filename=nodePath["normalize"](filename);fs.readFile(filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})});if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);if(typeof module!="undefined"){module["exports"]=Module}quit_=((status,toThrow)=>{if(keepRuntimeAlive()){process["exitCode"]=status;throw toThrow}logExceptionOnExit(toThrow);process["exit"](status)});Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=(url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText});if(ENVIRONMENT_IS_WORKER){readBinary=(url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)})}readAsync=((url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=(()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()});xhr.onerror=onerror;xhr.send(null)})}setWindowTitle=(title=>document.title=title)}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var tempRet0=0;var setTempRet0=value=>{tempRet0=value};var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected")}function getValue(ptr,type="i8",noSafe){if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return Number(HEAPF64[ptr>>3]);default:abort("invalid type for getValue: "+type)}return null}var wasmMemory;var ABORT=false;var EXITSTATUS;var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heap,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heap[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heap.subarray&&UTF8Decoder){return UTF8Decoder.decode(heap.subarray(idx,endPtr))}else{var str="";while(idx<endPtr){var u0=heap[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heap[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heap[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heap[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outLine truncated
@@ -0,0 +1,8 @@
The MIT License (MIT)
Copyright (c) 2015 Dmitry Ivanov
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,71 @@
/**
* @file 圆路径集合,逆时针
* @author mengke01(kekee000@gmail.com)
*/
export default [
{
x: 582,
y: 0
},
{
x: 758,
y: 75
},
{
x: 890,
y: 208
},
{
x: 965,
y: 384
},
{
x: 965,
y: 583
},
{
x: 890,
y: 760
},
{
x: 758,
y: 891
},
{
x: 582,
y: 966
},
{
x: 383,
y: 966
},
{
x: 207,
y: 891
},
{
x: 75,
y: 760
},
{
x: 0,
y: 583
},
{
x: 0,
y: 384
},
{
x: 75,
y: 208
},
{
x: 207,
y: 75
},
{
x: 383,
y: 0
}
];
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('bind', require('../bind'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,53 @@
"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/moon.tsx
var moon_exports = {};
__export(moon_exports, {
MoonIcon: () => MoonIcon
});
module.exports = __toCommonJS(moon_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var MoonIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"svg",
{
"aria-hidden": "true",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 512 512",
width: "1em",
...props,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M160 136c0-30.62 4.51-61.61 16-88C99.57 81.27 48 159.32 48 248c0 119.29 96.71 216 216 216 88.68 0 166.73-51.57 200-128-26.39 11.49-57.38 16-88 16-119.29 0-216-96.71-216-216z",
fill: "none",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 32
}
)
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
MoonIcon
});
@@ -0,0 +1,16 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
*/
"use strict";
const isCombiningCharacter = require("./is-combining-character");
const isEmojiModifier = require("./is-emoji-modifier");
const isRegionalIndicatorSymbol = require("./is-regional-indicator-symbol");
const isSurrogatePair = require("./is-surrogate-pair");
module.exports = {
isCombiningCharacter,
isEmojiModifier,
isRegionalIndicatorSymbol,
isSurrogatePair,
};
@@ -0,0 +1,54 @@
// Copyright (c) 2015 Ryan Prichard
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
// Recent 4.x MinGW and MinGW-w64 gcc compilers lack std::mutex and
// std::lock_guard. I have a 5.2.0 MinGW-w64 compiler packaged through MSYS2
// that *is* new enough, but that's one compiler against several deficient
// ones. Wrap CRITICAL_SECTION instead.
#ifndef WINPTY_SHARED_MUTEX_H
#define WINPTY_SHARED_MUTEX_H
#include <windows.h>
class Mutex {
CRITICAL_SECTION m_mutex;
public:
Mutex() { InitializeCriticalSection(&m_mutex); }
~Mutex() { DeleteCriticalSection(&m_mutex); }
void lock() { EnterCriticalSection(&m_mutex); }
void unlock() { LeaveCriticalSection(&m_mutex); }
Mutex(const Mutex &other) = delete;
Mutex &operator=(const Mutex &other) = delete;
};
template <typename T>
class LockGuard {
T &m_lock;
public:
LockGuard(T &lock) : m_lock(lock) { m_lock.lock(); }
~LockGuard() { m_lock.unlock(); }
LockGuard(const LockGuard &other) = delete;
LockGuard &operator=(const LockGuard &other) = delete;
};
#endif // WINPTY_SHARED_MUTEX_H
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from './types.js';
import 'react';
declare const ShieldSecurityIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { ShieldSecurityIcon };
@@ -0,0 +1,184 @@
import descriptionTokenizer from '../../src/parser/tokenizers/description.js';
import nameTokenizer from '../../src/parser/tokenizers/name.js';
import tagTokenizer from '../../src/parser/tokenizers/tag.js';
import typeTokenizer from '../../src/parser/tokenizers/type.js';
import getParser from '../../src/parser/spec-parser.js';
import { seedTokens, seedSpec } from '../../src/util.js';
import { Spec, Problem } from '../../src/primitives.js';
const parse = getParser({
tokenizers: [
tagTokenizer(),
typeTokenizer(),
nameTokenizer(),
descriptionTokenizer(),
],
});
const tokenizer = (message: string, critical = false) => {
const problem: Problem = {
code: 'custom',
line: 1,
message,
critical,
};
return (spec: Spec) => ({
...spec,
problems: [...spec.problems, problem],
});
};
test('all tokens', () => {
const parsed = parse([
{
number: 1,
source: '...',
tokens: seedTokens({
description: '@param {type} [name=value] description',
}),
},
]);
expect(parsed).toEqual(
seedSpec({
tag: 'param',
type: 'type',
name: 'name',
default: 'value',
optional: true,
description: 'description',
source: [
{
number: 1,
source: '...',
tokens: seedTokens({
tag: '@param',
postTag: ' ',
type: '{type}',
postType: ' ',
name: '[name=value]',
postName: ' ',
description: 'description',
}),
},
],
})
);
});
test('quotes in description', () => {
const parsed = parse([
{
number: 1,
source: '...',
tokens: seedTokens({
description:
'@param {type} [name=value] description with "quoted" word',
}),
},
]);
expect(parsed).toEqual(
seedSpec({
tag: 'param',
type: 'type',
name: 'name',
default: 'value',
optional: true,
description: 'description with "quoted" word',
source: [
{
number: 1,
source: '...',
tokens: seedTokens({
tag: '@param',
postTag: ' ',
type: '{type}',
postType: ' ',
name: '[name=value]',
postName: ' ',
description: 'description with "quoted" word',
}),
},
],
})
);
});
test('collect non-critical errors', () => {
const parse = getParser({
tokenizers: [tokenizer('warning 1'), tokenizer('warning 2')],
});
const parsed = parse([
{
number: 1,
source: '...',
tokens: seedTokens({ description: 'description' }),
},
]);
expect(parsed).toEqual({
tag: '',
name: '',
optional: false,
type: '',
description: '',
problems: [
{
code: 'custom',
line: 1,
message: 'warning 1',
critical: false,
},
{
code: 'custom',
line: 1,
message: 'warning 2',
critical: false,
},
],
source: [
{
number: 1,
source: '...',
tokens: seedTokens({ description: 'description' }),
},
],
});
});
test('stop on critical error', () => {
const parse = getParser({
tokenizers: [tokenizer('error 1', true), tokenizer('warning 2')],
});
const parsed = parse([
{
number: 1,
source: '...',
tokens: seedTokens({ description: 'description' }),
},
]);
expect(parsed).toEqual({
tag: '',
name: '',
optional: false,
type: '',
description: '',
problems: [
{
code: 'custom',
line: 1,
message: 'error 1',
critical: true,
},
],
source: [
{
number: 1,
source: '...',
tokens: seedTokens({ description: 'description' }),
},
],
});
});
@@ -0,0 +1,22 @@
#!/usr/bin/env node
let mode = process.argv[2]
if (mode === '--info') {
process.stdout.write(require('../')().info() + '\n')
} else if (mode === '--version') {
process.stdout.write(
'autoprefixer ' + require('../package.json').version + '\n'
)
} else {
process.stdout.write(
'autoprefix\n' +
'\n' +
'Options:\n' +
' --info Show target browsers and used prefixes\n' +
' --version Show version number\n' +
' --help Show help\n' +
'\n' +
'Usage:\n' +
' autoprefixer --info\n'
)
}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormatNumericRange = FormatNumericRange;
var PartitionNumberRangePattern_1 = require("./PartitionNumberRangePattern");
/**
* https://tc39.es/ecma402/#sec-formatnumericrange
*/
function FormatNumericRange(numberFormat, x, y, _a) {
var getInternalSlots = _a.getInternalSlots;
var parts = (0, PartitionNumberRangePattern_1.PartitionNumberRangePattern)(numberFormat, x, y, {
getInternalSlots: getInternalSlots,
});
return parts.map(function (part) { return part.value; }).join('');
}
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (coll) {
return coll[Symbol.iterator] && coll[Symbol.iterator]();
};
module.exports = exports.default;
@@ -0,0 +1,2 @@
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).StyleToObject=t()}(this,(function(){"use strict";var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,e=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,f="";function s(n){return n?n.replace(c,f):f}return function(c,a){let l=null;if(!c||"string"!=typeof c)return l;const p=function(c,a){if("string"!=typeof c)throw new TypeError("First argument must be a string");if(!c)return[];a=a||{};var l=1,p=1;function h(n){var e=n.match(t);e&&(l+=e.length);var r=n.lastIndexOf("\n");p=~r?n.length-r:p+n.length}function m(){var n={line:l,column:p};return function(t){return t.position=new v(n),g(),t}}function v(n){this.start=n,this.end={line:l,column:p},this.source=a.source}function y(n){var t=new Error(a.source+":"+l+":"+p+": "+n);if(t.reason=n,t.filename=a.source,t.line=l,t.column=p,t.source=c,!a.silent)throw t}function d(n){var t=n.exec(c);if(t){var e=t[0];return h(e),c=c.slice(e.length),t}}function g(){d(e)}function w(n){var t;for(n=n||[];t=A();)!1!==t&&n.push(t);return n}function A(){var n=m();if("/"==c.charAt(0)&&"*"==c.charAt(1)){for(var t=2;f!=c.charAt(t)&&("*"!=c.charAt(t)||"/"!=c.charAt(t+1));)++t;if(t+=2,f===c.charAt(t-1))return y("End of comment missing");var e=c.slice(2,t-2);return p+=2,h(e),c=c.slice(t),p+=2,n({type:"comment",comment:e})}}function b(){var t=m(),e=d(r);if(e){if(A(),!d(o))return y("property missing ':'");var c=d(i),a=t({type:"declaration",property:s(e[0].replace(n,f)),value:c?s(c[0].replace(n,f)):f});return d(u),a}}return v.prototype.content=c,g(),function(){var n,t=[];for(w(t);n=b();)!1!==n&&(t.push(n),w(t));return t}()}(c),h="function"==typeof a;return p.forEach((n=>{if("declaration"!==n.type)return;const{property:t,value:e}=n;h?a(t,e,n):e&&(l=l||{},l[t]=e)})),l}}));
//# sourceMappingURL=style-to-object.min.js.map
@@ -0,0 +1,24 @@
/**
* @license React
* react-compiler-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
var ReactSharedInternals =
require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
exports.c = function (size) {
var dispatcher = ReactSharedInternals.H;
null === dispatcher &&
console.error(
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
);
return dispatcher.useMemoCache(size);
};
})();
@@ -0,0 +1,23 @@
import { ServiceIdentifier } from '@inversifyjs/common';
import { Cloneable } from '../../common/models/Cloneable';
import { BindingActivation } from '../models/BindingActivation';
declare enum ActivationRelationKind {
moduleId = "moduleId",
serviceId = "serviceId"
}
export interface BindingActivationRelation {
[ActivationRelationKind.moduleId]?: number;
[ActivationRelationKind.serviceId]: ServiceIdentifier;
}
export declare class ActivationsService implements Cloneable<ActivationsService> {
#private;
private constructor();
static build(getParent: () => ActivationsService | undefined): ActivationsService;
add(activation: BindingActivation, relation: BindingActivationRelation): void;
clone(): ActivationsService;
get(serviceIdentifier: ServiceIdentifier): Iterable<BindingActivation> | undefined;
removeAllByModuleId(moduleId: number): void;
removeAllByServiceId(serviceId: ServiceIdentifier): void;
}
export {};
//# sourceMappingURL=ActivationsService.d.ts.map
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;AASM,MAAM;IAWX,OAAiB,GAAW,EAAE,SAA6G,EAA+B;QACxK,IAAI,UAAU,IAAI,CAAC,KAAK,CAAC,IAAI;QAC7B,IAAI,CAAC,SAAS;YACZ,IAAI,MAAM,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC,MAAM;YAC3D,IAAI,CAAC,KACH,MAAM,IAAI,MAAM,CAAC,4BAA4B,EAAE,IAAI,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;YAG/E,UAAU,IAAI,CAAA,GAAA,kDAAgB,EAAE,KAAK,IAAI,CAAC,MAAM;YAChD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG;QACpB;QACA,IAAI;QACJ,IAAI,WACF,UAAU,OAAO,IAAI,CAAC,WAAW,MAAM,CAAC,CAAC,KAAK;YAC5C,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,IAAI,OAAO,QAAQ,SAAS,CAAC,IAAI;YAC1D,OAAO;QACT,GAAG,CAAC;QAGN,OAAO,QAAQ,MAAM,CAAC;IACxB;IA1BA,YAAY,MAAc,EAAE,QAA2B,CAAE;QACvD,IAAI,CAAC,MAAM,GAAG;QACd,IAAI,CAAC,QAAQ,GAAG;QAChB,IAAI,CAAC,KAAK,GAAG,CAAC;IAChB;AAuBF","sources":["packages/@internationalized/message/src/MessageFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FormatXMLElementFn, PrimitiveType} from 'intl-messageformat/src/formatters';\nimport IntlMessageFormat from 'intl-messageformat';\nimport {MessageDictionary} from './MessageDictionary';\n\n/**\n * Formats ICU Message strings to create localized strings from a MessageDictionary.\n */\nexport class MessageFormatter {\n private locale: string;\n private messages: MessageDictionary;\n private cache: {[key: string]: IntlMessageFormat};\n\n constructor(locale: string, messages: MessageDictionary) {\n this.locale = locale;\n this.messages = messages;\n this.cache = {};\n }\n\n format<T = void>(key: string, variables: Record<string, PrimitiveType | T | FormatXMLElementFn<T, string | T | (string | T)[]>> | undefined): string | T | (string | T)[] {\n let message = this.cache[key];\n if (!message) {\n let msg = this.messages.getStringForLocale(key, this.locale);\n if (!msg) {\n throw new Error(`Could not find intl message ${key} in ${this.locale} locale`);\n }\n\n message = new IntlMessageFormat(msg, this.locale);\n this.cache[key] = message;\n }\n let varCopy: Record<string, PrimitiveType | T | FormatXMLElementFn<T, string | T | (string | T)[]>> | undefined;\n if (variables) {\n varCopy = Object.keys(variables).reduce((acc, key) => {\n acc[key] = variables[key] == null ? false : variables[key];\n return acc;\n }, {});\n }\n\n return message.format(varCopy);\n }\n}\n"],"names":[],"version":3,"file":"MessageFormatter.main.js.map"}
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=no-this-in-sfc.d.ts.map
@@ -0,0 +1,2 @@
import"reflect-metadata";export{LazyServiceIdentifier}from"@inversifyjs/common";export{Container,ContainerModule}from"@inversifyjs/container";export{bindingScopeValues,bindingTypeValues,decorate,inject,injectFromBase,injectFromHierarchy,injectable,multiInject,named,optional,postConstruct,preDestroy,tagged,unmanaged}from"@inversifyjs/core";
//# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=PlanResult.js.map
@@ -0,0 +1,2 @@
var isDev = process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test';
export default isDev;
@@ -0,0 +1,28 @@
{
"name": "validate-npm-package-license",
"description": "Give me a string and I'll tell you if it's a valid npm package license string",
"version": "3.0.4",
"author": "Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com)",
"contributors": [
"Mark Stacey <markjstacey@gmail.com>"
],
"dependencies": {
"spdx-correct": "^3.0.0",
"spdx-expression-parse": "^3.0.0"
},
"devDependencies": {
"defence-cli": "^2.0.1",
"replace-require-self": "^1.0.0"
},
"keywords": [
"license",
"npm",
"package",
"validation"
],
"license": "Apache-2.0",
"repository": "kemitchell/validate-npm-package-license.js",
"scripts": {
"test": "defence README.md | replace-require-self | node"
}
}
@@ -0,0 +1,12 @@
/**
* Rules in progress.
*
* Do not expect these to adhere to semver across releases.
* @type {Object}
*/
module.exports = {
plugins: ['import'],
rules: {
'import/no-deprecated': 1,
},
};
@@ -0,0 +1,284 @@
{
"AssignmentExpression": [
"left",
"right"
],
"AssignmentPattern": [
"left",
"right"
],
"ArrayExpression": [
"elements"
],
"ArrayPattern": [
"elements"
],
"ArrowFunctionExpression": [
"params",
"body"
],
"AwaitExpression": [
"argument"
],
"BlockStatement": [
"body"
],
"BinaryExpression": [
"left",
"right"
],
"BreakStatement": [
"label"
],
"CallExpression": [
"callee",
"arguments"
],
"CatchClause": [
"param",
"body"
],
"ChainExpression": [
"expression"
],
"ClassBody": [
"body"
],
"ClassDeclaration": [
"id",
"superClass",
"body"
],
"ClassExpression": [
"id",
"superClass",
"body"
],
"ConditionalExpression": [
"test",
"consequent",
"alternate"
],
"ContinueStatement": [
"label"
],
"DebuggerStatement": [],
"DoWhileStatement": [
"body",
"test"
],
"EmptyStatement": [],
"ExportAllDeclaration": [
"exported",
"source"
],
"ExportDefaultDeclaration": [
"declaration"
],
"ExportNamedDeclaration": [
"declaration",
"specifiers",
"source"
],
"ExportSpecifier": [
"exported",
"local"
],
"ExpressionStatement": [
"expression"
],
"ExperimentalRestProperty": [
"argument"
],
"ExperimentalSpreadProperty": [
"argument"
],
"ForStatement": [
"init",
"test",
"update",
"body"
],
"ForInStatement": [
"left",
"right",
"body"
],
"ForOfStatement": [
"left",
"right",
"body"
],
"FunctionDeclaration": [
"id",
"params",
"body"
],
"FunctionExpression": [
"id",
"params",
"body"
],
"Identifier": [],
"IfStatement": [
"test",
"consequent",
"alternate"
],
"ImportDeclaration": [
"specifiers",
"source"
],
"ImportDefaultSpecifier": [
"local"
],
"ImportExpression": [
"source"
],
"ImportNamespaceSpecifier": [
"local"
],
"ImportSpecifier": [
"imported",
"local"
],
"JSXAttribute": [
"name",
"value"
],
"JSXClosingElement": [
"name"
],
"JSXElement": [
"openingElement",
"children",
"closingElement"
],
"JSXEmptyExpression": [],
"JSXExpressionContainer": [
"expression"
],
"JSXIdentifier": [],
"JSXMemberExpression": [
"object",
"property"
],
"JSXNamespacedName": [
"namespace",
"name"
],
"JSXOpeningElement": [
"name",
"attributes"
],
"JSXSpreadAttribute": [
"argument"
],
"JSXText": [],
"JSXFragment": [
"openingFragment",
"children",
"closingFragment"
],
"Literal": [],
"LabeledStatement": [
"label",
"body"
],
"LogicalExpression": [
"left",
"right"
],
"MemberExpression": [
"object",
"property"
],
"MetaProperty": [
"meta",
"property"
],
"MethodDefinition": [
"key",
"value"
],
"NewExpression": [
"callee",
"arguments"
],
"ObjectExpression": [
"properties"
],
"ObjectPattern": [
"properties"
],
"Program": [
"body"
],
"Property": [
"key",
"value"
],
"RestElement": [
"argument"
],
"ReturnStatement": [
"argument"
],
"SequenceExpression": [
"expressions"
],
"SpreadElement": [
"argument"
],
"Super": [],
"SwitchStatement": [
"discriminant",
"cases"
],
"SwitchCase": [
"test",
"consequent"
],
"TaggedTemplateExpression": [
"tag",
"quasi"
],
"TemplateElement": [],
"TemplateLiteral": [
"quasis",
"expressions"
],
"ThisExpression": [],
"ThrowStatement": [
"argument"
],
"TryStatement": [
"block",
"handler",
"finalizer"
],
"UnaryExpression": [
"argument"
],
"UpdateExpression": [
"argument"
],
"VariableDeclaration": [
"declarations"
],
"VariableDeclarator": [
"id",
"init"
],
"WhileStatement": [
"test",
"body"
],
"WithStatement": [
"object",
"body"
],
"YieldExpression": [
"argument"
]
}
@@ -0,0 +1,84 @@
/*
* 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 LocalizedStrings = {
[lang: string]: {
[key: string]: string
}
};
/**
* Stores a mapping of localized strings. Can be used to find the
* closest available string for a given locale.
*/
export class MessageDictionary {
private messages: LocalizedStrings;
private defaultLocale: string;
constructor(messages: LocalizedStrings, defaultLocale: string = 'en-US') {
// Clone messages so we don't modify the original object.
// Filter out entries with falsy values which may have been caused by applying optimize-locales-plugin.
this.messages = Object.fromEntries(
Object.entries(messages).filter(([, v]) => v)
);
this.defaultLocale = defaultLocale;
}
getStringForLocale(key: string, locale: string): string {
let strings = this.messages[locale];
if (!strings) {
strings = getStringsForLocale(locale, this.messages, this.defaultLocale);
this.messages[locale] = strings;
}
let string = strings[key];
if (!string) {
throw new Error(`Could not find intl message ${key} in ${locale} locale`);
}
return string;
}
}
function getStringsForLocale(locale: string, strings: LocalizedStrings, defaultLocale = 'en-US') {
// If there is an exact match, use it.
if (strings[locale]) {
return strings[locale];
}
// Attempt to find the closest match by language.
// For example, if the locale is fr-CA (French Canadian), but there is only
// an fr-FR (France) set of strings, use that.
// This could be replaced with Intl.LocaleMatcher once it is supported.
// https://github.com/tc39/proposal-intl-localematcher
let language = getLanguage(locale);
if (strings[language]) {
return strings[language];
}
for (let key in strings) {
if (key.startsWith(language + '-')) {
return strings[key];
}
}
// Nothing close, use english.
return strings[defaultLocale];
}
function getLanguage(locale: string) {
if (Intl.Locale) {
return new Intl.Locale(locale).language;
}
return locale.split('-')[0];
}
@@ -0,0 +1,329 @@
let { list } = require('postcss')
let parser = require('postcss-value-parser')
let Browsers = require('./browsers')
let vendor = require('./vendor')
class Transition {
constructor(prefixes) {
this.props = ['transition', 'transition-property']
this.prefixes = prefixes
}
/**
* Process transition and add prefixes for all necessary properties
*/
add(decl, result) {
let prefix, prop
let add = this.prefixes.add[decl.prop]
let vendorPrefixes = this.ruleVendorPrefixes(decl)
let declPrefixes = vendorPrefixes || (add && add.prefixes) || []
let params = this.parse(decl.value)
let names = params.map(i => this.findProp(i))
let added = []
if (names.some(i => i[0] === '-')) {
return
}
for (let param of params) {
prop = this.findProp(param)
if (prop[0] === '-') continue
let prefixer = this.prefixes.add[prop]
if (!prefixer || !prefixer.prefixes) continue
for (prefix of prefixer.prefixes) {
if (vendorPrefixes && !vendorPrefixes.some(p => prefix.includes(p))) {
continue
}
let prefixed = this.prefixes.prefixed(prop, prefix)
if (prefixed !== '-ms-transform' && !names.includes(prefixed)) {
if (!this.disabled(prop, prefix)) {
added.push(this.clone(prop, prefixed, param))
}
}
}
}
params = params.concat(added)
let value = this.stringify(params)
let webkitClean = this.stringify(
this.cleanFromUnprefixed(params, '-webkit-')
)
if (declPrefixes.includes('-webkit-')) {
this.cloneBefore(decl, `-webkit-${decl.prop}`, webkitClean)
}
this.cloneBefore(decl, decl.prop, webkitClean)
if (declPrefixes.includes('-o-')) {
let operaClean = this.stringify(this.cleanFromUnprefixed(params, '-o-'))
this.cloneBefore(decl, `-o-${decl.prop}`, operaClean)
}
for (prefix of declPrefixes) {
if (prefix !== '-webkit-' && prefix !== '-o-') {
let prefixValue = this.stringify(
this.cleanOtherPrefixes(params, prefix)
)
this.cloneBefore(decl, prefix + decl.prop, prefixValue)
}
}
if (value !== decl.value && !this.already(decl, decl.prop, value)) {
this.checkForWarning(result, decl)
decl.cloneBefore()
decl.value = value
}
}
/**
* Does we already have this declaration
*/
already(decl, prop, value) {
return decl.parent.some(i => i.prop === prop && i.value === value)
}
/**
* Show transition-property warning
*/
checkForWarning(result, decl) {
if (decl.prop !== 'transition-property') {
return
}
let isPrefixed = false
let hasAssociatedProp = false
decl.parent.each(i => {
if (i.type !== 'decl') {
return undefined
}
if (i.prop.indexOf('transition-') !== 0) {
return undefined
}
let values = list.comma(i.value)
// check if current Rule's transition-property comma separated value list needs prefixes
if (i.prop === 'transition-property') {
values.forEach(value => {
let lookup = this.prefixes.add[value]
if (lookup && lookup.prefixes && lookup.prefixes.length > 0) {
isPrefixed = true
}
})
return undefined
}
// check if another transition-* prop in current Rule has comma separated value list
hasAssociatedProp = hasAssociatedProp || values.length > 1
return false
})
if (isPrefixed && hasAssociatedProp) {
decl.warn(
result,
'Replace transition-property to transition, ' +
'because Autoprefixer could not support ' +
'any cases of transition-property ' +
'and other transition-*'
)
}
}
/**
* Remove all non-webkit prefixes and unprefixed params if we have prefixed
*/
cleanFromUnprefixed(params, prefix) {
let remove = params
.map(i => this.findProp(i))
.filter(i => i.slice(0, prefix.length) === prefix)
.map(i => this.prefixes.unprefixed(i))
let result = []
for (let param of params) {
let prop = this.findProp(param)
let p = vendor.prefix(prop)
if (!remove.includes(prop) && (p === prefix || p === '')) {
result.push(param)
}
}
return result
}
cleanOtherPrefixes(params, prefix) {
return params.filter(param => {
let current = vendor.prefix(this.findProp(param))
return current === '' || current === prefix
})
}
/**
* Return new param array with different name
*/
clone(origin, name, param) {
let result = []
let changed = false
for (let i of param) {
if (!changed && i.type === 'word' && i.value === origin) {
result.push({ type: 'word', value: name })
changed = true
} else {
result.push(i)
}
}
return result
}
/**
* Add declaration if it is not exist
*/
cloneBefore(decl, prop, value) {
if (!this.already(decl, prop, value)) {
decl.cloneBefore({ prop, value })
}
}
/**
* Check property for disabled by option
*/
disabled(prop, prefix) {
let other = ['order', 'justify-content', 'align-self', 'align-content']
if (prop.includes('flex') || other.includes(prop)) {
if (this.prefixes.options.flexbox === false) {
return true
}
if (this.prefixes.options.flexbox === 'no-2009') {
return prefix.includes('2009')
}
}
return undefined
}
/**
* Find or create separator
*/
div(params) {
for (let param of params) {
for (let node of param) {
if (node.type === 'div' && node.value === ',') {
return node
}
}
}
return { after: ' ', type: 'div', value: ',' }
}
/**
* Find property name
*/
findProp(param) {
let prop = param[0].value
if (/^\d/.test(prop)) {
for (let [i, token] of param.entries()) {
if (i !== 0 && token.type === 'word') {
return token.value
}
}
}
return prop
}
/**
* Parse properties list to array
*/
parse(value) {
let ast = parser(value)
let result = []
let param = []
for (let node of ast.nodes) {
param.push(node)
if (node.type === 'div' && node.value === ',') {
result.push(param)
param = []
}
}
result.push(param)
return result.filter(i => i.length > 0)
}
/**
* Process transition and remove all unnecessary properties
*/
remove(decl) {
let params = this.parse(decl.value)
params = params.filter(i => {
let prop = this.prefixes.remove[this.findProp(i)]
return !prop || !prop.remove
})
let value = this.stringify(params)
if (decl.value === value) {
return
}
if (params.length === 0) {
decl.remove()
return
}
let double = decl.parent.some(i => {
return i.prop === decl.prop && i.value === value
})
let smaller = decl.parent.some(i => {
return i !== decl && i.prop === decl.prop && i.value.length > value.length
})
if (double || smaller) {
decl.remove()
return
}
decl.value = value
}
/**
* Check if transition prop is inside vendor specific rule
*/
ruleVendorPrefixes(decl) {
let { parent } = decl
if (parent.type !== 'rule') {
return false
} else if (!parent.selector.includes(':-')) {
return false
}
let selectors = Browsers.prefixes().filter(s =>
parent.selector.includes(':' + s)
)
return selectors.length > 0 ? selectors : false
}
/**
* Return properties string from array
*/
stringify(params) {
if (params.length === 0) {
return ''
}
let nodes = []
for (let param of params) {
if (param[param.length - 1].type !== 'div') {
param.push(this.div(params))
}
nodes = nodes.concat(param)
}
if (nodes[0].type === 'div') {
nodes = nodes.slice(1)
}
if (nodes[nodes.length - 1].type === 'div') {
nodes = nodes.slice(0, +-2 + 1 || undefined)
}
return parser.stringify({ nodes })
}
}
module.exports = Transition
@@ -0,0 +1,86 @@
/**
* Copyright (c) 2018 The xterm.js authors. All rights reserved.
* @license MIT
*/
const RENDER_DEBOUNCE_THRESHOLD_MS = 1000; // 1 Second
import { IRenderDebouncer } from 'browser/Types';
/**
* Debounces calls to update screen readers to update at most once configurable interval of time.
*/
export class TimeBasedDebouncer implements IRenderDebouncer {
private _rowStart: number | undefined;
private _rowEnd: number | undefined;
private _rowCount: number | undefined;
// The last moment that the Terminal was refreshed at
private _lastRefreshMs = 0;
// Whether a trailing refresh should be triggered due to a refresh request that was throttled
private _additionalRefreshRequested = false;
private _refreshTimeoutID: number | undefined;
constructor(
private _renderCallback: (start: number, end: number) => void,
private readonly _debounceThresholdMS = RENDER_DEBOUNCE_THRESHOLD_MS
) {
}
public dispose(): void {
if (this._refreshTimeoutID) {
clearTimeout(this._refreshTimeoutID);
}
}
public refresh(rowStart: number | undefined, rowEnd: number | undefined, rowCount: number): void {
this._rowCount = rowCount;
// Get the min/max row start/end for the arg values
rowStart = rowStart !== undefined ? rowStart : 0;
rowEnd = rowEnd !== undefined ? rowEnd : this._rowCount - 1;
// Set the properties to the updated values
this._rowStart = this._rowStart !== undefined ? Math.min(this._rowStart, rowStart) : rowStart;
this._rowEnd = this._rowEnd !== undefined ? Math.max(this._rowEnd, rowEnd) : rowEnd;
// Only refresh if the time since last refresh is above a threshold, otherwise wait for
// enough time to pass before refreshing again.
const refreshRequestTime: number = Date.now();
if (refreshRequestTime - this._lastRefreshMs >= this._debounceThresholdMS) {
// Enough time has lapsed since the last refresh; refresh immediately
this._lastRefreshMs = refreshRequestTime;
this._innerRefresh();
} else if (!this._additionalRefreshRequested) {
// This is the first additional request throttled; set up trailing refresh
const elapsed = refreshRequestTime - this._lastRefreshMs;
const waitPeriodBeforeTrailingRefresh = this._debounceThresholdMS - elapsed;
this._additionalRefreshRequested = true;
this._refreshTimeoutID = window.setTimeout(() => {
this._lastRefreshMs = Date.now();
this._innerRefresh();
this._additionalRefreshRequested = false;
this._refreshTimeoutID = undefined; // No longer need to clear the timeout
}, waitPeriodBeforeTrailingRefresh);
}
}
private _innerRefresh(): void {
// Make sure values are set
if (this._rowStart === undefined || this._rowEnd === undefined || this._rowCount === undefined) {
return;
}
// Clamp values
const start = Math.max(this._rowStart, 0);
const end = Math.min(this._rowEnd, this._rowCount - 1);
// Reset debouncer (this happens before render callback as the render could trigger it again)
this._rowStart = undefined;
this._rowEnd = undefined;
// Run render callback
this._renderCallback(start, end);
}
}
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,kBAAkB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,6FAAgB,CAAC;IAC5E,qBAAqB,CAAC,6IAAsB,CAAC;IAC7C,UAAU,CAAC,gBAAE,CAAC;IACd,eAAe,CAAC,mGAAe,CAAC;IAChC,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,kFAAY,CAAC;YAAE,KAAK,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,0FAAa,CAAC;YAAE,OAAO,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,0FAAa,CAAC;QAAA,GAAG,CAAC,CAAC;IACxN,gBAAgB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,4EAAa,CAAC;AACvD","sources":["packages/@react-aria/grid/intl/ko-KR.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":"ko-KR.main.js.map"}
@@ -0,0 +1,24 @@
import { addUniqueItem, removeItem } from 'motion-utils';
import { compareByDepth } from './compare-by-depth.mjs';
class FlatTree {
constructor() {
this.children = [];
this.isDirty = false;
}
add(child) {
addUniqueItem(this.children, child);
this.isDirty = true;
}
remove(child) {
removeItem(this.children, child);
this.isDirty = true;
}
forEach(callback) {
this.isDirty && this.children.sort(compareByDepth);
this.isDirty = false;
this.children.forEach(callback);
}
}
export { FlatTree };
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"2":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"WB XB YB I XC MC YC yC zC","2":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB 0C 1C","194":"SB TB UB VB"},D:{"1":"MC YC","2":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC"},E:{"2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"2":"0 1 2 3 4 5 6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z FD GD HD ID NC uC JD OC"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"2":"TC J I iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C H NC uC OC"},L:{"2":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"2":"PC"},P:{"2":"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:{"2":"zD"},R:{"2":"0D"},S:{"2":"1D 2D"}},B:6,C:"Temporal",D:true};
@@ -0,0 +1,127 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _mayContainChildComponent = _interopRequireDefault(require("../util/mayContainChildComponent"));
var _mayHaveAccessibleLabel = _interopRequireDefault(require("../util/mayHaveAccessibleLabel"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview Enforce label tags have an associated control.
* @author Jesse Beach
*
*
*/
// ----------------------------------------------------------------------------
// Rule Definition
// ----------------------------------------------------------------------------
var errorMessage = 'A form label must be associated with a control.';
var errorMessageNoLabel = 'A form label must have accessible text.';
var schema = (0, _schemas.generateObjSchema)({
labelComponents: _schemas.arraySchema,
labelAttributes: _schemas.arraySchema,
controlComponents: _schemas.arraySchema,
assert: {
description: 'Assert that the label has htmlFor, a nested label, both or either',
type: 'string',
"enum": ['htmlFor', 'nesting', 'both', 'either']
},
depth: {
description: 'JSX tree depth limit to check for accessible label',
type: 'integer',
minimum: 0
}
});
function validateID(node, context) {
var _settings$jsxA11y$at, _settings$jsxA11y, _settings$jsxA11y$att;
var settings = context.settings;
var htmlForAttributes = (_settings$jsxA11y$at = (_settings$jsxA11y = settings['jsx-a11y']) === null || _settings$jsxA11y === void 0 ? void 0 : (_settings$jsxA11y$att = _settings$jsxA11y.attributes) === null || _settings$jsxA11y$att === void 0 ? void 0 : _settings$jsxA11y$att["for"]) !== null && _settings$jsxA11y$at !== void 0 ? _settings$jsxA11y$at : ['htmlFor'];
for (var i = 0; i < htmlForAttributes.length; i += 1) {
var attribute = htmlForAttributes[i];
if ((0, _jsxAstUtils.hasProp)(node.attributes, attribute)) {
var htmlForAttr = (0, _jsxAstUtils.getProp)(node.attributes, attribute);
var htmlForValue = (0, _jsxAstUtils.getPropValue)(htmlForAttr);
return htmlForAttr !== false && !!htmlForValue;
}
}
return false;
}
var _default = exports["default"] = {
meta: {
docs: {
description: 'Enforce that a `label` tag has a text label and an associated control.',
url: 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md'
},
schema: [schema]
},
create: function create(context) {
var options = context.options[0] || {};
var labelComponents = options.labelComponents || [];
var assertType = options.assert || 'either';
var componentNames = ['label'].concat(labelComponents);
var elementType = (0, _getElementType["default"])(context);
var rule = function rule(node) {
if (componentNames.indexOf(elementType(node.openingElement)) === -1) {
return;
}
var controlComponents = ['input', 'meter', 'output', 'progress', 'select', 'textarea'].concat(options.controlComponents || []);
// Prevent crazy recursion.
var recursionDepth = Math.min(options.depth === undefined ? 2 : options.depth, 25);
var hasLabelId = validateID(node.openingElement, context);
// Check for multiple control components.
var hasNestedControl = controlComponents.some(function (name) {
return (0, _mayContainChildComponent["default"])(node, name, recursionDepth, elementType);
});
var hasAccessibleLabel = (0, _mayHaveAccessibleLabel["default"])(node, recursionDepth, options.labelAttributes, elementType, controlComponents);
if (!hasAccessibleLabel) {
context.report({
node: node.openingElement,
message: errorMessageNoLabel
});
return;
}
switch (assertType) {
case 'htmlFor':
if (hasLabelId) {
return;
}
break;
case 'nesting':
if (hasNestedControl) {
return;
}
break;
case 'both':
if (hasLabelId && hasNestedControl) {
return;
}
break;
case 'either':
if (hasLabelId || hasNestedControl) {
return;
}
break;
default:
break;
}
// htmlFor case
context.report({
node: node.openingElement,
message: errorMessage
});
};
// Create visitor selectors.
return {
JSXElement: rule
};
}
};
module.exports = exports.default;
@@ -0,0 +1,160 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
var operatorLinebreak = utils.createRule({
name: "operator-linebreak",
package: "js",
meta: {
type: "layout",
docs: {
description: "Enforce consistent linebreak style for operators"
},
schema: [
{
oneOf: [
{
type: "string",
enum: ["after", "before", "none"]
},
{
type: "null"
}
]
},
{
type: "object",
properties: {
overrides: {
type: "object",
additionalProperties: {
type: "string",
enum: ["after", "before", "none", "ignore"]
}
}
},
additionalProperties: false
}
],
fixable: "code",
messages: {
operatorAtBeginning: "'{{operator}}' should be placed at the beginning of the line.",
operatorAtEnd: "'{{operator}}' should be placed at the end of the line.",
badLinebreak: "Bad line breaking before and after '{{operator}}'.",
noLinebreak: "There should be no line break before or after '{{operator}}'."
}
},
create(context) {
const usedDefaultGlobal = !context.options[0];
const globalStyle = context.options[0] || "after";
const options = context.options[1] || {};
const styleOverrides = options.overrides ? Object.assign({}, options.overrides) : {};
if (usedDefaultGlobal && !styleOverrides["?"])
styleOverrides["?"] = "before";
if (usedDefaultGlobal && !styleOverrides[":"])
styleOverrides[":"] = "before";
const sourceCode = context.sourceCode;
function getFixer(operatorToken, desiredStyle) {
return (fixer) => {
const tokenBefore = sourceCode.getTokenBefore(operatorToken);
const tokenAfter = sourceCode.getTokenAfter(operatorToken);
const textBefore = sourceCode.text.slice(tokenBefore.range[1], operatorToken.range[0]);
const textAfter = sourceCode.text.slice(operatorToken.range[1], tokenAfter.range[0]);
const hasLinebreakBefore = !utils.isTokenOnSameLine(tokenBefore, operatorToken);
const hasLinebreakAfter = !utils.isTokenOnSameLine(operatorToken, tokenAfter);
let newTextBefore, newTextAfter;
if (hasLinebreakBefore !== hasLinebreakAfter && desiredStyle !== "none") {
if (sourceCode.getTokenBefore(operatorToken, { includeComments: true }) !== tokenBefore && sourceCode.getTokenAfter(operatorToken, { includeComments: true }) !== tokenAfter) {
return null;
}
newTextBefore = textAfter;
newTextAfter = textBefore;
} else {
const LINEBREAK_REGEX = utils.createGlobalLinebreakMatcher();
newTextBefore = desiredStyle === "before" || textBefore.trim() ? textBefore : textBefore.replace(LINEBREAK_REGEX, "");
newTextAfter = desiredStyle === "after" || textAfter.trim() ? textAfter : textAfter.replace(LINEBREAK_REGEX, "");
if (newTextBefore === textBefore && newTextAfter === textAfter)
return null;
}
if (newTextAfter === "" && tokenAfter.type === "Punctuator" && "+-".includes(operatorToken.value) && tokenAfter.value === operatorToken.value) {
newTextAfter += " ";
}
return fixer.replaceTextRange([tokenBefore.range[1], tokenAfter.range[0]], newTextBefore + operatorToken.value + newTextAfter);
};
}
function validateNode(node, rightSide, operator) {
const operatorToken = sourceCode.getTokenBefore(rightSide, (token) => token.value === operator);
const leftToken = sourceCode.getTokenBefore(operatorToken);
const rightToken = sourceCode.getTokenAfter(operatorToken);
const operatorStyleOverride = styleOverrides[operator];
const style = operatorStyleOverride || globalStyle;
const fix = getFixer(operatorToken, style);
if (utils.isTokenOnSameLine(leftToken, operatorToken) && utils.isTokenOnSameLine(operatorToken, rightToken)) ; else if (operatorStyleOverride !== "ignore" && !utils.isTokenOnSameLine(leftToken, operatorToken) && !utils.isTokenOnSameLine(operatorToken, rightToken)) {
context.report({
node,
loc: operatorToken.loc,
messageId: "badLinebreak",
data: {
operator
},
fix
});
} else if (style === "before" && utils.isTokenOnSameLine(leftToken, operatorToken)) {
context.report({
node,
loc: operatorToken.loc,
messageId: "operatorAtBeginning",
data: {
operator
},
fix
});
} else if (style === "after" && utils.isTokenOnSameLine(operatorToken, rightToken)) {
context.report({
node,
loc: operatorToken.loc,
messageId: "operatorAtEnd",
data: {
operator
},
fix
});
} else if (style === "none") {
context.report({
node,
loc: operatorToken.loc,
messageId: "noLinebreak",
data: {
operator
},
fix
});
}
}
function validateBinaryExpression(node) {
validateNode(node, node.right, node.operator);
}
return {
BinaryExpression: validateBinaryExpression,
LogicalExpression: validateBinaryExpression,
AssignmentExpression: validateBinaryExpression,
VariableDeclarator(node) {
if (node.init)
validateNode(node, node.init, "=");
},
PropertyDefinition(node) {
if (node.value)
validateNode(node, node.value, "=");
},
ConditionalExpression(node) {
validateNode(node, node.consequent, "?");
validateNode(node, node.alternate, ":");
}
};
}
});
module.exports = operatorLinebreak;
@@ -0,0 +1 @@
"use strict";var m=Object.defineProperty;var a=(r,e)=>m(r,"name",{value:e,configurable:!0});var q=require("../../register-2sWVXuRQ.cjs");require("../../get-pipe-path-BoR10qr8.cjs");var t=require("../../register-D46fvsV_.cjs");require("../../require-D4F1Lv60.cjs");var n=require("../../node-features-roYmp9jK.cjs");require("node:module"),require("node:worker_threads"),require("node:url"),require("module"),require("node:path"),require("../../temporary-directory-B83uKxJF.cjs"),require("node:os"),require("get-tsconfig"),require("node:fs"),require("../../index-gckBtVBf.cjs"),require("esbuild"),require("node:crypto"),require("../../client-D6NvIMSC.cjs"),require("node:net"),require("node:util"),require("../../index-BWFBUo6r.cjs");const c=a((r,e)=>{if(!e||typeof e=="object"&&!e.parentURL)throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()");const i=typeof e=="string",u=i?e:e.parentURL,s=Date.now().toString(),o=t.register({namespace:s});return!n.isFeatureSupported(n.esmLoadReadFile)&&!t.isBarePackageNamePattern.test(r)&&t.cjsExtensionPattern.test(r)?Promise.resolve(o.require(r,u)):q.register({namespace:s,...i?{}:e}).import(r,u)},"tsImport");exports.register=q.register,exports.tsImport=c;
@@ -0,0 +1,22 @@
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "mod", () => $a5090d6430502238$export$842a2cf37af977e1);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ function $a5090d6430502238$export$842a2cf37af977e1(amount, numerator) {
return amount - numerator * Math.floor(amount / numerator);
}
//# sourceMappingURL=utils.main.js.map
@@ -0,0 +1,692 @@
// Type definitions for axe-core
// Project: https://github.com/dequelabs/axe-core
declare namespace axe {
type ImpactValue = 'minor' | 'moderate' | 'serious' | 'critical' | null;
type TagValue = string;
type ReporterVersion = 'v1' | 'v2' | 'raw' | 'rawEnv' | 'no-passes';
type RunOnlyType = 'rule' | 'rules' | 'tag' | 'tags';
type resultGroups = 'inapplicable' | 'passes' | 'incomplete' | 'violations';
type AriaAttrsType =
| 'boolean'
| 'nmtoken'
| 'mntokens'
| 'idref'
| 'idrefs'
| 'string'
| 'decimal'
| 'int';
type AriaRolesType = 'abstract' | 'widget' | 'structure' | 'landmark';
type DpubRolesType =
| 'section'
| 'landmark'
| 'link'
| 'listitem'
| 'img'
| 'navigation'
| 'note'
| 'separator'
| 'none'
| 'sectionhead';
type HtmlContentTypes =
| 'flow'
| 'sectioning'
| 'heading'
| 'phrasing'
| 'embedded'
| 'interactive';
// Array of length 2 or greater
type MultiArray<T> = [T, T, ...T[]];
// Selectors within a frame
type BaseSelector = string;
type ShadowDomSelector = MultiArray<BaseSelector>;
type CrossTreeSelector = BaseSelector | ShadowDomSelector;
type LabelledShadowDomSelector = { fromShadowDom: ShadowDomSelector };
// Cross-frame selectors
type FramesSelector = Array<CrossTreeSelector | LabelledShadowDomSelector>;
type UnlabelledFrameSelector = CrossTreeSelector[];
type LabelledFramesSelector = { fromFrames: MultiArray<FramesSelector[0]> };
/**
* @deprecated Use UnlabelledFrameSelector instead
*/
type CrossFrameSelector = UnlabelledFrameSelector;
// Context options
type Selector =
| Node
| BaseSelector
| LabelledShadowDomSelector
| LabelledFramesSelector;
type SelectorList = Array<Selector | FramesSelector> | NodeList;
type ContextProp = Selector | SelectorList;
type ContextObject =
| {
include: ContextProp;
exclude?: ContextProp;
}
| {
exclude: ContextProp;
include?: ContextProp;
};
type ContextSpec = ContextProp | ContextObject;
/** Synonym to ContextSpec */
type ElementContext = ContextSpec;
type SerialSelector =
| BaseSelector
| LabelledShadowDomSelector
| LabelledFramesSelector;
type SerialFrameSelector = SerialSelector | FramesSelector;
type SerialSelectorList = Array<SerialFrameSelector>;
type SerialContextObject =
| {
include: SerialSelector | SerialSelectorList;
exclude?: SerialSelector | SerialSelectorList;
}
| {
exclude: SerialSelector | SerialSelectorList;
include?: SerialSelector | SerialSelectorList;
};
interface FrameContextObject {
include: UnlabelledFrameSelector[];
exclude: UnlabelledFrameSelector[];
}
type RunCallback<T = AxeResults> = (error: Error, results: T) => void;
interface TestEngine {
name: string;
version: string;
}
interface TestRunner {
name: string;
}
interface TestEnvironment {
userAgent: string;
windowWidth: number;
windowHeight: number;
orientationAngle?: number;
orientationType?: string;
}
interface RunOnly {
type: RunOnlyType;
values: TagValue[] | string[];
}
interface RuleObject {
[key: string]: {
enabled: boolean;
};
}
interface RunOptions {
runOnly?: RunOnly | TagValue[] | string[] | string;
rules?: RuleObject;
reporter?: ReporterVersion | string;
resultTypes?: resultGroups[];
selectors?: boolean;
ancestry?: boolean;
xpath?: boolean;
absolutePaths?: boolean;
iframes?: boolean;
elementRef?: boolean;
frameWaitTime?: number;
preload?: boolean | PreloadOptions;
performanceTimer?: boolean;
pingWaitTime?: number;
}
interface PreloadOptions {
assets: string[];
timeout?: number;
}
interface AxeResults extends EnvironmentData {
toolOptions: RunOptions;
passes: Result[];
violations: Result[];
incomplete: IncompleteResult[];
inapplicable: Result[];
}
interface Result {
description: string;
help: string;
helpUrl: string;
id: string;
impact?: ImpactValue;
tags: TagValue[];
nodes: NodeResult[];
}
interface IncompleteResult extends Result {
error?: Omit<RuleError, 'errorNode'>;
}
interface NodeResult {
html: string;
impact?: ImpactValue;
target: UnlabelledFrameSelector;
xpath?: string[];
ancestry?: UnlabelledFrameSelector;
any: CheckResult[];
all: CheckResult[];
none: CheckResult[];
failureSummary?: string;
element?: HTMLElement;
}
interface CheckResult {
id: string;
impact: string;
message: string;
data: any;
relatedNodes?: RelatedNode[];
}
interface RelatedNode {
html: string;
target: UnlabelledFrameSelector;
xpath?: string[];
ancestry?: UnlabelledFrameSelector;
element?: HTMLElement;
}
interface RuleLocale {
[key: string]: {
description: string;
help: string;
};
}
interface CheckMessages {
pass: string | { [key: string]: string };
fail: string | { [key: string]: string };
incomplete?: string | { [key: string]: string };
}
interface RuleError {
name: string;
message: string;
stack: string;
ruleId?: string;
method?: string;
cause?: SerialError;
errorNode?: SerialDqElement;
}
interface SerialError {
message: string;
stack: string;
name: string;
cause?: SerialError;
}
interface CheckLocale {
[key: string]: CheckMessages;
}
interface Locale {
lang?: string;
rules?: RuleLocale;
checks?: CheckLocale;
}
interface AriaAttrs {
type: AriaAttrsType;
values?: string[];
allowEmpty?: boolean;
global?: boolean;
unsupported?: boolean;
}
interface AriaRoles {
type: AriaRolesType | DpubRolesType;
requiredContext?: string[];
requiredOwned?: string[];
requiredAttrs?: string[];
allowedAttrs?: string[];
nameFromContent?: boolean;
unsupported?: boolean;
}
interface HtmlElmsVariant {
contentTypes?: HtmlContentTypes[];
allowedRoles: boolean | string[];
noAriaAttrs?: boolean;
shadowRoot?: boolean;
implicitAttrs?: { [key: string]: string };
namingMethods?: string[];
}
interface HtmlElms extends HtmlElmsVariant {
variant?: { [key: string]: HtmlElmsVariant };
}
interface Standards {
ariaAttrs?: { [key: string]: AriaAttrs };
ariaRoles?: { [key: string]: AriaRoles };
htmlElms?: { [key: string]: HtmlElms };
cssColors?: { [key: string]: number[] };
}
interface Spec {
branding?: string | Branding;
reporter?: ReporterVersion | string | AxeReporter;
checks?: Check[];
rules?: Rule[];
standards?: Standards;
locale?: Locale;
disableOtherRules?: boolean;
axeVersion?: string;
noHtml?: boolean;
allowedOrigins?: string[];
// Deprecated - do not use.
ver?: string;
}
/**
* @deprecated Use branding: string instead to set the application key in help URLs
*/
interface Branding {
brand?: string;
application?: string;
}
interface CheckHelper {
async: () => (result: boolean | undefined | Error) => void;
data: (data: unknown) => void;
relatedNodes: (nodes: Element[]) => void;
}
interface AfterResult {
id: string;
data?: unknown;
relatedNodes: SerialDqElement[];
result: boolean | undefined;
node: SerialDqElement;
}
interface Check {
id: string;
evaluate?:
| string
| ((
this: CheckHelper,
node: Element,
options: unknown,
virtualNode: VirtualNode
) => boolean | undefined | void);
after?:
| string
| ((results: AfterResult[], options: unknown) => AfterResult[]);
options?: any;
matches?: string;
enabled?: boolean;
metadata?: {
impact?: ImpactValue;
messages?: CheckMessages;
};
}
interface Rule {
id: string;
selector?: string;
impact?: ImpactValue;
excludeHidden?: boolean;
enabled?: boolean;
pageLevel?: boolean;
any?: string[];
all?: string[];
none?: string[];
tags?: string[];
matches?: string | ((node: Element, virtualNode: VirtualNode) => boolean);
reviewOnFail?: boolean;
actIds?: string[];
metadata?: Omit<RuleMetadata, 'ruleId' | 'tags' | 'actIds'>;
}
interface AxePlugin {
id: string;
run(...args: any[]): any;
commands: {
id: string;
callback(...args: any[]): void;
}[];
cleanup?(callback: Function): void;
}
interface RuleMetadata {
ruleId: string;
description: string;
help: string;
helpUrl: string;
tags: string[];
actIds?: string[];
}
interface SerialDqElement {
source: string;
nodeIndexes: number[];
selector: UnlabelledFrameSelector;
xpath: string[];
ancestry: UnlabelledFrameSelector;
}
interface DqElement extends SerialDqElement {
element: Element;
toJSON(): SerialDqElement;
}
interface DqElementConstructor {
new (elm: Element, options?: { absolutePaths?: boolean }): DqElement;
mergeSpecs(
childSpec: SerialDqElement,
parentSpec: SerialDqElement
): SerialDqElement;
}
interface PartialRuleResult {
id: string;
result: 'inapplicable';
pageLevel: boolean;
impact: null;
nodes: Array<Record<string, unknown>>;
}
interface PartialResult {
frames: SerialDqElement[];
results: PartialRuleResult[];
environmentData?: EnvironmentData;
}
type PartialResults = Array<PartialResult | null>;
interface FrameContext {
frameSelector: CrossTreeSelector;
frameContext: FrameContextObject;
}
interface RawCheckResult
extends Omit<CheckResult, 'relatedNodes' | 'impact'> {
relatedNodes?: Array<SerialDqElement | DqElement>;
impact?: ImpactValue;
}
interface RawNodeResult<T extends 'passed' | 'failed' | 'cantTell'> {
node: SerialDqElement | DqElement;
any: RawCheckResult[];
all: RawCheckResult[];
none: RawCheckResult[];
impact: ImpactValue | undefined;
result: T;
}
interface RawResult extends Omit<Result, 'nodes'> {
inapplicable: Array<never>;
passes: RawNodeResult<'passed'>[];
incomplete: RawNodeResult<'cantTell'>[];
violations: RawNodeResult<'failed'>[];
pageLevel: boolean;
result: 'failed' | 'passed' | 'incomplete' | 'inapplicable';
}
type AxeReporter<T = unknown> = (
rawResults: RawResult[],
option: RunOptions,
resolve: (report: T) => void,
reject: (error: Error) => void
) => void;
interface VirtualNode {
actualNode?: Node;
shadowId?: string;
children?: VirtualNode[];
parent?: VirtualNode;
attr(attr: string): string | null;
hasAttr(attr: string): boolean;
props: { [key: string]: unknown };
boundingClientRect: DOMRect;
}
type GridCell = VirtualNode[];
interface Grid {
container: VirtualNode | null;
cells: unknown; // opaque implementation detail
boundaries?: DOMRect;
toGridIndex(num: number): number;
getCellFromPoint(point: { x: number; y: number }): GridCell;
loopGridPosition(
gridPosition: DOMRect,
callback: (gridCell: GridCell, pos: { row: number; col: number }) => void
): void;
getGridPositionOfRect(
rect: { top: number; right: number; bottom: number; left: number },
margin?: number
): DOMRect;
}
interface CustomNodeSerializer<T = SerialDqElement> {
toSpec: (dqElm: DqElement) => T;
mergeSpecs: (nodeSpec: T, parentFrameSpec: T) => T;
}
interface NodeSerializer {
update: <T>(serializer: CustomNodeSerializer<T>) => void;
toSpec: (node: Element | VirtualNode) => SerialDqElement;
dqElmToSpec: (
dqElm: DqElement | SerialDqElement,
options?: RunOptions
) => SerialDqElement;
mergeSpecs: (
nodeSpec: SerialDqElement,
parentFrameSpec: SerialDqElement
) => SerialDqElement;
}
interface Utils {
getFrameContexts: (
context?: ElementContext,
options?: RunOptions
) => FrameContext[];
shadowSelect: (selector: CrossTreeSelector) => Element | null;
shadowSelectAll: (selector: CrossTreeSelector) => Element[];
getStandards(): Required<Standards>;
isContextSpec: (context: unknown) => context is ContextSpec;
isContextObject: (context: unknown) => context is ContextObject;
isContextProp: (context: unknown) => context is ContextProp;
isLabelledFramesSelector: (
selector: unknown
) => selector is LabelledFramesSelector;
isLabelledShadowDomSelector: (
selector: unknown
) => selector is LabelledShadowDomSelector;
RuleError: new (options: {
error: Error;
ruleId?: string;
method?: string;
errorNode?: SerialDqElement;
}) => RuleError;
serializeError: (error: Error) => SerialError;
DqElement: DqElementConstructor;
uuid: (
options?: { random?: Uint8Array | Array<number> },
buf?: Uint8Array | Array<number>,
offset?: number
) => string | Uint8Array | Array<number>;
nodeSerializer: NodeSerializer;
}
interface Aria {
getRoleType: (role: string | Element | VirtualNode | null) => string | null;
}
interface Dom {
isFocusable: (node: Element | VirtualNode) => boolean;
isNativelyFocusable: (node: Element | VirtualNode) => boolean;
getNodeGrid: (node: Node | VirtualNode) => Grid;
}
type AccessibleTextOptions = {
inControlContext?: boolean;
inLabelledByContext?: boolean;
};
interface Text {
accessibleText: (
element: Element,
options?: AccessibleTextOptions
) => string;
}
interface Commons {
aria: Aria;
dom: Dom;
text: Text;
}
interface EnvironmentData {
testEngine: TestEngine;
testRunner: TestRunner;
testEnvironment: TestEnvironment;
url: string;
timestamp: string;
}
let version: string;
let plugins: any;
let utils: Utils;
let commons: Commons;
/**
* Source string to use as an injected script in Selenium
*/
let source: string;
/**
* Object for axe Results
*/
var AxeResults: AxeResults;
/**
* Runs a number of rules against the provided HTML page and returns the resulting issue list
*
* @param {ElementContext} context Optional The `Context` specification object @see Context
* @param {RunOptions} options Optional Options passed into rules or checks, temporarily modifying them.
* @param {RunCallback} callback Optional The function to invoke when analysis is complete.
* @returns {Promise<AxeResults>|void} If the callback was not defined, axe will return a Promise.
*/
function run<T = AxeResults>(context?: ElementContext): Promise<T>;
function run<T = AxeResults>(options: RunOptions): Promise<T>;
function run<T = AxeResults>(
callback: (error: Error, results: T) => void
): void;
function run<T = AxeResults>(
context: ElementContext,
callback: RunCallback<T>
): void;
function run<T = AxeResults>(
options: RunOptions,
callback: RunCallback<T>
): void;
function run<T = AxeResults>(
context: ElementContext,
options: RunOptions
): Promise<T>;
function run<T = AxeResults>(
context: ElementContext,
options: RunOptions,
callback: RunCallback<T>
): void;
/**
* Method for configuring the data format used by axe. Helpful for adding new
* rules, which must be registered with the library to execute.
* @param {Spec} Spec Object with valid `branding`, `reporter`, `checks` and `rules` data
*/
function configure(spec: Spec): void;
/**
* Run axe in the current window only
* @param {ElementContext} context Optional The `Context` specification object @see Context
* @param {RunOptions} options Optional Options passed into rules or checks, temporarily modifying them.
* @returns {Promise<PartialResult>} Partial result, for use in axe.finishRun.
*/
function runPartial(
context: ElementContext,
options: RunOptions
): Promise<PartialResult>;
/**
* Create a report from axe.runPartial results
* @param {PartialResult[]} partialResults Results from axe.runPartial, calls in different frames on the page.
* @param {RunOptions} options Optional Options passed into rules or checks, temporarily modifying them.
*/
function finishRun(
partialResults: PartialResults,
options: RunOptions
): Promise<AxeResults>;
/**
* Searches and returns rules that contain a tag in the list of tags.
* @param {Array} tags Optional array of tags
* @return {Array} Array of rules
*/
function getRules(tags?: string[]): RuleMetadata[];
/**
* Restores the default axe configuration
*/
function reset(): void;
/**
* Function to register a plugin configuration in document and its subframes
* @param {Object} plugin A plugin configuration object
*/
function registerPlugin(plugin: AxePlugin): void;
/**
* Function to clean up plugin configuration in document and its subframes
*/
function cleanup(): void;
/**
* Set up alternative frame communication
*/
function frameMessenger(frameMessenger: FrameMessenger): void;
/**
* Setup axe-core so axe.common functions can work properly.
*/
function setup(node?: Element | Document): VirtualNode;
/**
* Clean up axe-core tree and caches. `axe.run` will call this function at the end of the run so there's no need to call it yourself afterwards.
*/
function teardown(): void;
/**
* Check if a reporter is registered
*/
function hasReporter(reporterName: string): boolean;
/**
* Get a reporter based the name it is registered with
*/
function getReporter<T>(reporterName: string): AxeReporter<T>;
/**
* Register a new reporter, optionally setting it as the default
*/
function addReporter<T>(
reporterName: string,
reporter: AxeReporter<T>,
isDefault?: boolean
): void;
// axe.frameMessenger
type FrameMessenger = {
open: (topicHandler: TopicHandler) => Close | void;
post: (
frameWindow: Window,
data: TopicData,
replyHandler: ReplyHandler
) => boolean | void;
};
type Close = Function;
type TopicHandler = (data: TopicData, responder: Responder) => void;
type ReplyHandler = (
message: any | Error,
keepalive: boolean,
responder: Responder
) => void;
type Responder = (
message: any | Error,
keepalive?: boolean,
replyHandler?: ReplyHandler
) => void;
type TopicData = { topic: string } & ReplyData;
type ReplyData = { channelId: string; message: any; keepalive: boolean };
}
export = axe;
@@ -0,0 +1 @@
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAEM,SAAS,0CAAa,IAAoB,EAAE,gBAA0B;IAC3E,IAAI,CAAC,MACH,OAAO;IAET,IAAI,QAAQ,OAAO,gBAAgB,CAAC;IACpC,IAAI,eAAe,gBAAgB,IAAI,CAAC,MAAM,QAAQ,GAAG,MAAM,SAAS,GAAG,MAAM,SAAS;IAE1F,IAAI,gBAAgB,kBAClB,eAAe,KAAK,YAAY,KAAK,KAAK,YAAY,IAAI,KAAK,WAAW,KAAK,KAAK,WAAW;IAGjG,OAAO;AACT","sources":["packages/@react-aria/utils/src/isScrollable.ts"],"sourcesContent":["/*\n * Copyright 2024 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 function isScrollable(node: Element | null, checkForOverflow?: boolean): boolean {\n if (!node) {\n return false;\n }\n let style = window.getComputedStyle(node);\n let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);\n\n if (isScrollable && checkForOverflow) {\n isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;\n }\n\n return isScrollable;\n}\n"],"names":[],"version":3,"file":"isScrollable.main.js.map"}
@@ -0,0 +1,826 @@
export default `flf2a$ 8 7 20 -1 8
BARBWIRE 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,85 @@
{
"name": "jsx-ast-utils",
"version": "3.3.5",
"description": "AST utility module for statically analyzing JSX",
"main": "lib/index.js",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated && npm run build",
"prebuild": "rimraf lib",
"build": "babel src --out-dir lib",
"prepublishOnly": "safe-publish-latest && npm test",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prelint": "npm run build",
"lint": "eslint .",
"pretest": "npm run lint",
"test": "npm run tests-only --",
"posttest": "aud --production",
"tests-only": "jest --coverage",
"test:watch": "npm run tests-only -- --watch",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"devDependencies": {
"@babel/core": "^7.22.9",
"@babel/eslint-parser": "^7.22.9",
"@babel/parser": "^7.22.7",
"aud": "^2.0.3",
"auto-changelog": "^2.4.0",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-jest": "^20.0.3",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-replace-object-assign": "^1.0.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babylon": "^6.18.0",
"eslint": "^8.45.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.27.5",
"flow-parser": "^0.126.1",
"in-publish": "^2.0.1",
"jest": "^20.0.4",
"jest-cli": "^20.0.4",
"npmignore": "^0.3.0",
"object.entries": "^1.1.6",
"object.fromentries": "^2.0.6",
"rimraf": "^2.7.1",
"safe-publish-latest": "^2.0.0"
},
"engines": {
"node": ">=4.0"
},
"keywords": [
"jsx",
"ast",
"lint",
"eslint"
],
"author": "Ethan Cohen",
"repository": {
"type": "git",
"url": "https://github.com/jsx-eslint/jsx-ast-utils"
},
"license": "MIT",
"dependencies": {
"array-includes": "^3.1.6",
"array.prototype.flat": "^1.3.1",
"object.assign": "^4.1.4",
"object.values": "^1.1.6"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true,
"startingVersion": "3.3.4"
},
"publishConfig": {
"ignore": [
".github/workflows",
"jest.config.js"
]
}
}
@@ -0,0 +1,119 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Reference = exports.ReferenceTypeFlag = exports.ReferenceFlag = void 0;
const ID_1 = require("../ID");
var ReferenceFlag;
(function (ReferenceFlag) {
ReferenceFlag[ReferenceFlag["Read"] = 1] = "Read";
ReferenceFlag[ReferenceFlag["Write"] = 2] = "Write";
ReferenceFlag[ReferenceFlag["ReadWrite"] = 3] = "ReadWrite";
})(ReferenceFlag || (exports.ReferenceFlag = ReferenceFlag = {}));
const generator = (0, ID_1.createIdGenerator)();
var ReferenceTypeFlag;
(function (ReferenceTypeFlag) {
ReferenceTypeFlag[ReferenceTypeFlag["Value"] = 1] = "Value";
ReferenceTypeFlag[ReferenceTypeFlag["Type"] = 2] = "Type";
})(ReferenceTypeFlag || (exports.ReferenceTypeFlag = ReferenceTypeFlag = {}));
/**
* A Reference represents a single occurrence of an identifier in code.
*/
class Reference {
/**
* A unique ID for this instance - primarily used to help debugging and testing
*/
$id = generator();
/**
* The read-write mode of the reference.
*/
#flag;
/**
* Reference to the enclosing Scope.
* @public
*/
from;
/**
* Identifier syntax node.
* @public
*/
identifier;
/**
* `true` if this writing reference is a variable initializer or a default value.
* @public
*/
init;
maybeImplicitGlobal;
/**
* The {@link Variable} object that this reference refers to. If such variable was not defined, this is `null`.
* @public
*/
resolved;
/**
* If reference is writeable, this is the node being written to it.
* @public
*/
writeExpr;
/**
* In some cases, a reference may be a type, value or both a type and value reference.
*/
#referenceType;
constructor(identifier, scope, flag, writeExpr, maybeImplicitGlobal, init, referenceType = ReferenceTypeFlag.Value) {
this.identifier = identifier;
this.from = scope;
this.resolved = null;
this.#flag = flag;
if (this.isWrite()) {
this.writeExpr = writeExpr;
this.init = init;
}
this.maybeImplicitGlobal = maybeImplicitGlobal;
this.#referenceType = referenceType;
}
/**
* True if this reference can reference types
*/
get isTypeReference() {
return (this.#referenceType & ReferenceTypeFlag.Type) !== 0;
}
/**
* True if this reference can reference values
*/
get isValueReference() {
return (this.#referenceType & ReferenceTypeFlag.Value) !== 0;
}
/**
* Whether the reference is writeable.
* @public
*/
isWrite() {
return !!(this.#flag & ReferenceFlag.Write);
}
/**
* Whether the reference is readable.
* @public
*/
isRead() {
return !!(this.#flag & ReferenceFlag.Read);
}
/**
* Whether the reference is read-only.
* @public
*/
isReadOnly() {
return this.#flag === ReferenceFlag.Read;
}
/**
* Whether the reference is write-only.
* @public
*/
isWriteOnly() {
return this.#flag === ReferenceFlag.Write;
}
/**
* Whether the reference is read-write.
* @public
*/
isReadWrite() {
return this.#flag === ReferenceFlag.ReadWrite;
}
}
exports.Reference = Reference;
@@ -0,0 +1 @@
module.exports={C:{"52":0.00238,"115":0.01428,"125":0.00238,"128":0.00238,"130":0.00238,"133":0.00238,"135":0.00238,"139":0.00238,"140":0.0119,"141":0.00476,"142":0.0119,"143":0.21896,"144":0.15708,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 126 127 129 131 132 134 136 137 138 145 146 147 3.5 3.6"},D:{"38":0.00238,"39":0.00238,"40":0.00238,"41":0.00238,"42":0.00238,"43":0.00238,"44":0.00238,"45":0.00238,"46":0.00238,"47":0.00238,"48":0.00238,"49":0.00476,"50":0.00238,"51":0.00238,"52":0.00238,"53":0.00238,"54":0.00238,"55":0.00238,"56":0.00476,"57":0.00238,"58":0.00238,"59":0.00238,"60":0.00238,"68":0.00238,"72":0.00238,"73":0.00238,"74":0.00238,"75":0.00238,"76":0.00238,"79":0.01666,"83":0.00476,"87":0.03332,"88":0.00238,"90":0.00476,"91":0.00238,"92":0.00238,"93":0.00714,"94":0.00238,"95":0.00238,"98":0.00476,"99":0.00238,"103":0.01428,"104":0.00476,"106":0.00238,"108":0.01428,"109":0.25466,"110":0.00714,"111":0.00238,"112":0.00238,"113":0.00238,"114":0.0238,"115":0.00238,"116":0.01666,"117":0.00238,"118":0.00238,"119":0.0119,"120":0.0119,"121":0.00714,"122":0.02856,"123":0.00476,"124":0.00952,"125":2.07536,"126":0.0119,"127":0.01428,"128":0.0238,"129":0.00714,"130":0.01428,"131":0.05236,"132":0.01666,"133":0.0238,"134":0.06426,"135":0.05474,"136":0.04046,"137":0.08806,"138":0.16184,"139":0.22848,"140":3.4153,"141":7.88494,"142":0.07378,"143":0.00476,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 61 62 63 64 65 66 67 69 70 71 77 78 80 81 84 85 86 89 96 97 100 101 102 105 107 144 145"},F:{"46":0.00238,"90":0.00238,"91":0.02618,"92":0.0357,"120":0.01904,"121":0.01904,"122":0.21896,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.00238,"92":0.00952,"109":0.00476,"114":0.09758,"120":0.00238,"122":0.00476,"126":0.00476,"128":0.00476,"129":0.00476,"130":0.00238,"131":0.00476,"132":0.00476,"133":0.00476,"134":0.0119,"135":0.00476,"136":0.00714,"137":0.00476,"138":0.02142,"139":0.02856,"140":0.44268,"141":1.48512,"142":0.00476,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 121 123 124 125 127"},E:{"14":0.00238,_:"0 4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 6.1 7.1 9.1 10.1 11.1 12.1 15.2-15.3 16.0 26.2","5.1":0.00238,"13.1":0.00238,"14.1":0.00476,"15.1":0.00238,"15.4":0.00238,"15.5":0.00476,"15.6":0.01666,"16.1":0.00952,"16.2":0.00238,"16.3":0.00952,"16.4":0.00714,"16.5":0.00714,"16.6":0.07616,"17.0":0.00238,"17.1":0.01666,"17.2":0.01666,"17.3":0.00952,"17.4":0.0119,"17.5":0.03094,"17.6":0.07854,"18.0":0.00952,"18.1":0.02142,"18.2":0.01428,"18.3":0.03808,"18.4":0.02618,"18.5-18.6":0.14994,"26.0":0.28084,"26.1":0.00714},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00178,"5.0-5.1":0,"6.0-6.1":0.00714,"7.0-7.1":0.00535,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.01605,"10.0-10.2":0.00178,"10.3":0.03033,"11.0-11.2":0.44953,"11.3-11.4":0.0107,"12.0-12.1":0.00357,"12.2-12.5":0.08741,"13.0-13.1":0,"13.2":0.00892,"13.3":0.00357,"13.4-13.7":0.01427,"14.0-14.4":0.03033,"14.5-14.8":0.03211,"15.0-15.1":0.03033,"15.2-15.3":0.02319,"15.4":0.02676,"15.5":0.03033,"15.6-15.8":0.39601,"16.0":0.05352,"16.1":0.0999,"16.2":0.05173,"16.3":0.09276,"16.4":0.02319,"16.5":0.04103,"16.6-16.7":0.5298,"17.0":0.03746,"17.1":0.05708,"17.2":0.04103,"17.3":0.06065,"17.4":0.10703,"17.5":0.18374,"17.6-17.7":0.4638,"18.0":0.10525,"18.1":0.21763,"18.2":0.11773,"18.3":0.37817,"18.4":0.19444,"18.5-18.6":9.91459,"26.0":1.2255,"26.1":0.0446},P:{"22":0.01025,"23":0.01025,"24":0.01025,"25":0.04101,"26":0.0205,"27":0.04101,"28":0.91246,"29":0.06151,_:"4 20 21 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.0205},I:{"0":0.03805,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00002},K:{"0":0.48006,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.00714,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.06096},Q:{_:"14.9"},O:{"0":0.70104},H:{"0":0},L:{"0":60.03622}};
@@ -0,0 +1,257 @@
import { merge } from 'lodash-es';
import Emitter from '../core/emitter.js';
import Theme from '../core/theme.js';
import ColorPicker from '../ui/color-picker.js';
import IconPicker from '../ui/icon-picker.js';
import Picker from '../ui/picker.js';
import Tooltip from '../ui/tooltip.js';
const ALIGNS = [false, 'center', 'right', 'justify'];
const COLORS = ['#000000', '#e60000', '#ff9900', '#ffff00', '#008a00', '#0066cc', '#9933ff', '#ffffff', '#facccc', '#ffebcc', '#ffffcc', '#cce8cc', '#cce0f5', '#ebd6ff', '#bbbbbb', '#f06666', '#ffc266', '#ffff66', '#66b966', '#66a3e0', '#c285ff', '#888888', '#a10000', '#b26b00', '#b2b200', '#006100', '#0047b2', '#6b24b2', '#444444', '#5c0000', '#663d00', '#666600', '#003700', '#002966', '#3d1466'];
const FONTS = [false, 'serif', 'monospace'];
const HEADERS = ['1', '2', '3', false];
const SIZES = ['small', false, 'large', 'huge'];
class BaseTheme extends Theme {
constructor(quill, options) {
super(quill, options);
const listener = e => {
if (!document.body.contains(quill.root)) {
document.body.removeEventListener('click', listener);
return;
}
if (this.tooltip != null &&
// @ts-expect-error
!this.tooltip.root.contains(e.target) &&
// @ts-expect-error
document.activeElement !== this.tooltip.textbox && !this.quill.hasFocus()) {
this.tooltip.hide();
}
if (this.pickers != null) {
this.pickers.forEach(picker => {
// @ts-expect-error
if (!picker.container.contains(e.target)) {
picker.close();
}
});
}
};
quill.emitter.listenDOM('click', document.body, listener);
}
addModule(name) {
const module = super.addModule(name);
if (name === 'toolbar') {
// @ts-expect-error
this.extendToolbar(module);
}
return module;
}
buildButtons(buttons, icons) {
Array.from(buttons).forEach(button => {
const className = button.getAttribute('class') || '';
className.split(/\s+/).forEach(name => {
if (!name.startsWith('ql-')) return;
name = name.slice('ql-'.length);
if (icons[name] == null) return;
if (name === 'direction') {
// @ts-expect-error
button.innerHTML = icons[name][''] + icons[name].rtl;
} else if (typeof icons[name] === 'string') {
// @ts-expect-error
button.innerHTML = icons[name];
} else {
// @ts-expect-error
const value = button.value || '';
// @ts-expect-error
if (value != null && icons[name][value]) {
// @ts-expect-error
button.innerHTML = icons[name][value];
}
}
});
});
}
buildPickers(selects, icons) {
this.pickers = Array.from(selects).map(select => {
if (select.classList.contains('ql-align')) {
if (select.querySelector('option') == null) {
fillSelect(select, ALIGNS);
}
if (typeof icons.align === 'object') {
return new IconPicker(select, icons.align);
}
}
if (select.classList.contains('ql-background') || select.classList.contains('ql-color')) {
const format = select.classList.contains('ql-background') ? 'background' : 'color';
if (select.querySelector('option') == null) {
fillSelect(select, COLORS, format === 'background' ? '#ffffff' : '#000000');
}
return new ColorPicker(select, icons[format]);
}
if (select.querySelector('option') == null) {
if (select.classList.contains('ql-font')) {
fillSelect(select, FONTS);
} else if (select.classList.contains('ql-header')) {
fillSelect(select, HEADERS);
} else if (select.classList.contains('ql-size')) {
fillSelect(select, SIZES);
}
}
return new Picker(select);
});
const update = () => {
this.pickers.forEach(picker => {
picker.update();
});
};
this.quill.on(Emitter.events.EDITOR_CHANGE, update);
}
}
BaseTheme.DEFAULTS = merge({}, Theme.DEFAULTS, {
modules: {
toolbar: {
handlers: {
formula() {
this.quill.theme.tooltip.edit('formula');
},
image() {
let fileInput = this.container.querySelector('input.ql-image[type=file]');
if (fileInput == null) {
fileInput = document.createElement('input');
fileInput.setAttribute('type', 'file');
fileInput.setAttribute('accept', this.quill.uploader.options.mimetypes.join(', '));
fileInput.classList.add('ql-image');
fileInput.addEventListener('change', () => {
const range = this.quill.getSelection(true);
this.quill.uploader.upload(range, fileInput.files);
fileInput.value = '';
});
this.container.appendChild(fileInput);
}
fileInput.click();
},
video() {
this.quill.theme.tooltip.edit('video');
}
}
}
}
});
class BaseTooltip extends Tooltip {
constructor(quill, boundsContainer) {
super(quill, boundsContainer);
this.textbox = this.root.querySelector('input[type="text"]');
this.listen();
}
listen() {
// @ts-expect-error Fix me later
this.textbox.addEventListener('keydown', event => {
if (event.key === 'Enter') {
this.save();
event.preventDefault();
} else if (event.key === 'Escape') {
this.cancel();
event.preventDefault();
}
});
}
cancel() {
this.hide();
this.restoreFocus();
}
edit() {
let mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'link';
let preview = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
this.root.classList.remove('ql-hidden');
this.root.classList.add('ql-editing');
if (this.textbox == null) return;
if (preview != null) {
this.textbox.value = preview;
} else if (mode !== this.root.getAttribute('data-mode')) {
this.textbox.value = '';
}
const bounds = this.quill.getBounds(this.quill.selection.savedRange);
if (bounds != null) {
this.position(bounds);
}
this.textbox.select();
this.textbox.setAttribute('placeholder', this.textbox.getAttribute(`data-${mode}`) || '');
this.root.setAttribute('data-mode', mode);
}
restoreFocus() {
this.quill.focus({
preventScroll: true
});
}
save() {
// @ts-expect-error Fix me later
let {
value
} = this.textbox;
switch (this.root.getAttribute('data-mode')) {
case 'link':
{
const {
scrollTop
} = this.quill.root;
if (this.linkRange) {
this.quill.formatText(this.linkRange, 'link', value, Emitter.sources.USER);
delete this.linkRange;
} else {
this.restoreFocus();
this.quill.format('link', value, Emitter.sources.USER);
}
this.quill.root.scrollTop = scrollTop;
break;
}
case 'video':
{
value = extractVideoUrl(value);
}
// eslint-disable-next-line no-fallthrough
case 'formula':
{
if (!value) break;
const range = this.quill.getSelection(true);
if (range != null) {
const index = range.index + range.length;
this.quill.insertEmbed(index,
// @ts-expect-error Fix me later
this.root.getAttribute('data-mode'), value, Emitter.sources.USER);
if (this.root.getAttribute('data-mode') === 'formula') {
this.quill.insertText(index + 1, ' ', Emitter.sources.USER);
}
this.quill.setSelection(index + 2, Emitter.sources.USER);
}
break;
}
default:
}
// @ts-expect-error Fix me later
this.textbox.value = '';
this.hide();
}
}
function extractVideoUrl(url) {
let match = url.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/) || url.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);
if (match) {
return `${match[1] || 'https'}://www.youtube.com/embed/${match[2]}?showinfo=0`;
}
// eslint-disable-next-line no-cond-assign
if (match = url.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/)) {
return `${match[1] || 'https'}://player.vimeo.com/video/${match[2]}/`;
}
return url;
}
function fillSelect(select, values) {
let defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
values.forEach(value => {
const option = document.createElement('option');
if (value === defaultValue) {
option.setAttribute('selected', 'selected');
} else {
option.setAttribute('value', String(value));
}
select.appendChild(option);
});
}
export { BaseTooltip, BaseTheme as default };
//# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
{"version":3,"file":"isFunction.d.ts","sourceRoot":"","sources":["../../src/utils/isFunction.ts"],"names":[],"mappings":"yBAAgB,OAAO,OAAO,KAAG,KAAK,IAAI,QAAQ;AAAlD,wBAC8B"}
@@ -0,0 +1,53 @@
# code-points
[![npm version](https://img.shields.io/npm/v/code-points.svg)](https://www.npmjs.com/package/code-points)
[![Build Status](https://travis-ci.com/shinnn/code-points.js.svg?branch=master)](https://travis-ci.com/shinnn/code-points.js)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/code-points.js.svg)](https://coveralls.io/github/shinnn/code-points.js)
Get the [UTF-16](https://wikipedia.org/wiki/UTF-16)-encoded code points of each character in the string
```javascript
codePoints('Hello, 世界\n'); //=> [72, 101, 108, 108, 111, 44, 32, 19990, 30028]
```
## Installation
[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).
```
npm install code-points
```
## API
### codePoints(*str*, *option*)
*str*: `string`
*option*: `Object`
Return: `Array<integer>`
It returns the [code point](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt)s of each character in the string as an array.
```javascript
codePoints('\udada'); //=> [56026]
codePoints('\udfdf\udada\udada'); //=> [57311, 56026, 56026]
codePoints('\udada\udfdf\udada'); //=> [814047, 56026]
```
#### option.unique
Type: `boolean`
Default: `false`
Removes duplicates from result.
```javascript
codePoints('banana'); //=> [98, 97, 110, 97, 110, 97]
codePoints('banana', {unique: true}); //=> [98,97,110]
```
## License
Copyright (c) 2014 - 2019 [Shinnosuke Watanabe](https://github.com/shinnn)
Licensed under [the MIT License](https://github.com/shinnn/code-points/blob/master/LICENSE).
@@ -0,0 +1,63 @@
import { warn } from '../log.js';
import { isMergeKey, addMergeToJSMap } from '../schema/yaml-1.1/merge.js';
import { createStringifyContext } from '../stringify/stringify.js';
import { isNode } from './identity.js';
import { toJS } from './toJS.js';
function addPairToJSMap(ctx, map, { key, value }) {
if (isNode(key) && key.addToJSMap)
key.addToJSMap(ctx, map, value);
// TODO: Should drop this special case for bare << handling
else if (isMergeKey(ctx, key))
addMergeToJSMap(ctx, map, value);
else {
const jsKey = toJS(key, '', ctx);
if (map instanceof Map) {
map.set(jsKey, toJS(value, jsKey, ctx));
}
else if (map instanceof Set) {
map.add(jsKey);
}
else {
const stringKey = stringifyKey(key, jsKey, ctx);
const jsValue = toJS(value, stringKey, ctx);
if (stringKey in map)
Object.defineProperty(map, stringKey, {
value: jsValue,
writable: true,
enumerable: true,
configurable: true
});
else
map[stringKey] = jsValue;
}
}
return map;
}
function stringifyKey(key, jsKey, ctx) {
if (jsKey === null)
return '';
// eslint-disable-next-line @typescript-eslint/no-base-to-string
if (typeof jsKey !== 'object')
return String(jsKey);
if (isNode(key) && ctx?.doc) {
const strCtx = createStringifyContext(ctx.doc, {});
strCtx.anchors = new Set();
for (const node of ctx.anchors.keys())
strCtx.anchors.add(node.anchor);
strCtx.inFlow = true;
strCtx.inStringifyKey = true;
const strKey = key.toString(strCtx);
if (!ctx.mapKeyWarned) {
let jsonStr = JSON.stringify(strKey);
if (jsonStr.length > 40)
jsonStr = jsonStr.substring(0, 36) + '..."';
warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);
ctx.mapKeyWarned = true;
}
return strKey;
}
return JSON.stringify(jsKey);
}
export { addPairToJSMap };
@@ -0,0 +1,4 @@
/// <reference types="node" />
import * as util from 'util';
export declare const parseArgs: typeof util.parseArgs;
//# sourceMappingURL=parse-args-cjs.d.cts.map
@@ -0,0 +1,89 @@
"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/table-checkbox-cell.tsx
var table_checkbox_cell_exports = {};
__export(table_checkbox_cell_exports, {
default: () => table_checkbox_cell_default
});
module.exports = __toCommonJS(table_checkbox_cell_exports);
var import_system = require("@heroui/system");
var import_react_utils = require("@heroui/react-utils");
var import_shared_utils = require("@heroui/shared-utils");
var import_table = require("@react-aria/table");
var import_focus = require("@react-aria/focus");
var import_checkbox = require("@heroui/checkbox");
var import_visually_hidden = require("@react-aria/visually-hidden");
var import_jsx_runtime = require("react/jsx-runtime");
var TableCheckboxCell = (0, import_system.forwardRef)((props, ref) => {
var _a, _b;
const {
as,
className,
node,
rowKey,
slots,
state,
color,
disableAnimation,
checkboxesProps,
selectionMode,
classNames,
...otherProps
} = props;
const Component = as || "td";
const shouldFilterDOMProps = typeof Component === "string";
const domRef = (0, import_react_utils.useDOMRef)(ref);
const { gridCellProps } = (0, import_table.useTableCell)({ node }, state, domRef);
const { isFocusVisible, focusProps } = (0, import_focus.useFocusRing)();
const { checkboxProps } = (0, import_table.useTableSelectionCheckbox)({ key: (node == null ? void 0 : node.parentKey) || node.key }, state);
const tdStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.td, className, (_a = node.props) == null ? void 0 : _a.className);
const isSingleSelectionMode = selectionMode === "single";
const { onChange, ...otherCheckboxProps } = checkboxProps;
const isRowSelected = state.selectionManager.isSelected(rowKey);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
Component,
{
ref: domRef,
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
"data-selected": (0, import_shared_utils.dataAttr)(isRowSelected),
...(0, import_shared_utils.mergeProps)(
gridCellProps,
focusProps,
(0, import_react_utils.filterDOMProps)(node.props, {
enabled: shouldFilterDOMProps
}),
otherProps
),
className: (_b = slots.td) == null ? void 0 : _b.call(slots, { class: tdStyles }),
children: isSingleSelectionMode ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_visually_hidden.VisuallyHidden, { children: checkboxProps["aria-label"] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_checkbox.Checkbox,
{
color,
disableAnimation,
onValueChange: onChange,
...(0, import_shared_utils.mergeProps)(checkboxesProps, otherCheckboxProps)
}
)
}
);
});
TableCheckboxCell.displayName = "HeroUI.TableCheckboxCell";
var table_checkbox_cell_default = TableCheckboxCell;
@@ -0,0 +1,9 @@
import type { Static } from '../static/index';
import type { TTemplateLiteral } from './template-literal';
import type { UnionToTuple } from '../helpers/index';
import { type TUnionEvaluated } from '../union/index';
import { type TLiteral } from '../literal/index';
export type TTemplateLiteralToUnionLiteralArray<T extends string[], Acc extends TLiteral[] = []> = (T extends [infer L extends string, ...infer R extends string[]] ? TTemplateLiteralToUnionLiteralArray<R, [...Acc, TLiteral<L>]> : Acc);
export type TTemplateLiteralToUnion<T extends TTemplateLiteral, U extends string[] = UnionToTuple<Static<T>>> = TUnionEvaluated<TTemplateLiteralToUnionLiteralArray<U>>;
/** Returns a Union from the given TemplateLiteral */
export declare function TemplateLiteralToUnion<T extends TTemplateLiteral>(schema: TTemplateLiteral): TTemplateLiteralToUnion<T>;
@@ -0,0 +1,872 @@
# API Documentation
*Please use only this documented API when working with the parser. Methods
not documented here are subject to change at any point.*
## `parser` function
This is the module's main entry point.
```js
const parser = require('postcss-selector-parser');
```
### `parser([transform], [options])`
Creates a new `processor` instance
```js
const processor = parser();
```
Or, with optional transform function
```js
const transform = selectors => {
selectors.walkUniversals(selector => {
selector.remove();
});
};
const processor = parser(transform)
// Example
const result = processor.processSync('*.class');
// => .class
```
[See processor documentation](#processor)
Arguments:
* `transform (function)`: Provide a function to work with the parsed AST.
* `options (object)`: Provide default options for all calls on the returned `Processor`.
### `parser.attribute([props])`
Creates a new attribute selector.
```js
parser.attribute({attribute: 'href'});
// => [href]
```
Arguments:
* `props (object)`: The new node's properties.
### `parser.className([props])`
Creates a new class selector.
```js
parser.className({value: 'button'});
// => .button
```
Arguments:
* `props (object)`: The new node's properties.
### `parser.combinator([props])`
Creates a new selector combinator.
```js
parser.combinator({value: '+'});
// => +
```
Arguments:
* `props (object)`: The new node's properties.
Notes:
* **Descendant Combinators** The value of descendant combinators created by the
parser always just a single space (`" "`). For descendant selectors with no
comments, additional space is now stored in `node.spaces.before`. Depending
on the location of comments, additional spaces may be stored in
`node.raws.spaces.before`, `node.raws.spaces.after`, or `node.raws.value`.
* **Named Combinators** Although, nonstandard and unlikely to ever become a standard,
named combinators like `/deep/` and `/for/` are parsed as combinators. The
`node.value` is name after being unescaped and normalized as lowercase. The
original value for the combinator name is stored in `node.raws.value`.
### `parser.comment([props])`
Creates a new comment.
```js
parser.comment({value: '/* Affirmative, Dave. I read you. */'});
// => /* Affirmative, Dave. I read you. */
```
Arguments:
* `props (object)`: The new node's properties.
### `parser.id([props])`
Creates a new id selector.
```js
parser.id({value: 'search'});
// => #search
```
Arguments:
* `props (object)`: The new node's properties.
### `parser.nesting([props])`
Creates a new nesting selector.
```js
parser.nesting();
// => &
```
Arguments:
* `props (object)`: The new node's properties.
### `parser.pseudo([props])`
Creates a new pseudo selector.
```js
parser.pseudo({value: '::before'});
// => ::before
```
Arguments:
* `props (object)`: The new node's properties.
### `parser.root([props])`
Creates a new root node.
```js
parser.root();
// => (empty)
```
Arguments:
* `props (object)`: The new node's properties.
### `parser.selector([props])`
Creates a new selector node.
```js
parser.selector();
// => (empty)
```
Arguments:
* `props (object)`: The new node's properties.
### `parser.string([props])`
Creates a new string node.
```js
parser.string();
// => (empty)
```
Arguments:
* `props (object)`: The new node's properties.
### `parser.tag([props])`
Creates a new tag selector.
```js
parser.tag({value: 'button'});
// => button
```
Arguments:
* `props (object)`: The new node's properties.
### `parser.universal([props])`
Creates a new universal selector.
```js
parser.universal();
// => *
```
Arguments:
* `props (object)`: The new node's properties.
## Node types
### `node.type`
A string representation of the selector type. It can be one of the following;
`attribute`, `class`, `combinator`, `comment`, `id`, `nesting`, `pseudo`,
`root`, `selector`, `string`, `tag`, or `universal`. Note that for convenience,
these constants are exposed on the main `parser` as uppercased keys. So for
example you can get `id` by querying `parser.ID`.
```js
parser.attribute({attribute: 'href'}).type;
// => 'attribute'
```
### `node.parent`
Returns the parent node.
```js
root.nodes[0].parent === root;
```
### `node.toString()`, `String(node)`, or `'' + node`
Returns a string representation of the node.
```js
const id = parser.id({value: 'search'});
console.log(String(id));
// => #search
```
### `node.next()` & `node.prev()`
Returns the next/previous child of the parent node.
```js
const next = id.next();
if (next && next.type !== 'combinator') {
throw new Error('Qualified IDs are not allowed!');
}
```
### `node.replaceWith(node)`
Replace a node with another.
```js
const attr = selectors.first.first;
const className = parser.className({value: 'test'});
attr.replaceWith(className);
```
Arguments:
* `node`: The node to substitute the original with.
### `node.remove()`
Removes the node from its parent node.
```js
if (node.type === 'id') {
node.remove();
}
```
### `node.clone([opts])`
Returns a copy of a node, detached from any parent containers that the
original might have had.
```js
const cloned = node.clone();
```
### `node.isAtPosition(line, column)`
Return a `boolean` indicating whether this node includes the character at the
position of the given line and column. Returns `undefined` if the nodes lack
sufficient source metadata to determine the position.
Arguments:
* `line`: 1-index based line number relative to the start of the selector.
* `column`: 1-index based column number relative to the start of the selector.
### `node.spaces`
Extra whitespaces around the node will be moved into `node.spaces.before` and
`node.spaces.after`. So for example, these spaces will be moved as they have
no semantic meaning:
```css
h1 , h2 {}
```
For descendent selectors, the value is always a single space.
```css
h1 h2 {}
```
Additional whitespace is found in either the `node.spaces.before` and `node.spaces.after` depending on the presence of comments or other whitespace characters. If the actual whitespace does not start or end with a single space, the node's raw value is set to the actual space(s) found in the source.
### `node.source`
An object describing the node's start/end, line/column source position.
Within the following CSS, the `.bar` class node ...
```css
.foo,
.bar {}
```
... will contain the following `source` object.
```js
source: {
start: {
line: 2,
column: 3
},
end: {
line: 2,
column: 6
}
}
```
### `node.sourceIndex`
The zero-based index of the node within the original source string.
Within the following CSS, the `.baz` class node will have a `sourceIndex` of `12`.
```css
.foo, .bar, .baz {}
```
## Container types
The `root`, `selector`, and `pseudo` nodes have some helper methods for working
with their children.
### `container.nodes`
An array of the container's children.
```js
// Input: h1 h2
selectors.at(0).nodes.length // => 3
selectors.at(0).nodes[0].value // => 'h1'
selectors.at(0).nodes[1].value // => ' '
```
### `container.first` & `container.last`
The first/last child of the container.
```js
selector.first === selector.nodes[0];
selector.last === selector.nodes[selector.nodes.length - 1];
```
### `container.at(index)`
Returns the node at position `index`.
```js
selector.at(0) === selector.first;
selector.at(0) === selector.nodes[0];
```
Arguments:
* `index`: The index of the node to return.
### `container.atPosition(line, column)`
Returns the node at the source position `line` and `column`.
```js
// Input: :not(.foo),\n#foo > :matches(ol, ul)
selector.atPosition(1, 1); // => :not(.foo)
selector.atPosition(2, 1); // => \n#foo
```
Arguments:
* `line`: The line number of the node to return.
* `column`: The column number of the node to return.
### `container.index(node)`
Return the index of the node within its container.
```js
selector.index(selector.nodes[2]) // => 2
```
Arguments:
* `node`: A node within the current container.
### `container.length`
Proxy to the length of the container's nodes.
```js
container.length === container.nodes.length
```
### `container` Array iterators
The container class provides proxies to certain Array methods; these are:
* `container.map === container.nodes.map`
* `container.reduce === container.nodes.reduce`
* `container.every === container.nodes.every`
* `container.some === container.nodes.some`
* `container.filter === container.nodes.filter`
* `container.sort === container.nodes.sort`
Note that these methods only work on a container's immediate children; recursive
iteration is provided by `container.walk`.
### `container.each(callback)`
Iterate the container's immediate children, calling `callback` for each child.
You may return `false` within the callback to break the iteration.
```js
let className;
selectors.each((selector, index) => {
if (selector.type === 'class') {
className = selector.value;
return false;
}
});
```
Note that unlike `Array#forEach()`, this iterator is safe to use whilst adding
or removing nodes from the container.
Arguments:
* `callback (function)`: A function to call for each node, which receives `node`
and `index` arguments.
### `container.walk(callback)`
Like `container#each`, but will also iterate child nodes as long as they are
`container` types.
```js
selectors.walk((selector, index) => {
// all nodes
});
```
Arguments:
* `callback (function)`: A function to call for each node, which receives `node`
and `index` arguments.
This iterator is safe to use whilst mutating `container.nodes`,
like `container#each`.
### `container.walk` proxies
The container class provides proxy methods for iterating over types of nodes,
so that it is easier to write modules that target specific selectors. Those
methods are:
* `container.walkAttributes`
* `container.walkClasses`
* `container.walkCombinators`
* `container.walkComments`
* `container.walkIds`
* `container.walkNesting`
* `container.walkPseudos`
* `container.walkTags`
* `container.walkUniversals`
### `container.split(callback)`
This method allows you to split a group of nodes by returning `true` from
a callback. It returns an array of arrays, where each inner array corresponds
to the groups that you created via the callback.
```js
// (input) => h1 h2>>h3
const list = selectors.first.split(selector => {
return selector.type === 'combinator';
});
// (node values) => [['h1', ' '], ['h2', '>>'], ['h3']]
```
Arguments:
* `callback (function)`: A function to call for each node, which receives `node`
as an argument.
### `container.prepend(node)` & `container.append(node)`
Add a node to the start/end of the container. Note that doing so will set
the parent property of the node to this container.
```js
const id = parser.id({value: 'search'});
selector.append(id);
```
Arguments:
* `node`: The node to add.
### `container.insertBefore(old, new)` & `container.insertAfter(old, new)`
Add a node before or after an existing node in a container:
```js
selectors.walk(selector => {
if (selector.type !== 'class') {
const className = parser.className({value: 'theme-name'});
selector.parent.insertAfter(selector, className);
}
});
```
Arguments:
* `old`: The existing node in the container.
* `new`: The new node to add before/after the existing node.
### `container.removeChild(node)`
Remove the node from the container. Note that you can also use
`node.remove()` if you would like to remove just a single node.
```js
selector.length // => 2
selector.remove(id)
selector.length // => 1;
id.parent // undefined
```
Arguments:
* `node`: The node to remove.
### `container.removeAll()` or `container.empty()`
Remove all children from the container.
```js
selector.removeAll();
selector.length // => 0
```
## Root nodes
A root node represents a comma separated list of selectors. Indeed, all
a root's `toString()` method does is join its selector children with a ','.
Other than this, it has no special functionality and acts like a container.
### `root.trailingComma`
This will be set to `true` if the input has a trailing comma, in order to
support parsing of legacy CSS hacks.
## Selector nodes
A selector node represents a single complex selector. For example, this
selector string `h1 h2 h3, [href] > p`, is represented as two selector nodes.
It has no special functionality of its own.
## Pseudo nodes
A pseudo selector extends a container node; if it has any parameters of its
own (such as `h1:not(h2, h3)`), they will be its children. Note that the pseudo
`value` will always contain the colons preceding the pseudo identifier. This
is so that both `:before` and `::before` are properly represented in the AST.
## Attribute nodes
### `attribute.quoted`
Returns `true` if the attribute's value is wrapped in quotation marks, false if it is not.
Remains `undefined` if there is no attribute value.
```css
[href=foo] /* false */
[href='foo'] /* true */
[href="foo"] /* true */
[href] /* undefined */
```
### `attribute.qualifiedAttribute`
Returns the attribute name qualified with the namespace if one is given.
### `attribute.offsetOf(part)`
Returns the offset of the attribute part specified relative to the
start of the node of the output string. This is useful in raising
error messages about a specific part of the attribute, especially
in combination with `attribute.sourceIndex`.
Returns `-1` if the name is invalid or the value doesn't exist in this
attribute.
The legal values for `part` are:
* `"ns"` - alias for "namespace"
* `"namespace"` - the namespace if it exists.
* `"attribute"` - the attribute name
* `"attributeNS"` - the start of the attribute or its namespace
* `"operator"` - the match operator of the attribute
* `"value"` - The value (string or identifier)
* `"insensitive"` - the case insensitivity flag
### `attribute.raws.unquoted`
Returns the unquoted content of the attribute's value.
Remains `undefined` if there is no attribute value.
```css
[href=foo] /* foo */
[href='foo'] /* foo */
[href="foo"] /* foo */
[href] /* undefined */
```
### `attribute.spaces`
Like `node.spaces` with the `before` and `after` values containing the spaces
around the element, the parts of the attribute can also have spaces before
and after them. The for each of `attribute`, `operator`, `value` and
`insensitive` there is corresponding property of the same nam in
`node.spaces` that has an optional `before` or `after` string containing only
whitespace.
Note that corresponding values in `attributes.raws.spaces` contain values
including any comments. If set, these values will override the
`attribute.spaces` value. Take care to remove them if changing
`attribute.spaces`.
### `attribute.raws`
The raws object stores comments and other information necessary to re-render
the node exactly as it was in the source.
If a comment is embedded within the identifiers for the `namespace`, `attribute`
or `value` then a property is placed in the raws for that value containing the full source of the propery including comments.
If a comment is embedded within the space between parts of the attribute
then the raw for that space is set accordingly.
Setting an attribute's property `raws` value to be deleted.
For now, changing the spaces required also updating or removing any of the
raws values that override them.
Example: `[ /*before*/ href /* after-attr */ = /* after-operator */ te/*inside-value*/st/* wow */ /*omg*/i/*bbq*/ /*whodoesthis*/]` would parse as:
```js
{
attribute: "href",
operator: "=",
value: "test",
spaces: {
before: '',
after: '',
attribute: { before: ' ', after: ' ' },
operator: { after: ' ' },
value: { after: ' ' },
insensitive: { after: ' ' }
},
raws: {
spaces: {
attribute: { before: ' /*before*/ ', after: ' /* after-attr */ ' },
operator: { after: ' /* after-operator */ ' },
value: { after: '/* wow */ /*omg*/' },
insensitive: { after: '/*bbq*/ /*whodoesthis*/' }
},
unquoted: 'test',
value: 'te/*inside-value*/st'
}
}
```
## `Processor`
### `ProcessorOptions`
* `lossless` - When `true`, whitespace is preserved. Defaults to `true`.
* `updateSelector` - When `true`, if any processor methods are passed a postcss
`Rule` node instead of a string, then that Rule's selector is updated
with the results of the processing. Defaults to `true`.
### `process|processSync(selectors, [options])`
Processes the `selectors`, returning a string from the result of processing.
Note: when the `updateSelector` option is set, the rule's selector
will be updated with the resulting string.
**Example:**
```js
const parser = require("postcss-selector-parser");
const processor = parser();
let result = processor.processSync(' .class');
console.log(result);
// => .class
// Asynchronous operation
let promise = processor.process(' .class').then(result => {
console.log(result)
// => .class
});
// To have the parser normalize whitespace values, utilize the options
result = processor.processSync(' .class ', {lossless: false});
console.log(result);
// => .class
// For better syntax errors, pass a PostCSS Rule node.
const postcss = require('postcss');
rule = postcss.rule({selector: ' #foo > a, .class '});
processor.process(rule, {lossless: false, updateSelector: true}).then(result => {
console.log(result);
// => #foo>a,.class
console.log("rule:", rule.selector);
// => rule: #foo>a,.class
})
```
Arguments:
* `selectors (string|postcss.Rule)`: Either a selector string or a PostCSS Rule
node.
* `[options] (object)`: Process options
### `ast|astSync(selectors, [options])`
Like `process()` and `processSync()` but after
processing the `selectors` these methods return the `Root` node of the result
instead of a string.
Note: when the `updateSelector` option is set, the rule's selector
will be updated with the resulting string.
### `transform|transformSync(selectors, [options])`
Like `process()` and `processSync()` but after
processing the `selectors` these methods return the value returned by the
processor callback.
Note: when the `updateSelector` option is set, the rule's selector
will be updated with the resulting string.
### Error Handling Within Selector Processors
The root node passed to the selector processor callback
has a method `error(message, options)` that returns an
error object. This method should always be used to raise
errors relating to the syntax of selectors. The options
to this method are passed to postcss's error constructor
([documentation](http://postcss.org/api/#container-error)).
#### Async Error Example
```js
let processor = (root) => {
return new Promise((resolve, reject) => {
root.walkClasses((classNode) => {
if (/^(.*)[-_]/.test(classNode.value)) {
let msg = "classes may not have underscores or dashes in them";
reject(root.error(msg, {
index: classNode.sourceIndex + RegExp.$1.length + 1,
word: classNode.value
}));
}
});
resolve();
});
};
const postcss = require("postcss");
const parser = require("postcss-selector-parser");
const selectorProcessor = parser(processor);
const plugin = postcss.plugin('classValidator', (options) => {
return (root) => {
let promises = [];
root.walkRules(rule => {
promises.push(selectorProcessor.process(rule));
});
return Promise.all(promises);
};
});
postcss(plugin()).process(`
.foo-bar {
color: red;
}
`.trim(), {from: 'test.css'}).catch((e) => console.error(e.toString()));
// CssSyntaxError: classValidator: ./test.css:1:5: classes may not have underscores or dashes in them
//
// > 1 | .foo-bar {
// | ^
// 2 | color: red;
// 3 | }
```
#### Synchronous Error Example
```js
let processor = (root) => {
root.walkClasses((classNode) => {
if (/.*[-_]/.test(classNode.value)) {
let msg = "classes may not have underscores or dashes in them";
throw root.error(msg, {
index: classNode.sourceIndex,
word: classNode.value
});
}
});
};
const postcss = require("postcss");
const parser = require("postcss-selector-parser");
const selectorProcessor = parser(processor);
const plugin = postcss.plugin('classValidator', (options) => {
return (root) => {
root.walkRules(rule => {
selectorProcessor.processSync(rule);
});
};
});
postcss(plugin()).process(`
.foo-bar {
color: red;
}
`.trim(), {from: 'test.css'}).catch((e) => console.error(e.toString()));
// CssSyntaxError: classValidator: ./test.css:1:5: classes may not have underscores or dashes in them
//
// > 1 | .foo-bar {
// | ^
// 2 | color: red;
// 3 | }
```
@@ -0,0 +1,34 @@
import arrayFilter from './_arrayFilter.js';
import baseRest from './_baseRest.js';
import baseXor from './_baseXor.js';
import isArrayLikeObject from './isArrayLikeObject.js';
import last from './last.js';
/**
* This method is like `_.xor` except that it accepts `comparator` which is
* invoked to compare elements of `arrays`. The order of result values is
* determined by the order they occur in the arrays. The comparator is invoked
* with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.xorWith(objects, others, _.isEqual);
* // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
*/
var xorWith = baseRest(function(arrays) {
var comparator = last(arrays);
comparator = typeof comparator == 'function' ? comparator : undefined;
return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
});
export default xorWith;
@@ -0,0 +1,241 @@
/**
* @fileoverview Rule that warns when identifier names that are
* specified in the configuration are used.
* @author Keith Cirkel (http://keithcirkel.co.uk)
* @deprecated in ESLint v7.5.0
*/
"use strict";
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Checks whether the given node represents assignment target in a normal assignment or destructuring.
* @param {ASTNode} node The node to check.
* @returns {boolean} `true` if the node is assignment target.
*/
function isAssignmentTarget(node) {
const parent = node.parent;
return (
// normal assignment
(parent.type === "AssignmentExpression" && parent.left === node) ||
// destructuring
parent.type === "ArrayPattern" ||
parent.type === "RestElement" ||
(parent.type === "Property" &&
parent.value === node &&
parent.parent.type === "ObjectPattern") ||
(parent.type === "AssignmentPattern" && parent.left === node)
);
}
/**
* Checks whether the given node represents an imported name that is renamed in the same import/export specifier.
*
* Examples:
* import { a as b } from 'mod'; // node `a` is renamed import
* export { a as b } from 'mod'; // node `a` is renamed import
* @param {ASTNode} node `Identifier` node to check.
* @returns {boolean} `true` if the node is a renamed import.
*/
function isRenamedImport(node) {
const parent = node.parent;
return (
(parent.type === "ImportSpecifier" &&
parent.imported !== parent.local &&
parent.imported === node) ||
(parent.type === "ExportSpecifier" &&
parent.parent.source && // re-export
parent.local !== parent.exported &&
parent.local === node)
);
}
/**
* Checks whether the given node is a renamed identifier node in an ObjectPattern destructuring.
*
* Examples:
* const { a : b } = foo; // node `a` is renamed node.
* @param {ASTNode} node `Identifier` node to check.
* @returns {boolean} `true` if the node is a renamed node in an ObjectPattern destructuring.
*/
function isRenamedInDestructuring(node) {
const parent = node.parent;
return (
!parent.computed &&
parent.type === "Property" &&
parent.parent.type === "ObjectPattern" &&
parent.value !== node &&
parent.key === node
);
}
/**
* Checks whether the given node represents shorthand definition of a property in an object literal.
* @param {ASTNode} node `Identifier` node to check.
* @returns {boolean} `true` if the node is a shorthand property definition.
*/
function isShorthandPropertyDefinition(node) {
const parent = node.parent;
return (
parent.type === "Property" &&
parent.parent.type === "ObjectExpression" &&
parent.shorthand
);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "The rule was renamed.",
url: "https://eslint.org/blog/2020/07/eslint-v7.5.0-released/#deprecating-id-blacklist",
deprecatedSince: "7.5.0",
availableUntil: "11.0.0",
replacedBy: [
{
rule: {
name: "id-denylist",
url: "https://eslint.org/docs/rules/id-denylist",
},
},
],
},
type: "suggestion",
docs: {
description: "Disallow specified identifiers",
recommended: false,
url: "https://eslint.org/docs/latest/rules/id-blacklist",
},
schema: {
type: "array",
items: {
type: "string",
},
uniqueItems: true,
},
messages: {
restricted: "Identifier '{{name}}' is restricted.",
},
},
create(context) {
const denyList = new Set(context.options);
const reportedNodes = new Set();
const sourceCode = context.sourceCode;
let globalScope;
/**
* Checks whether the given name is restricted.
* @param {string} name The name to check.
* @returns {boolean} `true` if the name is restricted.
* @private
*/
function isRestricted(name) {
return denyList.has(name);
}
/**
* Checks whether the given node represents a reference to a global variable that is not declared in the source code.
* These identifiers will be allowed, as it is assumed that user has no control over the names of external global variables.
* @param {ASTNode} node `Identifier` node to check.
* @returns {boolean} `true` if the node is a reference to a global variable.
*/
function isReferenceToGlobalVariable(node) {
const variable = globalScope.set.get(node.name);
return (
variable &&
variable.defs.length === 0 &&
variable.references.some(ref => ref.identifier === node)
);
}
/**
* Determines whether the given node should be checked.
* @param {ASTNode} node `Identifier` node.
* @returns {boolean} `true` if the node should be checked.
*/
function shouldCheck(node) {
const parent = node.parent;
/*
* Member access has special rules for checking property names.
* Read access to a property with a restricted name is allowed, because it can be on an object that user has no control over.
* Write access isn't allowed, because it potentially creates a new property with a restricted name.
*/
if (
parent.type === "MemberExpression" &&
parent.property === node &&
!parent.computed
) {
return isAssignmentTarget(parent);
}
return (
parent.type !== "CallExpression" &&
parent.type !== "NewExpression" &&
!isRenamedImport(node) &&
!isRenamedInDestructuring(node) &&
!(
isReferenceToGlobalVariable(node) &&
!isShorthandPropertyDefinition(node)
)
);
}
/**
* Reports an AST node as a rule violation.
* @param {ASTNode} node The node to report.
* @returns {void}
* @private
*/
function report(node) {
/*
* We used the range instead of the node because it's possible
* for the same identifier to be represented by two different
* nodes, with the most clear example being shorthand properties:
* { foo }
* In this case, "foo" is represented by one node for the name
* and one for the value. The only way to know they are the same
* is to look at the range.
*/
if (!reportedNodes.has(node.range.toString())) {
context.report({
node,
messageId: "restricted",
data: {
name: node.name,
},
});
reportedNodes.add(node.range.toString());
}
}
return {
Program(node) {
globalScope = sourceCode.getScope(node);
},
Identifier(node) {
if (isRestricted(node.name) && shouldCheck(node)) {
report(node);
}
},
};
},
};
@@ -0,0 +1,19 @@
"use strict";
var IssueAlternativeName_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.IssueAlternativeName = exports.id_ce_issuerAltName = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const general_names_1 = require("../general_names");
const object_identifiers_1 = require("../object_identifiers");
exports.id_ce_issuerAltName = `${object_identifiers_1.id_ce}.18`;
let IssueAlternativeName = IssueAlternativeName_1 = class IssueAlternativeName extends general_names_1.GeneralNames {
constructor(items) {
super(items);
Object.setPrototypeOf(this, IssueAlternativeName_1.prototype);
}
};
exports.IssueAlternativeName = IssueAlternativeName;
exports.IssueAlternativeName = IssueAlternativeName = IssueAlternativeName_1 = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Sequence })
], IssueAlternativeName);
@@ -0,0 +1,313 @@
import * as semver from 'semver';
import { cjsRequire } from '../require.js';
import { createRule, lazy, resolve } from '../utils/index.js';
const isTypeScriptVersionSupportPreferInline = lazy(() => {
let typescriptPkg;
try {
typescriptPkg = cjsRequire('typescript/package.json');
}
catch {
}
return !typescriptPkg || !semver.satisfies(typescriptPkg.version, '>= 4.5');
});
function checkImports(imported, context) {
imported.forEach((nodes, module) => {
if (nodes.length <= 1) {
return;
}
for (let i = 0, len = nodes.length; i < len; i++) {
const node = nodes[i];
context.report({
node: node.source,
messageId: 'duplicate',
data: {
module,
},
fix: i === 0 ? getFix(nodes, context.sourceCode, context) : null,
});
}
});
}
function getFix(nodes, sourceCode, context) {
const first = nodes[0];
if (hasProblematicComments(first, sourceCode) || hasNamespace(first)) {
return null;
}
const defaultImportNames = new Set(nodes.flatMap(x => getDefaultImportName(x) || []));
if (defaultImportNames.size > 1) {
return null;
}
const rest = nodes.slice(1);
const restWithoutCommentsAndNamespaces = rest.filter(node => !hasProblematicComments(node, sourceCode) && !hasNamespace(node));
const restWithoutCommentsAndNamespacesHasSpecifiers = restWithoutCommentsAndNamespaces.map(hasSpecifiers);
const specifiers = restWithoutCommentsAndNamespaces.reduce((acc, node, nodeIndex) => {
const tokens = sourceCode.getTokens(node);
const openBrace = tokens.find(token => isPunctuator(token, '{'));
const closeBrace = tokens.find(token => isPunctuator(token, '}'));
if (openBrace == null || closeBrace == null) {
return acc;
}
acc.push({
importNode: node,
identifiers: sourceCode.text
.slice(openBrace.range[1], closeBrace.range[0])
.split(','),
isEmpty: !restWithoutCommentsAndNamespacesHasSpecifiers[nodeIndex],
});
return acc;
}, []);
const unnecessaryImports = restWithoutCommentsAndNamespaces.filter((node, nodeIndex) => !restWithoutCommentsAndNamespacesHasSpecifiers[nodeIndex] &&
!specifiers.some(specifier => specifier.importNode === node));
const shouldAddSpecifiers = specifiers.length > 0;
const shouldRemoveUnnecessary = unnecessaryImports.length > 0;
const shouldAddDefault = lazy(() => getDefaultImportName(first) == null && defaultImportNames.size === 1);
if (!shouldAddSpecifiers && !shouldRemoveUnnecessary && !shouldAddDefault()) {
return null;
}
const preferInline = context.options[0] && context.options[0]['prefer-inline'];
return (fixer) => {
const tokens = sourceCode.getTokens(first);
const openBrace = tokens.find(token => isPunctuator(token, '{'));
const closeBrace = tokens.find(token => isPunctuator(token, '}'));
const firstToken = sourceCode.getFirstToken(first);
const [defaultImportName] = defaultImportNames;
const firstHasTrailingComma = closeBrace != null &&
isPunctuator(sourceCode.getTokenBefore(closeBrace), ',');
const firstIsEmpty = !hasSpecifiers(first);
const firstExistingIdentifiers = firstIsEmpty
? new Set()
: new Set(sourceCode.text
.slice(openBrace.range[1], closeBrace.range[0])
.split(',')
.map(x => x.split(' as ')[0].trim()));
const [specifiersText] = specifiers.reduce(([result, needsComma, existingIdentifiers], specifier) => {
const isTypeSpecifier = 'importNode' in specifier &&
specifier.importNode.importKind === 'type';
if (preferInline && isTypeScriptVersionSupportPreferInline()) {
throw new Error('Your version of TypeScript does not support inline type imports.');
}
const [specifierText, updatedExistingIdentifiers] = specifier.identifiers.reduce(([text, set], cur) => {
const trimmed = cur.trim();
if (trimmed.length === 0 || existingIdentifiers.has(trimmed)) {
return [text, set];
}
const curWithType = preferInline && isTypeSpecifier
? cur.replace(/^(\s*)/, '$1type ')
: cur;
return [
text.length > 0 ? `${text},${curWithType}` : curWithType,
set.add(trimmed),
];
}, ['', existingIdentifiers]);
return [
needsComma && !specifier.isEmpty && specifierText.length > 0
? `${result},${specifierText}`
: `${result}${specifierText}`,
specifier.isEmpty ? needsComma : true,
updatedExistingIdentifiers,
];
}, ['', !firstHasTrailingComma && !firstIsEmpty, firstExistingIdentifiers]);
const fixes = [];
if (shouldAddSpecifiers && preferInline && first.importKind === 'type') {
const typeIdentifierToken = tokens.find(token => token.type === 'Identifier' && token.value === 'type');
if (typeIdentifierToken) {
fixes.push(fixer.removeRange([
typeIdentifierToken.range[0],
typeIdentifierToken.range[1] + 1,
]));
}
for (const identifier of tokens.filter(token => firstExistingIdentifiers.has(token.value))) {
fixes.push(fixer.replaceTextRange([identifier.range[0], identifier.range[1]], `type ${identifier.value}`));
}
}
if (openBrace == null && shouldAddSpecifiers && shouldAddDefault()) {
fixes.push(fixer.insertTextAfter(firstToken, ` ${defaultImportName}, {${specifiersText}} from`));
}
else if (openBrace == null &&
!shouldAddSpecifiers &&
shouldAddDefault()) {
fixes.push(fixer.insertTextAfter(firstToken, ` ${defaultImportName} from`));
}
else if (openBrace != null && closeBrace != null && shouldAddDefault()) {
fixes.push(fixer.insertTextAfter(firstToken, ` ${defaultImportName},`));
if (shouldAddSpecifiers) {
fixes.push(fixer.insertTextBefore(closeBrace, specifiersText));
}
}
else if (openBrace == null &&
shouldAddSpecifiers &&
!shouldAddDefault()) {
if (first.specifiers.length === 0) {
fixes.push(fixer.insertTextAfter(firstToken, ` {${specifiersText}} from`));
}
else {
fixes.push(fixer.insertTextAfter(first.specifiers[0], `, {${specifiersText}}`));
}
}
else if (openBrace != null && closeBrace != null && !shouldAddDefault()) {
const tokenBefore = sourceCode.getTokenBefore(closeBrace);
fixes.push(fixer.insertTextAfter(tokenBefore, specifiersText));
}
for (const specifier of specifiers) {
const importNode = specifier.importNode;
fixes.push(fixer.remove(importNode));
const charAfterImportRange = [
importNode.range[1],
importNode.range[1] + 1,
];
const charAfterImport = sourceCode.text.slice(charAfterImportRange[0], charAfterImportRange[1]);
if (charAfterImport === '\n') {
fixes.push(fixer.removeRange(charAfterImportRange));
}
}
for (const node of unnecessaryImports) {
fixes.push(fixer.remove(node));
const charAfterImportRange = [node.range[1], node.range[1] + 1];
const charAfterImport = sourceCode.text.slice(charAfterImportRange[0], charAfterImportRange[1]);
if (charAfterImport === '\n') {
fixes.push(fixer.removeRange(charAfterImportRange));
}
}
return fixes;
};
}
function isPunctuator(node, value) {
return node.type === 'Punctuator' && node.value === value;
}
function getDefaultImportName(node) {
const defaultSpecifier = node.specifiers.find(specifier => specifier.type === 'ImportDefaultSpecifier');
return defaultSpecifier?.local.name;
}
function hasNamespace(node) {
return node.specifiers.some(specifier => specifier.type === 'ImportNamespaceSpecifier');
}
function hasSpecifiers(node) {
return node.specifiers.some(specifier => specifier.type === 'ImportSpecifier');
}
function hasProblematicComments(node, sourceCode) {
return (hasCommentBefore(node, sourceCode) ||
hasCommentAfter(node, sourceCode) ||
hasCommentInsideNonSpecifiers(node, sourceCode));
}
function hasCommentBefore(node, sourceCode) {
return sourceCode
.getCommentsBefore(node)
.some(comment => comment.loc.end.line >= node.loc.start.line - 1);
}
function hasCommentAfter(node, sourceCode) {
return sourceCode
.getCommentsAfter(node)
.some(comment => comment.loc.start.line === node.loc.end.line);
}
function hasCommentInsideNonSpecifiers(node, sourceCode) {
const tokens = sourceCode.getTokens(node);
const openBraceIndex = tokens.findIndex(token => isPunctuator(token, '{'));
const closeBraceIndex = tokens.findIndex(token => isPunctuator(token, '}'));
const someTokens = openBraceIndex !== -1 && closeBraceIndex !== -1
? [
...tokens.slice(1, openBraceIndex + 1),
...tokens.slice(closeBraceIndex + 1),
]
: tokens.slice(1);
return someTokens.some(token => sourceCode.getCommentsBefore(token).length > 0);
}
export default createRule({
name: 'no-duplicates',
meta: {
type: 'problem',
docs: {
category: 'Style guide',
description: 'Forbid repeated import of the same module in multiple places.',
},
fixable: 'code',
schema: [
{
type: 'object',
properties: {
considerQueryString: {
type: 'boolean',
},
'prefer-inline': {
type: 'boolean',
},
},
additionalProperties: false,
},
],
messages: {
duplicate: "'{{module}}' imported multiple times.",
},
},
defaultOptions: [],
create(context) {
const preferInline = context.options[0]?.['prefer-inline'];
const considerQueryStringOption = context.options[0]?.considerQueryString;
const defaultResolver = (sourcePath) => resolve(sourcePath, context) || sourcePath;
const resolver = considerQueryStringOption
? (sourcePath) => {
const parts = sourcePath.match(/^([^?]*)\?(.*)$/);
if (!parts) {
return defaultResolver(sourcePath);
}
return `${defaultResolver(parts[1])}?${parts[2]}`;
}
: defaultResolver;
const moduleMaps = new Map();
function getImportMap(n) {
const parent = n.parent;
let map;
if (moduleMaps.has(parent)) {
map = moduleMaps.get(parent);
}
else {
map = {
imported: new Map(),
nsImported: new Map(),
defaultTypesImported: new Map(),
namespaceTypesImported: new Map(),
namedTypesImported: new Map(),
};
moduleMaps.set(parent, map);
}
if (n.importKind === 'type') {
if (n.specifiers.length > 0 &&
n.specifiers[0].type === 'ImportDefaultSpecifier') {
return map.defaultTypesImported;
}
if (n.specifiers.length > 0 &&
n.specifiers[0].type === 'ImportNamespaceSpecifier') {
return map.namespaceTypesImported;
}
if (!preferInline) {
return map.namedTypesImported;
}
}
if (!preferInline &&
n.specifiers.some(spec => 'importKind' in spec && spec.importKind === 'type')) {
return map.namedTypesImported;
}
return hasNamespace(n) ? map.nsImported : map.imported;
}
return {
ImportDeclaration(n) {
const resolvedPath = resolver(n.source.value);
const importMap = getImportMap(n);
if (importMap.has(resolvedPath)) {
importMap.get(resolvedPath).push(n);
}
else {
importMap.set(resolvedPath, [n]);
}
},
'Program:exit'() {
for (const map of moduleMaps.values()) {
checkImports(map.imported, context);
checkImports(map.nsImported, context);
checkImports(map.defaultTypesImported, context);
checkImports(map.namedTypesImported, context);
}
},
};
},
});
//# sourceMappingURL=no-duplicates.js.map
@@ -0,0 +1,33 @@
'use strict';
var tape = require('tape');
var path = require('../');
tape('path.win32.isAbsolute', { skip: true }, function (t) {
t.strictEqual(path.win32.isAbsolute('/'), true);
t.strictEqual(path.win32.isAbsolute('//'), true);
t.strictEqual(path.win32.isAbsolute('//server'), true);
t.strictEqual(path.win32.isAbsolute('//server/file'), true);
t.strictEqual(path.win32.isAbsolute('\\\\server\\file'), true);
t.strictEqual(path.win32.isAbsolute('\\\\server'), true);
t.strictEqual(path.win32.isAbsolute('\\\\'), true);
t.strictEqual(path.win32.isAbsolute('c'), false);
t.strictEqual(path.win32.isAbsolute('c:'), false);
t.strictEqual(path.win32.isAbsolute('c:\\'), true);
t.strictEqual(path.win32.isAbsolute('c:/'), true);
t.strictEqual(path.win32.isAbsolute('c://'), true);
t.strictEqual(path.win32.isAbsolute('C:/Users/'), true);
t.strictEqual(path.win32.isAbsolute('C:\\Users\\'), true);
t.strictEqual(path.win32.isAbsolute('C:cwd/another'), false);
t.strictEqual(path.win32.isAbsolute('C:cwd\\another'), false);
t.strictEqual(path.win32.isAbsolute('directory/directory'), false);
t.strictEqual(path.win32.isAbsolute('directory\\directory'), false);
t.end();
});
tape('path.posix.isAbsolute', function (t) {
t.strictEqual(path.posix.isAbsolute('/home/foo'), true);
t.strictEqual(path.posix.isAbsolute('/home/foo/..'), true);
t.strictEqual(path.posix.isAbsolute('bar/'), false);
t.strictEqual(path.posix.isAbsolute('./baz'), false);
t.end();
});
@@ -0,0 +1 @@
{"version":3,"file":"bin.mjs","sourceRoot":"","sources":["../../src/bin.mts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC,MAAM,EAAE,OAAO,EAAE,GAAG,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAA;AAEvE,MAAM,CAAC,GAAG,IAAI,CAAC;IACb,KAAK,EAAE,4CAA4C;CACpD,CAAC;KACC,WAAW,CACV;YACQ,OAAO;;;;GAIhB,CACA;KACA,GAAG,CAAC;IACH,GAAG,EAAE;QACH,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;0CACuB;KACrC;CACF,CAAC;KACD,GAAG,CAAC;IACH,OAAO,EAAE;QACP,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;iCACc;KAC5B;CACF,CAAC;KACD,IAAI,CAAC;IACJ,GAAG,EAAE;QACH,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;OAqBZ;KACF;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,0BAA0B;KACxC;IACD,cAAc,EAAE;QACd,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,kCAAkC;KAChD;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,uCAAuC;KACrD;IACD,KAAK,EAAE;QACL,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;;;;;OAKZ;KACF;IAED,MAAM,EAAE;QACN,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,kDAAkD;KAChE;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;;;+DAG4C;KAC1D;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;wDACqC;KACnD;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;;;;OAIZ;KACF;IAED,GAAG,EAAE;QACH,WAAW,EAAE;;OAEZ;KACF;IACD,OAAO,EAAE;QACP,WAAW,EAAE,8BAA8B;KAC5C;IACD,MAAM,EAAE;QACN,WAAW,EAAE;;;;;;;;;OASZ;KACF;IACD,KAAK,EAAE;QACL,WAAW,EAAE;;;;OAIZ;KACF;IACD,KAAK,EAAE;QACL,WAAW,EAAE,kDAAkD;KAChE;IACD,UAAU,EAAE;QACV,WAAW,EAAE;0DACuC;KACrD;IACD,wBAAwB,EAAE;QACxB,WAAW,EAAE;;sDAEmC;KACjD;CACF,CAAC;KACD,GAAG,CAAC;IACH,WAAW,EAAE;QACX,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;sCACmB;KACjC;CACF,CAAC;KACD,GAAG,CAAC;IACH,GAAG,EAAE;QACH,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,+CAA+C;QAC5D,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE;KACvB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;;;;;;;;;;;;;;;;;;;OAmBZ;KACF;IACD,QAAQ,EAAE;QACR,WAAW,EAAE;;uEAEoD;QACjE,YAAY,EAAE;YACZ,KAAK;YACL,SAAS;YACT,QAAQ;YACR,SAAS;YACT,OAAO;YACP,OAAO;YACP,SAAS;YACT,OAAO;YACP,OAAO;YACP,QAAQ;YACR,QAAQ;SACT;KACF;CACF,CAAC;KACD,OAAO,CAAC;IACP,MAAM,EAAE;QACN,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,yBAAyB;KACvC;CACF,CAAC;KACD,IAAI,CAAC;IACJ,KAAK,EAAE;QACL,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;yEACsD;KACpE;CACF,CAAC;KACD,IAAI,CAAC;IACJ,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,6BAA6B;KAC3C;CACF,CAAC,CAAA;AAEJ,IAAI,CAAC;IACH,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,CAAA;IACzC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;QACtB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;IACD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO;QAC7C,MAAM,sBAAsB,CAAA;IAC9B,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO;QAC5C,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IAClC,MAAM,QAAQ,GACZ,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;IACpE,MAAM,OAAO,GACX,MAAM,CAAC,GAAG,CAAC,CAAC;QACV,EAAE;QACJ,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5D,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,EAAE;QAClC,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC;QACnC,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC;QAC/B,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC;QAC7B,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,QAAQ,EAAE,MAAM,CAAC,QAAuC;QACxD,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC,CAAA;IAEF,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAA;IACtB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IACxC,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;QACvC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IACxE,CAAC;AACH,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC;IACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;IACxB,OAAO,CAAC,KAAK,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;IACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC","sourcesContent":["#!/usr/bin/env node\nimport { foregroundChild } from 'foreground-child'\nimport { existsSync } from 'fs'\nimport { jack } from 'jackspeak'\nimport { loadPackageJson } from 'package-json-from-dist'\nimport { join } from 'path'\nimport { globStream } from './index.js'\n\nconst { version } = loadPackageJson(import.meta.url, '../package.json')\n\nconst j = jaLine truncated
@@ -0,0 +1,36 @@
import {getOwnerWindow as $djhjW$getOwnerWindow} from "@react-aria/utils";
/*
* Copyright 2021 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $645f2e67b85a24c9$var$isStyleVisible(element) {
const windowObject = (0, $djhjW$getOwnerWindow)(element);
if (!(element instanceof windowObject.HTMLElement) && !(element instanceof windowObject.SVGElement)) return false;
let { display: display, visibility: visibility } = element.style;
let isVisible = display !== 'none' && visibility !== 'hidden' && visibility !== 'collapse';
if (isVisible) {
const { getComputedStyle: getComputedStyle } = element.ownerDocument.defaultView;
let { display: computedDisplay, visibility: computedVisibility } = getComputedStyle(element);
isVisible = computedDisplay !== 'none' && computedVisibility !== 'hidden' && computedVisibility !== 'collapse';
}
return isVisible;
}
function $645f2e67b85a24c9$var$isAttributeVisible(element, childElement) {
return !element.hasAttribute('hidden') && // Ignore HiddenSelect when tree walking.
!element.hasAttribute('data-react-aria-prevent-focus') && (element.nodeName === 'DETAILS' && childElement && childElement.nodeName !== 'SUMMARY' ? element.hasAttribute('open') : true);
}
function $645f2e67b85a24c9$export$e989c0fffaa6b27a(element, childElement) {
return element.nodeName !== '#comment' && $645f2e67b85a24c9$var$isStyleVisible(element) && $645f2e67b85a24c9$var$isAttributeVisible(element, childElement) && (!element.parentElement || $645f2e67b85a24c9$export$e989c0fffaa6b27a(element.parentElement, element));
}
export {$645f2e67b85a24c9$export$e989c0fffaa6b27a as isElementVisible};
//# sourceMappingURL=isElementVisible.module.js.map
@@ -0,0 +1,14 @@
import { CertificateSet } from "./certificate_choices";
import { RevocationInfoChoices } from "./revocation_info_choice";
/**
* ```asn
* OriginatorInfo ::= SEQUENCE {
* certs [0] IMPLICIT CertificateSet OPTIONAL,
* crls [1] IMPLICIT RevocationInfoChoices OPTIONAL }
* ```
*/
export declare class OriginatorInfo {
certs?: CertificateSet;
crls?: RevocationInfoChoices;
constructor(params?: Partial<OriginatorInfo>);
}
@@ -0,0 +1,26 @@
import type { Uint8Array_ } from '../../../types/index.js';
/**
* Cut up a TPM attestation's certInfo into intelligible chunks
*/
export declare function parseCertInfo(certInfo: Uint8Array_): ParsedCertInfo;
type ParsedCertInfo = {
magic: number;
type: string;
qualifiedSigner: Uint8Array_;
extraData: Uint8Array_;
clockInfo: {
clock: Uint8Array_;
resetCount: number;
restartCount: number;
safe: boolean;
};
firmwareVersion: Uint8Array_;
attested: {
nameAlg: string;
nameAlgBuffer: Uint8Array_;
name: Uint8Array_;
qualifiedName: Uint8Array_;
};
};
export {};
//# sourceMappingURL=parseCertInfo.d.ts.map
@@ -0,0 +1,329 @@
import { ElementType, MessageElement, NTGrayTipElementSubTypeV2, PicSubType, PicType, TipAioOpGrayTipElement, TipGroupElement, NTVideoType, FaceType, Peer } from './msg';
type ElementFullBase = Omit<MessageElement, 'elementType' | 'elementId' | 'extBufForUI'>;
export interface SendElementBase<ET extends ElementType> {
elementType: ET;
elementId: string;
extBufForUI?: string;
}
type ElementBase<K extends keyof ElementFullBase, S extends Partial<{
[P in K]: keyof NonNullable<ElementFullBase[P]> | Array<keyof NonNullable<ElementFullBase[P]>>;
}> = object> = {
[P in K]: S[P] extends Array<infer U> ? Pick<NonNullable<ElementFullBase[P]>, U & keyof NonNullable<ElementFullBase[P]>> : S[P] extends keyof NonNullable<ElementFullBase[P]> ? Pick<NonNullable<ElementFullBase[P]>, S[P]> : NonNullable<ElementFullBase[P]>;
};
export interface TextElement {
content: string;
atType: number;
atUid: string;
atTinyId: string;
atNtUid: string;
}
export interface FaceElement {
pokeType?: number;
faceIndex: number;
faceType: FaceType;
faceText?: string;
packId?: string;
stickerId?: string;
sourceType?: number;
stickerType?: number;
resultId?: string;
surpriseId?: string;
randomType?: number;
chainCount?: number;
}
export interface GrayTipRovokeElement {
operatorRole: string;
operatorUid: string;
operatorNick: string;
operatorRemark: string;
isSelfOperate: boolean;
operatorMemRemark?: string;
wording: string;
}
export interface XmlToJsonParam {
busiType: string;
busiId: string;
c2cType: number;
serviceType: number;
ctrlFlag: number;
content: string;
templId: string;
seqId: string;
templParam: Map<string, string>;
pbReserv: null | string;
members: Map<string, string>;
}
export interface GrayTipElement {
subElementType: NTGrayTipElementSubTypeV2;
revokeElement: GrayTipRovokeElement;
aioOpGrayTipElement: TipAioOpGrayTipElement;
groupElement: TipGroupElement;
xmlElement: {
busiId: string;
content: string;
templId: string;
};
jsonGrayTipElement: {
busiId: string;
jsonStr: string;
recentAbstract?: string;
isServer?: boolean;
xmlToJsonParam?: XmlToJsonParam;
};
}
export interface ArkElement {
bytesData: string;
linkInfo: null;
subElementType: null;
}
export interface MarketFaceElement {
emojiPackageId: number;
faceName: string;
emojiId: string;
key: string;
}
export interface VideoElement {
filePath: string;
fileName: string;
videoMd5?: string;
thumbMd5?: string;
fileTime?: number;
thumbSize?: number;
fileFormat?: NTVideoType;
fileSize?: string;
thumbWidth?: number;
thumbHeight?: number;
busiType?: 0;
subBusiType?: 0;
thumbPath?: Map<number, unknown>;
transferStatus?: 0;
progress?: 0;
invalidState?: 0;
fileUuid?: string;
fileSubId?: string;
fileBizId?: null;
originVideoMd5?: string;
import_rich_media_context?: null;
sourceVideoCodecFormat?: number;
}
export interface PicElement {
md5HexStr?: string;
filePath?: string;
fileSize: number | string;
picWidth: number;
picHeight: number;
fileName: string;
sourcePath: string;
original: boolean;
picType: PicType;
picSubType?: PicSubType;
fileUuid: string;
fileSubId: string;
thumbFileSize: number;
summary: string;
thumbPath: Map<number, string>;
originImageMd5?: string;
originImageUrl?: string;
}
export interface InlineKeyboardButton {
id: string;
label: string;
visitedLabel: string;
unsupportTips: string;
data: string;
specifyRoleIds: string[];
specifyTinyids: string[];
style: number;
type: number;
clickLimit: number;
atBotShowChannelList: boolean;
permissionType: number;
}
interface InlineKeyboardRow {
buttons: InlineKeyboardButton[];
}
interface TofuElementContent {
color: string;
tittle: string;
}
export interface ActionBarElement {
rows: InlineKeyboardRow[];
botAppid: string;
}
export interface RecommendedMsgElement {
rows: InlineKeyboardRow[];
botAppid: string;
}
export interface TofuRecordElement {
type: number;
busiid: string;
busiuuid: string;
descriptionContent: string;
contentlist: TofuElementContent[];
background: string;
icon: string;
uinlist: string[];
uidlist: string[];
busiExtra: string;
updateTime: string;
dependedmsgid: string;
msgtime: string;
onscreennotify: boolean;
}
export interface FileElement {
fileMd5?: string;
fileName: string;
filePath: string;
fileSize: string;
picHeight?: number;
picWidth?: number;
folderId?: string;
picThumbPath?: Map<number, string>;
file10MMd5?: string;
fileSha?: string;
fileSha3?: string;
fileUuid?: string;
fileSubId?: string;
thumbFileSize?: number;
fileBizId?: number;
}
export interface ShareLocationElement {
text: string;
ext: string;
}
export interface StructLongMsgElement {
xmlContent: string;
resId: string;
}
export interface ReplyElement {
sourceMsgIdInRecords?: string;
replayMsgSeq: string;
replayMsgId: string;
senderUin: string;
senderUidStr?: string;
replyMsgTime?: string;
replyMsgClientSeq?: string;
_replyMsgPeer?: Peer;
}
export interface CalendarElement {
summary: string;
msg: string;
expireTimeMs: string;
schemaType: number;
schema: string;
}
export interface GiphyElement {
id: string;
isClip: boolean;
width: number;
height: number;
}
export interface AvRecordElement {
type: number;
time: string;
text: string;
mainType: number;
hasRead: boolean;
extraType: number;
}
interface YoloUserInfo {
uid: string;
result: number;
rank: number;
bizId: string;
}
export interface YoloGameResultElement {
UserInfo: YoloUserInfo[];
}
export interface FaceBubbleElement {
faceCount: number;
faceSummary: string;
faceFlag: number;
content: string;
oldVersionStr: string;
faceType: FaceType;
others: string;
yellowFaceInfo: {
index: number;
buf: string;
compatibleText: string;
text: string;
};
}
export interface TaskTopMsgElement {
msgTitle: string;
msgSummary: string;
iconUrl: string;
topMsgType: number;
}
export interface PttElement {
canConvert2Text: boolean;
duration: number;
fileBizId: null;
fileId: number;
fileName: string;
filePath: string;
fileSize: string;
fileSubId: string;
fileUuid: string;
formatType: number;
invalidState: number;
md5HexStr: string;
playState: number;
progress: number;
text: string;
transferStatus: number;
translateStatus: number;
voiceChangeType: number;
voiceType: number;
waveAmplitudes: number[];
autoConvertText: number;
storeID: number;
otherBusinessInfo: {
aiVoiceType: number;
};
}
export type SendRecommendedMsgElement = SendElementBase<ElementType.RECOMMENDEDMSG> & ElementBase<'recommendedMsgElement'>;
export type SendTaskTopMsgElement = SendElementBase<ElementType.TASKTOPMSG> & ElementBase<'taskTopMsgElement'>;
export type SendTofuRecordElement = SendElementBase<ElementType.TOFURECORD> & ElementBase<'tofuRecordElement'>;
export type SendFaceBubbleElement = SendElementBase<ElementType.FACEBUBBLE> & ElementBase<'faceBubbleElement'>;
export type SendAvRecordElement = SendElementBase<ElementType.AVRECORD> & ElementBase<'avRecordElement'>;
export type SendInlineKeyboardElement = SendElementBase<ElementType.INLINEKEYBOARD> & ElementBase<'inlineKeyboardElement'>;
export type SendYoloGameResultElement = SendElementBase<ElementType.YOLOGAMERESULT> & ElementBase<'yoloGameResultElement'>;
export type SendGiphyElement = SendElementBase<ElementType.GIPHY> & ElementBase<'giphyElement'>;
export type SendWalletElement = SendElementBase<ElementType.UNKNOWN> & ElementBase<'walletElement'>;
export type SendCalendarElement = SendElementBase<ElementType.CALENDAR> & ElementBase<'calendarElement'>;
export type SendLiveGiftElement = SendElementBase<ElementType.LIVEGIFT> & ElementBase<'liveGiftElement'>;
export type SendTextElement = SendElementBase<ElementType.TEXT> & ElementBase<'textElement'>;
export type SendReplyElement = SendElementBase<ElementType.REPLY> & ElementBase<'replyElement'>;
export type SendFaceElement = SendElementBase<ElementType.FACE> & ElementBase<'faceElement'>;
export type SendMarketFaceElement = SendElementBase<ElementType.MFACE> & ElementBase<'marketFaceElement'>;
export type SendStructLongMsgElement = SendElementBase<ElementType.STRUCTLONGMSG> & ElementBase<'structLongMsgElement'>;
export type SendPicElement = SendElementBase<ElementType.PIC> & ElementBase<'picElement'>;
export type SendPttElement = SendElementBase<ElementType.PTT> & ElementBase<'pttElement', {
pttElement: [
'fileName',
'filePath',
'md5HexStr',
'fileSize',
'duration',
'formatType',
'voiceType',
'voiceChangeType',
'canConvert2Text',
'waveAmplitudes',
'fileSubId',
'playState',
'autoConvertText',
'storeID',
'otherBusinessInfo'
];
}>;
export type SendFileElement = SendElementBase<ElementType.FILE> & ElementBase<'fileElement'>;
export type SendVideoElement = SendElementBase<ElementType.VIDEO> & ElementBase<'videoElement'>;
export type SendArkElement = SendElementBase<ElementType.ARK> & ElementBase<'arkElement'>;
export type SendMarkdownElement = SendElementBase<ElementType.MARKDOWN> & ElementBase<'markdownElement'>;
export type SendShareLocationElement = SendElementBase<ElementType.SHARELOCATION> & ElementBase<'shareLocationElement'>;
export type SendMultiForwardMsgElement = SendElementBase<ElementType.MULTIFORWARD> & ElementBase<'multiForwardMsgElement'>;
export type SendMessageElement = SendTextElement | SendPttElement | SendPicElement | SendReplyElement | SendFaceElement | SendMarketFaceElement | SendFileElement | SendVideoElement | SendArkElement | SendMarkdownElement | SendShareLocationElement;
export {};
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=getClassMetadata.spec.d.ts.map
@@ -0,0 +1,11 @@
import { a as absFloor } from "./absFloor-BlD_nfEw.mjs";
import { m as monthDiff } from "./monthDiff-BZ0YZrA0.mjs";
import parse from "./parse.mjs";
function diffInMonths(date, input, asFloat) {
const parsed = parse(input);
const output = monthDiff(date, parsed);
return asFloat ? output : absFloor(output);
}
export {
diffInMonths as default
};
@@ -0,0 +1 @@
{"name":"math-intrinsics","version":"1.1.0","requiresBuild":false,"files":{".eslintrc":{"checkedAt":1794532089261,"integrity":"sha512-t0HG7zl7ysZGGdyGAe8bb7bb/dmxg48xXNU8FVVTU4+8eh4bxCmXXkeLVswnOn0sRL9Lqw8WTcvFo/BJNmuxiw==","mode":420,"size":229},"LICENSE":{"checkedAt":1794532089370,"integrity":"sha512-PV8GlePH5+YfCyV+THSYfrdEzoJRVmCPetP3EARzKwI3Bnh0i0nE3ydoRviqvddcBYQkV5ERF5qIyG2qZg8FrQ==","mode":420,"size":1073},"abs.js":{"checkedAt":1794532089370,"integrity":"sha512-7i4X/3+4MOfyDigqD3DY49vReEta7hbndsaha230pl/wSN6gQsdyocPmftL5Irpnnuwxt5+wVJjci4Kn4oFuIQ==","mode":420,"size":73},"floor.js":{"checkedAt":1794532089371,"integrity":"sha512-4564yspDuOUzgQqf8NDYlGO+rXho+Y09B4OjphdJI3NPLwRW2JP9h39ixeVyGGHdvkhGKSNax2i8XrnPx1PAug==","mode":420,"size":77},"test/index.js":{"checkedAt":1794532089371,"integrity":"sha512-cFGzVCzvl/yi0sr9VIGu9W6pbQsdfV+29gkzqeojtHJvvZpCsmdOYj1STdbMWFkx0ECyZj76H2YkNHjdgzyj4g==","mode":420,"size":6320},"isFinite.js":{"checkedAt":1794532089371,"integrity":"sha512-ZD65yfmuGLAcKFjnzyOJ3UBMdi3lVMz66HCwv9rMqOPW+YyBQ2jj3cBHQlEdPWvL1j+Wgwi7X4ZyyKaOaOqoxg==","mode":420,"size":262},"isInteger.js":{"checkedAt":1794532089371,"integrity":"sha512-vTCFvOhYurU7qKf9Qmp5K2KseIjK/xf/9T66YzYIui8XXw/OsVcfyxkDN6/KAeG93RhFKfb+p1U+iElW+1z4jA==","mode":420,"size":410},"isNaN.js":{"checkedAt":1794532089372,"integrity":"sha512-fN7GU6tDd8SEhHpK053ef30+zjsVvCNR2EE+o0G/cIWJXjELUGk8/M4ygw9XDIT5yFElf44D+9/zde4t+k7kcA==","mode":420,"size":121},"isNegativeZero.js":{"checkedAt":1794532089372,"integrity":"sha512-ZCHASm/10sSxbXBWVo3LK6uQab574ky4l3tRjyJVfKG5SLjZyVpR1bJNh5YAnOHDG5VA14dafIYWwBfmUd8jVQ==","mode":420,"size":143},"max.js":{"checkedAt":1794532089372,"integrity":"sha512-TKB9qiXV/X83fxZACD1UrCeRuDVQwkWL1xh6BK5kb3j0zOEb1zamY0ZZH4HbqWarNflkgP8ZKh6AP5JqqNKpDA==","mode":420,"size":73},"constants/maxArrayLength.js":{"checkedAt":1794532089372,"integrity":"sha512-7+mf60rnlWerxFF6pNZxV0hqMHVQq/jgE/FMVrw26NwwyKpuDx63y8Y924OMtwF/vEos/M9pvHuCMQ90MD8hVA==","mode":420,"size":110},"constants/maxSafeInteger.js":{"checkedAt":1794532089372,"integrity":"sha512-PmUmybfQ4qyOqovVnzH4sEZRYFOhV3d5uaICpWOXA1N/I6efbtunuSneDFjU1ZLC69sJBkJtXiPrdKaLtoVR1g==","mode":420,"size":231},"constants/maxValue.js":{"checkedAt":1794532089372,"integrity":"sha512-UfVlskqjNoQlld02tMLAbHVKCRrPPWp81hWjGvxiP/7c0ZbeOxQH7tvogtEwIfrujUe443IwuG80rug7RMbp+A==","mode":420,"size":197},"min.js":{"checkedAt":1794532089373,"integrity":"sha512-4I/tL3TnheL++XMI7TYly/L95J+zpxi5ZLR4C4awCAHcLTNK8JLaJrWabCGWFz5+UGZZ8EaOLhry8SGcfHFHLg==","mode":420,"size":73},"mod.js":{"checkedAt":1794532089373,"integrity":"sha512-1oEmt81ZTZ0fuVhPzQeXk57MxiC9oz5/8uronmlzlVC8OMFg3VGZB8HKqpPKlWFx9ejPlFNl2fhIyHlSU6u+pw==","mode":420,"size":218},"pow.js":{"checkedAt":1794532089373,"integrity":"sha512-X99R8yfxGhEwx9eN6p1PriWy7sAxACR2/h3DpkGG+XGsWboHD/+32LE6M4b39TRSKEzXSyntzyCfaa5vrfi9KA==","mode":420,"size":73},"round.js":{"checkedAt":1794532089373,"integrity":"sha512-xdQq6GrJ512Wuc/EAv99hDn8KoS5waeCacLp9ya0bWXv0p9pmswpELLRkV8oSiU+YZLikvHnaJQHSoRs4LIEFg==","mode":420,"size":77},"sign.js":{"checkedAt":1794532089373,"integrity":"sha512-ss2Wuy/P2ajFUcFa+pD4FprS2lPHBmiWhCx7eza+pq4/YxL7qHAgPrxbBtkgbLUceM2vuusaL39iCOBsc8fq2w==","mode":420,"size":214},"package.json":{"checkedAt":1794532089373,"integrity":"sha512-vdSe3cE+0CX9zxu7avCLBCFwksEihhZXrYrl0i7dZdnGcf+DHa4y6cdsr7jfosboEodB5HBROjjKwjOynAmdUw==","mode":420,"size":2670},"tsconfig.json":{"checkedAt":1794532089374,"integrity":"sha512-0s306a9Llz0UU47lwXaGcDfYAmVA/6Kp/nGPZopEiyfWGcUNeNSbdqyx0A8P0Kpzex1bH5YWGXBpzlIdQD1/1Q==","mode":420,"size":36},"CHANGELOG.md":{"checkedAt":1794532089374,"integrity":"sha512-HlsIESxvpHNx/CXn1imsGzs4CPWR2rSz3S6rDPOm3A1A/Ps3voA5fT160kDQDZMyw85kZlGyXTpQh/iTWuFV+w==","mode":420,"size":1466},"README.md":{"checkedAt":1794532089374,"integrity":"sha512-trCnal3OUbE5jWs3+JHrH5vuju0SY47nlcQT1bw/uvzgZVv+FGDw2cXfiV9PxngrwahSOyW3ECkQ5n/SI9hunA==","mode":420,"size":1884},"abs.d.ts":{"checkedAt":1794532089374,"integrity":"sha512-qMYnYdhChjqgqNqU5yiliPcpyKLmHnOqEUtHllsx2eQINU25udmLVgCc3P7O9H6/slp5hTk/e2D1zDvvhuOGdA==","mode":420,"size":18},"floor.d.ts":{"checkedAt":1794532089374,"integrity":"sha512-ZyFUhJVyjBuUnsG/A99jgvnU5+uDg2xQIQVNKewbHyX/il85mNONSTtlM0atL/wgozheDbN0Ioj/gktPkD8QOw==","mode":420,"size":20},"isFinite.d.ts":{"checkedAt":1794532089375,"integrity":"sha512-ql+eGS/EbBAyG85DKEHzCmQBSskmohD7UjJgJUBkBJbm4/VYiZexOVH6OLbTqOIGWEOpl5ly4f3sT5zeXHKicw==","mode":420,"size":80},"isInteger.d.ts":{"checkedAt":1794532089375,"integrity":"sha512-n0XHB0fl2Tn2xrLPZv1EekLsHWaENfaa+14KhlO4/9VU4r9cCKvAaKP9NHrbEiylZL0Mz7yvCsRc+AItY05dsA==","mode":420,"size":87},"isNaN.d.ts":{"checkedAt":1794532089375,"integrity":"sha512-+hbxfCsoKNzUitvQY5zp7gorezoI2aDs97idLMkdSBCI087kxn4hgMLUkk8T2j+aiWjuv7V1TzE/aj68TWjwaA==","mode":420,"size":22},"isNegativeZero.d.ts":{"checkedAt":1794532089375,"integrity":"sha512-LoVwzZ1DBFyGIa+AYdrCV5iNgcNzYwBKPiaCGTAVe4c6RDLo7z6P6oR6ZO1XALBhy/HLQUUMXXxwPxechCxLaw==","mode":420,"size":79},"max.d.ts":{"checkedAt":1794532089375,"inteLine truncated
@@ -0,0 +1,24 @@
import baseInvoke from './_baseInvoke.js';
import baseRest from './_baseRest.js';
/**
* Invokes the method at `path` of `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path of the method to invoke.
* @param {...*} [args] The arguments to invoke the method with.
* @returns {*} Returns the result of the invoked method.
* @example
*
* var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
*
* _.invoke(object, 'a[0].b.c.slice', 1, 3);
* // => [2, 3]
*/
var invoke = baseRest(baseInvoke);
export default invoke;
@@ -0,0 +1,624 @@
/**
* @fileoverview Rule to flag on declaring variables already declared in the outer scope
* @author Ilya Volodin
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const FUNC_EXPR_NODE_TYPES = new Set([
"ArrowFunctionExpression",
"FunctionExpression",
]);
const CALL_EXPR_NODE_TYPE = new Set(["CallExpression"]);
const FOR_IN_OF_TYPE = /^For(?:In|Of)Statement$/u;
const SENTINEL_TYPE =
/^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u;
// TS-specific node types
const TYPES_HOISTED_NODES = new Set([
"TSInterfaceDeclaration",
"TSTypeAliasDeclaration",
]);
// TS-specific function variable def types
const ALLOWED_FUNCTION_VARIABLE_DEF_TYPES = new Set([
"TSCallSignatureDeclaration",
"TSFunctionType",
"TSMethodSignature",
"TSEmptyBodyFunctionExpression",
"TSDeclareFunction",
"TSConstructSignatureDeclaration",
"TSConstructorType",
]);
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
dialects: ["typescript", "javascript"],
language: "javascript",
defaultOptions: [
{
allow: [],
builtinGlobals: false,
hoist: "functions",
ignoreOnInitialization: false,
ignoreTypeValueShadow: true,
ignoreFunctionTypeParameterNameValueShadow: true,
},
],
docs: {
description:
"Disallow variable declarations from shadowing variables declared in the outer scope",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-shadow",
},
schema: [
{
type: "object",
properties: {
builtinGlobals: { type: "boolean" },
hoist: {
enum: [
"all",
"functions",
"never",
"types",
"functions-and-types",
],
},
allow: {
type: "array",
items: {
type: "string",
},
},
ignoreOnInitialization: { type: "boolean" },
ignoreTypeValueShadow: { type: "boolean" },
ignoreFunctionTypeParameterNameValueShadow: {
type: "boolean",
},
},
additionalProperties: false,
},
],
messages: {
noShadow:
"'{{name}}' is already declared in the upper scope on line {{shadowedLine}} column {{shadowedColumn}}.",
noShadowGlobal: "'{{name}}' is already a global variable.",
},
},
create(context) {
const [
{
builtinGlobals,
hoist,
allow,
ignoreOnInitialization,
ignoreTypeValueShadow,
ignoreFunctionTypeParameterNameValueShadow,
},
] = context.options;
const sourceCode = context.sourceCode;
/**
* Check if a scope is a TypeScript module augmenting the global namespace.
* @param {Scope} scope The scope to check
* @returns {boolean} Whether the scope is a global augmentation
*/
function isGlobalAugmentation(scope) {
return (
scope.block.kind === "global" ||
(!!scope.upper && isGlobalAugmentation(scope.upper))
);
}
/**
* Check if variable is a `this` parameter.
* @param {Object} variable The variable to check
* @returns {boolean} Whether the variable is a this parameter
*/
function isThisParam(variable) {
return variable.name === "this";
}
/**
* Checks if type and value shadows each other
* @param {Object} variable The variable to check
* @param {Object} shadowedVariable The shadowed variable
* @returns {boolean} Whether it's a type/value shadow case to ignore
*/
function isTypeValueShadow(variable, shadowedVariable) {
if (ignoreTypeValueShadow !== true) {
return false;
}
if (!("isValueVariable" in variable)) {
return false;
}
const firstDefinition = shadowedVariable.defs[0];
// Check if shadowedVariable is a type import
const isTypeImport =
firstDefinition &&
firstDefinition.parent?.type === "ImportDeclaration" &&
(firstDefinition.parent.importKind === "type" ||
firstDefinition.parent.specifiers.some(
s => s.importKind === "type",
));
const isShadowedValue =
!firstDefinition ||
(isTypeImport ? false : shadowedVariable.isValueVariable);
return variable.isValueVariable !== isShadowedValue;
}
/**
* Checks if it's a function type parameter shadow
* @param {Object} variable The variable to check
* @returns {boolean} Whether it's a function type parameter shadow case to ignore
*/
function isFunctionTypeParameterNameValueShadow(variable) {
if (ignoreFunctionTypeParameterNameValueShadow !== true) {
return false;
}
return variable.defs.some(def =>
ALLOWED_FUNCTION_VARIABLE_DEF_TYPES.has(def.node.type),
);
}
/**
* Checks if the variable is a generic of a static method
* @param {Object} variable The variable to check
* @returns {boolean} Whether the variable is a generic of a static method
*/
function isTypeParameterOfStaticMethod(variable) {
const typeParameter = variable.identifiers[0].parent;
const typeParameterDecl = typeParameter.parent;
if (typeParameterDecl.type !== "TSTypeParameterDeclaration") {
return false;
}
const functionExpr = typeParameterDecl.parent;
const methodDefinition = functionExpr.parent;
return methodDefinition.static;
}
/**
* Checks for static method generic shadowing class generic
* @param {Object} variable The variable to check
* @returns {boolean} Whether it's a static method generic shadowing class generic
*/
function isGenericOfAStaticMethodShadow(variable) {
return isTypeParameterOfStaticMethod(variable);
}
/**
* Checks whether or not a given location is inside of the range of a given node.
* @param {ASTNode} node An node to check.
* @param {number} location A location to check.
* @returns {boolean} `true` if the location is inside of the range of the node.
*/
function isInRange(node, location) {
return (
node && node.range[0] <= location && location <= node.range[1]
);
}
/**
* Searches from the current node through its ancestry to find a matching node.
* @param {ASTNode} node a node to get.
* @param {(node: ASTNode) => boolean} match a callback that checks whether or not the node verifies its condition or not.
* @returns {ASTNode|null} the matching node.
*/
function findSelfOrAncestor(node, match) {
let currentNode = node;
while (currentNode && !match(currentNode)) {
currentNode = currentNode.parent;
}
return currentNode;
}
/**
* Finds function's outer scope.
* @param {Scope} scope Function's own scope.
* @returns {Scope} Function's outer scope.
*/
function getOuterScope(scope) {
const upper = scope.upper;
if (upper && upper.type === "function-expression-name") {
return upper.upper;
}
return upper;
}
/**
* Checks if a variable and a shadowedVariable have the same init pattern ancestor.
* @param {Object} variable a variable to check.
* @param {Object} shadowedVariable a shadowedVariable to check.
* @returns {boolean} Whether or not the variable and the shadowedVariable have the same init pattern ancestor.
*/
function isInitPatternNode(variable, shadowedVariable) {
const outerDef = shadowedVariable.defs[0];
if (!outerDef) {
return false;
}
const { variableScope } = variable.scope;
if (
!(
FUNC_EXPR_NODE_TYPES.has(variableScope.block.type) &&
getOuterScope(variableScope) === shadowedVariable.scope
)
) {
return false;
}
const fun = variableScope.block;
const { parent } = fun;
const callExpression = findSelfOrAncestor(parent, node =>
CALL_EXPR_NODE_TYPE.has(node.type),
);
if (!callExpression) {
return false;
}
let node = outerDef.name;
const location = callExpression.range[1];
while (node) {
if (node.type === "VariableDeclarator") {
if (isInRange(node.init, location)) {
return true;
}
if (
FOR_IN_OF_TYPE.test(node.parent.parent.type) &&
isInRange(node.parent.parent.right, location)
) {
return true;
}
break;
} else if (node.type === "AssignmentPattern") {
if (isInRange(node.right, location)) {
return true;
}
} else if (SENTINEL_TYPE.test(node.type)) {
break;
}
node = node.parent;
}
return false;
}
/**
* Check if variable name is allowed.
* @param {ASTNode} variable The variable to check.
* @returns {boolean} Whether or not the variable name is allowed.
*/
function isAllowed(variable) {
return allow.includes(variable.name);
}
/**
* Checks if a variable of the class name in the class scope of ClassDeclaration.
*
* ClassDeclaration creates two variables of its name into its outer scope and its class scope.
* So we should ignore the variable in the class scope.
* @param {Object} variable The variable to check.
* @returns {boolean} Whether or not the variable of the class name in the class scope of ClassDeclaration.
*/
function isDuplicatedClassNameVariable(variable) {
const block = variable.scope.block;
return (
block.type === "ClassDeclaration" &&
block.id === variable.identifiers[0]
);
}
/**
* Checks if a variable is inside the initializer of scopeVar.
*
* To avoid reporting at declarations such as `var a = function a() {};`.
* But it should report `var a = function(a) {};` or `var a = function() { function a() {} };`.
* @param {Object} variable The variable to check.
* @param {Object} scopeVar The scope variable to look for.
* @returns {boolean} Whether or not the variable is inside initializer of scopeVar.
*/
function isOnInitializer(variable, scopeVar) {
const outerScope = scopeVar.scope;
const outerDef = scopeVar.defs[0];
const outer = outerDef && outerDef.parent && outerDef.parent.range;
const innerScope = variable.scope;
const innerDef = variable.defs[0];
const inner = innerDef && innerDef.name.range;
return (
outer &&
inner &&
outer[0] < inner[0] &&
inner[1] < outer[1] &&
((innerDef.type === "FunctionName" &&
innerDef.node.type === "FunctionExpression") ||
innerDef.node.type === "ClassExpression") &&
outerScope === innerScope.upper
);
}
/**
* Get a range of a variable's identifier node.
* @param {Object} variable The variable to get.
* @returns {Array|undefined} The range of the variable's identifier node.
*/
function getNameRange(variable) {
const def = variable.defs[0];
return def && def.name.range;
}
/**
* Get declared line and column of a variable.
* @param {eslint-scope.Variable} variable The variable to get.
* @returns {Object} The declared line and column of the variable.
*/
function getDeclaredLocation(variable) {
const identifier = variable.identifiers[0];
let obj;
if (identifier) {
obj = {
global: false,
line: identifier.loc.start.line,
column: identifier.loc.start.column + 1,
};
} else {
obj = {
global: true,
};
}
return obj;
}
/**
* Checks if a variable is in TDZ of scopeVar.
* @param {Object} variable The variable to check.
* @param {Object} scopeVar The variable of TDZ.
* @returns {boolean} Whether or not the variable is in TDZ of scopeVar.
*/
function isInTdz(variable, scopeVar) {
const outerDef = scopeVar.defs[0];
const inner = getNameRange(variable);
const outer = getNameRange(scopeVar);
if (!outer || inner[1] >= outer[0]) {
return false;
}
if (hoist === "types") {
return !TYPES_HOISTED_NODES.has(outerDef.node.type);
}
if (hoist === "functions-and-types") {
return (
outerDef.node.type !== "FunctionDeclaration" &&
!TYPES_HOISTED_NODES.has(outerDef.node.type)
);
}
return (
inner &&
outer &&
inner[1] < outer[0] &&
// Excepts FunctionDeclaration if is {"hoist":"function"}.
(hoist !== "functions" ||
!outerDef ||
outerDef.node.type !== "FunctionDeclaration")
);
}
/**
* Checks if the initialization of a variable has the declare modifier in a
* definition file.
* @param {Object} variable The variable to check
* @returns {boolean} Whether the variable is declared in a definition file
*/
function isDeclareInDTSFile(variable) {
const fileName = context.filename;
if (
!fileName.endsWith(".d.ts") &&
!fileName.endsWith(".d.cts") &&
!fileName.endsWith(".d.mts")
) {
return false;
}
return variable.defs.some(
def =>
(def.type === "Variable" && def.parent.declare) ||
(def.type === "ClassName" && def.node.declare) ||
(def.type === "TSEnumName" && def.node.declare) ||
(def.type === "TSModuleName" && def.node.declare),
);
}
/**
* Checks if a variable is a duplicate of an enum name in the enum scope
* @param {Object} variable The variable to check
* @returns {boolean} Whether it's a duplicate enum name variable
*/
function isDuplicatedEnumNameVariable(variable) {
const block = variable.scope.block;
return (
block.type === "TSEnumDeclaration" &&
block.id === variable.identifiers[0]
);
}
/**
* Check if this is an external module declaration merging with a type import
* @param {Scope} scope Current scope
* @param {Object} variable Current variable
* @param {Object} shadowedVariable Shadowed variable
* @returns {boolean} Whether it's an external declaration merging
*/
function isExternalDeclarationMerging(
scope,
variable,
shadowedVariable,
) {
const firstDefinition = shadowedVariable.defs[0];
if (!firstDefinition || !firstDefinition.parent) {
return false;
}
// Check if the shadowed variable is a type import
const isTypeImport =
firstDefinition.parent.type === "ImportDeclaration" &&
(firstDefinition.parent.importKind === "type" ||
firstDefinition.parent.specifiers?.some(
s =>
s.type === "ImportSpecifier" &&
s.importKind === "type" &&
s.local.name === shadowedVariable.name,
));
if (!isTypeImport) {
return false;
}
// Check if the current variable is within a module declaration
const moduleDecl = findSelfOrAncestor(
variable.identifiers[0]?.parent,
node => node.type === "TSModuleDeclaration",
);
if (!moduleDecl) {
return false;
}
/*
* Module declaration merging should only happen within the same module
* Check if the module name matches the import source
*/
const importSource = firstDefinition.parent.source.value;
const moduleName =
moduleDecl.id.type === "Literal"
? moduleDecl.id.value
: moduleDecl.id.name;
return importSource === moduleName;
}
/**
* Checks the current context for shadowed variables.
* @param {Scope} scope Fixme
* @returns {void}
*/
function checkForShadows(scope) {
// ignore global augmentation
if (isGlobalAugmentation(scope)) {
return;
}
const variables = scope.variables;
for (let i = 0; i < variables.length; ++i) {
const variable = variables[i];
// Skips "arguments" or variables of a class name in the class scope of ClassDeclaration.
if (
variable.identifiers.length === 0 ||
isDuplicatedClassNameVariable(variable) ||
isDuplicatedEnumNameVariable(variable) ||
isAllowed(variable) ||
isDeclareInDTSFile(variable) ||
isThisParam(variable)
) {
continue;
}
// Gets shadowed variable.
const shadowed = astUtils.getVariableByName(
scope.upper,
variable.name,
);
if (
shadowed &&
(shadowed.identifiers.length > 0 ||
(builtinGlobals && "writeable" in shadowed)) &&
!isOnInitializer(variable, shadowed) &&
!(
ignoreOnInitialization &&
isInitPatternNode(variable, shadowed)
) &&
!(hoist !== "all" && isInTdz(variable, shadowed)) &&
!isTypeValueShadow(variable, shadowed) &&
!isFunctionTypeParameterNameValueShadow(variable) &&
!isGenericOfAStaticMethodShadow(variable, shadowed) &&
!isExternalDeclarationMerging(scope, variable, shadowed)
) {
const location = getDeclaredLocation(shadowed);
const messageId = location.global
? "noShadowGlobal"
: "noShadow";
const data = { name: variable.name };
if (!location.global) {
data.shadowedLine = location.line;
data.shadowedColumn = location.column;
}
context.report({
node: variable.identifiers[0],
messageId,
data,
});
}
}
}
return {
"Program:exit"(node) {
const globalScope = sourceCode.getScope(node);
const stack = globalScope.childScopes.slice();
while (stack.length) {
const scope = stack.pop();
stack.push(...scope.childScopes);
checkForShadows(scope);
}
},
};
},
};
@@ -0,0 +1,19 @@
"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("./readonly-from-mapped-result"), exports);
__exportStar(require("./readonly"), exports);
@@ -0,0 +1 @@
{"version":3,"file":"config-loader.test.js","sourceRoot":"","sources":["../../src/__tests__/config-loader.test.ts"],"names":[],"mappings":";;AAAA,kDAK0B;AAC1B,6BAA4B;AAE5B,QAAQ,CAAC,eAAe,EAAE;IACxB,EAAE,CAAC,oCAAoC,EAAE;QACvC,IAAM,MAAM,GAAG,IAAA,4BAAY,EAAC;YAC1B,cAAc,EAAE;gBACd,OAAO,EAAE,UAAU;gBACnB,KAAK,EAAE;oBACL,GAAG,EAAE,CAAC,KAAK,CAAC;iBACb;aACF;YACD,GAAG,EAAE,MAAM;SACZ,CAAC,CAAC;QAEH,IAAM,aAAa,GAAG,MAAmC,CAAC;QAC1D,qDAAqD;QACrD,2DAA2D;QAC3D,sDAAsD;QACtD,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACjD,MAAM,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACvD,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sEAAsE,EAAE;QACzE,IAAM,MAAM,GAAG,IAAA,4BAAY,EAAC;YAC1B,cAAc,EAAE;gBACd,OAAO,EAAE,MAAM;gBACf,KAAK,EAAE;oBACL,GAAG,EAAE,CAAC,KAAK,CAAC;iBACb;aACF;YACD,GAAG,EAAE,MAAM;SACZ,CAAC,CAAC;QAEH,IAAM,aAAa,GAAG,MAAmC,CAAC;QAC1D,qDAAqD;QACrD,qEAAqE;QACrE,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACjD,MAAM,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,IAAA,WAAI,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kEAAkE,EAAE;QACrE,IAAM,MAAM,GAAG,IAAA,4BAAY,EAAC;YAC1B,cAAc,EAAE,SAAS;YACzB,GAAG,EAAE,MAAM;YACX,kCAAkC;YAClC,cAAc,EAAE,UAAC,CAAM,IAAK,OAAA,CAAC;gBAC3B,YAAY,EAAE,oBAAoB;gBAClC,OAAO,EAAE,OAAO;gBAChB,KAAK,EAAE,EAAE;aACV,CAAC,EAJ0B,CAI1B;SACH,CAAC,CAAC;QAEH,IAAM,aAAa,GAAG,MAAmC,CAAC;QAC1D,qDAAqD;QACrD,oEAAoE;QACpE,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACjD,MAAM,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,IAAA,WAAI,EAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sDAAsD,EAAE;QACzD,IAAM,MAAM,GAAG,IAAA,4BAAY,EAAC;YAC1B,cAAc,EAAE,SAAS;YACzB,GAAG,EAAE,MAAM;YACX,kCAAkC;YAClC,cAAc,EAAE,UAAC,CAAM,IAAK,OAAA,CAAC;gBAC3B,YAAY,EAAE,oBAAoB;gBAClC,OAAO,EAAE,SAAS;gBAClB,KAAK,EAAE,EAAE;aACV,CAAC,EAJ0B,CAI1B;SACH,CAAC,CAAC;QAEH,IAAM,UAAU,GAAG,MAAgC,CAAC;QACpD,iDAAiD;QACjD,6DAA6D;QAC7D,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7C,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;IAClE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wGAAwG,EAAE;QAC3G,iEAAiE;QACjE,sDAAsD;QACtD,sEAAsE;QACtE,oBAAoB;QACpB,IAAM,UAAU,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;QAC1D,IAAM,MAAM,GAAG,IAAA,0BAAU,EAAC,UAAU,CAAC,CAAC;QAEtC,IAAM,aAAa,GAAG,MAAmC,CAAC;QAC1D,qDAAqD;QACrD,kEAAkE;QAClE,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACjD,MAAM,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
//
// Select the correct build version depending on the environment.
//
if (process.env.NODE_ENV === 'production') {
module.exports = require('./production.js');
} else {
module.exports = require('./development.js');
}
@@ -0,0 +1,22 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
function getJSXPragmaInfo(options) {
const [base, suffix] = splitPragma(options.jsxPragma || "React.createElement");
const [fragmentBase, fragmentSuffix] = splitPragma(options.jsxFragmentPragma || "React.Fragment");
return {base, suffix, fragmentBase, fragmentSuffix};
} exports.default = getJSXPragmaInfo;
function splitPragma(pragma) {
let dotIndex = pragma.indexOf(".");
if (dotIndex === -1) {
dotIndex = pragma.length;
}
return [pragma.slice(0, dotIndex), pragma.slice(dotIndex)];
}
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var SeamlessWebAreaRole = {
relatedConcepts: [],
type: 'structure'
};
var _default = SeamlessWebAreaRole;
exports.default = _default;
@@ -0,0 +1,62 @@
"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/navbar-item.tsx
var navbar_item_exports = {};
__export(navbar_item_exports, {
default: () => navbar_item_default
});
module.exports = __toCommonJS(navbar_item_exports);
var import_system = require("@heroui/system");
var import_react_utils2 = require("@heroui/react-utils");
var import_shared_utils = require("@heroui/shared-utils");
// src/navbar-context.ts
var import_react_utils = require("@heroui/react-utils");
var [NavbarProvider, useNavbarContext] = (0, import_react_utils.createContext)({
name: "NavbarContext",
strict: true,
errorMessage: "useNavbarContext: `context` is undefined. Seems you forgot to wrap component within <Navbar />"
});
// src/navbar-item.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var NavbarItem = (0, import_system.forwardRef)((props, ref) => {
var _a;
const { as, className, children, isActive, ...otherProps } = props;
const Component = as || "li";
const domRef = (0, import_react_utils2.useDOMRef)(ref);
const { slots, classNames } = useNavbarContext();
const styles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.item, className);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
Component,
{
ref: domRef,
className: (_a = slots.item) == null ? void 0 : _a.call(slots, { class: styles }),
"data-active": (0, import_shared_utils.dataAttr)(isActive),
...otherProps,
children
}
);
});
NavbarItem.displayName = "HeroUI.NavbarItem";
var navbar_item_default = NavbarItem;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/i18n/src/index.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 {I18nProvider, useLocale} from './context';\nexport {useMessageFormatter} from './useMessageFormatter';\nexport {useLocalizedStringFormatter, useLocalizedStringDictionary} from './useLocalizedStringFormatter';\nexport {useListFormatter} from './useListFormatter';\nexport {useDateFormatter} from './useDateFormatter';\nexport {useNumberFormatter} from './useNumberFormatter';\nexport {useCollator} from './useCollator';\nexport {useFilter} from './useFilter';\nexport {isRTL} from './utils';\n\nexport type {FormatMessage} from './useMessageFormatter';\nexport type {LocalizedStringFormatter} from '@internationalized/string';\nexport type {I18nProviderProps} from './context';\nexport type {Locale} from './useDefaultLocale';\nexport type {LocalizedStrings} from '@internationalized/message';\nexport type {DateFormatterOptions} from './useDateFormatter';\nexport type {DateFormatter} from '@internationalized/date';\nexport type {Filter} from './useFilter';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,3 @@
declare function RequireObjectCoercible<T extends {}>(value: T, optMessage?: string): T;
export = RequireObjectCoercible;
@@ -0,0 +1,82 @@
import type { Dispatch, Middleware, MiddlewareAPI, UnknownAction } from 'redux'
import type { BaseActionCreator, PayloadAction } from '../createAction'
import type { GetState } from '../createAsyncThunk'
import type { ExtractDispatchExtensions, FallbackIfUnknown } from '../tsHelpers'
export type GetMiddlewareApi<MiddlewareApiConfig> = MiddlewareAPI<
GetDispatchType<MiddlewareApiConfig>,
GetState<MiddlewareApiConfig>
>
export type MiddlewareApiConfig = {
state?: unknown
dispatch?: Dispatch
}
// TODO: consolidate with cAT helpers?
export type GetDispatchType<MiddlewareApiConfig> = MiddlewareApiConfig extends {
dispatch: infer DispatchType
}
? FallbackIfUnknown<DispatchType, Dispatch>
: Dispatch
export type AddMiddleware<
State = any,
DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>,
> = {
(...middlewares: Middleware<any, State, DispatchType>[]): void
withTypes<MiddlewareConfig extends MiddlewareApiConfig>(): AddMiddleware<
GetState<MiddlewareConfig>,
GetDispatchType<MiddlewareConfig>
>
}
export type WithMiddleware<
State = any,
DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>,
> = BaseActionCreator<
Middleware<any, State, DispatchType>[],
'dynamicMiddleware/add',
{ instanceId: string }
> & {
<Middlewares extends Middleware<any, State, DispatchType>[]>(
...middlewares: Middlewares
): PayloadAction<Middlewares, 'dynamicMiddleware/add', { instanceId: string }>
withTypes<MiddlewareConfig extends MiddlewareApiConfig>(): WithMiddleware<
GetState<MiddlewareConfig>,
GetDispatchType<MiddlewareConfig>
>
}
export interface DynamicDispatch {
// return a version of dispatch that knows about middleware
<Middlewares extends Middleware<any>[]>(
action: PayloadAction<Middlewares, 'dynamicMiddleware/add'>,
): ExtractDispatchExtensions<Middlewares> & this
}
export type MiddlewareEntry<
State = unknown,
DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>,
> = {
middleware: Middleware<any, State, DispatchType>
applied: Map<
MiddlewareAPI<DispatchType, State>,
ReturnType<Middleware<any, State, DispatchType>>
>
}
export type DynamicMiddleware<
State = unknown,
DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>,
> = Middleware<DynamicDispatch, State, DispatchType>
export type DynamicMiddlewareInstance<
State = unknown,
DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>,
> = {
middleware: DynamicMiddleware<State, DispatchType>
addMiddleware: AddMiddleware<State, DispatchType>
withMiddleware: WithMiddleware<State, DispatchType>
instanceId: string
}
@@ -0,0 +1,109 @@
import { createApi, QueryStatus } from '@reduxjs/toolkit/query'
import { delay } from 'msw'
import { actionsReducer, setupApiStore } from '../../tests/utils/helpers'
// We need to be able to control when which query resolves to simulate race
// conditions properly, that's the purpose of this factory.
const createPromiseFactory = () => {
const resolveQueue: (() => void)[] = []
const createPromise = () =>
new Promise<void>((resolve) => {
resolveQueue.push(resolve)
})
const resolveOldest = () => {
resolveQueue.shift()?.()
}
return { createPromise, resolveOldest }
}
const getEatenBananaPromises = createPromiseFactory()
const eatBananaPromises = createPromiseFactory()
let eatenBananas = 0
const api = createApi({
invalidationBehavior: 'delayed',
baseQuery: () => undefined as any,
tagTypes: ['Banana'],
endpoints: (build) => ({
// Eat a banana.
eatBanana: build.mutation<unknown, void>({
queryFn: async () => {
await eatBananaPromises.createPromise()
eatenBananas += 1
return { data: null, meta: {} }
},
invalidatesTags: ['Banana'],
}),
// Get the number of eaten bananas.
getEatenBananas: build.query<number, void>({
queryFn: async (arg, arg1, arg2, arg3) => {
const result = eatenBananas
await getEatenBananaPromises.createPromise()
return { data: result }
},
providesTags: ['Banana'],
}),
}),
})
const { getEatenBananas, eatBanana } = api.endpoints
const storeRef = setupApiStore(api, {
...actionsReducer,
})
it('invalidates a query after a corresponding mutation', async () => {
eatenBananas = 0
const query = storeRef.store.dispatch(getEatenBananas.initiate())
const getQueryState = () =>
storeRef.store.getState().api.queries[query.queryCacheKey]
getEatenBananaPromises.resolveOldest()
await delay(2)
expect(getQueryState()?.data).toBe(0)
expect(getQueryState()?.status).toBe(QueryStatus.fulfilled)
const mutation = storeRef.store.dispatch(eatBanana.initiate())
const getMutationState = () =>
storeRef.store.getState().api.mutations[mutation.requestId]
eatBananaPromises.resolveOldest()
await delay(2)
expect(getMutationState()?.status).toBe(QueryStatus.fulfilled)
expect(getQueryState()?.data).toBe(0)
expect(getQueryState()?.status).toBe(QueryStatus.pending)
getEatenBananaPromises.resolveOldest()
await delay(2)
expect(getQueryState()?.data).toBe(1)
expect(getQueryState()?.status).toBe(QueryStatus.fulfilled)
})
it('invalidates a query whose corresponding mutation finished while the query was in flight', async () => {
eatenBananas = 0
const query = storeRef.store.dispatch(getEatenBananas.initiate())
const getQueryState = () =>
storeRef.store.getState().api.queries[query.queryCacheKey]
const mutation = storeRef.store.dispatch(eatBanana.initiate())
const getMutationState = () =>
storeRef.store.getState().api.mutations[mutation.requestId]
eatBananaPromises.resolveOldest()
await delay(2)
expect(getMutationState()?.status).toBe(QueryStatus.fulfilled)
getEatenBananaPromises.resolveOldest()
await delay(2)
expect(getQueryState()?.data).toBe(0)
expect(getQueryState()?.status).toBe(QueryStatus.pending)
// should already be refetching
getEatenBananaPromises.resolveOldest()
await delay(2)
expect(getQueryState()?.status).toBe(QueryStatus.fulfilled)
expect(getQueryState()?.data).toBe(1)
})
@@ -0,0 +1 @@
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/lib/util.ts"],"names":[],"mappings":";;AAIA,8CAKC;AAGD,4CAGC;AAdD,qCAA4C;AAC5C,2DAAwD;AAExD,SAAgB,iBAAiB,CAC7B,iBAAgC,EAChC,IAAc;IAEd,IAAI,CAAC,IAAI,IAAI,iBAAiB,YAAY,SAAS,KAAK,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC;AACvF,CAAC;AAAA,CAAC;AAGF,SAAgB,gBAAgB,CAAE,GAAY;IAC1C,IAAA,qCAAgB,EAAC,GAAG,CAAC,CAAC;IACtB,IAAA,yBAAe,EAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAAA,CAAC"}
@@ -0,0 +1,28 @@
"use strict";
var REACT_ELEMENT_TYPE;
function _jsx(type, props, key, children) {
if (!REACT_ELEMENT_TYPE) {
REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7;
}
var defaultProps = type && type.defaultProps;
var childrenLength = arguments.length - 3;
if (!props && childrenLength !== 0) props = { children: void 0 };
if (props && defaultProps) {
for (var propName in defaultProps) {
if (props[propName] === void 0) props[propName] = defaultProps[propName];
else if (!props) props = defaultProps || {};
}
}
if (childrenLength === 1) props.children = children;
else if (childrenLength > 1) {
var childArray = new Array(childrenLength);
for (var i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 3];
props.children = childArray;
}
return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : "" + key, ref: null, props: props, _owner: null };
}
exports._ = _jsx;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 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 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB 0C 1C","194":"yB zB"},D:{"1":"0 1 2 3 4 5 sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB"},E:{"1":"ED","2":"J ZB K D E F A B C L 2C ZC 3C 4C 5C 6C aC NC OC","322":"M G 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"},F:{"1":"0 1 2 3 4 5 fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB FD GD HD ID NC uC JD OC"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD","322":"aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},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"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","2":"1D"}},B:5,C:"requestIdleCallback",D:true};
@@ -0,0 +1 @@
{"name":"@so-ric/colorspace","version":"1.1.6","requiresBuild":false,"files":{"dist/index.cjs.js":{"checkedAt":1794532101211,"integrity":"sha512-8ym+2DPQuV4rG/OoeDm9c9PJ8OqnLslFTj4Fyik9LS3ib8Tcc1hdPMdOYMtdmp/h8Ne+S9WSPTm6TV1Sp9Z0lQ==","mode":420,"size":46866},"index.js":{"checkedAt":1794532101211,"integrity":"sha512-W2FMBv5D/S7NHxfXPW7jrXIpp+QMkTMBhAUoTnVOq7n+jgtHJOTRQCvKFkJLUradIkT3vR4/hf9Xb9ma69WQDA==","mode":420,"size":762},"rollup.config.js":{"checkedAt":1794532101211,"integrity":"sha512-ZioynXwJctuXYQWfN4n0KXcEgdQ4udc7xYtpzIjOpOktdSg6dFgvZgzgVnjXjkHhqLI0sgaBEAxppYYue4slbg==","mode":420,"size":538},"package.json":{"checkedAt":1794532101211,"integrity":"sha512-GaTgTjpgsMnnSXbyKXmSWEnCTHrHpFKI4ocqrF9DR8JAQ4MrYiOAURLUoqQJ3Hm392H4FRqZLgKILQvTGU3O1A==","mode":420,"size":1087},"CHANGELOG.md":{"checkedAt":1794532101211,"integrity":"sha512-DBt4uosGIoeilkUO0h7PA1jpjRvbk6QLUkj0Exk1+WufZw6QlqohOLffsfRELw9B2klyA1zM3kABeyIUAAdPFQ==","mode":420,"size":126},"LICENSE.md":{"checkedAt":1794532101212,"integrity":"sha512-Jhj5q4zOlC4i8vZnuaivoYuyKnro2hdyo/XAehzSk/ZWrfS9R1xsTLUT+yDH3A8MdcTQ4M7UVe/PphSXHwZx5g==","mode":420,"size":1139},"README.md":{"checkedAt":1794532101212,"integrity":"sha512-bHtbMm8ZUXanEW4L25bxer+72d4sCfVmZAFLY+DiiEOunFQFreAFO+fm+oWRkNMfa3K+E236RNWaaYqaU1TKxg==","mode":420,"size":1198}}}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more