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

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

No files matched your search

@@ -0,0 +1,31 @@
var baseFlatten = require('./_baseFlatten'),
map = require('./map');
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/**
* This method is like `_.flatMap` except that it recursively flattens the
* mapped results.
*
* @static
* @memberOf _
* @since 4.7.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new flattened array.
* @example
*
* function duplicate(n) {
* return [[[n, n]]];
* }
*
* _.flatMapDeep([1, 2], duplicate);
* // => [1, 1, 2, 2]
*/
function flatMapDeep(collection, iteratee) {
return baseFlatten(map(collection, iteratee), INFINITY);
}
module.exports = flatMapDeep;
@@ -0,0 +1,19 @@
import { normalizeScreens } from '../util/normalizeScreens'
import buildMediaQuery from '../util/buildMediaQuery'
export default function ({ tailwindConfig: { theme } }) {
return function (css) {
css.walkAtRules('screen', (atRule) => {
let screen = atRule.params
let screens = normalizeScreens(theme.screens)
let screenDefinition = screens.find(({ name }) => name === screen)
if (!screenDefinition) {
throw atRule.error(`No \`${screen}\` screen found.`)
}
atRule.name = 'media'
atRule.params = buildMediaQuery(screenDefinition)
})
}
}
@@ -0,0 +1,40 @@
import {Except} from './except';
import {Simplify} from './simplify';
/**
Create a type that strips `readonly` from all or some of an object's keys. Inverse of `Readonly<T>`.
This can be used to [store and mutate options within a class](https://github.com/sindresorhus/pageres/blob/4a5d05fca19a5fbd2f53842cbf3eb7b1b63bddd2/source/index.ts#L72), [edit `readonly` objects within tests](https://stackoverflow.com/questions/50703834), [construct a `readonly` object within a function](https://github.com/Microsoft/TypeScript/issues/24509), or to define a single model where the only thing that changes is whether or not some of the keys are mutable.
@example
```
import {Mutable} from 'type-fest';
type Foo = {
readonly a: number;
readonly b: readonly string[]; // To show that only the mutability status of the properties, not their values, are affected.
readonly c: boolean;
};
const mutableFoo: Mutable<Foo> = {a: 1, b: ['2'], c: true};
mutableFoo.a = 3;
mutableFoo.b[0] = 'new value'; // Will still fail as the value of property "b" is still a readonly type.
mutableFoo.b = ['something']; // Will work as the "b" property itself is no longer readonly.
type SomeMutable = Mutable<Foo, 'b' | 'c'>;
// type SomeMutable = {
// readonly a: number;
// b: readonly string[]; // It's now mutable. The type of the property remains unaffected.
// c: boolean; // It's now mutable.
// }
```
@category Utilities
*/
export type Mutable<BaseType, Keys extends keyof BaseType = keyof BaseType> =
Simplify<
// Pick just the keys that are not mutable from the base type.
Except<BaseType, Keys> &
// Pick the keys that should be mutable from the base type and make them mutable by removing the `readonly` modifier from the key.
{-readonly [KeyType in keyof Pick<BaseType, Keys>]: Pick<BaseType, Keys>[KeyType]}
>;
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Rico Kahler
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,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return _default;
}
});
function _default(pluginConfig, plugins) {
if (pluginConfig === undefined) {
return plugins;
}
const pluginNames = Array.isArray(pluginConfig) ? pluginConfig : [
...new Set(plugins.filter((pluginName)=>{
return pluginConfig !== false && pluginConfig[pluginName] !== false;
}).concat(Object.keys(pluginConfig).filter((pluginName)=>{
return pluginConfig[pluginName] !== false;
})))
];
return pluginNames;
}
@@ -0,0 +1,24 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _tslib = require("tslib");
var _react = require("react");
var _useThrottleFn = _interopRequireDefault(require("../useThrottleFn"));
var _useUpdateEffect = _interopRequireDefault(require("../useUpdateEffect"));
function useThrottleEffect(effect, deps, options) {
var _a = (0, _tslib.__read)((0, _react.useState)({}), 2),
flag = _a[0],
setFlag = _a[1];
var run = (0, _useThrottleFn["default"])(function () {
setFlag({});
}, options).run;
(0, _react.useEffect)(function () {
return run();
}, deps);
(0, _useUpdateEffect["default"])(effect, [flag]);
}
var _default = exports["default"] = useThrottleEffect;
@@ -0,0 +1,295 @@
import { VALID_ID_PREFIX, NULL_BYTE_PLACEHOLDER } from './constants.js';
// port from nanoid
// https://github.com/ai/nanoid
const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
function nanoid(size = 21) {
let id = "";
let i = size;
while (i--) {
id += urlAlphabet[Math.random() * 64 | 0];
}
return id;
}
const RealDate = Date;
function random(seed) {
const x = Math.sin(seed++) * 1e4;
return x - Math.floor(x);
}
function shuffle(array, seed = RealDate.now()) {
let length = array.length;
while (length) {
const index = Math.floor(random(seed) * length--);
const previous = array[length];
array[length] = array[index];
array[index] = previous;
++seed;
}
return array;
}
/**
* Get original stacktrace without source map support the most performant way.
* - Create only 1 stack frame.
* - Rewrite prepareStackTrace to bypass "support-stack-trace" (usually takes ~250ms).
*/
function createSimpleStackTrace(options) {
const { message = "$$stack trace error", stackTraceLimit = 1 } = options || {};
const limit = Error.stackTraceLimit;
const prepareStackTrace = Error.prepareStackTrace;
Error.stackTraceLimit = stackTraceLimit;
Error.prepareStackTrace = (e) => e.stack;
const err = new Error(message);
const stackTrace = err.stack || "";
Error.prepareStackTrace = prepareStackTrace;
Error.stackTraceLimit = limit;
return stackTrace;
}
function notNullish(v) {
return v != null;
}
function assertTypes(value, name, types) {
const receivedType = typeof value;
const pass = types.includes(receivedType);
if (!pass) {
throw new TypeError(`${name} value must be ${types.join(" or ")}, received "${receivedType}"`);
}
}
function isPrimitive(value) {
return value === null || typeof value !== "function" && typeof value !== "object";
}
function slash(path) {
return path.replace(/\\/g, "/");
}
const postfixRE = /[?#].*$/;
function cleanUrl(url) {
return url.replace(postfixRE, "");
}
const externalRE = /^(?:[a-z]+:)?\/\//;
const isExternalUrl = (url) => externalRE.test(url);
/**
* Prepend `/@id/` and replace null byte so the id is URL-safe.
* This is prepended to resolved ids that are not valid browser
* import specifiers by the importAnalysis plugin.
*/
function wrapId(id) {
return id.startsWith(VALID_ID_PREFIX) ? id : VALID_ID_PREFIX + id.replace("\0", NULL_BYTE_PLACEHOLDER);
}
/**
* Undo {@link wrapId}'s `/@id/` and null byte replacements.
*/
function unwrapId(id) {
return id.startsWith(VALID_ID_PREFIX) ? id.slice(VALID_ID_PREFIX.length).replace(NULL_BYTE_PLACEHOLDER, "\0") : id;
}
function withTrailingSlash(path) {
if (path.at(-1) !== "/") {
return `${path}/`;
}
return path;
}
const bareImportRE = /^(?![a-z]:)[\w@](?!.*:\/\/)/i;
function isBareImport(id) {
return bareImportRE.test(id);
}
function toArray(array) {
if (array === null || array === undefined) {
array = [];
}
if (Array.isArray(array)) {
return array;
}
return [array];
}
function isObject(item) {
return item != null && typeof item === "object" && !Array.isArray(item);
}
function isFinalObj(obj) {
return obj === Object.prototype || obj === Function.prototype || obj === RegExp.prototype;
}
function getType(value) {
return Object.prototype.toString.apply(value).slice(8, -1);
}
function collectOwnProperties(obj, collector) {
const collect = typeof collector === "function" ? collector : (key) => collector.add(key);
Object.getOwnPropertyNames(obj).forEach(collect);
Object.getOwnPropertySymbols(obj).forEach(collect);
}
function getOwnProperties(obj) {
const ownProps = new Set();
if (isFinalObj(obj)) {
return [];
}
collectOwnProperties(obj, ownProps);
return Array.from(ownProps);
}
const defaultCloneOptions = { forceWritable: false };
function deepClone(val, options = defaultCloneOptions) {
const seen = new WeakMap();
return clone(val, seen, options);
}
function clone(val, seen, options = defaultCloneOptions) {
let k, out;
if (seen.has(val)) {
return seen.get(val);
}
if (Array.isArray(val)) {
out = Array.from({ length: k = val.length });
seen.set(val, out);
while (k--) {
out[k] = clone(val[k], seen, options);
}
return out;
}
if (Object.prototype.toString.call(val) === "[object Object]") {
out = Object.create(Object.getPrototypeOf(val));
seen.set(val, out);
// we don't need properties from prototype
const props = getOwnProperties(val);
for (const k of props) {
const descriptor = Object.getOwnPropertyDescriptor(val, k);
if (!descriptor) {
continue;
}
const cloned = clone(val[k], seen, options);
if (options.forceWritable) {
Object.defineProperty(out, k, {
enumerable: descriptor.enumerable,
configurable: true,
writable: true,
value: cloned
});
} else if ("get" in descriptor) {
Object.defineProperty(out, k, {
...descriptor,
get() {
return cloned;
}
});
} else {
Object.defineProperty(out, k, {
...descriptor,
value: cloned
});
}
}
return out;
}
return val;
}
function noop() {}
function objectAttr(source, path, defaultValue = undefined) {
// a[3].b -> a.3.b
const paths = path.replace(/\[(\d+)\]/g, ".$1").split(".");
let result = source;
for (const p of paths) {
result = new Object(result)[p];
if (result === undefined) {
return defaultValue;
}
}
return result;
}
function createDefer() {
let resolve = null;
let reject = null;
const p = new Promise((_resolve, _reject) => {
resolve = _resolve;
reject = _reject;
});
p.resolve = resolve;
p.reject = reject;
return p;
}
/**
* If code starts with a function call, will return its last index, respecting arguments.
* This will return 25 - last ending character of toMatch ")"
* Also works with callbacks
* ```
* toMatch({ test: '123' });
* toBeAliased('123')
* ```
*/
function getCallLastIndex(code) {
let charIndex = -1;
let inString = null;
let startedBracers = 0;
let endedBracers = 0;
let beforeChar = null;
while (charIndex <= code.length) {
beforeChar = code[charIndex];
charIndex++;
const char = code[charIndex];
const isCharString = char === "\"" || char === "'" || char === "`";
if (isCharString && beforeChar !== "\\") {
if (inString === char) {
inString = null;
} else if (!inString) {
inString = char;
}
}
if (!inString) {
if (char === "(") {
startedBracers++;
}
if (char === ")") {
endedBracers++;
}
}
if (startedBracers && endedBracers && startedBracers === endedBracers) {
return charIndex;
}
}
return null;
}
function isNegativeNaN(val) {
if (!Number.isNaN(val)) {
return false;
}
const f64 = new Float64Array(1);
f64[0] = val;
const u32 = new Uint32Array(f64.buffer);
const isNegative = u32[1] >>> 31 === 1;
return isNegative;
}
function toString(v) {
return Object.prototype.toString.call(v);
}
function isPlainObject(val) {
return toString(val) === "[object Object]" && (!val.constructor || val.constructor.name === "Object");
}
function isMergeableObject(item) {
return isPlainObject(item) && !Array.isArray(item);
}
/**
* Deep merge :P
*
* Will merge objects only if they are plain
*
* Do not merge types - it is very expensive and usually it's better to case a type here
*/
function deepMerge(target, ...sources) {
if (!sources.length) {
return target;
}
const source = sources.shift();
if (source === undefined) {
return target;
}
if (isMergeableObject(target) && isMergeableObject(source)) {
Object.keys(source).forEach((key) => {
const _source = source;
if (isMergeableObject(_source[key])) {
if (!target[key]) {
target[key] = {};
}
deepMerge(target[key], _source[key]);
} else {
target[key] = _source[key];
}
});
}
return deepMerge(target, ...sources);
}
export { assertTypes, cleanUrl, clone, createDefer, createSimpleStackTrace, deepClone, deepMerge, getCallLastIndex, getOwnProperties, getType, isBareImport, isExternalUrl, isNegativeNaN, isObject, isPrimitive, nanoid, noop, notNullish, objectAttr, shuffle, slash, toArray, unwrapId, withTrailingSlash, wrapId };
@@ -0,0 +1,39 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveBindingServiceActivations = resolveBindingServiceActivations;
const common_1 = require("@inversifyjs/common");
function resolveBindingServiceActivations(params, serviceIdentifier, value) {
const activations = params.getActivations(serviceIdentifier);
if (activations === undefined) {
return value;
}
if ((0, common_1.isPromise)(value)) {
return resolveBindingActivationsFromIteratorAsync(params, value, activations[Symbol.iterator]());
}
return resolveBindingActivationsFromIterator(params, value, activations[Symbol.iterator]());
}
function resolveBindingActivationsFromIterator(params, value, activationsIterator) {
let activatedValue = value;
let activationIteratorResult = activationsIterator.next();
while (activationIteratorResult.done !== true) {
const nextActivatedValue = activationIteratorResult.value(params.context, activatedValue);
if ((0, common_1.isPromise)(nextActivatedValue)) {
return resolveBindingActivationsFromIteratorAsync(params, nextActivatedValue, activationsIterator);
}
else {
activatedValue = nextActivatedValue;
}
activationIteratorResult = activationsIterator.next();
}
return activatedValue;
}
async function resolveBindingActivationsFromIteratorAsync(params, value, activationsIterator) {
let activatedValue = await value;
let activationIteratorResult = activationsIterator.next();
while (activationIteratorResult.done !== true) {
activatedValue = await activationIteratorResult.value(params.context, activatedValue);
activationIteratorResult = activationsIterator.next();
}
return activatedValue;
}
//# sourceMappingURL=resolveBindingServiceActivations.js.map
@@ -0,0 +1,30 @@
import type { TSchema } from '../schema/index.mjs';
import type { Static, StaticDecode } from '../static/index.mjs';
import { TransformKind } from '../symbols/index.mjs';
export declare class TransformDecodeBuilder<T extends TSchema> {
private readonly schema;
constructor(schema: T);
Decode<U extends unknown, D extends TransformFunction<StaticDecode<T>, U>>(decode: D): TransformEncodeBuilder<T, D>;
}
export declare class TransformEncodeBuilder<T extends TSchema, D extends TransformFunction> {
private readonly schema;
private readonly decode;
constructor(schema: T, decode: D);
private EncodeTransform;
private EncodeSchema;
Encode<E extends TransformFunction<ReturnType<D>, StaticDecode<T>>>(encode: E): TTransform<T, ReturnType<D>>;
}
type TransformStatic<T extends TSchema, P extends unknown[] = []> = T extends TTransform<infer _, infer S> ? S : Static<T, P>;
export type TransformFunction<T = any, U = any> = (value: T) => U;
export interface TransformOptions<I extends TSchema = TSchema, O extends unknown = unknown> {
Decode: TransformFunction<StaticDecode<I>, O>;
Encode: TransformFunction<O, StaticDecode<I>>;
}
export interface TTransform<I extends TSchema = TSchema, O extends unknown = unknown> extends TSchema {
static: TransformStatic<I, this['params']>;
[TransformKind]: TransformOptions<I, O>;
[key: string]: any;
}
/** `[Json]` Creates a Transform type */
export declare function Transform<I extends TSchema>(schema: I): TransformDecodeBuilder<I>;
export {};
@@ -0,0 +1,54 @@
// Copyright (c) 2016 Ryan Prichard
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
#ifndef LIB_WINPTY_EXCEPTION_H
#define LIB_WINPTY_EXCEPTION_H
#include "../include/winpty.h"
#include "../shared/WinptyException.h"
#include <memory>
#include <string>
class LibWinptyException : public WinptyException {
public:
LibWinptyException(winpty_result_t code, const wchar_t *what) :
m_code(code), m_what(std::make_shared<std::wstring>(what)) {}
winpty_result_t code() const WINPTY_NOEXCEPT {
return m_code;
}
const wchar_t *what() const WINPTY_NOEXCEPT override {
return m_what->c_str();
}
std::shared_ptr<std::wstring> whatSharedStr() const WINPTY_NOEXCEPT {
return m_what;
}
private:
winpty_result_t m_code;
// Using a shared_ptr ensures that copying the object raises no exception.
std::shared_ptr<std::wstring> m_what;
};
#endif // LIB_WINPTY_EXCEPTION_H
@@ -0,0 +1,34 @@
import {usePress as $f6c31cce2adf654f$export$45712eceda6fad21} from "./usePress.mjs";
import {useObjectRef as $hhDyF$useObjectRef, mergeProps as $hhDyF$mergeProps} from "@react-aria/utils";
import $hhDyF$react from "react";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $3b117e43dc0ca95d$export$27c701ed9e449e99 = /*#__PURE__*/ (0, $hhDyF$react).forwardRef(({ children: children, ...props }, ref)=>{
ref = (0, $hhDyF$useObjectRef)(ref);
let { pressProps: pressProps } = (0, $f6c31cce2adf654f$export$45712eceda6fad21)({
...props,
ref: ref
});
let child = (0, $hhDyF$react).Children.only(children);
return /*#__PURE__*/ (0, $hhDyF$react).cloneElement(child, // @ts-ignore
{
ref: ref,
...(0, $hhDyF$mergeProps)(child.props, pressProps)
});
});
export {$3b117e43dc0ca95d$export$27c701ed9e449e99 as Pressable};
//# sourceMappingURL=Pressable.module.js.map
@@ -0,0 +1,37 @@
"use client";
import {
useCheckboxGroup
} from "./chunk-LPCF7J76.mjs";
import {
CheckboxGroupProvider
} from "./chunk-LK575OWX.mjs";
// src/checkbox-group.tsx
import { forwardRef } from "@heroui/system";
import { jsx, jsxs } from "react/jsx-runtime";
var CheckboxGroup = forwardRef((props, ref) => {
const {
children,
context,
label,
description,
isInvalid,
errorMessage,
getGroupProps,
getLabelProps,
getWrapperProps,
getDescriptionProps,
getErrorMessageProps
} = useCheckboxGroup({ ...props, ref });
return /* @__PURE__ */ jsxs("div", { ...getGroupProps(), children: [
label && /* @__PURE__ */ jsx("span", { ...getLabelProps(), children: label }),
/* @__PURE__ */ jsx("div", { ...getWrapperProps(), children: /* @__PURE__ */ jsx(CheckboxGroupProvider, { value: context, children }) }),
isInvalid && errorMessage ? /* @__PURE__ */ jsx("div", { ...getErrorMessageProps(), children: errorMessage }) : description ? /* @__PURE__ */ jsx("div", { ...getDescriptionProps(), children: description }) : null
] });
});
CheckboxGroup.displayName = "HeroUI.CheckboxGroup";
var checkbox_group_default = CheckboxGroup;
export {
checkbox_group_default
};
@@ -0,0 +1,226 @@
import { base64encode } from "./base64";
import { PbLong, PbULong } from "./pb-long";
import { ScalarType } from "./reflection-info";
import { assert, assertFloat32, assertInt32, assertUInt32 } from "./assert";
/**
* Writes proto3 messages in canonical JSON format using reflection
* information.
*
* https://developers.google.com/protocol-buffers/docs/proto3#json
*/
export class ReflectionJsonWriter {
constructor(info) {
var _a;
this.fields = (_a = info.fields) !== null && _a !== void 0 ? _a : [];
}
/**
* Converts the message to a JSON object, based on the field descriptors.
*/
write(message, options) {
const json = {}, source = message;
for (const field of this.fields) {
// field is not part of a oneof, simply write as is
if (!field.oneof) {
let jsonValue = this.field(field, source[field.localName], options);
if (jsonValue !== undefined)
json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue;
continue;
}
// field is part of a oneof
const group = source[field.oneof];
if (group.oneofKind !== field.localName)
continue; // not selected, skip
const opt = field.kind == 'scalar' || field.kind == 'enum'
? Object.assign(Object.assign({}, options), { emitDefaultValues: true }) : options;
let jsonValue = this.field(field, group[field.localName], opt);
assert(jsonValue !== undefined);
json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue;
}
return json;
}
field(field, value, options) {
let jsonValue = undefined;
if (field.kind == 'map') {
assert(typeof value == "object" && value !== null);
const jsonObj = {};
switch (field.V.kind) {
case "scalar":
for (const [entryKey, entryValue] of Object.entries(value)) {
const val = this.scalar(field.V.T, entryValue, field.name, false, true);
assert(val !== undefined);
jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key
}
break;
case "message":
const messageType = field.V.T();
for (const [entryKey, entryValue] of Object.entries(value)) {
const val = this.message(messageType, entryValue, field.name, options);
assert(val !== undefined);
jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key
}
break;
case "enum":
const enumInfo = field.V.T();
for (const [entryKey, entryValue] of Object.entries(value)) {
assert(entryValue === undefined || typeof entryValue == 'number');
const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger);
assert(val !== undefined);
jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key
}
break;
}
if (options.emitDefaultValues || Object.keys(jsonObj).length > 0)
jsonValue = jsonObj;
}
else if (field.repeat) {
assert(Array.isArray(value));
const jsonArr = [];
switch (field.kind) {
case "scalar":
for (let i = 0; i < value.length; i++) {
const val = this.scalar(field.T, value[i], field.name, field.opt, true);
assert(val !== undefined);
jsonArr.push(val);
}
break;
case "enum":
const enumInfo = field.T();
for (let i = 0; i < value.length; i++) {
assert(value[i] === undefined || typeof value[i] == 'number');
const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger);
assert(val !== undefined);
jsonArr.push(val);
}
break;
case "message":
const messageType = field.T();
for (let i = 0; i < value.length; i++) {
const val = this.message(messageType, value[i], field.name, options);
assert(val !== undefined);
jsonArr.push(val);
}
break;
}
// add converted array to json output
if (options.emitDefaultValues || jsonArr.length > 0 || options.emitDefaultValues)
jsonValue = jsonArr;
}
else {
switch (field.kind) {
case "scalar":
jsonValue = this.scalar(field.T, value, field.name, field.opt, options.emitDefaultValues);
break;
case "enum":
jsonValue = this.enum(field.T(), value, field.name, field.opt, options.emitDefaultValues, options.enumAsInteger);
break;
case "message":
jsonValue = this.message(field.T(), value, field.name, options);
break;
}
}
return jsonValue;
}
/**
* Returns `null` as the default for google.protobuf.NullValue.
*/
enum(type, value, fieldName, optional, emitDefaultValues, enumAsInteger) {
if (type[0] == 'google.protobuf.NullValue')
return !emitDefaultValues && !optional ? undefined : null;
if (value === undefined) {
assert(optional);
return undefined;
}
if (value === 0 && !emitDefaultValues && !optional)
// we require 0 to be default value for all enums
return undefined;
assert(typeof value == 'number');
assert(Number.isInteger(value));
if (enumAsInteger || !type[1].hasOwnProperty(value))
// if we don't now the enum value, just return the number
return value;
if (type[2])
// restore the dropped prefix
return type[2] + type[1][value];
return type[1][value];
}
message(type, value, fieldName, options) {
if (value === undefined)
return options.emitDefaultValues ? null : undefined;
return type.internalJsonWrite(value, options);
}
scalar(type, value, fieldName, optional, emitDefaultValues) {
if (value === undefined) {
assert(optional);
return undefined;
}
const ed = emitDefaultValues || optional;
// noinspection FallThroughInSwitchStatementJS
switch (type) {
// int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.
case ScalarType.INT32:
case ScalarType.SFIXED32:
case ScalarType.SINT32:
if (value === 0)
return ed ? 0 : undefined;
assertInt32(value);
return value;
case ScalarType.FIXED32:
case ScalarType.UINT32:
if (value === 0)
return ed ? 0 : undefined;
assertUInt32(value);
return value;
// float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity".
// Either numbers or strings are accepted. Exponent notation is also accepted.
case ScalarType.FLOAT:
assertFloat32(value);
case ScalarType.DOUBLE:
if (value === 0)
return ed ? 0 : undefined;
assert(typeof value == 'number');
if (Number.isNaN(value))
return 'NaN';
if (value === Number.POSITIVE_INFINITY)
return 'Infinity';
if (value === Number.NEGATIVE_INFINITY)
return '-Infinity';
return value;
// string:
case ScalarType.STRING:
if (value === "")
return ed ? '' : undefined;
assert(typeof value == 'string');
return value;
// bool:
case ScalarType.BOOL:
if (value === false)
return ed ? false : undefined;
assert(typeof value == 'boolean');
return value;
// JSON value will be a decimal string. Either numbers or strings are accepted.
case ScalarType.UINT64:
case ScalarType.FIXED64:
assert(typeof value == 'number' || typeof value == 'string' || typeof value == 'bigint');
let ulong = PbULong.from(value);
if (ulong.isZero() && !ed)
return undefined;
return ulong.toString();
// JSON value will be a decimal string. Either numbers or strings are accepted.
case ScalarType.INT64:
case ScalarType.SFIXED64:
case ScalarType.SINT64:
assert(typeof value == 'number' || typeof value == 'string' || typeof value == 'bigint');
let long = PbLong.from(value);
if (long.isZero() && !ed)
return undefined;
return long.toString();
// bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.
// Either standard or URL-safe base64 encoding with/without paddings are accepted.
case ScalarType.BYTES:
assert(value instanceof Uint8Array);
if (!value.byteLength)
return ed ? "" : undefined;
return base64encode(value);
}
}
}
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = getImplicitRoleForMenu;
var _jsxAstUtils = require("jsx-ast-utils");
/**
* Returns the implicit role for a menu tag.
*/
function getImplicitRoleForMenu(attributes) {
var type = (0, _jsxAstUtils.getProp)(attributes, 'type');
if (type) {
var value = (0, _jsxAstUtils.getLiteralPropValue)(type);
return value && value.toUpperCase() === 'TOOLBAR' ? 'toolbar' : '';
}
return '';
}
module.exports = exports.default;
@@ -0,0 +1 @@
{"version":3,"file":"jsx-closing-tag-location.d.ts","sourceRoot":"","sources":["jsx-closing-tag-location.js"],"names":[],"mappings":"wBAgCW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1,30 @@
import baseGet from './_baseGet.js';
/**
* The opposite of `_.property`; this method creates a function that returns
* the value at a given path of `object`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {Object} object The object to query.
* @returns {Function} Returns the new accessor function.
* @example
*
* var array = [0, 1, 2],
* object = { 'a': array, 'b': array, 'c': array };
*
* _.map(['a[2]', 'c[0]'], _.propertyOf(object));
* // => [2, 0]
*
* _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
* // => [2, 0]
*/
function propertyOf(object) {
return function(path) {
return object == null ? undefined : baseGet(object, path);
};
}
export default propertyOf;
@@ -0,0 +1,3 @@
export * from './decode.mjs';
export * from './encode.mjs';
export * from './has.mjs';
@@ -0,0 +1,108 @@
# normalize-package-data
[![Build Status](https://travis-ci.org/npm/normalize-package-data.svg?branch=master)](https://travis-ci.org/npm/normalize-package-data)
normalize-package-data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.
normalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools.
## Installation
```
npm install normalize-package-data
```
## Usage
Basic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`.
```javascript
normalizeData = require('normalize-package-data')
packageData = require("./package.json")
normalizeData(packageData)
// packageData is now normalized
```
#### Strict mode
You may activate strict validation by passing true as the second argument.
```javascript
normalizeData = require('normalize-package-data')
packageData = require("./package.json")
normalizeData(packageData, true)
// packageData is now normalized
```
If strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace.
#### Warnings
Optionally, you may pass a "warning" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data.
```javascript
normalizeData = require('normalize-package-data')
packageData = require("./package.json")
warnFn = function(msg) { console.error(msg) }
normalizeData(packageData, warnFn)
// packageData is now normalized. Any number of warnings may have been logged.
```
You may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third.
When `private` field is set to `true`, warnings will be suppressed.
### Potential exceptions
If the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback.
## What normalization (currently) entails
* The value of `name` field gets trimmed (unless in strict mode).
* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver).
* If `name` and/or `version` fields are missing, they are set to empty strings.
* If `files` field is not an array, it will be removed.
* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value.
* If `man` field is a string, it will become an array with the original string as its sole member.
* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\s+`.
* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties.
* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.
* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.
* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.
* As of v2: Dependencies that point at known hosted git providers (currently: github, bitbucket, gitlab) will have their URLs canonicalized, but protocols will be preserved.
* As of v2: Dependencies that use shortcuts for hosted git providers (`org/proj`, `github:org/proj`, `bitbucket:org/proj`, `gitlab:org/proj`, `gist:docid`) will have the shortcut left in place. (In the case of github, the `org/proj` form will be expanded to `github:org/proj`.) THIS MARKS A BREAKING CHANGE FROM V1, where the shorcut was previously expanded to a URL.
* If `description` field does not exist, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.
* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `"git"`.
* If `repository.url` is not a valid url, but in the style of "[owner-name]/[repo-name]", `repository.url` will be set to git+https://github.com/[owner-name]/[repo-name].git
* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.
* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.
* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.
* If `homepage` field is not a string, it will be removed.
* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.
* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]#readme . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.
### Rules for name field
If `name` field is given, the value of the name field must be a string. The string may not:
* start with a period.
* contain the following characters: `/@\s+%`
* contain any characters that would need to be encoded for use in urls.
* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).
### Rules for version field
If `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver).
### Rules for license field
The `license`/`licence` field should be a valid *SPDX license expression* or one of the special values allowed by [validate-npm-package-license](https://npmjs.com/package/validate-npm-package-license). See [documentation for the license field in package.json](https://docs.npmjs.com/files/package.json#license).
## Credits
This package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson.
## License
normalize-package-data is released under the [BSD 2-Clause License](https://opensource.org/licenses/BSD-2-Clause).
Copyright (c) 2013 Meryn Stol
@@ -0,0 +1 @@
{"name":"tinyrainbow","version":"3.0.3","requiresBuild":false,"files":{"LICENCE":{"checkedAt":1794532091392,"integrity":"sha512-RdNJZKpQDHt/gkUMiQZJW8Mkway3ZWNGYJv5Wp5gxXRIrcKare5BSZNxwi+gDpEzZtKQsI66VGk1a7HWTUYqaA==","mode":420,"size":1065},"dist/index.js":{"checkedAt":1794532091392,"integrity":"sha512-0Zv575RboK8FDwDo2cKxfPObXkCAGeZ6gSCMxjdydRqs1x0pMXDyKN0rOuCfvo5MDzeSACk+rXGd7+9yxU+ulw==","mode":420,"size":2296},"package.json":{"checkedAt":1794532091393,"integrity":"sha512-CZJBle8S9nu4v/ZhxpIiezP758bboQQi2SiHiteX32bu6Exq5NXoJrxDdsesPWDc/YFPDu3GRt5NZ1JBwvKn5Q==","mode":420,"size":765},"README.md":{"checkedAt":1794532091393,"integrity":"sha512-KuMoyc/my53WcQ1ou/SzpJVCeQkTPq0WS6gZX4yoE65wXFKr2dmS+vgr/NMsmGdDpHtUJ8DKGMPO7sGDAU7MKQ==","mode":420,"size":508},"dist/index.d.ts":{"checkedAt":1794532091393,"integrity":"sha512-/MkCkABYA6d3HknH0rj0t30VFq3c6hoB/vsw95cO5f8yFbiTMr9RCued1lkYUVHqv3gOsYoAdSCI0H+UvfBkbA==","mode":420,"size":2365}}}
@@ -0,0 +1,17 @@
import { __read, __spreadArray } from "tslib";
export default function limit(fn, timespan) {
var pending = false;
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (pending)
return;
pending = true;
fn.apply(void 0, __spreadArray([], __read(args), false));
setTimeout(function () {
pending = false;
}, timespan);
};
}
@@ -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 DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB 0C 1C"},D:{"1":"0 1 2 3 4 5 iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB"},E:{"1":"A B C L M G 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 K D E F 2C ZC 3C 4C 5C"},F:{"1":"0 1 2 3 4 5 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 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 FD GD HD ID NC uC JD OC"},G:{"1":"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":"E ZC KD vC LD MD ND OD PD"},H:{"2":"hD"},I:{"1":"I nD","2":"TC J iD jD kD lD vC mD"},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 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:2,C:"CSS all property",D:true};
@@ -0,0 +1,27 @@
import {createFocusManager as $9bf71ea28793e738$export$c5251b9e124bf29, FocusScope as $9bf71ea28793e738$export$20e40289641fbbb6, getFocusableTreeWalker as $9bf71ea28793e738$export$2d6ec8fc375ceafa, isElementInChildOfActiveScope as $9bf71ea28793e738$export$1258395f99bf9cbf, isFocusable as $9bf71ea28793e738$export$4c063cf1350e6fed, useFocusManager as $9bf71ea28793e738$export$10c5169755ce7bd7} from "./FocusScope.module.js";
import {FocusRing as $907718708eab68af$export$1a38b4ad7f578e1d} from "./FocusRing.module.js";
import {FocusableProvider as $e6afbd83fe6ebbd2$export$13f3202a3e5ddd5, useFocusable as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c} from "./useFocusable.module.js";
import {useFocusRing as $f7dceffc5ad7768b$export$4e328f61c538687f} from "./useFocusRing.module.js";
import {focusSafely as $6a99195332edec8b$export$80f3e147d781571c} from "./focusSafely.module.js";
import {useHasTabbableChild as $83013635b024ae3d$export$eac1895992b9f3d6} from "./useHasTabbableChild.module.js";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export {$9bf71ea28793e738$export$20e40289641fbbb6 as FocusScope, $9bf71ea28793e738$export$10c5169755ce7bd7 as useFocusManager, $9bf71ea28793e738$export$2d6ec8fc375ceafa as getFocusableTreeWalker, $9bf71ea28793e738$export$c5251b9e124bf29 as createFocusManager, $9bf71ea28793e738$export$1258395f99bf9cbf as isElementInChildOfActiveScope, $9bf71ea28793e738$export$4c063cf1350e6fed as isFocusable, $907718708eab68af$export$1a38b4ad7f578e1d as FocusRing, $e6afbd83fe6ebbd2$export$13f3202a3e5ddd5 as FocusableProvider, $e6afbd83fe6ebbd2$export$4c014de7c8940b4c as useFocusable, $f7dceffc5ad7768b$export$4e328f61c538687f as useFocusRing, $6a99195332edec8b$export$80f3e147d781571c as focusSafely, $83013635b024ae3d$export$eac1895992b9f3d6 as useHasTabbableChild};
//# sourceMappingURL=module.js.map
@@ -0,0 +1,17 @@
import { DateInput } from './types';
/**
* Calculates the difference in seconds between two dates.
* 计算两个日期之间的秒差
*
* @param date - The first date to compare.
* @param input - The second date to compare.
* @param asFloat - Whether to return the result as a float.
* @returns The difference in seconds between the two dates.
* @example
* ```ts
* diffInSeconds(new Date(), new Date()); // 0
* diffInSeconds(new Date(), new Date(Date.now() + 1000)); // 1
* diffInSeconds(new Date(), new Date(Date.now() - 1000)); // -1
* ```
*/
export default function diffInSeconds(date: Date, input: DateInput, asFloat?: boolean): number;
@@ -0,0 +1,26 @@
function emptyScalarPosition(offset, before, pos) {
if (before) {
pos ?? (pos = before.length);
for (let i = pos - 1; i >= 0; --i) {
let st = before[i];
switch (st.type) {
case 'space':
case 'comment':
case 'newline':
offset -= st.source.length;
continue;
}
// Technically, an empty scalar is immediately after the last non-empty
// node, but it's more useful to place it after any whitespace.
st = before[++i];
while (st?.type === 'space') {
offset += st.source.length;
st = before[++i];
}
break;
}
}
return offset;
}
export { emptyScalarPosition };
@@ -0,0 +1 @@
{"name":"@react-aria/live-announcer","version":"3.4.4","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532110975,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/LiveAnnouncer.main.js":{"checkedAt":1794532110975,"integrity":"sha512-Kexc4tPLFRHVvWVQKYqGupKFlR6BBl3c3n4UFmy/sNJ/HvpIAerave4C0nCaYREenfL2tWR7DRtNL85qUVhiHg==","mode":420,"size":6549},"dist/LiveAnnouncer.module.js":{"checkedAt":1794532110975,"integrity":"sha512-DRWkHnf/zNGfcap5wULnwuurwReCqHRubM0GHyXzG+ZJSFBbfoD+42KIPH3sjke7q1Jp1L97wjwV9WhHy2SsAA==","mode":420,"size":6317},"dist/main.js":{"checkedAt":1794532110975,"integrity":"sha512-P4RV17rnrGLIc2i++0Q9XL+3bLSxcjK6YzqJZ0AI3nV5GdXr9MLJl0sPR5fFWvN94tybY4t3laepDlyXqJSSUw==","mode":420,"size":1140},"dist/module.js":{"checkedAt":1794532110975,"integrity":"sha512-InXeiIBRGvFKJcJhMqX+9y6aQzhsF4lO8iL6NFML3O0ELYfmDlSKSDc6N3/PFTt3u5iGNWawSVcoZUQNJNoe2g==","mode":420,"size":1068},"package.json":{"checkedAt":1794532110975,"integrity":"sha512-pvUbVNz3e64WmJZ3pNYnffGfIuBjn9DjENP/pVRzBeN6jebVbSOQt7uArKSu2aLI1tOv/elJXt8sSO4f421DTg==","mode":420,"size":768},"dist/LiveAnnouncer.main.js.map":{"checkedAt":1794532110976,"integrity":"sha512-XfEXExbVroUiW29TJc9UIIXP1SyQNI2n51Y/d1OHsD036JOnldneMRtSPJZV8/THwkQBEQFWRD8PGW4OQ9A2mA==","mode":420,"size":8106},"dist/LiveAnnouncer.module.js.map":{"checkedAt":1794532110976,"integrity":"sha512-L0bJNpipuB2ALWatbqJ7QBY+GmqYHWdUk0e2bQy4Fg51d03iGQPD2Zukkh0KLh3ZWlBTxPe2KYAvETUDZvBfAg==","mode":420,"size":8100},"dist/main.js.map":{"checkedAt":1794532110976,"integrity":"sha512-4nP/DYusi3mQ2tlO/jOqbs3VoXxW1m8yrNnDtP2BX1xDp3Hggbh1aX57uQGQEhEkpwKTruwlXscogzzvNpWJDQ==","mode":420,"size":884},"dist/module.js.map":{"checkedAt":1794532110976,"integrity":"sha512-Ru7JVdOxEf81kuEPI4BVlu/YeX88+ZrArfVGQDoECXSa/Gg6hfe59rAndJPDQmvpUfNAU8NibLdQOveCeCfxdw==","mode":420,"size":878},"dist/types.d.ts.map":{"checkedAt":1794532110976,"integrity":"sha512-zkpKHp/niP1nxhOFMimNfkPm0NDnQ7410RChqAkhtC00RaXHupZZHx9TqZ/nDsW1ZgcWPrr0v6EfR1AEJi5GRg==","mode":420,"size":1336},"README.md":{"checkedAt":1794532110977,"integrity":"sha512-05V1xpn9iVSVoBn4rheVZKRf6NFjJdJV1Q5h3BWkE+f2Yfo2xehBDmEQNfywnXiJ9KHPl3fvwtYwGZZyUwO1Ng==","mode":420,"size":144},"dist/import.mjs":{"checkedAt":1794532110977,"integrity":"sha512-WUtzyiyZ9JMDfIbM+0MAL8QLXdWriYxTKFF+MoHz7fJGcmJ4cOr7QatibmzuUD5J+LQeMnOZnaXm2zJCvfIJfQ==","mode":420,"size":1062},"dist/LiveAnnouncer.mjs":{"checkedAt":1794532110975,"integrity":"sha512-DRWkHnf/zNGfcap5wULnwuurwReCqHRubM0GHyXzG+ZJSFBbfoD+42KIPH3sjke7q1Jp1L97wjwV9WhHy2SsAA==","mode":420,"size":6317},"src/index.ts":{"checkedAt":1794532110977,"integrity":"sha512-IALSItFI/jAAwR846nJ4xf6KVz7sW4vncbxtf8J3fwKu/14vV/AvZaZS2j78ecOa3lAdik3IpDhnpb11y4bddQ==","mode":420,"size":696},"dist/types.d.ts":{"checkedAt":1794532110977,"integrity":"sha512-tX5ElUVD9dkpWfzTSTR6STgvMqE4B5f7VBGOyXlvE5/8xpXsU1XLMgsT6nxgBhu5Mhoc2k2mjwkEOWfNz6nlfQ==","mode":420,"size":506},"src/LiveAnnouncer.tsx":{"checkedAt":1794532110977,"integrity":"sha512-q/vLASyn91LLKIVQgEajaNejma2RabcmpMmMz56J+8z/9NtljyvL7Jhzcm5S+g37s2PDRPAvckbJ7X8NaxZuOQ==","mode":420,"size":5396}}}
@@ -0,0 +1 @@
{"version":3,"file":"BindingFluentSyntaxImplementation.js","sourceRoot":"","sources":["../../../../src/binding/models/BindingFluentSyntaxImplementation.ts"],"names":[],"mappings":"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 truncated
@@ -0,0 +1,180 @@
'use strict';Object.defineProperty(exports, "__esModule", { value: true });var _createClass = function () {function defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}return function (Constructor, protoProps, staticProps) {if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;};}();function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}var ExportMap = function () {
function ExportMap(path) {_classCallCheck(this, ExportMap);
this.path = path;
this.namespace = new Map();
// todo: restructure to key on path, value is resolver + map of names
this.reexports = new Map();
/**
* star-exports
* @type {Set<() => ExportMap>}
*/
this.dependencies = new Set();
/**
* dependencies of this module that are not explicitly re-exported
* @type {Map<string, () => ExportMap>}
*/
this.imports = new Map();
this.errors = [];
/**
* type {'ambiguous' | 'Module' | 'Script'}
*/
this.parseGoal = 'ambiguous';
}_createClass(ExportMap, [{ key: 'has',
/**
* Note that this does not check explicitly re-exported names for existence
* in the base namespace, but it will expand all `export * from '...'` exports
* if not found in the explicit namespace.
* @param {string} name
* @return {boolean} true if `name` is exported by this module.
*/value: function () {function has(
name) {
if (this.namespace.has(name)) {return true;}
if (this.reexports.has(name)) {return true;}
// default exports must be explicitly re-exported (#328)
if (name !== 'default') {var _iteratorNormalCompletion = true;var _didIteratorError = false;var _iteratorError = undefined;try {
for (var _iterator = this.dependencies[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {var dep = _step.value;
var innerMap = dep();
// todo: report as unresolved?
if (!innerMap) {continue;}
if (innerMap.has(name)) {return true;}
}} catch (err) {_didIteratorError = true;_iteratorError = err;} finally {try {if (!_iteratorNormalCompletion && _iterator['return']) {_iterator['return']();}} finally {if (_didIteratorError) {throw _iteratorError;}}}
}
return false;
}return has;}()
/**
* ensure that imported name fully resolves.
* @param {string} name
* @return {{ found: boolean, path: ExportMap[] }}
*/ }, { key: 'hasDeep', value: function () {function hasDeep(
name) {
if (this.namespace.has(name)) {return { found: true, path: [this] };}
if (this.reexports.has(name)) {
var reexports = this.reexports.get(name);
var imported = reexports.getImport();
// if import is ignored, return explicit 'null'
if (imported == null) {return { found: true, path: [this] };}
// safeguard against cycles, only if name matches
if (imported.path === this.path && reexports.local === name) {
return { found: false, path: [this] };
}
var deep = imported.hasDeep(reexports.local);
deep.path.unshift(this);
return deep;
}
// default exports must be explicitly re-exported (#328)
if (name !== 'default') {var _iteratorNormalCompletion2 = true;var _didIteratorError2 = false;var _iteratorError2 = undefined;try {
for (var _iterator2 = this.dependencies[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {var dep = _step2.value;
var innerMap = dep();
if (innerMap == null) {return { found: true, path: [this] };}
// todo: report as unresolved?
if (!innerMap) {continue;}
// safeguard against cycles
if (innerMap.path === this.path) {continue;}
var innerValue = innerMap.hasDeep(name);
if (innerValue.found) {
innerValue.path.unshift(this);
return innerValue;
}
}} catch (err) {_didIteratorError2 = true;_iteratorError2 = err;} finally {try {if (!_iteratorNormalCompletion2 && _iterator2['return']) {_iterator2['return']();}} finally {if (_didIteratorError2) {throw _iteratorError2;}}}
}
return { found: false, path: [this] };
}return hasDeep;}() }, { key: 'get', value: function () {function get(
name) {
if (this.namespace.has(name)) {return this.namespace.get(name);}
if (this.reexports.has(name)) {
var reexports = this.reexports.get(name);
var imported = reexports.getImport();
// if import is ignored, return explicit 'null'
if (imported == null) {return null;}
// safeguard against cycles, only if name matches
if (imported.path === this.path && reexports.local === name) {return undefined;}
return imported.get(reexports.local);
}
// default exports must be explicitly re-exported (#328)
if (name !== 'default') {var _iteratorNormalCompletion3 = true;var _didIteratorError3 = false;var _iteratorError3 = undefined;try {
for (var _iterator3 = this.dependencies[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {var dep = _step3.value;
var innerMap = dep();
// todo: report as unresolved?
if (!innerMap) {continue;}
// safeguard against cycles
if (innerMap.path === this.path) {continue;}
var innerValue = innerMap.get(name);
if (innerValue !== undefined) {return innerValue;}
}} catch (err) {_didIteratorError3 = true;_iteratorError3 = err;} finally {try {if (!_iteratorNormalCompletion3 && _iterator3['return']) {_iterator3['return']();}} finally {if (_didIteratorError3) {throw _iteratorError3;}}}
}
return undefined;
}return get;}() }, { key: 'forEach', value: function () {function forEach(
callback, thisArg) {var _this = this;
this.namespace.forEach(function (v, n) {callback.call(thisArg, v, n, _this);});
this.reexports.forEach(function (reexports, name) {
var reexported = reexports.getImport();
// can't look up meta for ignored re-exports (#348)
callback.call(thisArg, reexported && reexported.get(reexports.local), name, _this);
});
this.dependencies.forEach(function (dep) {
var d = dep();
// CJS / ignored dependencies won't exist (#717)
if (d == null) {return;}
d.forEach(function (v, n) {
if (n !== 'default') {
callback.call(thisArg, v, n, _this);
}
});
});
}return forEach;}()
// todo: keys, values, entries?
}, { key: 'reportErrors', value: function () {function reportErrors(
context, declaration) {
var msg = this.errors.
map(function (e) {return String(e.message) + ' (' + String(e.lineNumber) + ':' + String(e.column) + ')';}).
join(', ');
context.report({
node: declaration.source,
message: 'Parse errors in imported module \'' + String(declaration.source.value) + '\': ' + String(msg) });
}return reportErrors;}() }, { key: 'hasDefault', get: function () {function get() {return this.get('default') != null;}return get;}() // stronger than this.has
}, { key: 'size', get: function () {function get() {var size = this.namespace.size + this.reexports.size;this.dependencies.forEach(function (dep) {var d = dep(); // CJS / ignored dependencies won't exist (#717)
if (d == null) {return;}size += d.size;});return size;}return get;}() }]);return ExportMap;}();exports['default'] = ExportMap;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9leHBvcnRNYXAvaW5kZXguanMiXSwibmFtZXMiOlsiRXhwb3J0TWFwIiwicGF0aCIsIm5hbWVzcGFjZSIsIk1hcCIsInJlZXhwb3J0cyIsImRlcGVuZGVuY2llcyIsIlNldCIsImltcG9ydHMiLCJlcnJvcnMiLCJwYXJzZUdvYWwiLCJuYW1lIiwiaGFzIiwiZGVwIiwiaW5uZXJNYXAiLCJmb3VuZCIsImdldCIsImltcG9ydGVkIiwiZ2V0SW1wb3J0IiwibG9jYWwiLCJkZWVwIiwiaGFzRGVlcCIsInVuc2hpZnQiLCJpbm5lclZhbHVlIiwidW5kZWZpbmVkIiwiY2FsbGJhY2siLCJ0aGlzQXJnIiwiZm9yRWFjaCIsInYiLCJuIiwiY2FsbCIsInJlZXhwb3J0ZWQiLCJkIiwiY29udGV4dCIsImRlY2xhcmF0aW9uIiwibXNnIiwibWFwIiwiZSIsIm1lc3NhZ2UiLCJsaW5lTnVtYmVyIiwiY29sdW1uIiwiam9pbiIsInJlcG9ydCIsIm5vZGUiLCJzb3VyY2UiLCJ2YWx1ZSIsInNpemUiXSwibWFwcGluZ3MiOiJ5d0JBQXFCQSxTO0FBQ25CLHFCQUFZQyxJQUFaLEVBQWtCO0FBQ2hCLFNBQUtBLElBQUwsR0FBWUEsSUFBWjtBQUNBLFNBQUtDLFNBQUwsR0FBaUIsSUFBSUMsR0FBSixFQUFqQjtBQUNBO0FBQ0EsU0FBS0MsU0FBTCxHQUFpQixJQUFJRCxHQUFKLEVBQWpCO0FBQ0E7Ozs7QUFJQSxTQUFLRSxZQUFMLEdBQW9CLElBQUlDLEdBQUosRUFBcEI7QUFDQTs7OztBQUlBLFNBQUtDLE9BQUwsR0FBZSxJQUFJSixHQUFKLEVBQWY7QUFDQSxTQUFLSyxNQUFMLEdBQWMsRUFBZDtBQUNBOzs7QUFHQSxTQUFLQyxTQUFMLEdBQWlCLFdBQWpCO0FBQ0QsRzs7Ozs7Ozs7Ozs7Ozs7O0FBZUQ7Ozs7Ozs7QUFPSUMsVSxFQUFNO0FBQ1IsWUFBSSxLQUFLUixTQUFMLENBQWVTLEdBQWYsQ0FBbUJELElBQW5CLENBQUosRUFBOEIsQ0FBRSxPQUFPLElB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 truncated
@@ -0,0 +1,295 @@
var alloc = Buffer.alloc
var ZEROS = '0000000000000000000'
var SEVENS = '7777777777777777777'
var ZERO_OFFSET = '0'.charCodeAt(0)
var USTAR_MAGIC = Buffer.from('ustar\x00', 'binary')
var USTAR_VER = Buffer.from('00', 'binary')
var GNU_MAGIC = Buffer.from('ustar\x20', 'binary')
var GNU_VER = Buffer.from('\x20\x00', 'binary')
var MASK = parseInt('7777', 8)
var MAGIC_OFFSET = 257
var VERSION_OFFSET = 263
var clamp = function (index, len, defaultValue) {
if (typeof index !== 'number') return defaultValue
index = ~~index // Coerce to integer.
if (index >= len) return len
if (index >= 0) return index
index += len
if (index >= 0) return index
return 0
}
var toType = function (flag) {
switch (flag) {
case 0:
return 'file'
case 1:
return 'link'
case 2:
return 'symlink'
case 3:
return 'character-device'
case 4:
return 'block-device'
case 5:
return 'directory'
case 6:
return 'fifo'
case 7:
return 'contiguous-file'
case 72:
return 'pax-header'
case 55:
return 'pax-global-header'
case 27:
return 'gnu-long-link-path'
case 28:
case 30:
return 'gnu-long-path'
}
return null
}
var toTypeflag = function (flag) {
switch (flag) {
case 'file':
return 0
case 'link':
return 1
case 'symlink':
return 2
case 'character-device':
return 3
case 'block-device':
return 4
case 'directory':
return 5
case 'fifo':
return 6
case 'contiguous-file':
return 7
case 'pax-header':
return 72
}
return 0
}
var indexOf = function (block, num, offset, end) {
for (; offset < end; offset++) {
if (block[offset] === num) return offset
}
return end
}
var cksum = function (block) {
var sum = 8 * 32
for (var i = 0; i < 148; i++) sum += block[i]
for (var j = 156; j < 512; j++) sum += block[j]
return sum
}
var encodeOct = function (val, n) {
val = val.toString(8)
if (val.length > n) return SEVENS.slice(0, n) + ' '
else return ZEROS.slice(0, n - val.length) + val + ' '
}
/* Copied from the node-tar repo and modified to meet
* tar-stream coding standard.
*
* Source: https://github.com/npm/node-tar/blob/51b6627a1f357d2eb433e7378e5f05e83b7aa6cd/lib/header.js#L349
*/
function parse256 (buf) {
// first byte MUST be either 80 or FF
// 80 for positive, FF for 2's comp
var positive
if (buf[0] === 0x80) positive = true
else if (buf[0] === 0xFF) positive = false
else return null
// build up a base-256 tuple from the least sig to the highest
var tuple = []
for (var i = buf.length - 1; i > 0; i--) {
var byte = buf[i]
if (positive) tuple.push(byte)
else tuple.push(0xFF - byte)
}
var sum = 0
var l = tuple.length
for (i = 0; i < l; i++) {
sum += tuple[i] * Math.pow(256, i)
}
return positive ? sum : -1 * sum
}
var decodeOct = function (val, offset, length) {
val = val.slice(offset, offset + length)
offset = 0
// If prefixed with 0x80 then parse as a base-256 integer
if (val[offset] & 0x80) {
return parse256(val)
} else {
// Older versions of tar can prefix with spaces
while (offset < val.length && val[offset] === 32) offset++
var end = clamp(indexOf(val, 32, offset, val.length), val.length, val.length)
while (offset < end && val[offset] === 0) offset++
if (end === offset) return 0
return parseInt(val.slice(offset, end).toString(), 8)
}
}
var decodeStr = function (val, offset, length, encoding) {
return val.slice(offset, indexOf(val, 0, offset, offset + length)).toString(encoding)
}
var addLength = function (str) {
var len = Buffer.byteLength(str)
var digits = Math.floor(Math.log(len) / Math.log(10)) + 1
if (len + digits >= Math.pow(10, digits)) digits++
return (len + digits) + str
}
exports.decodeLongPath = function (buf, encoding) {
return decodeStr(buf, 0, buf.length, encoding)
}
exports.encodePax = function (opts) { // TODO: encode more stuff in pax
var result = ''
if (opts.name) result += addLength(' path=' + opts.name + '\n')
if (opts.linkname) result += addLength(' linkpath=' + opts.linkname + '\n')
var pax = opts.pax
if (pax) {
for (var key in pax) {
result += addLength(' ' + key + '=' + pax[key] + '\n')
}
}
return Buffer.from(result)
}
exports.decodePax = function (buf) {
var result = {}
while (buf.length) {
var i = 0
while (i < buf.length && buf[i] !== 32) i++
var len = parseInt(buf.slice(0, i).toString(), 10)
if (!len) return result
var b = buf.slice(i + 1, len - 1).toString()
var keyIndex = b.indexOf('=')
if (keyIndex === -1) return result
result[b.slice(0, keyIndex)] = b.slice(keyIndex + 1)
buf = buf.slice(len)
}
return result
}
exports.encode = function (opts) {
var buf = alloc(512)
var name = opts.name
var prefix = ''
if (opts.typeflag === 5 && name[name.length - 1] !== '/') name += '/'
if (Buffer.byteLength(name) !== name.length) return null // utf-8
while (Buffer.byteLength(name) > 100) {
var i = name.indexOf('/')
if (i === -1) return null
prefix += prefix ? '/' + name.slice(0, i) : name.slice(0, i)
name = name.slice(i + 1)
}
if (Buffer.byteLength(name) > 100 || Buffer.byteLength(prefix) > 155) return null
if (opts.linkname && Buffer.byteLength(opts.linkname) > 100) return null
buf.write(name)
buf.write(encodeOct(opts.mode & MASK, 6), 100)
buf.write(encodeOct(opts.uid, 6), 108)
buf.write(encodeOct(opts.gid, 6), 116)
buf.write(encodeOct(opts.size, 11), 124)
buf.write(encodeOct((opts.mtime.getTime() / 1000) | 0, 11), 136)
buf[156] = ZERO_OFFSET + toTypeflag(opts.type)
if (opts.linkname) buf.write(opts.linkname, 157)
USTAR_MAGIC.copy(buf, MAGIC_OFFSET)
USTAR_VER.copy(buf, VERSION_OFFSET)
if (opts.uname) buf.write(opts.uname, 265)
if (opts.gname) buf.write(opts.gname, 297)
buf.write(encodeOct(opts.devmajor || 0, 6), 329)
buf.write(encodeOct(opts.devminor || 0, 6), 337)
if (prefix) buf.write(prefix, 345)
buf.write(encodeOct(cksum(buf), 6), 148)
return buf
}
exports.decode = function (buf, filenameEncoding, allowUnknownFormat) {
var typeflag = buf[156] === 0 ? 0 : buf[156] - ZERO_OFFSET
var name = decodeStr(buf, 0, 100, filenameEncoding)
var mode = decodeOct(buf, 100, 8)
var uid = decodeOct(buf, 108, 8)
var gid = decodeOct(buf, 116, 8)
var size = decodeOct(buf, 124, 12)
var mtime = decodeOct(buf, 136, 12)
var type = toType(typeflag)
var linkname = buf[157] === 0 ? null : decodeStr(buf, 157, 100, filenameEncoding)
var uname = decodeStr(buf, 265, 32)
var gname = decodeStr(buf, 297, 32)
var devmajor = decodeOct(buf, 329, 8)
var devminor = decodeOct(buf, 337, 8)
var c = cksum(buf)
// checksum is still initial value if header was null.
if (c === 8 * 32) return null
// valid checksum
if (c !== decodeOct(buf, 148, 8)) throw new Error('Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?')
if (USTAR_MAGIC.compare(buf, MAGIC_OFFSET, MAGIC_OFFSET + 6) === 0) {
// ustar (posix) format.
// prepend prefix, if present.
if (buf[345]) name = decodeStr(buf, 345, 155, filenameEncoding) + '/' + name
} else if (GNU_MAGIC.compare(buf, MAGIC_OFFSET, MAGIC_OFFSET + 6) === 0 &&
GNU_VER.compare(buf, VERSION_OFFSET, VERSION_OFFSET + 2) === 0) {
// 'gnu'/'oldgnu' format. Similar to ustar, but has support for incremental and
// multi-volume tarballs.
} else {
if (!allowUnknownFormat) {
throw new Error('Invalid tar header: unknown format.')
}
}
// to support old tar versions that use trailing / to indicate dirs
if (typeflag === 0 && name && name[name.length - 1] === '/') typeflag = 5
return {
name,
mode,
uid,
gid,
size,
mtime: new Date(1000 * mtime),
type,
linkname,
uname,
gname,
devmajor,
devminor
}
}
@@ -0,0 +1,4 @@
function _iterableToArray(r) {
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
}
module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = inherits;
var _index = require("../constants/index.js");
var _inheritsComments = require("../comments/inheritsComments.js");
function inherits(child, parent) {
if (!child || !parent) return child;
for (const key of _index.INHERIT_KEYS.optional) {
if (child[key] == null) {
child[key] = parent[key];
}
}
for (const key of Object.keys(parent)) {
if (key[0] === "_" && key !== "__clone") {
child[key] = parent[key];
}
}
for (const key of _index.INHERIT_KEYS.force) {
child[key] = parent[key];
}
(0, _inheritsComments.default)(child, parent);
return child;
}
//# sourceMappingURL=inherits.js.map
@@ -0,0 +1,5 @@
'use strict'
const compareBuild = require('./compare-build')
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
module.exports = sort
@@ -0,0 +1,178 @@
# regexpp
[![npm version](https://img.shields.io/npm/v/regexpp.svg)](https://www.npmjs.com/package/regexpp)
[![Downloads/month](https://img.shields.io/npm/dm/regexpp.svg)](http://www.npmtrends.com/regexpp)
[![Build Status](https://github.com/mysticatea/regexpp/workflows/CI/badge.svg)](https://github.com/mysticatea/regexpp/actions)
[![codecov](https://codecov.io/gh/mysticatea/regexpp/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/regexpp)
[![Dependency Status](https://david-dm.org/mysticatea/regexpp.svg)](https://david-dm.org/mysticatea/regexpp)
A regular expression parser for ECMAScript.
## 💿 Installation
```bash
$ npm install regexpp
```
- require Node.js 8 or newer.
## 📖 Usage
```ts
import {
AST,
RegExpParser,
RegExpValidator,
RegExpVisitor,
parseRegExpLiteral,
validateRegExpLiteral,
visitRegExpAST
} from "regexpp"
```
### parseRegExpLiteral(source, options?)
Parse a given regular expression literal then make AST object.
This is equivalent to `new RegExpParser(options).parseLiteral(source)`.
- **Parameters:**
- `source` (`string | RegExp`) The source code to parse.
- `options?` ([`RegExpParser.Options`]) The options to parse.
- **Return:**
- The AST of the regular expression.
### validateRegExpLiteral(source, options?)
Validate a given regular expression literal.
This is equivalent to `new RegExpValidator(options).validateLiteral(source)`.
- **Parameters:**
- `source` (`string`) The source code to validate.
- `options?` ([`RegExpValidator.Options`]) The options to validate.
### visitRegExpAST(ast, handlers)
Visit each node of a given AST.
This is equivalent to `new RegExpVisitor(handlers).visit(ast)`.
- **Parameters:**
- `ast` ([`AST.Node`]) The AST to visit.
- `handlers` ([`RegExpVisitor.Handlers`]) The callbacks.
### RegExpParser
#### new RegExpParser(options?)
- **Parameters:**
- `options?` ([`RegExpParser.Options`]) The options to parse.
#### parser.parseLiteral(source, start?, end?)
Parse a regular expression literal.
- **Parameters:**
- `source` (`string`) The source code to parse. E.g. `"/abc/g"`.
- `start?` (`number`) The start index in the source code. Default is `0`.
- `end?` (`number`) The end index in the source code. Default is `source.length`.
- **Return:**
- The AST of the regular expression.
#### parser.parsePattern(source, start?, end?, uFlag?)
Parse a regular expression pattern.
- **Parameters:**
- `source` (`string`) The source code to parse. E.g. `"abc"`.
- `start?` (`number`) The start index in the source code. Default is `0`.
- `end?` (`number`) The end index in the source code. Default is `source.length`.
- `uFlag?` (`boolean`) The flag to enable Unicode mode.
- **Return:**
- The AST of the regular expression pattern.
#### parser.parseFlags(source, start?, end?)
Parse a regular expression flags.
- **Parameters:**
- `source` (`string`) The source code to parse. E.g. `"gim"`.
- `start?` (`number`) The start index in the source code. Default is `0`.
- `end?` (`number`) The end index in the source code. Default is `source.length`.
- **Return:**
- The AST of the regular expression flags.
### RegExpValidator
#### new RegExpValidator(options)
- **Parameters:**
- `options` ([`RegExpValidator.Options`]) The options to validate.
#### validator.validateLiteral(source, start, end)
Validate a regular expression literal.
- **Parameters:**
- `source` (`string`) The source code to validate.
- `start?` (`number`) The start index in the source code. Default is `0`.
- `end?` (`number`) The end index in the source code. Default is `source.length`.
#### validator.validatePattern(source, start, end, uFlag)
Validate a regular expression pattern.
- **Parameters:**
- `source` (`string`) The source code to validate.
- `start?` (`number`) The start index in the source code. Default is `0`.
- `end?` (`number`) The end index in the source code. Default is `source.length`.
- `uFlag?` (`boolean`) The flag to enable Unicode mode.
#### validator.validateFlags(source, start, end)
Validate a regular expression flags.
- **Parameters:**
- `source` (`string`) The source code to validate.
- `start?` (`number`) The start index in the source code. Default is `0`.
- `end?` (`number`) The end index in the source code. Default is `source.length`.
### RegExpVisitor
#### new RegExpVisitor(handlers)
- **Parameters:**
- `handlers` ([`RegExpVisitor.Handlers`]) The callbacks.
#### visitor.visit(ast)
Validate a regular expression literal.
- **Parameters:**
- `ast` ([`AST.Node`]) The AST to visit.
## 📰 Changelog
- [GitHub Releases](https://github.com/mysticatea/regexpp/releases)
## 🍻 Contributing
Welcome contributing!
Please use GitHub's Issues/PRs.
### Development Tools
- `npm test` runs tests and measures coverage.
- `npm run build` compiles TypeScript source code to `index.js`, `index.js.map`, and `index.d.ts`.
- `npm run clean` removes the temporary files which are created by `npm test` and `npm run build`.
- `npm run lint` runs ESLint.
- `npm run update:test` updates test fixtures.
- `npm run update:ids` updates `src/unicode/ids.ts`.
- `npm run watch` runs tests with `--watch` option.
[`AST.Node`]: src/ast.ts#L4
[`RegExpParser.Options`]: src/parser.ts#L539
[`RegExpValidator.Options`]: src/validator.ts#L127
[`RegExpVisitor.Handlers`]: src/visitor.ts#L204
@@ -0,0 +1,83 @@
"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/utilities/transition.ts
var transition_exports = {};
__export(transition_exports, {
DEFAULT_TRANSITION_DURATION: () => DEFAULT_TRANSITION_DURATION,
default: () => transition_default
});
module.exports = __toCommonJS(transition_exports);
var DEFAULT_TRANSITION_DURATION = "250ms";
var transition_default = {
".transition-background": {
"transition-property": "background",
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
".transition-colors-opacity": {
"transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity",
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
".transition-width": {
"transition-property": "width",
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
".transition-height": {
"transition-property": "height",
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
".transition-size": {
"transition-property": "width, height",
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
".transition-left": {
"transition-property": "left",
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
".transition-transform-opacity": {
"transition-property": "transform, opacity",
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
".transition-transform-background": {
"transition-property": "transform, background",
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
".transition-transform-colors": {
"transition-property": "transform, color, background, background-color, border-color, text-decoration-color, fill, stroke",
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
},
".transition-transform-colors-opacity": {
"transition-property": "transform, color, background, background-color, border-color, text-decoration-color, fill, stroke, opacity",
"transition-timing-function": "ease",
"transition-duration": DEFAULT_TRANSITION_DURATION
}
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
DEFAULT_TRANSITION_DURATION
});
@@ -0,0 +1,88 @@
import {useCheckbox as $406796ff087fe49b$export$e375f10ce42261c5} from "./useCheckbox.module.js";
import {checkboxGroupData as $1ae600c947479353$export$ec98120685d4f57d} from "./utils.module.js";
import {useFormValidationState as $6clEo$useFormValidationState, DEFAULT_VALIDATION_RESULT as $6clEo$DEFAULT_VALIDATION_RESULT, privateValidationStateProp as $6clEo$privateValidationStateProp} from "@react-stately/form";
import {useRef as $6clEo$useRef, useEffect as $6clEo$useEffect} from "react";
import {useToggleState as $6clEo$useToggleState} from "@react-stately/toggle";
/*
* 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 $fba3e38d5ca8983f$export$353b32fc6898d37d(props, state, inputRef) {
const toggleState = (0, $6clEo$useToggleState)({
isReadOnly: props.isReadOnly || state.isReadOnly,
isSelected: state.isSelected(props.value),
defaultSelected: state.defaultValue.includes(props.value),
onChange (isSelected) {
if (isSelected) state.addValue(props.value);
else state.removeValue(props.value);
if (props.onChange) props.onChange(isSelected);
}
});
let { name: name, form: form, descriptionId: descriptionId, errorMessageId: errorMessageId, validationBehavior: validationBehavior } = (0, $1ae600c947479353$export$ec98120685d4f57d).get(state);
var _props_validationBehavior;
validationBehavior = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : validationBehavior;
// Local validation for this checkbox.
let { realtimeValidation: realtimeValidation } = (0, $6clEo$useFormValidationState)({
...props,
value: toggleState.isSelected,
// Server validation is handled at the group level.
name: undefined,
validationBehavior: 'aria'
});
// Update the checkbox group state when realtime validation changes.
let nativeValidation = (0, $6clEo$useRef)((0, $6clEo$DEFAULT_VALIDATION_RESULT));
let updateValidation = ()=>{
state.setInvalid(props.value, realtimeValidation.isInvalid ? realtimeValidation : nativeValidation.current);
};
(0, $6clEo$useEffect)(updateValidation);
// Combine group and checkbox level validation.
let combinedRealtimeValidation = state.realtimeValidation.isInvalid ? state.realtimeValidation : realtimeValidation;
let displayValidation = validationBehavior === 'native' ? state.displayValidation : combinedRealtimeValidation;
var _props_isRequired;
let res = (0, $406796ff087fe49b$export$e375f10ce42261c5)({
...props,
isReadOnly: props.isReadOnly || state.isReadOnly,
isDisabled: props.isDisabled || state.isDisabled,
name: props.name || name,
form: props.form || form,
isRequired: (_props_isRequired = props.isRequired) !== null && _props_isRequired !== void 0 ? _props_isRequired : state.isRequired,
validationBehavior: validationBehavior,
[(0, $6clEo$privateValidationStateProp)]: {
realtimeValidation: combinedRealtimeValidation,
displayValidation: displayValidation,
resetValidation: state.resetValidation,
commitValidation: state.commitValidation,
updateValidation (v) {
nativeValidation.current = v;
updateValidation();
}
}
}, toggleState, inputRef);
return {
...res,
inputProps: {
...res.inputProps,
'aria-describedby': [
props['aria-describedby'],
state.isInvalid ? errorMessageId : null,
descriptionId
].filter(Boolean).join(' ') || undefined
}
};
}
export {$fba3e38d5ca8983f$export$353b32fc6898d37d as useCheckboxGroupItem};
//# sourceMappingURL=useCheckboxGroupItem.module.js.map
@@ -0,0 +1 @@
{"name":"@vitest/mocker","version":"4.0.9","requiresBuild":false,"files":{"dist/auto-register.js":{"checkedAt":1794532124760,"integrity":"sha512-rODiSlS7ss1pJzpVoLCIiFZQqG3xQ3ImLAubOkLxJHVZLLUD6tCNnNddMIaVeablj5cydk0Cgy1nMV35vN/NDw==","mode":420,"size":341},"dist/automock.js":{"checkedAt":1794532124760,"integrity":"sha512-lSzFKivr05dJ/q2dRcmPRWztH9wp116HEhx2rVAvvqrGGOSslPKQsVjDuzXyuwAN2iZTsoqHIjJaiYFbI/AvVw==","mode":420,"size":106},"dist/browser.js":{"checkedAt":1794532124760,"integrity":"sha512-sQGXKiObDfwf3MpO5xjoC4R9PUJxYtTfW/7PRaF9Y21LN6q4ObTNh0KUxkn8/51iqu4V0wV3kw3w23m1o9r7eA==","mode":420,"size":3067},"dist/chunk-automock.js":{"checkedAt":1794532124760,"integrity":"sha512-xtzj0vVdbWdI0vHd69EZlMjap3DXB/ImlpnJyx0axzikyTsAcamgEhCArAGrFZkSjsYtS5Idj8OHBqMSaIarrQ==","mode":420,"size":12620},"dist/chunk-interceptor-native.js":{"checkedAt":1794532124760,"integrity":"sha512-2tlybz9/0yG+F3SFg8jHaRBMJEbDFN4rUAZuAT62X9YjPupM+g8kD7R4aAu0/Wd6MxBiHM11HuuKo5XKRb1KqQ==","mode":420,"size":365},"dist/chunk-mocker.js":{"checkedAt":1794532124760,"integrity":"sha512-gSw4pvy5rrst7ogEpFCdWBhLHnYS6h7970rk5LO8a8FYsO7F5TuFpUBwRYUJaEOp+ht6Gb3eUqpHrmfTfpQgNg==","mode":420,"size":17922},"dist/chunk-pathe.M-eThtNZ.js":{"checkedAt":1794532124760,"integrity":"sha512-BV2KA0GYNf3onR7SLIWjQ6GkPaxk6pIn/fvGXceobLTOCsLfJDFD6+7Efgko8joiunE2+mRFVm5Lptd5C2zzXQ==","mode":420,"size":5149},"dist/chunk-registry.js":{"checkedAt":1794532124761,"integrity":"sha512-thgKe6txzOAOFUqTa90BhxDQjFYUp1lP/TZ8YtsX4UgY2Xm7Y6xSx1HghBzsHzYFf3cCFLQxRBrXSxJ2dm1PpQ==","mode":420,"size":5270},"dist/chunk-utils.js":{"checkedAt":1794532124761,"integrity":"sha512-5sTb91AqvWWgnYgXJKriaYavdL/X7PN1wiQjq4zB95aImzYLdpNdE1cpPkOe3bJAqxuHpwhp0jbBXXM2Z+FDdg==","mode":420,"size":569},"dist/index.js":{"checkedAt":1794532124761,"integrity":"sha512-Gz/xm7NQhftzrIqaZF29W2wY52hkbqAr7nKDyNItiKnzLW9GUEidW2C5kkO4dWfD4D2sqrZpm1+OncdFvMJfQg==","mode":420,"size":6228},"dist/node.js":{"checkedAt":1794532124761,"integrity":"sha512-ObyYQCfRux0K+aL3ThdF69abbBY3Dl9hL6ia40OTdK47DdEcRrEv9oeDpa3jVrZ54yNmHFE2oHtSpZX3qY6L3A==","mode":420,"size":33572},"dist/redirect.js":{"checkedAt":1794532124761,"integrity":"sha512-rO3WCRtbMBGZV/8QwtQd/sh+1wdhtmudweoMhVJL+YTobspOCHjcL1ZsKjw9Ds1cFEupdAljJAkql3mhTcOI2A==","mode":420,"size":2230},"dist/register.js":{"checkedAt":1794532124762,"integrity":"sha512-S35wPeZggarlxq3ojMxRlh0zM3UrVMjlvEsj8fLzPyDjGer9tqqitYG5PfM6KpeKSGj3H9tYuypCE5MuMjkqAg==","mode":420,"size":1256},"package.json":{"checkedAt":1794532124762,"integrity":"sha512-QhuhUztrspSc6RmHPMHRHYvW59GHpAl7F95iZ6N/RI49PAybREM18G6hqjZN3nOCR94X9Se6loYlp2ej8PZH7w==","mode":420,"size":2015},"README.md":{"checkedAt":1794532124762,"integrity":"sha512-nyKiTZ37hEeXRIcf9JpFWv8Fg24/qgRgAicTNICKJkmOcbW6z0hfkJndTr3GbMzvGGiwwTePTCr6kIkajICR6w==","mode":420,"size":225},"dist/auto-register.d.ts":{"checkedAt":1794532124762,"integrity":"sha512-tefMpEwF1dZrwLhRYAGZOeI+99EZLSXvtcKGw4rSUZonxH9G3NP/VNZCFbTw8+a4KjvJvwI/liXsc4jxYVY5Vw==","mode":420,"size":13},"dist/automock.d.ts":{"checkedAt":1794532124762,"integrity":"sha512-C7KAuSK8PZI/85KLPNcuUoNuuFdWwJH+KDuTkla37Jmvwf03VkvOFePw/e31hB1gkxM4Pk+rpdoGQEYGGEsZnA==","mode":420,"size":354},"dist/browser.d.ts":{"checkedAt":1794532124762,"integrity":"sha512-KQ9H5aalR7mJzkXj6ySEKjsvxwV0XltYie7KUjLN2cyOqqpoxG9hxxPrF0Y8c54fnSEWm60JvGN70NjvlT517A==","mode":420,"size":2064},"dist/index.d-C-sLYZi-.d.ts":{"checkedAt":1794532124762,"integrity":"sha512-LJfgwcVU6Mh4LJOSrKEadpX1p5557Bq5h06DcmJjAWei9Ku/MoL5iuMWrJWNk5m0Y3O7FTJJddlZ1CGLWDBRLg==","mode":420,"size":859},"dist/index.d.ts":{"checkedAt":1794532124763,"integrity":"sha512-RYmTgSKML6DMkxzsJke3cQGq5ch4ndWoVTArUCIWMpvCcxrqA6b3QxDHAUDqKYbx6u3Ll74eUJVDyVrMqiBWUw==","mode":420,"size":598},"dist/mocker.d-TnKRhz7N.d.ts":{"checkedAt":1794532124763,"integrity":"sha512-+xvGkq8ldAUntPfPDB2ckq88Srj15EXUzH2ohdr8yV9QWfKAEph2llJcR9AwS1ZS7rIWqmXxb7REVi//WKH3lQ==","mode":420,"size":3339},"dist/node.d.ts":{"checkedAt":1794532124763,"integrity":"sha512-oi4wph59+3166z3aL9tutea1JjyRj4FKUGOkmRZreU367yWIxwQ41SDZUev7fvndir4kbNte2HtlU3Ummjf9Mg==","mode":420,"size":21503},"dist/redirect.d.ts":{"checkedAt":1794532124763,"integrity":"sha512-V1Kv4fmLXTEXsyuD1xENrdBhGjFk77/oVCb4ZnNOr1A28/PsuI6erYoVoFEae4zohn18FaP5Yre0M8Oo5wzTMA==","mode":420,"size":137},"dist/register.d.ts":{"checkedAt":1794532124763,"integrity":"sha512-GwpLEyk/FU15iAlBTZwoACvJBLcq53NwgeG5KKEbUyOZxWK1vDaaCbnMHVfP64t9OHzMboWpko3mZmypIBkGqg==","mode":420,"size":476},"dist/types.d-B8CCKmHt.d.ts":{"checkedAt":1794532124763,"integrity":"sha512-17gVAhs017puIEluSxOrk+MLY2LRA1ZgwOVDTeOwPJ41yDQd9u2/jWsmoAZZNEYUEz/Z4PTYNPwZgjq88Rjbuw==","mode":420,"size":3791},"LICENSE":{"checkedAt":1794532124763,"integrity":"sha512-AxPiQHDnFTOwiy0HEsivy5bYN2wjcRKtw2lWjpeXevVq5EsAeGD6UzkfgwyM9B8ElYup7flAhvpi12SE1jQcGA==","mode":420,"size":1102}}}
@@ -0,0 +1,630 @@
flf2a$ 6 5 32 15 10
Font name is graffiti.flf
This figlet font designed by Leigh Purdie (purdie@zeus.usq.edu.au)
'fig-fonted' by Leigh Purdie and Tim Maggio (tim@claremont.com)
Date: 5 Mar 1994
---
Font modified May 20, 2012 by patorjk
- Changed the hardblanks around certain punctuation characters (., and -) to improve smushing.
- Added the 0xCA0 character
$@
$@
$@
$@
$@
$@@
._.@
| |@
| |@
\|@
__@
\/@@
/\/\@
)/)/@
@
@
@
@@
_ _ @
__| || |__@
\ __ /@
| || | @
/_ ~~ _\@
|_||_| @@
____/\__@
/ / /_/@
\__/ / \ @
/ / / \@
/_/ /__ /@
\/ \/ @@
_ /\ @
/ \ / / @
\_// /_ @
/ // \@
/ / \_/@
\/ @@
____ @
/ _ \ @
> _ </\@
/ <_\ \/@
\_____\ \@
\/@@
/\@
)/@
@
@
@
@@
$ ___$@
$ / /$@
$ / / $@
$( ( $@
$ \ \ $@
$ \__\$@@
$___ $@
$\ \ $@
$ \ \ $@
$ ) )$@
$ / / $@
$/__/ $@@
$ $@
$ /\|\/\ $@
$_) (__$@
$\_ _/$@
$ ) \ $@
$ \/\|\/ $@@
$ $@
$ .__ $@
$ __| |___$@
$/__ __/$@
$ |__| $@
$ $@@
@
@
@
@
$/\$@
$)/$@@
@
@
$ ______$@
$/_____/$@
$ $@
@@
@
@
@
@
$/\$@
$\/$@@
$ /\$@
$ / /$@
$ / / $@
$ / / $@
$/ / $@
$\/ $@@
_______ @
\ _ \ @
/ /_\ \ @
\ \_/ \@
\_____ /@
\/ @@
____ @
/_ |@
| |@
| |@
|___|@
@@
________ @
\_____ \ @
/ ____/ @
/ \ @
\_______ \@
\/@@
________ @
\_____ \ @
_(__ < @
/ \@
/______ /@
\/ @@
_____ @
/ | | @
/ | |_@
/ ^ /@
\____ | @
|__| @@
.________@
| ____/@
|____ \ @
/ \@
/______ /@
\/ @@
________@
/ _____/@
/ __ \ @
\ |__\ \@
\_____ /@
\/ @@
_________ @
\______ \@
/ /@
/ / @
/____/ @
@@
______ @
/ __ \ @
> < @
/ -- \@
\______ /@
\/ @@
________ @
/ __ \@
\____ /@
/ / @
/____/ @
@@
$ $@
$/\$@
$\/$@
$/\$@
$\/$@
$ $@@
$ $@
$/\$@
$\/$@
$/\$@
$)/$@
$ $@@
$ __$@
$ / /$@
$/ / $@
$\ \ $@
$ \_\$@
$ $@@
$ $@
$ ______$@
$/_____/$@
$/_____/$@
$ $@
$ $@@
$__ $@
$\ \ $@
$ \ \$@
$ / /$@
$/_/ $@
$ $@@
_________ @
\_____ \@
/ __/@
| | @
|___| @
<___> @@
_____ @
/ ___ \ @
/ / ._\ \@
< \_____/@
\_____\ @
@@
_____ @
/ _ \ @
/ /_\ \ @
/ | \@
\____|__ /@
\/ @@
__________ @
\______ \@
| | _/@
| | \@
|______ /@
\/ @@
_________ @
\_ ___ \ @
/ \ \/ @
\ \____@
\______ /@
\/ @@
________ @
\______ \ @
| | \ @
| ` \@
/_______ /@
\/ @@
___________@
\_ _____/@
| __)_ @
| \@
/_______ /@
\/ @@
___________@
\_ _____/@
| __) @
| \ @
\___ / @
\/ @@
________ @
/ _____/ @
/ \ ___ @
\ \_\ \@
\______ /@
\/ @@
___ ___ @
/ | \ @
/ ~ \@
\ Y /@
\___|_ / @
\/ @@
.___ @
| |@
| |@
| |@
|___|@
@@
____.@
| |@
| |@
/\__| |@
\________|@
@@
____ __.@
| |/ _|@
| < @
| | \ @
|____|__ \@
\/@@
.____ @
| | @
| | @
| |___ @
|_______ \@
\/@@
_____ @
/ \ @
/ \ / \ @
/ Y \@
\____|__ /@
\/ @@
_______ @
\ \ @
/ | \ @
/ | \@
\____|__ /@
\/ @@
________ @
\_____ \ @
/ | \ @
/ | \@
\_______ /@
\/ @@
__________ @
\______ \@
| ___/@
| | @
|____| @
@@
________ @
\_____ \ @
/ / \ \ @
/ \_/. \@
\_____\ \_/@
\__>@@
__________ @
\______ \@
| _/@
| | \@
|____|_ /@
\/ @@
_________@
/ _____/@
\_____ \ @
/ \@
/_______ /@
\/ @@
___________@
\__ ___/@
| | @
| | @
|____| @
@@
____ ___ @
| | \@
| | /@
| | / @
|______/ @
@@
____ ____@
\ \ / /@
\ Y / @
\ / @
\___/ @
@@
__ __ @
/ \ / \@
\ \/\/ /@
\ / @
\__/\ / @
\/ @@
____ ___@
\ \/ /@
\ / @
/ \ @
/___/\ \@
\_/@@
_____.___.@
\__ | |@
/ | |@
\____ |@
/ ______|@
\/ @@
__________@
\____ /@
/ / @
/ /_ @
/_______ \@
\/@@
$.____ $@
$| _|$@
$| | $@
$| | $@
$| |_ $@
$|____|$@@
/\ @
\ \ @
\ \ @
\ \ @
\ \@
\/@@
$ ____.$@
$|_ |$@
$ | |$@
$ | |$@
$ _| |$@
$|____|$@@
$ /\ $@
$/ \$@
$\/\/$@
$ $@
$ $@
$ $@@
@
@
@
@
______@
/_____/@@
/\@
\(@
@
@
@
@@
@
_____ @
\__ \ @
/ __ \_@
(____ /@
\/ @@
___. @
\_ |__ @
| __ \ @
| \_\ \@
|___ /@
\/ @@
@
____ @
_/ ___\ @
\ \___ @
\___ >@
\/ @@
.___@
__| _/@
/ __ | @
/ /_/ | @
\____ | @
\/ @@
@
____ @
_/ __ \ @
\ ___/ @
\___ >@
\/ @@
_____ @
_/ ____\@
\ __\ @
| | @
|__| @
@@
@
____ @
/ ___\ @
/ /_/ >@
\___ / @
/_____/ @@
.__ @
| |__ @
| | \ @
| Y \@
|___| /@
\/ @@
.__ @
|__|@
| |@
| |@
|__|@
@@
__ @
|__|@
| |@
| |@
/\__| |@
\______|@@
__ @
| | __@
| |/ /@
| < @
|__|_ \@
\/@@
.__ @
| | @
| | @
| |__@
|____/@
@@
@
_____ @
/ \ @
| Y Y \@
|__|_| /@
\/ @@
@
____ @
/ \ @
| | \@
|___| /@
\/ @@
@
____ @
/ _ \ @
( <_> )@
\____/ @
@@
@
______ @
\____ \ @
| |_> >@
| __/ @
|__| @@
@
______@
/ ____/@
< <_| |@
\__ |@
|__|@@
@
_______ @
\_ __ \@
| | \/@
|__| @
@@
@
______@
/ ___/@
\___ \ @
/____ >@
\/ @@
__ @
_/ |_ @
\ __\@
| | @
|__| @
@@
@
__ __ @
| | \@
| | /@
|____/ @
@@
@
___ __@
\ \/ /@
\ / @
\_/ @
@@
@
__ _ __@
\ \/ \/ /@
\ / @
\/\_/ @
@@
@
___ ___@
\ \/ /@
> < @
/__/\_ \@
\/@@
@
___.__.@
< | |@
\___ |@
/ ____|@
\/ @@
@
________@
\___ /@
/ / @
/_____ \@
\/@@
$ ___$@
$/ / $@
$\ \ $@
$< < $@
$/ / $@
$\_\_$@@
$._.$@
$| |$@
$|_|$@
$|-|$@
$| |$@
$|_|$@@
$___ $@
$ \ \$@
$ / /$@
$ > >$@
$ \ \$@
$_/_/$@@
$ ___ $@
$/ _ \_/\$@
$\/ \___/$@
$ $@
$ $@
$ $@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
0xCA0 KANNADA LETTER TTHA
_____)@
/_____/@
/ \ @
( () )@
$\____/$@
@@
@@ -0,0 +1,37 @@
import { MAP, SCALAR, SEQ } from '../nodes/identity.js';
import { map } from './common/map.js';
import { seq } from './common/seq.js';
import { string } from './common/string.js';
import { getTags, coreKnownTags } from './tags.js';
const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
class Schema {
constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
this.compat = Array.isArray(compat)
? getTags(compat, 'compat')
: compat
? getTags(null, compat)
: null;
this.name = (typeof schema === 'string' && schema) || 'core';
this.knownTags = resolveKnownTags ? coreKnownTags : {};
this.tags = getTags(customTags, this.name, merge);
this.toStringOptions = toStringDefaults ?? null;
Object.defineProperty(this, MAP, { value: map });
Object.defineProperty(this, SCALAR, { value: string });
Object.defineProperty(this, SEQ, { value: seq });
// Used by createMap()
this.sortMapEntries =
typeof sortMapEntries === 'function'
? sortMapEntries
: sortMapEntries === true
? sortMapEntriesByKey
: null;
}
clone() {
const copy = Object.create(Schema.prototype, Object.getOwnPropertyDescriptors(this));
copy.tags = this.tags.slice();
return copy;
}
}
export { Schema };
@@ -0,0 +1,153 @@
'use strict'
var PassThrough = require('readable-stream').PassThrough
var inherits = require('inherits')
var p = require('process-nextick-args')
function Cloneable (stream, opts) {
if (!(this instanceof Cloneable)) {
return new Cloneable(stream, opts)
}
var objectMode = stream._readableState.objectMode
this._original = stream
this._clonesCount = 1
opts = opts || {}
opts.objectMode = objectMode
PassThrough.call(this, opts)
forwardDestroy(stream, this)
this.on('newListener', onData)
this.once('resume', onResume)
this._hasListener = true
}
inherits(Cloneable, PassThrough)
function onData (event, listener) {
if (event === 'data' || event === 'readable') {
this._hasListener = false
this.removeListener('newListener', onData)
this.removeListener('resume', onResume)
p.nextTick(clonePiped, this)
}
}
function onResume () {
this._hasListener = false
this.removeListener('newListener', onData)
p.nextTick(clonePiped, this)
}
Cloneable.prototype.clone = function () {
if (!this._original) {
throw new Error('already started')
}
this._clonesCount++
// the events added by the clone should not count
// for starting the flow
this.removeListener('newListener', onData)
var clone = new Clone(this)
if (this._hasListener) {
this.on('newListener', onData)
}
return clone
}
Cloneable.prototype._destroy = function (err, cb) {
if (!err) {
this.push(null)
this.end()
this.emit('close')
}
p.nextTick(cb, err)
}
function forwardDestroy (src, dest) {
src.on('error', destroy)
src.on('close', onClose)
function destroy (err) {
src.removeListener('close', onClose)
dest.destroy(err)
}
function onClose () {
dest.end()
}
}
function clonePiped (that) {
if (--that._clonesCount === 0 && !that._readableState.destroyed) {
that._original.pipe(that)
that._original = undefined
}
}
function Clone (parent, opts) {
if (!(this instanceof Clone)) {
return new Clone(parent, opts)
}
var objectMode = parent._readableState.objectMode
opts = opts || {}
opts.objectMode = objectMode
this.parent = parent
PassThrough.call(this, opts)
forwardDestroy(parent, this)
parent.pipe(this)
// the events added by the clone should not count
// for starting the flow
// so we add the newListener handle after we are done
this.on('newListener', onDataClone)
this.on('resume', onResumeClone)
}
function onDataClone (event, listener) {
// We start the flow once all clones are piped or destroyed
if (event === 'data' || event === 'readable' || event === 'close') {
p.nextTick(clonePiped, this.parent)
this.removeListener('newListener', onDataClone)
}
}
function onResumeClone () {
this.removeListener('newListener', onDataClone)
p.nextTick(clonePiped, this.parent)
}
inherits(Clone, PassThrough)
Clone.prototype.clone = function () {
return this.parent.clone()
}
Cloneable.isCloneable = function (stream) {
return stream instanceof Cloneable || stream instanceof Clone
}
Clone.prototype._destroy = function (err, cb) {
if (!err) {
this.push(null)
this.end()
this.emit('close')
}
p.nextTick(cb, err)
}
module.exports = Cloneable
@@ -0,0 +1,24 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. 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
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
/// <reference lib="es2020" />
/// <reference lib="dom" />
/// <reference lib="webworker.importscripts" />
/// <reference lib="scripthost" />
/// <reference lib="dom.iterable" />
/// <reference lib="dom.asynciterable" />
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAIM,MAAM;IAiDX,CAAC,CAAC,OAAO,QAAQ,CAAC,GAA8B;QAC9C,OAAO,IAAI,CAAC,QAAQ;IACtB;IAEA,IAAI,OAAe;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI;IACzB;IAEA,UAAiC;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI;IACzB;IAEA,aAAa,GAAQ,EAAc;QACjC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;YACb;QAAd,OAAO,OAAO,CAAA,gBAAA,KAAK,OAAO,cAAZ,2BAAA,gBAAgB,OAAO;IACvC;IAEA,YAAY,GAAQ,EAAc;QAChC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;YACb;QAAd,OAAO,OAAO,CAAA,gBAAA,KAAK,OAAO,cAAZ,2BAAA,gBAAgB,OAAO;IACvC;IAEA,cAA0B;QACxB,OAAO,IAAI,CAAC,QAAQ;IACtB;IAEA,aAAyB;QACvB,OAAO,IAAI,CAAC,OAAO;IACrB;IAEA,QAAQ,GAAQ,EAAkB;YACzB;QAAP,OAAO,CAAA,mBAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAhB,8BAAA,mBAAwB;IACjC;IAEA,GAAG,GAAW,EAAkB;QAC9B,MAAM,OAAO;eAAI,IAAI,CAAC,OAAO;SAAG;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI;IAC/B;IAhFA,YAAY,KAAwB,EAAE,gBAAC,YAAY,EAA4B,GAAG,CAAC,CAAC,CAAE;aAL9E,SAA4B,IAAI;aAEhC,WAAuB;aACvB,UAAsB;QAG5B,IAAI,CAAC,QAAQ,GAAG;QAChB,eAAe,gBAAgB,IAAI;QAEnC,IAAI,QAAQ,CAAC;YACX,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE;YAE1B,IAAI,KAAK,UAAU,IAAK,CAAA,KAAK,IAAI,KAAK,aAAa,aAAa,GAAG,CAAC,KAAK,GAAG,CAAA,GAC1E,KAAK,IAAI,SAAS,KAAK,UAAU,CAC/B,MAAM;QAGZ;QAEA,KAAK,IAAI,QAAQ,MACf,MAAM;QAGR,IAAI,OAAuB;QAC3B,IAAI,QAAQ;QACZ,KAAK,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,CAAE;YACnC,IAAI,MAAM;gBACR,KAAK,OAAO,GAAG;gBACf,KAAK,OAAO,GAAG,KAAK,GAAG;YACzB,OAAO;gBACL,IAAI,CAAC,QAAQ,GAAG;gBAChB,KAAK,OAAO,GAAG;YACjB;YAEA,IAAI,KAAK,IAAI,KAAK,QAChB,KAAK,KAAK,GAAG;YAGf,OAAO;YAEP,6DAA6D;YAC7D,iFAAiF;YACjF,KAAK,OAAO,GAAG;QACjB;YAEe;QAAf,IAAI,CAAC,OAAO,GAAG,CAAA,YAAA,iBAAA,2BAAA,KAAM,GAAG,cAAT,uBAAA,YAAa;IAC9B;AAwCF","sources":["packages/@react-stately/tree/src/TreeCollection.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, Key, Node} from '@react-types/shared';\n\nexport class TreeCollection<T> implements Collection<Node<T>> {\n private keyMap: Map<Key, Node<T>> = new Map();\n private iterable: Iterable<Node<T>>;\n private firstKey: Key | null = null;\n private lastKey: Key | null = null;\n\n constructor(nodes: Iterable<Node<T>>, {expandedKeys}: {expandedKeys?: Set<Key>} = {}) {\n this.iterable = nodes;\n expandedKeys = expandedKeys || new Set();\n\n let visit = (node: Node<T>) => {\n this.keyMap.set(node.key, node);\n\n if (node.childNodes && (node.type === 'section' || expandedKeys.has(node.key))) {\n for (let child of node.childNodes) {\n visit(child);\n }\n }\n };\n\n for (let node of nodes) {\n visit(node);\n }\n\n let last: Node<T> | null = null;\n let index = 0;\n for (let [key, node] of this.keyMap) {\n if (last) {\n last.nextKey = key;\n node.prevKey = last.key;\n } else {\n this.firstKey = key;\n node.prevKey = undefined;\n }\n\n if (node.type === 'item') {\n node.index = index++;\n }\n\n last = node;\n\n // Set nextKey as undefined since this might be the last node\n // If it isn't the last node, last.nextKey will properly set at start of new loop\n last.nextKey = undefined;\n }\n\n this.lastKey = last?.key ?? null;\n }\n\n *[Symbol.iterator](): IterableIterator<Node<T>> {\n yield* this.iterable;\n }\n\n get size(): number {\n return this.keyMap.size;\n }\n\n getKeys(): IterableIterator<Key> {\n return this.keyMap.keys();\n }\n\n getKeyBefore(key: Key): Key | null {\n let node = this.keyMap.get(key);\n return node ? node.prevKey ?? null : null;\n }\n\n getKeyAfter(key: Key): Key | null {\n let node = this.keyMap.get(key);\n return node ? node.nextKey ?? null : null;\n }\n\n getFirstKey(): Key | null {\n return this.firstKey;\n }\n\n getLastKey(): Key | null {\n return this.lastKey;\n }\n\n getItem(key: Key): Node<T> | null {\n return this.keyMap.get(key) ?? null;\n }\n\n at(idx: number): Node<T> | null {\n const keys = [...this.getKeys()];\n return this.getItem(keys[idx]);\n }\n}\n"],"names":[],"version":3,"file":"TreeCollection.module.js.map"}
@@ -0,0 +1,143 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ class $16805b1b18093c5f$export$de3fdf6493c353d {
*[Symbol.iterator]() {
yield* [
...this.rows
];
}
get size() {
return [
...this.rows
].length;
}
getKeys() {
return this.keyMap.keys();
}
getKeyBefore(key) {
let node = this.keyMap.get(key);
var _node_prevKey;
return node ? (_node_prevKey = node.prevKey) !== null && _node_prevKey !== void 0 ? _node_prevKey : null : null;
}
getKeyAfter(key) {
let node = this.keyMap.get(key);
var _node_nextKey;
return node ? (_node_nextKey = node.nextKey) !== null && _node_nextKey !== void 0 ? _node_nextKey : null : null;
}
getFirstKey() {
var _;
return (_ = [
...this.rows
][0]) === null || _ === void 0 ? void 0 : _.key;
}
getLastKey() {
var _rows_;
let rows = [
...this.rows
];
return (_rows_ = rows[rows.length - 1]) === null || _rows_ === void 0 ? void 0 : _rows_.key;
}
getItem(key) {
var _this_keyMap_get;
return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
}
at(idx) {
const keys = [
...this.getKeys()
];
return this.getItem(keys[idx]);
}
getChildren(key) {
let node = this.keyMap.get(key);
return (node === null || node === void 0 ? void 0 : node.childNodes) || [];
}
constructor(opts){
this.keyMap = new Map();
this.keyMap = new Map();
this.columnCount = opts === null || opts === void 0 ? void 0 : opts.columnCount;
this.rows = [];
let visit = (node)=>{
// If the node is the same object as the previous node for the same key,
// we can skip this node and its children. We always visit columns though,
// because we depend on order to build the columns array.
let prevNode = this.keyMap.get(node.key);
if (opts.visitNode) node = opts.visitNode(node);
this.keyMap.set(node.key, node);
let childKeys = new Set();
let last = null;
let rowHasCellWithColSpan = false;
if (node.type === 'item') {
var _child_props;
for (let child of node.childNodes)if (((_child_props = child.props) === null || _child_props === void 0 ? void 0 : _child_props.colSpan) !== undefined) {
rowHasCellWithColSpan = true;
break;
}
}
for (let child of node.childNodes){
if (child.type === 'cell' && rowHasCellWithColSpan) {
var _child_props1, _child_props2;
child.colspan = (_child_props1 = child.props) === null || _child_props1 === void 0 ? void 0 : _child_props1.colSpan;
child.colSpan = (_child_props2 = child.props) === null || _child_props2 === void 0 ? void 0 : _child_props2.colSpan;
var _last_colIndex, _last_colSpan;
child.colIndex = !last ? child.index : ((_last_colIndex = last.colIndex) !== null && _last_colIndex !== void 0 ? _last_colIndex : last.index) + ((_last_colSpan = last.colSpan) !== null && _last_colSpan !== void 0 ? _last_colSpan : 1);
}
if (child.type === 'cell' && child.parentKey == null) // if child is a cell parent key isn't already established by the collection, match child node to parent row
child.parentKey = node.key;
childKeys.add(child.key);
if (last) {
last.nextKey = child.key;
child.prevKey = last.key;
} else child.prevKey = null;
visit(child);
last = child;
}
if (last) last.nextKey = null;
// Remove deleted nodes and their children from the key map
if (prevNode) {
for (let child of prevNode.childNodes)if (!childKeys.has(child.key)) remove(child);
}
};
let remove = (node)=>{
this.keyMap.delete(node.key);
for (let child of node.childNodes)if (this.keyMap.get(child.key) === child) remove(child);
};
let last = null;
for (let [i, node] of opts.items.entries()){
var _node_level, _node_key, _node_type, _node_value, _node_textValue, _node_index;
let rowNode = {
...node,
level: (_node_level = node.level) !== null && _node_level !== void 0 ? _node_level : 0,
key: (_node_key = node.key) !== null && _node_key !== void 0 ? _node_key : 'row-' + i,
type: (_node_type = node.type) !== null && _node_type !== void 0 ? _node_type : 'row',
value: (_node_value = node.value) !== null && _node_value !== void 0 ? _node_value : null,
hasChildNodes: true,
childNodes: [
...node.childNodes
],
rendered: node.rendered,
textValue: (_node_textValue = node.textValue) !== null && _node_textValue !== void 0 ? _node_textValue : '',
index: (_node_index = node.index) !== null && _node_index !== void 0 ? _node_index : i
};
if (last) {
last.nextKey = rowNode.key;
rowNode.prevKey = last.key;
} else rowNode.prevKey = null;
this.rows.push(rowNode);
visit(rowNode);
last = rowNode;
}
if (last) last.nextKey = null;
}
}
export {$16805b1b18093c5f$export$de3fdf6493c353d as GridCollection};
//# sourceMappingURL=GridCollection.module.js.map
@@ -0,0 +1,98 @@
# stack-trace
Get v8 stack traces as an array of CallSite objects.
## Install
``` bash
npm install stack-trace
```
## Usage
The stack-trace module makes it easy for you to capture the current stack:
``` javascript
var stackTrace = require('stack-trace');
var trace = stackTrace.get();
require('assert').strictEqual(trace[0].getFileName(), __filename);
```
However, sometimes you have already popped the stack you are interested in,
and all you have left is an `Error` object. This module can help:
``` javascript
var stackTrace = require('stack-trace');
var err = new Error('something went wrong');
var trace = stackTrace.parse(err);
require('assert').strictEqual(trace[0].getFileName(), __filename);
```
Please note that parsing the `Error#stack` property is not perfect, only
certain properties can be retrieved with it as noted in the API docs below.
## Long stack traces
stack-trace works great with [long-stack-traces][], when parsing an `err.stack`
that has crossed the event loop boundary, a `CallSite` object returning
`'----------------------------------------'` for `getFileName()` is created.
All other methods of the event loop boundary call site return `null`.
[long-stack-traces]: https://github.com/tlrobinson/long-stack-traces
## API
### stackTrace.get([belowFn])
Returns an array of `CallSite` objects, where element `0` is the current call
site.
When passing a function on the current stack as the `belowFn` parameter, the
returned array will only include `CallSite` objects below this function.
### stackTrace.parse(err)
Parses the `err.stack` property of an `Error` object into an array compatible
with those returned by `stackTrace.get()`. However, only the following methods
are implemented on the returned `CallSite` objects.
* getTypeName
* getFunctionName
* getMethodName
* getFileName
* getLineNumber
* getColumnNumber
* isNative
Note: Except `getFunctionName()`, all of the above methods return exactly the
same values as you would get from `stackTrace.get()`. `getFunctionName()`
is sometimes a little different, but still useful.
### CallSite
The official v8 CallSite object API can be found [here][v8stackapi]. A quick
excerpt:
> A CallSite object defines the following methods:
>
> * **getThis**: returns the value of this
> * **getTypeName**: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property.
> * **getFunction**: returns the current function
> * **getFunctionName**: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context.
> * **getMethodName**: returns the name of the property of this or one of its prototypes that holds the current function
> * **getFileName**: if this function was defined in a script returns the name of the script
> * **getLineNumber**: if this function was defined in a script returns the current line number
> * **getColumnNumber**: if this function was defined in a script returns the current column number
> * **getEvalOrigin**: if this function was created using a call to eval returns a CallSite object representing the location where eval was called
> * **isToplevel**: is this a toplevel invocation, that is, is this the global object?
> * **isEval**: does this call take place in code defined by a call to eval?
> * **isNative**: is this call in native V8 code?
> * **isConstructor**: is this a constructor call?
[v8stackapi]: http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
## License
stack-trace is licensed under the MIT license.
@@ -0,0 +1,2 @@
import type * as ts from 'typescript';
export declare function typeDeclaredInFile(relativePath: string | undefined, declarationFiles: ts.SourceFile[], program: ts.Program): boolean;
@@ -0,0 +1,29 @@
type indexBrowserType = typeof import("./index-browser");
type indexType = typeof import("./index");
// Kind of gross, but essentially asserting that the exports of this module are the same as the
// exports of index-browser, since this file may be replaced at bundle time with index-browser.
({}) as any as indexBrowserType as indexType;
export { findPackageData } from "./package.ts";
export {
findConfigUpwards,
findRelativeConfig,
findRootConfig,
loadConfig,
resolveShowConfigPath,
ROOT_CONFIG_FILENAMES,
} from "./configuration.ts";
export type {
ConfigFile,
IgnoreFile,
RelativeConfig,
FilePackageData,
} from "./types.ts";
export {
loadPlugin,
loadPreset,
resolvePlugin,
resolvePreset,
} from "./plugins.ts";
@@ -0,0 +1,195 @@
'use strict';
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
function compose() {
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
fns[_key] = arguments[_key];
}
return function (x) {
return fns.reduceRight(function (y, f) {
return f(y);
}, x);
};
}
function curry(fn) {
return function curried() {
var _this = this;
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return args.length >= fn.length ? fn.apply(this, args) : function () {
for (var _len3 = arguments.length, nextArgs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
nextArgs[_key3] = arguments[_key3];
}
return curried.apply(_this, [].concat(args, nextArgs));
};
};
}
function isObject(value) {
return {}.toString.call(value).includes('Object');
}
function isEmpty(obj) {
return !Object.keys(obj).length;
}
function isFunction(value) {
return typeof value === 'function';
}
function hasOwnProperty(object, property) {
return Object.prototype.hasOwnProperty.call(object, property);
}
function validateChanges(initial, changes) {
if (!isObject(changes)) errorHandler('changeType');
if (Object.keys(changes).some(function (field) {
return !hasOwnProperty(initial, field);
})) errorHandler('changeField');
return changes;
}
function validateSelector(selector) {
if (!isFunction(selector)) errorHandler('selectorType');
}
function validateHandler(handler) {
if (!(isFunction(handler) || isObject(handler))) errorHandler('handlerType');
if (isObject(handler) && Object.values(handler).some(function (_handler) {
return !isFunction(_handler);
})) errorHandler('handlersType');
}
function validateInitial(initial) {
if (!initial) errorHandler('initialIsRequired');
if (!isObject(initial)) errorHandler('initialType');
if (isEmpty(initial)) errorHandler('initialContent');
}
function throwError(errorMessages, type) {
throw new Error(errorMessages[type] || errorMessages["default"]);
}
var errorMessages = {
initialIsRequired: 'initial state is required',
initialType: 'initial state should be an object',
initialContent: 'initial state shouldn\'t be an empty object',
handlerType: 'handler should be an object or a function',
handlersType: 'all handlers should be a functions',
selectorType: 'selector should be a function',
changeType: 'provided value of changes should be an object',
changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state',
"default": 'an unknown error accured in `state-local` package'
};
var errorHandler = curry(throwError)(errorMessages);
var validators = {
changes: validateChanges,
selector: validateSelector,
handler: validateHandler,
initial: validateInitial
};
function create(initial) {
var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
validators.initial(initial);
validators.handler(handler);
var state = {
current: initial
};
var didUpdate = curry(didStateUpdate)(state, handler);
var update = curry(updateState)(state);
var validate = curry(validators.changes)(initial);
var getChanges = curry(extractChanges)(state);
function getState() {
var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) {
return state;
};
validators.selector(selector);
return selector(state.current);
}
function setState(causedChanges) {
compose(didUpdate, update, validate, getChanges)(causedChanges);
}
return [getState, setState];
}
function extractChanges(state, causedChanges) {
return isFunction(causedChanges) ? causedChanges(state.current) : causedChanges;
}
function updateState(state, changes) {
state.current = _objectSpread2(_objectSpread2({}, state.current), changes);
return changes;
}
function didStateUpdate(state, handler, changes) {
isFunction(handler) ? handler(state.current) : Object.keys(changes).forEach(function (field) {
var _handler$field;
return (_handler$field = handler[field]) === null || _handler$field === void 0 ? void 0 : _handler$field.call(handler, state.current[field]);
});
return changes;
}
var index = {
create: create
};
module.exports = index;
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 ECMAScript Shims
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,10 @@
// Generated using scripts/write-encode-map.ts
function restoreDiff(array) {
for (let index = 1; index < array.length; index++) {
array[index][0] += array[index - 1][0] + 1;
}
return array;
}
// prettier-ignore
export const htmlTrie = /* #__PURE__ */ new Map(/* #__PURE__ */ restoreDiff([[9, "&Tab;"], [0, "&NewLine;"], [22, "&excl;"], [0, "&quot;"], [0, "&num;"], [0, "&dollar;"], [0, "&percnt;"], [0, "&amp;"], [0, "&apos;"], [0, "&lpar;"], [0, "&rpar;"], [0, "&ast;"], [0, "&plus;"], [0, "&comma;"], [1, "&period;"], [0, "&sol;"], [10, "&colon;"], [0, "&semi;"], [0, { v: "&lt;", n: 8402, o: "&nvlt;" }], [0, { v: "&equals;", n: 8421, o: "&bne;" }], [0, { v: "&gt;", n: 8402, o: "&nvgt;" }], [0, "&quest;"], [0, "&commat;"], [26, "&lbrack;"], [0, "&bsol;"], [0, "&rbrack;"], [0, "&Hat;"], [0, "&lowbar;"], [0, "&DiacriticalGrave;"], [5, { n: 106, o: "&fjlig;" }], [20, "&lbrace;"], [0, "&verbar;"], [0, "&rbrace;"], [34, "&nbsp;"], [0, "&iexcl;"], [0, "&cent;"], [0, "&pound;"], [0, "&curren;"], [0, "&yen;"], [0, "&brvbar;"], [0, "&sect;"], [0, "&die;"], [0, "&copy;"], [0, "&ordf;"], [0, "&laquo;"], [0, "&not;"], [0, "&shy;"], [0, "&circledR;"], [0, "&macr;"], [0, "&deg;"], [0, "&PlusMinus;"], [0, "&sup2;"], [0, "&sup3;"], [0, "&acute;"], [0, "&micro;"], [0, "&para;"], [0, "&centerdot;"], [0, "&cedil;"], [0, "&sup1;"], [0, "&ordm;"], [0, "&raquo;"], [0, "&frac14;"], [0, "&frac12;"], [0, "&frac34;"], [0, "&iquest;"], [0, "&Agrave;"], [0, "&Aacute;"], [0, "&Acirc;"], [0, "&Atilde;"], [0, "&Auml;"], [0, "&angst;"], [0, "&AElig;"], [0, "&Ccedil;"], [0, "&Egrave;"], [0, "&Eacute;"], [0, "&Ecirc;"], [0, "&Euml;"], [0, "&Igrave;"], [0, "&Iacute;"], [0, "&Icirc;"], [0, "&Iuml;"], [0, "&ETH;"], [0, "&Ntilde;"], [0, "&Ograve;"], [0, "&Oacute;"], [0, "&Ocirc;"], [0, "&Otilde;"], [0, "&Ouml;"], [0, "&times;"], [0, "&Oslash;"], [0, "&Ugrave;"], [0, "&Uacute;"], [0, "&Ucirc;"], [0, "&Uuml;"], [0, "&Yacute;"], [0, "&THORN;"], [0, "&szlig;"], [0, "&agrave;"], [0, "&aacute;"], [0, "&acirc;"], [0, "&atilde;"], [0, "&auml;"], [0, "&aring;"], [0, "&aelig;"], [0, "&ccedil;"], [0, "&egrave;"], [0, "&eacute;"], [0, "&ecirc;"], [0, "&euml;"], [0, "&igrave;"], [0, "&iacute;"], [0, "&icirc;"], [0, "&iuml;"], [0, "&eth;"], [0, "&ntilde;"], [0, "&ograve;"], [0, "&oacute;"], [0, "&ocirc;"], [0, "&otilde;"], [0, "&ouml;"], [0, "&div;"], [0, "&oslash;"], [0, "&ugrave;"], [0, "&uacute;"], [0, "&ucirc;"], [0, "&uuml;"], [0, "&yacute;"], [0, "&thorn;"], [0, "&yuml;"], [0, "&Amacr;"], [0, "&amacr;"], [0, "&Abreve;"], [0, "&abreve;"], [0, "&Aogon;"], [0, "&aogon;"], [0, "&Cacute;"], [0, "&cacute;"], [0, "&Ccirc;"], [0, "&ccirc;"], [0, "&Cdot;"], [0, "&cdot;"], [0, "&Ccaron;"], [0, "&ccaron;"], [0, "&Dcaron;"], [0, "&dcaron;"], [0, "&Dstrok;"], [0, "&dstrok;"], [0, "&Emacr;"], [0, "&emacr;"], [2, "&Edot;"], [0, "&edot;"], [0, "&Eogon;"], [0, "&eogon;"], [0, "&Ecaron;"], [0, "&ecaron;"], [0, "&Gcirc;"], [0, "&gcirc;"], [0, "&Gbreve;"], [0, "&gbreve;"], [0, "&Gdot;"], [0, "&gdot;"], [0, "&Gcedil;"], [1, "&Hcirc;"], [0, "&hcirc;"], [0, "&Hstrok;"], [0, "&hstrok;"], [0, "&Itilde;"], [0, "&itilde;"], [0, "&Imacr;"], [0, "&imacr;"], [2, "&Iogon;"], [0, "&iogon;"], [0, "&Idot;"], [0, "&imath;"], [0, "&IJlig;"], [0, "&ijlig;"], [0, "&Jcirc;"], [0, "&jcirc;"], [0, "&Kcedil;"], [0, "&kcedil;"], [0, "&kgreen;"], [0, "&Lacute;"], [0, "&lacute;"], [0, "&Lcedil;"], [0, "&lcedil;"], [0, "&Lcaron;"], [0, "&lcaron;"], [0, "&Lmidot;"], [0, "&lmidot;"], [0, "&Lstrok;"], [0, "&lstrok;"], [0, "&Nacute;"], [0, "&nacute;"], [0, "&Ncedil;"], [0, "&ncedil;"], [0, "&Ncaron;"], [0, "&ncaron;"], [0, "&napos;"], [0, "&ENG;"], [0, "&eng;"], [0, "&Omacr;"], [0, "&omacr;"], [2, "&Odblac;"], [0, "&odblac;"], [0, "&OElig;"], [0, "&oelig;"], [0, "&Racute;"], [0, "&racute;"], [0, "&Rcedil;"], [0, "&rcedil;"], [0, "&Rcaron;"], [0, "&rcaron;"], [0, "&Sacute;"], [0, "&sacute;"], [0, "&Scirc;"], [0, "&scirc;"], [0, "&Scedil;"], [0, "&scedil;"], [0, "&Scaron;"], [0, "&scaron;"], [0, "&Tcedil;"], [0, "&tcedil;"], [0, "&Tcaron;"], [0, "&tcaron;"], [0, "&Tstrok;"], [0, "&tstrok;"], [0, "&Utilde;"], [0, "&utilde;"], [0, "&Umacr;"], [0, "&umacr;"], [0, "&Ubreve;"], [0, "&ubreve;"], [0, "&Uring;"], [0, "&uring;"], [0, "&Udblac;"], [0, "&udblac;"], [0, "&Uogon;"], [0, "&uogon;"], [0, "&Wcirc;"], [0, "&wcirc;"], [0, "&Ycirc;"], [0, "&ycirc;"], [0, "&Yuml;"], [0, "&Zacute;"], [0, "&zacute;"], [0, "&Zdot;"], [0, "&zdot;"], [0, "&Zcaron;"], [0, "&zcaron;"], [19, "&fnof;"], [34, "&imped;"], [63, "&gacute;"], [65, "&jmath;"], [142, "&circ;"], [0, "&caron;"], [16, "&breve;"], [0, "&DiacriticalDot;"], [0, "&ring;"], [0, "&ogon;"], [0, "&DiacriticalTilde;"], [0, "&dblac;"], [51, "&DownBreve;"], [127, "&Alpha;"], [0, "&Beta;"], [0, "&Gamma;"], [0, "&Delta;"], [0, "&Epsilon;"], [0, "&Zeta;"], [0, "&Eta;"], [0, "&Theta;"], [0, "&Iota;"], [0, "&Kappa;"], [0, "&Lambda;"], [0, "&Mu;"], [0, "&Nu;"], [0, "&Xi;"], [0, "&Omicron;"], [0, "&Pi;"], [0, "&Rho;"], [1, "&Sigma;"], [0, "&Tau;"], [0, "&Upsilon;"], [0, "&Phi;"], [0, "&Chi;"], [0, "&Psi;"], [0, "&ohm;"], [7, "&alpha;"], [0, "&beta;"], [0, "&gamma;"], [0, "&delta;"], [0, "&epsi;"], [0, "&zeta;"], [0, "&eta;"], [0, "&theta;"], [0, "&iota;"], [0, "&kappa;"], [0, "&lambda;"Line truncated
//# sourceMappingURL=encode-html.js.map
@@ -0,0 +1,155 @@
declare const _default: {
extends: string[];
rules: {
'@typescript-eslint/adjacent-overload-signatures': "error";
'@typescript-eslint/array-type': "error";
'@typescript-eslint/await-thenable': "error";
'@typescript-eslint/ban-ts-comment': "error";
'@typescript-eslint/ban-tslint-comment': "error";
'@typescript-eslint/class-literal-property-style': "error";
'class-methods-use-this': "off";
'@typescript-eslint/class-methods-use-this': "error";
'@typescript-eslint/consistent-generic-constructors': "error";
'@typescript-eslint/consistent-indexed-object-style': "error";
'consistent-return': "off";
'@typescript-eslint/consistent-return': "error";
'@typescript-eslint/consistent-type-assertions': "error";
'@typescript-eslint/consistent-type-definitions': "error";
'@typescript-eslint/consistent-type-exports': "error";
'@typescript-eslint/consistent-type-imports': "error";
'default-param-last': "off";
'@typescript-eslint/default-param-last': "error";
'dot-notation': "off";
'@typescript-eslint/dot-notation': "error";
'@typescript-eslint/explicit-function-return-type': "error";
'@typescript-eslint/explicit-member-accessibility': "error";
'@typescript-eslint/explicit-module-boundary-types': "error";
'init-declarations': "off";
'@typescript-eslint/init-declarations': "error";
'max-params': "off";
'@typescript-eslint/max-params': "error";
'@typescript-eslint/member-ordering': "error";
'@typescript-eslint/method-signature-style': "error";
'@typescript-eslint/naming-convention': "error";
'no-array-constructor': "off";
'@typescript-eslint/no-array-constructor': "error";
'@typescript-eslint/no-array-delete': "error";
'@typescript-eslint/no-base-to-string': "error";
'@typescript-eslint/no-confusing-non-null-assertion': "error";
'@typescript-eslint/no-confusing-void-expression': "error";
'@typescript-eslint/no-deprecated': "error";
'no-dupe-class-members': "off";
'@typescript-eslint/no-dupe-class-members': "error";
'@typescript-eslint/no-duplicate-enum-values': "error";
'@typescript-eslint/no-duplicate-type-constituents': "error";
'@typescript-eslint/no-dynamic-delete': "error";
'no-empty-function': "off";
'@typescript-eslint/no-empty-function': "error";
'@typescript-eslint/no-empty-object-type': "error";
'@typescript-eslint/no-explicit-any': "error";
'@typescript-eslint/no-extra-non-null-assertion': "error";
'@typescript-eslint/no-extraneous-class': "error";
'@typescript-eslint/no-floating-promises': "error";
'@typescript-eslint/no-for-in-array': "error";
'no-implied-eval': "off";
'@typescript-eslint/no-implied-eval': "error";
'@typescript-eslint/no-import-type-side-effects': "error";
'@typescript-eslint/no-inferrable-types': "error";
'no-invalid-this': "off";
'@typescript-eslint/no-invalid-this': "error";
'@typescript-eslint/no-invalid-void-type': "error";
'no-loop-func': "off";
'@typescript-eslint/no-loop-func': "error";
'no-magic-numbers': "off";
'@typescript-eslint/no-magic-numbers': "error";
'@typescript-eslint/no-meaningless-void-operator': "error";
'@typescript-eslint/no-misused-new': "error";
'@typescript-eslint/no-misused-promises': "error";
'@typescript-eslint/no-misused-spread': "error";
'@typescript-eslint/no-mixed-enums': "error";
'@typescript-eslint/no-namespace': "error";
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': "error";
'@typescript-eslint/no-non-null-asserted-optional-chain': "error";
'@typescript-eslint/no-non-null-assertion': "error";
'no-redeclare': "off";
'@typescript-eslint/no-redeclare': "error";
'@typescript-eslint/no-redundant-type-constituents': "error";
'@typescript-eslint/no-require-imports': "error";
'no-restricted-imports': "off";
'@typescript-eslint/no-restricted-imports': "error";
'@typescript-eslint/no-restricted-types': "error";
'no-shadow': "off";
'@typescript-eslint/no-shadow': "error";
'@typescript-eslint/no-this-alias': "error";
'@typescript-eslint/no-unnecessary-boolean-literal-compare': "error";
'@typescript-eslint/no-unnecessary-condition': "error";
'@typescript-eslint/no-unnecessary-parameter-property-assignment': "error";
'@typescript-eslint/no-unnecessary-qualifier': "error";
'@typescript-eslint/no-unnecessary-template-expression': "error";
'@typescript-eslint/no-unnecessary-type-arguments': "error";
'@typescript-eslint/no-unnecessary-type-assertion': "error";
'@typescript-eslint/no-unnecessary-type-constraint': "error";
'@typescript-eslint/no-unnecessary-type-conversion': "error";
'@typescript-eslint/no-unnecessary-type-parameters': "error";
'@typescript-eslint/no-unsafe-argument': "error";
'@typescript-eslint/no-unsafe-assignment': "error";
'@typescript-eslint/no-unsafe-call': "error";
'@typescript-eslint/no-unsafe-declaration-merging': "error";
'@typescript-eslint/no-unsafe-enum-comparison': "error";
'@typescript-eslint/no-unsafe-function-type': "error";
'@typescript-eslint/no-unsafe-member-access': "error";
'@typescript-eslint/no-unsafe-return': "error";
'@typescript-eslint/no-unsafe-type-assertion': "error";
'@typescript-eslint/no-unsafe-unary-minus': "error";
'no-unused-expressions': "off";
'@typescript-eslint/no-unused-expressions': "error";
'no-unused-vars': "off";
'@typescript-eslint/no-unused-vars': "error";
'no-use-before-define': "off";
'@typescript-eslint/no-use-before-define': "error";
'no-useless-constructor': "off";
'@typescript-eslint/no-useless-constructor': "error";
'@typescript-eslint/no-useless-empty-export': "error";
'@typescript-eslint/no-wrapper-object-types': "error";
'@typescript-eslint/non-nullable-type-assertion-style': "error";
'no-throw-literal': "off";
'@typescript-eslint/only-throw-error': "error";
'@typescript-eslint/parameter-properties': "error";
'@typescript-eslint/prefer-as-const': "error";
'prefer-destructuring': "off";
'@typescript-eslint/prefer-destructuring': "error";
'@typescript-eslint/prefer-enum-initializers': "error";
'@typescript-eslint/prefer-find': "error";
'@typescript-eslint/prefer-for-of': "error";
'@typescript-eslint/prefer-function-type': "error";
'@typescript-eslint/prefer-includes': "error";
'@typescript-eslint/prefer-literal-enum-member': "error";
'@typescript-eslint/prefer-namespace-keyword': "error";
'@typescript-eslint/prefer-nullish-coalescing': "error";
'@typescript-eslint/prefer-optional-chain': "error";
'prefer-promise-reject-errors': "off";
'@typescript-eslint/prefer-promise-reject-errors': "error";
'@typescript-eslint/prefer-readonly': "error";
'@typescript-eslint/prefer-readonly-parameter-types': "error";
'@typescript-eslint/prefer-reduce-type-parameter': "error";
'@typescript-eslint/prefer-regexp-exec': "error";
'@typescript-eslint/prefer-return-this-type': "error";
'@typescript-eslint/prefer-string-starts-ends-with': "error";
'@typescript-eslint/promise-function-async': "error";
'@typescript-eslint/related-getter-setter-pairs': "error";
'@typescript-eslint/require-array-sort-compare': "error";
'require-await': "off";
'@typescript-eslint/require-await': "error";
'@typescript-eslint/restrict-plus-operands': "error";
'@typescript-eslint/restrict-template-expressions': "error";
'no-return-await': "off";
'@typescript-eslint/return-await': "error";
'@typescript-eslint/strict-boolean-expressions': "error";
'@typescript-eslint/switch-exhaustiveness-check': "error";
'@typescript-eslint/triple-slash-reference': "error";
'@typescript-eslint/unbound-method': "error";
'@typescript-eslint/unified-signatures': "error";
'@typescript-eslint/use-unknown-in-catch-callback-variable': "error";
};
};
export = _default;
@@ -0,0 +1,22 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.TYPE_VALUE = exports.VALUE = exports.TYPE = void 0;
exports.TYPE = Object.freeze({
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
});
exports.VALUE = Object.freeze({
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: false,
isValueVariable: true,
});
exports.TYPE_VALUE = Object.freeze({
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: true,
});
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_ts_metadata.cjs",
"module": "../../esm/_ts_metadata.js"
}
@@ -0,0 +1,690 @@
/*********************************************************************
* NAN - Native Abstractions for Node.js
*
* Copyright (c) 2018 NAN contributors
*
* MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
********************************************************************/
#ifndef NAN_CALLBACKS_12_INL_H_
#define NAN_CALLBACKS_12_INL_H_
template<typename T>
class ReturnValue {
v8::ReturnValue<T> value_;
public:
template <class S>
explicit inline ReturnValue(const v8::ReturnValue<S> &value) :
value_(value) {}
template <class S>
explicit inline ReturnValue(const ReturnValue<S>& that)
: value_(that.value_) {
TYPE_CHECK(T, S);
}
// Handle setters
template <typename S> inline void Set(const v8::Local<S> &handle) {
TYPE_CHECK(T, S);
value_.Set(handle);
}
template <typename S> inline void Set(const Global<S> &handle) {
TYPE_CHECK(T, S);
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \
(V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && \
(V8_MINOR_VERSION > 5 || (V8_MINOR_VERSION == 5 && \
defined(V8_BUILD_NUMBER) && V8_BUILD_NUMBER >= 8))))
value_.Set(handle);
#else
value_.Set(*reinterpret_cast<const v8::Persistent<S>*>(&handle));
const_cast<Global<S> &>(handle).Reset();
#endif
}
// Fast primitive setters
inline void Set(bool value) {
TYPE_CHECK(T, v8::Boolean);
value_.Set(value);
}
inline void Set(double i) {
TYPE_CHECK(T, v8::Number);
value_.Set(i);
}
inline void Set(int32_t i) {
TYPE_CHECK(T, v8::Integer);
value_.Set(i);
}
inline void Set(uint32_t i) {
TYPE_CHECK(T, v8::Integer);
value_.Set(i);
}
// Fast JS primitive setters
inline void SetNull() {
TYPE_CHECK(T, v8::Primitive);
value_.SetNull();
}
inline void SetUndefined() {
TYPE_CHECK(T, v8::Primitive);
value_.SetUndefined();
}
inline void SetEmptyString() {
TYPE_CHECK(T, v8::String);
value_.SetEmptyString();
}
// Convenience getter for isolate
inline v8::Isolate *GetIsolate() const {
return value_.GetIsolate();
}
// Pointer setter: Uncompilable to prevent inadvertent misuse.
template<typename S>
inline void Set(S *whatever) { TYPE_CHECK(S*, v8::Primitive); }
};
template<typename T>
class FunctionCallbackInfo {
const v8::FunctionCallbackInfo<T> &info_;
const v8::Local<v8::Value> data_;
public:
explicit inline FunctionCallbackInfo(
const v8::FunctionCallbackInfo<T> &info
, v8::Local<v8::Value> data) :
info_(info)
, data_(data) {}
inline ReturnValue<T> GetReturnValue() const {
return ReturnValue<T>(info_.GetReturnValue());
}
#if NODE_MAJOR_VERSION < 10
NAN_DEPRECATED inline v8::Local<v8::Function> Callee() const {
return info_.Callee();
}
#endif
inline v8::Local<v8::Value> Data() const { return data_; }
inline v8::Local<v8::Object> Holder() const {
#if defined(V8_MAJOR_VERSION) && \
(V8_MAJOR_VERSION > 12 || \
(V8_MAJOR_VERSION == 12 && \
(defined(V8_MINOR_VERSION) && \
(V8_MINOR_VERSION > 5 || \
(V8_MINOR_VERSION == 5 && defined(V8_BUILD_NUMBER) && \
V8_BUILD_NUMBER >= 214)))))
return info_.This();
#else
return info_.Holder();
#endif
}
inline bool IsConstructCall() const { return info_.IsConstructCall(); }
inline int Length() const { return info_.Length(); }
inline v8::Local<v8::Value> operator[](int i) const { return info_[i]; }
inline v8::Local<v8::Object> This() const { return info_.This(); }
inline v8::Isolate *GetIsolate() const { return info_.GetIsolate(); }
protected:
static const int kHolderIndex = 0;
static const int kIsolateIndex = 1;
static const int kReturnValueDefaultValueIndex = 2;
static const int kReturnValueIndex = 3;
static const int kDataIndex = 4;
static const int kCalleeIndex = 5;
static const int kContextSaveIndex = 6;
static const int kArgsLength = 7;
private:
NAN_DISALLOW_ASSIGN_COPY_MOVE(FunctionCallbackInfo)
};
template<typename T>
class PropertyCallbackInfo {
const v8::PropertyCallbackInfo<T> &info_;
const v8::Local<v8::Value> data_;
public:
explicit inline PropertyCallbackInfo(
const v8::PropertyCallbackInfo<T> &info
, const v8::Local<v8::Value> data) :
info_(info)
, data_(data) {}
inline v8::Isolate* GetIsolate() const { return info_.GetIsolate(); }
inline v8::Local<v8::Value> Data() const { return data_; }
inline v8::Local<v8::Object> This() const { return info_.This(); }
inline v8::Local<v8::Object> Holder() const { return info_.Holder(); }
inline ReturnValue<T> GetReturnValue() const {
return ReturnValue<T>(info_.GetReturnValue());
}
protected:
static const int kHolderIndex = 0;
static const int kIsolateIndex = 1;
static const int kReturnValueDefaultValueIndex = 2;
static const int kReturnValueIndex = 3;
static const int kDataIndex = 4;
static const int kThisIndex = 5;
static const int kArgsLength = 6;
private:
NAN_DISALLOW_ASSIGN_COPY_MOVE(PropertyCallbackInfo)
};
namespace imp {
static
void FunctionCallbackWrapper(const v8::FunctionCallbackInfo<v8::Value> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
FunctionCallback callback = reinterpret_cast<FunctionCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kFunctionIndex)
.As<v8::Value>().As<v8::External>()->Value()));
FunctionCallbackInfo<v8::Value>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
callback(cbinfo);
}
typedef void (*NativeFunction)(const v8::FunctionCallbackInfo<v8::Value> &);
#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION
static
void GetterCallbackWrapper(
v8::Local<v8::Name> property
, const v8::PropertyCallbackInfo<v8::Value> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Value>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
GetterCallback callback = reinterpret_cast<GetterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kGetterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(property.As<v8::String>(), cbinfo);
}
typedef void (*NativeGetter)
(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &);
static
void SetterCallbackWrapper(
v8::Local<v8::Name> property
, v8::Local<v8::Value> value
, const v8::PropertyCallbackInfo<void> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<void>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
SetterCallback callback = reinterpret_cast<SetterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kSetterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(property.As<v8::String>(), value, cbinfo);
}
typedef void (*NativeSetter)(
v8::Local<v8::Name>
, v8::Local<v8::Value>
, const v8::PropertyCallbackInfo<void> &);
#else
static
void GetterCallbackWrapper(
v8::Local<v8::String> property
, const v8::PropertyCallbackInfo<v8::Value> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Value>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
GetterCallback callback = reinterpret_cast<GetterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kGetterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(property, cbinfo);
}
typedef void (*NativeGetter)
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value> &);
static
void SetterCallbackWrapper(
v8::Local<v8::String> property
, v8::Local<v8::Value> value
, const v8::PropertyCallbackInfo<void> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<void>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
SetterCallback callback = reinterpret_cast<SetterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kSetterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(property, value, cbinfo);
}
typedef void (*NativeSetter)(
v8::Local<v8::String>
, v8::Local<v8::Value>
, const v8::PropertyCallbackInfo<void> &);
#endif
#if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 || \
(V8_MAJOR_VERSION == 12 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION > 4))
static
v8::Intercepted PropertyGetterCallbackWrapper(
v8::Local<v8::Name> property
, const v8::PropertyCallbackInfo<v8::Value> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Value>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
PropertyGetterCallback callback = reinterpret_cast<PropertyGetterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kPropertyGetterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
return callback(property.As<v8::String>(), cbinfo);
}
typedef v8::Intercepted (*NativePropertyGetter)
(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &);
static
v8::Intercepted PropertySetterCallbackWrapper(
v8::Local<v8::Name> property
, v8::Local<v8::Value> value
, const v8::PropertyCallbackInfo<void> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<void>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
PropertySetterCallback callback = reinterpret_cast<PropertySetterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kPropertySetterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
return callback(property.As<v8::String>(), value, cbinfo);
}
typedef v8::Intercepted (*NativePropertySetter)(
v8::Local<v8::Name>
, v8::Local<v8::Value>
, const v8::PropertyCallbackInfo<void> &);
#else
static
void PropertyGetterCallbackWrapper(
v8::Local<v8::Name> property
, const v8::PropertyCallbackInfo<v8::Value> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Value>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
PropertyGetterCallback callback = reinterpret_cast<PropertyGetterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kPropertyGetterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(property.As<v8::String>(), cbinfo);
}
typedef void (*NativePropertyGetter)
(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &);
static
void PropertySetterCallbackWrapper(
v8::Local<v8::Name> property
, v8::Local<v8::Value> value
, const v8::PropertyCallbackInfo<v8::Value> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Value>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
PropertySetterCallback callback = reinterpret_cast<PropertySetterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kPropertySetterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(property.As<v8::String>(), value, cbinfo);
}
typedef void (*NativePropertySetter)(
v8::Local<v8::Name>
, v8::Local<v8::Value>
, const v8::PropertyCallbackInfo<v8::Value> &);
#endif
static
void PropertyEnumeratorCallbackWrapper(
const v8::PropertyCallbackInfo<v8::Array> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Array>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
PropertyEnumeratorCallback callback =
reinterpret_cast<PropertyEnumeratorCallback>(reinterpret_cast<intptr_t>(
obj->GetInternalField(kPropertyEnumeratorIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(cbinfo);
}
typedef void (*NativePropertyEnumerator)
(const v8::PropertyCallbackInfo<v8::Array> &);
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 || \
(V8_MAJOR_VERSION == 12 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION > 4))
static
v8::Intercepted PropertyDeleterCallbackWrapper(
v8::Local<v8::Name> property
, const v8::PropertyCallbackInfo<v8::Boolean> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Boolean>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
PropertyDeleterCallback callback = reinterpret_cast<PropertyDeleterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kPropertyDeleterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
return callback(property.As<v8::String>(), cbinfo);
}
typedef v8::Intercepted (NativePropertyDeleter)
(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Boolean> &);
static
v8::Intercepted PropertyQueryCallbackWrapper(
v8::Local<v8::Name> property
, const v8::PropertyCallbackInfo<v8::Integer> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Integer>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
PropertyQueryCallback callback = reinterpret_cast<PropertyQueryCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kPropertyQueryIndex)
.As<v8::Value>().As<v8::External>()->Value()));
return callback(property.As<v8::String>(), cbinfo);
}
typedef v8::Intercepted (*NativePropertyQuery)
(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Integer> &);
#else
static
void PropertyDeleterCallbackWrapper(
v8::Local<v8::Name> property
, const v8::PropertyCallbackInfo<v8::Boolean> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Boolean>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
PropertyDeleterCallback callback = reinterpret_cast<PropertyDeleterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kPropertyDeleterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(property.As<v8::String>(), cbinfo);
}
typedef void (NativePropertyDeleter)
(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Boolean> &);
static
void PropertyQueryCallbackWrapper(
v8::Local<v8::Name> property
, const v8::PropertyCallbackInfo<v8::Integer> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Integer>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
PropertyQueryCallback callback = reinterpret_cast<PropertyQueryCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kPropertyQueryIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(property.As<v8::String>(), cbinfo);
}
typedef void (*NativePropertyQuery)
(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Integer> &);
#endif
#else
static
void PropertyGetterCallbackWrapper(
v8::Local<v8::String> property
, const v8::PropertyCallbackInfo<v8::Value> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Value>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
PropertyGetterCallback callback = reinterpret_cast<PropertyGetterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kPropertyGetterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(property, cbinfo);
}
typedef void (*NativePropertyGetter)
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value> &);
static
void PropertySetterCallbackWrapper(
v8::Local<v8::String> property
, v8::Local<v8::Value> value
, const v8::PropertyCallbackInfo<v8::Value> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Value>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
PropertySetterCallback callback = reinterpret_cast<PropertySetterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kPropertySetterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(property, value, cbinfo);
}
typedef void (*NativePropertySetter)(
v8::Local<v8::String>
, v8::Local<v8::Value>
, const v8::PropertyCallbackInfo<v8::Value> &);
static
void PropertyEnumeratorCallbackWrapper(
const v8::PropertyCallbackInfo<v8::Array> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Array>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
PropertyEnumeratorCallback callback =
reinterpret_cast<PropertyEnumeratorCallback>(reinterpret_cast<intptr_t>(
obj->GetInternalField(kPropertyEnumeratorIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(cbinfo);
}
typedef void (*NativePropertyEnumerator)
(const v8::PropertyCallbackInfo<v8::Array> &);
static
void PropertyDeleterCallbackWrapper(
v8::Local<v8::String> property
, const v8::PropertyCallbackInfo<v8::Boolean> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Boolean>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
PropertyDeleterCallback callback = reinterpret_cast<PropertyDeleterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kPropertyDeleterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(property, cbinfo);
}
typedef void (NativePropertyDeleter)
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Boolean> &);
static
void PropertyQueryCallbackWrapper(
v8::Local<v8::String> property
, const v8::PropertyCallbackInfo<v8::Integer> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Integer>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
PropertyQueryCallback callback = reinterpret_cast<PropertyQueryCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kPropertyQueryIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(property, cbinfo);
}
typedef void (*NativePropertyQuery)
(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Integer> &);
#endif
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 || \
(V8_MAJOR_VERSION == 12 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION > 4))
static
v8::Intercepted IndexGetterCallbackWrapper(
uint32_t index, const v8::PropertyCallbackInfo<v8::Value> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Value>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
IndexGetterCallback callback = reinterpret_cast<IndexGetterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kIndexPropertyGetterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
return callback(index, cbinfo);
}
typedef v8::Intercepted (*NativeIndexGetter)
(uint32_t, const v8::PropertyCallbackInfo<v8::Value> &);
static
v8::Intercepted IndexSetterCallbackWrapper(
uint32_t index
, v8::Local<v8::Value> value
, const v8::PropertyCallbackInfo<void> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<void>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
IndexSetterCallback callback = reinterpret_cast<IndexSetterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kIndexPropertySetterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
return callback(index, value, cbinfo);
}
typedef v8::Intercepted (*NativeIndexSetter)(
uint32_t
, v8::Local<v8::Value>
, const v8::PropertyCallbackInfo<void> &);
#else
static
void IndexGetterCallbackWrapper(
uint32_t index, const v8::PropertyCallbackInfo<v8::Value> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Value>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
IndexGetterCallback callback = reinterpret_cast<IndexGetterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kIndexPropertyGetterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(index, cbinfo);
}
typedef void (*NativeIndexGetter)
(uint32_t, const v8::PropertyCallbackInfo<v8::Value> &);
static
void IndexSetterCallbackWrapper(
uint32_t index
, v8::Local<v8::Value> value
, const v8::PropertyCallbackInfo<v8::Value> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Value>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
IndexSetterCallback callback = reinterpret_cast<IndexSetterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kIndexPropertySetterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(index, value, cbinfo);
}
typedef void (*NativeIndexSetter)(
uint32_t
, v8::Local<v8::Value>
, const v8::PropertyCallbackInfo<v8::Value> &);
#endif
static
void IndexEnumeratorCallbackWrapper(
const v8::PropertyCallbackInfo<v8::Array> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Array>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
IndexEnumeratorCallback callback = reinterpret_cast<IndexEnumeratorCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(
kIndexPropertyEnumeratorIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(cbinfo);
}
typedef void (*NativeIndexEnumerator)
(const v8::PropertyCallbackInfo<v8::Array> &);
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 || \
(V8_MAJOR_VERSION == 12 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION > 4))
static
v8::Intercepted IndexDeleterCallbackWrapper(
uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Boolean>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
IndexDeleterCallback callback = reinterpret_cast<IndexDeleterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kIndexPropertyDeleterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
return callback(index, cbinfo);
}
typedef v8::Intercepted (*NativeIndexDeleter)
(uint32_t, const v8::PropertyCallbackInfo<v8::Boolean> &);
static
v8::Intercepted IndexQueryCallbackWrapper(
uint32_t index, const v8::PropertyCallbackInfo<v8::Integer> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Integer>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
IndexQueryCallback callback = reinterpret_cast<IndexQueryCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kIndexPropertyQueryIndex)
.As<v8::Value>().As<v8::External>()->Value()));
return callback(index, cbinfo);
}
typedef v8::Intercepted (*NativeIndexQuery)
(uint32_t, const v8::PropertyCallbackInfo<v8::Integer> &);
#else
static
void IndexDeleterCallbackWrapper(
uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Boolean>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
IndexDeleterCallback callback = reinterpret_cast<IndexDeleterCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kIndexPropertyDeleterIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(index, cbinfo);
}
typedef void (*NativeIndexDeleter)
(uint32_t, const v8::PropertyCallbackInfo<v8::Boolean> &);
static
void IndexQueryCallbackWrapper(
uint32_t index, const v8::PropertyCallbackInfo<v8::Integer> &info) {
v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
PropertyCallbackInfo<v8::Integer>
cbinfo(info, obj->GetInternalField(kDataIndex).As<v8::Value>());
IndexQueryCallback callback = reinterpret_cast<IndexQueryCallback>(
reinterpret_cast<intptr_t>(
obj->GetInternalField(kIndexPropertyQueryIndex)
.As<v8::Value>().As<v8::External>()->Value()));
callback(index, cbinfo);
}
typedef void (*NativeIndexQuery)
(uint32_t, const v8::PropertyCallbackInfo<v8::Integer> &);
#endif
} // end of namespace imp
#endif // NAN_CALLBACKS_12_INL_H_
@@ -0,0 +1,37 @@
interface RuntimeCoverageModuleLoader {
import: (id: string) => Promise<{
default: RuntimeCoverageProviderModule;
}>;
isBrowser?: boolean;
moduleExecutionInfo?: Map<string, {
startOffset: number;
}>;
}
interface RuntimeCoverageProviderModule {
/**
* Factory for creating a new coverage provider
*/
getProvider: () => any;
/**
* Executed before tests are run in the worker thread.
*/
startCoverage?: (runtimeOptions: {
isolate: boolean;
}) => unknown | Promise<unknown>;
/**
* Executed on after each run in the worker thread. Possible to return a payload passed to the provider
*/
takeCoverage?: (runtimeOptions?: {
moduleExecutionInfo?: Map<string, {
startOffset: number;
}>;
}) => unknown | Promise<unknown>;
/**
* Executed after all tests have been run in the worker thread.
*/
stopCoverage?: (runtimeOptions: {
isolate: boolean;
}) => unknown | Promise<unknown>;
}
export type { RuntimeCoverageModuleLoader as R, RuntimeCoverageProviderModule as a };
@@ -0,0 +1,203 @@
# URI.js
URI.js is an [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt) compliant, scheme extendable URI parsing/validating/resolving library for all JavaScript environments (browsers, Node.js, etc).
It is also compliant with the IRI ([RFC 3987](http://www.ietf.org/rfc/rfc3987.txt)), IDNA ([RFC 5890](http://www.ietf.org/rfc/rfc5890.txt)), IPv6 Address ([RFC 5952](http://www.ietf.org/rfc/rfc5952.txt)), IPv6 Zone Identifier ([RFC 6874](http://www.ietf.org/rfc/rfc6874.txt)) specifications.
URI.js has an extensive test suite, and works in all (Node.js, web) environments. It weighs in at 6.4kb (gzipped, 17kb deflated).
## API
### Parsing
URI.parse("uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body");
//returns:
//{
// scheme : "uri",
// userinfo : "user:pass",
// host : "example.com",
// port : 123,
// path : "/one/two.three",
// query : "q1=a1&q2=a2",
// fragment : "body"
//}
### Serializing
URI.serialize({scheme : "http", host : "example.com", fragment : "footer"}) === "http://example.com/#footer"
### Resolving
URI.resolve("uri://a/b/c/d?q", "../../g") === "uri://a/g"
### Normalizing
URI.normalize("HTTP://ABC.com:80/%7Esmith/home.html") === "http://abc.com/~smith/home.html"
### Comparison
URI.equal("example://a/b/c/%7Bfoo%7D", "eXAMPLE://a/./b/../b/%63/%7bfoo%7d") === true
### IP Support
//IPv4 normalization
URI.normalize("//192.068.001.000") === "//192.68.1.0"
//IPv6 normalization
URI.normalize("//[2001:0:0DB8::0:0001]") === "//[2001:0:db8::1]"
//IPv6 zone identifier support
URI.parse("//[2001:db8::7%25en1]");
//returns:
//{
// host : "2001:db8::7%en1"
//}
### IRI Support
//convert IRI to URI
URI.serialize(URI.parse("http://examplé.org/rosé")) === "http://xn--exampl-gva.org/ros%C3%A9"
//convert URI to IRI
URI.serialize(URI.parse("http://xn--exampl-gva.org/ros%C3%A9"), {iri:true}) === "http://examplé.org/rosé"
### Options
All of the above functions can accept an additional options argument that is an object that can contain one or more of the following properties:
* `scheme` (string)
Indicates the scheme that the URI should be treated as, overriding the URI's normal scheme parsing behavior.
* `reference` (string)
If set to `"suffix"`, it indicates that the URI is in the suffix format, and the validator will use the option's `scheme` property to determine the URI's scheme.
* `tolerant` (boolean, false)
If set to `true`, the parser will relax URI resolving rules.
* `absolutePath` (boolean, false)
If set to `true`, the serializer will not resolve a relative `path` component.
* `iri` (boolean, false)
If set to `true`, the serializer will unescape non-ASCII characters as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt).
* `unicodeSupport` (boolean, false)
If set to `true`, the parser will unescape non-ASCII characters in the parsed output as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt).
* `domainHost` (boolean, false)
If set to `true`, the library will treat the `host` component as a domain name, and convert IDNs (International Domain Names) as per [RFC 5891](http://www.ietf.org/rfc/rfc5891.txt).
## Scheme Extendable
URI.js supports inserting custom [scheme](http://en.wikipedia.org/wiki/URI_scheme) dependent processing rules. Currently, URI.js has built in support for the following schemes:
* http \[[RFC 2616](http://www.ietf.org/rfc/rfc2616.txt)\]
* https \[[RFC 2818](http://www.ietf.org/rfc/rfc2818.txt)\]
* ws \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\]
* wss \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\]
* mailto \[[RFC 6068](http://www.ietf.org/rfc/rfc6068.txt)\]
* urn \[[RFC 2141](http://www.ietf.org/rfc/rfc2141.txt)\]
* urn:uuid \[[RFC 4122](http://www.ietf.org/rfc/rfc4122.txt)\]
### HTTP/HTTPS Support
URI.equal("HTTP://ABC.COM:80", "http://abc.com/") === true
URI.equal("https://abc.com", "HTTPS://ABC.COM:443/") === true
### WS/WSS Support
URI.parse("wss://example.com/foo?bar=baz");
//returns:
//{
// scheme : "wss",
// host: "example.com",
// resourceName: "/foo?bar=baz",
// secure: true,
//}
URI.equal("WS://ABC.COM:80/chat#one", "ws://abc.com/chat") === true
### Mailto Support
URI.parse("mailto:alpha@example.com,bravo@example.com?subject=SUBSCRIBE&body=Sign%20me%20up!");
//returns:
//{
// scheme : "mailto",
// to : ["alpha@example.com", "bravo@example.com"],
// subject : "SUBSCRIBE",
// body : "Sign me up!"
//}
URI.serialize({
scheme : "mailto",
to : ["alpha@example.com"],
subject : "REMOVE",
body : "Please remove me",
headers : {
cc : "charlie@example.com"
}
}) === "mailto:alpha@example.com?cc=charlie@example.com&subject=REMOVE&body=Please%20remove%20me"
### URN Support
URI.parse("urn:example:foo");
//returns:
//{
// scheme : "urn",
// nid : "example",
// nss : "foo",
//}
#### URN UUID Support
URI.parse("urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6");
//returns:
//{
// scheme : "urn",
// nid : "uuid",
// uuid : "f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
//}
## Usage
To load in a browser, use the following tag:
<script type="text/javascript" src="uri-js/dist/es5/uri.all.min.js"></script>
To load in a CommonJS/Module environment, first install with npm/yarn by running on the command line:
npm install uri-js
# OR
yarn add uri-js
Then, in your code, load it using:
const URI = require("uri-js");
If you are writing your code in ES6+ (ESNEXT) or TypeScript, you would load it using:
import * as URI from "uri-js";
Or you can load just what you need using named exports:
import { parse, serialize, resolve, resolveComponents, normalize, equal, removeDotSegments, pctEncChar, pctDecChars, escapeComponent, unescapeComponent } from "uri-js";
## Breaking changes
### Breaking changes from 3.x
URN parsing has been completely changed to better align with the specification. Scheme is now always `urn`, but has two new properties: `nid` which contains the Namspace Identifier, and `nss` which contains the Namespace Specific String. The `nss` property will be removed by higher order scheme handlers, such as the UUID URN scheme handler.
The UUID of a URN can now be found in the `uuid` property.
### Breaking changes from 2.x
URI validation has been removed as it was slow, exposed a vulnerabilty, and was generally not useful.
### Breaking changes from 1.x
The `errors` array on parsed components is now an `error` string.
@@ -0,0 +1 @@
{"mappings":"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","sources":["packages/@react-aria/interactions/src/useFocusable.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes, FocusableDOMProps, FocusableElement, FocusableProps, RefObject} from '@react-types/shared';\nimport {focusSafely} from './';\nimport {getOwnerWindow, isFocusable, mergeProps, mergeRefs, useObjectRef, useSyncRef} from '@react-aria/utils';\nimport React, {ForwardedRef, forwardRef, MutableRefObject, ReactElement, ReactNode, useContext, useEffect, useRef} from 'react';\nimport {useFocus} from './useFocus';\nimport {useKeyboard} from './useKeyboard';\n\nexport interface FocusableOptions<T = FocusableElement> extends FocusableProps<T>, FocusableDOMProps {\n /** Whether focus should be disabled. */\n isDisabled?: boolean\n}\n\nexport interface FocusableProviderProps extends DOMAttributes {\n /** The child element to provide DOM props to. */\n children?: ReactNode\n}\n\ninterface FocusableContextValue extends FocusableProviderProps {\n ref?: MutableRefObject<FocusableElement | null>\n}\n\n// Exported for @react-aria/collections, which forwards this context.\n/** @private */\nexport let FocusableContext: React.Context<FocusableContextValue | null> = React.createContext<FocusableContextValue | null>(null);\n\nfunction useFocusableContext(ref: RefObject<FocusableElement | null>): FocusableContextValue {\n let context = useContext(FocusableContext) || {};\n useSyncRef(context, ref);\n\n // eslint-disable-next-line\n let {ref: _, ...otherProps} = context;\n return otherProps;\n}\n\n/**\n * Provides DOM props to the nearest focusable child.\n */\nexport const FocusableProvider:\n React.ForwardRefExoticComponent<FocusableProviderProps & React.RefAttributes<FocusableElement>> =\nReact.forwardRef(function FocusableProvider(props: FocusableProviderProps, ref: ForwardedRef<FocusableElement>) {\n let {Line truncated
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = getImplicitRoleForTextarea;
/**
* Returns the implicit role for a textarea tag.
*/
function getImplicitRoleForTextarea() {
return 'textbox';
}
module.exports = exports.default;
@@ -0,0 +1,66 @@
/**
* @author Yosuke Ota
* See LICENSE file in root directory for full license.
*/
"use strict"
const { defineRegExpHandler } = require("../util/define-regexp-handler")
const {
scNameSet,
scValueSets,
binPropertySets,
} = require("../util/unicode-properties")
function isNewUnicodePropertyKeyValuePair(key, value) {
return scNameSet.has(key) && scValueSets.es2020.has(value)
}
function isNewBinaryUnicodeProperty(key) {
return binPropertySets.es2020.has(key)
}
module.exports = {
meta: {
docs: {
description:
"disallow the new values of RegExp Unicode property escape sequences in ES2020",
category: "ES2020",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-regexp-unicode-property-escapes-2020.html",
},
fixable: null,
messages: {
forbidden: "ES2020 '{{value}}' is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return defineRegExpHandler(context, (node, { pattern }) => {
let foundValue = ""
return {
onUnicodePropertyCharacterSet(start, end, _kind, key, value) {
if (foundValue) {
return
}
if (
value
? isNewUnicodePropertyKeyValuePair(key, value)
: isNewBinaryUnicodeProperty(key)
) {
foundValue = pattern.slice(start, end)
}
},
onExit() {
if (foundValue) {
context.report({
node,
messageId: "forbidden",
data: { value: foundValue },
})
}
},
}
})
},
}
@@ -0,0 +1 @@
{"version":3,"file":"setInstanceProperties.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/setInstanceProperties.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,wBAAgB,qBAAqB,CACnC,kBAAkB,EAAE,CAClB,MAAM,EAAE,gBAAgB,EACxB,WAAW,EAAE,eAAe,KACzB,OAAO,GACX,CACD,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,EAC1C,IAAI,EAAE,mBAAmB,KACtB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAuCxB"}
@@ -0,0 +1 @@
export { _ as default } from "../esm/_apply_decorated_descriptor.js";
@@ -0,0 +1,115 @@
// give it a pattern, and it'll be able to tell you if
// a given path should be ignored.
// Ignoring a path ignores its children if the pattern ends in /**
// Ignores are always parsed in dot:true mode
import { Minimatch } from 'minimatch';
import { Pattern } from './pattern.js';
const defaultPlatform = (typeof process === 'object' &&
process &&
typeof process.platform === 'string') ?
process.platform
: 'linux';
/**
* Class used to process ignored patterns
*/
export class Ignore {
relative;
relativeChildren;
absolute;
absoluteChildren;
platform;
mmopts;
constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform, }) {
this.relative = [];
this.absolute = [];
this.relativeChildren = [];
this.absoluteChildren = [];
this.platform = platform;
this.mmopts = {
dot: true,
nobrace,
nocase,
noext,
noglobstar,
optimizationLevel: 2,
platform,
nocomment: true,
nonegate: true,
};
for (const ign of ignored)
this.add(ign);
}
add(ign) {
// this is a little weird, but it gives us a clean set of optimized
// minimatch matchers, without getting tripped up if one of them
// ends in /** inside a brace section, and it's only inefficient at
// the start of the walk, not along it.
// It'd be nice if the Pattern class just had a .test() method, but
// handling globstars is a bit of a pita, and that code already lives
// in minimatch anyway.
// Another way would be if maybe Minimatch could take its set/globParts
// as an option, and then we could at least just use Pattern to test
// for absolute-ness.
// Yet another way, Minimatch could take an array of glob strings, and
// a cwd option, and do the right thing.
const mm = new Minimatch(ign, this.mmopts);
for (let i = 0; i < mm.set.length; i++) {
const parsed = mm.set[i];
const globParts = mm.globParts[i];
/* c8 ignore start */
if (!parsed || !globParts) {
throw new Error('invalid pattern object');
}
// strip off leading ./ portions
// https://github.com/isaacs/node-glob/issues/570
while (parsed[0] === '.' && globParts[0] === '.') {
parsed.shift();
globParts.shift();
}
/* c8 ignore stop */
const p = new Pattern(parsed, globParts, 0, this.platform);
const m = new Minimatch(p.globString(), this.mmopts);
const children = globParts[globParts.length - 1] === '**';
const absolute = p.isAbsolute();
if (absolute)
this.absolute.push(m);
else
this.relative.push(m);
if (children) {
if (absolute)
this.absoluteChildren.push(m);
else
this.relativeChildren.push(m);
}
}
}
ignored(p) {
const fullpath = p.fullpath();
const fullpaths = `${fullpath}/`;
const relative = p.relative() || '.';
const relatives = `${relative}/`;
for (const m of this.relative) {
if (m.match(relative) || m.match(relatives))
return true;
}
for (const m of this.absolute) {
if (m.match(fullpath) || m.match(fullpaths))
return true;
}
return false;
}
childrenIgnored(p) {
const fullpath = p.fullpath() + '/';
const relative = (p.relative() || '.') + '/';
for (const m of this.relativeChildren) {
if (m.match(relative))
return true;
}
for (const m of this.absoluteChildren) {
if (m.match(fullpath))
return true;
}
return false;
}
}
//# sourceMappingURL=ignore.js.map
@@ -0,0 +1 @@
{"version":3,"file":"convertPEMToBytes.d.ts","sourceRoot":"","sources":["../../src/helpers/convertPEMToBytes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAO1D"}
@@ -0,0 +1 @@
{"name":"micromatch","version":"4.0.8","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532095851,"integrity":"sha512-cjkrzNiWTIjsiqPYFXRqK2pEZtnHyo9CjX0PPiuxFnTvSUyjNciyVe7lglwIene7RaXWACXzGLeKZOGb7M0jxw==","mode":493,"size":1091},"index.js":{"checkedAt":1794532095851,"integrity":"sha512-G58GdI6gDBISPG8PUDmOYXPD7uJVW5CR4YLZzmb7My8iih9LJNKlDa5Yfw8p29wpgop/ahnERT32bA33lyf1TQ==","mode":420,"size":13898},"package.json":{"checkedAt":1794532095851,"integrity":"sha512-HuvmphTVBhD9J2zIqqyBepqAwjCS2DdYN1474hwfzjvRF3pFGra2Zywbn9QtvQeLl6rTDDSpqAo8/ckFAU5IVA==","mode":420,"size":2648},"README.md":{"checkedAt":1794532095851,"integrity":"sha512-ouPIsSu8Vh+WT2pDeH043isALVjWfvjEZuHY1NAK9oglv9Npy9W+BjAsKkSL4w04cDAu3HUPnVSUKVEZ67cJmg==","mode":420,"size":38962}}}
@@ -0,0 +1,64 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/use-multiselect-list-state.ts
var use_multiselect_list_state_exports = {};
__export(use_multiselect_list_state_exports, {
useMultiSelectListState: () => useMultiSelectListState
});
module.exports = __toCommonJS(use_multiselect_list_state_exports);
var import_list = require("@react-stately/list");
var import_react = require("react");
function useMultiSelectListState(props) {
const {
collection,
disabledKeys,
selectionManager,
selectionManager: { setSelectedKeys, selectedKeys, selectionMode }
} = (0, import_list.useListState)(props);
const missingKeys = (0, import_react.useMemo)(() => {
if (!props.isLoading && selectedKeys.size !== 0) {
return Array.from(selectedKeys).filter(Boolean).filter((key) => !collection.getItem(key));
}
return [];
}, [selectedKeys, collection]);
const selectedItems = selectedKeys.size !== 0 ? Array.from(selectedKeys).map((key) => {
return collection.getItem(key);
}).filter(Boolean) : null;
if (missingKeys.length) {
console.warn(
`Select: Keys "${missingKeys.join(
", "
)}" passed to "selectedKeys" are not present in the collection.`
);
}
return {
collection,
disabledKeys,
selectionManager,
selectionMode,
selectedKeys,
setSelectedKeys: setSelectedKeys.bind(selectionManager),
selectedItems
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
useMultiSelectListState
});
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _classPrivateFieldDestructureSet;
var _classApplyDescriptorDestructureSet = require("classApplyDescriptorDestructureSet");
var _classPrivateFieldGet = require("classPrivateFieldGet2");
function _classPrivateFieldDestructureSet(receiver, privateMap) {
var descriptor = _classPrivateFieldGet(privateMap, receiver);
return _classApplyDescriptorDestructureSet(receiver, descriptor);
}
//# sourceMappingURL=classPrivateFieldDestructureSet.js.map
@@ -0,0 +1 @@
{"name":"arg","version":"5.0.2","requiresBuild":false,"files":{"index.js":{"checkedAt":1794532104551,"integrity":"sha512-vm9o6uBFBAsDHcTTuV+QwznVGyCbwNx1BLAsaunflRtUgWgQS9C9zAvo8Y/I+gaqfAOXr4jKmBSw16xtNTUZTA==","mode":420,"size":4464},"package.json":{"checkedAt":1794532104551,"integrity":"sha512-tVEblBwWH7TXTP+6G0HQthaL0racAr2f8FrJYZxRQuj+1TA94YOi29z4b46u86KxFzp+nT07KaimGHEThuJxbQ==","mode":420,"size":589},"LICENSE.md":{"checkedAt":1794532104551,"integrity":"sha512-n6B787HtuCwOi+8qSGBW3N2rNIfd5A//qMGUhosy1v2e10AQi7d7oGh0IbWs1xXxGCncFPuGBJFQDrMYxWgZnw==","mode":420,"size":1079},"README.md":{"checkedAt":1794532104551,"integrity":"sha512-BNBBgBNM/tp6nKYrlK26Pbm+LiQfEpILBru7nRWV2hBwATYf2IQlxZ14OZRIM4vUCnW0gqVmHxQMA21qwBlacg==","mode":420,"size":6642},"index.d.ts":{"checkedAt":1794532104552,"integrity":"sha512-POnlunPXT39W2aF/Yn4uWIqBJ0sUWIRNl5imj3JaXny+SjmM3xyXRITGWXHccrKD67ZHAMYLPBbK8F4uHm+x0Q==","mode":420,"size":891}}}
@@ -0,0 +1,218 @@
import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f, CalendarDateTime as $35ea8db9cb2ccb90$export$ca871e8dbb80966f, Time as $35ea8db9cb2ccb90$export$680ea196effce5f, ZonedDateTime as $35ea8db9cb2ccb90$export$d3b7288e7994edea} from "./CalendarDate.module.js";
import {constrain as $735220c2d4774dd3$export$c4e2ecac49351ef2} from "./manipulation.module.js";
import {getExtendedYear as $3b62074eb05584b2$export$c36e0ecb2d4fa69d, GregorianCalendar as $3b62074eb05584b2$export$80ee6245ec4f29ec} from "./GregorianCalendar.module.js";
import {getLocalTimeZone as $14e0f24ef4ac5c92$export$aa8b41735afcabd2, isEqualCalendar as $14e0f24ef4ac5c92$export$dbc69fd56b53d5e} from "./queries.module.js";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ // Portions of the code in this file are based on code from the TC39 Temporal proposal.
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) {
date = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());
let year = (0, $3b62074eb05584b2$export$c36e0ecb2d4fa69d)(date.era, date.year);
return $11d87f3f76e88657$var$epochFromParts(year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond);
}
function $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, millisecond) {
// Note: Date.UTC() interprets one and two-digit years as being in the
// 20th century, so don't use it
let date = new Date();
date.setUTCHours(hour, minute, second, millisecond);
date.setUTCFullYear(year, month - 1, day);
return date.getTime();
}
function $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone) {
// Fast path for UTC.
if (timeZone === 'UTC') return 0;
// Fast path: for local timezone after 1970, use native Date.
if (ms > 0 && timeZone === (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)()) return new Date(ms).getTimezoneOffset() * -60000;
let { year: year, month: month, day: day, hour: hour, minute: minute, second: second } = $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone);
let utc = $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, 0);
return utc - Math.floor(ms / 1000) * 1000;
}
const $11d87f3f76e88657$var$formattersByTimeZone = new Map();
function $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone) {
let formatter = $11d87f3f76e88657$var$formattersByTimeZone.get(timeZone);
if (!formatter) {
formatter = new Intl.DateTimeFormat('en-US', {
timeZone: timeZone,
hour12: false,
era: 'short',
year: 'numeric',
month: 'numeric',
day: 'numeric',
hour: 'numeric',
minute: 'numeric',
second: 'numeric'
});
$11d87f3f76e88657$var$formattersByTimeZone.set(timeZone, formatter);
}
let parts = formatter.formatToParts(new Date(ms));
let namedParts = {};
for (let part of parts)if (part.type !== 'literal') namedParts[part.type] = part.value;
return {
// Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253
year: namedParts.era === 'BC' || namedParts.era === 'B' ? -namedParts.year + 1 : +namedParts.year,
month: +namedParts.month,
day: +namedParts.day,
hour: namedParts.hour === '24' ? 0 : +namedParts.hour,
minute: +namedParts.minute,
second: +namedParts.second
};
}
const $11d87f3f76e88657$var$DAYMILLIS = 86400000;
function $11d87f3f76e88657$export$136f38efe7caf549(date, timeZone) {
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date);
let earlier = ms - $11d87f3f76e88657$export$59c99f3515d3493f(ms - $11d87f3f76e88657$var$DAYMILLIS, timeZone);
let later = ms - $11d87f3f76e88657$export$59c99f3515d3493f(ms + $11d87f3f76e88657$var$DAYMILLIS, timeZone);
return $11d87f3f76e88657$var$getValidWallTimes(date, timeZone, earlier, later);
}
function $11d87f3f76e88657$var$getValidWallTimes(date, timeZone, earlier, later) {
let found = earlier === later ? [
earlier
] : [
earlier,
later
];
return found.filter((absolute)=>$11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute));
}
function $11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute) {
let parts = $11d87f3f76e88657$var$getTimeZoneParts(absolute, timeZone);
return date.year === parts.year && date.month === parts.month && date.day === parts.day && date.hour === parts.hour && date.minute === parts.minute && date.second === parts.second;
}
function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation = 'compatible') {
let dateTime = $11d87f3f76e88657$export$b21e0b124e224484(date);
// Fast path: if the time zone is UTC, use native Date.
if (timeZone === 'UTC') return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
// Fast path: if the time zone is the local timezone and disambiguation is compatible, use native Date.
if (timeZone === (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && disambiguation === 'compatible') {
dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());
// Don't use Date constructor here because two-digit years are interpreted in the 20th century.
let date = new Date();
let year = (0, $3b62074eb05584b2$export$c36e0ecb2d4fa69d)(dateTime.era, dateTime.year);
date.setFullYear(year, dateTime.month - 1, dateTime.day);
date.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
return date.getTime();
}
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
let offsetBefore = $11d87f3f76e88657$export$59c99f3515d3493f(ms - $11d87f3f76e88657$var$DAYMILLIS, timeZone);
let offsetAfter = $11d87f3f76e88657$export$59c99f3515d3493f(ms + $11d87f3f76e88657$var$DAYMILLIS, timeZone);
let valid = $11d87f3f76e88657$var$getValidWallTimes(dateTime, timeZone, ms - offsetBefore, ms - offsetAfter);
if (valid.length === 1) return valid[0];
if (valid.length > 1) switch(disambiguation){
// 'compatible' means 'earlier' for "fall back" transitions
case 'compatible':
case 'earlier':
return valid[0];
case 'later':
return valid[valid.length - 1];
case 'reject':
throw new RangeError('Multiple possible absolute times found');
}
switch(disambiguation){
case 'earlier':
return Math.min(ms - offsetBefore, ms - offsetAfter);
// 'compatible' means 'later' for "spring forward" transitions
case 'compatible':
case 'later':
return Math.max(ms - offsetBefore, ms - offsetAfter);
case 'reject':
throw new RangeError('No such absolute time found');
}
}
function $11d87f3f76e88657$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = 'compatible') {
return new Date($11d87f3f76e88657$export$5107c82f94518f5c(dateTime, timeZone, disambiguation));
}
function $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone) {
let offset = $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone);
let date = new Date(ms + offset);
let year = date.getUTCFullYear();
let month = date.getUTCMonth() + 1;
let day = date.getUTCDate();
let hour = date.getUTCHours();
let minute = date.getUTCMinutes();
let second = date.getUTCSeconds();
let millisecond = date.getUTCMilliseconds();
return new (0, $35ea8db9cb2ccb90$export$d3b7288e7994edea)(year < 1 ? 'BC' : 'AD', year < 1 ? -year + 1 : year, month, day, timeZone, offset, hour, minute, second, millisecond);
}
function $11d87f3f76e88657$export$e57ff100d91bd4b9(date, timeZone) {
return $11d87f3f76e88657$export$1b96692a1ba042ac(date.getTime(), timeZone);
}
function $11d87f3f76e88657$export$d7f92bcd3596b086(date) {
return $11d87f3f76e88657$export$e57ff100d91bd4b9(date, (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)());
}
function $11d87f3f76e88657$export$93522d1a439f3617(dateTime) {
return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(dateTime.calendar, dateTime.era, dateTime.year, dateTime.month, dateTime.day);
}
function $11d87f3f76e88657$export$6f4d78149f3f53ac(date) {
return {
era: date.era,
year: date.year,
month: date.month,
day: date.day
};
}
function $11d87f3f76e88657$export$4d0393e732857be5(date) {
return {
hour: date.hour,
minute: date.minute,
second: date.second,
millisecond: date.millisecond
};
}
function $11d87f3f76e88657$export$b21e0b124e224484(date, time) {
let hour = 0, minute = 0, second = 0, millisecond = 0;
if ('timeZone' in date) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = date);
else if ('hour' in date && !time) return date;
if (time) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = time);
return new (0, $35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
}
function $11d87f3f76e88657$export$d33f79e3ffc3dc83(dateTime) {
return new (0, $35ea8db9cb2ccb90$export$680ea196effce5f)(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
}
function $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) {
if ((0, $14e0f24ef4ac5c92$export$dbc69fd56b53d5e)(date.calendar, calendar)) return date;
let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
let copy = date.copy();
copy.calendar = calendar;
copy.era = calendarDate.era;
copy.year = calendarDate.year;
copy.month = calendarDate.month;
copy.day = calendarDate.day;
(0, $735220c2d4774dd3$export$c4e2ecac49351ef2)(copy);
return copy;
}
function $11d87f3f76e88657$export$84c95a83c799e074(date, timeZone, disambiguation) {
if (date instanceof (0, $35ea8db9cb2ccb90$export$d3b7288e7994edea)) {
if (date.timeZone === timeZone) return date;
return $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone);
}
let ms = $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation);
return $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone);
}
function $11d87f3f76e88657$export$83aac07b4c37b25(date) {
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;
return new Date(ms);
}
function $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone) {
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;
return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone), date.calendar);
}
function $11d87f3f76e88657$export$d9b67bc93c097491(date) {
return $11d87f3f76e88657$export$538b00033cc11c75(date, (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)());
}
export {$11d87f3f76e88657$export$bd4fb2bc8bb06fb as epochFromDate, $11d87f3f76e88657$export$b4a036af3fc0b032 as toCalendar, $11d87f3f76e88657$export$59c99f3515d3493f as getTimeZoneOffset, $11d87f3f76e88657$export$136f38efe7caf549 as possibleAbsolutes, $11d87f3f76e88657$export$5107c82f94518f5c as toAbsolute, $11d87f3f76e88657$export$b21e0b124e224484 as toCalendarDateTime, $11d87f3f76e88657$export$e67a095c620b86fe as toDate, $11d87f3f76e88657$export$1b96692a1ba042ac as fromAbsolute, $11d87f3f76e88657$export$e57ff100d91bd4b9 as fromDate, $11d87f3f76e88657$export$d7f92bcd3596b086 as fromDateToLocal, $11d87f3f76e88657$export$93522d1a439f3617 as toCalendarDate, $11d87f3f76e88657$export$6f4d78149f3f53ac as toDateFields, $11d87f3f76e88657$export$4d0393e732857be5 as toTimeFields, $11d87f3f76e88657$export$d33f79e3ffc3dc83 as toTime, $11d87f3f76e88657$export$84c95a83c799e074 as toZoned, $11d87f3f76e88657$export$538b00033cc11c75 as toTimeZone, $11d87f3f76e88657$export$83aac07b4c37b25 as zonedToDate, $11d87f3f76e88657$export$d9b67bc93c097491 as toLocalTimeZone};
//# sourceMappingURL=conversion.module.js.map
@@ -0,0 +1,18 @@
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"), require("./x64-core"), require("./lib-typedarrays"), require("./enc-utf16"), require("./enc-base64"), require("./enc-base64url"), require("./md5"), require("./sha1"), require("./sha256"), require("./sha224"), require("./sha512"), require("./sha384"), require("./sha3"), require("./ripemd160"), require("./hmac"), require("./pbkdf2"), require("./evpkdf"), require("./cipher-core"), require("./mode-cfb"), require("./mode-ctr"), require("./mode-ctr-gladman"), require("./mode-ofb"), require("./mode-ecb"), require("./pad-ansix923"), require("./pad-iso10126"), require("./pad-iso97971"), require("./pad-zeropadding"), require("./pad-nopadding"), require("./format-hex"), require("./aes"), require("./tripledes"), require("./rc4"), require("./rabbit"), require("./rabbit-legacy"), require("./blowfish"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core", "./x64-core", "./lib-typedarrays", "./enc-utf16", "./enc-base64", "./enc-base64url", "./md5", "./sha1", "./sha256", "./sha224", "./sha512", "./sha384", "./sha3", "./ripemd160", "./hmac", "./pbkdf2", "./evpkdf", "./cipher-core", "./mode-cfb", "./mode-ctr", "./mode-ctr-gladman", "./mode-ofb", "./mode-ecb", "./pad-ansix923", "./pad-iso10126", "./pad-iso97971", "./pad-zeropadding", "./pad-nopadding", "./format-hex", "./aes", "./tripledes", "./rc4", "./rabbit", "./rabbit-legacy", "./blowfish"], factory);
}
else {
// Global (browser)
root.CryptoJS = factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
return CryptoJS;
}));
@@ -0,0 +1,501 @@
/**
* @fileoverview Enforce static elements have no interactive handlers.
* @author Ethan Cohen
*/
// -----------------------------------------------------------------------------
// Requirements
// -----------------------------------------------------------------------------
import { RuleTester } from 'eslint';
import { configs } from '../../../src/index';
import parserOptionsMapper from '../../__util__/parserOptionsMapper';
import parsers from '../../__util__/helpers/parsers';
import rule from '../../../src/rules/no-static-element-interactions';
import ruleOptionsMapperFactory from '../../__util__/ruleOptionsMapperFactory';
// -----------------------------------------------------------------------------
// Tests
// -----------------------------------------------------------------------------
const ruleTester = new RuleTester();
const errorMessage = 'Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.';
const expectedError = {
message: errorMessage,
type: 'JSXOpeningElement',
};
const ruleName = 'no-static-element-interactions';
const componentsSettings = {
'jsx-a11y': {
components: {
Button: 'button',
TestComponent: 'div',
},
},
};
const alwaysValid = [
{ code: '<TestComponent onClick={doFoo} />' },
{ code: '<Button onClick={doFoo} />' },
{ code: '<Button onClick={doFoo} />', settings: componentsSettings },
{ code: '<div />;' },
{ code: '<div className="foo" />;' },
{ code: '<div className="foo" {...props} />;' },
{ code: '<div onClick={() => void 0} aria-hidden />;' },
{ code: '<div onClick={() => void 0} aria-hidden={true} />;' },
{ code: '<div onClick={null} />;' },
/* All flavors of input */
{ code: '<input onClick={() => void 0} />' },
{ code: '<input type="button" onClick={() => void 0} />' },
{ code: '<input type="checkbox" onClick={() => void 0} />' },
{ code: '<input type="color" onClick={() => void 0} />' },
{ code: '<input type="date" onClick={() => void 0} />' },
{ code: '<input type="datetime" onClick={() => void 0} />' },
{ code: '<input type="datetime-local" onClick={() => void 0} />' },
{ code: '<input type="email" onClick={() => void 0} />' },
{ code: '<input type="file" onClick={() => void 0} />' },
{ code: '<input type="hidden" onClick={() => void 0} />' },
{ code: '<input type="image" onClick={() => void 0} />' },
{ code: '<input type="month" onClick={() => void 0} />' },
{ code: '<input type="number" onClick={() => void 0} />' },
{ code: '<input type="password" onClick={() => void 0} />' },
{ code: '<input type="radio" onClick={() => void 0} />' },
{ code: '<input type="range" onClick={() => void 0} />' },
{ code: '<input type="reset" onClick={() => void 0} />' },
{ code: '<input type="search" onClick={() => void 0} />' },
{ code: '<input type="submit" onClick={() => void 0} />' },
{ code: '<input type="tel" onClick={() => void 0} />' },
{ code: '<input type="text" onClick={() => void 0} />' },
{ code: '<input type="time" onClick={() => void 0} />' },
{ code: '<input type="url" onClick={() => void 0} />' },
{ code: '<input type="week" onClick={() => void 0} />' },
/* End all flavors of input */
{ code: '<button onClick={() => void 0} className="foo" />' },
{ code: '<datalist onClick={() => {}} />;' },
{ code: '<menuitem onClick={() => {}} />;' },
{ code: '<option onClick={() => void 0} className="foo" />' },
{ code: '<select onClick={() => void 0} className="foo" />' },
{ code: '<textarea onClick={() => void 0} className="foo" />' },
{ code: '<a onClick={() => void 0} href="http://x.y.z" />' },
{ code: '<a onClick={() => void 0} href="http://x.y.z" tabIndex="0" />' },
{ code: '<audio onClick={() => {}} />;' },
{ code: '<form onClick={() => {}} />;' },
{ code: '<form onSubmit={() => {}} />;' },
// { code: '<link onClick={() => {}} href="#" />;' },
/* HTML elements attributed with an interactive role */
{ code: '<div role="button" onClick={() => {}} />;' },
{ code: '<div role="checkbox" onClick={() => {}} />;' },
{ code: '<div role="columnheader" onClick={() => {}} />;' },
{ code: '<div role="combobox" onClick={() => {}} />;' },
{ code: '<div role="form" onClick={() => {}} />;' },
{ code: '<div role="gridcell" onClick={() => {}} />;' },
{ code: '<div role="link" onClick={() => {}} />;' },
{ code: '<div role="menuitem" onClick={() => {}} />;' },
{ code: '<div role="menuitemcheckbox" onClick={() => {}} />;' },
{ code: '<div role="menuitemradio" onClick={() => {}} />;' },
{ code: '<div role="option" onClick={() => {}} />;' },
{ code: '<div role="radio" onClick={() => {}} />;' },
{ code: '<div role="rowheader" onClick={() => {}} />;' },
{ code: '<div role="searchbox" onClick={() => {}} />;' },
{ code: '<div role="slider" onClick={() => {}} />;' },
{ code: '<div role="spinbutton" onClick={() => {}} />;' },
{ code: '<div role="switch" onClick={() => {}} />;' },
{ code: '<div role="tab" onClick={() => {}} />;' },
{ code: '<div role="textbox" onClick={() => {}} />;' },
{ code: '<div role="treeitem" onClick={() => {}} />;' },
/* Presentation is a special case role that indicates intentional static semantics */
{ code: '<div role="presentation" onClick={() => {}} />;' },
{ code: '<div role="presentation" onKeyDown={() => {}} />;' },
/* HTML elements with an inherent, non-interactive role */
{ code: '<address onClick={() => {}} />;' },
{ code: '<article onClick={() => {}} />;' },
{ code: '<article onDblClick={() => void 0} />;' },
{ code: '<aside onClick={() => {}} />;' },
{ code: '<blockquote onClick={() => {}} />;' },
{ code: '<br onClick={() => {}} />;' },
{ code: '<canvas onClick={() => {}} />;' },
{ code: '<caption onClick={() => {}} />;' },
{ code: '<code onClick={() => {}} />;' },
{ code: '<dd onClick={() => {}} />;' },
{ code: '<del onClick={() => {}} />;' },
{ code: '<details onClick={() => {}} />;' },
{ code: '<dfn onClick={() => {}} />;' },
{ code: '<dir onClick={() => {}} />;' },
{ code: '<dl onClick={() => {}} />;' },
{ code: '<dt onClick={() => {}} />;' },
{ code: '<em onClick={() => {}} />;' },
{ code: '<embed onClick={() => {}} />;' },
{ code: '<fieldset onClick={() => {}} />;' },
{ code: '<figcaption onClick={() => {}} />;' },
{ code: '<figure onClick={() => {}} />;' },
{ code: '<footer onClick={() => {}} />;' },
{ code: '<h1 onClick={() => {}} />;' },
{ code: '<h2 onClick={() => {}} />;' },
{ code: '<h3 onClick={() => {}} />;' },
{ code: '<h4 onClick={() => {}} />;' },
{ code: '<h5 onClick={() => {}} />;' },
{ code: '<h6 onClick={() => {}} />;' },
{ code: '<hr onClick={() => {}} />;' },
{ code: '<html onClick={() => {}} />;' },
{ code: '<iframe onClick={() => {}} />;' },
{ code: '<img onClick={() => {}} />;' },
{ code: '<ins onClick={() => {}} />;' },
{ code: '<label onClick={() => {}} />;' },
{ code: '<legend onClick={() => {}} />;' },
{ code: '<li onClick={() => {}} />;' },
{ code: '<main onClick={() => void 0} />;' },
{ code: '<mark onClick={() => {}} />;' },
{ code: '<marquee onClick={() => {}} />;' },
{ code: '<menu onClick={() => {}} />;' },
{ code: '<meter onClick={() => {}} />;' },
{ code: '<nav onClick={() => {}} />;' },
{ code: '<ol onClick={() => {}} />;' },
{ code: '<optgroup onClick={() => {}} />;' },
{ code: '<output onClick={() => {}} />;' },
{ code: '<p onClick={() => {}} />;' },
{ code: '<pre onClick={() => {}} />;' },
{ code: '<progress onClick={() => {}} />;' },
{ code: '<ruby onClick={() => {}} />;' },
{ code: '<section onClick={() => {}} aria-label="Aa" />;' },
{ code: '<section onClick={() => {}} aria-labelledby="js_1" />;' },
{ code: '<strong onClick={() => {}} />;' },
{ code: '<sub onClick={() => {}} />;' },
{ code: '<summary onClick={() => {}} />;' },
{ code: '<sup onClick={() => {}} />;' },
{ code: '<table onClick={() => {}} />;' },
{ code: '<tbody onClick={() => {}} />;' },
{ code: '<tfoot onClick={() => {}} />;' },
{ code: '<th onClick={() => {}} />;' },
{ code: '<thead onClick={() => {}} />;' },
{ code: '<time onClick={() => {}} />;' },
{ code: '<tr onClick={() => {}} />;' },
{ code: '<video onClick={() => {}} />;' },
{ code: '<ul onClick={() => {}} />;' },
/* HTML elements attributed with an abstract role */
{ code: '<div role="command" onClick={() => {}} />;' },
{ code: '<div role="composite" onClick={() => {}} />;' },
{ code: '<div role="input" onClick={() => {}} />;' },
{ code: '<div role="landmark" onClick={() => {}} />;' },
{ code: '<div role="range" onClick={() => {}} />;' },
{ code: '<div role="roletype" onClick={() => {}} />;' },
{ code: '<div role="sectionhead" onClick={() => {}} />;' },
{ code: '<div role="select" onClick={() => {}} />;' },
{ code: '<div role="structure" onClick={() => {}} />;' },
{ code: '<div role="widget" onClick={() => {}} />;' },
{ code: '<div role="window" onClick={() => {}} />;' },
/* HTML elements attributed with a non-interactive role */
{ code: '<div role="alert" onClick={() => {}} />;' },
{ code: '<div role="alertdialog" onClick={() => {}} />;' },
{ code: '<div role="application" onClick={() => {}} />;' },
{ code: '<div role="article" onClick={() => {}} />;' },
{ code: '<div role="banner" onClick={() => {}} />;' },
{ code: '<div role="cell" onClick={() => {}} />;' },
{ code: '<div role="complementary" onClick={() => {}} />;' },
{ code: '<div role="contentinfo" onClick={() => {}} />;' },
{ code: '<div role="definition" onClick={() => {}} />;' },
{ code: '<div role="dialog" onClick={() => {}} />;' },
{ code: '<div role="directory" onClick={() => {}} />;' },
{ code: '<div role="document" onClick={() => {}} />;' },
{ code: '<div role="feed" onClick={() => {}} />;' },
{ code: '<div role="figure" onClick={() => {}} />;' },
{ code: '<div role="grid" onClick={() => {}} />;' },
{ code: '<div role="group" onClick={() => {}} />;' },
{ code: '<div role="heading" onClick={() => {}} />;' },
{ code: '<div role="img" onClick={() => {}} />;' },
{ code: '<div role="list" onClick={() => {}} />;' },
{ code: '<div role="listbox" onClick={() => {}} />;' },
{ code: '<div role="listitem" onClick={() => {}} />;' },
{ code: '<div role="log" onClick={() => {}} />;' },
{ code: '<div role="main" onClick={() => {}} />;' },
{ code: '<div role="marquee" onClick={() => {}} />;' },
{ code: '<div role="math" onClick={() => {}} />;' },
{ code: '<div role="menu" onClick={() => {}} />;' },
{ code: '<div role="menubar" onClick={() => {}} />;' },
{ code: '<div role="navigation" onClick={() => {}} />;' },
{ code: '<div role="note" onClick={() => {}} />;' },
{ code: '<div role="progressbar" onClick={() => {}} />;' },
{ code: '<div role="radiogroup" onClick={() => {}} />;' },
{ code: '<div role="region" onClick={() => {}} />;' },
{ code: '<div role="row" onClick={() => {}} />;' },
{ code: '<div role="rowgroup" onClick={() => {}} />;' },
{ code: '<div role="section" onClick={() => {}} />;' },
{ code: '<div role="search" onClick={() => {}} />;' },
{ code: '<div role="separator" onClick={() => {}} />;' },
{ code: '<div role="scrollbar" onClick={() => {}} />;' },
{ code: '<div role="status" onClick={() => {}} />;' },
{ code: '<div role="table" onClick={() => {}} />;' },
{ code: '<div role="tablist" onClick={() => {}} />;' },
{ code: '<div role="tabpanel" onClick={() => {}} />;' },
// { code: '<td onClick={() => {}} />;' },
{ code: '<div role="term" onClick={() => {}} />;' },
{ code: '<div role="timer" onClick={() => {}} />;' },
{ code: '<div role="toolbar" onClick={() => {}} />;' },
{ code: '<div role="tooltip" onClick={() => {}} />;' },
{ code: '<div role="tree" onClick={() => {}} />;' },
{ code: '<div role="treegrid" onClick={() => {}} />;' },
// All the possible handlers
{ code: '<div onCopy={() => {}} />;' },
{ code: '<div onCut={() => {}} />;' },
{ code: '<div onPaste={() => {}} />;' },
{ code: '<div onCompositionEnd={() => {}} />;' },
{ code: '<div onCompositionStart={() => {}} />;' },
{ code: '<div onCompositionUpdate={() => {}} />;' },
{ code: '<div onChange={() => {}} />;' },
{ code: '<div onInput={() => {}} />;' },
{ code: '<div onSubmit={() => {}} />;' },
{ code: '<div onSelect={() => {}} />;' },
{ code: '<div onTouchCancel={() => {}} />;' },
{ code: '<div onTouchEnd={() => {}} />;' },
{ code: '<div onTouchMove={() => {}} />;' },
{ code: '<div onTouchStart={() => {}} />;' },
{ code: '<div onScroll={() => {}} />;' },
{ code: '<div onWheel={() => {}} />;' },
{ code: '<div onAbort={() => {}} />;' },
{ code: '<div onCanPlay={() => {}} />;' },
{ code: '<div onCanPlayThrough={() => {}} />;' },
{ code: '<div onDurationChange={() => {}} />;' },
{ code: '<div onEmptied={() => {}} />;' },
{ code: '<div onEncrypted={() => {}} />;' },
{ code: '<div onEnded={() => {}} />;' },
{ code: '<div onError={() => {}} />;' },
{ code: '<div onLoadedData={() => {}} />;' },
{ code: '<div onLoadedMetadata={() => {}} />;' },
{ code: '<div onLoadStart={() => {}} />;' },
{ code: '<div onPause={() => {}} />;' },
{ code: '<div onPlay={() => {}} />;' },
{ code: '<div onPlaying={() => {}} />;' },
{ code: '<div onProgress={() => {}} />;' },
{ code: '<div onRateChange={() => {}} />;' },
{ code: '<div onSeeked={() => {}} />;' },
{ code: '<div onSeeking={() => {}} />;' },
{ code: '<div onStalled={() => {}} />;' },
{ code: '<div onSuspend={() => {}} />;' },
{ code: '<div onTimeUpdate={() => {}} />;' },
{ code: '<div onVolumeChange={() => {}} />;' },
{ code: '<div onWaiting={() => {}} />;' },
{ code: '<div onLoad={() => {}} />;' },
{ code: '<div onError={() => {}} />;' },
{ code: '<div onAnimationStart={() => {}} />;' },
{ code: '<div onAnimationEnd={() => {}} />;' },
{ code: '<div onAnimationIteration={() => {}} />;' },
{ code: '<div onTransitionEnd={() => {}} />;' },
];
const neverValid = [
{ code: '<div onClick={() => void 0} />;', errors: [expectedError] },
{ code: '<div onClick={() => void 0} role={undefined} />;', errors: [expectedError] },
{ code: '<div onClick={() => void 0} {...props} />;', errors: [expectedError] },
{ code: '<div onKeyUp={() => void 0} aria-hidden={false} />;', errors: [expectedError] },
/* Static elements; no inherent role */
{ code: '<a onClick={() => {}} />;', errors: [expectedError] },
{ code: '<a onClick={() => void 0} />', errors: [expectedError] },
{ code: '<a tabIndex="0" onClick={() => void 0} />', errors: [expectedError] },
{ code: '<acronym onClick={() => {}} />;', errors: [expectedError] },
{ code: '<applet onClick={() => {}} />;', errors: [expectedError] },
{ code: '<area onClick={() => {}} />;', errors: [expectedError] },
{ code: '<b onClick={() => {}} />;', errors: [expectedError] },
{ code: '<base onClick={() => {}} />;', errors: [expectedError] },
{ code: '<bdi onClick={() => {}} />;', errors: [expectedError] },
{ code: '<bdo onClick={() => {}} />;', errors: [expectedError] },
{ code: '<big onClick={() => {}} />;', errors: [expectedError] },
{ code: '<blink onClick={() => {}} />;', errors: [expectedError] },
{ code: '<body onClick={() => {}} />;', errors: [expectedError] },
{ code: '<center onClick={() => {}} />;', errors: [expectedError] },
{ code: '<cite onClick={() => {}} />;', errors: [expectedError] },
{ code: '<col onClick={() => {}} />;', errors: [expectedError] },
{ code: '<colgroup onClick={() => {}} />;', errors: [expectedError] },
{ code: '<content onClick={() => {}} />;', errors: [expectedError] },
{ code: '<data onClick={() => {}} />;', errors: [expectedError] },
{ code: '<font onClick={() => {}} />;', errors: [expectedError] },
{ code: '<frame onClick={() => {}} />;', errors: [expectedError] },
{ code: '<frameset onClick={() => {}} />;', errors: [expectedError] },
{ code: '<head onClick={() => {}} />;', errors: [expectedError] },
{ code: '<header onClick={() => {}} />;', errors: [expectedError] },
{ code: '<hgroup onClick={() => {}} />;', errors: [expectedError] },
{ code: '<i onClick={() => {}} />;', errors: [expectedError] },
{ code: '<kbd onClick={() => {}} />;', errors: [expectedError] },
{ code: '<keygen onClick={() => {}} />;', errors: [expectedError] },
{ code: '<map onClick={() => {}} />;', errors: [expectedError] },
{ code: '<meta onClick={() => {}} />;', errors: [expectedError] },
{ code: '<noembed onClick={() => {}} />;', errors: [expectedError] },
{ code: '<noscript onClick={() => {}} />;', errors: [expectedError] },
{ code: '<object onClick={() => {}} />;', errors: [expectedError] },
{ code: '<param onClick={() => {}} />;', errors: [expectedError] },
{ code: '<picture onClick={() => {}} />;', errors: [expectedError] },
{ code: '<q onClick={() => {}} />;', errors: [expectedError] },
{ code: '<rp onClick={() => {}} />;', errors: [expectedError] },
{ code: '<rt onClick={() => {}} />;', errors: [expectedError] },
{ code: '<rtc onClick={() => {}} />;', errors: [expectedError] },
{ code: '<s onClick={() => {}} />;', errors: [expectedError] },
{ code: '<samp onClick={() => {}} />;', errors: [expectedError] },
{ code: '<script onClick={() => {}} />;', errors: [expectedError] },
{ code: '<section onClick={() => {}} />;', errors: [expectedError] },
{ code: '<small onClick={() => {}} />;', errors: [expectedError] },
{ code: '<source onClick={() => {}} />;', errors: [expectedError] },
{ code: '<spacer onClick={() => {}} />;', errors: [expectedError] },
{ code: '<span onClick={() => {}} />;', errors: [expectedError] },
{ code: '<strike onClick={() => {}} />;', errors: [expectedError] },
{ code: '<style onClick={() => {}} />;', errors: [expectedError] },
{ code: '<title onClick={() => {}} />;', errors: [expectedError] },
{ code: '<track onClick={() => {}} />;', errors: [expectedError] },
{ code: '<tt onClick={() => {}} />;', errors: [expectedError] },
{ code: '<u onClick={() => {}} />;', errors: [expectedError] },
{ code: '<var onClick={() => {}} />;', errors: [expectedError] },
{ code: '<wbr onClick={() => {}} />;', errors: [expectedError] },
{ code: '<xmp onClick={() => {}} />;', errors: [expectedError] },
// Handlers
{ code: '<div onKeyDown={() => {}} />;', errors: [expectedError] },
{ code: '<div onKeyPress={() => {}} />;', errors: [expectedError] },
{ code: '<div onKeyUp={() => {}} />;', errors: [expectedError] },
{ code: '<div onClick={() => {}} />;', errors: [expectedError] },
{ code: '<div onMouseDown={() => {}} />;', errors: [expectedError] },
{ code: '<div onMouseUp={() => {}} />;', errors: [expectedError] },
// Custom components
{ code: '<TestComponent onClick={doFoo} />', settings: componentsSettings, errors: [expectedError] },
];
const recommendedOptions = configs.recommended.rules[`jsx-a11y/${ruleName}`][1] || {};
ruleTester.run(`${ruleName}:recommended`, rule, {
valid: parsers.all([].concat(
alwaysValid,
// All the possible handlers
{ code: '<div onCopy={() => {}} />;' },
{ code: '<div onCut={() => {}} />;' },
{ code: '<div onPaste={() => {}} />;' },
{ code: '<div onCompositionEnd={() => {}} />;' },
{ code: '<div onCompositionStart={() => {}} />;' },
{ code: '<div onCompositionUpdate={() => {}} />;' },
{ code: '<div onFocus={() => {}} />;' },
{ code: '<div onBlur={() => {}} />;' },
{ code: '<div onChange={() => {}} />;' },
{ code: '<div onInput={() => {}} />;' },
{ code: '<div onSubmit={() => {}} />;' },
{ code: '<div onContextMenu={() => {}} />;' },
{ code: '<div onDblClick={() => {}} />;' },
{ code: '<div onDoubleClick={() => {}} />;' },
{ code: '<div onDrag={() => {}} />;' },
{ code: '<div onDragEnd={() => {}} />;' },
{ code: '<div onDragEnter={() => {}} />;' },
{ code: '<div onDragExit={() => {}} />;' },
{ code: '<div onDragLeave={() => {}} />;' },
{ code: '<div onDragOver={() => {}} />;' },
{ code: '<div onDragStart={() => {}} />;' },
{ code: '<div onDrop={() => {}} />;' },
{ code: '<div onMouseEnter={() => {}} />;' },
{ code: '<div onMouseLeave={() => {}} />;' },
{ code: '<div onMouseMove={() => {}} />;' },
{ code: '<div onMouseOut={() => {}} />;' },
{ code: '<div onMouseOver={() => {}} />;' },
{ code: '<div onSelect={() => {}} />;' },
{ code: '<div onTouchCancel={() => {}} />;' },
{ code: '<div onTouchEnd={() => {}} />;' },
{ code: '<div onTouchMove={() => {}} />;' },
{ code: '<div onTouchStart={() => {}} />;' },
{ code: '<div onScroll={() => {}} />;' },
{ code: '<div onWheel={() => {}} />;' },
{ code: '<div onAbort={() => {}} />;' },
{ code: '<div onCanPlay={() => {}} />;' },
{ code: '<div onCanPlayThrough={() => {}} />;' },
{ code: '<div onDurationChange={() => {}} />;' },
{ code: '<div onEmptied={() => {}} />;' },
{ code: '<div onEncrypted={() => {}} />;' },
{ code: '<div onEnded={() => {}} />;' },
{ code: '<div onError={() => {}} />;' },
{ code: '<div onLoadedData={() => {}} />;' },
{ code: '<div onLoadedMetadata={() => {}} />;' },
{ code: '<div onLoadStart={() => {}} />;' },
{ code: '<div onPause={() => {}} />;' },
{ code: '<div onPlay={() => {}} />;' },
{ code: '<div onPlaying={() => {}} />;' },
{ code: '<div onProgress={() => {}} />;' },
{ code: '<div onRateChange={() => {}} />;' },
{ code: '<div onSeeked={() => {}} />;' },
{ code: '<div onSeeking={() => {}} />;' },
{ code: '<div onStalled={() => {}} />;' },
{ code: '<div onSuspend={() => {}} />;' },
{ code: '<div onTimeUpdate={() => {}} />;' },
{ code: '<div onVolumeChange={() => {}} />;' },
{ code: '<div onWaiting={() => {}} />;' },
{ code: '<div onLoad={() => {}} />;' },
{ code: '<div onError={() => {}} />;' },
{ code: '<div onAnimationStart={() => {}} />;' },
{ code: '<div onAnimationEnd={() => {}} />;' },
{ code: '<div onAnimationIteration={() => {}} />;' },
{ code: '<div onTransitionEnd={() => {}} />;' },
// Expressions should pass in recommended mode
{ code: '<div role={ROLE_BUTTON} onClick={() => {}} />;' },
{ code: '<div {...this.props} role={this.props.role} onKeyPress={e => this.handleKeyPress(e)}>{this.props.children}</div>' },
// Cases for allowExpressionValues set to true
{
code: '<div role={BUTTON} onClick={() => {}} />;',
options: [{ allowExpressionValues: true }],
},
// Specific case for ternary operator with literals on both side
{
code: '<div role={isButton ? "button" : "link"} onClick={() => {}} />;',
options: [{ allowExpressionValues: true }],
},
{
code: '<div role={isButton ? "button" : LINK} onClick={() => {}} />;',
options: [{ allowExpressionValues: true }],
errors: [expectedError],
},
{
code: '<div role={isButton ? BUTTON : LINK} onClick={() => {}} />;',
options: [{ allowExpressionValues: true }],
errors: [expectedError],
},
))
.map(ruleOptionsMapperFactory(recommendedOptions))
.map(parserOptionsMapper),
invalid: parsers.all([].concat(
neverValid,
))
.map(ruleOptionsMapperFactory(recommendedOptions))
.map(parserOptionsMapper),
});
ruleTester.run(`${ruleName}:strict`, rule, {
valid: parsers.all([].concat(
alwaysValid,
)).map(parserOptionsMapper),
invalid: parsers.all([].concat(
neverValid,
// All the possible handlers
{ code: '<div onContextMenu={() => {}} />;', errors: [expectedError] },
{ code: '<div onDblClick={() => {}} />;', errors: [expectedError] },
{ code: '<div onDoubleClick={() => {}} />;', errors: [expectedError] },
{ code: '<div onDrag={() => {}} />;', errors: [expectedError] },
{ code: '<div onDragEnd={() => {}} />;', errors: [expectedError] },
{ code: '<div onDragEnter={() => {}} />;', errors: [expectedError] },
{ code: '<div onDragExit={() => {}} />;', errors: [expectedError] },
{ code: '<div onDragLeave={() => {}} />;', errors: [expectedError] },
{ code: '<div onDragOver={() => {}} />;', errors: [expectedError] },
{ code: '<div onDragStart={() => {}} />;', errors: [expectedError] },
{ code: '<div onDrop={() => {}} />;', errors: [expectedError] },
{ code: '<div onMouseEnter={() => {}} />;', errors: [expectedError] },
{ code: '<div onMouseLeave={() => {}} />;', errors: [expectedError] },
{ code: '<div onMouseMove={() => {}} />;', errors: [expectedError] },
{ code: '<div onMouseOut={() => {}} />;', errors: [expectedError] },
{ code: '<div onMouseOver={() => {}} />;', errors: [expectedError] },
// Expressions should fail in strict mode
{ code: '<div role={ROLE_BUTTON} onClick={() => {}} />;', errors: [expectedError] },
{ code: '<div {...this.props} role={this.props.role} onKeyPress={e => this.handleKeyPress(e)}>{this.props.children}</div>', errors: [expectedError] },
// Cases for allowExpressionValues set to false
{
code: '<div role={BUTTON} onClick={() => {}} />;',
options: [{ allowExpressionValues: false }],
errors: [expectedError],
},
// Specific case for ternary operator with literals on both side
{
code: '<div role={isButton ? "button" : "link"} onClick={() => {}} />;',
options: [{ allowExpressionValues: false }],
errors: [expectedError],
},
)).map(parserOptionsMapper),
});
@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = rect2contour;
/**
* @file 矩形转换成轮廓
* @author mengke01(kekee000@gmail.com)
*/
/**
* 矩形转换成轮廓
*
* @param {number} x 左上角x
* @param {number} y 左上角y
* @param {number} width 宽度
* @param {number} height 高度
* @return {Array} 轮廓数组
*/
function rect2contour(x, y, width, height) {
x = +x;
y = +y;
width = +width;
height = +height;
return [{
x: x,
y: y,
onCurve: true
}, {
x: x + width,
y: y,
onCurve: true
}, {
x: x + width,
y: y + height,
onCurve: true
}, {
x: x,
y: y + height,
onCurve: true
}];
}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=issue_543.int.spec.d.ts.map
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,oBAAoB,CAAC,mEAAmE,CAAC;AAC7G","sources":["packages/@react-aria/menu/intl/nl-NL.json"],"sourcesContent":["{\n \"longPressMessage\": \"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen\"\n}\n"],"names":[],"version":3,"file":"nl-NL.main.js.map"}
@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Entries = Entries;
exports.Clear = Clear;
exports.Delete = Delete;
exports.Has = Has;
exports.Set = Set;
exports.Get = Get;
/** A registry for user defined string formats */
const map = new Map();
/** Returns the entries in this registry */
function Entries() {
return new Map(map);
}
/** Clears all user defined string formats */
function Clear() {
return map.clear();
}
/** Deletes a registered format */
function Delete(format) {
return map.delete(format);
}
/** Returns true if the user defined string format exists */
function Has(format) {
return map.has(format);
}
/** Sets a validation function for a user defined string format */
function Set(format, func) {
map.set(format, func);
}
/** Gets a validation function for a user defined string format */
function Get(format) {
return map.get(format);
}
@@ -0,0 +1,6 @@
import {
SuccessIcon
} from "./chunk-AMTP7UL3.mjs";
export {
SuccessIcon
};
@@ -0,0 +1,617 @@
export default `flf2a$ 6 3 8 0 3
Cursive By Joan Stark
Website: http://www.geocities.com/SoHo/7373/
Figlet conversion by patorjk, April 17, 2008
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
__, @
(_/(_@
@
@
@@
@
/_@
_/_)@
@
@
@@
@
__ @
_(_,_@
@
@
@@
@
__/ @
_(_/(_@
@
@
@@
@
_ @
_(/_@
@
@
@@
@
/)@
_//_@
_/ @
/) @
\` @@
@
__ @
_(_/_@
_/_ @
(/ @
@@
@
/_ @
_/ (_@
@
@
@@
@
.@
_/_@
@
@
@@
@
.@
_/_@
_/_ @
(/ @
@@
@
/,@
_/(_@
@
@
@@
_@
//@
_(/_@
@
@
@@
@
,____, @
_/ / / (_@
@
@
@@
@
,__, @
_/ / (_@
@
@
@@
@
_,_@
_(_/ @
@
@
@@
@
,_ @
_/_)_@
/ @
/ @
@@
@
__ @
_(_/_@
_/ @
/) @
\` @@
@
,_ @
_/ (_@
@
@
@@
@
, @
_/_)_@
@
@
@@
@
-/-@
_/_ @
@
@
@@
@
@
_(_/_@
@
@
@@
@
_, @
(_/_@
@
@
@@
@
,_@
_/_/_/ @
@
@
@@
_ ,_@
_/ )/ @
_/(_ @
@
@
@@
@
_(_/_@
_/_ @
(/ @
@
@@
@
_/)_ @
_/_@
(/ @
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
__, @
(_/(_@
@
@
@@
@
/_@
_/_)@
@
@
@@
@
__ @
_(_,_@
@
@
@@
@
__/ @
_(_/(_@
@
@
@@
@
_ @
_(/_@
@
@
@@
@
/)@
_//_@
_/ @
/) @
\` @@
@
__ @
_(_/_@
_/_ @
(/ @
@@
@
/_ @
_/ (_@
@
@
@@
@
.@
_/_@
@
@
@@
@
.@
_/_@
_/_ @
(/ @
@@
@
/,@
_/(_@
@
@
@@
_@
//@
_(/_@
@
@
@@
@
,____, @
_/ / / (_@
@
@
@@
@
,__, @
_/ / (_@
@
@
@@
@
_,_@
_(_/ @
@
@
@@
@
,_ @
_/_)_@
/ @
/ @
@@
@
__ @
_(_/_@
_/ @
/) @
\` @@
@
,_ @
_/ (_@
@
@
@@
@
, @
_/_)_@
@
@
@@
@
-/-@
_/_ @
@
@
@@
@
@
_(_/_@
@
@
@@
@
_, @
(_/_@
@
@
@@
@
,_@
_/_/_/ @
@
@
@@
_ ,_@
_/ )/ @
_/(_ @
@
@
@@
@
@
_(_/_@
_/_ @
(/ @
@@
@
@
_/)_ @
_/_@
(/ @
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
`
@@ -0,0 +1,12 @@
import { GroupAnimationWithThen } from 'motion-dom';
import { animateElements } from './animate-elements.mjs';
const createScopedWaapiAnimate = (scope) => {
function scopedAnimate(elementOrSelector, keyframes, options) {
return new GroupAnimationWithThen(animateElements(elementOrSelector, keyframes, options, scope));
}
return scopedAnimate;
};
const animateMini = /*@__PURE__*/ createScopedWaapiAnimate();
export { animateMini, createScopedWaapiAnimate };
@@ -0,0 +1,72 @@
import SetCache from './_SetCache.js';
import arrayIncludes from './_arrayIncludes.js';
import arrayIncludesWith from './_arrayIncludesWith.js';
import cacheHas from './_cacheHas.js';
import createSet from './_createSet.js';
import setToArray from './_setToArray.js';
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* The base implementation of `_.uniqBy` without support for iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new duplicate free array.
*/
function baseUniq(array, iteratee, comparator) {
var index = -1,
includes = arrayIncludes,
length = array.length,
isCommon = true,
result = [],
seen = result;
if (comparator) {
isCommon = false;
includes = arrayIncludesWith;
}
else if (length >= LARGE_ARRAY_SIZE) {
var set = iteratee ? null : createSet(array);
if (set) {
return setToArray(set);
}
isCommon = false;
includes = cacheHas;
seen = new SetCache;
}
else {
seen = iteratee ? [] : result;
}
outer:
while (++index < length) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
value = (comparator || value !== 0) ? value : 0;
if (isCommon && computed === computed) {
var seenIndex = seen.length;
while (seenIndex--) {
if (seen[seenIndex] === computed) {
continue outer;
}
}
if (iteratee) {
seen.push(computed);
}
result.push(value);
}
else if (!includes(seen, computed, comparator)) {
if (seen !== result) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
export default baseUniq;
@@ -0,0 +1,44 @@
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var inspect = require('object-inspect');
var Call = require('./Call');
var Get = require('./Get');
var GetIterator = require('./GetIterator');
var IsCallable = require('./IsCallable');
var IteratorClose = require('./IteratorClose');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
var ThrowCompletion = require('./ThrowCompletion');
// https://262.ecma-international.org/10.0/#sec-add-entries-from-iterable
module.exports = function AddEntriesFromIterable(target, iterable, adder) {
if (!IsCallable(adder)) {
throw new $TypeError('Assertion failed: `adder` is not callable');
}
if (iterable == null) {
throw new $TypeError('Assertion failed: `iterable` is present, and not nullish');
}
var iteratorRecord = GetIterator(iterable);
while (true) { // eslint-disable-line no-constant-condition
var next = IteratorStep(iteratorRecord);
if (!next) {
return target;
}
var nextItem = IteratorValue(next);
if (!isObject(nextItem)) {
var error = ThrowCompletion(new $TypeError('iterator next must return an Object, got ' + inspect(nextItem)));
return IteratorClose(iteratorRecord, error);
}
try {
var k = Get(nextItem, '0');
var v = Get(nextItem, '1');
Call(adder, target, [k, v]);
} catch (e) {
return IteratorClose(iteratorRecord, ThrowCompletion(e));
}
}
};
@@ -0,0 +1,29 @@
'use strict';
var config = {
buffer: {
type: 'boolean',
default: true,
},
read: {
type: 'boolean',
default: true,
},
since: {
type: 'date',
},
removeBOM: {
type: 'boolean',
default: true,
},
sourcemaps: {
type: 'boolean',
default: false,
},
resolveSymlinks: {
type: 'boolean',
default: true,
},
};
module.exports = config;
@@ -0,0 +1 @@
{"mappings":"AAAO,MAAM,4CAAmB,CAAC;QACxB;IAAP,OAAO,CAAA,oBAAA,eAAA,yBAAA,GAAI,aAAa,cAAjB,+BAAA,oBAAqB;AAC9B;AAEO,MAAM,4CAAiB,CAC5B;IAEA,IAAI,MAAM,YAAY,MAAM,GAAG,MAAM,KAAK,IACxC,OAAO;IAGT,MAAM,MAAM,0CAAiB;IAC7B,OAAO,IAAI,WAAW,IAAI;AAC5B;AAEA;;CAEC,GACD,SAAS,6BAAO,KAAc;IAC5B,OAAO,UAAU,QACf,OAAO,UAAU,YACjB,cAAc,SACd,OAAO,AAAC,MAAe,QAAQ,KAAK;AACxC;AAKO,SAAS,0CAAa,IAAiB;IAC5C,OAAO,6BAAO,SACZ,KAAK,QAAQ,KAAK,KAAK,sBAAsB,IAC7C,UAAU;AACd","sources":["packages/@react-aria/utils/src/domHelpers.ts"],"sourcesContent":["export const getOwnerDocument = (el: Element | null | undefined): Document => {\n return el?.ownerDocument ?? document;\n};\n\nexport const getOwnerWindow = (\n el: (Window & typeof global) | Element | null | undefined\n): Window & typeof global => {\n if (el && 'window' in el && el.window === el) {\n return el;\n }\n\n const doc = getOwnerDocument(el as Element | null | undefined);\n return doc.defaultView || window;\n};\n\n/**\n * Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType property.\n */\nfunction isNode(value: unknown): value is Node {\n return value !== null &&\n typeof value === 'object' &&\n 'nodeType' in value &&\n typeof (value as Node).nodeType === 'number';\n}\n/**\n * Type guard that checks if a node is a ShadowRoot. Uses nodeType and host property checks to\n * distinguish ShadowRoot from other DocumentFragments.\n */\nexport function isShadowRoot(node: Node | null): node is ShadowRoot {\n return isNode(node) &&\n node.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&\n 'host' in node;\n}\n"],"names":[],"version":3,"file":"domHelpers.module.js.map"}
@@ -0,0 +1,26 @@
extends: eslint:recommended
env:
node: true
browser: true
rules:
block-scoped-var: 2
callback-return: 2
dot-notation: 2
indent: 2
linebreak-style: [2, unix]
new-cap: 2
no-console: [2, allow: [warn, error]]
no-else-return: 2
no-eq-null: 2
no-fallthrough: 2
no-invalid-this: 2
no-return-assign: 2
no-shadow: 1
no-trailing-spaces: 2
no-use-before-define: [2, nofunc]
quotes: [2, single, avoid-escape]
semi: [2, always]
strict: [2, global]
valid-jsdoc: [2, requireReturn: false]
no-control-regex: 0
no-useless-escape: 2
@@ -0,0 +1,231 @@
import {disableTextSelection as $14c0b72509d70225$export$16a4697467175487, restoreTextSelection as $14c0b72509d70225$export$b0d6fa1ab32e3295} from "./textSelection.mjs";
import {useRef as $5GN7j$useRef, useMemo as $5GN7j$useMemo} from "react";
import {useGlobalListeners as $5GN7j$useGlobalListeners, useEffectEvent as $5GN7j$useEffectEvent} from "@react-aria/utils";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $e8a7022cf87cba2a$export$36da96379f79f245(props) {
let { onMoveStart: onMoveStart, onMove: onMove, onMoveEnd: onMoveEnd } = props;
let state = (0, $5GN7j$useRef)({
didMove: false,
lastPosition: null,
id: null
});
let { addGlobalListener: addGlobalListener, removeGlobalListener: removeGlobalListener } = (0, $5GN7j$useGlobalListeners)();
let move = (0, $5GN7j$useEffectEvent)((originalEvent, pointerType, deltaX, deltaY)=>{
if (deltaX === 0 && deltaY === 0) return;
if (!state.current.didMove) {
state.current.didMove = true;
onMoveStart === null || onMoveStart === void 0 ? void 0 : onMoveStart({
type: 'movestart',
pointerType: pointerType,
shiftKey: originalEvent.shiftKey,
metaKey: originalEvent.metaKey,
ctrlKey: originalEvent.ctrlKey,
altKey: originalEvent.altKey
});
}
onMove === null || onMove === void 0 ? void 0 : onMove({
type: 'move',
pointerType: pointerType,
deltaX: deltaX,
deltaY: deltaY,
shiftKey: originalEvent.shiftKey,
metaKey: originalEvent.metaKey,
ctrlKey: originalEvent.ctrlKey,
altKey: originalEvent.altKey
});
});
let end = (0, $5GN7j$useEffectEvent)((originalEvent, pointerType)=>{
(0, $14c0b72509d70225$export$b0d6fa1ab32e3295)();
if (state.current.didMove) onMoveEnd === null || onMoveEnd === void 0 ? void 0 : onMoveEnd({
type: 'moveend',
pointerType: pointerType,
shiftKey: originalEvent.shiftKey,
metaKey: originalEvent.metaKey,
ctrlKey: originalEvent.ctrlKey,
altKey: originalEvent.altKey
});
});
let moveProps = (0, $5GN7j$useMemo)(()=>{
let moveProps = {};
let start = ()=>{
(0, $14c0b72509d70225$export$16a4697467175487)();
state.current.didMove = false;
};
if (typeof PointerEvent === 'undefined') {
let onMouseMove = (e)=>{
if (e.button === 0) {
var _state_current_lastPosition, _state_current_lastPosition1;
var _state_current_lastPosition_pageX, _state_current_lastPosition_pageY;
move(e, 'mouse', e.pageX - ((_state_current_lastPosition_pageX = (_state_current_lastPosition = state.current.lastPosition) === null || _state_current_lastPosition === void 0 ? void 0 : _state_current_lastPosition.pageX) !== null && _state_current_lastPosition_pageX !== void 0 ? _state_current_lastPosition_pageX : 0), e.pageY - ((_state_current_lastPosition_pageY = (_state_current_lastPosition1 = state.current.lastPosition) === null || _state_current_lastPosition1 === void 0 ? void 0 : _state_current_lastPosition1.pageY) !== null && _state_current_lastPosition_pageY !== void 0 ? _state_current_lastPosition_pageY : 0));
state.current.lastPosition = {
pageX: e.pageX,
pageY: e.pageY
};
}
};
let onMouseUp = (e)=>{
if (e.button === 0) {
end(e, 'mouse');
removeGlobalListener(window, 'mousemove', onMouseMove, false);
removeGlobalListener(window, 'mouseup', onMouseUp, false);
}
};
moveProps.onMouseDown = (e)=>{
if (e.button === 0) {
start();
e.stopPropagation();
e.preventDefault();
state.current.lastPosition = {
pageX: e.pageX,
pageY: e.pageY
};
addGlobalListener(window, 'mousemove', onMouseMove, false);
addGlobalListener(window, 'mouseup', onMouseUp, false);
}
};
let onTouchMove = (e)=>{
let touch = [
...e.changedTouches
].findIndex(({ identifier: identifier })=>identifier === state.current.id);
if (touch >= 0) {
var _state_current_lastPosition, _state_current_lastPosition1;
let { pageX: pageX, pageY: pageY } = e.changedTouches[touch];
var _state_current_lastPosition_pageX, _state_current_lastPosition_pageY;
move(e, 'touch', pageX - ((_state_current_lastPosition_pageX = (_state_current_lastPosition = state.current.lastPosition) === null || _state_current_lastPosition === void 0 ? void 0 : _state_current_lastPosition.pageX) !== null && _state_current_lastPosition_pageX !== void 0 ? _state_current_lastPosition_pageX : 0), pageY - ((_state_current_lastPosition_pageY = (_state_current_lastPosition1 = state.current.lastPosition) === null || _state_current_lastPosition1 === void 0 ? void 0 : _state_current_lastPosition1.pageY) !== null && _state_current_lastPosition_pageY !== void 0 ? _state_current_lastPosition_pageY : 0));
state.current.lastPosition = {
pageX: pageX,
pageY: pageY
};
}
};
let onTouchEnd = (e)=>{
let touch = [
...e.changedTouches
].findIndex(({ identifier: identifier })=>identifier === state.current.id);
if (touch >= 0) {
end(e, 'touch');
state.current.id = null;
removeGlobalListener(window, 'touchmove', onTouchMove);
removeGlobalListener(window, 'touchend', onTouchEnd);
removeGlobalListener(window, 'touchcancel', onTouchEnd);
}
};
moveProps.onTouchStart = (e)=>{
if (e.changedTouches.length === 0 || state.current.id != null) return;
let { pageX: pageX, pageY: pageY, identifier: identifier } = e.changedTouches[0];
start();
e.stopPropagation();
e.preventDefault();
state.current.lastPosition = {
pageX: pageX,
pageY: pageY
};
state.current.id = identifier;
addGlobalListener(window, 'touchmove', onTouchMove, false);
addGlobalListener(window, 'touchend', onTouchEnd, false);
addGlobalListener(window, 'touchcancel', onTouchEnd, false);
};
} else {
let onPointerMove = (e)=>{
if (e.pointerId === state.current.id) {
var _state_current_lastPosition, _state_current_lastPosition1;
let pointerType = e.pointerType || 'mouse';
var _state_current_lastPosition_pageX, _state_current_lastPosition_pageY;
// Problems with PointerEvent#movementX/movementY:
// 1. it is always 0 on macOS Safari.
// 2. On Chrome Android, it's scaled by devicePixelRatio, but not on Chrome macOS
move(e, pointerType, e.pageX - ((_state_current_lastPosition_pageX = (_state_current_lastPosition = state.current.lastPosition) === null || _state_current_lastPosition === void 0 ? void 0 : _state_current_lastPosition.pageX) !== null && _state_current_lastPosition_pageX !== void 0 ? _state_current_lastPosition_pageX : 0), e.pageY - ((_state_current_lastPosition_pageY = (_state_current_lastPosition1 = state.current.lastPosition) === null || _state_current_lastPosition1 === void 0 ? void 0 : _state_current_lastPosition1.pageY) !== null && _state_current_lastPosition_pageY !== void 0 ? _state_current_lastPosition_pageY : 0));
state.current.lastPosition = {
pageX: e.pageX,
pageY: e.pageY
};
}
};
let onPointerUp = (e)=>{
if (e.pointerId === state.current.id) {
let pointerType = e.pointerType || 'mouse';
end(e, pointerType);
state.current.id = null;
removeGlobalListener(window, 'pointermove', onPointerMove, false);
removeGlobalListener(window, 'pointerup', onPointerUp, false);
removeGlobalListener(window, 'pointercancel', onPointerUp, false);
}
};
moveProps.onPointerDown = (e)=>{
if (e.button === 0 && state.current.id == null) {
start();
e.stopPropagation();
e.preventDefault();
state.current.lastPosition = {
pageX: e.pageX,
pageY: e.pageY
};
state.current.id = e.pointerId;
addGlobalListener(window, 'pointermove', onPointerMove, false);
addGlobalListener(window, 'pointerup', onPointerUp, false);
addGlobalListener(window, 'pointercancel', onPointerUp, false);
}
};
}
let triggerKeyboardMove = (e, deltaX, deltaY)=>{
start();
move(e, 'keyboard', deltaX, deltaY);
end(e, 'keyboard');
};
moveProps.onKeyDown = (e)=>{
switch(e.key){
case 'Left':
case 'ArrowLeft':
e.preventDefault();
e.stopPropagation();
triggerKeyboardMove(e, -1, 0);
break;
case 'Right':
case 'ArrowRight':
e.preventDefault();
e.stopPropagation();
triggerKeyboardMove(e, 1, 0);
break;
case 'Up':
case 'ArrowUp':
e.preventDefault();
e.stopPropagation();
triggerKeyboardMove(e, 0, -1);
break;
case 'Down':
case 'ArrowDown':
e.preventDefault();
e.stopPropagation();
triggerKeyboardMove(e, 0, 1);
break;
}
};
return moveProps;
}, [
state,
addGlobalListener,
removeGlobalListener,
move,
end
]);
return {
moveProps: moveProps
};
}
export {$e8a7022cf87cba2a$export$36da96379f79f245 as useMove};
//# sourceMappingURL=useMove.module.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F wC","8":"A B"},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","8":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 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 0C 1C","8":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB","456":"vB wB xB yB zB 0B 1B 2B 3B","712":"UC 4B VC 5B"},D:{"1":"0 1 2 3 4 5 AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB","8":"xB yB","132":"zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B"},E:{"2":"J ZB K D 2C ZC 3C 4C 5C","8":"E F A 6C","132":"B C L M G aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"1":"0 1 2 3 4 5 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB FD GD HD ID NC uC JD OC","132":"mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD","132":"SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB pD qD rD sD aC tD uD vD wD xD QC RC SC yD","2":"J","132":"oD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","8":"1D"}},B:1,C:"Custom Elements (V1)",D:true};
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_static_private_field_destructure.cjs",
"module": "../../esm/_class_static_private_field_destructure.js"
}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"K D E wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"1":"J ZB K D E F A B C L M G 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","16":"2C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 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","16":"F"},G:{"1":"E 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","16":"ZC"},H:{"1":"hD"},I:{"1":"TC J I kD lD vC mD nD","16":"iD jD"},J:{"1":"D A"},K:{"1":"A B C H NC uC OC"},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:1,C:"Node.textContent",D:true};
@@ -0,0 +1,46 @@
'use strict';
var test = require('tape');
var inspect = require('object-inspect');
var forEach = require('for-each');
var v = require('es-value-fixtures');
var whichBoxedPrimitive = require('../');
var objects = [
/a/g,
new Date(),
function () {},
[],
{}
].concat(v.objects);
test('isBoxedPrimitive', function (t) {
t.test('unboxed primitives', function (st) {
forEach(v.primitives, function (primitive) {
st.equal(null, whichBoxedPrimitive(primitive), inspect(primitive) + ' is a primitive, but not a boxed primitive');
});
st.end();
});
t.test('boxed primitives', function (st) {
forEach(v.primitives, function (primitive) {
if (primitive != null) { // eslint-disable-line eqeqeq
var boxed = Object(primitive);
var expected = boxed.constructor.name;
st.equal(typeof expected, 'string', 'expected is string');
st.equal(whichBoxedPrimitive(boxed), expected, inspect(boxed) + ' is a boxed primitive: ' + expected);
}
});
st.end();
});
t.test('non-primitive objects', function (st) {
forEach(objects, function (object) {
st.equal(undefined, whichBoxedPrimitive(object), inspect(object) + ' is not a primitive, boxed or otherwise');
});
st.end();
});
t.end();
});
@@ -0,0 +1,7 @@
"use client";
import {
useScrollShadow
} from "./chunk-XKHEX3UH.mjs";
export {
useScrollShadow
};
@@ -0,0 +1,154 @@
"use client";
// src/use-snippet.ts
import { snippet } from "@heroui/theme";
import { mapPropsVariants, useProviderContext } from "@heroui/system";
import { useDOMRef, filterDOMProps } from "@heroui/react-utils";
import { clsx, dataAttr, objectToDeps } from "@heroui/shared-utils";
import { useClipboard } from "@heroui/use-clipboard";
import { useFocusRing } from "@react-aria/focus";
import { useMemo, useCallback, useRef } from "react";
function useSnippet(originalProps) {
var _a, _b, _c, _d;
const globalContext = useProviderContext();
const [props, variantProps] = mapPropsVariants(originalProps, snippet.variantKeys);
const {
ref,
as,
children,
symbol = "$",
classNames,
timeout,
copyIcon,
checkIcon,
codeString,
disableCopy = false,
disableTooltip = false,
hideCopyButton = false,
autoFocus = false,
hideSymbol = false,
onCopy: onCopyProp,
tooltipProps: userTooltipProps = {},
copyButtonProps: userButtonProps = {},
className,
...otherProps
} = props;
const Component = as || "div";
const shouldFilterDOMProps = typeof Component === "string";
const disableAnimation = (_b = (_a = originalProps == null ? void 0 : originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const tooltipProps = {
offset: 15,
delay: 1e3,
content: "Copy to clipboard",
color: (_d = originalProps == null ? void 0 : originalProps.color) != null ? _d : (_c = snippet.defaultVariants) == null ? void 0 : _c.color,
isDisabled: props.disableCopy,
...userTooltipProps
};
const domRef = useDOMRef(ref);
const preRef = useRef(null);
const { copy, copied } = useClipboard({ timeout });
const isMultiLine = children && Array.isArray(children);
const { isFocusVisible, isFocused, focusProps } = useFocusRing({
autoFocus
});
const slots = useMemo(
() => snippet({
...variantProps,
disableAnimation
}),
[objectToDeps(variantProps), disableAnimation]
);
const symbolBefore = useMemo(() => {
if (!symbol || typeof symbol !== "string")
return symbol;
const str = symbol.trim();
return str ? `${str} ` : "";
}, [symbol]);
const baseStyles = clsx(classNames == null ? void 0 : classNames.base, className);
const getSnippetProps = useCallback(
() => ({
className: slots.base({
class: baseStyles
}),
...filterDOMProps(otherProps, {
enabled: shouldFilterDOMProps
})
}),
[slots, baseStyles, isMultiLine, otherProps]
);
const onCopy = useCallback(() => {
var _a2;
if (disableCopy) {
return;
}
let stringValue = "";
if (typeof children === "string") {
stringValue = children;
} else if (Array.isArray(children)) {
children.forEach((child) => {
var _a3, _b2;
const childString = typeof child === "string" ? child : (_b2 = (_a3 = child == null ? void 0 : child.props) == null ? void 0 : _a3.children) == null ? void 0 : _b2.toString();
if (childString) {
stringValue += childString + "\n";
}
});
}
const valueToCopy = codeString || stringValue || ((_a2 = preRef.current) == null ? void 0 : _a2.textContent) || "";
copy(valueToCopy);
onCopyProp == null ? void 0 : onCopyProp(valueToCopy);
}, [copy, codeString, disableCopy, onCopyProp, children]);
const copyButtonProps = {
"aria-label": typeof tooltipProps.content === "string" ? tooltipProps.content : "Copy to clipboard",
size: "sm",
variant: "light",
isDisabled: disableCopy,
onPress: onCopy,
isIconOnly: true,
...userButtonProps
};
const getCopyButtonProps = useCallback(
() => ({
...copyButtonProps,
"data-copied": dataAttr(copied),
className: slots.copyButton({
class: clsx(classNames == null ? void 0 : classNames.copyButton)
})
}),
[
slots,
isFocusVisible,
isFocused,
disableCopy,
classNames == null ? void 0 : classNames.copyButton,
copyButtonProps,
focusProps
]
);
return {
Component,
as,
domRef,
preRef,
children,
slots,
classNames,
copied,
onCopy,
copyIcon,
checkIcon,
symbolBefore,
isMultiLine,
isFocusVisible,
hideCopyButton,
disableCopy,
disableTooltip,
hideSymbol,
tooltipProps,
getSnippetProps,
getCopyButtonProps
};
}
export {
useSnippet
};
@@ -0,0 +1,142 @@
"use client";
import {
virtualized_table_default
} from "./chunk-LSK6ZGMB.mjs";
import {
table_select_all_checkbox_default
} from "./chunk-YQRLDUCT.mjs";
import {
useTable
} from "./chunk-6QNXQNN7.mjs";
import {
table_body_default
} from "./chunk-SU3P7OYB.mjs";
import {
table_column_header_default
} from "./chunk-SAU5MAVM.mjs";
import {
table_header_row_default
} from "./chunk-UWYZDOES.mjs";
import {
table_row_group_default
} from "./chunk-UHE3PMQE.mjs";
// src/table.tsx
import { useCallback } from "react";
import { Spacer } from "@heroui/spacer";
import { forwardRef } from "@heroui/system";
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
var Table = forwardRef((props, ref) => {
const {
BaseComponent,
Component,
collection,
values,
topContent,
topContentPlacement,
bottomContentPlacement,
bottomContent,
removeWrapper,
sortIcon,
getBaseProps,
getWrapperProps,
getTableProps
} = useTable({
...props,
ref
});
const { isVirtualized, rowHeight = 40, maxTableHeight = 600 } = props;
const shouldVirtualize = isVirtualized;
const Wrapper = useCallback(
({ children }) => {
if (removeWrapper) {
return children;
}
return /* @__PURE__ */ jsx(BaseComponent, { ...getWrapperProps(), children });
},
[removeWrapper, getWrapperProps]
);
if (shouldVirtualize) {
return /* @__PURE__ */ jsx(
virtualized_table_default,
{
...props,
ref,
maxTableHeight,
rowHeight
}
);
}
return /* @__PURE__ */ jsxs("div", { ...getBaseProps(), children: [
topContentPlacement === "outside" && topContent,
/* @__PURE__ */ jsx(Wrapper, { children: /* @__PURE__ */ jsxs(Fragment, { children: [
topContentPlacement === "inside" && topContent,
/* @__PURE__ */ jsxs(Component, { ...getTableProps(), children: [
/* @__PURE__ */ jsxs(table_row_group_default, { classNames: values.classNames, slots: values.slots, children: [
collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx(
table_header_row_default,
{
classNames: values.classNames,
node: headerRow,
slots: values.slots,
state: values.state,
children: [...headerRow.childNodes].map(
(column) => {
var _a;
return ((_a = column == null ? void 0 : column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx(
table_select_all_checkbox_default,
{
checkboxesProps: values.checkboxesProps,
classNames: values.classNames,
color: values.color,
disableAnimation: values.disableAnimation,
node: column,
selectionMode: values.selectionMode,
slots: values.slots,
state: values.state
},
column == null ? void 0 : column.key
) : /* @__PURE__ */ jsx(
table_column_header_default,
{
classNames: values.classNames,
node: column,
slots: values.slots,
sortIcon,
state: values.state
},
column == null ? void 0 : column.key
);
}
)
},
headerRow == null ? void 0 : headerRow.key
)),
/* @__PURE__ */ jsx(Spacer, { as: "tr", tabIndex: -1, y: 1 })
] }),
/* @__PURE__ */ jsx(
table_body_default,
{
checkboxesProps: values.checkboxesProps,
classNames: values.classNames,
collection: values.collection,
color: values.color,
disableAnimation: values.disableAnimation,
isSelectable: values.isSelectable,
selectionMode: values.selectionMode,
slots: values.slots,
state: values.state
}
)
] }),
bottomContentPlacement === "inside" && bottomContent
] }) }),
bottomContentPlacement === "outside" && bottomContent
] });
});
Table.displayName = "HeroUI.Table";
var table_default = Table;
export {
table_default
};
@@ -0,0 +1,3 @@
declare function isDateObject(value: unknown): value is Date;
export = isDateObject;
@@ -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 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 0C 1C"},D:{"1":"0 1 2 3 4 5 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B"},E:{"2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"1":"0 1 2 3 4 5 oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB FD GD HD ID NC uC JD OC"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"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:"CSS overflow-anchor (Scroll Anchoring)",D:true};
@@ -0,0 +1,58 @@
import { Scalar } from '../../nodes/Scalar.js';
import { stringifyString } from '../../stringify/stringifyString.js';
const binary = {
identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array
default: false,
tag: 'tag:yaml.org,2002:binary',
/**
* Returns a Buffer in node and an Uint8Array in browsers
*
* To use the resulting buffer as an image, you'll want to do something like:
*
* const blob = new Blob([buffer], { type: 'image/jpeg' })
* document.querySelector('#photo').src = URL.createObjectURL(blob)
*/
resolve(src, onError) {
if (typeof atob === 'function') {
// On IE 11, atob() can't handle newlines
const str = atob(src.replace(/[\n\r]/g, ''));
const buffer = new Uint8Array(str.length);
for (let i = 0; i < str.length; ++i)
buffer[i] = str.charCodeAt(i);
return buffer;
}
else {
onError('This environment does not support reading binary tags; either Buffer or atob is required');
return src;
}
},
stringify({ comment, type, value }, ctx, onComment, onChompKeep) {
if (!value)
return '';
const buf = value; // checked earlier by binary.identify()
let str;
if (typeof btoa === 'function') {
let s = '';
for (let i = 0; i < buf.length; ++i)
s += String.fromCharCode(buf[i]);
str = btoa(s);
}
else {
throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');
}
type ?? (type = Scalar.BLOCK_LITERAL);
if (type !== Scalar.QUOTE_DOUBLE) {
const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
const n = Math.ceil(str.length / lineWidth);
const lines = new Array(n);
for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {
lines[i] = str.substr(o, lineWidth);
}
str = lines.join(type === Scalar.BLOCK_LITERAL ? '\n' : ' ');
}
return stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep);
}
};
export { binary };
@@ -0,0 +1,107 @@
import type { SourceMapSegment } from './sourcemap-segment.mts';
import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping.mts';
export interface SourceMapV3 {
file?: string | null;
names: string[];
sourceRoot?: string;
sources: (string | null)[];
sourcesContent?: (string | null)[];
version: 3;
ignoreList?: number[];
}
export interface EncodedSourceMap extends SourceMapV3 {
mappings: string;
}
export interface DecodedSourceMap extends SourceMapV3 {
mappings: SourceMapSegment[][];
}
export interface Section {
offset: {
line: number;
column: number;
};
map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap;
}
export interface SectionedSourceMap {
file?: string | null;
sections: Section[];
version: 3;
}
export type OriginalMapping = {
source: string | null;
line: number;
column: number;
name: string | null;
};
export type InvalidOriginalMapping = {
source: null;
line: null;
column: null;
name: null;
};
export type GeneratedMapping = {
line: number;
column: number;
};
export type InvalidGeneratedMapping = {
line: null;
column: null;
};
export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND;
export type XInput = {
x_google_ignoreList?: SourceMapV3['ignoreList'];
};
export type EncodedSourceMapXInput = EncodedSourceMap & XInput;
export type DecodedSourceMapXInput = DecodedSourceMap & XInput;
export type SectionedSourceMapXInput = Omit<SectionedSourceMap, 'sections'> & {
sections: SectionXInput[];
};
export type SectionXInput = Omit<Section, 'map'> & {
map: SectionedSourceMapInput;
};
export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap;
export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput;
export type Needle = {
line: number;
column: number;
bias?: Bias;
};
export type SourceNeedle = {
source: string;
line: number;
column: number;
bias?: Bias;
};
export type EachMapping = {
generatedLine: number;
generatedColumn: number;
source: null;
originalLine: null;
originalColumn: null;
name: null;
} | {
generatedLine: number;
generatedColumn: number;
source: string | null;
originalLine: number;
originalColumn: number;
name: string | null;
};
export declare abstract class SourceMap {
version: SourceMapV3['version'];
file: SourceMapV3['file'];
names: SourceMapV3['names'];
sourceRoot: SourceMapV3['sourceRoot'];
sources: SourceMapV3['sources'];
sourcesContent: SourceMapV3['sourcesContent'];
resolvedSources: SourceMapV3['sources'];
ignoreList: SourceMapV3['ignoreList'];
}
export type Ro<T> = T extends Array<infer V> ? V[] | Readonly<V[]> | RoArray<V> | Readonly<RoArray<V>> : T extends object ? T | Readonly<T> | RoObject<T> | Readonly<RoObject<T>> : T;
type RoArray<T> = Ro<T>[];
type RoObject<T> = {
[K in keyof T]: T[K] | Ro<T[K]>;
};
export declare function parse<T>(map: T): Exclude<T, string>;
export {};
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,76 @@
import * as _heroui_theme from '@heroui/theme';
import { AccordionGroupVariantProps } from '@heroui/theme';
import * as _heroui_system from '@heroui/system';
import { HTMLHeroUIProps, PropGetter } from '@heroui/system';
import { SelectionBehavior, MultipleSelection } from '@react-types/shared';
import { AriaAccordionProps } from '@react-types/accordion';
import { ReactRef } from '@heroui/react-utils';
import { Key } from 'react';
import { TreeState } from '@react-stately/tree';
import { DividerProps } from '@heroui/divider';
import { AccordionItemProps } from './accordion-item.js';
import './use-accordion-item.js';
import 'framer-motion';
import './base/accordion-item-base.js';
import '@heroui/aria-utils';
import 'tailwind-variants';
interface Props extends HTMLHeroUIProps<"div"> {
/**
* Ref to the DOM node.
*/
ref?: ReactRef<HTMLDivElement | null>;
/**
* Whether to display a divider at the bottom of the each accordion item.
*
* @default true
*/
showDivider?: boolean;
/**
* The divider props.
*/
dividerProps?: Partial<DividerProps>;
/**
* The accordion selection behavior.
* @default "toggle"
*/
selectionBehavior?: SelectionBehavior;
/**
* Whether to keep the accordion content mounted when collapsed.
* @default false
*/
keepContentMounted?: boolean;
/**
* The accordion items classNames.
*/
itemClasses?: AccordionItemProps["classNames"];
}
type UseAccordionProps<T extends object = {}> = Props & AccordionGroupVariantProps & Pick<AccordionItemProps, "isCompact" | "isDisabled" | "hideIndicator" | "disableAnimation" | "disableIndicatorAnimation" | "motionProps"> & AriaAccordionProps<T> & MultipleSelection;
type ValuesType<T extends object = {}> = {
state: TreeState<T>;
focusedKey?: Key | null;
isCompact?: AccordionItemProps["isCompact"];
isDisabled?: AccordionItemProps["isDisabled"];
hideIndicator?: AccordionItemProps["hideIndicator"];
disableAnimation?: AccordionItemProps["disableAnimation"];
keepContentMounted?: Props["keepContentMounted"];
disableIndicatorAnimation?: AccordionItemProps["disableAnimation"];
motionProps?: AccordionItemProps["motionProps"];
};
declare function useAccordion<T extends object>(props: UseAccordionProps<T>): {
Component: _heroui_system.As<any>;
values: ValuesType<T>;
state: TreeState<T>;
focusedKey: Key | null;
getBaseProps: PropGetter;
isSplitted: boolean;
classNames: string;
showDivider: boolean;
dividerProps: Partial<DividerProps>;
disableAnimation: boolean;
handleFocusChanged: (isFocused: boolean, key: Key | null) => void;
itemClasses: _heroui_theme.SlotsToClasses<"base" | "title" | "content" | "heading" | "startContent" | "indicator" | "titleWrapper" | "subtitle" | "trigger"> | undefined;
};
type UseAccordionReturn = ReturnType<typeof useAccordion>;
export { type UseAccordionProps, type UseAccordionReturn, type ValuesType, useAccordion };
@@ -0,0 +1,29 @@
import baseIteratee from './_baseIteratee.js';
import negate from './negate.js';
import pickBy from './pickBy.js';
/**
* The opposite of `_.pickBy`; this method creates an object composed of
* the own and inherited enumerable string keyed properties of `object` that
* `predicate` doesn't return truthy for. The predicate is invoked with two
* arguments: (value, key).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The source object.
* @param {Function} [predicate=_.identity] The function invoked per property.
* @returns {Object} Returns the new object.
* @example
*
* var object = { 'a': 1, 'b': '2', 'c': 3 };
*
* _.omitBy(object, _.isNumber);
* // => { 'b': '2' }
*/
function omitBy(object, predicate) {
return pickBy(object, negate(baseIteratee(predicate)));
}
export default omitBy;
@@ -0,0 +1,123 @@
"use client";
import {
HiddenSelect
} from "./chunk-FTCKJO3N.mjs";
import {
useSelect
} from "./chunk-B4ETW6ZK.mjs";
// src/select.tsx
import { Listbox } from "@heroui/listbox";
import { FreeSoloPopover } from "@heroui/popover";
import { ChevronDownIcon } from "@heroui/shared-icons";
import { Spinner } from "@heroui/spinner";
import { useMemo } from "react";
import { forwardRef } from "@heroui/system";
import { ScrollShadow } from "@heroui/scroll-shadow";
import { cloneElement } from "react";
import { VisuallyHidden } from "@react-aria/visually-hidden";
import { AnimatePresence } from "framer-motion";
import { jsx, jsxs } from "react/jsx-runtime";
var Select = forwardRef(function Select2(props, ref) {
const {
Component,
state,
label,
hasHelper,
isLoading,
triggerRef,
selectorIcon = /* @__PURE__ */ jsx(ChevronDownIcon, {}),
description,
errorMessage,
isInvalid,
startContent,
endContent,
placeholder,
renderValue,
shouldLabelBeOutside,
disableAnimation,
getBaseProps,
getLabelProps,
getTriggerProps,
getValueProps,
getListboxProps,
getPopoverProps,
getSpinnerProps,
getMainWrapperProps,
getInnerWrapperProps,
getHiddenSelectProps,
getHelperWrapperProps,
getListboxWrapperProps,
getDescriptionProps,
getErrorMessageProps,
getSelectorIconProps
} = useSelect({ ...props, ref });
const labelContent = label ? /* @__PURE__ */ jsx("label", { ...getLabelProps(), children: label }) : null;
const clonedIcon = cloneElement(selectorIcon, getSelectorIconProps());
const helperWrapper = useMemo(() => {
const shouldShowError = isInvalid && errorMessage;
const hasContent = shouldShowError || description;
if (!hasHelper || !hasContent)
return null;
return /* @__PURE__ */ jsx("div", { ...getHelperWrapperProps(), children: shouldShowError ? /* @__PURE__ */ jsx("div", { ...getErrorMessageProps(), children: errorMessage }) : /* @__PURE__ */ jsx("div", { ...getDescriptionProps(), children: description }) });
}, [
hasHelper,
isInvalid,
errorMessage,
description,
getHelperWrapperProps,
getErrorMessageProps,
getDescriptionProps
]);
const renderSelectedItem = useMemo(() => {
var _a;
if (!((_a = state.selectedItems) == null ? void 0 : _a.length))
return placeholder;
if (renderValue && typeof renderValue === "function") {
const mappedItems = [...state.selectedItems].map((item) => ({
key: item.key,
data: item.value,
type: item.type,
props: item.props,
textValue: item.textValue,
rendered: item.rendered,
"aria-label": item["aria-label"]
}));
return renderValue(mappedItems);
}
return state.selectedItems.map((item) => item.textValue).join(", ");
}, [state.selectedItems, renderValue, placeholder]);
const renderIndicator = useMemo(() => {
if (isLoading) {
return /* @__PURE__ */ jsx(Spinner, { ...getSpinnerProps() });
}
return clonedIcon;
}, [isLoading, clonedIcon, getSpinnerProps]);
const popoverContent = useMemo(
() => state.isOpen ? /* @__PURE__ */ jsx(FreeSoloPopover, { ...getPopoverProps(), children: /* @__PURE__ */ jsx(ScrollShadow, { ...getListboxWrapperProps(), children: /* @__PURE__ */ jsx(Listbox, { ...getListboxProps() }) }) }) : null,
[state.isOpen, getPopoverProps, state, triggerRef, getListboxWrapperProps, getListboxProps]
);
return /* @__PURE__ */ jsxs("div", { ...getBaseProps(), children: [
/* @__PURE__ */ jsx(HiddenSelect, { ...getHiddenSelectProps() }),
shouldLabelBeOutside ? labelContent : null,
/* @__PURE__ */ jsxs("div", { ...getMainWrapperProps(), children: [
/* @__PURE__ */ jsxs(Component, { ...getTriggerProps(), children: [
!shouldLabelBeOutside ? labelContent : null,
/* @__PURE__ */ jsxs("div", { ...getInnerWrapperProps(), children: [
startContent,
/* @__PURE__ */ jsx("span", { ...getValueProps(), children: renderSelectedItem }),
endContent && state.selectedItems && /* @__PURE__ */ jsx(VisuallyHidden, { elementType: "span", children: "," }),
endContent
] }),
renderIndicator
] }),
helperWrapper
] }),
disableAnimation ? popoverContent : /* @__PURE__ */ jsx(AnimatePresence, { children: popoverContent })
] });
});
var select_default = Select;
export {
select_default
};
@@ -0,0 +1,12 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2016_intl = void 0;
const base_config_1 = require("./base-config");
exports.es2016_intl = {
libs: [],
variables: [['Intl', base_config_1.TYPE_VALUE]],
};
@@ -0,0 +1,12 @@
export { default as BasicLayout } from './BasicLayout';
export { default as ConsoleAppender } from './ConsoleAppender';
export { default as Level } from './Level';
export { default as LogFactory } from './LogFactory';
export { default as Logger } from './Logger';
export { default as PatternLayout } from './PatternLayout';
export { default as basicLogPrefix } from './basicLogPrefix';
export { default as compilePattern } from './compilePattern';
export { default as formatMessage } from './formatMessage';
export { default as normalizeLevel } from './normalizeLevel';
export { default as pad } from './pad';
export * from './typings';
@@ -0,0 +1,13 @@
"use strict";
// Generated using scripts/write-encode-map.ts
Object.defineProperty(exports, "__esModule", { value: true });
exports.htmlTrie = void 0;
function restoreDiff(array) {
for (let index = 1; index < array.length; index++) {
array[index][0] += array[index - 1][0] + 1;
}
return array;
}
// prettier-ignore
exports.htmlTrie = new Map(/* #__PURE__ */ restoreDiff([[9, "&Tab;"], [0, "&NewLine;"], [22, "&excl;"], [0, "&quot;"], [0, "&num;"], [0, "&dollar;"], [0, "&percnt;"], [0, "&amp;"], [0, "&apos;"], [0, "&lpar;"], [0, "&rpar;"], [0, "&ast;"], [0, "&plus;"], [0, "&comma;"], [1, "&period;"], [0, "&sol;"], [10, "&colon;"], [0, "&semi;"], [0, { v: "&lt;", n: 8402, o: "&nvlt;" }], [0, { v: "&equals;", n: 8421, o: "&bne;" }], [0, { v: "&gt;", n: 8402, o: "&nvgt;" }], [0, "&quest;"], [0, "&commat;"], [26, "&lbrack;"], [0, "&bsol;"], [0, "&rbrack;"], [0, "&Hat;"], [0, "&lowbar;"], [0, "&DiacriticalGrave;"], [5, { n: 106, o: "&fjlig;" }], [20, "&lbrace;"], [0, "&verbar;"], [0, "&rbrace;"], [34, "&nbsp;"], [0, "&iexcl;"], [0, "&cent;"], [0, "&pound;"], [0, "&curren;"], [0, "&yen;"], [0, "&brvbar;"], [0, "&sect;"], [0, "&die;"], [0, "&copy;"], [0, "&ordf;"], [0, "&laquo;"], [0, "&not;"], [0, "&shy;"], [0, "&circledR;"], [0, "&macr;"], [0, "&deg;"], [0, "&PlusMinus;"], [0, "&sup2;"], [0, "&sup3;"], [0, "&acute;"], [0, "&micro;"], [0, "&para;"], [0, "&centerdot;"], [0, "&cedil;"], [0, "&sup1;"], [0, "&ordm;"], [0, "&raquo;"], [0, "&frac14;"], [0, "&frac12;"], [0, "&frac34;"], [0, "&iquest;"], [0, "&Agrave;"], [0, "&Aacute;"], [0, "&Acirc;"], [0, "&Atilde;"], [0, "&Auml;"], [0, "&angst;"], [0, "&AElig;"], [0, "&Ccedil;"], [0, "&Egrave;"], [0, "&Eacute;"], [0, "&Ecirc;"], [0, "&Euml;"], [0, "&Igrave;"], [0, "&Iacute;"], [0, "&Icirc;"], [0, "&Iuml;"], [0, "&ETH;"], [0, "&Ntilde;"], [0, "&Ograve;"], [0, "&Oacute;"], [0, "&Ocirc;"], [0, "&Otilde;"], [0, "&Ouml;"], [0, "&times;"], [0, "&Oslash;"], [0, "&Ugrave;"], [0, "&Uacute;"], [0, "&Ucirc;"], [0, "&Uuml;"], [0, "&Yacute;"], [0, "&THORN;"], [0, "&szlig;"], [0, "&agrave;"], [0, "&aacute;"], [0, "&acirc;"], [0, "&atilde;"], [0, "&auml;"], [0, "&aring;"], [0, "&aelig;"], [0, "&ccedil;"], [0, "&egrave;"], [0, "&eacute;"], [0, "&ecirc;"], [0, "&euml;"], [0, "&igrave;"], [0, "&iacute;"], [0, "&icirc;"], [0, "&iuml;"], [0, "&eth;"], [0, "&ntilde;"], [0, "&ograve;"], [0, "&oacute;"], [0, "&ocirc;"], [0, "&otilde;"], [0, "&ouml;"], [0, "&div;"], [0, "&oslash;"], [0, "&ugrave;"], [0, "&uacute;"], [0, "&ucirc;"], [0, "&uuml;"], [0, "&yacute;"], [0, "&thorn;"], [0, "&yuml;"], [0, "&Amacr;"], [0, "&amacr;"], [0, "&Abreve;"], [0, "&abreve;"], [0, "&Aogon;"], [0, "&aogon;"], [0, "&Cacute;"], [0, "&cacute;"], [0, "&Ccirc;"], [0, "&ccirc;"], [0, "&Cdot;"], [0, "&cdot;"], [0, "&Ccaron;"], [0, "&ccaron;"], [0, "&Dcaron;"], [0, "&dcaron;"], [0, "&Dstrok;"], [0, "&dstrok;"], [0, "&Emacr;"], [0, "&emacr;"], [2, "&Edot;"], [0, "&edot;"], [0, "&Eogon;"], [0, "&eogon;"], [0, "&Ecaron;"], [0, "&ecaron;"], [0, "&Gcirc;"], [0, "&gcirc;"], [0, "&Gbreve;"], [0, "&gbreve;"], [0, "&Gdot;"], [0, "&gdot;"], [0, "&Gcedil;"], [1, "&Hcirc;"], [0, "&hcirc;"], [0, "&Hstrok;"], [0, "&hstrok;"], [0, "&Itilde;"], [0, "&itilde;"], [0, "&Imacr;"], [0, "&imacr;"], [2, "&Iogon;"], [0, "&iogon;"], [0, "&Idot;"], [0, "&imath;"], [0, "&IJlig;"], [0, "&ijlig;"], [0, "&Jcirc;"], [0, "&jcirc;"], [0, "&Kcedil;"], [0, "&kcedil;"], [0, "&kgreen;"], [0, "&Lacute;"], [0, "&lacute;"], [0, "&Lcedil;"], [0, "&lcedil;"], [0, "&Lcaron;"], [0, "&lcaron;"], [0, "&Lmidot;"], [0, "&lmidot;"], [0, "&Lstrok;"], [0, "&lstrok;"], [0, "&Nacute;"], [0, "&nacute;"], [0, "&Ncedil;"], [0, "&ncedil;"], [0, "&Ncaron;"], [0, "&ncaron;"], [0, "&napos;"], [0, "&ENG;"], [0, "&eng;"], [0, "&Omacr;"], [0, "&omacr;"], [2, "&Odblac;"], [0, "&odblac;"], [0, "&OElig;"], [0, "&oelig;"], [0, "&Racute;"], [0, "&racute;"], [0, "&Rcedil;"], [0, "&rcedil;"], [0, "&Rcaron;"], [0, "&rcaron;"], [0, "&Sacute;"], [0, "&sacute;"], [0, "&Scirc;"], [0, "&scirc;"], [0, "&Scedil;"], [0, "&scedil;"], [0, "&Scaron;"], [0, "&scaron;"], [0, "&Tcedil;"], [0, "&tcedil;"], [0, "&Tcaron;"], [0, "&tcaron;"], [0, "&Tstrok;"], [0, "&tstrok;"], [0, "&Utilde;"], [0, "&utilde;"], [0, "&Umacr;"], [0, "&umacr;"], [0, "&Ubreve;"], [0, "&ubreve;"], [0, "&Uring;"], [0, "&uring;"], [0, "&Udblac;"], [0, "&udblac;"], [0, "&Uogon;"], [0, "&uogon;"], [0, "&Wcirc;"], [0, "&wcirc;"], [0, "&Ycirc;"], [0, "&ycirc;"], [0, "&Yuml;"], [0, "&Zacute;"], [0, "&zacute;"], [0, "&Zdot;"], [0, "&zdot;"], [0, "&Zcaron;"], [0, "&zcaron;"], [19, "&fnof;"], [34, "&imped;"], [63, "&gacute;"], [65, "&jmath;"], [142, "&circ;"], [0, "&caron;"], [16, "&breve;"], [0, "&DiacriticalDot;"], [0, "&ring;"], [0, "&ogon;"], [0, "&DiacriticalTilde;"], [0, "&dblac;"], [51, "&DownBreve;"], [127, "&Alpha;"], [0, "&Beta;"], [0, "&Gamma;"], [0, "&Delta;"], [0, "&Epsilon;"], [0, "&Zeta;"], [0, "&Eta;"], [0, "&Theta;"], [0, "&Iota;"], [0, "&Kappa;"], [0, "&Lambda;"], [0, "&Mu;"], [0, "&Nu;"], [0, "&Xi;"], [0, "&Omicron;"], [0, "&Pi;"], [0, "&Rho;"], [1, "&Sigma;"], [0, "&Tau;"], [0, "&Upsilon;"], [0, "&Phi;"], [0, "&Chi;"], [0, "&Psi;"], [0, "&ohm;"], [7, "&alpha;"], [0, "&beta;"], [0, "&gamma;"], [0, "&delta;"], [0, "&epsi;"], [0, "&zeta;"], [0, "&eta;"], [0, "&theta;"], [0, "&iota;"], [0, "&kappa;"], [0, "&lambda;"], [0, "&mu;"], [0, "Line truncated
//# sourceMappingURL=encode-html.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Snapshot.js","sourceRoot":"","sources":["../../../../src/snapshot/models/Snapshot.ts"],"names":[],"mappings":""}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more