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

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

No files matched your search

@@ -0,0 +1,10 @@
export { default as Slider, SliderProps } from './slider.js';
export { b as SliderRenderThumbProps, a as SliderStepMark, S as SliderValue, u as useSlider } from './use-slider-9ae8d8d3.js';
import '@heroui/system';
import 'react';
import '@react-stately/slider';
import '@heroui/theme';
import '@heroui/react-utils';
import '@react-aria/slider';
import '@heroui/tooltip';
import '@react-types/shared';
@@ -0,0 +1 @@
{"name":"exponential-backoff","version":"3.1.3","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532128264,"integrity":"sha512-UbJOrX7wJ0GSSqnau1n5JProrOsPXn//JLoP+EPdIMW8f/cY9BAIKSm7Q4M4PQS0plLhQHY6wbaMAdie0+WQ9g==","mode":420,"size":11351},"dist/delay/always/always.delay.js":{"checkedAt":1794532128264,"integrity":"sha512-Nt4kYOzvY3NYTZJ44pcwMNg0DhLafkPD6AUmy/kXGuybhNVTFJ63BvYDznLWXZTZvL1cedw5RpLQLt2Aw/oOHw==","mode":420,"size":1028},"dist/backoff.js":{"checkedAt":1794532128265,"integrity":"sha512-O0wVESzd7be6SG0y2YGGSFZa0iupQ+c3Sju4sEl4EugMrFlfTTukx1aGfHL2QxCMhCzCXLeuTIuPmuAZdksvjQ==","mode":420,"size":5903},"dist/delay/delay.base.js":{"checkedAt":1794532128265,"integrity":"sha512-vJ4u5exgI2DWN7SsbEvAZUnyd89BuSv2qbC0FaA0U42A8fiWZGPVapw5lFsXIKcXK/F1xVnAk8b/afKbXsBIlw==","mode":420,"size":1530},"dist/delay/delay.factory.js":{"checkedAt":1794532128265,"integrity":"sha512-yC3hMKNZpmQ2WPKD8jqI87FWeNhXz0Rjn9O6Qxc3eesLT/gJ3uk0kqt7X6PkC2h4/LskH7/s5AB98XSzbjDgpA==","mode":420,"size":613},"dist/delay/delay.interface.js":{"checkedAt":1794532128265,"integrity":"sha512-bzaXf0j+HGpSN4YH9qPSRicQJFdRa5+gDBj/mJZ5dv/4r8RZ7K0jJvs4Jh+eOgfXaI45N0wCDR47aZMiE189gg==","mode":420,"size":120},"dist/jitter/full/full.jitter.js":{"checkedAt":1794532128265,"integrity":"sha512-VCLdPOYtyH6UWQlzakgkTS6L0ANMnJ1Xl7hw9S7l7B9Mad0ztV2Jks2w5TNCA48U33IA6h6kD0WiyvgL8qDeeg==","mode":420,"size":265},"dist/jitter/jitter.factory.js":{"checkedAt":1794532128265,"integrity":"sha512-MeFeXrNPSc+OkwpJkmu/YHFI3NhIXenQwSJ5PnIGB1WW2XDdw+GWyND8OndccJHro2yY9Y++PdJzb9w0Abhlpg==","mode":420,"size":471},"dist/jitter/no/no.jitter.js":{"checkedAt":1794532128266,"integrity":"sha512-9lIRAKmpfrvjKLPU1A2n/+pS++0rPP1kYJLn0LmSfaB1Ip9FVZfog2bJCzyxP92DKRqOt64KKTvg8E4urMv9Ag==","mode":420,"size":190},"dist/options.js":{"checkedAt":1794532128266,"integrity":"sha512-ZZ1eQ7qtVJKQiPoTDDueaKeQhTUxH+jzRrYK+M3sMZkETUw5V53vNzby162vMRqQj0vx9nVq9X2QTKwdk8GXMw==","mode":420,"size":969},"dist/delay/skip-first/skip-first.delay.js":{"checkedAt":1794532128266,"integrity":"sha512-a9WXvr04aTLYqTXR+mz/hi/ZCmIKb6A5B37LCIoKJg+Tp2EjqkbjjR4V8m88KczIpz6hRImc+z6OLMYUkDB6+A==","mode":420,"size":4249},"package.json":{"checkedAt":1794532128266,"integrity":"sha512-mCRQyjuMsPSMzMpA9oKIiXXFIoyWCQ7LHZrGU4DYwqTtpVQfgNBLDAXu9Kgl694qdFMGWqb6Pxtc/87R8lxEoA==","mode":420,"size":1329},"dist/delay/always/always.delay.js.map":{"checkedAt":1794532128266,"integrity":"sha512-TjR5wC2Nqc/hDIuMyfZUiSs70aUnCFUy1iKCzU0veRN/7TKJYbWSzRJcALzF7fk3KkpUijszsMYruMCimhvkHQ==","mode":420,"size":253},"dist/backoff.js.map":{"checkedAt":1794532128266,"integrity":"sha512-9CtkcDZHXJs4TdBOyOGU3Nbm1Lc7SxUzHpPu9jWNMnuVbga0JJ7UCLIfDhBWY7TZuzcm5aeiugW6aOOLNs132w==","mode":420,"size":1297},"dist/delay/delay.base.js.map":{"checkedAt":1794532128267,"integrity":"sha512-K0LHlBQOiDAa4sdGzSRLbiVOE9DrBvnxpjVpMsupyjMH+I3NQ06lxDXJ6wxqcKLqFcDbGt7E3gxKoYIbsUaorQ==","mode":420,"size":1040},"dist/delay/delay.factory.js.map":{"checkedAt":1794532128267,"integrity":"sha512-+XRvfwshdVSWBNOqplUWfFqJ3T2xxJ3N4tFh+Bs4EoYmRQLxgdLnaLXJNgIj/ePkvumiL58HrxFVThfcnQHrZw==","mode":420,"size":487},"dist/delay/delay.interface.js.map":{"checkedAt":1794532128267,"integrity":"sha512-anNE4FesRgDcfYjYZ15+nFfJaHCwXq37w0wCre+Hbdsob9amA3YJ6g8NZB8rDSeFXJoWeJMYH6UlIhvuvk6JRg==","mode":420,"size":131},"dist/jitter/full/full.jitter.js.map":{"checkedAt":1794532128267,"integrity":"sha512-81koksJWtkDC2DKZhUK0gainvmOoJ9QLPQ1eEF4tCDG2UKXmuwmrzrWvyCusgq5dMGXaaEqIMif/OxOoRCiIDA==","mode":420,"size":283},"dist/jitter/jitter.factory.js.map":{"checkedAt":1794532128267,"integrity":"sha512-5UFyk3jNamMSGxpmqP5NUhbOHTdCcY+vjEqNX7lrUvHLqgf7+Kf1EdcodopQLFVXMctaN+SCVAbSxyM+gdEG6w==","mode":420,"size":326},"dist/jitter/no/no.jitter.js.map":{"checkedAt":1794532128267,"integrity":"sha512-f92lMxan9SapkgVfi7iXe8P6qDQ2j8HQsctuyqzJGAo019gjGdqTwdvDb1LvXEjktWiYfg1DZfnkkSFB1EyLyQ==","mode":420,"size":196},"dist/options.js.map":{"checkedAt":1794532128267,"integrity":"sha512-3nyuxZe0LXe5xG7ANtRHNGfUqpC7qk5WgRfl7P+NOZktJGilkt0DaARAnmFWybOEY+9bvXQymqsMopdX4J7Dbw==","mode":420,"size":521},"dist/delay/skip-first/skip-first.delay.js.map":{"checkedAt":1794532128268,"integrity":"sha512-xoMAGDhv5IQQCp/mLNXhn4A3MkQxvZMFqIUlp1Sx95vfHVmfVNeL/Mj+Z3sjOPaNe3ZyLrk5g+rx2tnqaslumA==","mode":420,"size":573},"README.md":{"checkedAt":1794532128268,"integrity":"sha512-1mcp0rUqMsOCVUQ8jQ+PAJahl8XrBd9gRpKfjJBmDZ/ebE9+sToBoyA36/gmEw5l6yaxdLjRycStrFzg1wvvvw==","mode":420,"size":2414},"dist/delay/always/always.delay.d.ts":{"checkedAt":1794532128268,"integrity":"sha512-y/S7tQAyHCWPJCL77X8EcD4iKeb3iZ7TH22jBEkkAQGeXvnhSzJ7XSgJuIWPLPEqZIXY6ouSmrI/1c2Hr4FmFA==","mode":420,"size":90},"src/delay/always/always.delay.spec.ts":{"checkedAt":1794532128268,"integrity":"sha512-ConT/0FMa2l5E0uebrOPrOIjc3FUUu56XzzhHrz2A6hYMzJoCAB/YXBpaqVMEJsOTFvJx9JgKeDt8zUG0r6C1A==","mode":420,"size":1900},"src/delay/always/always.delay.ts":{"checkedAt":1794532128268,"integrity":"sha512-Tf3vxefbC4z3PPpLRydJHz/xTMxLA3Zgghze3EBc5q70Zk/AiOGQiRUlZTlB3W1Tr8MYygMLine truncated
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from '../types.mjs';
import 'react';
declare const AlignHorizontallyBoldIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { AlignHorizontallyBoldIcon };
@@ -0,0 +1,29 @@
import { OneBotAction } from '../../action/OneBotAction';
import { Static } from '@sinclair/typebox';
declare const PayloadSchema: import("@sinclair/typebox").TObject<{
rawData: import("@sinclair/typebox").TString;
brief: import("@sinclair/typebox").TString;
}>;
type PayloadType = Static<typeof PayloadSchema>;
declare const ReturnSchema: import("@sinclair/typebox").TAny;
type ReturnType = Static<typeof ReturnSchema>;
export declare class CreateCollection extends OneBotAction<PayloadType, ReturnType> {
actionName: "create_collection";
payloadSchema: import("@sinclair/typebox").TObject<{
rawData: import("@sinclair/typebox").TString;
brief: import("@sinclair/typebox").TString;
}>;
returnSchema: import("@sinclair/typebox").TAny;
actionSummary: string;
actionTags: string[];
payloadExample: {
rawData: string;
brief: string;
};
returnExample: {
result: number;
errMsg: string;
};
_handle(payload: PayloadType): Promise<unknown>;
}
export {};
@@ -0,0 +1,44 @@
// Generated by dts-bundle-generator v9.5.1
import ts from 'typescript';
/**
* How a type declaration can be matched.
*/
export type TypeDeclarationSpecifier = TypeDeclarationFileSpecifier | TypeDeclarationLibSpecifier | TypeDeclarationPackageSpecifier;
/**
* Type declaration defined in a file.
*/
export type TypeDeclarationFileSpecifier = {
from: "file";
/**
* The path to look in for the type, relative to project directory.
*/
path?: string;
};
/**
* Type declaration defined in the ts lib.
*/
export type TypeDeclarationLibSpecifier = {
from: "lib";
};
/**
* Type declaration defined in a package.
*/
export type TypeDeclarationPackageSpecifier = {
from: "package";
/**
* The package to look in.
*/
package?: string;
};
/**
* Test if the type matches the given specifier.
*/
declare function typeMatchesSpecifier(program: ts.Program, specifier: Readonly<TypeDeclarationSpecifier>, type: Readonly<ts.Type>): boolean;
export {
typeMatchesSpecifier as default,
};
export {};
@@ -0,0 +1,24 @@
## @xterm/addon-fit
An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables fitting the terminal's dimensions to a containing element. This addon requires xterm.js v4+.
### Install
```bash
npm install --save @xterm/addon-fit
```
### Usage
```ts
import { Terminal } from '@xterm/xterm';
import { FitAddon } from '@xterm/addon-fit';
const terminal = new Terminal();
const fitAddon = new FitAddon();
terminal.loadAddon(fitAddon);
terminal.open(containerElement);
fitAddon.fit();
```
See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/addon-fit/typings/addon-fit.d.ts) for more advanced usage.
@@ -0,0 +1,6 @@
import type { TSchema } from '../../type/schema/index';
import type { StaticDecode } from '../../type/static/index';
/** Decodes a value or throws if error */
export declare function Decode<T extends TSchema, Static = StaticDecode<T>, Result extends Static = Static>(schema: T, references: TSchema[], value: unknown): Result;
/** Decodes a value or throws if error */
export declare function Decode<T extends TSchema, Static = StaticDecode<T>, Result extends Static = Static>(schema: T, value: unknown): Result;
@@ -0,0 +1,29 @@
/*
@license
Rollup.js v4.53.2
Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
https://github.com/rollup/rollup
Released under the MIT License.
*/
'use strict';
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
require('node:fs/promises');
require('node:path');
require('node:process');
require('node:url');
require('./shared/rollup.js');
require('./shared/parseAst.js');
const loadConfigFile_js = require('./shared/loadConfigFile.js');
require('path');
require('./native.js');
require('node:perf_hooks');
require('./getLogFilter.js');
exports.loadConfigFile = loadConfigFile_js.loadConfigFile;
//# sourceMappingURL=loadConfigFile.js.map
@@ -0,0 +1,97 @@
import * as TsConfigLoader2 from "./tsconfig-loader";
import * as path from "path";
import { options } from "./options";
export interface ExplicitParams {
baseUrl: string;
paths: { [key: string]: Array<string> };
mainFields?: Array<string>;
addMatchAll?: boolean;
}
export type TsConfigLoader = (
params: TsConfigLoader2.TsConfigLoaderParams
) => TsConfigLoader2.TsConfigLoaderResult;
export interface ConfigLoaderParams {
cwd: string;
explicitParams?: ExplicitParams;
tsConfigLoader?: TsConfigLoader;
}
export interface ConfigLoaderSuccessResult {
resultType: "success";
configFileAbsolutePath: string;
baseUrl: string;
absoluteBaseUrl: string;
paths: { [key: string]: Array<string> };
mainFields?: Array<string>;
addMatchAll?: boolean;
}
export interface ConfigLoaderFailResult {
resultType: "failed";
message: string;
}
export type ConfigLoaderResult =
| ConfigLoaderSuccessResult
| ConfigLoaderFailResult;
export function loadConfig(cwd: string = options.cwd): ConfigLoaderResult {
return configLoader({ cwd: cwd });
}
export function configLoader({
cwd,
explicitParams,
tsConfigLoader = TsConfigLoader2.tsConfigLoader,
}: ConfigLoaderParams): ConfigLoaderResult {
if (explicitParams) {
// tslint:disable-next-line:no-shadowed-variable
const absoluteBaseUrl = path.isAbsolute(explicitParams.baseUrl)
? explicitParams.baseUrl
: path.join(cwd, explicitParams.baseUrl);
return {
resultType: "success",
configFileAbsolutePath: "",
baseUrl: explicitParams.baseUrl,
absoluteBaseUrl,
paths: explicitParams.paths,
mainFields: explicitParams.mainFields,
addMatchAll: explicitParams.addMatchAll,
};
}
// Load tsconfig and create path matching function
const loadResult = tsConfigLoader({
cwd,
getEnv: (key: string) => process.env[key],
});
if (!loadResult.tsConfigPath) {
return {
resultType: "failed",
message: "Couldn't find tsconfig.json",
};
}
if (!loadResult.baseUrl) {
return {
resultType: "failed",
message: "Missing baseUrl in compilerOptions",
};
}
const tsConfigDir = path.dirname(loadResult.tsConfigPath);
const absoluteBaseUrl = path.join(tsConfigDir, loadResult.baseUrl);
return {
resultType: "success",
configFileAbsolutePath: loadResult.tsConfigPath,
baseUrl: loadResult.baseUrl,
absoluteBaseUrl,
paths: loadResult.paths || {},
};
}
@@ -0,0 +1,567 @@
"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/demi/react18/index.ts
var react18_exports = {};
__export(react18_exports, {
__DEV__: () => __DEV__,
__TEST__: () => __TEST__,
arrayToObject: () => arrayToObject,
callAll: () => callAll,
callAllHandlers: () => callAllHandlers,
capitalize: () => capitalize,
chain: () => chain,
clamp: () => clamp,
clampPercentage: () => clampPercentage,
cleanObject: () => cleanObject,
cleanObjectKeys: () => cleanObjectKeys,
clsx: () => clsx,
compact: () => compact,
copyObject: () => copyObject,
dataAttr: () => dataAttr,
debounce: () => debounce,
extractProperty: () => extractProperty,
get: () => get,
getGregorianYearOffset: () => getGregorianYearOffset,
getInertValue: () => getInertValue,
getKeyValue: () => getKeyValue,
getMargin: () => getMargin,
getProp: () => getProp,
getUniqueID: () => getUniqueID,
idsUpdaterMap: () => idsUpdaterMap,
intersectionBy: () => intersectionBy,
isArray: () => isArray,
isEmpty: () => isEmpty,
isEmptyArray: () => isEmptyArray,
isEmptyObject: () => isEmptyObject,
isFunction: () => isFunction,
isNumeric: () => isNumeric,
isObject: () => isObject,
isPatternNumeric: () => isPatternNumeric,
kebabCase: () => kebabCase,
mapKeys: () => mapKeys,
mergeIds: () => mergeIds,
mergeProps: () => mergeProps,
mergeRefs: () => mergeRefs,
objectToDeps: () => objectToDeps,
omit: () => omit,
omitObject: () => omitObject,
range: () => range,
removeEvents: () => removeEvents,
renameProp: () => renameProp,
safeAriaLabel: () => safeAriaLabel,
safeInitials: () => safeInitials,
safeText: () => safeText,
uniqBy: () => uniqBy,
warn: () => warn
});
module.exports = __toCommonJS(react18_exports);
// src/demi/react18/getInertValue.ts
var getInertValue = (v) => {
return v ? "" : void 0;
};
// src/common/assertion.ts
var __DEV__ = process.env.NODE_ENV !== "production";
var __TEST__ = process.env.NODE_ENV === "test";
function isArray(value) {
return Array.isArray(value);
}
function isEmptyArray(value) {
return isArray(value) && value.length === 0;
}
function isObject(value) {
const type = typeof value;
return value != null && (type === "object" || type === "function") && !isArray(value);
}
function isEmptyObject(value) {
return isObject(value) && Object.keys(value).length === 0;
}
function isEmpty(value) {
if (isArray(value)) return isEmptyArray(value);
if (isObject(value)) return isEmptyObject(value);
if (value == null || value === "") return true;
return false;
}
function isFunction(value) {
return typeof value === "function";
}
var dataAttr = (condition) => condition ? "true" : void 0;
var isNumeric = (value) => value != null && parseInt(value.toString(), 10) > 0;
// src/common/clsx.ts
function toVal(mix) {
var k, y, str = "";
if (typeof mix === "string" || typeof mix === "number") {
str += mix;
} else if (typeof mix === "object") {
if (Array.isArray(mix)) {
for (k = 0; k < mix.length; k++) {
if (mix[k]) {
if (y = toVal(mix[k])) {
str && (str += " ");
str += y;
}
}
}
} else {
for (k in mix) {
if (mix[k]) {
str && (str += " ");
str += k;
}
}
}
}
return str;
}
function clsx(...args) {
var i = 0, tmp, x, str = "";
while (i < args.length) {
if (tmp = args[i++]) {
if (x = toVal(tmp)) {
str && (str += " ");
str += x;
}
}
}
return str;
}
// src/common/object.ts
var renameProp = (oldProp, newProp, { [oldProp]: old, ...others }) => ({
[newProp]: old,
...others
});
var copyObject = (obj) => {
if (!isObject(obj)) return obj;
if (obj instanceof Array) return [...obj];
return { ...obj };
};
var omitObject = (obj, omitKeys) => {
if (!isObject(obj)) return obj;
if (obj instanceof Array) return [...obj];
const newObj = { ...obj };
omitKeys.forEach((key) => newObj[key] && delete newObj[key]);
return newObj;
};
var cleanObject = (obj) => {
if (!isObject(obj)) return obj;
if (obj instanceof Array) return [...obj];
const newObj = { ...obj };
Object.keys(newObj).forEach((key) => {
if (newObj[key] === void 0 || newObj[key] === null) {
delete newObj[key];
}
});
return newObj;
};
var cleanObjectKeys = (obj, keys = []) => {
if (!isObject(obj)) return obj;
if (obj instanceof Array) return [...obj];
const newObj = { ...obj };
keys.forEach((key) => {
if (newObj[key]) {
delete newObj[key];
}
});
return newObj;
};
var getKeyValue = (obj, key) => {
if (!isObject(obj)) return obj;
if (obj instanceof Array) return [...obj];
return obj[key];
};
var getProp = (obj, path, fallback, index) => {
const key = typeof path === "string" ? path.split(".") : [path];
for (index = 0; index < key.length; index += 1) {
if (!obj) break;
obj = obj[key[index]];
}
return obj === void 0 ? fallback : obj;
};
var arrayToObject = (arr) => {
if (!arr.length || !Array.isArray(arr)) return {};
return arr.reduce((acc, item) => {
return { ...acc, ...item };
}, {});
};
function compact(object) {
const clone = Object.assign({}, object);
for (let key in clone) {
if (clone[key] === void 0) delete clone[key];
}
return clone;
}
// src/common/text.ts
var safeText = (text) => {
if ((text == null ? void 0 : text.length) <= 4) return text;
return text == null ? void 0 : text.slice(0, 3);
};
var safeInitials = (text) => {
const initials = (text == null ? void 0 : text.trim().split(/[\s\-_.]+/).filter(Boolean).map((word) => word.charAt(0).toUpperCase()).join("")) || "";
return safeText(initials);
};
var safeAriaLabel = (...texts) => {
let ariaLabel = " ";
for (const text of texts) {
if (typeof text === "string" && text.length > 0) {
ariaLabel = text;
break;
}
}
return ariaLabel;
};
// src/common/dimensions.ts
var getMargin = (num) => {
return `calc(${num * 15.25}pt + 1px * ${num - 1})`;
};
// src/common/functions.ts
var capitalize = (s) => {
return s ? s.charAt(0).toUpperCase() + s.slice(1).toLowerCase() : "";
};
function callAllHandlers(...fns) {
return function func(event) {
fns.some((fn) => {
fn == null ? void 0 : fn(event);
return event == null ? void 0 : event.defaultPrevented;
});
};
}
function callAll(...fns) {
return function mergedFn(arg) {
fns.forEach((fn) => {
fn == null ? void 0 : fn(arg);
});
};
}
function extractProperty(key, defaultValue, ...objs) {
let result = defaultValue;
for (const obj of objs) {
if (obj && key in obj && !!obj[key]) {
result = obj[key];
}
}
return result;
}
function getUniqueID(prefix) {
return `${prefix}-${Math.floor(Math.random() * 1e6)}`;
}
function removeEvents(input) {
for (const key in input) {
if (key.startsWith("on")) {
delete input[key];
}
}
return input;
}
function objectToDeps(obj) {
if (!obj || typeof obj !== "object") {
return "";
}
try {
return JSON.stringify(obj);
} catch {
return "";
}
}
function debounce(func, waitMilliseconds = 0) {
let timeout;
return function(...args) {
const later = () => {
timeout = void 0;
func.apply(this, args);
};
if (timeout !== void 0) {
clearTimeout(timeout);
}
timeout = setTimeout(later, waitMilliseconds);
};
}
function uniqBy(arr, iteratee) {
if (typeof iteratee === "string") {
iteratee = (item) => item[iteratee];
}
return arr.filter((x, i, self) => i === self.findIndex((y) => iteratee(x) === iteratee(y)));
}
var omit = (obj, keys) => {
const res = Object.assign({}, obj);
keys.forEach((key) => {
delete res[key];
});
return res;
};
var kebabCase = (s) => {
return s.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
};
var mapKeys = (obj, iteratee) => {
return Object.fromEntries(
Object.entries(obj).map(([key, value]) => [iteratee(value, key), value])
);
};
var get = (object, path, defaultValue) => {
const keys = Array.isArray(path) ? path : path.replace(/\[(\d+)\]/g, ".$1").split(".");
let res = object;
for (const key of keys) {
res = res == null ? void 0 : res[key];
if (res === void 0) {
return defaultValue;
}
}
return res;
};
var intersectionBy = (...args) => {
if (args.length < 2) {
throw new Error("intersectionBy requires at least two arrays and an iteratee");
}
const iteratee = args[args.length - 1];
const arrays = args.slice(0, -1);
if (arrays.length === 0) {
return [];
}
const getIterateeValue = (item) => {
if (typeof iteratee === "function") {
return iteratee(item);
} else if (typeof iteratee === "string") {
return item[iteratee];
} else {
throw new Error("Iteratee must be a function or a string key of the array elements");
}
};
const [first, ...rest] = arrays;
const transformedFirst = first.map((item) => getIterateeValue(item));
const transformedSets = rest.map(
(array) => new Set(array.map((item) => getIterateeValue(item)))
);
const res = [];
const seen = /* @__PURE__ */ new Set();
for (let i = 0; i < first.length; i++) {
const item = first[i];
const transformed = transformedFirst[i];
if (seen.has(transformed)) {
continue;
}
const existsInAll = transformedSets.every((set) => set.has(transformed));
if (existsInAll) {
res.push(item);
seen.add(transformed);
}
}
return res;
};
// src/common/numbers.ts
function range(start, end) {
const length = end - start + 1;
return Array.from({ length }, (_, index) => index + start);
}
function clamp(value, min, max) {
return Math.min(Math.max(value, min), max);
}
function clampPercentage(value, max = 100) {
return Math.min(Math.max(value, 0), max);
}
// src/common/console.ts
var warningStack = {};
function warn(message, component, ...args) {
const tag = component ? ` [${component}]` : " ";
const log = `[Hero UI]${tag}: ${message}`;
if (typeof console === "undefined") return;
if (warningStack[log]) return;
warningStack[log] = true;
if (process.env.NODE_ENV !== "production") {
return console.warn(log, args);
}
}
// src/common/dates.ts
function getGregorianYearOffset(identifier) {
switch (identifier) {
case "buddhist":
return 543;
case "ethiopic":
case "ethioaa":
return -8;
case "coptic":
return -284;
case "hebrew":
return 3760;
case "indian":
return -78;
case "islamic-civil":
case "islamic-tbla":
case "islamic-umalqura":
return -579;
case "persian":
return -600;
case "roc":
case "japanese":
case "gregory":
default:
return 0;
}
}
// src/common/regex.ts
var isPatternNumeric = (pattern) => {
const numericPattern = /(^|\W)[0-9](\W|$)/;
return numericPattern.test(pattern) && !/[^\d\^$\[\]\(\)\*\+\-\.\|]/.test(pattern);
};
// src/common/ra.ts
function chain(...callbacks) {
return (...args) => {
for (let callback of callbacks) {
if (typeof callback === "function") {
callback(...args);
}
}
};
}
var idsUpdaterMap = /* @__PURE__ */ new Map();
function mergeIds(idA, idB) {
if (idA === idB) {
return idA;
}
let setIdsA = idsUpdaterMap.get(idA);
if (setIdsA) {
setIdsA.forEach((ref) => ref.current = idB);
return idB;
}
let setIdsB = idsUpdaterMap.get(idB);
if (setIdsB) {
setIdsB.forEach((ref) => ref.current = idA);
return idA;
}
return idB;
}
function mergeProps(...args) {
let result = { ...args[0] };
for (let i = 1; i < args.length; i++) {
let props = args[i];
for (let key in props) {
let a = result[key];
let b = props[key];
if (typeof a === "function" && typeof b === "function" && // This is a lot faster than a regex.
key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= /* 'A' */
65 && key.charCodeAt(2) <= /* 'Z' */
90) {
result[key] = chain(a, b);
} else if ((key === "className" || key === "UNSAFE_className") && typeof a === "string" && typeof b === "string") {
result[key] = clsx(a, b);
} else if (key === "id" && a && b) {
result.id = mergeIds(a, b);
} else {
result[key] = b !== void 0 ? b : a;
}
}
}
return result;
}
function mergeRefs(...refs) {
if (refs.length === 1 && refs[0]) {
return refs[0];
}
return (value) => {
let hasCleanup = false;
const cleanups = refs.map((ref) => {
const cleanup = setRef(ref, value);
hasCleanup || (hasCleanup = typeof cleanup == "function");
return cleanup;
});
if (hasCleanup) {
return () => {
cleanups.forEach((cleanup, i) => {
if (typeof cleanup === "function") {
cleanup == null ? void 0 : cleanup();
} else {
setRef(refs[i], null);
}
});
};
}
};
}
function setRef(ref, value) {
if (typeof ref === "function") {
return () => ref(value);
} else if (ref != null) {
if ("current" in ref) {
ref.current = value;
}
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
__DEV__,
__TEST__,
arrayToObject,
callAll,
callAllHandlers,
capitalize,
chain,
clamp,
clampPercentage,
cleanObject,
cleanObjectKeys,
clsx,
compact,
copyObject,
dataAttr,
debounce,
extractProperty,
get,
getGregorianYearOffset,
getInertValue,
getKeyValue,
getMargin,
getProp,
getUniqueID,
idsUpdaterMap,
intersectionBy,
isArray,
isEmpty,
isEmptyArray,
isEmptyObject,
isFunction,
isNumeric,
isObject,
isPatternNumeric,
kebabCase,
mapKeys,
mergeIds,
mergeProps,
mergeRefs,
objectToDeps,
omit,
omitObject,
range,
removeEvents,
renameProp,
safeAriaLabel,
safeInitials,
safeText,
uniqBy,
warn
});
@@ -0,0 +1,72 @@
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "focusWithoutScrolling", () => $1117b6c0d4c4c164$export$de79e2c695e052f3);
/*
* 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 $1117b6c0d4c4c164$export$de79e2c695e052f3(element) {
if ($1117b6c0d4c4c164$var$supportsPreventScroll()) element.focus({
preventScroll: true
});
else {
let scrollableElements = $1117b6c0d4c4c164$var$getScrollableElements(element);
element.focus();
$1117b6c0d4c4c164$var$restoreScrollPosition(scrollableElements);
}
}
let $1117b6c0d4c4c164$var$supportsPreventScrollCached = null;
function $1117b6c0d4c4c164$var$supportsPreventScroll() {
if ($1117b6c0d4c4c164$var$supportsPreventScrollCached == null) {
$1117b6c0d4c4c164$var$supportsPreventScrollCached = false;
try {
let focusElem = document.createElement('div');
focusElem.focus({
get preventScroll () {
$1117b6c0d4c4c164$var$supportsPreventScrollCached = true;
return true;
}
});
} catch {
// Ignore
}
}
return $1117b6c0d4c4c164$var$supportsPreventScrollCached;
}
function $1117b6c0d4c4c164$var$getScrollableElements(element) {
let parent = element.parentNode;
let scrollableElements = [];
let rootScrollingElement = document.scrollingElement || document.documentElement;
while(parent instanceof HTMLElement && parent !== rootScrollingElement){
if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) scrollableElements.push({
element: parent,
scrollTop: parent.scrollTop,
scrollLeft: parent.scrollLeft
});
parent = parent.parentNode;
}
if (rootScrollingElement instanceof HTMLElement) scrollableElements.push({
element: rootScrollingElement,
scrollTop: rootScrollingElement.scrollTop,
scrollLeft: rootScrollingElement.scrollLeft
});
return scrollableElements;
}
function $1117b6c0d4c4c164$var$restoreScrollPosition(scrollableElements) {
for (let { element: element, scrollTop: scrollTop, scrollLeft: scrollLeft } of scrollableElements){
element.scrollTop = scrollTop;
element.scrollLeft = scrollLeft;
}
}
//# sourceMappingURL=focusWithoutScrolling.main.js.map
@@ -0,0 +1,30 @@
import { OneBotAction } from '../../action/OneBotAction';
import { Static } from '@sinclair/typebox';
declare const PayloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
user_id: import("@sinclair/typebox").TString;
card: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
}>;
type PayloadType = Static<typeof PayloadSchema>;
declare const ReturnSchema: import("@sinclair/typebox").TNull;
type ReturnType = Static<typeof ReturnSchema>;
export default class SetGroupCard extends OneBotAction<PayloadType, ReturnType> {
actionName: "set_group_card";
payloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
user_id: import("@sinclair/typebox").TString;
card: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
}>;
returnSchema: import("@sinclair/typebox").TNull;
actionSummary: string;
actionDescription: string;
actionTags: string[];
payloadExample: {
group_id: string;
user_id: string;
card: string;
};
returnExample: null;
_handle(payload: PayloadType): Promise<null>;
}
export {};
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","16":"C L"},C:{"1":"0 1 2 3 4 5 tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R 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 0C 1C"},D:{"1":"0 1 2 3 4 5 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 iB jB kB lB mB nB oB"},E:{"1":"F 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 2C ZC 3C 4C 5C"},F:{"1":"0 1 2 3 4 5 cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB FD GD HD ID NC uC JD OC"},G:{"1":"PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD"},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 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:5,C:"document.scrollingElement",D:true};
@@ -0,0 +1,17 @@
import * as core from "../core/index.js";
import * as schemas from "./schemas.js";
export function string(params) {
return core._coercedString(schemas.ZodString, params);
}
export function number(params) {
return core._coercedNumber(schemas.ZodNumber, params);
}
export function boolean(params) {
return core._coercedBoolean(schemas.ZodBoolean, params);
}
export function bigint(params) {
return core._coercedBigint(schemas.ZodBigInt, params);
}
export function date(params) {
return core._coercedDate(schemas.ZodDate, params);
}
@@ -0,0 +1,35 @@
/*
* 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 $3041db3296945e6e$export$baf26146a414f24a {
/**
* Returns a copy of this point.
*/ copy() {
return new $3041db3296945e6e$export$baf26146a414f24a(this.x, this.y);
}
/**
* Checks if two points are equal.
*/ equals(point) {
return this.x === point.x && this.y === point.y;
}
/**
* Returns true if this point is the origin.
*/ isOrigin() {
return this.x === 0 && this.y === 0;
}
constructor(x = 0, y = 0){
this.x = x;
this.y = y;
}
}
export {$3041db3296945e6e$export$baf26146a414f24a as Point};
//# sourceMappingURL=Point.module.js.map
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var isDev = process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test';
var _default = exports["default"] = isDev;
@@ -0,0 +1,9 @@
export { useCombinedRefs } from './useCombinedRefs';
export { useEvent } from './useEvent';
export { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect';
export { useInterval } from './useInterval';
export { useLatestValue } from './useLatestValue';
export { useLazyMemo } from './useLazyMemo';
export { useNodeRef } from './useNodeRef';
export { usePrevious } from './usePrevious';
export { useUniqueId } from './useUniqueId';
@@ -0,0 +1,80 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const path = require("path")
const getConvertPath = require("../util/get-convert-path")
const getNpmignore = require("../util/get-npmignore")
const { getPackageJson } = require("../util/get-package-json")
const { isBinFile } = require("../util/is-bin-file")
/** @type {import('./rule-module').RuleModule} */
module.exports = {
meta: {
docs: {
description: "disallow `bin` files that npm ignores",
recommended: true,
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unpublished-bin.md",
},
type: "problem",
fixable: null,
schema: [
{
type: "object",
properties: {
//
convertPath: getConvertPath.schema,
},
},
],
messages: {
invalidIgnored:
"npm ignores '{{name}}'. Check 'files' field of 'package.json' or '.npmignore'.",
},
},
create(context) {
return {
Program(node) {
// Check file path.
let rawFilePath = context.filename ?? context.getFilename()
if (rawFilePath === "<input>") {
return
}
rawFilePath = path.resolve(rawFilePath)
// Find package.json
const packageJson = getPackageJson(rawFilePath)
if (typeof packageJson?.filePath !== "string") {
return {}
}
// Convert by convertPath option
const basedir = path.dirname(packageJson.filePath)
const relativePath = getConvertPath(context)(
path.relative(basedir, rawFilePath).replace(/\\/gu, "/")
)
const filePath = path.join(basedir, relativePath)
// Check this file is bin.
if (!isBinFile(filePath, packageJson.bin, basedir)) {
return
}
// Check ignored or not
const npmignore = getNpmignore(filePath)
if (!npmignore.match(relativePath)) {
return
}
// Report.
context.report({
node,
messageId: "invalidIgnored",
data: { name: relativePath },
})
},
}
},
}
@@ -0,0 +1,11 @@
import { ClassAttributor, Scope, StyleAttributor } from 'parchment';
const SizeClass = new ClassAttributor('size', 'ql-size', {
scope: Scope.INLINE,
whitelist: ['small', 'large', 'huge']
});
const SizeStyle = new StyleAttributor('size', 'font-size', {
scope: Scope.INLINE,
whitelist: ['10px', '18px', '32px']
});
export { SizeClass, SizeStyle };
//# sourceMappingURL=size.js.map
@@ -0,0 +1,43 @@
import type { Action, AnyAction } from 'redux'
import type { ThunkMiddleware } from './types'
export type {
ThunkAction,
ThunkDispatch,
ThunkActionDispatch,
ThunkMiddleware
} from './types'
/** A function that accepts a potential "extra argument" value to be injected later,
* and returns an instance of the thunk middleware that uses that value
*/
function createThunkMiddleware<
State = any,
BasicAction extends Action = AnyAction,
ExtraThunkArg = undefined
>(extraArgument?: ExtraThunkArg) {
// Standard Redux middleware definition pattern:
// See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware
const middleware: ThunkMiddleware<State, BasicAction, ExtraThunkArg> =
({ dispatch, getState }) =>
next =>
action => {
// The thunk middleware looks for any functions that were passed to `store.dispatch`.
// If this "action" is really a function, call it and return the result.
if (typeof action === 'function') {
// Inject the store's `dispatch` and `getState` methods, as well as any "extra arg"
return action(dispatch, getState, extraArgument)
}
// Otherwise, pass the action down the middleware chain as usual
return next(action)
}
return middleware
}
export const thunk = createThunkMiddleware()
// Export the factory function so users can create a customized version
// with whatever "extra arg" they want to inject into their thunks
export const withExtraArgument = createThunkMiddleware
@@ -0,0 +1,36 @@
# strip-bom [![Build Status](https://travis-ci.org/sindresorhus/strip-bom.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-bom)
> Strip UTF-8 [byte order mark](http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from a string
From Wikipedia:
> The Unicode Standard permits the BOM in UTF-8, but does not require nor recommend its use. Byte order has no meaning in UTF-8.
## Install
```
$ npm install --save strip-bom
```
## Usage
```js
const stripBom = require('strip-bom');
stripBom('\uFEFFunicorn');
//=> 'unicorn'
```
## Related
- [strip-bom-cli](https://github.com/sindresorhus/strip-bom-cli) - CLI for this module
- [strip-bom-buf](https://github.com/sindresorhus/strip-bom-buf) - Buffer version of this module
- [strip-bom-stream](https://github.com/sindresorhus/strip-bom-stream) - Stream version of this module
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)
@@ -0,0 +1,25 @@
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import { babel } from '@rollup/plugin-babel';
export default {
input: 'index.js',
plugins: [
resolve({
preferBuiltins: true,
browser: false
}),
commonjs(),
json(),
babel({
babelHelpers: 'bundled',
exclude: 'node_modules/**'
})
],
output: {
file: 'dist/index.cjs.js',
format: 'cjs',
exports: 'auto'
}
};
@@ -0,0 +1,90 @@
import getAllKeys from './_getAllKeys.js';
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1;
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* A specialized version of `baseIsEqualDeep` for objects with support for
* partial deep comparisons.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
objProps = getAllKeys(object),
objLength = objProps.length,
othProps = getAllKeys(other),
othLength = othProps.length;
if (objLength != othLength && !isPartial) {
return false;
}
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
return false;
}
}
// Check that cyclic values are equal.
var objStacked = stack.get(object);
var othStacked = stack.get(other);
if (objStacked && othStacked) {
return objStacked == other && othStacked == object;
}
var result = true;
stack.set(object, other);
stack.set(other, object);
var skipCtor = isPartial;
while (++index < objLength) {
key = objProps[index];
var objValue = object[key],
othValue = other[key];
if (customizer) {
var compared = isPartial
? customizer(othValue, objValue, key, other, object, stack)
: customizer(objValue, othValue, key, object, other, stack);
}
// Recursively compare objects (susceptible to call stack limits).
if (!(compared === undefined
? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
: compared
)) {
result = false;
break;
}
skipCtor || (skipCtor = key == 'constructor');
}
if (result && !skipCtor) {
var objCtor = object.constructor,
othCtor = other.constructor;
// Non `Object` object instances with different constructors are not equal.
if (objCtor != othCtor &&
('constructor' in object && 'constructor' in other) &&
!(typeof objCtor == 'function' && objCtor instanceof objCtor &&
typeof othCtor == 'function' && othCtor instanceof othCtor)) {
result = false;
}
}
stack['delete'](object);
stack['delete'](other);
return result;
}
export default equalObjects;
@@ -0,0 +1,506 @@
import { trackForMutations } from '@internal/immutableStateInvariantMiddleware'
import { noop } from '@internal/listenerMiddleware/utils'
import type {
ImmutableStateInvariantMiddlewareOptions,
Middleware,
MiddlewareAPI,
Store,
} from '@reduxjs/toolkit'
import {
createImmutableStateInvariantMiddleware,
isImmutableDefault,
} from '@reduxjs/toolkit'
type MWNext = Parameters<ReturnType<Middleware>>[0]
describe('createImmutableStateInvariantMiddleware', () => {
let state: { foo: { bar: number[]; baz: string } }
const getState: Store['getState'] = () => state
function middleware(options: ImmutableStateInvariantMiddlewareOptions = {}) {
return createImmutableStateInvariantMiddleware(options)({
getState,
} as MiddlewareAPI)
}
beforeEach(() => {
state = { foo: { bar: [2, 3, 4], baz: 'baz' } }
})
it('sends the action through the middleware chain', () => {
const next: MWNext = vi.fn()
const dispatch = middleware()(next)
dispatch({ type: 'SOME_ACTION' })
expect(next).toHaveBeenCalledWith({
type: 'SOME_ACTION',
})
})
it('throws if mutating inside the dispatch', () => {
const next: MWNext = (action) => {
state.foo.bar.push(5)
return action
}
const dispatch = middleware()(next)
expect(() => {
dispatch({ type: 'SOME_ACTION' })
}).toThrow(new RegExp('foo\\.bar\\.3'))
})
it('throws if mutating between dispatches', () => {
const next: MWNext = (action) => action
const dispatch = middleware()(next)
dispatch({ type: 'SOME_ACTION' })
state.foo.bar.push(5)
expect(() => {
dispatch({ type: 'SOME_OTHER_ACTION' })
}).toThrow(new RegExp('foo\\.bar\\.3'))
})
it('does not throw if not mutating inside the dispatch', () => {
const next: MWNext = (action) => {
state = { ...state, foo: { ...state.foo, baz: 'changed!' } }
return action
}
const dispatch = middleware()(next)
expect(() => {
dispatch({ type: 'SOME_ACTION' })
}).not.toThrow()
})
it('does not throw if not mutating between dispatches', () => {
const next: MWNext = (action) => action
const dispatch = middleware()(next)
dispatch({ type: 'SOME_ACTION' })
state = { ...state, foo: { ...state.foo, baz: 'changed!' } }
expect(() => {
dispatch({ type: 'SOME_OTHER_ACTION' })
}).not.toThrow()
})
it('works correctly with circular references', () => {
const next: MWNext = (action) => action
const dispatch = middleware()(next)
let x: any = {}
let y: any = {}
x.y = y
y.x = x
expect(() => {
dispatch({ type: 'SOME_ACTION', x })
}).not.toThrow()
})
it('respects "isImmutable" option', function () {
const isImmutable = (value: any) => true
const next: MWNext = (action) => {
state.foo.bar.push(5)
return action
}
const dispatch = middleware({ isImmutable })(next)
expect(() => {
dispatch({ type: 'SOME_ACTION' })
}).not.toThrow()
})
it('respects "ignoredPaths" option', () => {
const next: MWNext = (action) => {
state.foo.bar.push(5)
return action
}
const dispatch1 = middleware({ ignoredPaths: ['foo.bar'] })(next)
expect(() => {
dispatch1({ type: 'SOME_ACTION' })
}).not.toThrow()
const dispatch2 = middleware({ ignoredPaths: [/^foo/] })(next)
expect(() => {
dispatch2({ type: 'SOME_ACTION' })
}).not.toThrow()
})
it('Should print a warning if execution takes too long', () => {
state.foo.bar = new Array(10000).fill({ value: 'more' })
const next: MWNext = (action) => action
const dispatch = middleware({ warnAfter: 4 })(next)
const consoleWarnSpy = vi.spyOn(console, 'warn').mockImplementation(noop)
try {
dispatch({ type: 'SOME_ACTION' })
expect(consoleWarnSpy).toHaveBeenCalledOnce()
expect(consoleWarnSpy).toHaveBeenLastCalledWith(
expect.stringMatching(
/^ImmutableStateInvariantMiddleware took \d*ms, which is more than the warning threshold of 4ms./,
),
)
} finally {
consoleWarnSpy.mockRestore()
}
})
it('Should not print a warning if "next" takes too long', () => {
const next: MWNext = (action) => {
const started = Date.now()
while (Date.now() - started < 8) {}
return action
}
const dispatch = middleware({ warnAfter: 4 })(next)
const consoleWarnSpy = vi.spyOn(console, 'warn').mockImplementation(noop)
try {
dispatch({ type: 'SOME_ACTION' })
expect(consoleWarnSpy).not.toHaveBeenCalled()
} finally {
consoleWarnSpy.mockRestore()
}
})
})
describe('trackForMutations', () => {
function testCasesForMutation(spec: any) {
it('returns true and the mutated path', () => {
const state = spec.getState()
const options = spec.middlewareOptions || {}
const { isImmutable = isImmutableDefault, ignoredPaths } = options
const tracker = trackForMutations(isImmutable, ignoredPaths, state)
const newState = spec.fn(state)
expect(tracker.detectMutations()).toEqual({
wasMutated: true,
path: spec.path.join('.'),
})
})
}
function testCasesForNonMutation(spec: any) {
it('returns false', () => {
const state = spec.getState()
const options = spec.middlewareOptions || {}
const { isImmutable = isImmutableDefault, ignoredPaths } = options
const tracker = trackForMutations(isImmutable, ignoredPaths, state)
const newState = spec.fn(state)
expect(tracker.detectMutations()).toEqual({ wasMutated: false })
})
}
interface TestConfig {
getState: Store['getState']
fn: (s: any) => typeof s | object
middlewareOptions?: ImmutableStateInvariantMiddlewareOptions
path?: string[]
}
const mutations: Record<string, TestConfig> = {
'adding to nested array': {
getState: () => ({
foo: {
bar: [2, 3, 4],
baz: 'baz',
},
stuff: [],
}),
fn: (s) => {
s.foo.bar.push(5)
return s
},
path: ['foo', 'bar', '3'],
},
'adding to nested array and setting new root object': {
getState: () => ({
foo: {
bar: [2, 3, 4],
baz: 'baz',
},
stuff: [],
}),
fn: (s) => {
s.foo.bar.push(5)
return { ...s }
},
path: ['foo', 'bar', '3'],
},
'changing nested string': {
getState: () => ({
foo: {
bar: [2, 3, 4],
baz: 'baz',
},
stuff: [],
}),
fn: (s) => {
s.foo.baz = 'changed!'
return s
},
path: ['foo', 'baz'],
},
'removing nested state': {
getState: () => ({
foo: {
bar: [2, 3, 4],
baz: 'baz',
},
stuff: [],
}),
fn: (s) => {
delete s.foo
return s
},
path: ['foo'],
},
'adding to array': {
getState: () => ({
foo: {
bar: [2, 3, 4],
baz: 'baz',
},
stuff: [],
}),
fn: (s) => {
s.stuff.push(1)
return s
},
path: ['stuff', '0'],
},
'adding object to array': {
getState: () => ({
stuff: [],
}),
fn: (s) => {
s.stuff.push({ foo: 1, bar: 2 })
return s
},
path: ['stuff', '0'],
},
'mutating previous state and returning new state': {
getState: () => ({ counter: 0 }),
fn: (s) => {
s.mutation = true
return { ...s, counter: s.counter + 1 }
},
path: ['mutation'],
},
'mutating previous state with non immutable type and returning new state': {
getState: () => ({ counter: 0 }),
fn: (s) => {
s.mutation = [1, 2, 3]
return { ...s, counter: s.counter + 1 }
},
path: ['mutation'],
},
'mutating previous state with non immutable type and returning new state without that property':
{
getState: () => ({ counter: 0 }),
fn: (s) => {
s.mutation = [1, 2, 3]
return { counter: s.counter + 1 }
},
path: ['mutation'],
},
'mutating previous state with non immutable type and returning new simple state':
{
getState: () => ({ counter: 0 }),
fn: (s) => {
s.mutation = [1, 2, 3]
return 1
},
path: ['mutation'],
},
'mutating previous state by deleting property and returning new state without that property':
{
getState: () => ({ counter: 0, toBeDeleted: true }),
fn: (s) => {
delete s.toBeDeleted
return { counter: s.counter + 1 }
},
path: ['toBeDeleted'],
},
'mutating previous state by deleting nested property': {
getState: () => ({ nested: { counter: 0, toBeDeleted: true }, foo: 1 }),
fn: (s) => {
delete s.nested.toBeDeleted
return { nested: { counter: s.counter + 1 } }
},
path: ['nested', 'toBeDeleted'],
},
'update reference': {
getState: () => ({ foo: {} }),
fn: (s) => {
s.foo = {}
return s
},
path: ['foo'],
},
'cannot ignore root state': {
getState: () => ({ foo: {} }),
fn: (s) => {
s.foo = {}
return s
},
middlewareOptions: {
ignoredPaths: [''],
},
path: ['foo'],
},
'catching state mutation in non-ignored branch': {
getState: () => ({
foo: {
bar: [1, 2],
},
boo: {
yah: [1, 2],
},
}),
fn: (s) => {
s.foo.bar.push(3)
s.boo.yah.push(3)
return s
},
middlewareOptions: {
ignoredPaths: ['foo'],
},
path: ['boo', 'yah', '2'],
},
}
Object.keys(mutations).forEach((mutationDesc) => {
describe(mutationDesc, () => {
testCasesForMutation(mutations[mutationDesc])
})
})
const nonMutations: Record<string, TestConfig> = {
'not doing anything': {
getState: () => ({ a: 1, b: 2 }),
fn: (s) => s,
},
'from undefined to something': {
getState: () => undefined,
fn: (s) => ({ foo: 'bar' }),
},
'returning same state': {
getState: () => ({
foo: {
bar: [2, 3, 4],
baz: 'baz',
},
stuff: [],
}),
fn: (s) => s,
},
'returning a new state object with nested new string': {
getState: () => ({
foo: {
bar: [2, 3, 4],
baz: 'baz',
},
stuff: [],
}),
fn: (s) => {
return { ...s, foo: { ...s.foo, baz: 'changed!' } }
},
},
'returning a new state object with nested new array': {
getState: () => ({
foo: {
bar: [2, 3, 4],
baz: 'baz',
},
stuff: [],
}),
fn: (s) => {
return { ...s, foo: { ...s.foo, bar: [...s.foo.bar, 5] } }
},
},
'removing nested state': {
getState: () => ({
foo: {
bar: [2, 3, 4],
baz: 'baz',
},
stuff: [],
}),
fn: (s) => {
return { ...s, foo: {} }
},
},
'having a NaN in the state': {
getState: () => ({ a: NaN, b: Number.NaN }),
fn: (s) => s,
},
'ignoring branches from mutation detection': {
getState: () => ({
foo: {
bar: 'bar',
},
}),
fn: (s) => {
s.foo.bar = 'baz'
return s
},
middlewareOptions: {
ignoredPaths: ['foo'],
},
},
'ignoring nested branches from mutation detection': {
getState: () => ({
foo: {
bar: [1, 2],
boo: {
yah: [1, 2],
},
},
}),
fn: (s) => {
s.foo.bar.push(3)
s.foo.boo.yah.push(3)
return s
},
middlewareOptions: {
ignoredPaths: ['foo.bar', 'foo.boo.yah'],
},
},
'ignoring nested array indices from mutation detection': {
getState: () => ({
stuff: [{ a: 1 }, { a: 2 }],
}),
fn: (s) => {
s.stuff[1].a = 3
return s
},
middlewareOptions: {
ignoredPaths: ['stuff.1'],
},
},
}
Object.keys(nonMutations).forEach((nonMutationDesc) => {
describe(nonMutationDesc, () => {
testCasesForNonMutation(nonMutations[nonMutationDesc])
})
})
})
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
/**
* @file 字体所属平台
* @author mengke01(kekee000@gmail.com)
*/
var _default = exports.default = {
Unicode: 0,
Macintosh: 1,
// mac
reserved: 2,
Microsoft: 3 // win
};
@@ -0,0 +1,3 @@
/*! For license information please see quill.core.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Quill=e():t.Quill=e()}(self,(function(){return function(){var t={9698:function(t,e,n){"use strict";n.d(e,{Ay:function(){return c},Ji:function(){return h},zo:function(){return u}});var r=n(6003),i=n(5232),s=n.n(i),o=n(3036),l=n(4850),a=n(5508);class c extends r.BlockBlot{cache={};delta(){return null==this.cache.delta&&(this.cache.delta=function(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.descendants(r.LeafBlot).reduce(((t,n)=>0===n.length()?t:t.insert(n.value(),h(n,{},e))),new(s())).insert("\n",h(t))}(this)),this.cache.delta}deleteAt(t,e){super.deleteAt(t,e),this.cache={}}formatAt(t,e,n,i){e<=0||(this.scroll.query(n,r.Scope.BLOCK)?t+e===this.length()&&this.format(n,i):super.formatAt(t,Math.min(e,this.length()-t-1),n,i),this.cache={})}insertAt(t,e,n){if(null!=n)return super.insertAt(t,e,n),void(this.cache={});if(0===e.length)return;const r=e.split("\n"),i=r.shift();i.length>0&&(t<this.length()-1||null==this.children.tail?super.insertAt(Math.min(t,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let s=this;r.reduce(((t,e)=>(s=s.split(t,!0),s.insertAt(0,e),e.length)),t+i.length)}insertBefore(t,e){const{head:n}=this.children;super.insertBefore(t,e),n instanceof o.A&&n.remove(),this.cache={}}length(){return null==this.cache.length&&(this.cache.length=super.length()+1),this.cache.length}moveChildren(t,e){super.moveChildren(t,e),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e&&(0===t||t>=this.length()-1)){const e=this.clone();return 0===t?(this.parent.insertBefore(e,this),this):(this.parent.insertBefore(e,this.next),e)}const n=super.split(t,e);return this.cache={},n}}c.blotName="block",c.tagName="P",c.defaultChild=o.A,c.allowedChildren=[o.A,l.A,r.EmbedBlot,a.A];class u extends r.EmbedBlot{attach(){super.attach(),this.attributes=new r.AttributorStore(this.domNode)}delta(){return(new(s())).insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,e){const n=this.scroll.query(t,r.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}formatAt(t,e,n,r){this.format(n,r)}insertAt(t,e,n){if(null!=n)return void super.insertAt(t,e,n);const r=e.split("\n"),i=r.pop(),s=r.map((t=>{const e=this.scroll.create(c.blotName);return e.insertAt(0,t),e})),o=this.split(t);s.forEach((t=>{this.parent.insertBefore(t,o)})),i&&this.parent.insertBefore(this.scroll.create("text",i),o)}}function h(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return null==t?e:("formats"in t&&"function"==typeof t.formats&&(e={...e,...t.formats()},n&&delete e["code-token"]),null==t.parent||"scroll"===t.parent.statics.blotName||t.parent.statics.scope!==t.statics.scope?e:h(t.parent,e,n))}u.scope=r.Scope.BLOCK_BLOT},3036:function(t,e,n){"use strict";var r=n(6003);class i extends r.EmbedBlot{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}i.blotName="break",i.tagName="BR",e.A=i},580:function(t,e,n){"use strict";var r=n(6003);class i extends r.ContainerBlot{}e.A=i},4541:function(t,e,n){"use strict";var r=n(6003),i=n(5508);class s extends r.EmbedBlot{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\ufeff";static value(){}constructor(t,e,n){super(t,e),this.selection=n,this.textNode=document.createTextNode(s.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){null!=this.parent&&this.parent.removeChild(this)}format(t,e){if(0!==this.savedLength)return void super.format(t,e);let n=this,i=0;for(;null!=n&&n.statics.scope!==r.Scope.BLOCK_BLOT;)i+=n.offset(n.parent),n=n.parent;null!=n&&(this.savedLength=s.CONTENTS.length,n.optimize(),n.formatAt(i,s.CONTENTS.length,t,e),this.savedLength=0)}index(t,e){return t===this.textNode?0:super.index(t,e)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||null==this.parent)return null;const t=this.selection.getNativeRange();for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const e=this.prev instanceof i.A?this.prev:null,n=e?e.length():0,r=this.next instanceof i.A?this.next:null,o=r?r.text:"",{textNode:l}=this,a=l.data.split(s.CONTENTS).join("");let c;if(l.data=s.CONTENTS,e)c=e,(a||r)&&(e.insertAt(e.length(),a+o),r&&r.remove());else if(r)c=r,r.insertAt(0,a);else{const t=document.createTextNode(a);c=this.scroll.create(t),this.parent.insertBefore(c,this)}if(this.remove(),t){const i=(t,i)=>e&Line truncated
//# sourceMappingURL=quill.core.js.map
@@ -0,0 +1,142 @@
# is-alphanumerical
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
Check if a character is alphanumerical.
## Contents
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`isAlphanumerical(character)`](#isalphanumericalcharacter)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This is a function that checks if a given character is ASCII alphanumerical:
it matches `[a-zA-Z0-9]`.
## When should I use this?
Not often, as it’s relatively simple to do yourself.
This package exists because it’s needed in several related packages, at which
point it becomes useful to defer to one shared function.
## Install
This package is [ESM only][esm].
In Node.js (version 12.20+, 14.14+, or 16.0+), install with [npm][]:
```sh
npm install is-alphanumerical
```
In Deno with [Skypack][]:
```js
import {isAlphanumerical} from 'https://cdn.skypack.dev/is-alphanumerical@2?dts'
```
In browsers with [Skypack][]:
```html
<script type="module">
import {isAlphanumerical} from 'https://cdn.skypack.dev/is-alphanumerical@2?min'
</script>
```
## Use
```js
import {isAlphanumerical} from 'is-alphanumerical'
isAlphanumerical('a') // => true
isAlphanumerical('Z') // => true
isAlphanumerical('0') // => true
isAlphanumerical(' ') // => false
isAlphanumerical('💩') // => false
```
## API
This package exports the following identifier: `isAlphanumerical`.
There is no default export.
### `isAlphanumerical(character)`
Check whether the given character code (`number`), or the character code at the
first position (`string`), is alphanumerical.
## Types
This package is fully typed with [TypeScript][].
## Compatibility
This package is at least compatible with all maintained versions of Node.js.
As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
It also works in Deno and modern browsers.
## Security
This package is safe.
## Related
* [`wooorm/is-alphabetical`](https://github.com/wooorm/is-alphabetical)
* [`wooorm/is-decimal`](https://github.com/wooorm/is-decimal)
* [`wooorm/is-hexadecimal`](https://github.com/wooorm/is-hexadecimal)
* [`wooorm/is-whitespace-character`](https://github.com/wooorm/is-whitespace-character)
* [`wooorm/is-word-character`](https://github.com/wooorm/is-word-character)
## Contribute
Yes please!
See [How to Contribute to Open Source][contribute].
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[build-badge]: https://github.com/wooorm/is-alphanumerical/workflows/main/badge.svg
[build]: https://github.com/wooorm/is-alphanumerical/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/is-alphanumerical.svg
[coverage]: https://codecov.io/github/wooorm/is-alphanumerical
[downloads-badge]: https://img.shields.io/npm/dm/is-alphanumerical.svg
[downloads]: https://www.npmjs.com/package/is-alphanumerical
[size-badge]: https://img.shields.io/bundlephobia/minzip/is-alphanumerical.svg
[size]: https://bundlephobia.com/result?p=is-alphanumerical
[npm]: https://docs.npmjs.com/cli/install
[skypack]: https://www.skypack.dev
[license]: license
[author]: https://wooorm.com
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[typescript]: https://www.typescriptlang.org
[contribute]: https://opensource.guide/how-to-contribute/
@@ -0,0 +1,293 @@
/**
* @fileoverview Prevent usage of Array index in keys
* @author Joe Lencioni
*/
'use strict';
const has = require('hasown');
const astUtil = require('../util/ast');
const docsUrl = require('../util/docsUrl');
const pragma = require('../util/pragma');
const report = require('../util/report');
const variableUtil = require('../util/variable');
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
function isCreateCloneElement(node, context) {
if (!node) {
return false;
}
if (node.type === 'MemberExpression' || node.type === 'OptionalMemberExpression') {
return node.object
&& node.object.name === pragma.getFromContext(context)
&& ['createElement', 'cloneElement'].indexOf(node.property.name) !== -1;
}
if (node.type === 'Identifier') {
const variable = variableUtil.findVariableByName(context, node, node.name);
if (variable && variable.type === 'ImportSpecifier') {
return variable.parent.source.value === 'react';
}
}
return false;
}
const messages = {
noArrayIndex: 'Do not use Array index in keys',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Disallow usage of Array index in keys',
category: 'Best Practices',
recommended: false,
url: docsUrl('no-array-index-key'),
},
messages,
schema: [],
},
create(context) {
// --------------------------------------------------------------------------
// Public
// --------------------------------------------------------------------------
const indexParamNames = [];
const iteratorFunctionsToIndexParamPosition = {
every: 1,
filter: 1,
find: 1,
findIndex: 1,
flatMap: 1,
forEach: 1,
map: 1,
reduce: 2,
reduceRight: 2,
some: 1,
};
function isArrayIndex(node) {
return node.type === 'Identifier'
&& indexParamNames.indexOf(node.name) !== -1;
}
function isUsingReactChildren(node) {
const callee = node.callee;
if (
!callee
|| !callee.property
|| !callee.object
) {
return null;
}
const isReactChildMethod = ['map', 'forEach'].indexOf(callee.property.name) > -1;
if (!isReactChildMethod) {
return null;
}
const obj = callee.object;
if (obj && obj.name === 'Children') {
return true;
}
if (obj && obj.object && obj.object.name === pragma.getFromContext(context)) {
return true;
}
return false;
}
function getMapIndexParamName(node) {
const callee = node.callee;
if (callee.type !== 'MemberExpression' && callee.type !== 'OptionalMemberExpression') {
return null;
}
if (callee.property.type !== 'Identifier') {
return null;
}
if (!has(iteratorFunctionsToIndexParamPosition, callee.property.name)) {
return null;
}
const name = /** @type {keyof iteratorFunctionsToIndexParamPosition} */ (callee.property.name);
const callbackArg = isUsingReactChildren(node)
? node.arguments[1]
: node.arguments[0];
if (!callbackArg) {
return null;
}
if (!astUtil.isFunctionLikeExpression(callbackArg)) {
return null;
}
const params = callbackArg.params;
const indexParamPosition = iteratorFunctionsToIndexParamPosition[name];
if (params.length < indexParamPosition + 1) {
return null;
}
return params[indexParamPosition].name;
}
function getIdentifiersFromBinaryExpression(side) {
if (side.type === 'Identifier') {
return side;
}
if (side.type === 'BinaryExpression') {
// recurse
const left = getIdentifiersFromBinaryExpression(side.left);
const right = getIdentifiersFromBinaryExpression(side.right);
return [].concat(left, right).filter(Boolean);
}
return null;
}
function checkPropValue(node) {
if (isArrayIndex(node)) {
// key={bar}
report(context, messages.noArrayIndex, 'noArrayIndex', {
node,
});
return;
}
if (node.type === 'TemplateLiteral') {
// key={`foo-${bar}`}
node.expressions.filter(isArrayIndex).forEach(() => {
report(context, messages.noArrayIndex, 'noArrayIndex', {
node,
});
});
return;
}
if (node.type === 'BinaryExpression') {
// key={'foo' + bar}
const identifiers = getIdentifiersFromBinaryExpression(node);
identifiers.filter(isArrayIndex).forEach(() => {
report(context, messages.noArrayIndex, 'noArrayIndex', {
node,
});
});
return;
}
if (
astUtil.isCallExpression(node)
&& node.callee
&& node.callee.type === 'MemberExpression'
&& node.callee.object
&& isArrayIndex(node.callee.object)
&& node.callee.property
&& node.callee.property.type === 'Identifier'
&& node.callee.property.name === 'toString'
) {
// key={bar.toString()}
report(context, messages.noArrayIndex, 'noArrayIndex', {
node,
});
return;
}
if (
astUtil.isCallExpression(node)
&& node.callee
&& node.callee.type === 'Identifier'
&& node.callee.name === 'String'
&& Array.isArray(node.arguments)
&& node.arguments.length > 0
&& isArrayIndex(node.arguments[0])
) {
// key={String(bar)}
report(context, messages.noArrayIndex, 'noArrayIndex', {
node: node.arguments[0],
});
}
}
function popIndex(node) {
const mapIndexParamName = getMapIndexParamName(node);
if (!mapIndexParamName) {
return;
}
indexParamNames.pop();
}
return {
'CallExpression, OptionalCallExpression'(node) {
if (isCreateCloneElement(node.callee, context) && node.arguments.length > 1) {
// React.createElement
if (!indexParamNames.length) {
return;
}
const props = node.arguments[1];
if (props.type !== 'ObjectExpression') {
return;
}
props.properties.forEach((prop) => {
if (!prop.key || prop.key.name !== 'key') {
// { ...foo }
// { foo: bar }
return;
}
checkPropValue(prop.value);
});
return;
}
const mapIndexParamName = getMapIndexParamName(node);
if (!mapIndexParamName) {
return;
}
indexParamNames.push(mapIndexParamName);
},
JSXAttribute(node) {
if (node.name.name !== 'key') {
// foo={bar}
return;
}
if (!indexParamNames.length) {
// Not inside a call expression that we think has an index param.
return;
}
const value = node.value;
if (!value || value.type !== 'JSXExpressionContainer') {
// key='foo' or just simply 'key'
return;
}
checkPropValue(value.expression);
},
'CallExpression:exit': popIndex,
'OptionalCallExpression:exit': popIndex,
};
},
};
@@ -0,0 +1,29 @@
/**
* @import {Schema as SchemaType, Space} from 'property-information'
*/
/** @type {SchemaType} */
export class Schema {
/**
* @param {SchemaType['property']} property
* Property.
* @param {SchemaType['normal']} normal
* Normal.
* @param {Space | undefined} [space]
* Space.
* @returns
* Schema.
*/
constructor(property, normal, space) {
this.normal = normal
this.property = property
if (space) {
this.space = space
}
}
}
Schema.prototype.normal = {}
Schema.prototype.property = {}
Schema.prototype.space = undefined
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A wC","33":"B"},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 7 8 9 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R 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 xC TC J ZB K D E F A B C L M G N O P aB 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 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","2":"J ZB K D E F A"},E:{"1":"D E F A B C L M G 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K 2C ZC 3C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F B C FD GD HD ID NC uC JD OC"},G:{"1":"E ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC LD MD"},H:{"2":"hD"},I:{"1":"I mD nD","2":"TC J iD jD kD lD vC"},J:{"1":"A","2":"D"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A","33":"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:"crypto.getRandomValues()",D:true};
@@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_de_ch=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(e),a={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function i(e,n,t){var i=a[t];return Array.isArray(i)&&(i=i[n?0:1]),i.replace("%d",e)}var r={name:"de-ch",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),ordinal:function(e){return e+"."},weekStart:1,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i}};return t.default.locale(r,null,!0),r}));
@@ -0,0 +1,47 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {Collection, Key} from '@react-types/shared';
import {isAppleDevice, useId} from '@react-aria/utils';
import {RefObject} from 'react';
interface Event {
altKey: boolean,
ctrlKey: boolean,
metaKey: boolean
}
export function isNonContiguousSelectionModifier(e: Event): boolean {
// Ctrl + Arrow Up/Arrow Down has a system wide meaning on macOS, so use Alt instead.
// On Windows and Ubuntu, Alt + Space has a system wide meaning.
return isAppleDevice() ? e.altKey : e.ctrlKey;
}
export function getItemElement(collectionRef: RefObject<HTMLElement | null>, key: Key): Element | null | undefined {
let selector = `[data-key="${CSS.escape(String(key))}"]`;
let collection = collectionRef.current?.dataset.collection;
if (collection) {
selector = `[data-collection="${CSS.escape(collection)}"]${selector}`;
}
return collectionRef.current?.querySelector(selector);
}
const collectionMap = new WeakMap<Collection<any>, string>();
export function useCollectionId(collection: Collection<any>): string {
let id = useId();
collectionMap.set(collection, id);
return id;
}
export function getCollectionId(collection: Collection<any>): string {
return collectionMap.get(collection)!;
}
@@ -0,0 +1,32 @@
'use strict';
var $TypeError = require('es-errors/type');
var IsInteger = require('./IsInteger');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var isTypedArray = require('is-typed-array');
var typedArrayBuffer = require('typed-array-buffer');
// https://262.ecma-international.org/11.0/#sec-isvalidintegerindex
module.exports = function IsValidIntegerIndex(O, index) {
if (!isTypedArray) {
throw new $TypeError('Assertion failed: `O` must be a Typed Array');
}
typedArrayBuffer(O); // step 1
if (typeof index !== 'number') {
throw new $TypeError('Assertion failed: Type(index) is not Number'); // step 2
}
if (!IsInteger(index)) { return false; } // step 3
if (isNegativeZero(index)) { return false; } // step 4
if (index < 0 || index >= O.length) { return false; } // step 5
return true; // step 6
};
@@ -0,0 +1,3 @@
import type { PluginConfig } from '../types.js';
declare const _default: PluginConfig;
export default _default;
@@ -0,0 +1,11 @@
"use strict";
function _skip_first_generator_next(fn) {
return function() {
var it = fn.apply(this, arguments);
it.next();
return it;
};
}
exports._ = _skip_first_generator_next;
@@ -0,0 +1,2 @@
export const html: import("./util/schema.js").Schema;
//# sourceMappingURL=html.d.ts.map
@@ -0,0 +1,3 @@
import { InjectFromHierarchyOptions } from '../models/InjectFromHierarchyOptions';
export declare function injectFromHierarchy(options?: InjectFromHierarchyOptions): ClassDecorator;
//# sourceMappingURL=injectFromHierarchy.d.ts.map
@@ -0,0 +1,9 @@
import { FileT, JsonT, StringSave } from "./interfaces";
declare global {
interface JSON extends JsonT { }
interface StringConstructor extends FileT { }
interface String extends StringSave { }
}
export { };
@@ -0,0 +1,42 @@
{
"name": "natural-compare",
"version": "1.4.0",
"stability": 3,
"author": "Lauri Rooden (https://github.com/litejs/natural-compare-lite)",
"license": "MIT",
"description": "Compare strings containing a mix of letters and numbers in the way a human being would in sort order.",
"keywords": [
"string",
"natural",
"order",
"sort",
"natsort",
"natcmp",
"compare",
"alphanum",
"litejs"
],
"main": "index.js",
"readmeFilename": "README.md",
"files": [
"index.js"
],
"scripts": {
"build": "node node_modules/buildman/index.js --all",
"test": "node tests/index.js"
},
"repository": "git://github.com/litejs/natural-compare-lite.git",
"bugs": {
"url": "https://github.com/litejs/natural-compare-lite/issues"
},
"devDependencies": {
"buildman": "*",
"testman": "*"
},
"buildman": {
"dist/index-min.js": {
"banner": "/*! litejs.com/MIT-LICENSE.txt */",
"input": "index.js"
}
}
}
@@ -0,0 +1,30 @@
var baseToPairs = require('./_baseToPairs'),
getTag = require('./_getTag'),
mapToArray = require('./_mapToArray'),
setToPairs = require('./_setToPairs');
/** `Object#toString` result references. */
var mapTag = '[object Map]',
setTag = '[object Set]';
/**
* Creates a `_.toPairs` or `_.toPairsIn` function.
*
* @private
* @param {Function} keysFunc The function to get the keys of a given object.
* @returns {Function} Returns the new pairs function.
*/
function createToPairs(keysFunc) {
return function(object) {
var tag = getTag(object);
if (tag == mapTag) {
return mapToArray(object);
}
if (tag == setTag) {
return setToPairs(object);
}
return baseToPairs(object, keysFunc(object));
};
}
module.exports = createToPairs;
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (https://lukeed.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,49 @@
export declare class NodeIKernelFileAssistantListener {
onFileStatusChanged(_fileStatus: {
id: string;
fileStatus: number;
fileProgress: `${number}`;
fileSize: `${number}`;
fileSpeed: number;
thumbPath: string | null;
filePath: string | null;
}): any;
onSessionListChanged(..._args: unknown[]): any;
onSessionChanged(..._args: unknown[]): any;
onFileListChanged(..._args: unknown[]): any;
onFileSearch(_searchResult: SearchResultWrapper): any;
}
export type SearchResultWrapper = {
searchId: number;
resultId: number;
hasMore: boolean;
resultItems: SearchResultItem[];
};
export type SearchResultItem = {
id: string;
fileName: string;
fileNameHits: string[];
fileStatus: number;
fileSize: string;
isSend: boolean;
source: number;
fileTime: string;
expTime: string;
session: {
context: null;
uid: string;
nick: string;
remark: string;
memberCard: string;
groupCode: string;
groupName: string;
groupRemark: string;
count: number;
};
thumbPath: string;
filePath: string;
msgId: string;
chatType: number;
peerUid: string;
fileType: number;
};
@@ -0,0 +1,28 @@
import baseRandom from './_baseRandom.js';
/**
* A specialized version of `_.shuffle` which mutates and sets the size of `array`.
*
* @private
* @param {Array} array The array to shuffle.
* @param {number} [size=array.length] The size of `array`.
* @returns {Array} Returns `array`.
*/
function shuffleSelf(array, size) {
var index = -1,
length = array.length,
lastIndex = length - 1;
size = size === undefined ? length : size;
while (++index < size) {
var rand = baseRandom(index, lastIndex),
value = array[rand];
array[rand] = array[index];
array[index] = value;
}
array.length = size;
return array;
}
export default shuffleSelf;
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=getDefaultClassMetadata.spec.d.ts.map
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = toComputedKey;
var _index = require("../validators/generated/index.js");
var _index2 = require("../builders/generated/index.js");
function toComputedKey(node, key = node.key || node.property) {
if (!node.computed && (0, _index.isIdentifier)(key)) key = (0, _index2.stringLiteral)(key.name);
return key;
}
//# sourceMappingURL=toComputedKey.js.map
@@ -0,0 +1,208 @@
"use strict";
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
/* eslint-disable global-require */
var flatConfigBase = require('./configs/flat-config-base');
var legacyConfigBase = require('./configs/legacy-config-base');
var _require = require('../package.json'),
name = _require.name,
version = _require.version;
var allRules = {
'accessible-emoji': require('./rules/accessible-emoji'),
'alt-text': require('./rules/alt-text'),
'anchor-ambiguous-text': require('./rules/anchor-ambiguous-text'),
'anchor-has-content': require('./rules/anchor-has-content'),
'anchor-is-valid': require('./rules/anchor-is-valid'),
'aria-activedescendant-has-tabindex': require('./rules/aria-activedescendant-has-tabindex'),
'aria-props': require('./rules/aria-props'),
'aria-proptypes': require('./rules/aria-proptypes'),
'aria-role': require('./rules/aria-role'),
'aria-unsupported-elements': require('./rules/aria-unsupported-elements'),
'autocomplete-valid': require('./rules/autocomplete-valid'),
'click-events-have-key-events': require('./rules/click-events-have-key-events'),
'control-has-associated-label': require('./rules/control-has-associated-label'),
'heading-has-content': require('./rules/heading-has-content'),
'html-has-lang': require('./rules/html-has-lang'),
'iframe-has-title': require('./rules/iframe-has-title'),
'img-redundant-alt': require('./rules/img-redundant-alt'),
'interactive-supports-focus': require('./rules/interactive-supports-focus'),
'label-has-associated-control': require('./rules/label-has-associated-control'),
'label-has-for': require('./rules/label-has-for'),
lang: require('./rules/lang'),
'media-has-caption': require('./rules/media-has-caption'),
'mouse-events-have-key-events': require('./rules/mouse-events-have-key-events'),
'no-access-key': require('./rules/no-access-key'),
'no-aria-hidden-on-focusable': require('./rules/no-aria-hidden-on-focusable'),
'no-autofocus': require('./rules/no-autofocus'),
'no-distracting-elements': require('./rules/no-distracting-elements'),
'no-interactive-element-to-noninteractive-role': require('./rules/no-interactive-element-to-noninteractive-role'),
'no-noninteractive-element-interactions': require('./rules/no-noninteractive-element-interactions'),
'no-noninteractive-element-to-interactive-role': require('./rules/no-noninteractive-element-to-interactive-role'),
'no-noninteractive-tabindex': require('./rules/no-noninteractive-tabindex'),
'no-onchange': require('./rules/no-onchange'),
'no-redundant-roles': require('./rules/no-redundant-roles'),
'no-static-element-interactions': require('./rules/no-static-element-interactions'),
'prefer-tag-over-role': require('./rules/prefer-tag-over-role'),
'role-has-required-aria-props': require('./rules/role-has-required-aria-props'),
'role-supports-aria-props': require('./rules/role-supports-aria-props'),
scope: require('./rules/scope'),
'tabindex-no-positive': require('./rules/tabindex-no-positive')
};
var recommendedRules = {
'jsx-a11y/alt-text': 'error',
'jsx-a11y/anchor-ambiguous-text': 'off',
// TODO: error
'jsx-a11y/anchor-has-content': 'error',
'jsx-a11y/anchor-is-valid': 'error',
'jsx-a11y/aria-activedescendant-has-tabindex': 'error',
'jsx-a11y/aria-props': 'error',
'jsx-a11y/aria-proptypes': 'error',
'jsx-a11y/aria-role': 'error',
'jsx-a11y/aria-unsupported-elements': 'error',
'jsx-a11y/autocomplete-valid': 'error',
'jsx-a11y/click-events-have-key-events': 'error',
'jsx-a11y/control-has-associated-label': ['off', {
ignoreElements: ['audio', 'canvas', 'embed', 'input', 'textarea', 'tr', 'video'],
ignoreRoles: ['grid', 'listbox', 'menu', 'menubar', 'radiogroup', 'row', 'tablist', 'toolbar', 'tree', 'treegrid'],
includeRoles: ['alert', 'dialog']
}],
'jsx-a11y/heading-has-content': 'error',
'jsx-a11y/html-has-lang': 'error',
'jsx-a11y/iframe-has-title': 'error',
'jsx-a11y/img-redundant-alt': 'error',
'jsx-a11y/interactive-supports-focus': ['error', {
tabbable: ['button', 'checkbox', 'link', 'searchbox', 'spinbutton', 'switch', 'textbox']
}],
'jsx-a11y/label-has-associated-control': 'error',
'jsx-a11y/label-has-for': 'off',
'jsx-a11y/media-has-caption': 'error',
'jsx-a11y/mouse-events-have-key-events': 'error',
'jsx-a11y/no-access-key': 'error',
'jsx-a11y/no-autofocus': 'error',
'jsx-a11y/no-distracting-elements': 'error',
'jsx-a11y/no-interactive-element-to-noninteractive-role': ['error', {
tr: ['none', 'presentation'],
canvas: ['img']
}],
'jsx-a11y/no-noninteractive-element-interactions': ['error', {
handlers: ['onClick', 'onError', 'onLoad', 'onMouseDown', 'onMouseUp', 'onKeyPress', 'onKeyDown', 'onKeyUp'],
alert: ['onKeyUp', 'onKeyDown', 'onKeyPress'],
body: ['onError', 'onLoad'],
dialog: ['onKeyUp', 'onKeyDown', 'onKeyPress'],
iframe: ['onError', 'onLoad'],
img: ['onError', 'onLoad']
}],
'jsx-a11y/no-noninteractive-element-to-interactive-role': ['error', {
ul: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
ol: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
li: ['menuitem', 'menuitemradio', 'menuitemcheckbox', 'option', 'row', 'tab', 'treeitem'],
table: ['grid'],
td: ['gridcell'],
fieldset: ['radiogroup', 'presentation']
}],
'jsx-a11y/no-noninteractive-tabindex': ['error', {
tags: [],
roles: ['tabpanel'],
allowExpressionValues: true
}],
'jsx-a11y/no-redundant-roles': 'error',
'jsx-a11y/no-static-element-interactions': ['error', {
allowExpressionValues: true,
handlers: ['onClick', 'onMouseDown', 'onMouseUp', 'onKeyPress', 'onKeyDown', 'onKeyUp']
}],
'jsx-a11y/role-has-required-aria-props': 'error',
'jsx-a11y/role-supports-aria-props': 'error',
'jsx-a11y/scope': 'error',
'jsx-a11y/tabindex-no-positive': 'error'
};
var strictRules = {
'jsx-a11y/alt-text': 'error',
'jsx-a11y/anchor-has-content': 'error',
'jsx-a11y/anchor-is-valid': 'error',
'jsx-a11y/aria-activedescendant-has-tabindex': 'error',
'jsx-a11y/aria-props': 'error',
'jsx-a11y/aria-proptypes': 'error',
'jsx-a11y/aria-role': 'error',
'jsx-a11y/aria-unsupported-elements': 'error',
'jsx-a11y/autocomplete-valid': 'error',
'jsx-a11y/click-events-have-key-events': 'error',
'jsx-a11y/control-has-associated-label': ['off', {
ignoreElements: ['audio', 'canvas', 'embed', 'input', 'textarea', 'tr', 'video'],
ignoreRoles: ['grid', 'listbox', 'menu', 'menubar', 'radiogroup', 'row', 'tablist', 'toolbar', 'tree', 'treegrid'],
includeRoles: ['alert', 'dialog']
}],
'jsx-a11y/heading-has-content': 'error',
'jsx-a11y/html-has-lang': 'error',
'jsx-a11y/iframe-has-title': 'error',
'jsx-a11y/img-redundant-alt': 'error',
'jsx-a11y/interactive-supports-focus': ['error', {
tabbable: ['button', 'checkbox', 'link', 'progressbar', 'searchbox', 'slider', 'spinbutton', 'switch', 'textbox']
}],
'jsx-a11y/label-has-for': 'off',
'jsx-a11y/label-has-associated-control': 'error',
'jsx-a11y/media-has-caption': 'error',
'jsx-a11y/mouse-events-have-key-events': 'error',
'jsx-a11y/no-access-key': 'error',
'jsx-a11y/no-autofocus': 'error',
'jsx-a11y/no-distracting-elements': 'error',
'jsx-a11y/no-interactive-element-to-noninteractive-role': 'error',
'jsx-a11y/no-noninteractive-element-interactions': ['error', {
body: ['onError', 'onLoad'],
iframe: ['onError', 'onLoad'],
img: ['onError', 'onLoad']
}],
'jsx-a11y/no-noninteractive-element-to-interactive-role': 'error',
'jsx-a11y/no-noninteractive-tabindex': 'error',
'jsx-a11y/no-redundant-roles': 'error',
'jsx-a11y/no-static-element-interactions': 'error',
'jsx-a11y/role-has-required-aria-props': 'error',
'jsx-a11y/role-supports-aria-props': 'error',
'jsx-a11y/scope': 'error',
'jsx-a11y/tabindex-no-positive': 'error'
};
/** Base plugin object */
var jsxA11y = {
meta: {
name,
version
},
rules: _objectSpread({}, allRules)
};
/**
* Given a ruleset and optionally a flat config name, generate a config.
* @param {object} rules - ruleset for this config
* @param {string} flatConfigName - name for the config if flat
* @returns Config for this set of rules.
*/
var createConfig = function createConfig(rules, flatConfigName) {
return _objectSpread(_objectSpread({}, flatConfigName ? _objectSpread(_objectSpread({}, flatConfigBase), {}, {
name: "jsx-a11y/".concat(flatConfigName),
plugins: {
'jsx-a11y': jsxA11y
}
}) : _objectSpread(_objectSpread({}, legacyConfigBase), {}, {
plugins: ['jsx-a11y']
})), {}, {
rules: _objectSpread({}, rules)
});
};
// Create configs for the plugin object
var configs = {
recommended: createConfig(recommendedRules),
strict: createConfig(strictRules)
};
var flatConfigs = {
recommended: createConfig(recommendedRules, 'recommended'),
strict: createConfig(strictRules, 'strict')
};
module.exports = _objectSpread(_objectSpread({}, jsxA11y), {}, {
configs,
flatConfigs
});
@@ -0,0 +1,8 @@
/**
* Lightens a color by a given amount. This is equivalent to
* `darken(color, -amount)`
*
* @param amount The amount to darken, given as a decimal between 0 and 1
*/
declare function lighten(color: string, amount: number): string;
export default lighten;
@@ -0,0 +1,760 @@
var $euGna$reactariautils = require("@react-aria/utils");
var $euGna$reactariainteractions = require("@react-aria/interactions");
var $euGna$react = require("react");
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "FocusScope", () => $a7a032acae3ddda9$export$20e40289641fbbb6);
$parcel$export(module.exports, "useFocusManager", () => $a7a032acae3ddda9$export$10c5169755ce7bd7);
$parcel$export(module.exports, "getFocusableTreeWalker", () => $a7a032acae3ddda9$export$2d6ec8fc375ceafa);
$parcel$export(module.exports, "isElementInChildOfActiveScope", () => $a7a032acae3ddda9$export$1258395f99bf9cbf);
$parcel$export(module.exports, "createFocusManager", () => $a7a032acae3ddda9$export$c5251b9e124bf29);
/*
* 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 $a7a032acae3ddda9$var$FocusContext = /*#__PURE__*/ (0, ($parcel$interopDefault($euGna$react))).createContext(null);
const $a7a032acae3ddda9$var$RESTORE_FOCUS_EVENT = 'react-aria-focus-scope-restore';
let $a7a032acae3ddda9$var$activeScope = null;
function $a7a032acae3ddda9$export$20e40289641fbbb6(props) {
let { children: children, contain: contain, restoreFocus: restoreFocus, autoFocus: autoFocus } = props;
let startRef = (0, $euGna$react.useRef)(null);
let endRef = (0, $euGna$react.useRef)(null);
let scopeRef = (0, $euGna$react.useRef)([]);
let { parentNode: parentNode } = (0, $euGna$react.useContext)($a7a032acae3ddda9$var$FocusContext) || {};
// Create a tree node here so we can add children to it even before it is added to the tree.
let node = (0, $euGna$react.useMemo)(()=>new $a7a032acae3ddda9$var$TreeNode({
scopeRef: scopeRef
}), [
scopeRef
]);
(0, $euGna$reactariautils.useLayoutEffect)(()=>{
// If a new scope mounts outside the active scope, (e.g. DialogContainer launched from a menu),
// use the active scope as the parent instead of the parent from context. Layout effects run bottom
// up, so if the parent is not yet added to the tree, don't do this. Only the outer-most FocusScope
// that is being added should get the activeScope as its parent.
let parent = parentNode || $a7a032acae3ddda9$export$d06fae2ee68b101e.root;
if ($a7a032acae3ddda9$export$d06fae2ee68b101e.getTreeNode(parent.scopeRef) && $a7a032acae3ddda9$var$activeScope && !$a7a032acae3ddda9$var$isAncestorScope($a7a032acae3ddda9$var$activeScope, parent.scopeRef)) {
let activeNode = $a7a032acae3ddda9$export$d06fae2ee68b101e.getTreeNode($a7a032acae3ddda9$var$activeScope);
if (activeNode) parent = activeNode;
}
// Add the node to the parent, and to the tree.
parent.addChild(node);
$a7a032acae3ddda9$export$d06fae2ee68b101e.addNode(node);
}, [
node,
parentNode
]);
(0, $euGna$reactariautils.useLayoutEffect)(()=>{
let node = $a7a032acae3ddda9$export$d06fae2ee68b101e.getTreeNode(scopeRef);
if (node) node.contain = !!contain;
}, [
contain
]);
(0, $euGna$reactariautils.useLayoutEffect)(()=>{
var _startRef_current;
// Find all rendered nodes between the sentinels and add them to the scope.
let node = (_startRef_current = startRef.current) === null || _startRef_current === void 0 ? void 0 : _startRef_current.nextSibling;
let nodes = [];
let stopPropagation = (e)=>e.stopPropagation();
while(node && node !== endRef.current){
nodes.push(node);
// Stop custom restore focus event from propagating to parent focus scopes.
node.addEventListener($a7a032acae3ddda9$var$RESTORE_FOCUS_EVENT, stopPropagation);
node = node.nextSibling;
}
scopeRef.current = nodes;
return ()=>{
for (let node of nodes)node.removeEventListener($a7a032acae3ddda9$var$RESTORE_FOCUS_EVENT, stopPropagation);
};
}, [
children
]);
$a7a032acae3ddda9$var$useActiveScopeTracker(scopeRef, restoreFocus, contain);
$a7a032acae3ddda9$var$useFocusContainment(scopeRef, contain);
$a7a032acae3ddda9$var$useRestoreFocus(scopeRef, restoreFocus, contain);
$a7a032acae3ddda9$var$useAutoFocus(scopeRef, autoFocus);
// This needs to be an effect so that activeScope is updated after the FocusScope tree is complete.
// It cannot be a useLayoutEffect because the parent of this node hasn't been attached in the tree yet.
(0, $euGna$react.useEffect)(()=>{
const activeElement = (0, $euGna$reactariautils.getActiveElement)((0, $euGna$reactariautils.getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined));
let scope = null;
if ($a7a032acae3ddda9$var$isElementInScope(activeElement, scopeRef.current)) {
// We need to traverse the focusScope tree and find the bottom most scope that
// contains the active element and set that as the activeScope.
for (let node of $a7a032acae3ddda9$export$d06fae2ee68b101e.traverse())if (node.scopeRef && $a7a032acae3ddda9$var$isElementInScope(activeElement, node.scopeRef.current)) scope = node;
if (scope === $a7a032acae3ddda9$export$d06fae2ee68b101e.getTreeNode(scopeRef)) $a7a032acae3ddda9$var$activeScope = scope.scopeRef;
}
}, [
scopeRef
]);
// This layout effect cleanup is so that the tree node is removed synchronously with react before the RAF
// in useRestoreFocus cleanup runs.
(0, $euGna$reactariautils.useLayoutEffect)(()=>{
return ()=>{
var _focusScopeTree_getTreeNode_parent, _focusScopeTree_getTreeNode;
var _focusScopeTree_getTreeNode_parent_scopeRef;
// Scope may have been re-parented.
let parentScope = (_focusScopeTree_getTreeNode_parent_scopeRef = (_focusScopeTree_getTreeNode = $a7a032acae3ddda9$export$d06fae2ee68b101e.getTreeNode(scopeRef)) === null || _focusScopeTree_getTreeNode === void 0 ? void 0 : (_focusScopeTree_getTreeNode_parent = _focusScopeTree_getTreeNode.parent) === null || _focusScopeTree_getTreeNode_parent === void 0 ? void 0 : _focusScopeTree_getTreeNode_parent.scopeRef) !== null && _focusScopeTree_getTreeNode_parent_scopeRef !== void 0 ? _focusScopeTree_getTreeNode_parent_scopeRef : null;
if ((scopeRef === $a7a032acae3ddda9$var$activeScope || $a7a032acae3ddda9$var$isAncestorScope(scopeRef, $a7a032acae3ddda9$var$activeScope)) && (!parentScope || $a7a032acae3ddda9$export$d06fae2ee68b101e.getTreeNode(parentScope))) $a7a032acae3ddda9$var$activeScope = parentScope;
$a7a032acae3ddda9$export$d06fae2ee68b101e.removeTreeNode(scopeRef);
};
}, [
scopeRef
]);
let focusManager = (0, $euGna$react.useMemo)(()=>$a7a032acae3ddda9$var$createFocusManagerForScope(scopeRef), []);
let value = (0, $euGna$react.useMemo)(()=>({
focusManager: focusManager,
parentNode: node
}), [
node,
focusManager
]);
return /*#__PURE__*/ (0, ($parcel$interopDefault($euGna$react))).createElement($a7a032acae3ddda9$var$FocusContext.Provider, {
value: value
}, /*#__PURE__*/ (0, ($parcel$interopDefault($euGna$react))).createElement("span", {
"data-focus-scope-start": true,
hidden: true,
ref: startRef
}), children, /*#__PURE__*/ (0, ($parcel$interopDefault($euGna$react))).createElement("span", {
"data-focus-scope-end": true,
hidden: true,
ref: endRef
}));
}
function $a7a032acae3ddda9$export$10c5169755ce7bd7() {
var _useContext;
return (_useContext = (0, $euGna$react.useContext)($a7a032acae3ddda9$var$FocusContext)) === null || _useContext === void 0 ? void 0 : _useContext.focusManager;
}
function $a7a032acae3ddda9$var$createFocusManagerForScope(scopeRef) {
return {
focusNext (opts = {}) {
let scope = scopeRef.current;
let { from: from, tabbable: tabbable, wrap: wrap, accept: accept } = opts;
var _scope_;
let node = from || (0, $euGna$reactariautils.getActiveElement)((0, $euGna$reactariautils.getOwnerDocument)((_scope_ = scope[0]) !== null && _scope_ !== void 0 ? _scope_ : undefined));
let sentinel = scope[0].previousElementSibling;
let scopeRoot = $a7a032acae3ddda9$var$getScopeRoot(scope);
let walker = $a7a032acae3ddda9$export$2d6ec8fc375ceafa(scopeRoot, {
tabbable: tabbable,
accept: accept
}, scope);
walker.currentNode = $a7a032acae3ddda9$var$isElementInScope(node, scope) ? node : sentinel;
let nextNode = walker.nextNode();
if (!nextNode && wrap) {
walker.currentNode = sentinel;
nextNode = walker.nextNode();
}
if (nextNode) $a7a032acae3ddda9$var$focusElement(nextNode, true);
return nextNode;
},
focusPrevious (opts = {}) {
let scope = scopeRef.current;
let { from: from, tabbable: tabbable, wrap: wrap, accept: accept } = opts;
var _scope_;
let node = from || (0, $euGna$reactariautils.getActiveElement)((0, $euGna$reactariautils.getOwnerDocument)((_scope_ = scope[0]) !== null && _scope_ !== void 0 ? _scope_ : undefined));
let sentinel = scope[scope.length - 1].nextElementSibling;
let scopeRoot = $a7a032acae3ddda9$var$getScopeRoot(scope);
let walker = $a7a032acae3ddda9$export$2d6ec8fc375ceafa(scopeRoot, {
tabbable: tabbable,
accept: accept
}, scope);
walker.currentNode = $a7a032acae3ddda9$var$isElementInScope(node, scope) ? node : sentinel;
let previousNode = walker.previousNode();
if (!previousNode && wrap) {
walker.currentNode = sentinel;
previousNode = walker.previousNode();
}
if (previousNode) $a7a032acae3ddda9$var$focusElement(previousNode, true);
return previousNode;
},
focusFirst (opts = {}) {
let scope = scopeRef.current;
let { tabbable: tabbable, accept: accept } = opts;
let scopeRoot = $a7a032acae3ddda9$var$getScopeRoot(scope);
let walker = $a7a032acae3ddda9$export$2d6ec8fc375ceafa(scopeRoot, {
tabbable: tabbable,
accept: accept
}, scope);
walker.currentNode = scope[0].previousElementSibling;
let nextNode = walker.nextNode();
if (nextNode) $a7a032acae3ddda9$var$focusElement(nextNode, true);
return nextNode;
},
focusLast (opts = {}) {
let scope = scopeRef.current;
let { tabbable: tabbable, accept: accept } = opts;
let scopeRoot = $a7a032acae3ddda9$var$getScopeRoot(scope);
let walker = $a7a032acae3ddda9$export$2d6ec8fc375ceafa(scopeRoot, {
tabbable: tabbable,
accept: accept
}, scope);
walker.currentNode = scope[scope.length - 1].nextElementSibling;
let previousNode = walker.previousNode();
if (previousNode) $a7a032acae3ddda9$var$focusElement(previousNode, true);
return previousNode;
}
};
}
function $a7a032acae3ddda9$var$getScopeRoot(scope) {
return scope[0].parentElement;
}
function $a7a032acae3ddda9$var$shouldContainFocus(scopeRef) {
let scope = $a7a032acae3ddda9$export$d06fae2ee68b101e.getTreeNode($a7a032acae3ddda9$var$activeScope);
while(scope && scope.scopeRef !== scopeRef){
if (scope.contain) return false;
scope = scope.parent;
}
return true;
}
function $a7a032acae3ddda9$var$isTabbableRadio(element) {
if (element.checked) return true;
let radios = [];
if (!element.form) radios = [
...(0, $euGna$reactariautils.getOwnerDocument)(element).querySelectorAll(`input[type="radio"][name="${CSS.escape(element.name)}"]`)
].filter((radio)=>!radio.form);
else {
var _element_form_elements, _element_form;
let radioList = (_element_form = element.form) === null || _element_form === void 0 ? void 0 : (_element_form_elements = _element_form.elements) === null || _element_form_elements === void 0 ? void 0 : _element_form_elements.namedItem(element.name);
radios = [
...radioList !== null && radioList !== void 0 ? radioList : []
];
}
if (!radios) return false;
let anyChecked = radios.some((radio)=>radio.checked);
return !anyChecked;
}
function $a7a032acae3ddda9$var$useFocusContainment(scopeRef, contain) {
let focusedNode = (0, $euGna$react.useRef)(undefined);
let raf = (0, $euGna$react.useRef)(undefined);
(0, $euGna$reactariautils.useLayoutEffect)(()=>{
let scope = scopeRef.current;
if (!contain) {
// if contain was changed, then we should cancel any ongoing waits to pull focus back into containment
if (raf.current) {
cancelAnimationFrame(raf.current);
raf.current = undefined;
}
return;
}
const ownerDocument = (0, $euGna$reactariautils.getOwnerDocument)(scope ? scope[0] : undefined);
// Handle the Tab key to contain focus within the scope
let onKeyDown = (e)=>{
if (e.key !== 'Tab' || e.altKey || e.ctrlKey || e.metaKey || !$a7a032acae3ddda9$var$shouldContainFocus(scopeRef) || e.isComposing) return;
let focusedElement = (0, $euGna$reactariautils.getActiveElement)(ownerDocument);
let scope = scopeRef.current;
if (!scope || !$a7a032acae3ddda9$var$isElementInScope(focusedElement, scope)) return;
let scopeRoot = $a7a032acae3ddda9$var$getScopeRoot(scope);
let walker = $a7a032acae3ddda9$export$2d6ec8fc375ceafa(scopeRoot, {
tabbable: true
}, scope);
if (!focusedElement) return;
walker.currentNode = focusedElement;
let nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
if (!nextElement) {
walker.currentNode = e.shiftKey ? scope[scope.length - 1].nextElementSibling : scope[0].previousElementSibling;
nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
}
e.preventDefault();
if (nextElement) $a7a032acae3ddda9$var$focusElement(nextElement, true);
};
let onFocus = (e)=>{
// If focusing an element in a child scope of the currently active scope, the child becomes active.
// Moving out of the active scope to an ancestor is not allowed.
if ((!$a7a032acae3ddda9$var$activeScope || $a7a032acae3ddda9$var$isAncestorScope($a7a032acae3ddda9$var$activeScope, scopeRef)) && $a7a032acae3ddda9$var$isElementInScope((0, $euGna$reactariautils.getEventTarget)(e), scopeRef.current)) {
$a7a032acae3ddda9$var$activeScope = scopeRef;
focusedNode.current = (0, $euGna$reactariautils.getEventTarget)(e);
} else if ($a7a032acae3ddda9$var$shouldContainFocus(scopeRef) && !$a7a032acae3ddda9$var$isElementInChildScope((0, $euGna$reactariautils.getEventTarget)(e), scopeRef)) {
// If a focus event occurs outside the active scope (e.g. user tabs from browser location bar),
// restore focus to the previously focused node or the first tabbable element in the active scope.
if (focusedNode.current) focusedNode.current.focus();
else if ($a7a032acae3ddda9$var$activeScope && $a7a032acae3ddda9$var$activeScope.current) $a7a032acae3ddda9$var$focusFirstInScope($a7a032acae3ddda9$var$activeScope.current);
} else if ($a7a032acae3ddda9$var$shouldContainFocus(scopeRef)) focusedNode.current = (0, $euGna$reactariautils.getEventTarget)(e);
};
let onBlur = (e)=>{
// Firefox doesn't shift focus back to the Dialog properly without this
if (raf.current) cancelAnimationFrame(raf.current);
raf.current = requestAnimationFrame(()=>{
// Patches infinite focus coersion loop for Android Talkback where the user isn't able to move the virtual cursor
// if within a containing focus scope. Bug filed against Chrome: https://issuetracker.google.com/issues/384844019.
// Note that this means focus can leave focus containing modals due to this, but it is isolated to Chrome Talkback.
let modality = (0, $euGna$reactariainteractions.getInteractionModality)();
let shouldSkipFocusRestore = (modality === 'virtual' || modality === null) && (0, $euGna$reactariautils.isAndroid)() && (0, $euGna$reactariautils.isChrome)();
// Use document.activeElement instead of e.relatedTarget so we can tell if user clicked into iframe
let activeElement = (0, $euGna$reactariautils.getActiveElement)(ownerDocument);
if (!shouldSkipFocusRestore && activeElement && $a7a032acae3ddda9$var$shouldContainFocus(scopeRef) && !$a7a032acae3ddda9$var$isElementInChildScope(activeElement, scopeRef)) {
$a7a032acae3ddda9$var$activeScope = scopeRef;
let target = (0, $euGna$reactariautils.getEventTarget)(e);
if (target && target.isConnected) {
var _focusedNode_current;
focusedNode.current = target;
(_focusedNode_current = focusedNode.current) === null || _focusedNode_current === void 0 ? void 0 : _focusedNode_current.focus();
} else if ($a7a032acae3ddda9$var$activeScope.current) $a7a032acae3ddda9$var$focusFirstInScope($a7a032acae3ddda9$var$activeScope.current);
}
});
};
ownerDocument.addEventListener('keydown', onKeyDown, false);
ownerDocument.addEventListener('focusin', onFocus, false);
scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));
scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusout', onBlur, false));
return ()=>{
ownerDocument.removeEventListener('keydown', onKeyDown, false);
ownerDocument.removeEventListener('focusin', onFocus, false);
scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));
scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusout', onBlur, false));
};
}, [
scopeRef,
contain
]);
// This is a useLayoutEffect so it is guaranteed to run before our async synthetic blur
(0, $euGna$reactariautils.useLayoutEffect)(()=>{
return ()=>{
if (raf.current) cancelAnimationFrame(raf.current);
};
}, [
raf
]);
}
function $a7a032acae3ddda9$var$isElementInAnyScope(element) {
return $a7a032acae3ddda9$var$isElementInChildScope(element);
}
function $a7a032acae3ddda9$var$isElementInScope(element, scope) {
if (!element) return false;
if (!scope) return false;
return scope.some((node)=>node.contains(element));
}
function $a7a032acae3ddda9$var$isElementInChildScope(element, scope = null) {
// If the element is within a top layer element (e.g. toasts), always allow moving focus there.
if (element instanceof Element && element.closest('[data-react-aria-top-layer]')) return true;
// node.contains in isElementInScope covers child scopes that are also DOM children,
// but does not cover child scopes in portals.
for (let { scopeRef: s } of $a7a032acae3ddda9$export$d06fae2ee68b101e.traverse($a7a032acae3ddda9$export$d06fae2ee68b101e.getTreeNode(scope))){
if (s && $a7a032acae3ddda9$var$isElementInScope(element, s.current)) return true;
}
return false;
}
function $a7a032acae3ddda9$export$1258395f99bf9cbf(element) {
return $a7a032acae3ddda9$var$isElementInChildScope(element, $a7a032acae3ddda9$var$activeScope);
}
function $a7a032acae3ddda9$var$isAncestorScope(ancestor, scope) {
var _focusScopeTree_getTreeNode;
let parent = (_focusScopeTree_getTreeNode = $a7a032acae3ddda9$export$d06fae2ee68b101e.getTreeNode(scope)) === null || _focusScopeTree_getTreeNode === void 0 ? void 0 : _focusScopeTree_getTreeNode.parent;
while(parent){
if (parent.scopeRef === ancestor) return true;
parent = parent.parent;
}
return false;
}
function $a7a032acae3ddda9$var$focusElement(element, scroll = false) {
if (element != null && !scroll) try {
(0, $euGna$reactariainteractions.focusSafely)(element);
} catch {
// ignore
}
else if (element != null) try {
element.focus();
} catch {
// ignore
}
}
function $a7a032acae3ddda9$var$getFirstInScope(scope, tabbable = true) {
let sentinel = scope[0].previousElementSibling;
let scopeRoot = $a7a032acae3ddda9$var$getScopeRoot(scope);
let walker = $a7a032acae3ddda9$export$2d6ec8fc375ceafa(scopeRoot, {
tabbable: tabbable
}, scope);
walker.currentNode = sentinel;
let nextNode = walker.nextNode();
// If the scope does not contain a tabbable element, use the first focusable element.
if (tabbable && !nextNode) {
scopeRoot = $a7a032acae3ddda9$var$getScopeRoot(scope);
walker = $a7a032acae3ddda9$export$2d6ec8fc375ceafa(scopeRoot, {
tabbable: false
}, scope);
walker.currentNode = sentinel;
nextNode = walker.nextNode();
}
return nextNode;
}
function $a7a032acae3ddda9$var$focusFirstInScope(scope, tabbable = true) {
$a7a032acae3ddda9$var$focusElement($a7a032acae3ddda9$var$getFirstInScope(scope, tabbable));
}
function $a7a032acae3ddda9$var$useAutoFocus(scopeRef, autoFocus) {
const autoFocusRef = (0, ($parcel$interopDefault($euGna$react))).useRef(autoFocus);
(0, $euGna$react.useEffect)(()=>{
if (autoFocusRef.current) {
$a7a032acae3ddda9$var$activeScope = scopeRef;
const ownerDocument = (0, $euGna$reactariautils.getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined);
if (!$a7a032acae3ddda9$var$isElementInScope((0, $euGna$reactariautils.getActiveElement)(ownerDocument), $a7a032acae3ddda9$var$activeScope.current) && scopeRef.current) $a7a032acae3ddda9$var$focusFirstInScope(scopeRef.current);
}
autoFocusRef.current = false;
}, [
scopeRef
]);
}
function $a7a032acae3ddda9$var$useActiveScopeTracker(scopeRef, restore, contain) {
// tracks the active scope, in case restore and contain are both false.
// if either are true, this is tracked in useRestoreFocus or useFocusContainment.
(0, $euGna$reactariautils.useLayoutEffect)(()=>{
if (restore || contain) return;
let scope = scopeRef.current;
const ownerDocument = (0, $euGna$reactariautils.getOwnerDocument)(scope ? scope[0] : undefined);
let onFocus = (e)=>{
let target = (0, $euGna$reactariautils.getEventTarget)(e);
if ($a7a032acae3ddda9$var$isElementInScope(target, scopeRef.current)) $a7a032acae3ddda9$var$activeScope = scopeRef;
else if (!$a7a032acae3ddda9$var$isElementInAnyScope(target)) $a7a032acae3ddda9$var$activeScope = null;
};
ownerDocument.addEventListener('focusin', onFocus, false);
scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));
return ()=>{
ownerDocument.removeEventListener('focusin', onFocus, false);
scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));
};
}, [
scopeRef,
restore,
contain
]);
}
function $a7a032acae3ddda9$var$shouldRestoreFocus(scopeRef) {
let scope = $a7a032acae3ddda9$export$d06fae2ee68b101e.getTreeNode($a7a032acae3ddda9$var$activeScope);
while(scope && scope.scopeRef !== scopeRef){
if (scope.nodeToRestore) return false;
scope = scope.parent;
}
return (scope === null || scope === void 0 ? void 0 : scope.scopeRef) === scopeRef;
}
function $a7a032acae3ddda9$var$useRestoreFocus(scopeRef, restoreFocus, contain) {
// create a ref during render instead of useLayoutEffect so the active element is saved before a child with autoFocus=true mounts.
// eslint-disable-next-line no-restricted-globals
const nodeToRestoreRef = (0, $euGna$react.useRef)(typeof document !== 'undefined' ? (0, $euGna$reactariautils.getActiveElement)((0, $euGna$reactariautils.getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined)) : null);
// restoring scopes should all track if they are active regardless of contain, but contain already tracks it plus logic to contain the focus
// restoring-non-containing scopes should only care if they become active so they can perform the restore
(0, $euGna$reactariautils.useLayoutEffect)(()=>{
let scope = scopeRef.current;
const ownerDocument = (0, $euGna$reactariautils.getOwnerDocument)(scope ? scope[0] : undefined);
if (!restoreFocus || contain) return;
let onFocus = ()=>{
// If focusing an element in a child scope of the currently active scope, the child becomes active.
// Moving out of the active scope to an ancestor is not allowed.
if ((!$a7a032acae3ddda9$var$activeScope || $a7a032acae3ddda9$var$isAncestorScope($a7a032acae3ddda9$var$activeScope, scopeRef)) && $a7a032acae3ddda9$var$isElementInScope((0, $euGna$reactariautils.getActiveElement)(ownerDocument), scopeRef.current)) $a7a032acae3ddda9$var$activeScope = scopeRef;
};
ownerDocument.addEventListener('focusin', onFocus, false);
scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));
return ()=>{
ownerDocument.removeEventListener('focusin', onFocus, false);
scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [
scopeRef,
contain
]);
(0, $euGna$reactariautils.useLayoutEffect)(()=>{
const ownerDocument = (0, $euGna$reactariautils.getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined);
if (!restoreFocus) return;
// Handle the Tab key so that tabbing out of the scope goes to the next element
// after the node that had focus when the scope mounted. This is important when
// using portals for overlays, so that focus goes to the expected element when
// tabbing out of the overlay.
let onKeyDown = (e)=>{
if (e.key !== 'Tab' || e.altKey || e.ctrlKey || e.metaKey || !$a7a032acae3ddda9$var$shouldContainFocus(scopeRef) || e.isComposing) return;
let focusedElement = ownerDocument.activeElement;
if (!$a7a032acae3ddda9$var$isElementInChildScope(focusedElement, scopeRef) || !$a7a032acae3ddda9$var$shouldRestoreFocus(scopeRef)) return;
let treeNode = $a7a032acae3ddda9$export$d06fae2ee68b101e.getTreeNode(scopeRef);
if (!treeNode) return;
let nodeToRestore = treeNode.nodeToRestore;
// Create a DOM tree walker that matches all tabbable elements
let walker = $a7a032acae3ddda9$export$2d6ec8fc375ceafa(ownerDocument.body, {
tabbable: true
});
// Find the next tabbable element after the currently focused element
walker.currentNode = focusedElement;
let nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
if (!nodeToRestore || !nodeToRestore.isConnected || nodeToRestore === ownerDocument.body) {
nodeToRestore = undefined;
treeNode.nodeToRestore = undefined;
}
// If there is no next element, or it is outside the current scope, move focus to the
// next element after the node to restore to instead.
if ((!nextElement || !$a7a032acae3ddda9$var$isElementInChildScope(nextElement, scopeRef)) && nodeToRestore) {
walker.currentNode = nodeToRestore;
// Skip over elements within the scope, in case the scope immediately follows the node to restore.
do nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
while ($a7a032acae3ddda9$var$isElementInChildScope(nextElement, scopeRef));
e.preventDefault();
e.stopPropagation();
if (nextElement) $a7a032acae3ddda9$var$focusElement(nextElement, true);
else // If there is no next element and the nodeToRestore isn't within a FocusScope (i.e. we are leaving the top level focus scope)
// then move focus to the body.
// Otherwise restore focus to the nodeToRestore (e.g menu within a popover -> tabbing to close the menu should move focus to menu trigger)
if (!$a7a032acae3ddda9$var$isElementInAnyScope(nodeToRestore)) focusedElement.blur();
else $a7a032acae3ddda9$var$focusElement(nodeToRestore, true);
}
};
if (!contain) ownerDocument.addEventListener('keydown', onKeyDown, true);
return ()=>{
if (!contain) ownerDocument.removeEventListener('keydown', onKeyDown, true);
};
}, [
scopeRef,
restoreFocus,
contain
]);
// useLayoutEffect instead of useEffect so the active element is saved synchronously instead of asynchronously.
(0, $euGna$reactariautils.useLayoutEffect)(()=>{
const ownerDocument = (0, $euGna$reactariautils.getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined);
if (!restoreFocus) return;
let treeNode = $a7a032acae3ddda9$export$d06fae2ee68b101e.getTreeNode(scopeRef);
if (!treeNode) return;
var _nodeToRestoreRef_current;
treeNode.nodeToRestore = (_nodeToRestoreRef_current = nodeToRestoreRef.current) !== null && _nodeToRestoreRef_current !== void 0 ? _nodeToRestoreRef_current : undefined;
return ()=>{
let treeNode = $a7a032acae3ddda9$export$d06fae2ee68b101e.getTreeNode(scopeRef);
if (!treeNode) return;
let nodeToRestore = treeNode.nodeToRestore;
// if we already lost focus to the body and this was the active scope, then we should attempt to restore
let activeElement = (0, $euGna$reactariautils.getActiveElement)(ownerDocument);
if (restoreFocus && nodeToRestore && (activeElement && $a7a032acae3ddda9$var$isElementInChildScope(activeElement, scopeRef) || activeElement === ownerDocument.body && $a7a032acae3ddda9$var$shouldRestoreFocus(scopeRef))) {
// freeze the focusScopeTree so it persists after the raf, otherwise during unmount nodes are removed from it
let clonedTree = $a7a032acae3ddda9$export$d06fae2ee68b101e.clone();
requestAnimationFrame(()=>{
// Only restore focus if we've lost focus to the body, the alternative is that focus has been purposefully moved elsewhere
if (ownerDocument.activeElement === ownerDocument.body) {
// look up the tree starting with our scope to find a nodeToRestore still in the DOM
let treeNode = clonedTree.getTreeNode(scopeRef);
while(treeNode){
if (treeNode.nodeToRestore && treeNode.nodeToRestore.isConnected) {
$a7a032acae3ddda9$var$restoreFocusToElement(treeNode.nodeToRestore);
return;
}
treeNode = treeNode.parent;
}
// If no nodeToRestore was found, focus the first element in the nearest
// ancestor scope that is still in the tree.
treeNode = clonedTree.getTreeNode(scopeRef);
while(treeNode){
if (treeNode.scopeRef && treeNode.scopeRef.current && $a7a032acae3ddda9$export$d06fae2ee68b101e.getTreeNode(treeNode.scopeRef)) {
let node = $a7a032acae3ddda9$var$getFirstInScope(treeNode.scopeRef.current, true);
$a7a032acae3ddda9$var$restoreFocusToElement(node);
return;
}
treeNode = treeNode.parent;
}
}
});
}
};
}, [
scopeRef,
restoreFocus
]);
}
function $a7a032acae3ddda9$var$restoreFocusToElement(node) {
// Dispatch a custom event that parent elements can intercept to customize focus restoration.
// For example, virtualized collection components reuse DOM elements, so the original element
// might still exist in the DOM but representing a different item.
if (node.dispatchEvent(new CustomEvent($a7a032acae3ddda9$var$RESTORE_FOCUS_EVENT, {
bubbles: true,
cancelable: true
}))) $a7a032acae3ddda9$var$focusElement(node);
}
function $a7a032acae3ddda9$export$2d6ec8fc375ceafa(root, opts, scope) {
let filter = (opts === null || opts === void 0 ? void 0 : opts.tabbable) ? (0, $euGna$reactariautils.isTabbable) : (0, $euGna$reactariautils.isFocusable);
// Ensure that root is an Element or fall back appropriately
let rootElement = (root === null || root === void 0 ? void 0 : root.nodeType) === Node.ELEMENT_NODE ? root : null;
// Determine the document to use
let doc = (0, $euGna$reactariautils.getOwnerDocument)(rootElement);
// Create a TreeWalker, ensuring the root is an Element or Document
let walker = (0, $euGna$reactariautils.createShadowTreeWalker)(doc, root || doc, NodeFilter.SHOW_ELEMENT, {
acceptNode (node) {
var _opts_from;
// Skip nodes inside the starting node.
if (opts === null || opts === void 0 ? void 0 : (_opts_from = opts.from) === null || _opts_from === void 0 ? void 0 : _opts_from.contains(node)) return NodeFilter.FILTER_REJECT;
if ((opts === null || opts === void 0 ? void 0 : opts.tabbable) && node.tagName === 'INPUT' && node.getAttribute('type') === 'radio') {
// If the radio is in a form, we can get all the other radios by name
if (!$a7a032acae3ddda9$var$isTabbableRadio(node)) return NodeFilter.FILTER_REJECT;
// If the radio is in the same group as the current node and none are selected, we can skip it
if (walker.currentNode.tagName === 'INPUT' && walker.currentNode.type === 'radio' && walker.currentNode.name === node.name) return NodeFilter.FILTER_REJECT;
}
if (filter(node) && (!scope || $a7a032acae3ddda9$var$isElementInScope(node, scope)) && (!(opts === null || opts === void 0 ? void 0 : opts.accept) || opts.accept(node))) return NodeFilter.FILTER_ACCEPT;
return NodeFilter.FILTER_SKIP;
}
});
if (opts === null || opts === void 0 ? void 0 : opts.from) walker.currentNode = opts.from;
return walker;
}
function $a7a032acae3ddda9$export$c5251b9e124bf29(ref, defaultOptions = {}) {
return {
focusNext (opts = {}) {
let root = ref.current;
if (!root) return null;
let { from: from, tabbable: tabbable = defaultOptions.tabbable, wrap: wrap = defaultOptions.wrap, accept: accept = defaultOptions.accept } = opts;
let node = from || (0, $euGna$reactariautils.getActiveElement)((0, $euGna$reactariautils.getOwnerDocument)(root));
let walker = $a7a032acae3ddda9$export$2d6ec8fc375ceafa(root, {
tabbable: tabbable,
accept: accept
});
if (root.contains(node)) walker.currentNode = node;
let nextNode = walker.nextNode();
if (!nextNode && wrap) {
walker.currentNode = root;
nextNode = walker.nextNode();
}
if (nextNode) $a7a032acae3ddda9$var$focusElement(nextNode, true);
return nextNode;
},
focusPrevious (opts = defaultOptions) {
let root = ref.current;
if (!root) return null;
let { from: from, tabbable: tabbable = defaultOptions.tabbable, wrap: wrap = defaultOptions.wrap, accept: accept = defaultOptions.accept } = opts;
let node = from || (0, $euGna$reactariautils.getActiveElement)((0, $euGna$reactariautils.getOwnerDocument)(root));
let walker = $a7a032acae3ddda9$export$2d6ec8fc375ceafa(root, {
tabbable: tabbable,
accept: accept
});
if (root.contains(node)) walker.currentNode = node;
else {
let next = $a7a032acae3ddda9$var$last(walker);
if (next) $a7a032acae3ddda9$var$focusElement(next, true);
return next !== null && next !== void 0 ? next : null;
}
let previousNode = walker.previousNode();
if (!previousNode && wrap) {
walker.currentNode = root;
let lastNode = $a7a032acae3ddda9$var$last(walker);
if (!lastNode) // couldn't wrap
return null;
previousNode = lastNode;
}
if (previousNode) $a7a032acae3ddda9$var$focusElement(previousNode, true);
return previousNode !== null && previousNode !== void 0 ? previousNode : null;
},
focusFirst (opts = defaultOptions) {
let root = ref.current;
if (!root) return null;
let { tabbable: tabbable = defaultOptions.tabbable, accept: accept = defaultOptions.accept } = opts;
let walker = $a7a032acae3ddda9$export$2d6ec8fc375ceafa(root, {
tabbable: tabbable,
accept: accept
});
let nextNode = walker.nextNode();
if (nextNode) $a7a032acae3ddda9$var$focusElement(nextNode, true);
return nextNode;
},
focusLast (opts = defaultOptions) {
let root = ref.current;
if (!root) return null;
let { tabbable: tabbable = defaultOptions.tabbable, accept: accept = defaultOptions.accept } = opts;
let walker = $a7a032acae3ddda9$export$2d6ec8fc375ceafa(root, {
tabbable: tabbable,
accept: accept
});
let next = $a7a032acae3ddda9$var$last(walker);
if (next) $a7a032acae3ddda9$var$focusElement(next, true);
return next !== null && next !== void 0 ? next : null;
}
};
}
function $a7a032acae3ddda9$var$last(walker) {
let next = undefined;
let last;
do {
last = walker.lastChild();
if (last) next = last;
}while (last);
return next;
}
class $a7a032acae3ddda9$var$Tree {
get size() {
return this.fastMap.size;
}
getTreeNode(data) {
return this.fastMap.get(data);
}
addTreeNode(scopeRef, parent, nodeToRestore) {
let parentNode = this.fastMap.get(parent !== null && parent !== void 0 ? parent : null);
if (!parentNode) return;
let node = new $a7a032acae3ddda9$var$TreeNode({
scopeRef: scopeRef
});
parentNode.addChild(node);
node.parent = parentNode;
this.fastMap.set(scopeRef, node);
if (nodeToRestore) node.nodeToRestore = nodeToRestore;
}
addNode(node) {
this.fastMap.set(node.scopeRef, node);
}
removeTreeNode(scopeRef) {
// never remove the root
if (scopeRef === null) return;
let node = this.fastMap.get(scopeRef);
if (!node) return;
let parentNode = node.parent;
// when we remove a scope, check if any sibling scopes are trying to restore focus to something inside the scope we're removing
// if we are, then replace the siblings restore with the restore from the scope we're removing
for (let current of this.traverse())if (current !== node && node.nodeToRestore && current.nodeToRestore && node.scopeRef && node.scopeRef.current && $a7a032acae3ddda9$var$isElementInScope(current.nodeToRestore, node.scopeRef.current)) current.nodeToRestore = node.nodeToRestore;
let children = node.children;
if (parentNode) {
parentNode.removeChild(node);
if (children.size > 0) children.forEach((child)=>parentNode && parentNode.addChild(child));
}
this.fastMap.delete(node.scopeRef);
}
// Pre Order Depth First
*traverse(node = this.root) {
if (node.scopeRef != null) yield node;
if (node.children.size > 0) for (let child of node.children)yield* this.traverse(child);
}
clone() {
var _node_parent;
let newTree = new $a7a032acae3ddda9$var$Tree();
var _node_parent_scopeRef;
for (let node of this.traverse())newTree.addTreeNode(node.scopeRef, (_node_parent_scopeRef = (_node_parent = node.parent) === null || _node_parent === void 0 ? void 0 : _node_parent.scopeRef) !== null && _node_parent_scopeRef !== void 0 ? _node_parent_scopeRef : null, node.nodeToRestore);
return newTree;
}
constructor(){
this.fastMap = new Map();
this.root = new $a7a032acae3ddda9$var$TreeNode({
scopeRef: null
});
this.fastMap.set(null, this.root);
}
}
class $a7a032acae3ddda9$var$TreeNode {
addChild(node) {
this.children.add(node);
node.parent = this;
}
removeChild(node) {
this.children.delete(node);
node.parent = undefined;
}
constructor(props){
this.children = new Set();
this.contain = false;
this.scopeRef = props.scopeRef;
}
}
let $a7a032acae3ddda9$export$d06fae2ee68b101e = new $a7a032acae3ddda9$var$Tree();
//# sourceMappingURL=FocusScope.main.js.map
@@ -0,0 +1 @@
{"version":3,"file":"stage-0.js","sourceRoot":"","sources":["../../src/config/stage-0.ts"],"names":[],"mappings":"AAOA,eAAe;IACb,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,KAAK,EAAE;QACL,wBAAwB,EAAE,CAAC;KAC5B;CACc,CAAA"}
@@ -0,0 +1 @@
{"name":"@types/path-browserify","version":"1.0.3","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532089978,"integrity":"sha512-HQaIQk9pwOcyKutyDk4o2a87WnotwYuLGYFW43emGm4FvIJFKPyg+OYaw5sTegKAKf+C5SKa1ACjzCLivbaHrQ==","mode":420,"size":1141},"README.md":{"checkedAt":1794532116844,"integrity":"sha512-MHs0y84iAP5gXwHg45LrL3ddSkRHLO9sV7VU2xzmS7YvLlkAs82acSe89dydk+S1mcyb5FGOoylAELBpH3VHww==","mode":420,"size":506},"index.d.ts":{"checkedAt":1794532116845,"integrity":"sha512-kIm9EeEWrekcY7KlQrDrH8TRrO4fBMd5G8aEKhNGNXUlBVcLqXV0NsLMOQydFTAPuCqBsXdHxsYTilJ5FTIN4A==","mode":420,"size":4042},"package.json":{"checkedAt":1794532116845,"integrity":"sha512-efSlh8NwR6mxTYeZVyqpWlh8Lwg1VwdLxBWUb3AgMtyLhwNd05HMrW79Raui9mVl8bwsvhxY60fGdMMrPu2V1Q==","mode":420,"size":828}}}
@@ -0,0 +1,125 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "harf", verb: "olmalıdır" },
file: { unit: "bayt", verb: "olmalıdır" },
array: { unit: "unsur", verb: "olmalıdır" },
set: { unit: "unsur", verb: "olmalıdır" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "numara";
}
case "object": {
if (Array.isArray(data)) {
return "saf";
}
if (data === null) {
return "gayb";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "giren",
email: "epostagâh",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO hengâmı",
date: "ISO tarihi",
time: "ISO zamanı",
duration: "ISO müddeti",
ipv4: "IPv4 nişânı",
ipv6: "IPv6 nişânı",
cidrv4: "IPv4 menzili",
cidrv6: "IPv6 menzili",
base64: "base64-şifreli metin",
base64url: "base64url-şifreli metin",
json_string: "JSON metin",
e164: "E.164 sayısı",
jwt: "JWT",
template_literal: "giren",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Fâsit giren: umulan ${issue.expected}, alınan ${parsedType(issue.input)}`;
// return `Fâsit giren: umulan ${issue.expected}, alınan ${util.getParsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1) return `Fâsit giren: umulan ${util.stringifyPrimitive(issue.values[0])}`;
return `Fâsit tercih: mûteberler ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmalıydı.`;
return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} olmalıydı.`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} ${sizing.unit} sahip olmalıydı.`;
}
return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} olmalıydı.`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Fâsit metin: "${_issue.prefix}" ile başlamalı.`;
if (_issue.format === "ends_with") return `Fâsit metin: "${_issue.suffix}" ile bitmeli.`;
if (_issue.format === "includes") return `Fâsit metin: "${_issue.includes}" ihtivâ etmeli.`;
if (_issue.format === "regex") return `Fâsit metin: ${_issue.pattern} nakşına uymalı.`;
return `Fâsit ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Fâsit sayı: ${issue.divisor} katı olmalıydı.`;
case "unrecognized_keys":
return `Tanınmayan anahtar ${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `${issue.origin} için tanınmayan anahtar var.`;
case "invalid_union":
return "Giren tanınamadı.";
case "invalid_element":
return `${issue.origin} için tanınmayan kıymet var.`;
default:
return `Kıymet tanınamadı.`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,119 @@
import Decimal from 'decimal.js';
import { repeat } from '../utils';
import { ApplyUnsignedRoundingMode } from './ApplyUnsignedRoundingMode';
//IMPL: Setting Decimal configuration
Decimal.set({
toExpPos: 100,
});
//IMPL: Helper function to calculate raw fixed value
function ToRawFixedFn(n, f) {
return n.times(Decimal.pow(10, -f));
}
//IMPL: Helper function to find n1 and r1
function findN1R1(x, f, roundingIncrement) {
var nx = x.times(Decimal.pow(10, f)).floor();
var n1 = nx.div(roundingIncrement).floor().times(roundingIncrement);
var r1 = ToRawFixedFn(n1, f);
return {
n1: n1,
r1: r1,
};
}
//IMPL: Helper function to find n2 and r2
function findN2R2(x, f, roundingIncrement) {
var nx = x.times(Decimal.pow(10, f)).ceil();
var n2 = nx.div(roundingIncrement).ceil().times(roundingIncrement);
var r2 = ToRawFixedFn(n2, f);
return {
n2: n2,
r2: r2,
};
}
/**
* https://tc39.es/ecma402/#sec-torawfixed
* @param x a finite non-negative Number or BigInt
* @param minFraction an integer between 0 and 20
* @param maxFraction an integer between 0 and 20
*/
export function ToRawFixed(x, minFraction, maxFraction, roundingIncrement, unsignedRoundingMode) {
// 1. Let f be maxFraction.
var f = maxFraction;
// 2. Let n1 and r1 be the results of performing the maximized rounding of x to f fraction digits.
var _a = findN1R1(x, f, roundingIncrement), n1 = _a.n1, r1 = _a.r1;
// 3. Let n2 and r2 be the results of performing the minimized rounding of x to f fraction digits.
var _b = findN2R2(x, f, roundingIncrement), n2 = _b.n2, r2 = _b.r2;
// 4. Let r be ApplyUnsignedRoundingMode(x, r1, r2, unsignedRoundingMode).
var r = ApplyUnsignedRoundingMode(x, r1, r2, unsignedRoundingMode);
var n, xFinal;
var m;
// 5. If r is equal to r1, then
if (r.eq(r1)) {
// a. Let n be n1.
n = n1;
// b. Let xFinal be r1.
xFinal = r1;
}
else {
// 6. Else,
// a. Let n be n2.
n = n2;
// b. Let xFinal be r2.
xFinal = r2;
}
// 7. If n is 0, let m be "0".
if (n.isZero()) {
m = '0';
}
else {
// 8. Else, let m be the String representation of n.
m = n.toString();
}
var int;
// 9. If f is not 0, then
if (f !== 0) {
// a. Let k be the length of m.
var k = m.length;
// b. If k < f, then
if (k <= f) {
// i. Let z be the String value consisting of f + 1 - k occurrences of the character "0".
var z = repeat('0', f - k + 1);
// ii. Set m to the string-concatenation of z and m.
m = z + m;
// iii. Set k to f + 1.
k = f + 1;
}
// c. Let a be the substring of m from 0 to k - f.
var a = m.slice(0, k - f);
// d. Let b be the substring of m from k - f to k.
var b = m.slice(m.length - f);
// e. Set m to the string-concatenation of a, ".", and b.
m = a + '.' + b;
// f. Let int be the length of a.
int = a.length;
}
else {
// 10. Else, let int be the length of m.
int = m.length;
}
// 11. Let cut be maxFraction - minFraction.
var cut = maxFraction - minFraction;
// 12. Repeat, while cut > 0 and the last character of m is "0",
while (cut > 0 && m[m.length - 1] === '0') {
// a. Remove the last character from m.
m = m.slice(0, m.length - 1);
// b. Decrease cut by 1.
cut--;
}
// 13. If the last character of m is ".", then
if (m[m.length - 1] === '\u002e') {
// a. Remove the last character from m.
m = m.slice(0, m.length - 1);
}
// 14. Return the Record { [[FormattedString]]: m, [[RoundedNumber]]: xFinal, [[IntegerDigitsCount]]: int, [[RoundingMagnitude]]: -f }.
return {
formattedString: m,
roundedNumber: xFinal,
integerDigitsCount: int,
roundingMagnitude: -f,
};
}
@@ -0,0 +1,208 @@
/*!
* serve-static
* Copyright(c) 2010 Sencha Inc.
* Copyright(c) 2011 TJ Holowaychuk
* Copyright(c) 2014-2016 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module dependencies.
* @private
*/
var encodeUrl = require('encodeurl')
var escapeHtml = require('escape-html')
var parseUrl = require('parseurl')
var resolve = require('path').resolve
var send = require('send')
var url = require('url')
/**
* Module exports.
* @public
*/
module.exports = serveStatic
/**
* @param {string} root
* @param {object} [options]
* @return {function}
* @public
*/
function serveStatic (root, options) {
if (!root) {
throw new TypeError('root path required')
}
if (typeof root !== 'string') {
throw new TypeError('root path must be a string')
}
// copy options object
var opts = Object.create(options || null)
// fall-though
var fallthrough = opts.fallthrough !== false
// default redirect
var redirect = opts.redirect !== false
// headers listener
var setHeaders = opts.setHeaders
if (setHeaders && typeof setHeaders !== 'function') {
throw new TypeError('option setHeaders must be function')
}
// setup options for send
opts.maxage = opts.maxage || opts.maxAge || 0
opts.root = resolve(root)
// construct directory listener
var onDirectory = redirect
? createRedirectDirectoryListener()
: createNotFoundDirectoryListener()
return function serveStatic (req, res, next) {
if (req.method !== 'GET' && req.method !== 'HEAD') {
if (fallthrough) {
return next()
}
// method not allowed
res.statusCode = 405
res.setHeader('Allow', 'GET, HEAD')
res.setHeader('Content-Length', '0')
res.end()
return
}
var forwardError = !fallthrough
var originalUrl = parseUrl.original(req)
var path = parseUrl(req).pathname
// make sure redirect occurs at mount
if (path === '/' && originalUrl.pathname.substr(-1) !== '/') {
path = ''
}
// create send stream
var stream = send(req, path, opts)
// add directory handler
stream.on('directory', onDirectory)
// add headers listener
if (setHeaders) {
stream.on('headers', setHeaders)
}
// add file listener for fallthrough
if (fallthrough) {
stream.on('file', function onFile () {
// once file is determined, always forward error
forwardError = true
})
}
// forward errors
stream.on('error', function error (err) {
if (forwardError || !(err.statusCode < 500)) {
next(err)
return
}
next()
})
// pipe
stream.pipe(res)
}
}
/**
* Collapse all leading slashes into a single slash
* @private
*/
function collapseLeadingSlashes (str) {
for (var i = 0; i < str.length; i++) {
if (str.charCodeAt(i) !== 0x2f /* / */) {
break
}
}
return i > 1
? '/' + str.substr(i)
: str
}
/**
* Create a minimal HTML document.
*
* @param {string} title
* @param {string} body
* @private
*/
function createHtmlDocument (title, body) {
return '<!DOCTYPE html>\n' +
'<html lang="en">\n' +
'<head>\n' +
'<meta charset="utf-8">\n' +
'<title>' + title + '</title>\n' +
'</head>\n' +
'<body>\n' +
'<pre>' + body + '</pre>\n' +
'</body>\n' +
'</html>\n'
}
/**
* Create a directory listener that just 404s.
* @private
*/
function createNotFoundDirectoryListener () {
return function notFound () {
this.error(404)
}
}
/**
* Create a directory listener that performs a redirect.
* @private
*/
function createRedirectDirectoryListener () {
return function redirect (res) {
if (this.hasTrailingSlash()) {
this.error(404)
return
}
// get original URL
var originalUrl = parseUrl.original(this.req)
// append trailing slash
originalUrl.path = null
originalUrl.pathname = collapseLeadingSlashes(originalUrl.pathname + '/')
// reformat the URL
var loc = encodeUrl(url.format(originalUrl))
var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + escapeHtml(loc))
// send redirect response
res.statusCode = 301
res.setHeader('Content-Type', 'text/html; charset=UTF-8')
res.setHeader('Content-Length', Buffer.byteLength(doc))
res.setHeader('Content-Security-Policy', "default-src 'none'")
res.setHeader('X-Content-Type-Options', 'nosniff')
res.setHeader('Location', loc)
res.end(doc)
}
}
@@ -0,0 +1 @@
export { _ as default } from "../esm/_object_destructuring_empty.js";
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=cloneConstantValueBinding.spec.d.ts.map
@@ -0,0 +1,24 @@
# @heroui/system
HeroUI system primitives, here you can find the `extendVariants` utility, `HeroUIProvider` and some other utilities.
Please refer to the [documentation](https://heroui.com) for more information.
## Installation
```sh
yarn add @heroui/system
# or
npm i @heroui/system
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE).
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=error_messages.int.spec.d.ts.map
@@ -0,0 +1,422 @@
export default `flf2a$ 4 3 9 63 12 0 8127 0
Author : Marcin Glinsky and others
Date : 2003/09/02 20:09:19
Version: 1.0
-------------------------------------------------
Font ascii_new_roman, created by Marcin Glinski
and others from alt.ascii-art
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
$ #
$ #
$ #
$ ##
__, #
(-V #
_o #
( ##
"#
#
#
##
##
#
#
##
_||_, #
(-(__ #
_||_) #
( ##
_, _,#
(-o ,' #
_,',o'#
( ##
&#
#
#
##
__, #
(-/ #
#
##
____, #
(-// #
_\\\\_ #
( ##
___, #
(-\\\\ #
_//_ #
( ##
*#
#
#
##
___, #
(-_|_. #
_| #
( ##
,#
#
#
##
#
____, #
( #
##
.#
#
#
##
___, #
(-// #
_//_ #
( ##
_____,#
(-/ /\\ #
_\\/_/ #
( ##
___, #
(-/| #
'_|, #
( ##
__, #
(- ) #
,'_, #
( ##
__, #
(-_) #
__) #
( ##
____, #
(-/_|_,#
_|, #
( ##
____, #
(-|_ #
__) #
( ##
___, #
(-/_ #
_(__) #
( ##
___, #
(- / #
_/, #
( ##
_____,#
(-(__) #
_(__) #
( ##
_____,#
(-(__) #
__/, #
( ##
__, #
(-o #
_o #
( ##
__, #
(-o #
_p #
( ##
<#
#
#
##
=#
#
#
##
>#
#
#
##
_____,#
(-( _)#
_(, #
( ##
___, #
(-/_\\ #
_((_/_#
( ##
____,#
(-/_| #
_/ |,#
( ##
____ #
(-|__) #
_|__) #
( ##
____, #
(-/ #
_\\__, #
( ##
____, #
(-| \\ #
_|__/ #
( ##
____, #
(-|_, #
_|__, #
( ##
____, #
(-|_, #
_| #
( ##
____, #
(-/ _, #
_\\__| #
( ##
__, _,#
(-|__| #
_| |,#
( ##
__, #
(-| #
_|_, #
( ##
_, #
(-| #
__|, #
( ##
__, , #
( |_/ #
_| \\, #
( ##
__, #
(-| #
_|__, #
( ##
__, _,#
(-|\\/| #
_| _|,#
( ##
_, _,#
(-|\\ | #
_| \\|,#
( ##
____, #
(-/ \\ #
_\\__/,#
( ##
____, #
(-|__) #
_| #
( ##
____, #
(-/ \\ #
_\\_\\/,#
( ##
____, #
(-|__) #
_| \\,#
( ##
____, #
(-(__ #
____) #
( ##
____, #
(-| #
_|, #
( ##
_, _, #
(-| \\ #
_|__/ #
( ##
__ _,#
(-\\ / #
_\\/ #
( ##
_ _,#
(-| | #
_|/\\|,#
( ##
_, _, #
(-\\_/ #
_/ \\, #
( ##
_ _, #
(-\\_/ #
_|, #
( ##
___, #
(- / #
_/__, #
( ##
[#
#
#
##
_, #
(-\\\\ #
_\\\\, #
( ##
]#
#
#
##
___, #
(-/\\ #
' \` #
##
_#
#
#
##
\`#
#
#
##
____,#
(-/_| #
_/ |,#
( ##
____ #
(-|__) #
_|__) #
( ##
____, #
(-/ #
_\\__, #
( ##
____, #
(-| \\ #
_|__/ #
( ##
____, #
(-|_, #
_|__, #
( ##
____, #
(-|_, #
_| #
( ##
____, #
(-/ _, #
_\\__| #
( ##
__, _,#
(-|__| #
_| |,#
( ##
__, #
(-| #
_|_, #
( ##
_, #
(-| #
__|, #
( ##
__, , #
( |_/ #
_| \\, #
( ##
__, #
(-| #
_|__, #
( ##
__, _,#
(-|\\/| #
_| _|,#
( ##
_, _,#
(-|\\ | #
_| \\|,#
( ##
____, #
(-/ \\ #
_\\__/,#
( ##
____, #
(-|__) #
_| #
( ##
____, #
(-/ \\ #
_\\_\\/,#
( ##
____, #
(-|__) #
_| \\,#
( ##
____, #
(-(__ #
____) #
( ##
____, #
(-| #
_|, #
( ##
_, _, #
(-| \\ #
_|__/ #
( ##
__ _,#
(-\\ / #
_\\/ #
( ##
_ _,#
(-| | #
_|/\\|,#
( ##
_, _, #
(-\\_/ #
_/ \\, #
( ##
_ _, #
(-\\_/ #
_|, #
( ##
___, #
(- / #
_/__, #
( ##
{#
#
#
##
__, #
(-| #
| #
_|, ##
}#
#
#
##
~#
#
#
##
____,#
(-/_| #
_/ |,#
( ##
____, #
(-/ \\ #
_\\__/,#
( ##
_, _, #
(-| \\ #
_|__/ #
( ##
____,#
(-/_| #
_/ |,#
( ##
____, #
(-/ \\ #
_\\__/,#
( ##
_, _, #
(-| \\ #
_|__/ #
( ##
�#
#
#
##
`
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Espen Hovlandsdal
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,5 @@
'use strict';
// https://262.ecma-international.org/6.0/#sec-toobject
module.exports = require('es-object-atoms/ToObject');
@@ -0,0 +1,4 @@
/**
* The header type declaration of `undici`.
*/
export type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
@@ -0,0 +1 @@
{"name":"@react-stately/tree","version":"3.9.3","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105972,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/main.js":{"checkedAt":1794532107127,"integrity":"sha512-vmUbjhIWYdFf2zCWCvavxElnOhQO/MQWhei/V0o0T4VuzYH0IISUiX+fKE08fHhZ3nOI9tFAY4lSjWL5mOf5yg==","mode":420,"size":1115},"dist/module.js":{"checkedAt":1794532107128,"integrity":"sha512-0D/4/rZpT0pciLI/QvIko+O5J04m7Ts1QaXzvznsVrqrF1b2L83D8vbyEAdgyD8rPI2j0ldHHD+e2aOeftnPjA==","mode":420,"size":993},"dist/TreeCollection.main.js":{"checkedAt":1794532107128,"integrity":"sha512-wV8kD/48MQg77riiKGbtWKb8DbRbrfoHsFj5GOGd8NKuicQ2Gd1s1NBaPU01RKPBK3LT98MHgLNnhDIs2XJaJA==","mode":420,"size":3262},"dist/TreeCollection.module.js":{"checkedAt":1794532107128,"integrity":"sha512-kqahdfosG1eFKPte4KEz1II5NTyDtvKw+eAmjC8HqMPm03yk/XDDau5iI6F9efGq1kYnJlw6b6JdbJKtYEIFvw==","mode":420,"size":3106},"dist/useTreeState.main.js":{"checkedAt":1794532107128,"integrity":"sha512-f8az19fbT8W3nlhLAijJWjM/6eaM0no4fNHUPxZsX9vsEdlxN7ZdBuOOeJYNF0VTbipsrUY+sW/EAPo91KL6Wg==","mode":420,"size":3013},"dist/useTreeState.module.js":{"checkedAt":1794532107128,"integrity":"sha512-kZHCvf0zTUuU14HVVD+7ro50TeIDDmJBXEM2Rwr9Lj1A0qN8YbfdcrM6MVFAINv+hFVVUOiwZpYi5X7/t85+CQ==","mode":420,"size":2972},"package.json":{"checkedAt":1794532107128,"integrity":"sha512-agSdLh22i6hKm4QySX3izXQXvQ8bHlyHET+n6Q9+Cuk+SpVnFy4kuKq6sqFA+q+I0OZXtIpWRSnaraqlgAUgFA==","mode":420,"size":1021},"dist/main.js.map":{"checkedAt":1794532107128,"integrity":"sha512-fr78U6MQIcwfkQ2LwLFkqRGGvQSqSnT9GvfUbRiQ2RuET9gn1dSgv4p/J5hWH/jCNncPvN2IAG7Hmw5IRrvOAg==","mode":420,"size":955},"dist/module.js.map":{"checkedAt":1794532107128,"integrity":"sha512-2RLnxQpuJMLgMxrNxr/LZ/NctA+avqzvl9l1huQRMk17sHU/RrR8gpaoHWNZuPnfX/MinLiDKKBPcEYYPzu2kg==","mode":420,"size":950},"dist/TreeCollection.main.js.map":{"checkedAt":1794532107129,"integrity":"sha512-2sbnkO68fwzgFFAf/K+HO2T0Wmieb9Opfin2PHG2N10Kl7qPp5xKuvor6BzYoOoh3VC4cQByCmqBupc0ZKDeYA==","mode":420,"size":4627},"dist/TreeCollection.module.js.map":{"checkedAt":1794532107129,"integrity":"sha512-PVkUb1/COEbRcJ1G2OZcY+/X5IirVjrRfqFG+gA5WrywRKCM0mKtwk+OVqgvsIHQGAq1PGtkyLbqn4sn7aGVeA==","mode":420,"size":4623},"dist/types.d.ts.map":{"checkedAt":1794532107129,"integrity":"sha512-aPFI4CsBnkobg+sR8gsN8wbSDFRzOzatFq6ZJdj1oiBB4YO2Yx/Y4zUTEWxmlzhO3DPR2xIQUVjNI7PCvez5iQ==","mode":420,"size":2420},"dist/useTreeState.main.js.map":{"checkedAt":1794532107129,"integrity":"sha512-rBaywn5iiUy9glkvHF/5cLbjNb8xjm6oR5HV4Jm7yKxAPZm+VS/IozjcGYX7KixsFrYmYndGcPHmNB7QVpzhig==","mode":420,"size":4748},"dist/useTreeState.module.js.map":{"checkedAt":1794532107129,"integrity":"sha512-OawfvoI5mZTKvv5AhwmMupK6QWsajl2Jk8E9huWXQ48iTOY9OLOJT8YoKjo3SJhHaK8NZJmnUbWZ2+k3NP1Epw==","mode":420,"size":4743},"README.md":{"checkedAt":1794532107129,"integrity":"sha512-yBfvkhPRF9BawwtF/pP8xPruHefZ/OBJnXZhf/gT1pZ65NjnikPPBX+WCWvCIiNRZG9LbqavI4yb/5NjXL85Ew==","mode":420,"size":137},"dist/import.mjs":{"checkedAt":1794532107129,"integrity":"sha512-G9KTlcJNCgA9tRrNOrT+lH26ozA47bYvBm4yTxMCpDy8VH/faekospXf+SKKEF4Bw23njfg8Z1pN4g30xB9Dwg==","mode":420,"size":981},"dist/TreeCollection.mjs":{"checkedAt":1794532107128,"integrity":"sha512-kqahdfosG1eFKPte4KEz1II5NTyDtvKw+eAmjC8HqMPm03yk/XDDau5iI6F9efGq1kYnJlw6b6JdbJKtYEIFvw==","mode":420,"size":3106},"dist/useTreeState.mjs":{"checkedAt":1794532107129,"integrity":"sha512-ezn2m/Yo4WN5huN9d1g7XIBLbluO8xhLL/2kHtQybbbiJx0kDFddd3lLV/3AF9kDVSIXHd27th1lBynqDgkM6w==","mode":420,"size":2966},"src/index.ts":{"checkedAt":1794532107130,"integrity":"sha512-BnS6fSvyR0NKvMNrjSalrkCt/OtsstiYWaVMktSutpQAYXrc2KBUjfV1yrh5MKqkmki885HVLd5nZga85TR/xA==","mode":420,"size":772},"src/TreeCollection.ts":{"checkedAt":1794532107130,"integrity":"sha512-JeDwBwxtN4GG/5B7oGVMLt+2TMNjbmiKDoAGQz8MQx+9M0J2bCYCSSbUih1jcIDk6gw54oaIn5CCJndVpyOS/Q==","mode":420,"size":2775},"dist/types.d.ts":{"checkedAt":1794532107130,"integrity":"sha512-ZUfMDjCyRfLCwG8ndAMHS0/vgQRE+dbieZFtVQvd9K/7iY/g6r/3f9nZwxYSKcsPMSCcNVBHxIvoMsomOExEFA==","mode":420,"size":1822},"src/useTreeState.ts":{"checkedAt":1794532107130,"integrity":"sha512-dx6ud7Sih6QR6FzuegkC7fuOMLWnLhBDQO0Pq/n0vcf79pw78xGAwD6CvNmXwceB/waJK1PKuwz0oMqA0N8Knw==","mode":420,"size":3493}}}
@@ -0,0 +1,56 @@
"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/mail.tsx
var mail_exports = {};
__export(mail_exports, {
MailIcon: () => MailIcon
});
module.exports = __toCommonJS(mail_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var MailIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"svg",
{
"aria-hidden": "true",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
"g",
{
fill: "none",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5,
children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 20.5H7c-3 0-5-1.5-5-5v-7c0-3.5 2-5 5-5h10c3 0 5 1.5 5 5v3" }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M17 9l-3.13 2.5a3.166 3.166 0 01-3.75 0L7 9M19.21 14.77l-3.539 3.54a1.232 1.232 0 00-.3.59l-.19 1.35a.635.635 0 00.76.76l1.35-.19a1.189 1.189 0 00.59-.3l3.54-3.54a1.365 1.365 0 000-2.22 1.361 1.361 0 00-2.211.01zM18.7 15.28a3.185 3.185 0 002.22 2.22" })
]
}
)
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
MailIcon
});
@@ -0,0 +1,231 @@
import {disableTextSelection as $14c0b72509d70225$export$16a4697467175487, restoreTextSelection as $14c0b72509d70225$export$b0d6fa1ab32e3295} from "./textSelection.module.js";
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,223 @@
# raw-body
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build status][github-actions-ci-image]][github-actions-ci-url]
[![Test coverage][coveralls-image]][coveralls-url]
Gets the entire buffer of a stream either as a `Buffer` or a string.
Validates the stream's length against an expected length and maximum limit.
Ideal for parsing request bodies.
## Install
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```sh
$ npm install raw-body
```
### TypeScript
This module includes a [TypeScript](https://www.typescriptlang.org/)
declaration file to enable auto complete in compatible editors and type
information for TypeScript projects. This module depends on the Node.js
types, so install `@types/node`:
```sh
$ npm install @types/node
```
## API
```js
var getRawBody = require('raw-body')
```
### getRawBody(stream, [options], [callback])
**Returns a promise if no callback specified and global `Promise` exists.**
Options:
- `length` - The length of the stream.
If the contents of the stream do not add up to this length,
an `400` error code is returned.
- `limit` - The byte limit of the body.
This is the number of bytes or any string format supported by
[bytes](https://www.npmjs.com/package/bytes),
for example `1000`, `'500kb'` or `'3mb'`.
If the body ends up being larger than this limit,
a `413` error code is returned.
- `encoding` - The encoding to use to decode the body into a string.
By default, a `Buffer` instance will be returned when no encoding is specified.
Most likely, you want `utf-8`, so setting `encoding` to `true` will decode as `utf-8`.
You can use any type of encoding supported by [iconv-lite](https://www.npmjs.org/package/iconv-lite#readme).
You can also pass a string in place of options to just specify the encoding.
If an error occurs, the stream will be paused, everything unpiped,
and you are responsible for correctly disposing the stream.
For HTTP requests, you may need to finish consuming the stream if
you want to keep the socket open for future requests. For streams
that use file descriptors, you should `stream.destroy()` or
`stream.close()` to prevent leaks.
## Errors
This module creates errors depending on the error condition during reading.
The error may be an error from the underlying Node.js implementation, but is
otherwise an error created by this module, which has the following attributes:
* `limit` - the limit in bytes
* `length` and `expected` - the expected length of the stream
* `received` - the received bytes
* `encoding` - the invalid encoding
* `status` and `statusCode` - the corresponding status code for the error
* `type` - the error type
### Types
The errors from this module have a `type` property which allows for the programmatic
determination of the type of error returned.
#### encoding.unsupported
This error will occur when the `encoding` option is specified, but the value does
not map to an encoding supported by the [iconv-lite](https://www.npmjs.org/package/iconv-lite#readme)
module.
#### entity.too.large
This error will occur when the `limit` option is specified, but the stream has
an entity that is larger.
#### request.aborted
This error will occur when the request stream is aborted by the client before
reading the body has finished.
#### request.size.invalid
This error will occur when the `length` option is specified, but the stream has
emitted more bytes.
#### stream.encoding.set
This error will occur when the given stream has an encoding set on it, making it
a decoded stream. The stream should not have an encoding set and is expected to
emit `Buffer` objects.
#### stream.not.readable
This error will occur when the given stream is not readable.
## Examples
### Simple Express example
```js
var contentType = require('content-type')
var express = require('express')
var getRawBody = require('raw-body')
var app = express()
app.use(function (req, res, next) {
getRawBody(req, {
length: req.headers['content-length'],
limit: '1mb',
encoding: contentType.parse(req).parameters.charset
}, function (err, string) {
if (err) return next(err)
req.text = string
next()
})
})
// now access req.text
```
### Simple Koa example
```js
var contentType = require('content-type')
var getRawBody = require('raw-body')
var koa = require('koa')
var app = koa()
app.use(function * (next) {
this.text = yield getRawBody(this.req, {
length: this.req.headers['content-length'],
limit: '1mb',
encoding: contentType.parse(this.req).parameters.charset
})
yield next
})
// now access this.text
```
### Using as a promise
To use this library as a promise, simply omit the `callback` and a promise is
returned, provided that a global `Promise` is defined.
```js
var getRawBody = require('raw-body')
var http = require('http')
var server = http.createServer(function (req, res) {
getRawBody(req)
.then(function (buf) {
res.statusCode = 200
res.end(buf.length + ' bytes submitted')
})
.catch(function (err) {
res.statusCode = 500
res.end(err.message)
})
})
server.listen(3000)
```
### Using with TypeScript
```ts
import * as getRawBody from 'raw-body';
import * as http from 'http';
const server = http.createServer((req, res) => {
getRawBody(req)
.then((buf) => {
res.statusCode = 200;
res.end(buf.length + ' bytes submitted');
})
.catch((err) => {
res.statusCode = err.statusCode;
res.end(err.message);
});
});
server.listen(3000);
```
## License
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/raw-body.svg
[npm-url]: https://npmjs.org/package/raw-body
[node-version-image]: https://img.shields.io/node/v/raw-body.svg
[node-version-url]: https://nodejs.org/en/download/
[coveralls-image]: https://img.shields.io/coveralls/stream-utils/raw-body/master.svg
[coveralls-url]: https://coveralls.io/r/stream-utils/raw-body?branch=master
[downloads-image]: https://img.shields.io/npm/dm/raw-body.svg
[downloads-url]: https://npmjs.org/package/raw-body
[github-actions-ci-image]: https://img.shields.io/github/actions/workflow/status/stream-utils/raw-body/ci.yml?branch=master&label=ci
[github-actions-ci-url]: https://github.com/jshttp/stream-utils/raw-body?query=workflow%3Aci
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('kebabCase', require('../kebabCase'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,401 @@
/**
* Copyright (c) 2016 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { addDisposableDomListener } from 'browser/Lifecycle';
import { IViewport, ReadonlyColorSet } from 'browser/Types';
import { IRenderDimensions } from 'browser/renderer/shared/Types';
import { ICharSizeService, ICoreBrowserService, IRenderService, IThemeService } from 'browser/services/Services';
import { EventEmitter } from 'common/EventEmitter';
import { Disposable } from 'common/Lifecycle';
import { IBuffer } from 'common/buffer/Types';
import { IBufferService, IOptionsService } from 'common/services/Services';
const FALLBACK_SCROLL_BAR_WIDTH = 15;
interface ISmoothScrollState {
startTime: number;
origin: number;
target: number;
}
/**
* Represents the viewport of a terminal, the visible area within the larger buffer of output.
* Logic for the virtual scroll bar is included in this object.
*/
export class Viewport extends Disposable implements IViewport {
public scrollBarWidth: number = 0;
private _currentRowHeight: number = 0;
private _currentDeviceCellHeight: number = 0;
private _lastRecordedBufferLength: number = 0;
private _lastRecordedViewportHeight: number = 0;
private _lastRecordedBufferHeight: number = 0;
private _lastTouchY: number = 0;
private _lastScrollTop: number = 0;
private _activeBuffer: IBuffer;
private _renderDimensions: IRenderDimensions;
// Stores a partial line amount when scrolling, this is used to keep track of how much of a line
// is scrolled so we can "scroll" over partial lines and feel natural on touchpads. This is a
// quick fix and could have a more robust solution in place that reset the value when needed.
private _wheelPartialScroll: number = 0;
private _refreshAnimationFrame: number | null = null;
private _ignoreNextScrollEvent: boolean = false;
private _smoothScrollState: ISmoothScrollState = {
startTime: 0,
origin: -1,
target: -1
};
private readonly _onRequestScrollLines = this.register(new EventEmitter<{ amount: number, suppressScrollEvent: boolean }>());
public readonly onRequestScrollLines = this._onRequestScrollLines.event;
constructor(
private readonly _viewportElement: HTMLElement,
private readonly _scrollArea: HTMLElement,
@IBufferService private readonly _bufferService: IBufferService,
@IOptionsService private readonly _optionsService: IOptionsService,
@ICharSizeService private readonly _charSizeService: ICharSizeService,
@IRenderService private readonly _renderService: IRenderService,
@ICoreBrowserService private readonly _coreBrowserService: ICoreBrowserService,
@IThemeService themeService: IThemeService
) {
super();
// Measure the width of the scrollbar. If it is 0 we can assume it's an OSX overlay scrollbar.
// Unfortunately the overlay scrollbar would be hidden underneath the screen element in that
// case, therefore we account for a standard amount to make it visible
this.scrollBarWidth = (this._viewportElement.offsetWidth - this._scrollArea.offsetWidth) || FALLBACK_SCROLL_BAR_WIDTH;
this.register(addDisposableDomListener(this._viewportElement, 'scroll', this._handleScroll.bind(this)));
// Track properties used in performance critical code manually to avoid using slow getters
this._activeBuffer = this._bufferService.buffer;
this.register(this._bufferService.buffers.onBufferActivate(e => this._activeBuffer = e.activeBuffer));
this._renderDimensions = this._renderService.dimensions;
this.register(this._renderService.onDimensionsChange(e => this._renderDimensions = e));
this._handleThemeChange(themeService.colors);
this.register(themeService.onChangeColors(e => this._handleThemeChange(e)));
this.register(this._optionsService.onSpecificOptionChange('scrollback', () => this.syncScrollArea()));
// Perform this async to ensure the ICharSizeService is ready.
setTimeout(() => this.syncScrollArea());
}
private _handleThemeChange(colors: ReadonlyColorSet): void {
this._viewportElement.style.backgroundColor = colors.background.css;
}
public reset(): void {
this._currentRowHeight = 0;
this._currentDeviceCellHeight = 0;
this._lastRecordedBufferLength = 0;
this._lastRecordedViewportHeight = 0;
this._lastRecordedBufferHeight = 0;
this._lastTouchY = 0;
this._lastScrollTop = 0;
// Sync on next animation frame to ensure the new terminal state is used
this._coreBrowserService.window.requestAnimationFrame(() => this.syncScrollArea());
}
/**
* Refreshes row height, setting line-height, viewport height and scroll area height if
* necessary.
*/
private _refresh(immediate: boolean): void {
if (immediate) {
this._innerRefresh();
if (this._refreshAnimationFrame !== null) {
this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame);
}
return;
}
if (this._refreshAnimationFrame === null) {
this._refreshAnimationFrame = this._coreBrowserService.window.requestAnimationFrame(() => this._innerRefresh());
}
}
private _innerRefresh(): void {
if (this._charSizeService.height > 0) {
this._currentRowHeight = this._renderDimensions.device.cell.height / this._coreBrowserService.dpr;
this._currentDeviceCellHeight = this._renderDimensions.device.cell.height;
this._lastRecordedViewportHeight = this._viewportElement.offsetHeight;
const newBufferHeight = Math.round(this._currentRowHeight * this._lastRecordedBufferLength) + (this._lastRecordedViewportHeight - this._renderDimensions.css.canvas.height);
if (this._lastRecordedBufferHeight !== newBufferHeight) {
this._lastRecordedBufferHeight = newBufferHeight;
this._scrollArea.style.height = this._lastRecordedBufferHeight + 'px';
}
}
// Sync scrollTop
const scrollTop = this._bufferService.buffer.ydisp * this._currentRowHeight;
if (this._viewportElement.scrollTop !== scrollTop) {
// Ignore the next scroll event which will be triggered by setting the scrollTop as we do not
// want this event to scroll the terminal
this._ignoreNextScrollEvent = true;
this._viewportElement.scrollTop = scrollTop;
}
this._refreshAnimationFrame = null;
}
/**
* Updates dimensions and synchronizes the scroll area if necessary.
*/
public syncScrollArea(immediate: boolean = false): void {
// If buffer height changed
if (this._lastRecordedBufferLength !== this._bufferService.buffer.lines.length) {
this._lastRecordedBufferLength = this._bufferService.buffer.lines.length;
this._refresh(immediate);
return;
}
// If viewport height changed
if (this._lastRecordedViewportHeight !== this._renderService.dimensions.css.canvas.height) {
this._refresh(immediate);
return;
}
// If the buffer position doesn't match last scroll top
if (this._lastScrollTop !== this._activeBuffer.ydisp * this._currentRowHeight) {
this._refresh(immediate);
return;
}
// If row height changed
if (this._renderDimensions.device.cell.height !== this._currentDeviceCellHeight) {
this._refresh(immediate);
return;
}
}
/**
* Handles scroll events on the viewport, calculating the new viewport and requesting the
* terminal to scroll to it.
* @param ev The scroll event.
*/
private _handleScroll(ev: Event): void {
// Record current scroll top position
this._lastScrollTop = this._viewportElement.scrollTop;
// Don't attempt to scroll if the element is not visible, otherwise scrollTop will be corrupt
// which causes the terminal to scroll the buffer to the top
if (!this._viewportElement.offsetParent) {
return;
}
// Ignore the event if it was flagged to ignore (when the source of the event is from Viewport)
if (this._ignoreNextScrollEvent) {
this._ignoreNextScrollEvent = false;
// Still trigger the scroll so lines get refreshed
this._onRequestScrollLines.fire({ amount: 0, suppressScrollEvent: true });
return;
}
const newRow = Math.round(this._lastScrollTop / this._currentRowHeight);
const diff = newRow - this._bufferService.buffer.ydisp;
this._onRequestScrollLines.fire({ amount: diff, suppressScrollEvent: true });
}
private _smoothScroll(): void {
// Check valid state
if (this._isDisposed || this._smoothScrollState.origin === -1 || this._smoothScrollState.target === -1) {
return;
}
// Calculate position complete
const percent = this._smoothScrollPercent();
this._viewportElement.scrollTop = this._smoothScrollState.origin + Math.round(percent * (this._smoothScrollState.target - this._smoothScrollState.origin));
// Continue or finish smooth scroll
if (percent < 1) {
this._coreBrowserService.window.requestAnimationFrame(() => this._smoothScroll());
} else {
this._clearSmoothScrollState();
}
}
private _smoothScrollPercent(): number {
if (!this._optionsService.rawOptions.smoothScrollDuration || !this._smoothScrollState.startTime) {
return 1;
}
return Math.max(Math.min((Date.now() - this._smoothScrollState.startTime) / this._optionsService.rawOptions.smoothScrollDuration, 1), 0);
}
private _clearSmoothScrollState(): void {
this._smoothScrollState.startTime = 0;
this._smoothScrollState.origin = -1;
this._smoothScrollState.target = -1;
}
/**
* Handles bubbling of scroll event in case the viewport has reached top or bottom
* @param ev The scroll event.
* @param amount The amount scrolled
*/
private _bubbleScroll(ev: Event, amount: number): boolean {
const scrollPosFromTop = this._viewportElement.scrollTop + this._lastRecordedViewportHeight;
if ((amount < 0 && this._viewportElement.scrollTop !== 0) ||
(amount > 0 && scrollPosFromTop < this._lastRecordedBufferHeight)) {
if (ev.cancelable) {
ev.preventDefault();
}
return false;
}
return true;
}
/**
* Handles mouse wheel events by adjusting the viewport's scrollTop and delegating the actual
* scrolling to `onScroll`, this event needs to be attached manually by the consumer of
* `Viewport`.
* @param ev The mouse wheel event.
*/
public handleWheel(ev: WheelEvent): boolean {
const amount = this._getPixelsScrolled(ev);
if (amount === 0) {
return false;
}
if (!this._optionsService.rawOptions.smoothScrollDuration) {
this._viewportElement.scrollTop += amount;
} else {
this._smoothScrollState.startTime = Date.now();
if (this._smoothScrollPercent() < 1) {
this._smoothScrollState.origin = this._viewportElement.scrollTop;
if (this._smoothScrollState.target === -1) {
this._smoothScrollState.target = this._viewportElement.scrollTop + amount;
} else {
this._smoothScrollState.target += amount;
}
this._smoothScrollState.target = Math.max(Math.min(this._smoothScrollState.target, this._viewportElement.scrollHeight), 0);
this._smoothScroll();
} else {
this._clearSmoothScrollState();
}
}
return this._bubbleScroll(ev, amount);
}
public scrollLines(disp: number): void {
if (disp === 0) {
return;
}
if (!this._optionsService.rawOptions.smoothScrollDuration) {
this._onRequestScrollLines.fire({ amount: disp, suppressScrollEvent: false });
} else {
const amount = disp * this._currentRowHeight;
this._smoothScrollState.startTime = Date.now();
if (this._smoothScrollPercent() < 1) {
this._smoothScrollState.origin = this._viewportElement.scrollTop;
this._smoothScrollState.target = this._smoothScrollState.origin + amount;
this._smoothScrollState.target = Math.max(Math.min(this._smoothScrollState.target, this._viewportElement.scrollHeight), 0);
this._smoothScroll();
} else {
this._clearSmoothScrollState();
}
}
}
private _getPixelsScrolled(ev: WheelEvent): number {
// Do nothing if it's not a vertical scroll event
if (ev.deltaY === 0 || ev.shiftKey) {
return 0;
}
// Fallback to WheelEvent.DOM_DELTA_PIXEL
let amount = this._applyScrollModifier(ev.deltaY, ev);
if (ev.deltaMode === WheelEvent.DOM_DELTA_LINE) {
amount *= this._currentRowHeight;
} else if (ev.deltaMode === WheelEvent.DOM_DELTA_PAGE) {
amount *= this._currentRowHeight * this._bufferService.rows;
}
return amount;
}
public getBufferElements(startLine: number, endLine?: number): { bufferElements: HTMLElement[], cursorElement?: HTMLElement } {
let currentLine: string = '';
let cursorElement: HTMLElement | undefined;
const bufferElements: HTMLElement[] = [];
const end = endLine ?? this._bufferService.buffer.lines.length;
const lines = this._bufferService.buffer.lines;
for (let i = startLine; i < end; i++) {
const line = lines.get(i);
if (!line) {
continue;
}
const isWrapped = lines.get(i + 1)?.isWrapped;
currentLine += line.translateToString(!isWrapped);
if (!isWrapped || i === lines.length - 1) {
const div = document.createElement('div');
div.textContent = currentLine;
bufferElements.push(div);
if (currentLine.length > 0) {
cursorElement = div;
}
currentLine = '';
}
}
return { bufferElements, cursorElement };
}
/**
* Gets the number of pixels scrolled by the mouse event taking into account what type of delta
* is being used.
* @param ev The mouse wheel event.
*/
public getLinesScrolled(ev: WheelEvent): number {
// Do nothing if it's not a vertical scroll event
if (ev.deltaY === 0 || ev.shiftKey) {
return 0;
}
// Fallback to WheelEvent.DOM_DELTA_LINE
let amount = this._applyScrollModifier(ev.deltaY, ev);
if (ev.deltaMode === WheelEvent.DOM_DELTA_PIXEL) {
amount /= this._currentRowHeight + 0.0; // Prevent integer division
this._wheelPartialScroll += amount;
amount = Math.floor(Math.abs(this._wheelPartialScroll)) * (this._wheelPartialScroll > 0 ? 1 : -1);
this._wheelPartialScroll %= 1;
} else if (ev.deltaMode === WheelEvent.DOM_DELTA_PAGE) {
amount *= this._bufferService.rows;
}
return amount;
}
private _applyScrollModifier(amount: number, ev: WheelEvent): number {
const modifier = this._optionsService.rawOptions.fastScrollModifier;
// Multiply the scroll speed when the modifier is down
if ((modifier === 'alt' && ev.altKey) ||
(modifier === 'ctrl' && ev.ctrlKey) ||
(modifier === 'shift' && ev.shiftKey)) {
return amount * this._optionsService.rawOptions.fastScrollSensitivity * this._optionsService.rawOptions.scrollSensitivity;
}
return amount * this._optionsService.rawOptions.scrollSensitivity;
}
/**
* Handles the touchstart event, recording the touch occurred.
* @param ev The touch event.
*/
public handleTouchStart(ev: TouchEvent): void {
this._lastTouchY = ev.touches[0].pageY;
}
/**
* Handles the touchmove event, scrolling the viewport if the position shifted.
* @param ev The touch event.
*/
public handleTouchMove(ev: TouchEvent): boolean {
const deltaY = this._lastTouchY - ev.touches[0].pageY;
this._lastTouchY = ev.touches[0].pageY;
if (deltaY === 0) {
return false;
}
this._viewportElement.scrollTop += deltaY;
return this._bubbleScroll(ev, deltaY);
}
}
@@ -0,0 +1 @@
{"version":3,"file":"index.main.cjs.js","sources":["../src/guard.ts","../src/ColorError.ts","../src/parseToRgba.ts","../src/parseToHsla.ts","../src/hsla.ts","../src/adjustHue.ts","../src/darken.ts","../src/desaturate.ts","../src/getLuminance.ts","../src/getContrast.ts","../src/rgba.ts","../src/mix.ts","../src/getScale.ts","../src/hasBadContrast.ts","../src/lighten.ts","../src/transparentize.ts","../src/opacify.ts","../src/readableColorIsBlack.ts","../src/readableColor.ts","../src/saturate.ts","../src/toHex.ts","../src/toRgba.ts","../src/toHsla.ts"],"sourcesContent":["/**\n * A simple guard function:\n *\n * ```js\n * Math.min(Math.max(low, value), high)\n * ```\n */\nfunction guard(low: number, high: number, value: number): number {\n return Math.min(Math.max(low, value), high);\n}\n\nexport default guard;\n","class ColorError extends Error {\n constructor(color: string) {\n super(`Failed to parse color: \"${color}\"`);\n }\n}\n\nexport default ColorError;\n","import guard from './guard';\nimport ColorError from './ColorError';\n\n/**\n * Parses a color into red, gree, blue, alpha parts\n *\n * @param color the input color. Can be a RGB, RBGA, HSL, HSLA, or named color\n */\nfunction parseToRgba(color: string): [number, number, number, number] {\n if (typeof color !== 'string') throw new ColorError(color);\n if (color.trim().toLowerCase() === 'transparent') return [0, 0, 0, 0];\n\n let normalizedColor = color.trim();\n normalizedColor = namedColorRegex.test(color) ? nameToHex(color) : color;\n\n const reducedHexMatch = reducedHexRegex.exec(normalizedColor);\n if (reducedHexMatch) {\n const arr = Array.from(reducedHexMatch).slice(1);\n return [\n ...arr.slice(0, 3).map((x) => parseInt(r(x, 2), 16)),\n parseInt(r(arr[3] || 'f', 2), 16) / 255,\n ] as [number, number, number, number];\n }\n\n const hexMatch = hexRegex.exec(normalizedColor);\n if (hexMatch) {\n const arr = Array.from(hexMatch).slice(1);\n return [\n ...arr.slice(0, 3).map((x) => parseInt(x, 16)),\n parseInt(arr[3] || 'ff', 16) / 255,\n ] as [number, number, number, number];\n }\n\n const rgbaMatch = rgbaRegex.exec(normalizedColor);\n if (rgbaMatch) {\n const arr = Array.from(rgbaMatch).slice(1);\n return [\n ...arr.slice(0, 3).map((x) => parseInt(x, 10)),\n parseFloat(arr[3] || '1'),\n ] as [number, number, number, number];\n }\n\n const hslaMatch = hslaRegex.exec(normalizedColor);\n if (hslaMatch) {\n const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);\n if (guard(0, 100, s) !== s) throw new ColorError(color);\n if (guard(0, 100, l) !== l) throw new ColorError(color);\n return [...hslToRgb(h, s, l), Number.isNaN(a) ? 1 : a] as [\n number,\n number,\n number,\n number\n ];\n }\n\n throw new ColorError(color);\n}\n\nfunction hash(str: string) {\n let hash = 5381;\n let i = str.length;\n\n while (i) {\n hash = (hash * 33) ^ str.charCodeAt(--i);\n }\n\n /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n * integers. Since we want the results to be always positive, convert the\n * signed int to an unsigned by doing an unsigned bitshift. */\n return (hash >>> 0) % 2341;\n}\n\nconst colorToInt = (x: string) => parseInt(x.replace(/_/g, ''), 36);\n\nconst compressedColorMap =\n '1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm'\n .split(' ')\n .reduce((acc, next) => {\n const key = colorToInt(next.substring(0, 3));\n const hex = colorToInt(next.substring(3)).toString(16);\n\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n letLine truncated
@@ -0,0 +1,16 @@
var $c7ab180b401e49ff$exports = {};
$c7ab180b401e49ff$exports = {
"ascending": `\u{432}\u{438}\u{441}\u{445}\u{456}\u{434}\u{43D}\u{438}\u{439}`,
"ascendingSort": (args)=>`\u{432}\u{456}\u{434}\u{441}\u{43E}\u{440}\u{442}\u{43E}\u{432}\u{430}\u{43D}\u{43E} \u{437}\u{430} \u{441}\u{442}\u{43E}\u{432}\u{43F}\u{446}\u{435}\u{43C} ${args.columnName} \u{443} \u{432}\u{438}\u{441}\u{445}\u{456}\u{434}\u{43D}\u{43E}\u{43C}\u{443} \u{43F}\u{43E}\u{440}\u{44F}\u{434}\u{43A}\u{443}`,
"columnSize": (args)=>`${args.value} \u{43F}\u{456}\u{43A}\u{441}.`,
"descending": `\u{43D}\u{438}\u{437}\u{445}\u{456}\u{434}\u{43D}\u{438}\u{439}`,
"descendingSort": (args)=>`\u{432}\u{456}\u{434}\u{441}\u{43E}\u{440}\u{442}\u{43E}\u{432}\u{430}\u{43D}\u{43E} \u{437}\u{430} \u{441}\u{442}\u{43E}\u{432}\u{43F}\u{446}\u{435}\u{43C} ${args.columnName} \u{443} \u{43D}\u{438}\u{437}\u{445}\u{456}\u{434}\u{43D}\u{43E}\u{43C}\u{443} \u{43F}\u{43E}\u{440}\u{44F}\u{434}\u{43A}\u{443}`,
"resizerDescription": `\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Enter, \u{449}\u{43E}\u{431} \u{43F}\u{43E}\u{447}\u{430}\u{442}\u{438} \u{437}\u{43C}\u{456}\u{43D}\u{443} \u{440}\u{43E}\u{437}\u{43C}\u{456}\u{440}\u{443}`,
"select": `\u{412}\u{438}\u{431}\u{440}\u{430}\u{442}\u{438}`,
"selectAll": `\u{412}\u{438}\u{431}\u{440}\u{430}\u{442}\u{438} \u{432}\u{441}\u{435}`,
"sortable": `\u{441}\u{43E}\u{440}\u{442}\u{443}\u{432}\u{430}\u{43B}\u{44C}\u{43D}\u{438}\u{439} \u{441}\u{442}\u{43E}\u{432}\u{43F}\u{435}\u{446}\u{44C}`
};
export {$c7ab180b401e49ff$exports as default};
//# sourceMappingURL=uk-UA.module.js.map
@@ -0,0 +1,5 @@
'use strict';
var getPolyfill = require('./polyfill');
module.exports = getPolyfill();
@@ -0,0 +1,67 @@
/*
* 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 $7215afc6de606d6b$export$de79e2c695e052f3(element) {
if ($7215afc6de606d6b$var$supportsPreventScroll()) element.focus({
preventScroll: true
});
else {
let scrollableElements = $7215afc6de606d6b$var$getScrollableElements(element);
element.focus();
$7215afc6de606d6b$var$restoreScrollPosition(scrollableElements);
}
}
let $7215afc6de606d6b$var$supportsPreventScrollCached = null;
function $7215afc6de606d6b$var$supportsPreventScroll() {
if ($7215afc6de606d6b$var$supportsPreventScrollCached == null) {
$7215afc6de606d6b$var$supportsPreventScrollCached = false;
try {
let focusElem = document.createElement('div');
focusElem.focus({
get preventScroll () {
$7215afc6de606d6b$var$supportsPreventScrollCached = true;
return true;
}
});
} catch {
// Ignore
}
}
return $7215afc6de606d6b$var$supportsPreventScrollCached;
}
function $7215afc6de606d6b$var$getScrollableElements(element) {
let parent = element.parentNode;
let scrollableElements = [];
let rootScrollingElement = document.scrollingElement || document.documentElement;
while(parent instanceof HTMLElement && parent !== rootScrollingElement){
if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) scrollableElements.push({
element: parent,
scrollTop: parent.scrollTop,
scrollLeft: parent.scrollLeft
});
parent = parent.parentNode;
}
if (rootScrollingElement instanceof HTMLElement) scrollableElements.push({
element: rootScrollingElement,
scrollTop: rootScrollingElement.scrollTop,
scrollLeft: rootScrollingElement.scrollLeft
});
return scrollableElements;
}
function $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements) {
for (let { element: element, scrollTop: scrollTop, scrollLeft: scrollLeft } of scrollableElements){
element.scrollTop = scrollTop;
element.scrollLeft = scrollLeft;
}
}
export {$7215afc6de606d6b$export$de79e2c695e052f3 as focusWithoutScrolling};
//# sourceMappingURL=focusWithoutScrolling.module.js.map
@@ -0,0 +1,245 @@
/**
* exception-handler.js: Object for handling uncaughtException events.
*
* (C) 2010 Charlie Robbins
* MIT LICENCE
*/
'use strict';
const os = require('os');
const asyncForEach = require('async/forEach');
const debug = require('@dabh/diagnostics')('winston:exception');
const once = require('one-time');
const stackTrace = require('stack-trace');
const ExceptionStream = require('./exception-stream');
/**
* Object for handling uncaughtException events.
* @type {ExceptionHandler}
*/
module.exports = class ExceptionHandler {
/**
* TODO: add contructor description
* @param {!Logger} logger - TODO: add param description
*/
constructor(logger) {
if (!logger) {
throw new Error('Logger is required to handle exceptions');
}
this.logger = logger;
this.handlers = new Map();
}
/**
* Handles `uncaughtException` events for the current process by adding any
* handlers passed in.
* @returns {undefined}
*/
handle(...args) {
args.forEach(arg => {
if (Array.isArray(arg)) {
return arg.forEach(handler => this._addHandler(handler));
}
this._addHandler(arg);
});
if (!this.catcher) {
this.catcher = this._uncaughtException.bind(this);
process.on('uncaughtException', this.catcher);
}
}
/**
* Removes any handlers to `uncaughtException` events for the current
* process. This does not modify the state of the `this.handlers` set.
* @returns {undefined}
*/
unhandle() {
if (this.catcher) {
process.removeListener('uncaughtException', this.catcher);
this.catcher = false;
Array.from(this.handlers.values())
.forEach(wrapper => this.logger.unpipe(wrapper));
}
}
/**
* TODO: add method description
* @param {Error} err - Error to get information about.
* @returns {mixed} - TODO: add return description.
*/
getAllInfo(err) {
let message = null;
if (err) {
message = typeof err === 'string' ? err : err.message;
}
return {
error: err,
// TODO (indexzero): how do we configure this?
level: 'error',
message: [
`uncaughtException: ${(message || '(no error message)')}`,
err && err.stack || ' No stack trace'
].join('\n'),
stack: err && err.stack,
exception: true,
date: new Date().toString(),
process: this.getProcessInfo(),
os: this.getOsInfo(),
trace: this.getTrace(err)
};
}
/**
* Gets all relevant process information for the currently running process.
* @returns {mixed} - TODO: add return description.
*/
getProcessInfo() {
return {
pid: process.pid,
uid: process.getuid ? process.getuid() : null,
gid: process.getgid ? process.getgid() : null,
cwd: process.cwd(),
execPath: process.execPath,
version: process.version,
argv: process.argv,
memoryUsage: process.memoryUsage()
};
}
/**
* Gets all relevant OS information for the currently running process.
* @returns {mixed} - TODO: add return description.
*/
getOsInfo() {
return {
loadavg: os.loadavg(),
uptime: os.uptime()
};
}
/**
* Gets a stack trace for the specified error.
* @param {mixed} err - TODO: add param description.
* @returns {mixed} - TODO: add return description.
*/
getTrace(err) {
const trace = err ? stackTrace.parse(err) : stackTrace.get();
return trace.map(site => {
return {
column: site.getColumnNumber(),
file: site.getFileName(),
function: site.getFunctionName(),
line: site.getLineNumber(),
method: site.getMethodName(),
native: site.isNative()
};
});
}
/**
* Helper method to add a transport as an exception handler.
* @param {Transport} handler - The transport to add as an exception handler.
* @returns {void}
*/
_addHandler(handler) {
if (!this.handlers.has(handler)) {
handler.handleExceptions = true;
const wrapper = new ExceptionStream(handler);
this.handlers.set(handler, wrapper);
this.logger.pipe(wrapper);
}
}
/**
* Logs all relevant information around the `err` and exits the current
* process.
* @param {Error} err - Error to handle
* @returns {mixed} - TODO: add return description.
* @private
*/
_uncaughtException(err) {
const info = this.getAllInfo(err);
const handlers = this._getExceptionHandlers();
// Calculate if we should exit on this error
let doExit = typeof this.logger.exitOnError === 'function'
? this.logger.exitOnError(err)
: this.logger.exitOnError;
let timeout;
if (!handlers.length && doExit) {
// eslint-disable-next-line no-console
console.warn('winston: exitOnError cannot be true with no exception handlers.');
// eslint-disable-next-line no-console
console.warn('winston: not exiting process.');
doExit = false;
}
function gracefulExit() {
debug('doExit', doExit);
debug('process._exiting', process._exiting);
if (doExit && !process._exiting) {
// Remark: Currently ignoring any exceptions from transports when
// catching uncaught exceptions.
if (timeout) {
clearTimeout(timeout);
}
// eslint-disable-next-line no-process-exit
process.exit(1);
}
}
if (!handlers || handlers.length === 0) {
return process.nextTick(gracefulExit);
}
// Log to all transports attempting to listen for when they are completed.
asyncForEach(handlers, (handler, next) => {
const done = once(next);
const transport = handler.transport || handler;
// Debug wrapping so that we can inspect what's going on under the covers.
function onDone(event) {
return () => {
debug(event);
done();
};
}
transport._ending = true;
transport.once('finish', onDone('finished'));
transport.once('error', onDone('error'));
}, () => doExit && gracefulExit());
this.logger.log(info);
// If exitOnError is true, then only allow the logging of exceptions to
// take up to `3000ms`.
if (doExit) {
timeout = setTimeout(gracefulExit, 3000);
}
}
/**
* Returns the list of transports and exceptionHandlers for this instance.
* @returns {Array} - List of transports and exceptionHandlers for this
* instance.
* @private
*/
_getExceptionHandlers() {
// Remark (indexzero): since `logger.transports` returns all of the pipes
// from the _readableState of the stream we actually get the join of the
// explicit handlers and the implicit transports with
// `handleExceptions: true`
return this.logger.transports.filter(wrap => {
const transport = wrap.transport || wrap;
return transport.handleExceptions;
});
}
};
@@ -0,0 +1,21 @@
(The MIT License)
Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,52 @@
/*
* Demonstrates a conhost hang that occurs when widening the console buffer
* while selection is in progress. The problem affects the new Windows 10
* console, not the "legacy" console mode that Windows 10 also includes.
*
* First tested with:
* - Windows 10.0.10240
* - conhost.exe version 10.0.10240.16384
* - ConhostV1.dll version 10.0.10240.16384
* - ConhostV2.dll version 10.0.10240.16391
*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
#include "TestUtil.cc"
const int SC_CONSOLE_MARK = 0xFFF2;
const int SC_CONSOLE_SELECT_ALL = 0xFFF5;
int main(int argc, char *argv[]) {
if (argc == 1) {
startChildProcess(L"CHILD");
return 0;
}
setWindowPos(0, 0, 1, 1);
setBufferSize(80, 25);
setWindowPos(0, 0, 80, 25);
countDown(5);
SendMessage(GetConsoleWindow(), WM_SYSCOMMAND, SC_CONSOLE_SELECT_ALL, 0);
Sleep(2000);
// This API call does not return. In the console window, the "Select All"
// operation appears to end. The console window becomes non-responsive,
// and the conhost.exe process must be killed from the Task Manager.
// (Killing this test program or closing the console window is not
// sufficient.)
//
// The same hang occurs whether line resizing is off or on. It happens
// with both "Mark" and "Select All". Calling setBufferSize with the
// existing buffer size does not hang, but calling it with only a changed
// buffer height *does* hang. Calling setWindowPos does not hang.
setBufferSize(120, 25);
printf("Done...\n");
Sleep(2000);
}
@@ -0,0 +1,6 @@
import { YAMLSeq } from '../nodes/YAMLSeq';
import type { BlockSequence } from '../parse/cst';
import type { CollectionTag } from '../schema/types';
import type { ComposeContext, ComposeNode } from './compose-node';
import type { ComposeErrorHandler } from './composer';
export declare function resolveBlockSeq({ composeNode, composeEmptyNode }: ComposeNode, ctx: ComposeContext, bs: BlockSequence, onError: ComposeErrorHandler, tag?: CollectionTag): YAMLSeq.Parsed;
@@ -0,0 +1,29 @@
var baseExtremum = require('./_baseExtremum'),
baseGt = require('./_baseGt'),
identity = require('./identity');
/**
* Computes the maximum value of `array`. If `array` is empty or falsey,
* `undefined` is returned.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Math
* @param {Array} array The array to iterate over.
* @returns {*} Returns the maximum value.
* @example
*
* _.max([4, 2, 8, 6]);
* // => 8
*
* _.max([]);
* // => undefined
*/
function max(array) {
return (array && array.length)
? baseExtremum(array, identity, baseGt)
: undefined;
}
module.exports = max;
@@ -0,0 +1,2 @@
import { AsnSchemaStorage } from "./schema";
export declare const schemaStorage: AsnSchemaStorage;
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PFX = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const asn1_cms_1 = require("@peculiar/asn1-cms");
const mac_data_1 = require("./mac_data");
class PFX {
constructor(params = {}) {
this.version = 3;
this.authSafe = new asn1_cms_1.ContentInfo();
this.macData = new mac_data_1.MacData();
Object.assign(this, params);
}
}
exports.PFX = PFX;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer })
], PFX.prototype, "version", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_cms_1.ContentInfo })
], PFX.prototype, "authSafe", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: mac_data_1.MacData, optional: true })
], PFX.prototype, "macData", void 0);
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const stream_1 = require("stream");
const stream_2 = require("../readers/stream");
const provider_1 = require("./provider");
class ProviderStream extends provider_1.default {
constructor() {
super(...arguments);
this._reader = new stream_2.default(this._settings);
}
read(task) {
const root = this._getRootDirectory(task);
const options = this._getReaderOptions(task);
const source = this.api(root, task, options);
const destination = new stream_1.Readable({ objectMode: true, read: () => { } });
source
.once('error', (error) => destination.emit('error', error))
.on('data', (entry) => destination.emit('data', options.transform(entry)))
.once('end', () => destination.emit('end'));
destination
.once('close', () => source.destroy());
return destination;
}
api(root, task, options) {
if (task.dynamic) {
return this._reader.dynamic(root, options);
}
return this._reader.static(task.patterns, options);
}
}
exports.default = ProviderStream;
@@ -0,0 +1,3 @@
declare type AnyFunction = (...args: any) => any;
export declare function useInitialValue<T, U extends AnyFunction | undefined = undefined>(value: T | null, computeFn?: U): U extends AnyFunction ? ReturnType<U> | null : T | null;
export {};
@@ -0,0 +1 @@
{"version":3,"file":"prebuild-loader.js","sourceRoot":"","sources":["../src/prebuild-loader.ts"],"names":[],"mappings":";;AAAA,2DAA+C;AAE/C,IAAI,GAAgB,CAAC;AAErB,IAAI;IACF,GAAG,GAAG,OAAO,CAAC,4BAAO,IAAI,2BAA2B,CAAC,CAAC;CACvD;AAAC,OAAO,UAAU,EAAE;IACnB,IAAI;QACF,GAAG,GAAG,OAAO,CAAC,4BAAO,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC;KAClF;IAAC,OAAO,UAAU,EAAE;QACnB,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACxC,qFAAqF;QACrF,MAAM,UAAU,CAAC;KAClB;CACF;AAED,kBAAe,GAAG,CAAC"}
@@ -0,0 +1,131 @@
var $f89f15d7f52bce29$exports = require("./Point.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "Rect", () => $41b7691783731623$export$c79fc6492f3af13d);
/*
* 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 $41b7691783731623$export$c79fc6492f3af13d {
/**
* The maximum x-coordinate in the rectangle.
*/ get maxX() {
return this.x + this.width;
}
/**
* The maximum y-coordinate in the rectangle.
*/ get maxY() {
return this.y + this.height;
}
/**
* The area of the rectangle.
*/ get area() {
return this.width * this.height;
}
/**
* The top left corner of the rectangle.
*/ get topLeft() {
return new (0, $f89f15d7f52bce29$exports.Point)(this.x, this.y);
}
/**
* The top right corner of the rectangle.
*/ get topRight() {
return new (0, $f89f15d7f52bce29$exports.Point)(this.maxX, this.y);
}
/**
* The bottom left corner of the rectangle.
*/ get bottomLeft() {
return new (0, $f89f15d7f52bce29$exports.Point)(this.x, this.maxY);
}
/**
* The bottom right corner of the rectangle.
*/ get bottomRight() {
return new (0, $f89f15d7f52bce29$exports.Point)(this.maxX, this.maxY);
}
/**
* Returns whether this rectangle intersects another rectangle.
* @param rect - The rectangle to check.
*/ intersects(rect) {
let isTestEnv = process.env.NODE_ENV === 'test' && !process.env.VIRT_ON;
return (isTestEnv || this.area > 0 && rect.area > 0) && this.x <= rect.x + rect.width && rect.x <= this.x + this.width && this.y <= rect.y + rect.height && rect.y <= this.y + this.height;
}
/**
* Returns whether this rectangle fully contains another rectangle.
* @param rect - The rectangle to check.
*/ containsRect(rect) {
return this.x <= rect.x && this.y <= rect.y && this.maxX >= rect.maxX && this.maxY >= rect.maxY;
}
/**
* Returns whether the rectangle contains the given point.
* @param point - The point to check.
*/ containsPoint(point) {
return this.x <= point.x && this.y <= point.y && this.maxX >= point.x && this.maxY >= point.y;
}
/**
* Returns the first corner of this rectangle (from top to bottom, left to right)
* that is contained in the given rectangle, or null of the rectangles do not intersect.
* @param rect - The rectangle to check.
*/ getCornerInRect(rect) {
for (let key of [
'topLeft',
'topRight',
'bottomLeft',
'bottomRight'
]){
if (rect.containsPoint(this[key])) return key;
}
return null;
}
equals(rect) {
return rect.x === this.x && rect.y === this.y && rect.width === this.width && rect.height === this.height;
}
pointEquals(point) {
return this.x === point.x && this.y === point.y;
}
sizeEquals(size) {
return this.width === size.width && this.height === size.height;
}
/**
* Returns the union of this Rect and another.
*/ union(other) {
let x = Math.min(this.x, other.x);
let y = Math.min(this.y, other.y);
let width = Math.max(this.maxX, other.maxX) - x;
let height = Math.max(this.maxY, other.maxY) - y;
return new $41b7691783731623$export$c79fc6492f3af13d(x, y, width, height);
}
/**
* Returns the intersection of this Rect with another.
* If the rectangles do not intersect, an all zero Rect is returned.
*/ intersection(other) {
if (!this.intersects(other)) return new $41b7691783731623$export$c79fc6492f3af13d(0, 0, 0, 0);
let x = Math.max(this.x, other.x);
let y = Math.max(this.y, other.y);
return new $41b7691783731623$export$c79fc6492f3af13d(x, y, Math.min(this.maxX, other.maxX) - x, Math.min(this.maxY, other.maxY) - y);
}
/**
* Returns a copy of this rectangle.
*/ copy() {
return new $41b7691783731623$export$c79fc6492f3af13d(this.x, this.y, this.width, this.height);
}
constructor(x = 0, y = 0, width = 0, height = 0){
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
}
//# sourceMappingURL=Rect.main.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ClassElementMetadata.d.ts","sourceRoot":"","sources":["../../../../src/metadata/models/ClassElementMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF,MAAM,MAAM,oBAAoB,GAC5B,2BAA2B,GAC3B,6BAA6B,CAAC"}
@@ -0,0 +1,8 @@
var arrayWithHoles = require("./arrayWithHoles.js");
var iterableToArrayLimit = require("./iterableToArrayLimit.js");
var unsupportedIterableToArray = require("./unsupportedIterableToArray.js");
var nonIterableRest = require("./nonIterableRest.js");
function _slicedToArray(r, e) {
return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
}
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,41 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
test("parse strict object with unknown keys", () => {
expect(() =>
z
.object({ name: z.string() })
.strict()
.parse({ name: "bill", unknownKey: 12 } as any)
).toThrow();
});
test("parse nonstrict object with unknown keys", () => {
z.object({ name: z.string() }).nonstrict().parse({ name: "bill", unknownKey: 12 });
});
test("invalid left side of intersection", () => {
expect(() => z.intersection(z.string(), z.number()).parse(12 as any)).toThrow();
});
test("invalid right side of intersection", () => {
expect(() => z.intersection(z.string(), z.number()).parse("12" as any)).toThrow();
});
test("parsing non-array in tuple schema", () => {
expect(() => z.tuple([]).parse("12" as any)).toThrow();
});
test("incorrect num elements in tuple", () => {
expect(() => z.tuple([]).parse(["asdf"] as any)).toThrow();
});
test("invalid enum value", () => {
expect(() => z.enum(["Blue"]).parse("Red" as any)).toThrow();
});
test("parsing unknown", () => {
z.string().parse("Red" as unknown);
});
@@ -0,0 +1,7 @@
import {
spinner_default
} from "./chunk-MQ3ILONP.mjs";
import "./chunk-4JPQHBFV.mjs";
export {
spinner_default as default
};
@@ -0,0 +1,47 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasOverloadSignatures = hasOverloadSignatures;
const utils_1 = require("@typescript-eslint/utils");
const misc_1 = require("./misc");
/**
* @return `true` if the function or method node has overload signatures.
*/
function hasOverloadSignatures(node, context) {
// `export default function () {}`
if (node.parent.type === utils_1.AST_NODE_TYPES.ExportDefaultDeclaration) {
return node.parent.parent.body.some(member => {
return (member.type === utils_1.AST_NODE_TYPES.ExportDefaultDeclaration &&
member.declaration.type === utils_1.AST_NODE_TYPES.TSDeclareFunction);
});
}
// `export function f() {}`
if (node.parent.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration) {
return node.parent.parent.body.some(member => {
return (member.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration &&
member.declaration?.type === utils_1.AST_NODE_TYPES.TSDeclareFunction &&
getFunctionDeclarationName(member.declaration, context) ===
getFunctionDeclarationName(node, context));
});
}
// either:
// - `function f() {}`
// - `class T { foo() {} }`
const nodeKey = getFunctionDeclarationName(node, context);
return node.parent.body.some(member => {
return ((member.type === utils_1.AST_NODE_TYPES.TSDeclareFunction ||
(member.type === utils_1.AST_NODE_TYPES.MethodDefinition &&
member.value.body == null)) &&
nodeKey === getFunctionDeclarationName(member, context));
});
}
function getFunctionDeclarationName(node, context) {
if (node.type === utils_1.AST_NODE_TYPES.FunctionDeclaration ||
node.type === utils_1.AST_NODE_TYPES.TSDeclareFunction) {
// For a `FunctionDeclaration` or `TSDeclareFunction` this may be `null` if
// and only if the parent is an `ExportDefaultDeclaration`.
//
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return node.id.name;
}
return (0, misc_1.getStaticMemberAccessValue)(node, context);
}
@@ -0,0 +1,17 @@
import {
useDivider
} from "./chunk-TS7K35D7.mjs";
// src/divider.tsx
import { forwardRef } from "@heroui/system-rsc";
import { jsx } from "react/jsx-runtime";
var Divider = forwardRef((props, ref) => {
const { Component, getDividerProps } = useDivider({ ...props });
return /* @__PURE__ */ jsx(Component, { ref, ...getDividerProps() });
});
Divider.displayName = "HeroUI.Divider";
var divider_default = Divider;
export {
divider_default
};
@@ -0,0 +1,46 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Array = GetIntrinsic('%Array%');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var IsArray = require('./IsArray');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-arrayspeciescreate
module.exports = function ArraySpeciesCreate(originalArray, length) {
if (!isInteger(length) || length < 0) {
throw new $TypeError('Assertion failed: length must be an integer >= 0');
}
var len = length === 0 ? 0 : length;
var C;
var isArray = IsArray(originalArray);
if (isArray) {
C = Get(originalArray, 'constructor');
// TODO: figure out how to make a cross-realm normal Array, a same-realm Array
// if (IsConstructor(C)) {
// if C is another realm's Array, C = undefined
// Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ?
// }
if ($species && isObject(C)) {
C = Get(C, $species);
if (C === null) {
C = void 0;
}
}
}
if (typeof C === 'undefined') {
return $Array(len);
}
if (!IsConstructor(C)) {
throw new $TypeError('C must be a constructor');
}
return new C(len); // Construct(C, len);
};
@@ -0,0 +1,34 @@
import * as _heroui_system from '@heroui/system';
import { HTMLHeroUIProps } from '@heroui/system';
import { GridNode } from '@react-types/grid';
import { Key } from 'react';
import { ValuesType } from './use-table.mjs';
import '@react-types/table';
import '@heroui/theme';
import '@react-stately/virtualizer';
import '@react-types/shared';
import '@react-stately/table';
import '@react-aria/table';
import '@heroui/react-utils';
import '@heroui/checkbox';
interface TableCheckboxCellProps<T = object> extends HTMLHeroUIProps<"td"> {
/**
* The key of the table row.
*/
rowKey: Key;
/**
* The table cell.
*/
node: GridNode<T>;
slots: ValuesType["slots"];
state: ValuesType["state"];
color: ValuesType["color"];
disableAnimation: ValuesType["disableAnimation"];
checkboxesProps: ValuesType["checkboxesProps"];
selectionMode: ValuesType["selectionMode"];
classNames?: ValuesType["classNames"];
}
declare const TableCheckboxCell: _heroui_system.InternalForwardRefRenderFunction<"td", TableCheckboxCellProps<object>, never>;
export { type TableCheckboxCellProps, TableCheckboxCell as default };
@@ -0,0 +1,15 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"id-length": "off",
"max-lines-per-function": "off",
"new-cap": ["error", {
"capIsNewExceptions": [
"GetIntrinsic",
],
}],
},
}
@@ -0,0 +1,420 @@
flf2a$ 4 4 8 -1 11 0 0 0
Author : MikeChat and myflix
Date : 2006/6/9 6:49:08
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
$ #
$ #
$ #
$ ##
#
_ __ #
(_|__|#
##
__ #
\_)#
__ #
\_)##
##
#
#
##
$#
#
#
##
%#
#
#
##
&#
#
#
##
'#
#
#
##
(#
#
#
##
)#
#
#
##
*#
#
#
##
+#
#
#
##
___ #
\__) #
#
##
-#
#
#
##
_ #
(_) #
#
##
/#
#
#
##
___ #
/ |#
| () |#
|___/ ##
_ #
__\ \#
| |#
|____|##
__ _ #
| | \#
| || |#
|_|__|##
_ _ #
| || |#
| |#
\__/\/##
__ #
/ _|#
_| |_ #
\____|##
_ __ #
| | |#
| || |#
\__|_|##
___ #
/ _|#
| | | #
|___| ##
_ _ #
| \| |#
\ \ |#
\__|##
__ #
/ \/\#
|() |#
\__/\/##
__ #
| \ #
| | |#
|____|##
_ #
(_) #
_ #
(_) ##
;#
#
#
##
<#
#
#
##
=#
#
#
##
> >#
#
#
##
_ #
_ | \#
(_)_)|#
\_/##
@#
#
#
##
___ #
|_ \ #
_|> |#
|___/ ##
____ #
| __ |#
| | |#
\_/\_/##
____ #
| _ |#
| ||_|#
|_| ##
____ #
| __ |#
| |/ |#
\___/ ##
____ #
| |#
||_| |#
|_||_|##
____ #
|_ |#
|| |#
|_|##
____ #
| _ |#
| \|_|#
\__| ##
____ #
|_ _|#
_||_ #
|____|##
#
____ #
|____|#
##
_ #
/ | #
| |__ #
\___|##
____ #
|_ _|#
/ \ #
|_/\_|##
#
____ #
| __|#
|_| ##
____ #
|_ |#
_< < #
|____|##
____ #
|__ |#
_/ / #
|____|##
__ #
/ \ #
| |] |#
\__/ ##
____ #
|_ |#
|| |#
\__/##
__ #
/ \ #
/|] |#
|/\_/ ##
____ #
|_ |#
/ | |#
|/\__/##
_ __ #
| | \#
| || |#
\__|_|##
_ #
__| |#
|__ |#
|_|##
____ #
| _|#
| |_ #
|____|##
___ #
/ _|#
| |_ #
\___|##
____ #
| _|#
> >_ #
|____|##
_ _ #
| \/ |#
> < #
|_/\_|##
_ #
__/ |#
|__ < #
\_|##
_ _ #
| \| |#
| .' |#
|_|\_|##
[#
#
#
##
\#
#
#
##
]#
#
#
##
__ #
>_> #
#
##
_#
#
#
##
_ #
/_/#
#
##
___ #
|_ \ #
_|> |#
|___/ ##
____ #
| __ |#
| | |#
\_/\_/##
____ #
| _ |#
| ||_|#
|_| ##
____ #
| __ |#
| |/ |#
\___/ ##
____ #
| |#
||_| |#
|_||_|##
____ #
|_ |#
|| |#
|_|##
____ #
| _ |#
| \|_|#
\__| ##
____ #
|_ _|#
_||_ #
|____|##
#
____ #
|____|#
##
_ #
/ | #
| |__ #
\___|##
____ #
|_ _|#
/ \ #
|_/\_|##
#
____ #
| __|#
|_| ##
____ #
|_ |#
_< < #
|____|##
____ #
|__ |#
_/ / #
|____|##
__ #
/ \ #
| |] |#
\__/ ##
____ #
|_ |#
|| |#
\__/##
__ #
/ \ #
/|] |#
|/\_/ ##
____ #
|_ |#
/ | |#
|/\__/##
_ __ #
| | \#
| || |#
\__|_|##
_ #
__| |#
|__ |#
|_|##
____ #
| _|#
| |_ #
|____|##
___ #
/ _|#
| |_ #
\___|##
____ #
| _|#
> >_ #
|____|##
_ _ #
| \/ |#
> < #
|_/\_|##
_ #
__/ |#
|__ < #
\_|##
_ _ #
| \| |#
| .' |#
|_|\_|##
{#
#
#
##
|#
#
#
##
}#
#
#
##
~#
#
#
##
___ #
|_ \ #
_|> |#
|___/ ##
__ #
/ \ #
| |] |#
\__/ ##
____ #
| _|#
| |_ #
|____|##
___ #
|_ \ #
_|> |#
|___/ ##
__ #
/ \ #
| |] |#
\__/ ##
____ #
| _|#
| |_ #
|____|##
ß#
#
#
##
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_interop_require_wildcard.cjs",
"module": "../../esm/_interop_require_wildcard.js"
}
@@ -0,0 +1,11 @@
import { TypeBoxError } from '../../type/error/index.mjs';
import type { TSchema } from '../../type/schema/index.mjs';
import type { Static } from '../../type/static/index.mjs';
export declare class ValueCreateError extends TypeBoxError {
readonly schema: TSchema;
constructor(schema: TSchema, message: string);
}
/** Creates a value from the given schema and references */
export declare function Create<T extends TSchema>(schema: T, references: TSchema[]): Static<T>;
/** Creates a value from the given schema */
export declare function Create<T extends TSchema>(schema: T): Static<T>;
@@ -0,0 +1,25 @@
import LazyWrapper from './_LazyWrapper.js';
import arrayPush from './_arrayPush.js';
import arrayReduce from './_arrayReduce.js';
/**
* The base implementation of `wrapperValue` which returns the result of
* performing a sequence of actions on the unwrapped `value`, where each
* successive action is supplied the return value of the previous.
*
* @private
* @param {*} value The unwrapped value.
* @param {Array} actions Actions to perform to resolve the unwrapped value.
* @returns {*} Returns the resolved value.
*/
function baseWrapperValue(value, actions) {
var result = value;
if (result instanceof LazyWrapper) {
result = result.value();
}
return arrayReduce(actions, function(result, action) {
return action.func.apply(action.thisArg, arrayPush([result], action.args));
}, result);
}
export default baseWrapperValue;
@@ -0,0 +1,10 @@
import { PluginFunc } from 'dayjs'
declare const plugin: PluginFunc
export = plugin
declare module 'dayjs' {
interface Dayjs {
isoWeeksInYear(): number
}
}
@@ -0,0 +1,9 @@
export { As, CapitalizedDOMElements, DOMAttributes, DOMElement, DOMElements, ExtendVariantProps, ExtendVariantWithSlotsProps, ExtendVariants, HTMLHeroUIProps, InternalForwardRefRenderFunction, Merge, MergeWithAs, OmitCommonProps, PropGetter, PropsOf, RightJoinProps, SharedSelection, extendVariants, forwardRef, isHeroUIEl, mapPropsVariants, mapPropsVariantsWithCommon, toIterator } from '@heroui/system-rsc';
export { HeroUIProvider, HeroUIProviderProps } from './provider.mjs';
export { ProviderContext, ProviderContextProps, useProviderContext } from './provider-context.mjs';
export { useInputLabelPlacement, useLabelPlacement } from './hooks/use-label-placement.mjs';
import '@react-aria/overlays';
import '@react-aria/i18n';
import '@react-types/shared';
import 'react';
import './types.mjs';
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more