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,87 @@
/**
* Return an argument object populated with the array arguments from args
*
* @param [args] An optional argument array (typically `process.argv.slice(2)`)
* @param [opts] An optional options object to customize the parsing
*/
declare function minimist(args?: string[], opts?: minimist.Opts): minimist.ParsedArgs;
/**
* Return an argument object populated with the array arguments from args. Strongly-typed
* to be the intersect of type T with minimist.ParsedArgs.
*
* `T` The type that will be intersected with minimist.ParsedArgs to represent the argument object
*
* @param [args] An optional argument array (typically `process.argv.slice(2)`)
* @param [opts] An optional options object to customize the parsing
*/
declare function minimist<T>(args?: string[], opts?: minimist.Opts): T & minimist.ParsedArgs;
/**
* Return an argument object populated with the array arguments from args. Strongly-typed
* to be the the type T which should extend minimist.ParsedArgs
*
* `T` The type that extends minimist.ParsedArgs and represents the argument object
*
* @param [args] An optional argument array (typically `process.argv.slice(2)`)
* @param [opts] An optional options object to customize the parsing
*/
declare function minimist<T extends minimist.ParsedArgs>(args?: string[], opts?: minimist.Opts): T;
declare namespace minimist {
interface Opts {
/**
* A string or array of strings argument names to always treat as strings
*/
string?: string | string[] | undefined;
/**
* A boolean, string or array of strings to always treat as booleans. If true will treat
* all double hyphenated arguments without equals signs as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
*/
boolean?: boolean | string | string[] | undefined;
/**
* An object mapping string names to strings or arrays of string argument names to use as aliases
*/
alias?: { [key: string]: string | string[] } | undefined;
/**
* An object mapping string argument names to default values
*/
default?: { [key: string]: any } | undefined;
/**
* When true, populate argv._ with everything after the first non-option
*/
stopEarly?: boolean | undefined;
/**
* A function which is invoked with a command line parameter not defined in the opts
* configuration object. If the function returns false, the unknown option is not added to argv
*/
unknown?: ((arg: string) => boolean) | undefined;
/**
* When true, populate argv._ with everything before the -- and argv['--'] with everything after the --.
* Note that with -- set, parsing for arguments still stops after the `--`.
*/
"--"?: boolean | undefined;
}
interface ParsedArgs {
[arg: string]: any;
/**
* If opts['--'] is true, populated with everything after the --
*/
"--"?: string[] | undefined;
/**
* Contains all the arguments that didn't have an option associated with them
*/
_: string[];
}
}
export = minimist;
@@ -0,0 +1 @@
{"version":3,"file":"PlanBindingNode.js","sourceRoot":"","sources":["../../../../src/planning/models/PlanBindingNode.ts"],"names":[],"mappings":""}
@@ -0,0 +1,42 @@
{
"name": "@react-stately/tree",
"version": "3.9.3",
"description": "Spectrum UI components in React",
"license": "Apache-2.0",
"main": "dist/main.js",
"module": "dist/module.js",
"exports": {
"source": "./src/index.ts",
"types": [
"./dist/types.d.ts",
"./src/index.ts"
],
"import": "./dist/import.mjs",
"require": "./dist/main.js"
},
"types": "dist/types.d.ts",
"source": "src/index.ts",
"files": [
"dist",
"src"
],
"sideEffects": false,
"repository": {
"type": "git",
"url": "https://github.com/adobe/react-spectrum"
},
"dependencies": {
"@react-stately/collections": "^3.12.8",
"@react-stately/selection": "^3.20.6",
"@react-stately/utils": "^3.10.8",
"@react-types/shared": "^3.32.1",
"@swc/helpers": "^0.5.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
},
"publishConfig": {
"access": "public"
},
"gitHead": "0bda51183baa23306342af32a82012ea0fe0f2dc"
}
@@ -0,0 +1,13 @@
import type { DeepRequired } from '@dnd-kit/utilities';
import type { DataRef } from '../../store/types';
import { KeyboardSensor, PointerSensor } from '../../sensors';
import type { MeasuringConfiguration } from './types';
export declare const defaultSensors: ({
sensor: typeof PointerSensor;
options: {};
} | {
sensor: typeof KeyboardSensor;
options: {};
})[];
export declare const defaultData: DataRef;
export declare const defaultMeasuringConfiguration: DeepRequired<MeasuringConfiguration>;
@@ -0,0 +1,62 @@
/**
* @fileoverview Rule to flag when using constructor for wrapper objects
* @author Ilya Volodin
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const { getVariableByName } = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description:
"Disallow `new` operators with the `String`, `Number`, and `Boolean` objects",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-new-wrappers",
},
schema: [],
messages: {
noConstructor: "Do not use {{fn}} as a constructor.",
},
},
create(context) {
const { sourceCode } = context;
return {
NewExpression(node) {
const wrapperObjects = ["String", "Number", "Boolean"];
const { name } = node.callee;
if (wrapperObjects.includes(name)) {
const variable = getVariableByName(
sourceCode.getScope(node),
name,
);
if (variable && variable.identifiers.length === 0) {
context.report({
node,
messageId: "noConstructor",
data: { fn: name },
});
}
}
},
};
},
};
@@ -0,0 +1,23 @@
let Declaration = require('../declaration')
class TextDecorationSkipInk extends Declaration {
/**
* Change prefix for ink value
*/
set(decl, prefix) {
if (decl.prop === 'text-decoration-skip-ink' && decl.value === 'auto') {
decl.prop = prefix + 'text-decoration-skip'
decl.value = 'ink'
return decl
} else {
return super.set(decl, prefix)
}
}
}
TextDecorationSkipInk.names = [
'text-decoration-skip-ink',
'text-decoration-skip'
]
module.exports = TextDecorationSkipInk
@@ -0,0 +1,600 @@
beforeEach(() => {
jest.resetModules();
});
describe("fileMatchSize()", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("should return true if the file object doesn't have a {size} property", () => {
expect(utils.fileMatchSize({})).toEqual([true, null]);
expect(utils.fileMatchSize({ size: null })).toEqual([true, null]);
});
it("should return true if the minSize and maxSize were not provided", () => {
expect(utils.fileMatchSize({ size: 100 })).toEqual([true, null]);
expect(utils.fileMatchSize({ size: 100 }, undefined, undefined)).toEqual([
true,
null,
]);
expect(utils.fileMatchSize({ size: 100 }, null, null)).toEqual([
true,
null,
]);
});
it("should return true if the file {size} is within the [minSize, maxSize] range", () => {
expect(utils.fileMatchSize({ size: 100 }, 10, 200)).toEqual([true, null]);
expect(utils.fileMatchSize({ size: 100 }, 10, 99)).toEqual([
false,
{ code: "file-too-large", message: "File is larger than 99 bytes" },
]);
expect(utils.fileMatchSize({ size: 100 }, 101, 200)).toEqual([
false,
{ code: "file-too-small", message: "File is smaller than 101 bytes" },
]);
});
it("should return true if the file {size} is more than minSize", () => {
expect(utils.fileMatchSize({ size: 100 }, 100)).toEqual([true, null]);
expect(utils.fileMatchSize({ size: 100 }, 101)).toEqual([
false,
{ code: "file-too-small", message: "File is smaller than 101 bytes" },
]);
});
it("should return true if the file {size} is less than maxSize", () => {
expect(utils.fileMatchSize({ size: 100 }, undefined, 100)).toEqual([
true,
null,
]);
expect(utils.fileMatchSize({ size: 100 }, null, 100)).toEqual([true, null]);
expect(utils.fileMatchSize({ size: 100 }, undefined, 99)).toEqual([
false,
{ code: "file-too-large", message: "File is larger than 99 bytes" },
]);
expect(utils.fileMatchSize({ size: 100 }, null, 99)).toEqual([
false,
{ code: "file-too-large", message: "File is larger than 99 bytes" },
]);
});
});
describe("isIeOrEdge", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("should return true for IE10", () => {
const userAgent =
"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)";
expect(utils.isIeOrEdge(userAgent)).toBe(true);
});
it("should return true for IE11", () => {
const userAgent =
"Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; rv:11.0) like Gecko";
expect(utils.isIeOrEdge(userAgent)).toBe(true);
});
it("should return true for Edge", () => {
const userAgent =
"Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16258";
expect(utils.isIeOrEdge(userAgent)).toBe(true);
});
it("should return false for Chrome", () => {
const userAgent =
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36";
expect(utils.isIeOrEdge(userAgent)).toBe(false);
});
});
describe("isKindFile()", () => {
it('should return true for DataTransferItem of kind "file"', async () => {
/**
* @constant
* @type {import('./index')}
*/
const utils = await import("./index");
expect(utils.isKindFile({ kind: "file" })).toBe(true);
expect(utils.isKindFile({ kind: "text/html" })).toBe(false);
expect(utils.isKindFile({})).toBe(false);
expect(utils.isKindFile(null)).toBe(false);
});
});
describe("isPropagationStopped()", () => {
const trueFn = jest.fn(() => true);
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("should return result of isPropagationStopped() if isPropagationStopped exists", () => {
expect(utils.isPropagationStopped({ isPropagationStopped: trueFn })).toBe(
true
);
});
it("should return value of cancelBubble if isPropagationStopped doesnt exist and cancelBubble exists", () => {
expect(utils.isPropagationStopped({ cancelBubble: true })).toBe(true);
});
it("should return false if isPropagationStopped and cancelBubble are missing", () => {
expect(utils.isPropagationStopped({})).toBe(false);
});
});
describe("isEvtWithFiles()", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("should return true if some dragged types are files", () => {
expect(utils.isEvtWithFiles({ dataTransfer: { types: ["Files"] } })).toBe(
true
);
expect(
utils.isEvtWithFiles({
dataTransfer: { types: ["application/x-moz-file"] },
})
).toBe(true);
expect(
utils.isEvtWithFiles({
dataTransfer: { types: ["Files", "application/x-moz-file"] },
})
).toBe(true);
expect(
utils.isEvtWithFiles({ dataTransfer: { types: ["text/plain"] } })
).toBe(false);
expect(
utils.isEvtWithFiles({ dataTransfer: { types: ["text/html"] } })
).toBe(false);
expect(
utils.isEvtWithFiles({
dataTransfer: { types: ["Files", "application/test"] },
})
).toBe(true);
expect(
utils.isEvtWithFiles({
dataTransfer: { types: ["application/x-moz-file", "application/test"] },
})
).toBe(true);
});
it("should return true if the event has a target with files", () => {
expect(utils.isEvtWithFiles({ target: { files: [] } })).toBe(true);
});
it("should return false otherwise", () => {
expect(utils.isEvtWithFiles({})).toBe(false);
});
});
describe("composeEventHandlers()", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("returns a fn", () => {
const fn = utils.composeEventHandlers(() => {});
expect(typeof fn).toBe("function");
});
it("runs every passed fn in order", () => {
const fn1 = jest.fn();
const fn2 = jest.fn();
const fn = utils.composeEventHandlers(fn1, fn2);
const event = { type: "click" };
const data = { ping: true };
fn(event, data);
expect(fn1).toHaveBeenCalledWith(event, data);
expect(fn2).toHaveBeenCalledWith(event, data);
});
it("stops after first fn that calls stopPropagation()", () => {
const fn1 = jest.fn().mockImplementation((event) => {
Object.defineProperty(event, "cancelBubble", { value: true });
return event;
});
const fn2 = jest.fn();
const fn = utils.composeEventHandlers(fn1, fn2);
const event = new MouseEvent("click");
fn(event);
expect(fn1).toHaveBeenCalledWith(event);
expect(fn2).not.toHaveBeenCalled();
});
it("stops before first fn if bubble is already canceled", () => {
const fn1 = jest.fn();
const fn2 = jest.fn();
const fn = utils.composeEventHandlers(fn1, fn2);
const event = new MouseEvent("click");
Object.defineProperty(event, "cancelBubble", { value: true });
fn(event);
expect(fn1).not.toHaveBeenCalled();
expect(fn2).not.toHaveBeenCalled();
});
});
describe("fileAccepted()", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("accepts bogus firefox file", () => {
const file = createFile("bogus.png", 100, "application/x-moz-file");
expect(utils.fileAccepted(file, ".pdf")).toEqual([true, null]);
});
it("accepts file when single accept criteria", () => {
const file = createFile("hamster.pdf", 100, "application/pdf");
expect(utils.fileAccepted(file, ".pdf")).toEqual([true, null]);
});
it("accepts file when multiple accept criteria", () => {
const file = createFile("hamster.pdf", 100, "application/pdf");
expect(utils.fileAccepted(file, ".pdf,.png")).toEqual([true, null]);
});
it("rejects file when single accept criteria", () => {
const file = createFile("hamster.pdf", 100, "application/pdf");
expect(utils.fileAccepted(file, ".png")).toEqual([
false,
{ code: "file-invalid-type", message: "File type must be .png" },
]);
});
it("rejects file when multiple accept criteria", () => {
const file = createFile("hamster.pdf", 100, "application/pdf");
expect(utils.fileAccepted(file, ".gif,.png")).toEqual([
false,
{
code: "file-invalid-type",
message: "File type must be one of .gif, .png",
},
]);
});
});
describe("getTooLargeRejectionErr()", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("prints byte when maxSize is 1", () => {
expect(utils.getTooLargeRejectionErr(1).message).toEqual(
"File is larger than 1 byte"
);
});
it("prints bytes when maxSize > 1", () => {
expect(utils.getTooLargeRejectionErr(100).message).toEqual(
"File is larger than 100 bytes"
);
});
});
describe("getTooSmallRejectionErr()", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("prints byte when minSize is 1", () => {
expect(utils.getTooSmallRejectionErr(1).message).toEqual(
"File is smaller than 1 byte"
);
});
it("prints bytes when minSize > 1", () => {
expect(utils.getTooSmallRejectionErr(100).message).toEqual(
"File is smaller than 100 bytes"
);
});
});
describe("allFilesAccepted()", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("rejects file when multiple accept criteria", () => {
const files = [
createFile("hamster.pdf", 100, "application/pdf"),
createFile("fish.pdf", 100, "application/pdf"),
];
const images = [
createFile("cats.gif", 1234, "image/gif"),
createFile("dogs.gif", 2345, "image/jpeg"),
];
expect(utils.allFilesAccepted({ files, multiple: true })).toEqual(true);
expect(
utils.allFilesAccepted({ files, multiple: true, maxFiles: 10 })
).toEqual(true);
expect(
utils.allFilesAccepted({ files, multiple: false, maxFiles: 10 })
).toEqual(false);
expect(
utils.allFilesAccepted({ files, multiple: true, accept: "image/jpeg" })
).toEqual(false);
expect(
utils.allFilesAccepted({
files: images,
multiple: true,
accept: "image/*",
})
).toEqual(true);
expect(
utils.allFilesAccepted({ files, multiple: true, minSize: 110 })
).toEqual(false);
expect(
utils.allFilesAccepted({ files, multiple: true, maxSize: 99 })
).toEqual(false);
expect(
utils.allFilesAccepted({ files, multiple: true, maxFiles: 1 })
).toEqual(false);
expect(
utils.allFilesAccepted({
files,
validator: () => ({ code: "not-allowed", message: "Cannot do this!" }),
})
).toEqual(false);
});
});
describe("ErrorCode", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("should exist and have known error code properties", () => {
expect(utils.ErrorCode.FileInvalidType).toEqual(utils.FILE_INVALID_TYPE);
expect(utils.ErrorCode.FileTooLarge).toEqual(utils.FILE_TOO_LARGE);
expect(utils.ErrorCode.FileTooSmall).toEqual(utils.FILE_TOO_SMALL);
expect(utils.ErrorCode.TooManyFiles).toEqual(utils.TOO_MANY_FILES);
});
});
describe("canUseFileSystemAccessAPI()", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("should return false if not", () => {
expect(utils.canUseFileSystemAccessAPI()).toBe(false);
});
it("should return true if yes", () => {
// TODO: If we use these in other tests, restore once test is done
window.showOpenFilePicker = jest.fn();
expect(utils.canUseFileSystemAccessAPI()).toBe(true);
});
});
describe("pickerOptionsFromAccept()", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("converts the {accept} prop to file picker options", () => {
expect(
utils.pickerOptionsFromAccept({
"image/*": [".png", ".jpg"], // ok
"text/*": [".txt", ".pdf"], // ok
"audio/*": ["mp3"], // not ok
"*": [".p12"], // not ok
})
).toEqual([
{
description: "Files",
accept: {
"image/*": [".png", ".jpg"],
"text/*": [".txt", ".pdf"],
},
},
]);
});
});
describe("acceptPropAsAcceptAttr()", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("converts {accept} to an array of strings", () => {
expect(
utils.acceptPropAsAcceptAttr({
"image/*": [".png", ".jpg"],
"text/*": [".txt", ".pdf"],
"audio/*": ["mp3"], // `mp3` not ok
"*": [".p12"], // `*` not ok
})
).toEqual("image/*,.png,.jpg,text/*,.txt,.pdf,audio/*,.p12");
});
});
describe("isMIMEType()", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("checks that the value is a valid MIME type string", () => {
expect(utils.isMIMEType("text/html")).toBe(true);
expect(utils.isMIMEType("text/*")).toBe(true);
expect(utils.isMIMEType("image/*")).toBe(true);
expect(utils.isMIMEType("video/*")).toBe(true);
expect(utils.isMIMEType("audio/*")).toBe(true);
expect(utils.isMIMEType("application/*")).toBe(true);
expect(utils.isMIMEType("test/*")).toBe(false);
expect(utils.isMIMEType("text")).toBe(false);
expect(utils.isMIMEType("")).toBe(false);
expect(utils.isMIMEType(undefined)).toBe(false);
});
});
describe("isExt()", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("checks that the value is a valid file extension", () => {
expect(utils.isExt(".jpg")).toBe(true);
expect(utils.isExt("me.jpg")).toBe(true);
expect(utils.isExt("me.prev.png")).toBe(true);
expect(utils.isExt("")).toBe(false);
expect(utils.isExt("text")).toBe(false);
expect(utils.isExt(undefined)).toBe(false);
});
});
describe("isAbort()", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("should work as expected", () => {
expect(utils.isAbort(new DOMException())).toBe(false);
expect(utils.isAbort(new DOMException("some err"))).toBe(false);
expect(utils.isAbort(new DOMException("some err", "Noop"))).toBe(false);
expect(utils.isAbort(new DOMException("some err", "AbortError"))).toBe(
true
);
const err = new DOMException("some err");
const e = new Proxy(err, {
get(t, p) {
if (p === "code") {
return 20;
}
return t[p];
},
});
expect(utils.isAbort(e)).toBe(true);
});
});
describe("isSecurityError()", () => {
/**
* @constant
* @type {import('./index')}
*/
let utils;
beforeEach(async () => {
utils = await import("./index");
});
it("should work as expected", () => {
expect(utils.isSecurityError(new DOMException())).toBe(false);
expect(utils.isSecurityError(new DOMException("some err"))).toBe(false);
expect(utils.isSecurityError(new DOMException("some err", "Noop"))).toBe(
false
);
expect(
utils.isSecurityError(new DOMException("some err", "SecurityError"))
).toBe(true);
const err = new DOMException("some err");
const e = new Proxy(err, {
get(t, p) {
if (p === "code") {
return 18;
}
return t[p];
},
});
expect(utils.isSecurityError(e)).toBe(true);
});
});
function createFile(name, size, type) {
const file = new File([], name, { type });
Object.defineProperty(file, "size", {
get() {
return size;
},
});
return file;
}
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=BaseGetPlanOptions.js.map
@@ -0,0 +1,207 @@
/**
* @file css
* @author junmer
*/
/* eslint-env node */
var _ = require('lodash');
var fs = require('fs');
var path = require('path');
var isTtf = require('is-ttf');
var through = require('through2');
var replaceExt = require('replace-ext');
var b2a = require('b3b').b2a;
/**
* tpl
*
* @type {string}
*/
var tpl = fs.readFileSync(
path.resolve(__dirname, '../lib/font-face.tpl')
).toString('utf-8');
/**
* renderCss
*
* @type {function}
*/
var renderCss = _.template(tpl);
/**
* listUnicode
*
* @param {Array} unicode unicode
* @return {string} unicode string
*/
function listUnicode(unicode) {
return unicode.map(function (u) {
return '\\' + u.toString(16);
}).join(',');
}
/**
* get glyf list from ttf obj
*
* @param {ttfObject} ttf ttfObject
* @return {Object} icon obj
*/
function getGlyfList(ttf) {
var glyfList = [];
// exclude empty glyf
var filtered = ttf.glyf.filter(function (g) {
return g.name !== '.notdef'
&& g.name !== '.null'
&& g.name !== 'nonmarkingreturn'
&& g.unicode && g.unicode.length;
});
// format glyf info
filtered.forEach(function (g) {
glyfList.push({
code: '&#x' + g.unicode[0].toString(16) + ';',
codeName: listUnicode(g.unicode),
name: g.name || 'uni' + g.unicode[0].toString(16)
});
});
return {
glyfList: glyfList
};
}
/**
* get font family name
*
* @param {Object} fontInfo font info object
* @param {ttfObject} ttf ttfObject
* @param {Object} opts opts
* @return {string} font family name
*/
function getFontFamily(fontInfo, ttf, opts) {
var fontFamily = opts.fontFamily;
// Call transform function
if (typeof fontFamily === 'function') {
fontFamily = fontFamily(_.cloneDeep(fontInfo), ttf);
}
return fontFamily || ttf.name.fontFamily || fontInfo.fontFile;
}
/**
* Transform font family name
* @callback FontFamilyTransform
* @param {Object} font info object
* @param {ttfObject} ttf ttfObject
* @return {string} font family name
*/
// function(fontInfo, ttfObject) { return "Font Name"; }
/**
* css fontmin plugin
*
* @param {Object} opts opts
* @param {boolean=} opts.glyph generate class for each glyph. default = false
* @param {boolean=} opts.base64 inject base64
* @param {string=} opts.iconPrefix icon prefix
* @param {string=} opts.filename set filename
* @param {(string|FontFamilyTransform)=} opts.fontFamily fontFamily
* @return {Object} stream.Transform instance
* @api public
*/
module.exports = function (opts) {
opts = opts || {};
return through.ctor({
objectMode: true
}, function (file, enc, cb) {
// check null
if (file.isNull()) {
cb(null, file);
return;
}
// check stream
if (file.isStream()) {
cb(new Error('Streaming is not supported'));
return;
}
// check ttf
if (!isTtf(file.contents)) {
cb(null, file);
return;
}
// clone
this.push(file.clone(false));
file.path = replaceExt(file.path, '.css');
var fontFile = opts.filename || path.basename(file.path, '.css');
// font data
var fontInfo = {
fontFile: fontFile,
fontPath: '',
base64: '',
glyph: false,
iconPrefix: 'icon',
local: false
};
// opts
_.extend(fontInfo, opts);
// ttf obj
var ttfObject = file.ttfObject || {
name: {}
};
// glyph
if (opts.glyph && ttfObject.glyf) {
_.extend(
fontInfo,
getGlyfList(ttfObject)
);
}
// font family
fontInfo.fontFamily = getFontFamily(fontInfo, ttfObject, opts);
// rewrite font family as filename
if (opts.asFileName) {
fontInfo.fontFamily = fontFile;
}
// base64
if (opts.base64) {
fontInfo.base64 = ''
+ 'data:application/x-font-ttf;charset=utf-8;base64,'
+ b2a(file.contents);
}
// local
if (fontInfo.local === true) {
fontInfo.local = fontInfo.fontFamily;
}
// render
var output = _.attempt(function (data) {
return Buffer.from(renderCss(data));
}, fontInfo);
if (_.isError(output)) {
cb(output, file);
}
else {
file.contents = output;
cb(null, file);
}
});
};
@@ -0,0 +1,113 @@
/* Node.js 6.4.0 and up has full support */
var hasFullSupport = (function () {
try {
if (!Buffer.isEncoding('latin1')) {
return false
}
var buf = Buffer.alloc ? Buffer.alloc(4) : new Buffer(4)
buf.fill('ab', 'ucs2')
return (buf.toString('hex') === '61006200')
} catch (_) {
return false
}
}())
function isSingleByte (val) {
return (val.length === 1 && val.charCodeAt(0) < 256)
}
function fillWithNumber (buffer, val, start, end) {
if (start < 0 || end > buffer.length) {
throw new RangeError('Out of range index')
}
start = start >>> 0
end = end === undefined ? buffer.length : end >>> 0
if (end > start) {
buffer.fill(val, start, end)
}
return buffer
}
function fillWithBuffer (buffer, val, start, end) {
if (start < 0 || end > buffer.length) {
throw new RangeError('Out of range index')
}
if (end <= start) {
return buffer
}
start = start >>> 0
end = end === undefined ? buffer.length : end >>> 0
var pos = start
var len = val.length
while (pos <= (end - len)) {
val.copy(buffer, pos)
pos += len
}
if (pos !== end) {
val.copy(buffer, pos, 0, end - pos)
}
return buffer
}
function fill (buffer, val, start, end, encoding) {
if (hasFullSupport) {
return buffer.fill(val, start, end, encoding)
}
if (typeof val === 'number') {
return fillWithNumber(buffer, val, start, end)
}
if (typeof val === 'string') {
if (typeof start === 'string') {
encoding = start
start = 0
end = buffer.length
} else if (typeof end === 'string') {
encoding = end
end = buffer.length
}
if (encoding !== undefined && typeof encoding !== 'string') {
throw new TypeError('encoding must be a string')
}
if (encoding === 'latin1') {
encoding = 'binary'
}
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
throw new TypeError('Unknown encoding: ' + encoding)
}
if (val === '') {
return fillWithNumber(buffer, 0, start, end)
}
if (isSingleByte(val)) {
return fillWithNumber(buffer, val.charCodeAt(0), start, end)
}
val = new Buffer(val, encoding)
}
if (Buffer.isBuffer(val)) {
return fillWithBuffer(buffer, val, start, end)
}
// Other values (e.g. undefined, boolean, object) results in zero-fill
return fillWithNumber(buffer, 0, start, end)
}
module.exports = fill
@@ -0,0 +1,23 @@
const MS_IN_SECOND = 1e3;
const MS_IN_MINUTE = 6e4;
const MS_IN_HOUR = 36e5;
const MS_IN_DAY = 864e5;
const rangeOfUnits = [
"time",
"year",
"month",
"date",
"day",
"hour",
"minute",
"second",
"millisecond",
"utcOffset"
];
export {
MS_IN_DAY as M,
MS_IN_HOUR as a,
MS_IN_MINUTE as b,
MS_IN_SECOND as c,
rangeOfUnits as r
};
@@ -0,0 +1,34 @@
/**
* @import {State} from 'mdast-util-to-markdown'
* @import {Link} from 'mdast'
*/
import {toString} from 'mdast-util-to-string'
/**
* @param {Link} node
* @param {State} state
* @returns {boolean}
*/
export function formatLinkAsAutolink(node, state) {
const raw = toString(node)
return Boolean(
!state.options.resourceLink &&
// If there’s a url…
node.url &&
// And there’s a no title…
!node.title &&
// And the content of `node` is a single text node…
node.children &&
node.children.length === 1 &&
node.children[0].type === 'text' &&
// And if the url is the same as the content…
(raw === node.url || 'mailto:' + raw === node.url) &&
// And that starts w/ a protocol…
/^[a-z][a-z+.-]+:/i.test(node.url) &&
// And that doesn’t contain ASCII control codes (character escapes and
// references don’t work), space, or angle brackets…
!/[\0- <>\u007F]/.test(node.url)
)
}
@@ -0,0 +1,35 @@
/*
Fraction.js v5.0.0 10/1/2024
https://raw.org/article/rational-numbers-in-javascript/
Copyright (c) 2024, Robert Eisele (https://raw.org/)
Licensed under the MIT license.
*/
const Fraction = require('fraction.js');
function toFraction(frac) {
var map = {
'1:4': "¼",
'1:2': "½",
'3:4': "¾",
'1:7': "⅐",
'1:9': "⅑",
'1:10': "⅒",
'1:3': "⅓",
'2:3': "⅔",
'1:5': "⅕",
'2:5': "⅖",
'3:5': "⅗",
'4:5': "⅘",
'1:6': "⅙",
'5:6': "⅚",
'1:8': "⅛",
'3:8': "⅜",
'5:8': "⅝",
'7:8': "⅞"
};
return map[frac.n + ":" + frac.d] || frac.toFraction(false);
}
console.log(toFraction(Fraction(0.25))); // ¼
@@ -0,0 +1,6 @@
export var RangePatternType;
(function (RangePatternType) {
RangePatternType["startRange"] = "startRange";
RangePatternType["shared"] = "shared";
RangePatternType["endRange"] = "endRange";
})(RangePatternType || (RangePatternType = {}));
@@ -0,0 +1,7 @@
import type { TSchema, SchemaOptions } from '../schema/index.mjs';
import type { TFunction } from '../function/index.mjs';
import { type TTuple } from '../tuple/index.mjs';
import { type TNever } from '../never/index.mjs';
export type TParameters<Type extends TSchema> = (Type extends TFunction<infer Parameters extends TSchema[], infer _ReturnType extends TSchema> ? TTuple<Parameters> : TNever);
/** `[JavaScript]` Extracts the Parameters from the given Function type */
export declare function Parameters<Type extends TSchema>(schema: Type, options?: SchemaOptions): TParameters<Type>;
@@ -0,0 +1,30 @@
var baseGetTag = require('./_baseGetTag'),
isArray = require('./isArray'),
isObjectLike = require('./isObjectLike');
/** `Object#toString` result references. */
var stringTag = '[object String]';
/**
* Checks if `value` is classified as a `String` primitive or object.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
* @example
*
* _.isString('abc');
* // => true
*
* _.isString(1);
* // => false
*/
function isString(value) {
return typeof value == 'string' ||
(!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
}
module.exports = isString;
@@ -0,0 +1,174 @@
/**
* Copyright (c) 2017 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { IEvent } from 'common/EventEmitter';
import { CharData, IColor, ICoreTerminal, ITerminalOptions } from 'common/Types';
import { IBuffer } from 'common/buffer/Types';
import { IDisposable, Terminal as ITerminalApi } from '@xterm/xterm';
/**
* A portion of the public API that are implemented identially internally and simply passed through.
*/
type InternalPassthroughApis = Omit<ITerminalApi, 'buffer' | 'parser' | 'unicode' | 'modes' | 'writeln' | 'loadAddon'>;
export interface ITerminal extends InternalPassthroughApis, ICoreTerminal {
screenElement: HTMLElement | undefined;
browser: IBrowser;
buffer: IBuffer;
linkifier: ILinkifier2 | undefined;
viewport: IViewport | undefined;
options: Required<ITerminalOptions>;
onBlur: IEvent<void>;
onFocus: IEvent<void>;
onA11yChar: IEvent<string>;
onA11yTab: IEvent<number>;
onWillOpen: IEvent<HTMLElement>;
cancel(ev: Event, force?: boolean): boolean | void;
}
export type CustomKeyEventHandler = (event: KeyboardEvent) => boolean;
export type CustomWheelEventHandler = (event: WheelEvent) => boolean;
export type LineData = CharData[];
export interface ICompositionHelper {
readonly isComposing: boolean;
compositionstart(): void;
compositionupdate(ev: CompositionEvent): void;
compositionend(): void;
updateCompositionElements(dontRecurse?: boolean): void;
keydown(ev: KeyboardEvent): boolean;
}
export interface IBrowser {
isNode: boolean;
userAgent: string;
platform: string;
isFirefox: boolean;
isMac: boolean;
isIpad: boolean;
isIphone: boolean;
isWindows: boolean;
}
export interface IColorSet {
foreground: IColor;
background: IColor;
cursor: IColor;
cursorAccent: IColor;
selectionForeground: IColor | undefined;
selectionBackgroundTransparent: IColor;
/** The selection blended on top of background. */
selectionBackgroundOpaque: IColor;
selectionInactiveBackgroundTransparent: IColor;
selectionInactiveBackgroundOpaque: IColor;
ansi: IColor[];
/** Maps original colors to colors that respect minimum contrast ratio. */
contrastCache: IColorContrastCache;
/** Maps original colors to colors that respect _half_ of the minimum contrast ratio. */
halfContrastCache: IColorContrastCache;
}
export type ReadonlyColorSet = Readonly<Omit<IColorSet, 'ansi'>> & { ansi: Readonly<Pick<IColorSet, 'ansi'>['ansi']> };
export interface IColorContrastCache {
clear(): void;
setCss(bg: number, fg: number, value: string | null): void;
getCss(bg: number, fg: number): string | null | undefined;
setColor(bg: number, fg: number, value: IColor | null): void;
getColor(bg: number, fg: number): IColor | null | undefined;
}
export interface IPartialColorSet {
foreground: IColor;
background: IColor;
cursor?: IColor;
cursorAccent?: IColor;
selectionBackground?: IColor;
ansi: IColor[];
}
export interface IViewport extends IDisposable {
scrollBarWidth: number;
readonly onRequestScrollLines: IEvent<{ amount: number, suppressScrollEvent: boolean }>;
syncScrollArea(immediate?: boolean, force?: boolean): void;
getLinesScrolled(ev: WheelEvent): number;
getBufferElements(startLine: number, endLine?: number): { bufferElements: HTMLElement[], cursorElement?: HTMLElement };
handleWheel(ev: WheelEvent): boolean;
handleTouchStart(ev: TouchEvent): void;
handleTouchMove(ev: TouchEvent): boolean;
scrollLines(disp: number): void; // todo api name?
reset(): void;
}
export interface ILinkifierEvent {
x1: number;
y1: number;
x2: number;
y2: number;
cols: number;
fg: number | undefined;
}
interface ILinkState {
decorations: ILinkDecorations;
isHovered: boolean;
}
export interface ILinkWithState {
link: ILink;
state?: ILinkState;
}
export interface ILinkifier2 extends IDisposable {
onShowLinkUnderline: IEvent<ILinkifierEvent>;
onHideLinkUnderline: IEvent<ILinkifierEvent>;
readonly currentLink: ILinkWithState | undefined;
}
interface ILink {
range: IBufferRange;
text: string;
decorations?: ILinkDecorations;
activate(event: MouseEvent, text: string): void;
hover?(event: MouseEvent, text: string): void;
leave?(event: MouseEvent, text: string): void;
dispose?(): void;
}
interface ILinkDecorations {
pointerCursor: boolean;
underline: boolean;
}
interface IBufferRange {
start: IBufferCellPosition;
end: IBufferCellPosition;
}
interface IBufferCellPosition {
x: number;
y: number;
}
export type CharacterJoinerHandler = (text: string) => [number, number][];
export interface ICharacterJoiner {
id: number;
handler: CharacterJoinerHandler;
}
export interface IRenderDebouncer extends IDisposable {
refresh(rowStart: number | undefined, rowEnd: number | undefined, rowCount: number): void;
}
export interface IRenderDebouncerWithCallback extends IRenderDebouncer {
addRefreshCallback(callback: FrameRequestCallback): number;
}
export interface IBufferElementProvider {
provideBufferElements(): DocumentFragment | HTMLElement;
}
@@ -0,0 +1,658 @@
# yauzl
[![Build Status](https://travis-ci.org/thejoshwolfe/yauzl.svg?branch=master)](https://travis-ci.org/thejoshwolfe/yauzl)
[![Coverage Status](https://img.shields.io/coveralls/thejoshwolfe/yauzl.svg)](https://coveralls.io/r/thejoshwolfe/yauzl)
yet another unzip library for node. For zipping, see
[yazl](https://github.com/thejoshwolfe/yazl).
Design principles:
* Follow the spec.
Don't scan for local file headers.
Read the central directory for file metadata.
(see [No Streaming Unzip API](#no-streaming-unzip-api)).
* Don't block the JavaScript thread.
Use and provide async APIs.
* Keep memory usage under control.
Don't attempt to buffer entire files in RAM at once.
* Never crash (if used properly).
Don't let malformed zip files bring down client applications who are trying to catch errors.
* Catch unsafe file names.
See `validateFileName()`.
## Usage
```js
var yauzl = require("yauzl");
yauzl.open("path/to/file.zip", {lazyEntries: true}, function(err, zipfile) {
if (err) throw err;
zipfile.readEntry();
zipfile.on("entry", function(entry) {
if (/\/$/.test(entry.fileName)) {
// Directory file names end with '/'.
// Note that entries for directories themselves are optional.
// An entry's fileName implicitly requires its parent directories to exist.
zipfile.readEntry();
} else {
// file entry
zipfile.openReadStream(entry, function(err, readStream) {
if (err) throw err;
readStream.on("end", function() {
zipfile.readEntry();
});
readStream.pipe(somewhere);
});
}
});
});
```
See also `examples/` for more usage examples.
## API
The default for every optional `callback` parameter is:
```js
function defaultCallback(err) {
if (err) throw err;
}
```
### open(path, [options], [callback])
Calls `fs.open(path, "r")` and reads the `fd` effectively the same as `fromFd()` would.
`options` may be omitted or `null`. The defaults are `{autoClose: true, lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`.
`autoClose` is effectively equivalent to:
```js
zipfile.once("end", function() {
zipfile.close();
});
```
`lazyEntries` indicates that entries should be read only when `readEntry()` is called.
If `lazyEntries` is `false`, `entry` events will be emitted as fast as possible to allow `pipe()`ing
file data from all entries in parallel.
This is not recommended, as it can lead to out of control memory usage for zip files with many entries.
See [issue #22](https://github.com/thejoshwolfe/yauzl/issues/22).
If `lazyEntries` is `true`, an `entry` or `end` event will be emitted in response to each call to `readEntry()`.
This allows processing of one entry at a time, and will keep memory usage under control for zip files with many entries.
`decodeStrings` is the default and causes yauzl to decode strings with `CP437` or `UTF-8` as required by the spec.
The exact effects of turning this option off are:
* `zipfile.comment`, `entry.fileName`, and `entry.fileComment` will be `Buffer` objects instead of `String`s.
* Any Info-ZIP Unicode Path Extra Field will be ignored. See `extraFields`.
* Automatic file name validation will not be performed. See `validateFileName()`.
`validateEntrySizes` is the default and ensures that an entry's reported uncompressed size matches its actual uncompressed size.
This check happens as early as possible, which is either before emitting each `"entry"` event (for entries with no compression),
or during the `readStream` piping after calling `openReadStream()`.
See `openReadStream()` for more information on defending against zip bomb attacks.
When `strictFileNames` is `false` (the default) and `decodeStrings` is `true`,
all backslash (`\`) characters in each `entry.fileName` are replaced with forward slashes (`/`).
The spec forbids file names with backslashes,
but Microsoft's `System.IO.Compression.ZipFile` class in .NET versions 4.5.0 until 4.6.1
creates non-conformant zipfiles with backslashes in file names.
`strictFileNames` is `false` by default so that clients can read these
non-conformant zipfiles without knowing about this Microsoft-specific bug.
When `strictFileNames` is `true` and `decodeStrings` is `true`,
entries with backslashes in their file names will result in an error. See `validateFileName()`.
When `decodeStrings` is `false`, `strictFileNames` has no effect.
The `callback` is given the arguments `(err, zipfile)`.
An `err` is provided if the End of Central Directory Record cannot be found, or if its metadata appears malformed.
This kind of error usually indicates that this is not a zip file.
Otherwise, `zipfile` is an instance of `ZipFile`.
### fromFd(fd, [options], [callback])
Reads from the fd, which is presumed to be an open .zip file.
Note that random access is required by the zip file specification,
so the fd cannot be an open socket or any other fd that does not support random access.
`options` may be omitted or `null`. The defaults are `{autoClose: false, lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`.
See `open()` for the meaning of the options and callback.
### fromBuffer(buffer, [options], [callback])
Like `fromFd()`, but reads from a RAM buffer instead of an open file.
`buffer` is a `Buffer`.
If a `ZipFile` is acquired from this method,
it will never emit the `close` event,
and calling `close()` is not necessary.
`options` may be omitted or `null`. The defaults are `{lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`.
See `open()` for the meaning of the options and callback.
The `autoClose` option is ignored for this method.
### fromRandomAccessReader(reader, totalSize, [options], [callback])
This method of reading a zip file allows clients to implement their own back-end file system.
For example, a client might translate read calls into network requests.
The `reader` parameter must be of a type that is a subclass of
[RandomAccessReader](#class-randomaccessreader) that implements the required methods.
The `totalSize` is a Number and indicates the total file size of the zip file.
`options` may be omitted or `null`. The defaults are `{autoClose: true, lazyEntries: false, decodeStrings: true, validateEntrySizes: true, strictFileNames: false}`.
See `open()` for the meaning of the options and callback.
### dosDateTimeToDate(date, time)
Converts MS-DOS `date` and `time` data into a JavaScript `Date` object.
Each parameter is a `Number` treated as an unsigned 16-bit integer.
Note that this format does not support timezones,
so the returned object will use the local timezone.
### validateFileName(fileName)
Returns `null` or a `String` error message depending on the validity of `fileName`.
If `fileName` starts with `"/"` or `/[A-Za-z]:\//` or if it contains `".."` path segments or `"\\"`,
this function returns an error message appropriate for use like this:
```js
var errorMessage = yauzl.validateFileName(fileName);
if (errorMessage != null) throw new Error(errorMessage);
```
This function is automatically run for each entry, as long as `decodeStrings` is `true`.
See `open()`, `strictFileNames`, and `Event: "entry"` for more information.
### Class: ZipFile
The constructor for the class is not part of the public API.
Use `open()`, `fromFd()`, `fromBuffer()`, or `fromRandomAccessReader()` instead.
#### Event: "entry"
Callback gets `(entry)`, which is an `Entry`.
See `open()` and `readEntry()` for when this event is emitted.
If `decodeStrings` is `true`, entries emitted via this event have already passed file name validation.
See `validateFileName()` and `open()` for more information.
If `validateEntrySizes` is `true` and this entry's `compressionMethod` is `0` (stored without compression),
this entry has already passed entry size validation.
See `open()` for more information.
#### Event: "end"
Emitted after the last `entry` event has been emitted.
See `open()` and `readEntry()` for more info on when this event is emitted.
#### Event: "close"
Emitted after the fd is actually closed.
This is after calling `close()` (or after the `end` event when `autoClose` is `true`),
and after all stream pipelines created from `openReadStream()` have finished reading data from the fd.
If this `ZipFile` was acquired from `fromRandomAccessReader()`,
the "fd" in the previous paragraph refers to the `RandomAccessReader` implemented by the client.
If this `ZipFile` was acquired from `fromBuffer()`, this event is never emitted.
#### Event: "error"
Emitted in the case of errors with reading the zip file.
(Note that other errors can be emitted from the streams created from `openReadStream()` as well.)
After this event has been emitted, no further `entry`, `end`, or `error` events will be emitted,
but the `close` event may still be emitted.
#### readEntry()
Causes this `ZipFile` to emit an `entry` or `end` event (or an `error` event).
This method must only be called when this `ZipFile` was created with the `lazyEntries` option set to `true` (see `open()`).
When this `ZipFile` was created with the `lazyEntries` option set to `true`,
`entry` and `end` events are only ever emitted in response to this method call.
The event that is emitted in response to this method will not be emitted until after this method has returned,
so it is safe to call this method before attaching event listeners.
After calling this method, calling this method again before the response event has been emitted will cause undefined behavior.
Calling this method after the `end` event has been emitted will cause undefined behavior.
Calling this method after calling `close()` will cause undefined behavior.
#### openReadStream(entry, [options], callback)
`entry` must be an `Entry` object from this `ZipFile`.
`callback` gets `(err, readStream)`, where `readStream` is a `Readable Stream` that provides the file data for this entry.
If this zipfile is already closed (see `close()`), the `callback` will receive an `err`.
`options` may be omitted or `null`, and has the following defaults:
```js
{
decompress: entry.isCompressed() ? true : null,
decrypt: null,
start: 0, // actually the default is null, see below
end: entry.compressedSize, // actually the default is null, see below
}
```
If the entry is compressed (with a supported compression method),
and the `decompress` option is `true` (or omitted),
the read stream provides the decompressed data.
Omitting the `decompress` option is what most clients should do.
The `decompress` option must be `null` (or omitted) when the entry is not compressed (see `isCompressed()`),
and either `true` (or omitted) or `false` when the entry is compressed.
Specifying `decompress: false` for a compressed entry causes the read stream
to provide the raw compressed file data without going through a zlib inflate transform.
If the entry is encrypted (see `isEncrypted()`), clients may want to avoid calling `openReadStream()` on the entry entirely.
Alternatively, clients may call `openReadStream()` for encrypted entries and specify `decrypt: false`.
If the entry is also compressed, clients must *also* specify `decompress: false`.
Specifying `decrypt: false` for an encrypted entry causes the read stream to provide the raw, still-encrypted file data.
(This data includes the 12-byte header described in the spec.)
The `decrypt` option must be `null` (or omitted) for non-encrypted entries, and `false` for encrypted entries.
Omitting the `decrypt` option (or specifying it as `null`) for an encrypted entry
will result in the `callback` receiving an `err`.
This default behavior is so that clients not accounting for encrypted files aren't surprised by bogus file data.
The `start` (inclusive) and `end` (exclusive) options are byte offsets into this entry's file data,
and can be used to obtain part of an entry's file data rather than the whole thing.
If either of these options are specified and non-`null`,
then the above options must be used to obain the file's raw data.
Specifying `{start: 0, end: entry.compressedSize}` will result in the complete file,
which is effectively the default values for these options,
but note that unlike omitting the options, when you specify `start` or `end` as any non-`null` value,
the above requirement is still enforced that you must also pass the appropriate options to get the file's raw data.
It's possible for the `readStream` provided to the `callback` to emit errors for several reasons.
For example, if zlib cannot decompress the data, the zlib error will be emitted from the `readStream`.
Two more error cases (when `validateEntrySizes` is `true`) are if the decompressed data has too many
or too few actual bytes compared to the reported byte count from the entry's `uncompressedSize` field.
yauzl notices this false information and emits an error from the `readStream`
after some number of bytes have already been piped through the stream.
This check allows clients to trust the `uncompressedSize` field in `Entry` objects.
Guarding against [zip bomb](http://en.wikipedia.org/wiki/Zip_bomb) attacks can be accomplished by
doing some heuristic checks on the size metadata and then watching out for the above errors.
Such heuristics are outside the scope of this library,
but enforcing the `uncompressedSize` is implemented here as a security feature.
It is possible to destroy the `readStream` before it has piped all of its data.
To do this, call `readStream.destroy()`.
You must `unpipe()` the `readStream` from any destination before calling `readStream.destroy()`.
If this zipfile was created using `fromRandomAccessReader()`, the `RandomAccessReader` implementation
must provide readable streams that implement a `.destroy()` method (see `randomAccessReader._readStreamForRange()`)
in order for calls to `readStream.destroy()` to work in this context.
#### close()
Causes all future calls to `openReadStream()` to fail,
and closes the fd, if any, after all streams created by `openReadStream()` have emitted their `end` events.
If the `autoClose` option is set to `true` (see `open()`),
this function will be called automatically effectively in response to this object's `end` event.
If the `lazyEntries` option is set to `false` (see `open()`) and this object's `end` event has not been emitted yet,
this function causes undefined behavior.
If the `lazyEntries` option is set to `true`,
you can call this function instead of calling `readEntry()` to abort reading the entries of a zipfile.
It is safe to call this function multiple times; after the first call, successive calls have no effect.
This includes situations where the `autoClose` option effectively calls this function for you.
If `close()` is never called, then the zipfile is "kept open".
For zipfiles created with `fromFd()`, this will leave the `fd` open, which may be desirable.
For zipfiles created with `open()`, this will leave the underlying `fd` open, thereby "leaking" it, which is probably undesirable.
For zipfiles created with `fromRandomAccessReader()`, the reader's `close()` method will never be called.
For zipfiles created with `fromBuffer()`, the `close()` function has no effect whether called or not.
Regardless of how this `ZipFile` was created, there are no resources other than those listed above that require cleanup from this function.
This means it may be desirable to never call `close()` in some usecases.
#### isOpen
`Boolean`. `true` until `close()` is called; then it's `false`.
#### entryCount
`Number`. Total number of central directory records.
#### comment
`String`. Always decoded with `CP437` per the spec.
If `decodeStrings` is `false` (see `open()`), this field is the undecoded `Buffer` instead of a decoded `String`.
### Class: Entry
Objects of this class represent Central Directory Records.
Refer to the zipfile specification for more details about these fields.
These fields are of type `Number`:
* `versionMadeBy`
* `versionNeededToExtract`
* `generalPurposeBitFlag`
* `compressionMethod`
* `lastModFileTime` (MS-DOS format, see `getLastModDateTime`)
* `lastModFileDate` (MS-DOS format, see `getLastModDateTime`)
* `crc32`
* `compressedSize`
* `uncompressedSize`
* `fileNameLength` (bytes)
* `extraFieldLength` (bytes)
* `fileCommentLength` (bytes)
* `internalFileAttributes`
* `externalFileAttributes`
* `relativeOffsetOfLocalHeader`
#### fileName
`String`.
Following the spec, the bytes for the file name are decoded with
`UTF-8` if `generalPurposeBitFlag & 0x800`, otherwise with `CP437`.
Alternatively, this field may be populated from the Info-ZIP Unicode Path Extra Field
(see `extraFields`).
This field is automatically validated by `validateFileName()` before yauzl emits an "entry" event.
If this field would contain unsafe characters, yauzl emits an error instead of an entry.
If `decodeStrings` is `false` (see `open()`), this field is the undecoded `Buffer` instead of a decoded `String`.
Therefore, `generalPurposeBitFlag` and any Info-ZIP Unicode Path Extra Field are ignored.
Furthermore, no automatic file name validation is performed for this file name.
#### extraFields
`Array` with each entry in the form `{id: id, data: data}`,
where `id` is a `Number` and `data` is a `Buffer`.
This library looks for and reads the ZIP64 Extended Information Extra Field (0x0001)
in order to support ZIP64 format zip files.
This library also looks for and reads the Info-ZIP Unicode Path Extra Field (0x7075)
in order to support some zipfiles that use it instead of General Purpose Bit 11
to convey `UTF-8` file names.
When the field is identified and verified to be reliable (see the zipfile spec),
the the file name in this field is stored in the `fileName` property,
and the file name in the central directory record for this entry is ignored.
Note that when `decodeStrings` is false, all Info-ZIP Unicode Path Extra Fields are ignored.
None of the other fields are considered significant by this library.
Fields that this library reads are left unalterned in the `extraFields` array.
#### fileComment
`String` decoded with the charset indicated by `generalPurposeBitFlag & 0x800` as with the `fileName`.
(The Info-ZIP Unicode Path Extra Field has no effect on the charset used for this field.)
If `decodeStrings` is `false` (see `open()`), this field is the undecoded `Buffer` instead of a decoded `String`.
Prior to yauzl version 2.7.0, this field was erroneously documented as `comment` instead of `fileComment`.
For compatibility with any code that uses the field name `comment`,
yauzl creates an alias field named `comment` which is identical to `fileComment`.
#### getLastModDate()
Effectively implemented as:
```js
return dosDateTimeToDate(this.lastModFileDate, this.lastModFileTime);
```
#### isEncrypted()
Returns is this entry encrypted with "Traditional Encryption".
Effectively implemented as:
```js
return (this.generalPurposeBitFlag & 0x1) !== 0;
```
See `openReadStream()` for the implications of this value.
Note that "Strong Encryption" is not supported, and will result in an `"error"` event emitted from the `ZipFile`.
#### isCompressed()
Effectively implemented as:
```js
return this.compressionMethod === 8;
```
See `openReadStream()` for the implications of this value.
### Class: RandomAccessReader
This class is meant to be subclassed by clients and instantiated for the `fromRandomAccessReader()` function.
An example implementation can be found in `test/test.js`.
#### randomAccessReader._readStreamForRange(start, end)
Subclasses *must* implement this method.
`start` and `end` are Numbers and indicate byte offsets from the start of the file.
`end` is exclusive, so `_readStreamForRange(0x1000, 0x2000)` would indicate to read `0x1000` bytes.
`end - start` will always be at least `1`.
This method should return a readable stream which will be `pipe()`ed into another stream.
It is expected that the readable stream will provide data in several chunks if necessary.
If the readable stream provides too many or too few bytes, an error will be emitted.
(Note that `validateEntrySizes` has no effect on this check,
because this is a low-level API that should behave correctly regardless of the contents of the file.)
Any errors emitted on the readable stream will be handled and re-emitted on the client-visible stream
(returned from `zipfile.openReadStream()`) or provided as the `err` argument to the appropriate callback
(for example, for `fromRandomAccessReader()`).
The returned stream *must* implement a method `.destroy()`
if you call `readStream.destroy()` on streams you get from `openReadStream()`.
If you never call `readStream.destroy()`, then streams returned from this method do not need to implement a method `.destroy()`.
`.destroy()` should abort any streaming that is in progress and clean up any associated resources.
`.destroy()` will only be called after the stream has been `unpipe()`d from its destination.
Note that the stream returned from this method might not be the same object that is provided by `openReadStream()`.
The stream returned from this method might be `pipe()`d through one or more filter streams (for example, a zlib inflate stream).
#### randomAccessReader.read(buffer, offset, length, position, callback)
Subclasses may implement this method.
The default implementation uses `createReadStream()` to fill the `buffer`.
This method should behave like `fs.read()`.
#### randomAccessReader.close(callback)
Subclasses may implement this method.
The default implementation is effectively `setImmediate(callback);`.
`callback` takes parameters `(err)`.
This method is called once the all streams returned from `_readStreamForRange()` have ended,
and no more `_readStreamForRange()` or `read()` requests will be issued to this object.
## How to Avoid Crashing
When a malformed zipfile is encountered, the default behavior is to crash (throw an exception).
If you want to handle errors more gracefully than this,
be sure to do the following:
* Provide `callback` parameters where they are allowed, and check the `err` parameter.
* Attach a listener for the `error` event on any `ZipFile` object you get from `open()`, `fromFd()`, `fromBuffer()`, or `fromRandomAccessReader()`.
* Attach a listener for the `error` event on any stream you get from `openReadStream()`.
Minor version updates to yauzl will not add any additional requirements to this list.
## Limitations
### No Streaming Unzip API
Due to the design of the .zip file format, it's impossible to interpret a .zip file from start to finish
(such as from a readable stream) without sacrificing correctness.
The Central Directory, which is the authority on the contents of the .zip file, is at the end of a .zip file, not the beginning.
A streaming API would need to either buffer the entire .zip file to get to the Central Directory before interpreting anything
(defeating the purpose of a streaming interface), or rely on the Local File Headers which are interspersed through the .zip file.
However, the Local File Headers are explicitly denounced in the spec as being unreliable copies of the Central Directory,
so trusting them would be a violation of the spec.
Any library that offers a streaming unzip API must make one of the above two compromises,
which makes the library either dishonest or nonconformant (usually the latter).
This library insists on correctness and adherence to the spec, and so does not offer a streaming API.
Here is a way to create a spec-conformant .zip file using the `zip` command line program (Info-ZIP)
available in most unix-like environments, that is (nearly) impossible to parse correctly with a streaming parser:
```
$ echo -ne '\x50\x4b\x07\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' > file.txt
$ zip -q0 - file.txt | cat > out.zip
```
This .zip file contains a single file entry that uses General Purpose Bit 3,
which means the Local File Header doesn't know the size of the file.
Any streaming parser that encounters this situation will either immediately fail,
or attempt to search for the Data Descriptor after the file's contents.
The file's contents is a sequence of 16-bytes crafted to exactly mimic a valid Data Descriptor for an empty file,
which will fool any parser that gets this far into thinking that the file is empty rather than containing 16-bytes.
What follows the file's real contents is the file's real Data Descriptor,
which will likely cause some kind of signature mismatch error for a streaming parser (if one hasn't occurred already).
By using General Purpose Bit 3 (and compression method 0),
it's possible to create arbitrarily ambiguous .zip files that
distract parsers with file contents that contain apparently valid .zip file metadata.
### Limitted ZIP64 Support
For ZIP64, only zip files smaller than `8PiB` are supported,
not the full `16EiB` range that a 64-bit integer should be able to index.
This is due to the JavaScript Number type being an IEEE 754 double precision float.
The Node.js `fs` module probably has this same limitation.
### ZIP64 Extensible Data Sector Is Ignored
The spec does not allow zip file creators to put arbitrary data here,
but rather reserves its use for PKWARE and mentions something about Z390.
This doesn't seem useful to expose in this library, so it is ignored.
### No Multi-Disk Archive Support
This library does not support multi-disk zip files.
The multi-disk fields in the zipfile spec were intended for a zip file to span multiple floppy disks,
which probably never happens now.
If the "number of this disk" field in the End of Central Directory Record is not `0`,
the `open()`, `fromFd()`, `fromBuffer()`, or `fromRandomAccessReader()` `callback` will receive an `err`.
By extension the following zip file fields are ignored by this library and not provided to clients:
* Disk where central directory starts
* Number of central directory records on this disk
* Disk number where file starts
### Limited Encryption Handling
You can detect when a file entry is encrypted with "Traditional Encryption" via `isEncrypted()`,
but yauzl will not help you decrypt it.
See `openReadStream()`.
If a zip file contains file entries encrypted with "Strong Encryption", yauzl emits an error.
If the central directory is encrypted or compressed, yauzl emits an error.
### Local File Headers Are Ignored
Many unzip libraries mistakenly read the Local File Header data in zip files.
This data is officially defined to be redundant with the Central Directory information,
and is not to be trusted.
Aside from checking the signature, yauzl ignores the content of the Local File Header.
### No CRC-32 Checking
This library provides the `crc32` field of `Entry` objects read from the Central Directory.
However, this field is not used for anything in this library.
### versionNeededToExtract Is Ignored
The field `versionNeededToExtract` is ignored,
because this library doesn't support the complete zip file spec at any version,
### No Support For Obscure Compression Methods
Regarding the `compressionMethod` field of `Entry` objects,
only method `0` (stored with no compression)
and method `8` (deflated) are supported.
Any of the other 15 official methods will cause the `openReadStream()` `callback` to receive an `err`.
### Data Descriptors Are Ignored
There may or may not be Data Descriptor sections in a zip file.
This library provides no support for finding or interpreting them.
### Archive Extra Data Record Is Ignored
There may or may not be an Archive Extra Data Record section in a zip file.
This library provides no support for finding or interpreting it.
### No Language Encoding Flag Support
Zip files officially support charset encodings other than CP437 and UTF-8,
but the zip file spec does not specify how it works.
This library makes no attempt to interpret the Language Encoding Flag.
## Change History
* 2.10.0
* Added support for non-conformant zipfiles created by Microsoft, and added option `strictFileNames` to disable the workaround. [issue #66](https://github.com/thejoshwolfe/yauzl/issues/66), [issue #88](https://github.com/thejoshwolfe/yauzl/issues/88)
* 2.9.2
* Removed `tools/hexdump-zip.js` and `tools/hex2bin.js`. Those tools are now located here: [thejoshwolfe/hexdump-zip](https://github.com/thejoshwolfe/hexdump-zip) and [thejoshwolfe/hex2bin](https://github.com/thejoshwolfe/hex2bin)
* Worked around performance problem with zlib when using `fromBuffer()` and `readStream.destroy()` for large compressed files. [issue #87](https://github.com/thejoshwolfe/yauzl/issues/87)
* 2.9.1
* Removed `console.log()` accidentally introduced in 2.9.0. [issue #64](https://github.com/thejoshwolfe/yauzl/issues/64)
* 2.9.0
* Throw an exception if `readEntry()` is called without `lazyEntries:true`. Previously this caused undefined behavior. [issue #63](https://github.com/thejoshwolfe/yauzl/issues/63)
* 2.8.0
* Added option `validateEntrySizes`. [issue #53](https://github.com/thejoshwolfe/yauzl/issues/53)
* Added `examples/promises.js`
* Added ability to read raw file data via `decompress` and `decrypt` options. [issue #11](https://github.com/thejoshwolfe/yauzl/issues/11), [issue #38](https://github.com/thejoshwolfe/yauzl/issues/38), [pull #39](https://github.com/thejoshwolfe/yauzl/pull/39)
* Added `start` and `end` options to `openReadStream()`. [issue #38](https://github.com/thejoshwolfe/yauzl/issues/38)
* 2.7.0
* Added option `decodeStrings`. [issue #42](https://github.com/thejoshwolfe/yauzl/issues/42)
* Fixed documentation for `entry.fileComment` and added compatibility alias. [issue #47](https://github.com/thejoshwolfe/yauzl/issues/47)
* 2.6.0
* Support Info-ZIP Unicode Path Extra Field, used by WinRAR for Chinese file names. [issue #33](https://github.com/thejoshwolfe/yauzl/issues/33)
* 2.5.0
* Ignore malformed Extra Field that is common in Android .apk files. [issue #31](https://github.com/thejoshwolfe/yauzl/issues/31)
* 2.4.3
* Fix crash when parsing malformed Extra Field buffers. [issue #31](https://github.com/thejoshwolfe/yauzl/issues/31)
* 2.4.2
* Remove .npmignore and .travis.yml from npm package.
* 2.4.1
* Fix error handling.
* 2.4.0
* Add ZIP64 support. [issue #6](https://github.com/thejoshwolfe/yauzl/issues/6)
* Add `lazyEntries` option. [issue #22](https://github.com/thejoshwolfe/yauzl/issues/22)
* Add `readStream.destroy()` method. [issue #26](https://github.com/thejoshwolfe/yauzl/issues/26)
* Add `fromRandomAccessReader()`. [issue #14](https://github.com/thejoshwolfe/yauzl/issues/14)
* Add `examples/unzip.js`.
* 2.3.1
* Documentation updates.
* 2.3.0
* Check that `uncompressedSize` is correct, or else emit an error. [issue #13](https://github.com/thejoshwolfe/yauzl/issues/13)
* 2.2.1
* Update dependencies.
* 2.2.0
* Update dependencies.
* 2.1.0
* Remove dependency on `iconv`.
* 2.0.3
* Fix crash when trying to read a 0-byte file.
* 2.0.2
* Fix event behavior after errors.
* 2.0.1
* Fix bug with using `iconv`.
* 2.0.0
* Initial release.
@@ -0,0 +1 @@
{"name":"media-typer","version":"1.1.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532089448,"integrity":"sha512-+IyFs5QMPLADKACdeObmS36zG8dC5LxDA/lNYJC38AK45Jlt/qsvNnstUeFrl4eSMtShFbSnY7R2JF0Bv0us7g==","mode":420,"size":925},"HISTORY.md":{"checkedAt":1794532089448,"integrity":"sha512-t+mE6iiE+atxj/H/MVHF9gliEAajDqkHLi+h2CuExM3VGlg86EooFZsM9FzbxgS1aO4q2QVg5sgnpmWrIXHK7w==","mode":420,"size":1155},"index.js":{"checkedAt":1794532089448,"integrity":"sha512-KOypSBNuJuenVEyuE+ZgQB0IjaKAbuJDTo6+lSsSZ2lOuw4KnLMpbtd3n7Tcmie1T1yKKuEpM0CLXAccDx1flg==","mode":420,"size":3090},"LICENSE":{"checkedAt":1794532089449,"integrity":"sha512-QOMBdEM0CODi7UbSQ3OxLe9H9UXZGDt7zijU3djIu1KAdcfyDhGPN2YdufG7o1iZnYGhRCXrPgpKIIZd/LUxgg==","mode":420,"size":1094},"README.md":{"checkedAt":1794532089449,"integrity":"sha512-//MpTW2ktKTOqY+fH2kQjzn3tP/cXKuzczR/K66/XlOh8B/rRkY8c41Y518BeQrOAR0loLWpbPjcg520+QLWDQ==","mode":420,"size":2992}}}
@@ -0,0 +1,147 @@
/**
* These are types for things that are present in the `experimental` builds of React but not yet
* on a stable build.
*
* Once they are promoted to stable they can just be moved to the main index file.
*
* To load the types declared here in an actual project, there are three ways. The easiest one,
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
* is to add `"react/experimental"` to the `"types"` array.
*
* Alternatively, a specific import syntax can to be used from a typescript file.
* This module does not exist in reality, which is why the {} is important:
*
* ```ts
* import {} from 'react/experimental'
* ```
*
* It is also possible to include it through a triple-slash reference:
*
* ```ts
* /// <reference types="react/experimental" />
* ```
*
* Either the import or the reference only needs to appear once, anywhere in the project.
*/
// See https://github.com/facebook/react/blob/master/packages/react/src/React.js to see how the exports are declared,
// and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are
// flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`.
//
// For the inputs of types exported as simply a fiber tag, the `beginWork` function of ReactFiberBeginWork.js
// is a good place to start looking for details; it generally calls prop validation functions or delegates
// all tasks done as part of the render phase (the concurrent part of the React update cycle).
//
// Suspense-related handling can be found in ReactFiberThrow.js.
import React = require("./canary");
export {};
declare const UNDEFINED_VOID_ONLY: unique symbol;
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
declare module "." {
export interface SuspenseProps {
// @enableCPUSuspense
/**
* The presence of this prop indicates that the content is computationally expensive to render.
* In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data).
* @see {@link https://github.com/facebook/react/pull/19936}
*/
defer?: boolean | undefined;
}
export type SuspenseListRevealOrder = "forwards" | "backwards" | "together" | "independent";
export type SuspenseListTailMode = "collapsed" | "hidden" | "visible";
export interface SuspenseListCommonProps {
}
interface DirectionalSuspenseListProps extends SuspenseListCommonProps {
/**
* Note that SuspenseList require more than one child;
* it is a runtime warning to provide only a single child.
*
* It does, however, allow those children to be wrapped inside a single
* level of `<React.Fragment>`.
*/
children: Iterable<ReactElement> | AsyncIterable<ReactElement>;
/**
* Defines the order in which the `SuspenseList` children should be revealed.
* @default "forwards"
*/
revealOrder?: "forwards" | "backwards" | "unstable_legacy-backwards" | undefined;
/**
* Dictates how unloaded items in a SuspenseList is shown.
*
* - `collapsed` shows only the next fallback in the list.
* - `hidden` doesn't show any unloaded items.
* - `visible` shows all fallbacks in the list.
*
* @default "hidden"
*/
tail?: SuspenseListTailMode | undefined;
}
interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps {
children: ReactNode;
/**
* Defines the order in which the `SuspenseList` children should be revealed.
*/
revealOrder: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]>;
/**
* The tail property is invalid when not using the `forwards` or `backwards` reveal orders.
*/
tail?: never;
}
export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps;
/**
* `SuspenseList` helps coordinate many components that can suspend by orchestrating the order
* in which these components are revealed to the user.
*
* When multiple components need to fetch data, this data may arrive in an unpredictable order.
* However, if you wrap these items in a `SuspenseList`, React will not show an item in the list
* until previous items have been displayed (this behavior is adjustable).
*
* @see https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist
* @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist
*/
export const unstable_SuspenseList: ExoticComponent<SuspenseListProps>;
type Reference = object;
type TaintableUniqueValue = string | bigint | ArrayBufferView;
function experimental_taintUniqueValue(
message: string | undefined,
lifetime: Reference,
value: TaintableUniqueValue,
): void;
function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
// @enableGestureTransition
// Implemented by the specific renderer e.g. `react-dom`.
// Keep in mind that augmented interfaces merge their JSDoc so if you put
// JSDoc here and in the renderer, the IDE will display both.
export interface GestureProvider {}
export interface GestureOptions {
rangeStart?: number | undefined;
rangeEnd?: number | undefined;
}
/** */
export function unstable_startGestureTransition(
provider: GestureProvider,
scope: () => void,
options?: GestureOptions,
): () => void;
// @enableSrcObject
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES {
srcObject: Blob;
}
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES {
srcObject: Blob | MediaSource | MediaStream;
}
}
@@ -0,0 +1,5 @@
import type { TSESLint } from '@typescript-eslint/utils';
export type Options = 'absolute-first' | 'disable-absolute-first';
export type MessageId = 'absolute' | 'order';
declare const _default: TSESLint.RuleModule<MessageId, [(Options | undefined)?], import("../utils/create-rule.ts").ImportXPluginDocs, TSESLint.RuleListener>;
export default _default;
@@ -0,0 +1 @@
{"version":3,"file":"manipulation.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["manipulation.ts"],"names":[],"mappings":";;AAQA,sCAcC;AASD,wCAiBC;AASD,kCAaC;AASD,wBAoBC;AASD,oCAaC;AASD,0BAiBC;AAjJD;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,IAAe;IACzC,IAAI,IAAI,CAAC,IAAI;QAAE,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IAC1C,IAAI,IAAI,CAAC,IAAI;QAAE,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IAE1C,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;QACpC,IAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,WAAW,IAAI,CAAC,EAAE,CAAC;YACnB,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QAClC,CAAC;IACL,CAAC;IACD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;AACvB,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,cAAc,CAAC,IAAe,EAAE,WAAsB;IAClE,IAAM,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,IAAI,IAAI,EAAE,CAAC;QACP,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IAC5B,CAAC;IAED,IAAM,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CA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C,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,CAAC"}
@@ -0,0 +1 @@
module.exports={C:{"78":0.04077,"115":0.08154,"117":0.03058,"132":0.01529,"140":0.0051,"141":0.1223,"142":0.0051,"143":0.35672,"144":2.22186,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 118 119 120 121 122 123 124 125 126 127 128 129 130 131 133 134 135 136 137 138 139 145 146 147 3.5 3.6"},D:{"41":0.0051,"42":0.01019,"43":0.0051,"44":0.0051,"45":0.0051,"46":0.0051,"48":0.0051,"49":0.0051,"52":0.0051,"53":0.0051,"54":0.0051,"55":0.0051,"56":0.0051,"57":0.0051,"58":0.0051,"59":0.0051,"60":0.01019,"83":0.0051,"86":0.01019,"87":0.0051,"89":0.0051,"90":0.0051,"91":0.0051,"92":0.0051,"93":0.01529,"95":0.0051,"96":0.0051,"97":0.02038,"98":0.39239,"99":0.14778,"103":0.08663,"109":0.49941,"113":0.0051,"116":0.08154,"120":0.03567,"121":0.01019,"122":0.05606,"123":0.0051,"125":0.93766,"126":0.06115,"127":0.0051,"128":0.02548,"129":0.18346,"130":0.0051,"131":0.09682,"132":0.01019,"133":0.02548,"134":0.06625,"135":0.04586,"136":0.13759,"137":0.05096,"138":0.29047,"139":0.43316,"140":4.9737,"141":12.64827,"142":0.09682,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 47 50 51 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 84 85 88 94 100 101 102 104 105 106 107 108 110 111 112 114 115 117 118 119 124 143 144 145"},F:{"83":0.01019,"84":0.01019,"90":0.0051,"118":0.01019,"120":0.01529,"121":0.21403,"122":1.0192,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 85 86 87 88 89 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"97":0.0051,"98":0.07644,"99":0.03058,"109":0.02038,"114":0.0051,"124":0.0051,"127":0.0051,"131":0.0051,"133":0.01019,"134":0.01019,"135":0.01529,"138":0.05096,"139":0.07644,"140":1.18737,"141":5.30494,"142":0.0051,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 120 121 122 123 125 126 128 129 130 132 136 137"},E:{"14":0.02548,_:"0 4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 12.1 26.2","11.1":0.01019,"13.1":0.04077,"14.1":0.02038,"15.1":0.01019,"15.2-15.3":0.01529,"15.4":0.01019,"15.5":0.01529,"15.6":0.2599,"16.0":0.0051,"16.1":0.02038,"16.2":0.02548,"16.3":0.15288,"16.4":0.06625,"16.5":0.1274,"16.6":0.54018,"17.0":0.03567,"17.1":0.44845,"17.2":0.06115,"17.3":0.03058,"17.4":0.15288,"17.5":0.16307,"17.6":1.47784,"18.0":0.02038,"18.1":0.05606,"18.2":0.02548,"18.3":0.19874,"18.4":0.06625,"18.5-18.6":0.32614,"26.0":0.68286,"26.1":0.01019},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00204,"5.0-5.1":0,"6.0-6.1":0.00815,"7.0-7.1":0.00612,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.01835,"10.0-10.2":0.00204,"10.3":0.03466,"11.0-11.2":0.51374,"11.3-11.4":0.01223,"12.0-12.1":0.00408,"12.2-12.5":0.09989,"13.0-13.1":0,"13.2":0.01019,"13.3":0.00408,"13.4-13.7":0.01631,"14.0-14.4":0.03466,"14.5-14.8":0.0367,"15.0-15.1":0.03466,"15.2-15.3":0.0265,"15.4":0.03058,"15.5":0.03466,"15.6-15.8":0.45258,"16.0":0.06116,"16.1":0.11417,"16.2":0.05912,"16.3":0.10601,"16.4":0.0265,"16.5":0.04689,"16.6-16.7":0.60548,"17.0":0.04281,"17.1":0.06524,"17.2":0.04689,"17.3":0.06931,"17.4":0.12232,"17.5":0.20998,"17.6-17.7":0.53005,"18.0":0.12028,"18.1":0.24872,"18.2":0.13455,"18.3":0.4322,"18.4":0.22221,"18.5-18.6":11.33091,"26.0":1.40056,"26.1":0.05097},P:{"4":0.10329,"21":0.08263,"23":0.03099,"24":0.01033,"25":0.01033,"26":0.01033,"27":0.01033,"28":3.86315,"29":0.33054,_:"20 22 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0.01958,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":0.11767,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.0051,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.31379},Q:{_:"14.9"},O:{"0":0.0049},H:{"0":0},L:{"0":25.73702}};
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var docEndnotesRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'rearnotes [EPUB-SSV]'
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [['doc-endnote']],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docEndnotesRole;
@@ -0,0 +1 @@
{"version":3,"file":"isPendingClassMetadata.spec.d.ts","sourceRoot":"","sources":["../../../../src/metadata/calculations/isPendingClassMetadata.spec.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,CAAC"}
@@ -0,0 +1,41 @@
// src/search.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var SearchIcon = (props) => /* @__PURE__ */ jsxs(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ jsx(
"path",
{
d: "M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "2"
}
),
/* @__PURE__ */ jsx(
"path",
{
d: "M22 22L20 20",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "2"
}
)
]
}
);
export {
SearchIcon
};
@@ -0,0 +1,825 @@
export default `flf2a$ 8 7 20 -1 7
COINSTAK by Ron Fritz 8/94
Figlet Release 2/0
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
O))@
O))@
O))@
O) @
O) @
@
O))@
@@
O) O)@
O) O)@
@
@
@
@
@
@@
@
O)) O)) @
O)))))) O))))@
O)) O)) @
O)) O)) @
O)))))) O))))@
O)) O)) @
@@
O)) @
O) O))@
O)) @
O)) @
O)) @
O)) O))@
O)) @
@@
@
O)) O)) @
O)) @
O)) @
O)) @
O)) @
O)) O)) @
@@
O) @
O)) O))@
O)) @
O))) @
O)) @
O)) O))@
O) @
@@
O))@
O)@
@
@
@
@
@
@@
O))@
O)) @
O)) @
O)) @
O)) @
O)) @
O))@
@@
O)) @
O)) @
O))@
O))@
O))@
O)) @
O)) @
@@
O)) @
O)) O)) O))@
O) O) O)) @
O)))) O)))))))@
O) O) O)) @
O)) O)) O))@
O)) @
@@
@
O)) @
O)) @
O))) O)))))@
O)) @
O)) @
@
@@
@
@
@
@
@
@
O))@
O)@@
@
@
@
O)))))@
@
@
@
@@
@
@
@
@
@
@
O))@
@@
O))@
O)) @
O)) @
O)) @
O)) @
O)) @
O)) @
@@
@
O)) @
O)) O)) @
O)) O)) @
O)) O))@
O)) O)) @
O))) @
@@
@
O)) @
O)) @
O)) @
O)) @
O)) @
O))))@
@@
@
O) O)) @
O) O))@
O)) @
O)) @
O)) @
O))))))))@
@@
@
O)) O)) @
O)) @
O)) @
O)) @
O))@
O))))) @
@@
@
O)) @
O O)) @
O) O)) @
O)) O)) @
O)))) O) O))@
O)) @
@@
@
O)) O))) @
O)) @
O))) @
O)) @
O))@
O))) O)) @
@@
@
O)) @
O)) @
O)) @
O) O)) @
O)) O))@
O)) O)) @
@@
@
O))))) O))@
O)) @
O)) @
O)) @
O)) @
O)) @
@@
@
O) @
O)) O)) @
O)) O)@
O)) O) @
O)) O)@
O)))) @
@@
@
O) O)) @
O)) O))@
O) O))@
O)) O)) @
O)) @
O)) @
@@
@
@
@
@
O))@
@
O))@
@@
@
@
@
@
O))@
@
O))@
O)@@
O))@
O)) @
O)) @
O)) @
O)) @
O)) @
O))@
@@
@
@
O))))))@
@
O))))))@
@
@
@@
O)) @
O)) @
O)) @
O))@
O)) @
O)) @
O)) @
@@
O))) @
O)) @
O))@
O)) @
O)) @
@
O)) @
@@
@
O))) @
O) O)) @
O) O)) O))@
O)) O))O O))@
O)) \`\`\` @
O)) @
@@
O) @
O) )) @
O) O)) @
O)) O)) @
O)))))) O)) @
O)) O)) @
O)) O))@
@@
O)) O)) @
O) O)) @
O) O))@
O))) O) @
O) O))@
O) O)@
O)))) O)) @
@@
O)) @
O)) O))@
O)) @
O)) @
O)) @
O)) O))@
O)))) @
@@
O))))) @
O)) O)) @
O)) O))@
O)) O))@
O)) O))@
O)) O)) @
O))))) @
@@
O))))))))@
O)) @
O)) @
O)))))) @
O)) @
O)) @
O))))))))@
@@
O))))))))@
O)) @
O)) @
O)))))) @
O)) @
O)) @
O)) @
@@
O)))) @
O) O)) @
O)) @
O)) @
O)) O))))@
O)) O) @
O))))) @
@@
O)) O))@
O)) O))@
O)) O))@
O)))))) O))@
O)) O))@
O)) O))@
O)) O))@
@@
O))@
O))@
O))@
O))@
O))@
O))@
O))@
@@
O))@
O))@
O))@
O))@
O))@
O) O))@
O)))) @
@@
O)) O)) @
O)) O)) @
O)) O)) @
O) O) @
O)) O)) @
O)) O)) @
O)) O))@
@@
O)) @
O)) @
O)) @
O)) @
O)) @
O)) @
O))))))))@
@@
O)) O))@
O) O)) O)))@
O)) O)) O O))@
O)) O)) O))@
O)) O) O))@
O)) O))@
O)) O))@
@@
O))) O))@
O) O)) O))@
O)) O)) O))@
O)) O)) O))@
O)) O) O))@
O)) O) ))@
O)) O))@
@@
O)))) @
O)) O)) @
O)) O))@
O)) O))@
O)) O))@
O)) O)) @
O)))) @
@@
O))))))) @
O)) O))@
O)) O))@
O))))))) @
O)) @
O)) @
O)) @
@@
O)))) @
O)) O)) @
O)) O))@
O)) O))@
O)) O))@
O)) O) O)) @
O)) )) @
O) @@
O))))))) @
O)) O)) @
O)) O)) @
O) O)) @
O)) O)) @
O)) O)) @
O)) O))@
@@
O)) O) @
O)) O))@
O)) @
O)) @
O)) @
O)) O))@
O)) O) @
@@
O))) O))))))@
O)) @
O)) @
O)) @
O)) @
O)) @
O)) @
@@
O)) O))@
O)) O))@
O)) O))@
O)) O))@
O)) O))@
O)) O))@
O))))) @
@@
O)) O))@
O)) O)) @
O)) O)) @
O)) O)) @
O)) O)) @
O)))) @
O)) @
@@
O)) O))@
O)) O))@
O)) O) O))@
O)) O)) O))@
O)) O) O)) O))@
O) O) O))))@
O)) O))@
@@
O)) O))@
O)) O)) @
O)) O)) @
O)) @
O)) O)) @
O)) O)) @
O)) O))@
@@
O)) O))@
O)) O)) @
O)) O)) @
O)) @
O)) @
O)) @
O)) @
@@
O))))))) O))@
O)) @
O)) @
O)) @
O)) @
O)) @
O)))))))))))@
@@
O))))@
O)) @
O)) @
O)) @
O)) @
O)) @
O))))@
@@
O)) @
O)) @
O)) @
O)) @
O)) @
O)) @
O))@
@@
O))))@
O))@
O))@
O))@
O))@
O))@
O))))@
@@
O)) @
O)) O)) @
O)) O))@
@
@
@
@
@@
@
@
@
@
@
@
@
O)))))@@
O))@
O) @
@
@
@
@
@
@@
@
@
O)) @
O)) O)) @
O)) O)) @
O)) O)) @
O)) O)))@
@@
O)) @
O)) @
O)) @
O)) O)) @
O)) O))@
O)) O))@
O)) O)) @
@@
@
@
O)))@
O)) @
O)) @
O)) @
O)))@
@@
O))@
O))@
O))@
O)) O))@
O) O))@
O) O))@
O)) O))@
@@
@
@
O)) @
O) O)) @
O))))) O))@
O) @
O)))) @
@@
O))@
O) @
O)O) O)@
O)) @
O)) @
O)) @
O)) @
@@
@
@
O)) @
O)) O))@
O)) O))@
O)) O))@
O)) @
O)) @@
@
O)) @
O)) @
O) O) @
O)) O))@
O) O))@
O)) O))@
@@
@
O)@
@
O))@
O))@
O))@
O))@
@@
@
O))@
@
O))@
O))@
O))@
O))@
O))) @@
O)) @
O)) @
O)) O))@
O)) O)) @
O)O)) @
O)) O)) @
O)) O))@
@@
O))@
O))@
O))@
O))@
O))@
O))@
O)))@
@@
@
@
O))) O)) O)) @
O)) O) O))@
O)) O) O))@
O)) O) O))@
O))) O) O))@
@@
@
@
O)) O)) @
O)) O))@
O)) O))@
O)) O))@
O))) O))@
@@
@
@
O)) @
O)) O)) @
O)) O))@
O)) O)) @
O)) @
@@
@
@
O) O)) @
O) O)) @
O) O))@
O)) O)) @
O)) @
O)) @@
@
@
O)) @
O) O)) @
O) O)) @
O))O)) @
O)) @
O)))@@
@
@
O) O)))@
O)) @
O)) @
O)) @
O))) @
@@
@
@
O)))) @
O)) @
O))) @
O))@
O)) O))@
@@
O)) @
O)) @
O)O) O)@
O)) @
O)) @
O)) @
O)) @
@@
@
@
O)) O))@
O)) O))@
O)) O))@
O)) O))@
O))O))@
@@
@
@
O)) O))@
O)) O)) @
O)) O)) @
O)O)) @
O)) @
@@
@
@
O)) O)))@
O)) ) O))@
O)) O) O))@
O) O) O)O))@
O))) O)))@
@@
@
@
O)) O))@
O) O)) @
O) @
O) O)) @
O)) O))@
@@
@
@
O)) O))@
O)) O)) @
O))) @
O)) @
O)) @
O)) @@
@
@
O)))) O))@
O)) @
O)) @
O)) @
O))))))))@
@@
O))@
O)) @
O)) @
O)) @
O)) @
O)) @
O))@
@@
O)@
O)@
O)@
@
O)@
O)@
O)@
@@
O)) @
O)) @
O)) @
O))@
O)) @
O)) @
O)) @
@@
O)) O) @
O) O))@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,18 @@
{
"extends": "@ljharb",
"root": true,
"rules": {
"func-style": 1,
},
"overrides": [
{
"files": "test/**",
"rules": {
"global-require": 0,
"max-depth": 0,
"max-lines-per-function": 0,
"no-negated-condition": 0,
},
},
],
}
@@ -0,0 +1,18 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
// @ts-ignore `lightningcss` may not be installed
import type Lightningcss from 'lightningcss'
/* eslint-enable @typescript-eslint/ban-ts-comment */
export type LightningCSSOptions = Omit<
Lightningcss.BundleAsyncOptions<Lightningcss.CustomAtRules>,
| 'filename'
| 'resolver'
| 'minify'
| 'sourceMap'
| 'analyzeDependencies'
// properties not overridden by Vite, but does not make sense to set by end users
| 'inputSourceMap'
| 'projectRoot'
>
@@ -0,0 +1,111 @@
import {readPiExp} from './XmlPartReader.js';
export function readCdata(parser){
//<![ are already read till this point
let str = parser.source.readStr(6); //CDATA[
parser.source.updateBufferBoundary(6);
if(str !== "CDATA[") throw new Error(`Invalid CDATA expression at ${parser.source.line}:${parser.source.cols}`);
let text = parser.source.readUpto("]]>");
parser.outputBuilder.addCdata(text);
}
export function readPiTag(parser){
//<? are already read till this point
let tagExp = readPiExp(parser, "?>");
if(!tagExp) throw new Error("Invalid Pi Tag expression.");
if (tagExp.tagName === "?xml") {//TODO: test if tagName is just xml
parser.outputBuilder.addDeclaration();
} else {
parser.outputBuilder.addPi("?"+tagExp.tagName);
}
}
export function readComment(parser){
//<!- are already read till this point
let ch = parser.source.readCh();
if(ch !== "-") throw new Error(`Invalid comment expression at ${parser.source.line}:${parser.source.cols}`);
let text = parser.source.readUpto("-->");
parser.outputBuilder.addComment(text);
}
const DOCTYPE_tags = {
"EL":/^EMENT\s+([^\s>]+)\s+(ANY|EMPTY|\(.+\)\s*$)/m,
"AT":/^TLIST\s+[^\s]+\s+[^\s]+\s+[^\s]+\s+[^\s]+\s+$/m,
"NO":/^TATION.+$/m
}
export function readDocType(parser){
//<!D are already read till this point
let str = parser.source.readStr(6); //OCTYPE
parser.source.updateBufferBoundary(6);
if(str !== "OCTYPE") throw new Error(`Invalid DOCTYPE expression at ${parser.source.line}:${parser.source.cols}`);
let hasBody = false, lastch = "";
while(parser.source.canRead()){
//TODO: use readChAt like used in partReader
let ch = parser.source.readCh();
if(hasBody){
if (ch === '<') { //Determine the tag type
let str = parser.source.readStr(2);
parser.source.updateBufferBoundary(2);
if(str === "EN"){ //ENTITY
let str = parser.source.readStr(4);
parser.source.updateBufferBoundary(4);
if(str !== "TITY") throw new Error("Invalid DOCTYPE ENTITY expression");
registerEntity(parser);
}else if(str === "!-") {//comment
readComment(parser);
}else{ //ELEMENT, ATTLIST, NOTATION
let dTagExp = parser.source.readUpto(">");
const regx = DOCTYPE_tags[str];
if(regx){
const match = dTagExp.match(regx);
if(!match) throw new Error("Invalid DOCTYPE");
}else throw new Error("Invalid DOCTYPE");
}
}else if( ch === '>' && lastch === "]"){//end of doctype
return;
}
}else if( ch === '>'){//end of doctype
return;
}else if( ch === '['){
hasBody = true;
}else{
lastch = ch;
}
}//End While loop
}
function registerEntity(parser){
//read Entity
let attrBoundary="";
let name ="", val ="";
while(source.canRead()){
let ch = source.readCh();
if(attrBoundary){
if (ch === attrBoundary){
val = text;
text = ""
}
}else if(ch === " " || ch === "\t"){
if(!name){
name = text.trimStart();
text = "";
}
}else if (ch === '"' || ch === "'") {//start of attrBoundary
attrBoundary = ch;
}else if(ch === ">"){
parser.entityParser.addExternalEntity(name,val);
return;
}else{
text+=ch;
}
}
}
@@ -0,0 +1,59 @@
'use strict';
function isNothing(subject) {
return (typeof subject === 'undefined') || (subject === null);
}
function isObject(subject) {
return (typeof subject === 'object') && (subject !== null);
}
function toArray(sequence) {
if (Array.isArray(sequence)) return sequence;
else if (isNothing(sequence)) return [];
return [ sequence ];
}
function extend(target, source) {
var index, length, key, sourceKeys;
if (source) {
sourceKeys = Object.keys(source);
for (index = 0, length = sourceKeys.length; index < length; index += 1) {
key = sourceKeys[index];
target[key] = source[key];
}
}
return target;
}
function repeat(string, count) {
var result = '', cycle;
for (cycle = 0; cycle < count; cycle += 1) {
result += string;
}
return result;
}
function isNegativeZero(number) {
return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);
}
module.exports.isNothing = isNothing;
module.exports.isObject = isObject;
module.exports.toArray = toArray;
module.exports.repeat = repeat;
module.exports.isNegativeZero = isNegativeZero;
module.exports.extend = extend;
@@ -0,0 +1,3 @@
export * as KindGuard from './kind.mjs';
export * as TypeGuard from './type.mjs';
export * as ValueGuard from './value.mjs';
@@ -0,0 +1,564 @@
import { TSESLint, TSESTree } from "@typescript-eslint/utils";
import { ChildContext, DocStyle, FileExtension, ImportSettings, ImportSettings as ImportSettings$1, LegacyImportResolver, LegacyImportResolver as ImportResolver, LegacyResolver, LegacyResolverName, LegacyResolverName as ResolverName, LegacyResolverObject, LegacyResolverObject as ResolverObject, LegacyResolverRecord, LegacyResolverRecord as ResolverRecord, LegacyResolverResolve, LegacyResolverResolve as ResolverResolve, LegacyResolverResolveImport, LegacyResolverResolveImport as ResolverResolveImport, NewResolver, NewResolverResolve, NodeResolverOptions, PluginName, PluginSettings, PluginSettings as PluginSettings$1, ResolvedResult, Resolver, ResultFound, ResultNotFound, RuleContext, TsResolverOptions, WebpackResolverOptions, WithPluginName } from "eslint-import-context";
import { MinimatchOptions } from "minimatch";
import { NapiResolveOptions } from "unrs-resolver";
//#region src/utils/create-rule.d.ts
interface ImportXPluginDocs {
/** The category the rule falls under */
category?: string;
recommended?: true;
}
//#endregion
//#region src/types.d.ts
type ImportType = ImportType$1 | 'object' | 'type';
type Arrayable<T> = T | readonly T[];
interface PluginConfig extends TSESLint.ClassicConfig.Config {
plugins?: [PluginName];
settings?: PluginSettings$1;
rules?: Record<`${PluginName}/${string}`, TSESLint.ClassicConfig.RuleEntry>;
}
interface PluginFlatBaseConfig extends TSESLint.FlatConfig.Config {
settings?: PluginSettings$1;
rules?: Record<`${PluginName}/${string}`, TSESLint.FlatConfig.RuleEntry>;
}
interface PluginFlatConfig extends PluginFlatBaseConfig {
name?: `${PluginName}/${string}`;
}
interface ParseError extends Error {
lineNumber: number;
column: number;
}
interface CustomESTreeNode<Type extends string> extends Omit<TSESTree.BaseNode, 'type'> {
type: Type;
}
type ExportDefaultSpecifier = CustomESTreeNode<'ExportDefaultSpecifier'>;
interface ExportNamespaceSpecifier extends CustomESTreeNode<'ExportNamespaceSpecifier'> {
exported: TSESTree.Identifier;
}
interface PathGroup {
pattern: string;
group: ImportType;
patternOptions?: MinimatchOptions;
position?: 'before' | 'after';
}
type ExportAndImportKind = 'value' | 'type';
type NewLinesOptions = 'always' | 'always-and-inside-groups' | 'ignore' | 'never';
type NamedTypes = 'mixed' | 'types-first' | 'types-last';
interface NamedOptions {
enabled?: boolean;
import?: boolean;
export?: boolean;
require?: boolean;
cjsExports?: boolean;
types?: NamedTypes;
}
interface AlphabetizeOptions {
caseInsensitive: boolean;
order: 'ignore' | 'asc' | 'desc';
orderImportKind: 'ignore' | 'asc' | 'desc';
}
type ImportEntryType = 'import:object' | 'import' | 'require' | 'export';
type LiteralNodeValue = string | number | bigint | boolean | RegExp | null;
interface ImportEntry {
type: ImportEntryType;
node: TSESTree.Node & {
importKind?: ExportAndImportKind;
exportKind?: ExportAndImportKind;
};
value: LiteralNodeValue;
alias?: string;
kind?: ExportAndImportKind;
displayName?: LiteralNodeValue;
}
interface ImportEntryWithRank extends ImportEntry {
rank: number;
isMultiline?: boolean;
}
interface RanksPathGroup {
pattern: string;
patternOptions?: MinimatchOptions;
group: string;
position?: number;
}
type RanksGroups = Record<string, number>;
interface Ranks {
omittedTypes: string[];
groups: RanksGroups;
pathGroups: RanksPathGroup[];
maxPosition: number;
}
interface CjsRequire extends NodeJS.Require {
<T>(id: string): T;
}
type SetValue<T extends Set<unknown>> = T extends Set<infer U> ? U : never;
interface NormalizedCacheSettings extends NonNullable<ImportSettings$1['cache']> {
lifetime: number;
}
//#endregion
//#region src/utils/import-type.d.ts
/**
* Returns the type of the module.
*
* @param name The name of the module to check
* @param context The context of the rule
* @returns The type of the module
*/
declare function importType(name: LiteralNodeValue, context: RuleContext): "absolute" | "builtin" | "internal" | "parent" | "index" | "sibling" | "external" | "unknown";
type ImportType$1 = ReturnType<typeof importType>;
//#endregion
//#region src/utils/module-visitor.d.ts
interface ModuleOptions {
amd?: boolean;
commonjs?: boolean;
esmodule?: boolean;
ignore?: string[];
}
/**
* Returns an object of node visitors that will call 'visitor' with every
* discovered module path.
*/
//#endregion
//#region src/utils/resolve.d.ts
declare function importXResolverCompat(resolver: LegacyResolver | NewResolver, resolverOptions?: unknown): NewResolver;
//#endregion
//#region src/rules/no-unresolved.d.ts
type Options$26 = ModuleOptions & {
caseSensitive?: boolean;
caseSensitiveStrict?: boolean;
};
type MessageId$12 = 'unresolved' | 'casingMismatch';
//#endregion
//#region src/rules/named.d.ts
type MessageId$11 = 'notFound' | 'notFoundDeep';
//#endregion
//#region src/rules/namespace.d.ts
type MessageId$10 = 'noNamesFound' | 'computedReference' | 'namespaceMember' | 'topLevelNames' | 'notFoundInNamespace' | 'notFoundInNamespaceDeep';
interface Options$25 {
allowComputed?: boolean;
}
//#endregion
//#region src/rules/no-namespace.d.ts
interface Options$24 {
ignore?: string[];
}
//#endregion
//#region src/rules/export.d.ts
type MessageId$9 = 'noNamed' | 'multiDefault' | 'multiNamed';
//#endregion
//#region src/rules/extensions.d.ts
declare const modifierValues: readonly ["always", "ignorePackages", "never"];
type Modifier = (typeof modifierValues)[number];
type ModifierByFileExtension = Partial<Record<string, Modifier>>;
interface OptionsItemWithPatternProperty {
ignorePackages?: boolean;
checkTypeImports?: boolean;
pattern: ModifierByFileExtension;
pathGroupOverrides?: PathGroupOverride[];
fix?: boolean;
}
interface PathGroupOverride {
pattern: string;
patternOptions?: Record<string, MinimatchOptions>;
action: 'enforce' | 'ignore';
}
interface OptionsItemWithoutPatternProperty {
ignorePackages?: boolean;
checkTypeImports?: boolean;
pathGroupOverrides?: PathGroupOverride[];
fix?: boolean;
}
type Options$23 = [] | [OptionsItemWithoutPatternProperty] | [OptionsItemWithPatternProperty] | [Modifier] | [Modifier, OptionsItemWithoutPatternProperty] | [Modifier, OptionsItemWithPatternProperty] | [Modifier, ModifierByFileExtension] | [ModifierByFileExtension];
type MessageId$8 = 'missing' | 'missingKnown' | 'unexpected' | 'addMissing' | 'removeUnexpected';
//#endregion
//#region src/rules/no-restricted-paths.d.ts
interface Options$22 {
basePath?: string;
zones?: Array<{
from: Arrayable<string>;
target: Arrayable<string>;
message?: string;
except?: string[];
}>;
}
type MessageId$7 = 'path' | 'mixedGlob' | 'glob' | 'zone';
//#endregion
//#region src/rules/no-internal-modules.d.ts
interface Options$21 {
allow?: string[];
forbid?: string[];
}
//#endregion
//#region src/rules/group-exports.d.ts
type MessageId$6 = 'ExportNamedDeclaration' | 'AssignmentExpression';
//#endregion
//#region src/rules/consistent-type-specifier-style.d.ts
type Options$20 = 'prefer-inline' | 'prefer-top-level';
//#endregion
//#region src/rules/no-cycle.d.ts
interface Options$19 extends ModuleOptions {
allowUnsafeDynamicCyclicDependency?: boolean;
ignoreExternal?: boolean;
maxDepth?: number | '∞';
}
type MessageId$5 = 'cycle' | 'cycleSource';
//#endregion
//#region src/rules/no-anonymous-default-export.d.ts
interface Options$18 {
allowArray?: boolean;
allowArrowFunction?: boolean;
allowCallExpression?: boolean;
allowAnonymousClass?: boolean;
allowAnonymousFunction?: boolean;
allowLiteral?: boolean;
allowObject?: boolean;
allowNew?: boolean;
}
//#endregion
//#region src/rules/no-rename-default.d.ts
type Options$17 = ModuleOptions & {
preventRenamingBindings?: boolean;
};
//#endregion
//#region src/rules/no-unused-modules.d.ts
interface Options$16 {
src?: string[];
ignoreExports?: string[];
missingExports?: true;
unusedExports?: boolean;
ignoreUnusedTypeExports?: boolean;
}
//#endregion
//#region src/rules/no-commonjs.d.ts
interface NormalizedOptions {
allowPrimitiveModules?: boolean;
allowRequire?: boolean;
allowConditionalRequire?: boolean;
}
type Options$15 = 'allow-primitive-modules' | NormalizedOptions;
//#endregion
//#region src/rules/no-duplicates.d.ts
interface Options$14 {
considerQueryString?: boolean;
'prefer-inline'?: boolean;
}
//#endregion
//#region src/rules/first.d.ts
type Options$13 = 'absolute-first' | 'disable-absolute-first';
type MessageId$4 = 'absolute' | 'order';
//#endregion
//#region src/rules/max-dependencies.d.ts
interface Options$12 {
ignoreTypeImports?: boolean;
max?: number;
}
//#endregion
//#region src/rules/no-extraneous-dependencies.d.ts
interface Options$11 {
packageDir?: string | string[];
devDependencies?: boolean | string[];
optionalDependencies?: boolean | string[];
peerDependencies?: boolean | string[];
bundledDependencies?: boolean | string[];
includeInternal?: boolean;
includeTypes?: boolean;
whitelist?: string[];
}
type MessageId$3 = 'pkgNotFound' | 'pkgUnparsable' | 'devDep' | 'optDep' | 'missing';
//#endregion
//#region src/rules/no-nodejs-modules.d.ts
interface Options$10 {
allow?: string[];
}
//#endregion
//#region src/rules/order.d.ts
interface Options$9 {
'newlines-between'?: NewLinesOptions;
'newlines-between-types'?: NewLinesOptions;
named?: boolean | NamedOptions;
alphabetize?: Partial<AlphabetizeOptions>;
consolidateIslands?: 'inside-groups' | 'never';
distinctGroup?: boolean;
groups?: ReadonlyArray<Arrayable<ImportType>>;
pathGroupsExcludedImportTypes?: ImportType[];
pathGroups?: PathGroup[];
sortTypesGroup?: boolean;
warnOnUnassignedImports?: boolean;
}
//#endregion
//#region src/rules/newline-after-import.d.ts
interface Options$8 {
count?: number;
exactCount?: boolean;
considerComments?: boolean;
}
//#endregion
//#region src/rules/prefer-default-export.d.ts
interface Options$7 {
target?: 'single' | 'any';
}
type MessageId$2 = 'single' | 'any';
//#endregion
//#region src/rules/prefer-namespace-import.d.ts
interface Options$6 {
patterns?: readonly string[];
}
//#endregion
//#region src/rules/no-dynamic-require.d.ts
interface Options$5 {
esmodule?: boolean;
}
type MessageId$1 = 'import' | 'require';
//#endregion
//#region src/rules/no-unassigned-import.d.ts
interface Options$4 {
allow?: string[];
}
//#endregion
//#region src/rules/no-useless-path-segments.d.ts
interface Options$3 extends ModuleOptions {
noUselessIndex?: boolean;
}
//#endregion
//#region src/rules/dynamic-import-chunkname.d.ts
interface Options$2 {
allowEmpty?: boolean;
importFunctions?: readonly string[];
webpackChunknameFormat?: string;
}
type MessageId = 'leadingComment' | 'blockComment' | 'paddedSpaces' | 'webpackComment' | 'chunknameFormat' | 'webpackEagerModeNoChunkName' | 'webpackRemoveEagerMode' | 'webpackRemoveChunkName';
//#endregion
//#region src/rules/no-import-module-exports.d.ts
interface Options$1 {
exceptions?: string[];
}
//#endregion
//#region src/meta.d.ts
declare const meta$1: {
name: string;
version: string;
};
//#endregion
//#region src/node-resolver.d.ts
declare function createNodeResolver({
extensions,
conditionNames,
mainFields,
...restOptions
}?: NapiResolveOptions): NewResolver;
//#endregion
//#region src/require.d.ts
declare const cjsRequire: CjsRequire;
//#endregion
//#region src/index.d.ts
declare const rules: {
'no-unresolved': TSESLint.RuleModule<MessageId$12, [Options$26?], ImportXPluginDocs, TSESLint.RuleListener>;
named: TSESLint.RuleModule<MessageId$11, [ModuleOptions?], ImportXPluginDocs, TSESLint.RuleListener>;
default: TSESLint.RuleModule<"noDefaultExport", [], ImportXPluginDocs, TSESLint.RuleListener>;
namespace: TSESLint.RuleModule<MessageId$10, [Options$25], ImportXPluginDocs, TSESLint.RuleListener>;
'no-namespace': TSESLint.RuleModule<"noNamespace", [Options$24?], ImportXPluginDocs, TSESLint.RuleListener>;
export: TSESLint.RuleModule<MessageId$9, [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-mutable-exports': TSESLint.RuleModule<"noMutable", [], ImportXPluginDocs, TSESLint.RuleListener>;
extensions: TSESLint.RuleModule<MessageId$8, Options$23, ImportXPluginDocs, TSESLint.RuleListener>;
'no-restricted-paths': TSESLint.RuleModule<MessageId$7, [Options$22?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-internal-modules': TSESLint.RuleModule<"noAllowed", [Options$21?], ImportXPluginDocs, TSESLint.RuleListener>;
'group-exports': TSESLint.RuleModule<MessageId$6, [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-relative-packages': TSESLint.RuleModule<"noAllowed", [ModuleOptions?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-relative-parent-imports': TSESLint.RuleModule<"noAllowed", [ModuleOptions?], ImportXPluginDocs, TSESLint.RuleListener>;
'consistent-type-specifier-style': TSESLint.RuleModule<"inline" | "topLevel", [Options$20?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-self-import': TSESLint.RuleModule<"self", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-cycle': TSESLint.RuleModule<MessageId$5, [Options$19?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-named-default': TSESLint.RuleModule<"default", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-named-as-default': TSESLint.RuleModule<"default", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-named-as-default-member': TSESLint.RuleModule<"member", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-anonymous-default-export': TSESLint.RuleModule<"assign" | "anonymous", [Options$18?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-rename-default': TSESLint.RuleModule<"renameDefault", [Options$17?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-unused-modules': TSESLint.RuleModule<"notFound" | "unused", Options$16[], ImportXPluginDocs, TSESLint.RuleListener>;
'no-commonjs': TSESLint.RuleModule<"export" | "import", [Options$15?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-amd': TSESLint.RuleModule<"amd", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-duplicates': TSESLint.RuleModule<"duplicate", [Options$14?], ImportXPluginDocs, TSESLint.RuleListener>;
first: TSESLint.RuleModule<MessageId$4, [Options$13?], ImportXPluginDocs, TSESLint.RuleListener>;
'max-dependencies': TSESLint.RuleModule<"max", [Options$12?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-extraneous-dependencies': TSESLint.RuleModule<MessageId$3, [Options$11?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-absolute-path': TSESLint.RuleModule<"absolute", [ModuleOptions?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-nodejs-modules': TSESLint.RuleModule<"builtin", [Options$10?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-webpack-loader-syntax': TSESLint.RuleModule<"unexpected", [], ImportXPluginDocs, TSESLint.RuleListener>;
order: TSESLint.RuleModule<"order" | "error" | "noLineWithinGroup" | "noLineBetweenGroups" | "oneLineBetweenGroups" | "oneLineBetweenTheMultiLineImport" | "oneLineBetweenThisMultiLineImport" | "noLineBetweenSingleLineImport", [Options$9?], ImportXPluginDocs, TSESLint.RuleListener>;
'newline-after-import': TSESLint.RuleModule<"newline", [Options$8?], ImportXPluginDocs, TSESLint.RuleListener>;
'prefer-default-export': TSESLint.RuleModule<MessageId$2, [Options$7?], ImportXPluginDocs, TSESLint.RuleListener>;
'prefer-namespace-import': TSESLint.RuleModule<"preferNamespaceImport", [Options$6?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-default-export': TSESLint.RuleModule<"preferNamed" | "noAliasDefault", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-named-export': TSESLint.RuleModule<"noAllowed", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-dynamic-require': TSESLint.RuleModule<MessageId$1, [Options$5?], ImportXPluginDocs, TSESLint.RuleListener>;
unambiguous: TSESLint.RuleModule<"module", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-unassigned-import': TSESLint.RuleModule<"unassigned", [Options$4?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-useless-path-segments': TSESLint.RuleModule<"useless", [Options$3?], ImportXPluginDocs, TSESLint.RuleListener>;
'dynamic-import-chunkname': TSESLint.RuleModule<MessageId, [Options$2?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-import-module-exports': TSESLint.RuleModule<"notAllowed", [Options$1?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-empty-named-blocks': TSESLint.RuleModule<"unused" | "emptyNamed" | "emptyImport", [], ImportXPluginDocs, TSESLint.RuleListener>;
'exports-last': TSESLint.RuleModule<"end", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-deprecated': TSESLint.RuleModule<"deprecated" | "deprecatedDesc", [], ImportXPluginDocs, TSESLint.RuleListener>;
'imports-first': TSESLint.RuleModule<MessageId$4, [Options$13?], ImportXPluginDocs, TSESLint.RuleListener>;
};
declare const plugin_: {
meta: {
name: string;
version: string;
};
rules: {
'no-unresolved': TSESLint.RuleModule<MessageId$12, [Options$26?], ImportXPluginDocs, TSESLint.RuleListener>;
named: TSESLint.RuleModule<MessageId$11, [ModuleOptions?], ImportXPluginDocs, TSESLint.RuleListener>;
default: TSESLint.RuleModule<"noDefaultExport", [], ImportXPluginDocs, TSESLint.RuleListener>;
namespace: TSESLint.RuleModule<MessageId$10, [Options$25], ImportXPluginDocs, TSESLint.RuleListener>;
'no-namespace': TSESLint.RuleModule<"noNamespace", [Options$24?], ImportXPluginDocs, TSESLint.RuleListener>;
export: TSESLint.RuleModule<MessageId$9, [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-mutable-exports': TSESLint.RuleModule<"noMutable", [], ImportXPluginDocs, TSESLint.RuleListener>;
extensions: TSESLint.RuleModule<MessageId$8, Options$23, ImportXPluginDocs, TSESLint.RuleListener>;
'no-restricted-paths': TSESLint.RuleModule<MessageId$7, [Options$22?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-internal-modules': TSESLint.RuleModule<"noAllowed", [Options$21?], ImportXPluginDocs, TSESLint.RuleListener>;
'group-exports': TSESLint.RuleModule<MessageId$6, [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-relative-packages': TSESLint.RuleModule<"noAllowed", [ModuleOptions?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-relative-parent-imports': TSESLint.RuleModule<"noAllowed", [ModuleOptions?], ImportXPluginDocs, TSESLint.RuleListener>;
'consistent-type-specifier-style': TSESLint.RuleModule<"inline" | "topLevel", [Options$20?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-self-import': TSESLint.RuleModule<"self", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-cycle': TSESLint.RuleModule<MessageId$5, [Options$19?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-named-default': TSESLint.RuleModule<"default", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-named-as-default': TSESLint.RuleModule<"default", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-named-as-default-member': TSESLint.RuleModule<"member", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-anonymous-default-export': TSESLint.RuleModule<"assign" | "anonymous", [Options$18?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-rename-default': TSESLint.RuleModule<"renameDefault", [Options$17?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-unused-modules': TSESLint.RuleModule<"notFound" | "unused", Options$16[], ImportXPluginDocs, TSESLint.RuleListener>;
'no-commonjs': TSESLint.RuleModule<"export" | "import", [Options$15?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-amd': TSESLint.RuleModule<"amd", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-duplicates': TSESLint.RuleModule<"duplicate", [Options$14?], ImportXPluginDocs, TSESLint.RuleListener>;
first: TSESLint.RuleModule<MessageId$4, [Options$13?], ImportXPluginDocs, TSESLint.RuleListener>;
'max-dependencies': TSESLint.RuleModule<"max", [Options$12?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-extraneous-dependencies': TSESLint.RuleModule<MessageId$3, [Options$11?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-absolute-path': TSESLint.RuleModule<"absolute", [ModuleOptions?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-nodejs-modules': TSESLint.RuleModule<"builtin", [Options$10?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-webpack-loader-syntax': TSESLint.RuleModule<"unexpected", [], ImportXPluginDocs, TSESLint.RuleListener>;
order: TSESLint.RuleModule<"order" | "error" | "noLineWithinGroup" | "noLineBetweenGroups" | "oneLineBetweenGroups" | "oneLineBetweenTheMultiLineImport" | "oneLineBetweenThisMultiLineImport" | "noLineBetweenSingleLineImport", [Options$9?], ImportXPluginDocs, TSESLint.RuleListener>;
'newline-after-import': TSESLint.RuleModule<"newline", [Options$8?], ImportXPluginDocs, TSESLint.RuleListener>;
'prefer-default-export': TSESLint.RuleModule<MessageId$2, [Options$7?], ImportXPluginDocs, TSESLint.RuleListener>;
'prefer-namespace-import': TSESLint.RuleModule<"preferNamespaceImport", [Options$6?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-default-export': TSESLint.RuleModule<"preferNamed" | "noAliasDefault", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-named-export': TSESLint.RuleModule<"noAllowed", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-dynamic-require': TSESLint.RuleModule<MessageId$1, [Options$5?], ImportXPluginDocs, TSESLint.RuleListener>;
unambiguous: TSESLint.RuleModule<"module", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-unassigned-import': TSESLint.RuleModule<"unassigned", [Options$4?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-useless-path-segments': TSESLint.RuleModule<"useless", [Options$3?], ImportXPluginDocs, TSESLint.RuleListener>;
'dynamic-import-chunkname': TSESLint.RuleModule<MessageId, [Options$2?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-import-module-exports': TSESLint.RuleModule<"notAllowed", [Options$1?], ImportXPluginDocs, TSESLint.RuleListener>;
'no-empty-named-blocks': TSESLint.RuleModule<"unused" | "emptyNamed" | "emptyImport", [], ImportXPluginDocs, TSESLint.RuleListener>;
'exports-last': TSESLint.RuleModule<"end", [], ImportXPluginDocs, TSESLint.RuleListener>;
'no-deprecated': TSESLint.RuleModule<"deprecated" | "deprecatedDesc", [], ImportXPluginDocs, TSESLint.RuleListener>;
'imports-first': TSESLint.RuleModule<MessageId$4, [Options$13?], ImportXPluginDocs, TSESLint.RuleListener>;
};
cjsRequire: CjsRequire;
importXResolverCompat: typeof importXResolverCompat;
createNodeResolver: typeof createNodeResolver;
};
declare const flatConfigs: {
recommended: PluginFlatConfig;
errors: PluginFlatConfig;
warnings: PluginFlatConfig;
'stage-0': PluginFlatConfig;
react: PluginFlatConfig;
'react-native': PluginFlatConfig;
electron: PluginFlatConfig;
typescript: PluginFlatConfig;
};
declare const configs: {
recommended: {
plugins: ["import-x"];
rules: {
'import-x/no-unresolved': "error";
'import-x/named': "error";
'import-x/namespace': "error";
'import-x/default': "error";
'import-x/export': "error";
'import-x/no-named-as-default': "warn";
'import-x/no-named-as-default-member': "warn";
'import-x/no-duplicates': "warn";
};
parserOptions: {
sourceType: "module";
ecmaVersion: 2018;
};
};
errors: {
plugins: ["import-x"];
rules: {
'import-x/no-unresolved': 2;
'import-x/named': 2;
'import-x/namespace': 2;
'import-x/default': 2;
'import-x/export': 2;
};
};
warnings: {
plugins: ["import-x"];
rules: {
'import-x/no-named-as-default': 1;
'import-x/no-named-as-default-member': 1;
'import-x/no-rename-default': 1;
'import-x/no-duplicates': 1;
};
};
'stage-0': PluginConfig;
react: {
settings: {
'import-x/extensions': (".js" | ".jsx")[];
};
parserOptions: {
ecmaFeatures: {
jsx: true;
};
};
};
'react-native': {
settings: {
'import-x/resolver': {
node: {
extensions: string[];
};
};
};
};
electron: {
settings: {
'import-x/core-modules': string[];
};
};
typescript: {
settings: {
'import-x/extensions': readonly [".ts", ".tsx", ".cts", ".mts", ".js", ".jsx", ".cjs", ".mjs"];
'import-x/external-module-folders': string[];
'import-x/parsers': {
'@typescript-eslint/parser': (".ts" | ".tsx" | ".cts" | ".mts")[];
};
'import-x/resolver': {
typescript: true;
};
};
rules: {
'import-x/named': "off";
};
};
'flat/recommended': PluginFlatConfig;
'flat/errors': PluginFlatConfig;
'flat/warnings': PluginFlatConfig;
'flat/stage-0': PluginFlatConfig;
'flat/react': PluginFlatConfig;
'flat/react-native': PluginFlatConfig;
'flat/electron': PluginFlatConfig;
'flat/typescript': PluginFlatConfig;
};
declare const plugin: typeof plugin_ & {
flatConfigs: typeof flatConfigs;
configs: typeof configs;
};
//#endregion
export { AlphabetizeOptions, Arrayable, ChildContext, CjsRequire, CustomESTreeNode, DocStyle, ExportAndImportKind, ExportDefaultSpecifier, ExportNamespaceSpecifier, FileExtension, ImportEntry, ImportEntryType, ImportEntryWithRank, ImportResolver, ImportSettings, ImportType, LegacyImportResolver, LegacyResolver, LegacyResolverName, LegacyResolverObject, LegacyResolverRecord, LegacyResolverResolve, LegacyResolverResolveImport, LiteralNodeValue, NamedOptions, NamedTypes, NewLinesOptions, NewResolver, NewResolverResolve, NodeResolverOptions, NormalizedCacheSettings, ParseError, PathGroup, PluginConfig, PluginFlatBaseConfig, PluginFlatConfig, PluginSettings, Ranks, RanksGroups, RanksPathGroup, ResolvedResult, Resolver, ResolverName, ResolverObject, ResolverRecord, ResolverResolve, ResolverResolveImport, ResultFound, ResultNotFound, RuleContext, SetValue, TsResolverOptions, WebpackResolverOptions, WithPluginName, cjsRequire, configs, createNodeResolver, plugin as default, plugin as importX, flatConfigs, importXResolverCompat, meta$1 as meta, rules };
@@ -0,0 +1,18 @@
var enabled = require('enabled');
/**
* Creates a new Adapter.
*
* @param {Function} fn Function that returns the value.
* @returns {Function} The adapter logic.
* @public
*/
module.exports = function create(fn) {
return function adapter(namespace) {
try {
return enabled(namespace, fn());
} catch (e) { /* Any failure means that we found nothing */ }
return false;
};
}
@@ -0,0 +1,75 @@
{
"name": "minimist",
"version": "1.2.8",
"description": "parse argument options",
"main": "index.js",
"devDependencies": {
"@ljharb/eslint-config": "^21.0.1",
"aud": "^2.0.2",
"auto-changelog": "^2.4.0",
"eslint": "=8.8.0",
"in-publish": "^2.0.1",
"npmignore": "^0.3.0",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.6.3"
},
"scripts": {
"prepack": "npmignore --auto --commentLines=auto",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"lint": "eslint --ext=js,mjs .",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "aud --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"testling": {
"files": "test/*.js",
"browsers": [
"ie/6..latest",
"ff/5",
"firefox/latest",
"chrome/10",
"chrome/latest",
"safari/5.1",
"safari/latest",
"opera/12"
]
},
"repository": {
"type": "git",
"url": "git://github.com/minimistjs/minimist.git"
},
"homepage": "https://github.com/minimistjs/minimist",
"keywords": [
"argv",
"getopt",
"parser",
"optimist"
],
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
"url": "http://substack.net"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}
@@ -0,0 +1,59 @@
{
"name": "state-local",
"version": "1.0.7",
"description": "Tiny, simple, and robust technique for defining and acting with local states",
"main": "lib/cjs/state-local.js",
"module": "lib/es/state-local.js",
"unpkg": "lib/umd/state-local.min.js",
"jsdelivr": "lib/umd/state-local.min.js",
"types": "lib/types.d.ts",
"author": "Suren Atoyan <contact@surenatoyan.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/suren-atoyan/state-local"
},
"bugs": {
"url": "https://github.com/suren-atoyan/state-local/issues"
},
"homepage": "https://github.com/suren-atoyan/state-local#readme",
"keywords": [
"state",
"state management",
"local state"
],
"scripts": {
"test": "jest",
"test-watch": "npm run build && jest --watch",
"coverage": "jest --collect-coverage",
"lint": "npx eslint src",
"prepublish": "npm test && npm run lint && npm run build",
"build": "rollup -c && cp ./src/types.d.ts ./lib/"
},
"babel": {
"presets": [
"@babel/preset-env"
]
},
"husky": {
"hooks": {
"pre-commit": "npm test && npm run lint"
}
},
"devDependencies": {
"@babel/core": "^7.11.0",
"@babel/preset-env": "^7.11.0",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-node-resolve": "^11.0.1",
"@rollup/plugin-replace": "^2.3.4",
"babel-jest": "^26.2.2",
"babel-loader": "^8.1.0",
"eslint": "^7.6.0",
"husky": "^4.2.5",
"jest": "^26.2.2",
"rollup": "^2.35.1",
"rollup-plugin-terser": "^7.0.2"
},
"dependencies": {}
}
@@ -0,0 +1,25 @@
import arrayPush from './_arrayPush.js';
import getPrototype from './_getPrototype.js';
import getSymbols from './_getSymbols.js';
import stubArray from './stubArray.js';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetSymbols = Object.getOwnPropertySymbols;
/**
* Creates an array of the own and inherited enumerable symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
var result = [];
while (object) {
arrayPush(result, getSymbols(object));
object = getPrototype(object);
}
return result;
};
export default getSymbolsIn;
@@ -0,0 +1,12 @@
export interface NetworkState {
since?: Date;
online?: boolean;
rtt?: number;
type?: string;
downlink?: number;
saveData?: boolean;
downlinkMax?: number;
effectiveType?: string;
}
declare function useNetwork(): NetworkState;
export default useNetwork;
@@ -0,0 +1 @@
{"name":"path-exists","version":"4.0.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532094623,"integrity":"sha512-WKEow2vNjJL1NQAl4cLS2tzHrOZ0yQTNwR3hCUSeeriD87dZZyLd9X/hFIo2GoZhgLvsPeHsgfg7b3R2Oeb9EA==","mode":420,"size":607},"index.d.ts":{"checkedAt":1794532094624,"integrity":"sha512-34ZEtL09M6zDH8yK/8bGszi+fGx+n6bMN1l59tQzkoEvrIOcanjHfwcXLPKly+u2FSQ11chvF8veYX3euXE8wg==","mode":420,"size":429},"index.js":{"checkedAt":1794532094624,"integrity":"sha512-HYuNqUObMjdFre0HzyPs9cMxl1CvFeG+lciPrxaYv8ptIv6rUPHHR5+LLPb4VAEguTGWUPBYy4OEEL9Pef82OA==","mode":420,"size":347},"license":{"checkedAt":1794532093346,"integrity":"sha512-nIst73auX/5NY2Fmv5Y116vWnNrEv4GaIUX3lpZG05rpXJY2S8EX+fpUS5hRjClCM0VdT2Za9DDHXXB5jdSrEw==","mode":420,"size":1109},"readme.md":{"checkedAt":1794532094624,"integrity":"sha512-oRpm0Q/rx8dgDS65jeYuOXgIsgilKdmOpY/5eYr0Aqp6IFKXjJPrVSRLp3LJ/qzEVySD65n/qBewAsVP9hqwmA==","mode":420,"size":1427}}}
@@ -0,0 +1,10 @@
import { Action } from '../types/actions'
import isPlainObject from './isPlainObject'
export default function isAction(action: unknown): action is Action<string> {
return (
isPlainObject(action) &&
'type' in action &&
typeof (action as Record<'type', unknown>).type === 'string'
)
}
@@ -0,0 +1 @@
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAIM,SAAS,0CAAU,OAAoB,EAAE,OAAiB,EAAE,cAA2B,YAAY;IACxG,IAAI,OAAO,QAAQ,qBAAqB;IACxC,IAAI,SACF,OAAO,gBAAgB,eAAe,KAAK,KAAK,GAAG,KAAK,MAAM;IAEhE,OAAO,gBAAgB,eAAe,KAAK,IAAI,GAAG,KAAK,GAAG;AAC5D","sources":["packages/@react-aria/utils/src/getOffset.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Orientation} from '@react-types/shared';\n\nexport function getOffset(element: HTMLElement, reverse?: boolean, orientation: Orientation = 'horizontal'): number {\n let rect = element.getBoundingClientRect();\n if (reverse) {\n return orientation === 'horizontal' ? rect.right : rect.bottom;\n }\n return orientation === 'horizontal' ? rect.left : rect.top;\n}\n"],"names":[],"version":3,"file":"getOffset.main.js.map"}
@@ -0,0 +1 @@
{"version":3,"file":"windowsTerminal.js","sourceRoot":"","sources":["../src/windowsTerminal.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;AAGH,uCAAkE;AAClE,qDAAoD;AAGpD,iCAAiC;AAEjC,IAAM,YAAY,GAAG,SAAS,CAAC;AAC/B,IAAM,YAAY,GAAG,eAAe,CAAC;AAErC;IAAqC,mCAAQ;IAK3C,yBAAY,IAAa,EAAE,IAAwB,EAAE,GAA4B;QAAjF,YACE,kBAAM,GAAG,CAAC,SAqGX;QAnGC,KAAI,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;QAE9C,uBAAuB;QACvB,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,GAAG,IAAI,IAAI,YAAY,CAAC;QAC5B,GAAG,GAAG,GAAG,IAAI,EAAE,CAAC;QAChB,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;QAEjC,IAAI,GAAG,CAAC,QAAQ,EAAE;YAChB,OAAO,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;SAC9D;QAED,IAAM,GAAG,GAAG,cAAM,CAAC,EAAE,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;QAChC,KAAI,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,IAAI,uBAAY,CAAC;QACtC,KAAI,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,IAAI,uBAAY,CAAC;QACtC,IAAM,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QACrC,IAAM,IAAI,GAAG,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,IAAI,YAAY,CAAC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,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;aACtD;YACD,KAAI,CAAC,MAAM,EAAE,CAAC;YACd,KAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,sCAAY,GAApB,UAAwB,UAAsB;QAA9C,iBAWC;QAVC,qCAAqC;QACrC,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,OAAO;SACR;QAED,iCAAiC;QACjC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YACnB,GAAG,EAAE,cAAM,OAAA,UAAU,CAAC,IAAI,CAAC,KAAI,CAAC,EAArB,CAAqB;SACjC,CAAC,CAAC;IACL,CAAC;IAEO,gCAAM,GAAd,UAAkB,UAA4B,EAAE,GAAM;QAAtD,iBAWC;QAVC,qCAAqC;QACrC,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YAC3B,OAAO;SACR;QAED,iCAAiC;QACjC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YACnB,GAAG,EAAE,cAAM,OAAA,UAAU,CAAC,IAAI,CAAC,KAAI,EAAE,GAAG,CAAC,EAA1B,CAA0B;SACtC,CAAC,CAAC;IACL,CAAC;IAED,sBAAW,oCAAO;aAAlB,cAA+B,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;;;OAAA;IACnD,sBAAW,mCAAM;aAAjB,cAA8B,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC,CAAC,CAAC;;;OLine truncated
@@ -0,0 +1,928 @@
/**
* A collection of shims that provide minimal functionality of the ES6 collections.
*
* These implementations are not meant to be used outside of the ResizeObserver
* modules as they cover only a limited range of use cases.
*/
/* eslint-disable require-jsdoc, valid-jsdoc */
var MapShim = (function () {
if (typeof Map !== 'undefined') {
return Map;
}
/**
* Returns index in provided array that matches the specified key.
*
* @param {Array<Array>} arr
* @param {*} key
* @returns {number}
*/
function getIndex(arr, key) {
var result = -1;
arr.some(function (entry, index) {
if (entry[0] === key) {
result = index;
return true;
}
return false;
});
return result;
}
return /** @class */ (function () {
function class_1() {
this.__entries__ = [];
}
Object.defineProperty(class_1.prototype, "size", {
/**
* @returns {boolean}
*/
get: function () {
return this.__entries__.length;
},
enumerable: true,
configurable: true
});
/**
* @param {*} key
* @returns {*}
*/
class_1.prototype.get = function (key) {
var index = getIndex(this.__entries__, key);
var entry = this.__entries__[index];
return entry && entry[1];
};
/**
* @param {*} key
* @param {*} value
* @returns {void}
*/
class_1.prototype.set = function (key, value) {
var index = getIndex(this.__entries__, key);
if (~index) {
this.__entries__[index][1] = value;
}
else {
this.__entries__.push([key, value]);
}
};
/**
* @param {*} key
* @returns {void}
*/
class_1.prototype.delete = function (key) {
var entries = this.__entries__;
var index = getIndex(entries, key);
if (~index) {
entries.splice(index, 1);
}
};
/**
* @param {*} key
* @returns {void}
*/
class_1.prototype.has = function (key) {
return !!~getIndex(this.__entries__, key);
};
/**
* @returns {void}
*/
class_1.prototype.clear = function () {
this.__entries__.splice(0);
};
/**
* @param {Function} callback
* @param {*} [ctx=null]
* @returns {void}
*/
class_1.prototype.forEach = function (callback, ctx) {
if (ctx === void 0) { ctx = null; }
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
var entry = _a[_i];
callback.call(ctx, entry[1], entry[0]);
}
};
return class_1;
}());
})();
/**
* Detects whether window and document objects are available in current environment.
*/
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
// Returns global object of a current environment.
var global$1 = (function () {
if (typeof global !== 'undefined' && global.Math === Math) {
return global;
}
if (typeof self !== 'undefined' && self.Math === Math) {
return self;
}
if (typeof window !== 'undefined' && window.Math === Math) {
return window;
}
// eslint-disable-next-line no-new-func
return Function('return this')();
})();
/**
* A shim for the requestAnimationFrame which falls back to the setTimeout if
* first one is not supported.
*
* @returns {number} Requests' identifier.
*/
var requestAnimationFrame$1 = (function () {
if (typeof requestAnimationFrame === 'function') {
// It's required to use a bounded function because IE sometimes throws
// an "Invalid calling object" error if rAF is invoked without the global
// object on the left hand side.
return requestAnimationFrame.bind(global$1);
}
return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
})();
// Defines minimum timeout before adding a trailing call.
var trailingTimeout = 2;
/**
* Creates a wrapper function which ensures that provided callback will be
* invoked only once during the specified delay period.
*
* @param {Function} callback - Function to be invoked after the delay period.
* @param {number} delay - Delay after which to invoke callback.
* @returns {Function}
*/
function throttle (callback, delay) {
var leadingCall = false, trailingCall = false, lastCallTime = 0;
/**
* Invokes the original callback function and schedules new invocation if
* the "proxy" was called during current request.
*
* @returns {void}
*/
function resolvePending() {
if (leadingCall) {
leadingCall = false;
callback();
}
if (trailingCall) {
proxy();
}
}
/**
* Callback invoked after the specified delay. It will further postpone
* invocation of the original function delegating it to the
* requestAnimationFrame.
*
* @returns {void}
*/
function timeoutCallback() {
requestAnimationFrame$1(resolvePending);
}
/**
* Schedules invocation of the original function.
*
* @returns {void}
*/
function proxy() {
var timeStamp = Date.now();
if (leadingCall) {
// Reject immediately following calls.
if (timeStamp - lastCallTime < trailingTimeout) {
return;
}
// Schedule new call to be in invoked when the pending one is resolved.
// This is important for "transitions" which never actually start
// immediately so there is a chance that we might miss one if change
// happens amids the pending invocation.
trailingCall = true;
}
else {
leadingCall = true;
trailingCall = false;
setTimeout(timeoutCallback, delay);
}
lastCallTime = timeStamp;
}
return proxy;
}
// Minimum delay before invoking the update of observers.
var REFRESH_DELAY = 20;
// A list of substrings of CSS properties used to find transition events that
// might affect dimensions of observed elements.
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
// Check if MutationObserver is available.
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
/**
* Singleton controller class which handles updates of ResizeObserver instances.
*/
var ResizeObserverController = /** @class */ (function () {
/**
* Creates a new instance of ResizeObserverController.
*
* @private
*/
function ResizeObserverController() {
/**
* Indicates whether DOM listeners have been added.
*
* @private {boolean}
*/
this.connected_ = false;
/**
* Tells that controller has subscribed for Mutation Events.
*
* @private {boolean}
*/
this.mutationEventsAdded_ = false;
/**
* Keeps reference to the instance of MutationObserver.
*
* @private {MutationObserver}
*/
this.mutationsObserver_ = null;
/**
* A list of connected observers.
*
* @private {Array<ResizeObserverSPI>}
*/
this.observers_ = [];
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
}
/**
* Adds observer to observers list.
*
* @param {ResizeObserverSPI} observer - Observer to be added.
* @returns {void}
*/
ResizeObserverController.prototype.addObserver = function (observer) {
if (!~this.observers_.indexOf(observer)) {
this.observers_.push(observer);
}
// Add listeners if they haven't been added yet.
if (!this.connected_) {
this.connect_();
}
};
/**
* Removes observer from observers list.
*
* @param {ResizeObserverSPI} observer - Observer to be removed.
* @returns {void}
*/
ResizeObserverController.prototype.removeObserver = function (observer) {
var observers = this.observers_;
var index = observers.indexOf(observer);
// Remove observer if it's present in registry.
if (~index) {
observers.splice(index, 1);
}
// Remove listeners if controller has no connected observers.
if (!observers.length && this.connected_) {
this.disconnect_();
}
};
/**
* Invokes the update of observers. It will continue running updates insofar
* it detects changes.
*
* @returns {void}
*/
ResizeObserverController.prototype.refresh = function () {
var changesDetected = this.updateObservers_();
// Continue running updates if changes have been detected as there might
// be future ones caused by CSS transitions.
if (changesDetected) {
this.refresh();
}
};
/**
* Updates every observer from observers list and notifies them of queued
* entries.
*
* @private
* @returns {boolean} Returns "true" if any observer has detected changes in
* dimensions of it's elements.
*/
ResizeObserverController.prototype.updateObservers_ = function () {
// Collect observers that have active observations.
var activeObservers = this.observers_.filter(function (observer) {
return observer.gatherActive(), observer.hasActive();
});
// Deliver notifications in a separate cycle in order to avoid any
// collisions between observers, e.g. when multiple instances of
// ResizeObserver are tracking the same element and the callback of one
// of them changes content dimensions of the observed target. Sometimes
// this may result in notifications being blocked for the rest of observers.
activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
return activeObservers.length > 0;
};
/**
* Initializes DOM listeners.
*
* @private
* @returns {void}
*/
ResizeObserverController.prototype.connect_ = function () {
// Do nothing if running in a non-browser environment or if listeners
// have been already added.
if (!isBrowser || this.connected_) {
return;
}
// Subscription to the "Transitionend" event is used as a workaround for
// delayed transitions. This way it's possible to capture at least the
// final state of an element.
document.addEventListener('transitionend', this.onTransitionEnd_);
window.addEventListener('resize', this.refresh);
if (mutationObserverSupported) {
this.mutationsObserver_ = new MutationObserver(this.refresh);
this.mutationsObserver_.observe(document, {
attributes: true,
childList: true,
characterData: true,
subtree: true
});
}
else {
document.addEventListener('DOMSubtreeModified', this.refresh);
this.mutationEventsAdded_ = true;
}
this.connected_ = true;
};
/**
* Removes DOM listeners.
*
* @private
* @returns {void}
*/
ResizeObserverController.prototype.disconnect_ = function () {
// Do nothing if running in a non-browser environment or if listeners
// have been already removed.
if (!isBrowser || !this.connected_) {
return;
}
document.removeEventListener('transitionend', this.onTransitionEnd_);
window.removeEventListener('resize', this.refresh);
if (this.mutationsObserver_) {
this.mutationsObserver_.disconnect();
}
if (this.mutationEventsAdded_) {
document.removeEventListener('DOMSubtreeModified', this.refresh);
}
this.mutationsObserver_ = null;
this.mutationEventsAdded_ = false;
this.connected_ = false;
};
/**
* "Transitionend" event handler.
*
* @private
* @param {TransitionEvent} event
* @returns {void}
*/
ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
// Detect whether transition may affect dimensions of an element.
var isReflowProperty = transitionKeys.some(function (key) {
return !!~propertyName.indexOf(key);
});
if (isReflowProperty) {
this.refresh();
}
};
/**
* Returns instance of the ResizeObserverController.
*
* @returns {ResizeObserverController}
*/
ResizeObserverController.getInstance = function () {
if (!this.instance_) {
this.instance_ = new ResizeObserverController();
}
return this.instance_;
};
/**
* Holds reference to the controller's instance.
*
* @private {ResizeObserverController}
*/
ResizeObserverController.instance_ = null;
return ResizeObserverController;
}());
/**
* Defines non-writable/enumerable properties of the provided target object.
*
* @param {Object} target - Object for which to define properties.
* @param {Object} props - Properties to be defined.
* @returns {Object} Target object.
*/
var defineConfigurable = (function (target, props) {
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
var key = _a[_i];
Object.defineProperty(target, key, {
value: props[key],
enumerable: false,
writable: false,
configurable: true
});
}
return target;
});
/**
* Returns the global object associated with provided element.
*
* @param {Object} target
* @returns {Object}
*/
var getWindowOf = (function (target) {
// Assume that the element is an instance of Node, which means that it
// has the "ownerDocument" property from which we can retrieve a
// corresponding global object.
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
// Return the local global object if it's not possible extract one from
// provided element.
return ownerGlobal || global$1;
});
// Placeholder of an empty content rectangle.
var emptyRect = createRectInit(0, 0, 0, 0);
/**
* Converts provided string to a number.
*
* @param {number|string} value
* @returns {number}
*/
function toFloat(value) {
return parseFloat(value) || 0;
}
/**
* Extracts borders size from provided styles.
*
* @param {CSSStyleDeclaration} styles
* @param {...string} positions - Borders positions (top, right, ...)
* @returns {number}
*/
function getBordersSize(styles) {
var positions = [];
for (var _i = 1; _i < arguments.length; _i++) {
positions[_i - 1] = arguments[_i];
}
return positions.reduce(function (size, position) {
var value = styles['border-' + position + '-width'];
return size + toFloat(value);
}, 0);
}
/**
* Extracts paddings sizes from provided styles.
*
* @param {CSSStyleDeclaration} styles
* @returns {Object} Paddings box.
*/
function getPaddings(styles) {
var positions = ['top', 'right', 'bottom', 'left'];
var paddings = {};
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
var position = positions_1[_i];
var value = styles['padding-' + position];
paddings[position] = toFloat(value);
}
return paddings;
}
/**
* Calculates content rectangle of provided SVG element.
*
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
* to be calculated.
* @returns {DOMRectInit}
*/
function getSVGContentRect(target) {
var bbox = target.getBBox();
return createRectInit(0, 0, bbox.width, bbox.height);
}
/**
* Calculates content rectangle of provided HTMLElement.
*
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
* @returns {DOMRectInit}
*/
function getHTMLElementContentRect(target) {
// Client width & height properties can't be
// used exclusively as they provide rounded values.
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
// By this condition we can catch all non-replaced inline, hidden and
// detached elements. Though elements with width & height properties less
// than 0.5 will be discarded as well.
//
// Without it we would need to implement separate methods for each of
// those cases and it's not possible to perform a precise and performance
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
// gives wrong results for elements with width & height less than 0.5.
if (!clientWidth && !clientHeight) {
return emptyRect;
}
var styles = getWindowOf(target).getComputedStyle(target);
var paddings = getPaddings(styles);
var horizPad = paddings.left + paddings.right;
var vertPad = paddings.top + paddings.bottom;
// Computed styles of width & height are being used because they are the
// only dimensions available to JS that contain non-rounded values. It could
// be possible to utilize the getBoundingClientRect if only it's data wasn't
// affected by CSS transformations let alone paddings, borders and scroll bars.
var width = toFloat(styles.width), height = toFloat(styles.height);
// Width & height include paddings and borders when the 'border-box' box
// model is applied (except for IE).
if (styles.boxSizing === 'border-box') {
// Following conditions are required to handle Internet Explorer which
// doesn't include paddings and borders to computed CSS dimensions.
//
// We can say that if CSS dimensions + paddings are equal to the "client"
// properties then it's either IE, and thus we don't need to subtract
// anything, or an element merely doesn't have paddings/borders styles.
if (Math.round(width + horizPad) !== clientWidth) {
width -= getBordersSize(styles, 'left', 'right') + horizPad;
}
if (Math.round(height + vertPad) !== clientHeight) {
height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
}
}
// Following steps can't be applied to the document's root element as its
// client[Width/Height] properties represent viewport area of the window.
// Besides, it's as well not necessary as the <html> itself neither has
// rendered scroll bars nor it can be clipped.
if (!isDocumentElement(target)) {
// In some browsers (only in Firefox, actually) CSS width & height
// include scroll bars size which can be removed at this step as scroll
// bars are the only difference between rounded dimensions + paddings
// and "client" properties, though that is not always true in Chrome.
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
// Chrome has a rather weird rounding of "client" properties.
// E.g. for an element with content width of 314.2px it sometimes gives
// the client width of 315px and for the width of 314.7px it may give
// 314px. And it doesn't happen all the time. So just ignore this delta
// as a non-relevant.
if (Math.abs(vertScrollbar) !== 1) {
width -= vertScrollbar;
}
if (Math.abs(horizScrollbar) !== 1) {
height -= horizScrollbar;
}
}
return createRectInit(paddings.left, paddings.top, width, height);
}
/**
* Checks whether provided element is an instance of the SVGGraphicsElement.
*
* @param {Element} target - Element to be checked.
* @returns {boolean}
*/
var isSVGGraphicsElement = (function () {
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
// interface.
if (typeof SVGGraphicsElement !== 'undefined') {
return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
}
// If it's so, then check that element is at least an instance of the
// SVGElement and that it has the "getBBox" method.
// eslint-disable-next-line no-extra-parens
return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
typeof target.getBBox === 'function'); };
})();
/**
* Checks whether provided element is a document element (<html>).
*
* @param {Element} target - Element to be checked.
* @returns {boolean}
*/
function isDocumentElement(target) {
return target === getWindowOf(target).document.documentElement;
}
/**
* Calculates an appropriate content rectangle for provided html or svg element.
*
* @param {Element} target - Element content rectangle of which needs to be calculated.
* @returns {DOMRectInit}
*/
function getContentRect(target) {
if (!isBrowser) {
return emptyRect;
}
if (isSVGGraphicsElement(target)) {
return getSVGContentRect(target);
}
return getHTMLElementContentRect(target);
}
/**
* Creates rectangle with an interface of the DOMRectReadOnly.
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
*
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
* @returns {DOMRectReadOnly}
*/
function createReadOnlyRect(_a) {
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
var rect = Object.create(Constr.prototype);
// Rectangle's properties are not writable and non-enumerable.
defineConfigurable(rect, {
x: x, y: y, width: width, height: height,
top: y,
right: x + width,
bottom: height + y,
left: x
});
return rect;
}
/**
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
*
* @param {number} x - X coordinate.
* @param {number} y - Y coordinate.
* @param {number} width - Rectangle's width.
* @param {number} height - Rectangle's height.
* @returns {DOMRectInit}
*/
function createRectInit(x, y, width, height) {
return { x: x, y: y, width: width, height: height };
}
/**
* Class that is responsible for computations of the content rectangle of
* provided DOM element and for keeping track of it's changes.
*/
var ResizeObservation = /** @class */ (function () {
/**
* Creates an instance of ResizeObservation.
*
* @param {Element} target - Element to be observed.
*/
function ResizeObservation(target) {
/**
* Broadcasted width of content rectangle.
*
* @type {number}
*/
this.broadcastWidth = 0;
/**
* Broadcasted height of content rectangle.
*
* @type {number}
*/
this.broadcastHeight = 0;
/**
* Reference to the last observed content rectangle.
*
* @private {DOMRectInit}
*/
this.contentRect_ = createRectInit(0, 0, 0, 0);
this.target = target;
}
/**
* Updates content rectangle and tells whether it's width or height properties
* have changed since the last broadcast.
*
* @returns {boolean}
*/
ResizeObservation.prototype.isActive = function () {
var rect = getContentRect(this.target);
this.contentRect_ = rect;
return (rect.width !== this.broadcastWidth ||
rect.height !== this.broadcastHeight);
};
/**
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
* from the corresponding properties of the last observed content rectangle.
*
* @returns {DOMRectInit} Last observed content rectangle.
*/
ResizeObservation.prototype.broadcastRect = function () {
var rect = this.contentRect_;
this.broadcastWidth = rect.width;
this.broadcastHeight = rect.height;
return rect;
};
return ResizeObservation;
}());
var ResizeObserverEntry = /** @class */ (function () {
/**
* Creates an instance of ResizeObserverEntry.
*
* @param {Element} target - Element that is being observed.
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
*/
function ResizeObserverEntry(target, rectInit) {
var contentRect = createReadOnlyRect(rectInit);
// According to the specification following properties are not writable
// and are also not enumerable in the native implementation.
//
// Property accessors are not being used as they'd require to define a
// private WeakMap storage which may cause memory leaks in browsers that
// don't support this type of collections.
defineConfigurable(this, { target: target, contentRect: contentRect });
}
return ResizeObserverEntry;
}());
var ResizeObserverSPI = /** @class */ (function () {
/**
* Creates a new instance of ResizeObserver.
*
* @param {ResizeObserverCallback} callback - Callback function that is invoked
* when one of the observed elements changes it's content dimensions.
* @param {ResizeObserverController} controller - Controller instance which
* is responsible for the updates of observer.
* @param {ResizeObserver} callbackCtx - Reference to the public
* ResizeObserver instance which will be passed to callback function.
*/
function ResizeObserverSPI(callback, controller, callbackCtx) {
/**
* Collection of resize observations that have detected changes in dimensions
* of elements.
*
* @private {Array<ResizeObservation>}
*/
this.activeObservations_ = [];
/**
* Registry of the ResizeObservation instances.
*
* @private {Map<Element, ResizeObservation>}
*/
this.observations_ = new MapShim();
if (typeof callback !== 'function') {
throw new TypeError('The callback provided as parameter 1 is not a function.');
}
this.callback_ = callback;
this.controller_ = controller;
this.callbackCtx_ = callbackCtx;
}
/**
* Starts observing provided element.
*
* @param {Element} target - Element to be observed.
* @returns {void}
*/
ResizeObserverSPI.prototype.observe = function (target) {
if (!arguments.length) {
throw new TypeError('1 argument required, but only 0 present.');
}
// Do nothing if current environment doesn't have the Element interface.
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
return;
}
if (!(target instanceof getWindowOf(target).Element)) {
throw new TypeError('parameter 1 is not of type "Element".');
}
var observations = this.observations_;
// Do nothing if element is already being observed.
if (observations.has(target)) {
return;
}
observations.set(target, new ResizeObservation(target));
this.controller_.addObserver(this);
// Force the update of observations.
this.controller_.refresh();
};
/**
* Stops observing provided element.
*
* @param {Element} target - Element to stop observing.
* @returns {void}
*/
ResizeObserverSPI.prototype.unobserve = function (target) {
if (!arguments.length) {
throw new TypeError('1 argument required, but only 0 present.');
}
// Do nothing if current environment doesn't have the Element interface.
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
return;
}
if (!(target instanceof getWindowOf(target).Element)) {
throw new TypeError('parameter 1 is not of type "Element".');
}
var observations = this.observations_;
// Do nothing if element is not being observed.
if (!observations.has(target)) {
return;
}
observations.delete(target);
if (!observations.size) {
this.controller_.removeObserver(this);
}
};
/**
* Stops observing all elements.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.disconnect = function () {
this.clearActive();
this.observations_.clear();
this.controller_.removeObserver(this);
};
/**
* Collects observation instances the associated element of which has changed
* it's content rectangle.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.gatherActive = function () {
var _this = this;
this.clearActive();
this.observations_.forEach(function (observation) {
if (observation.isActive()) {
_this.activeObservations_.push(observation);
}
});
};
/**
* Invokes initial callback function with a list of ResizeObserverEntry
* instances collected from active resize observations.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.broadcastActive = function () {
// Do nothing if observer doesn't have active observations.
if (!this.hasActive()) {
return;
}
var ctx = this.callbackCtx_;
// Create ResizeObserverEntry instance for every active observation.
var entries = this.activeObservations_.map(function (observation) {
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
});
this.callback_.call(ctx, entries, ctx);
this.clearActive();
};
/**
* Clears the collection of active observations.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.clearActive = function () {
this.activeObservations_.splice(0);
};
/**
* Tells whether observer has active observations.
*
* @returns {boolean}
*/
ResizeObserverSPI.prototype.hasActive = function () {
return this.activeObservations_.length > 0;
};
return ResizeObserverSPI;
}());
// Registry of internal observers. If WeakMap is not available use current shim
// for the Map collection as it has all required methods and because WeakMap
// can't be fully polyfilled anyway.
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
/**
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
* exposing only those methods and properties that are defined in the spec.
*/
var ResizeObserver = /** @class */ (function () {
/**
* Creates a new instance of ResizeObserver.
*
* @param {ResizeObserverCallback} callback - Callback that is invoked when
* dimensions of the observed elements change.
*/
function ResizeObserver(callback) {
if (!(this instanceof ResizeObserver)) {
throw new TypeError('Cannot call a class as a function.');
}
if (!arguments.length) {
throw new TypeError('1 argument required, but only 0 present.');
}
var controller = ResizeObserverController.getInstance();
var observer = new ResizeObserverSPI(callback, controller, this);
observers.set(this, observer);
}
return ResizeObserver;
}());
// Expose public methods of ResizeObserver.
[
'observe',
'unobserve',
'disconnect'
].forEach(function (method) {
ResizeObserver.prototype[method] = function () {
var _a;
return (_a = observers.get(this))[method].apply(_a, arguments);
};
});
var index = (function () {
// Export existing implementation if available.
if (typeof global$1.ResizeObserver !== 'undefined') {
return global$1.ResizeObserver;
}
return ResizeObserver;
})();
export default index;
@@ -0,0 +1,64 @@
const JsObjOutputBuilder = require("./OutputBuilders/JsObjBuilder");
const defaultOptions = {
preserveOrder: false,
removeNSPrefix: false, // remove NS from tag name or attribute name if true
//ignoreRootElement : false,
stopNodes: [], //nested tags will not be parsed even for errors
// isArray: () => false, //User will set it
htmlEntities: false,
// skipEmptyListItem: false
tags:{
unpaired: [],
nameFor:{
cdata: false,
comment: false,
text: '#text'
},
separateTextProperty: false,
},
attributes:{
ignore: false,
booleanType: true,
entities: true,
},
// select: ["img[src]"],
// stop: ["anim", "[ads]"]
only: [], // rest tags will be skipped. It will result in flat array
hierarchy: false, //will be used when a particular tag is set to be parsed.
skip: [], // will be skipped from parse result. on('skip') will be triggered
select: [], // on('select', tag => tag ) will be called if match
stop: [], //given tagPath will not be parsed. innerXML will be set as string value
OutputBuilder: new JsObjOutputBuilder(),
};
const buildOptions = function(options) {
const finalOptions = { ... defaultOptions};
copyProperties(finalOptions,options)
return finalOptions;
};
function copyProperties(target, source) {
for (let key in source) {
if (source.hasOwnProperty(key)) {
if (key === 'OutputBuilder') {
target[key] = source[key];
}else if (typeof source[key] === 'object' && !Array.isArray(source[key])) {
// Recursively copy nested properties
if (typeof target[key] === 'undefined') {
target[key] = {};
}
copyProperties(target[key], source[key]);
} else {
// Copy non-nested properties
target[key] = source[key];
}
}
}
}
exports.buildOptions = buildOptions;
exports.defaultOptions = defaultOptions;
@@ -0,0 +1 @@
{"version":3,"file":"isParentBindingConstraints.spec.d.ts","sourceRoot":"","sources":["../../../../src/binding/calculations/isParentBindingConstraints.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/estree`
# Summary
This package contains type definitions for estree (https://github.com/estree/estree).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree.
### Additional Details
* Last updated: Fri, 06 Jun 2025 00:04:33 GMT
* Dependencies: none
# Credits
These definitions were written by [RReverser](https://github.com/RReverser).
@@ -0,0 +1,3 @@
declare const _default: (value: unknown) => value is boolean;
export default _default;
//# sourceMappingURL=isBoolean.d.ts.map
@@ -0,0 +1,15 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## v1.0.0 - 2024-12-30
### Commits
- Initial implementation, tests, readme, types [`7036fc9`](https://github.com/ljharb/set-proto/commit/7036fc9128568b1ff0b75d1955f7f364a4394079)
- Initial commit [`dd9bedd`](https://github.com/ljharb/set-proto/commit/dd9bedd41db6ff3efa00c84fcac8ae34558bf6ee)
- npm init [`63915de`](https://github.com/ljharb/set-proto/commit/63915dee39422698275fabe9876eb141e04390dd)
- Only apps should have lockfiles [`deffdae`](https://github.com/ljharb/set-proto/commit/deffdae5b989a9305247a4db314222ecc0a99280)
@@ -0,0 +1,41 @@
var arrayMap = require('./_arrayMap'),
baseIntersection = require('./_baseIntersection'),
baseRest = require('./_baseRest'),
castArrayLikeObject = require('./_castArrayLikeObject'),
last = require('./last');
/**
* This method is like `_.intersection` except that it accepts `comparator`
* which is invoked to compare elements of `arrays`. The order and references
* of result values are determined by the first array. The comparator is
* invoked with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of intersecting values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.intersectionWith(objects, others, _.isEqual);
* // => [{ 'x': 1, 'y': 2 }]
*/
var intersectionWith = baseRest(function(arrays) {
var comparator = last(arrays),
mapped = arrayMap(arrays, castArrayLikeObject);
comparator = typeof comparator == 'function' ? comparator : undefined;
if (comparator) {
mapped.pop();
}
return (mapped.length && mapped[0] === arrays[0])
? baseIntersection(mapped, undefined, comparator)
: [];
});
module.exports = intersectionWith;
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function instanceCachingFactory(factoryFunc) {
let instance;
return (dependencyContainer) => {
if (instance == undefined) {
instance = factoryFunc(dependencyContainer);
}
return instance;
};
}
exports.default = instanceCachingFactory;
@@ -0,0 +1 @@
{"version":3,"file":"ipv4.js","sourceRoot":"","sources":["../src/ipv4.ts"],"names":[],"mappings":";AAAA,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,iDAAmC;AACnC,0DAA4C;AAC5C,mDAA+C;AAE/C;;;;GAIG;AACH,MAAa,QAAQ;IAUnB,YAAY,OAAe;QAP3B,WAAM,GAAW,SAAS,CAAC,MAAM,CAAC;QAClC,kBAAa,GAAa,EAAE,CAAC;QAC7B,iBAAY,GAAW,EAAE,CAAC;QAC1B,WAAM,GAAW,KAAK,CAAC;QACvB,eAAU,GAAW,EAAE,CAAC;QACxB,OAAE,GAAY,IAAI,CAAC;QA0DnB;;;;;WAKG;QACH,cAAS,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QA0Q7C;;;;;WAKG;QACH,eAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QA7U7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,MAAM,MAAM,GAAG,SAAS,CAAC,gBAAgB,CAAC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MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC;gBAClE,MAAM,IAAI,4BAAY,CAAC,8CAA8C,CAAC,CAAC;YACzE,CAAC;QACH,CAAC;QAELine truncated
@@ -0,0 +1,7 @@
export function isNotNullish<T>(v: T | null | undefined): v is T {
return v != null
}
export function filterNullishValues<T>(map?: Map<any, T>) {
return [...(map?.values() ?? [])].filter(isNotNullish) as NonNullable<T>[]
}
@@ -0,0 +1,20 @@
declare global {
let suite: typeof import('vitest')['suite']
let test: typeof import('vitest')['test']
let chai: typeof import("vitest")["chai"]
let describe: typeof import('vitest')['describe']
let it: typeof import('vitest')['it']
let expectTypeOf: typeof import('vitest')['expectTypeOf']
let assertType: typeof import('vitest')['assertType']
let expect: typeof import('vitest')['expect']
let assert: typeof import('vitest')['assert']
let vitest: typeof import('vitest')['vitest']
let vi: typeof import('vitest')['vitest']
let beforeAll: typeof import('vitest')['beforeAll']
let afterAll: typeof import('vitest')['afterAll']
let beforeEach: typeof import('vitest')['beforeEach']
let afterEach: typeof import('vitest')['afterEach']
let onTestFailed: typeof import('vitest')['onTestFailed']
let onTestFinished: typeof import('vitest')['onTestFinished']
}
export {}
@@ -0,0 +1,28 @@
import { DOMAttributes } from "@react-types/shared";
import React, { JSXElementConstructor, ReactNode } from "react";
export interface VisuallyHiddenProps extends DOMAttributes {
/** The content to visually hide. */
children?: ReactNode;
/**
* The element type for the container.
* @default 'div'
*/
elementType?: string | JSXElementConstructor<any>;
/** Whether the element should become visible on focus, for example skip links. */
isFocusable?: boolean;
}
export interface VisuallyHiddenAria {
visuallyHiddenProps: DOMAttributes;
}
/**
* Provides props for an element that hides its children visually
* but keeps content visible to assistive technology.
*/
export function useVisuallyHidden(props?: VisuallyHiddenProps): VisuallyHiddenAria;
/**
* VisuallyHidden hides its children visually, while keeping content visible
* to screen readers.
*/
export function VisuallyHidden(props: VisuallyHiddenProps): React.JSX.Element;
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,588 @@
/**
* An *action* is a plain object that represents an intention to change the
* state. Actions are the only way to get data into the store. Any data,
* whether from UI events, network callbacks, or other sources such as
* WebSockets needs to eventually be dispatched as actions.
*
* Actions must have a `type` field that indicates the type of action being
* performed. Types can be defined as constants and imported from another
* module. These must be strings, as strings are serializable.
*
* Other than `type`, the structure of an action object is really up to you.
* If you're interested, check out Flux Standard Action for recommendations on
* how actions should be constructed.
*
* @template T the type of the action's `type` tag.
*/
type Action<T extends string = string> = {
type: T;
};
/**
* An Action type which accepts any other properties.
* This is mainly for the use of the `Reducer` type.
* This is not part of `Action` itself to prevent types that extend `Action` from
* having an index signature.
*/
interface UnknownAction extends Action {
[extraProps: string]: unknown;
}
/**
* An Action type which accepts any other properties.
* This is mainly for the use of the `Reducer` type.
* This is not part of `Action` itself to prevent types that extend `Action` from
* having an index signature.
* @deprecated use Action or UnknownAction instead
*/
interface AnyAction extends Action {
[extraProps: string]: any;
}
/**
* An *action creator* is, quite simply, a function that creates an action. Do
* not confuse the two terms—again, an action is a payload of information, and
* an action creator is a factory that creates an action.
*
* Calling an action creator only produces an action, but does not dispatch
* it. You need to call the store's `dispatch` function to actually cause the
* mutation. Sometimes we say *bound action creators* to mean functions that
* call an action creator and immediately dispatch its result to a specific
* store instance.
*
* If an action creator needs to read the current state, perform an API call,
* or cause a side effect, like a routing transition, it should return an
* async action instead of an action.
*
* @template A Returned action type.
*/
interface ActionCreator<A, P extends any[] = any[]> {
(...args: P): A;
}
/**
* Object whose values are action creator functions.
*/
interface ActionCreatorsMapObject<A = any, P extends any[] = any[]> {
[key: string]: ActionCreator<A, P>;
}
/**
* A *reducer* is a function that accepts
* an accumulation and a value and returns a new accumulation. They are used
* to reduce a collection of values down to a single value
*
* Reducers are not unique to Redux—they are a fundamental concept in
* functional programming. Even most non-functional languages, like
* JavaScript, have a built-in API for reducing. In JavaScript, it's
* `Array.prototype.reduce()`.
*
* In Redux, the accumulated value is the state object, and the values being
* accumulated are actions. Reducers calculate a new state given the previous
* state and an action. They must be *pure functions*—functions that return
* the exact same output for given inputs. They should also be free of
* side-effects. This is what enables exciting features like hot reloading and
* time travel.
*
* Reducers are the most important concept in Redux.
*
* *Do not put API calls into reducers.*
*
* @template S The type of state consumed and produced by this reducer.
* @template A The type of actions the reducer can potentially respond to.
* @template PreloadedState The type of state consumed by this reducer the first time it's called.
*/
type Reducer<S = any, A extends Action = UnknownAction, PreloadedState = S> = (state: S | PreloadedState | undefined, action: A) => S;
/**
* Object whose values correspond to different reducer functions.
*
* @template S The combined state of the reducers.
* @template A The type of actions the reducers can potentially respond to.
* @template PreloadedState The combined preloaded state of the reducers.
*/
type ReducersMapObject<S = any, A extends Action = UnknownAction, PreloadedState = S> = keyof PreloadedState extends keyof S ? {
[K in keyof S]: Reducer<S[K], A, K extends keyof PreloadedState ? PreloadedState[K] : never>;
} : never;
/**
* Infer a combined state shape from a `ReducersMapObject`.
*
* @template M Object map of reducers as provided to `combineReducers(map: M)`.
*/
type StateFromReducersMapObject<M> = M[keyof M] extends Reducer<any, any, any> | undefined ? {
[P in keyof M]: M[P] extends Reducer<infer S, any, any> ? S : never;
} : never;
/**
* Infer reducer union type from a `ReducersMapObject`.
*
* @template M Object map of reducers as provided to `combineReducers(map: M)`.
*/
type ReducerFromReducersMapObject<M> = M[keyof M] extends Reducer<any, any, any> | undefined ? M[keyof M] : never;
/**
* Infer action type from a reducer function.
*
* @template R Type of reducer.
*/
type ActionFromReducer<R> = R extends Reducer<any, infer A, any> ? A : never;
/**
* Infer action union type from a `ReducersMapObject`.
*
* @template M Object map of reducers as provided to `combineReducers(map: M)`.
*/
type ActionFromReducersMapObject<M> = ActionFromReducer<ReducerFromReducersMapObject<M>>;
/**
* Infer a combined preloaded state shape from a `ReducersMapObject`.
*
* @template M Object map of reducers as provided to `combineReducers(map: M)`.
*/
type PreloadedStateShapeFromReducersMapObject<M> = M[keyof M] extends Reducer<any, any, any> | undefined ? {
[P in keyof M]: M[P] extends (inputState: infer InputState, action: UnknownAction) => any ? InputState : never;
} : never;
/**
* A *dispatching function* (or simply *dispatch function*) is a function that
* accepts an action or an async action; it then may or may not dispatch one
* or more actions to the store.
*
* We must distinguish between dispatching functions in general and the base
* `dispatch` function provided by the store instance without any middleware.
*
* The base dispatch function *always* synchronously sends an action to the
* store's reducer, along with the previous state returned by the store, to
* calculate a new state. It expects actions to be plain objects ready to be
* consumed by the reducer.
*
* Middleware wraps the base dispatch function. It allows the dispatch
* function to handle async actions in addition to actions. Middleware may
* transform, delay, ignore, or otherwise interpret actions or async actions
* before passing them to the next middleware.
*
* @template A The type of things (actions or otherwise) which may be
* dispatched.
*/
interface Dispatch<A extends Action = UnknownAction> {
<T extends A>(action: T, ...extraArgs: any[]): T;
}
/**
* Function to remove listener added by `Store.subscribe()`.
*/
interface Unsubscribe {
(): void;
}
type ListenerCallback = () => void;
declare global {
interface SymbolConstructor {
readonly observable: symbol;
}
}
/**
* A minimal observable of state changes.
* For more information, see the observable proposal:
* https://github.com/tc39/proposal-observable
*/
type Observable<T> = {
/**
* The minimal observable subscription method.
* @param {Object} observer Any object that can be used as an observer.
* The observer object should have a `next` method.
* @returns {subscription} An object with an `unsubscribe` method that can
* be used to unsubscribe the observable from the store, and prevent further
* emission of values from the observable.
*/
subscribe: (observer: Observer<T>) => {
unsubscribe: Unsubscribe;
};
[Symbol.observable](): Observable<T>;
};
/**
* An Observer is used to receive data from an Observable, and is supplied as
* an argument to subscribe.
*/
type Observer<T> = {
next?(value: T): void;
};
/**
* A store is an object that holds the application's state tree.
* There should only be a single store in a Redux app, as the composition
* happens on the reducer level.
*
* @template S The type of state held by this store.
* @template A the type of actions which may be dispatched by this store.
* @template StateExt any extension to state from store enhancers
*/
interface Store<S = any, A extends Action = UnknownAction, StateExt extends unknown = unknown> {
/**
* Dispatches an action. It is the only way to trigger a state change.
*
* The `reducer` function, used to create the store, will be called with the
* current state tree and the given `action`. Its return value will be
* considered the **next** state of the tree, and the change listeners will
* be notified.
*
* The base implementation only supports plain object actions. If you want
* to dispatch a Promise, an Observable, a thunk, or something else, you
* need to wrap your store creating function into the corresponding
* middleware. For example, see the documentation for the `redux-thunk`
* package. Even the middleware will eventually dispatch plain object
* actions using this method.
*
* @param action A plain object representing “what changed”. It is a good
* idea to keep actions serializable so you can record and replay user
* sessions, or use the time travelling `redux-devtools`. An action must
* have a `type` property which may not be `undefined`. It is a good idea
* to use string constants for action types.
*
* @returns For convenience, the same action object you dispatched.
*
* Note that, if you use a custom middleware, it may wrap `dispatch()` to
* return something else (for example, a Promise you can await).
*/
dispatch: Dispatch<A>;
/**
* Reads the state tree managed by the store.
*
* @returns The current state tree of your application.
*/
getState(): S & StateExt;
/**
* Adds a change listener. It will be called any time an action is
* dispatched, and some part of the state tree may potentially have changed.
* You may then call `getState()` to read the current state tree inside the
* callback.
*
* You may call `dispatch()` from a change listener, with the following
* caveats:
*
* 1. The subscriptions are snapshotted just before every `dispatch()` call.
* If you subscribe or unsubscribe while the listeners are being invoked,
* this will not have any effect on the `dispatch()` that is currently in
* progress. However, the next `dispatch()` call, whether nested or not,
* will use a more recent snapshot of the subscription list.
*
* 2. The listener should not expect to see all states changes, as the state
* might have been updated multiple times during a nested `dispatch()` before
* the listener is called. It is, however, guaranteed that all subscribers
* registered before the `dispatch()` started will be called with the latest
* state by the time it exits.
*
* @param listener A callback to be invoked on every dispatch.
* @returns A function to remove this change listener.
*/
subscribe(listener: ListenerCallback): Unsubscribe;
/**
* Replaces the reducer currently used by the store to calculate the state.
*
* You might need this if your app implements code splitting and you want to
* load some of the reducers dynamically. You might also need this if you
* implement a hot reloading mechanism for Redux.
*
* @param nextReducer The reducer for the store to use instead.
*/
replaceReducer(nextReducer: Reducer<S, A>): void;
/**
* Interoperability point for observable/reactive libraries.
* @returns {observable} A minimal observable of state changes.
* For more information, see the observable proposal:
* https://github.com/tc39/proposal-observable
*/
[Symbol.observable](): Observable<S & StateExt>;
}
type UnknownIfNonSpecific<T> = {} extends T ? unknown : T;
/**
* A store creator is a function that creates a Redux store. Like with
* dispatching function, we must distinguish the base store creator,
* `createStore(reducer, preloadedState)` exported from the Redux package, from
* store creators that are returned from the store enhancers.
*
* @template S The type of state to be held by the store.
* @template A The type of actions which may be dispatched.
* @template PreloadedState The initial state that is passed into the reducer.
* @template Ext Store extension that is mixed in to the Store type.
* @template StateExt State extension that is mixed into the state type.
*/
interface StoreCreator {
<S, A extends Action, Ext extends {} = {}, StateExt extends {} = {}>(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<Ext, StateExt>): Store<S, A, UnknownIfNonSpecific<StateExt>> & Ext;
<S, A extends Action, Ext extends {} = {}, StateExt extends {} = {}, PreloadedState = S>(reducer: Reducer<S, A, PreloadedState>, preloadedState?: PreloadedState | undefined, enhancer?: StoreEnhancer<Ext>): Store<S, A, UnknownIfNonSpecific<StateExt>> & Ext;
}
/**
* A store enhancer is a higher-order function that composes a store creator
* to return a new, enhanced store creator. This is similar to middleware in
* that it allows you to alter the store interface in a composable way.
*
* Store enhancers are much the same concept as higher-order components in
* React, which are also occasionally called “component enhancers”.
*
* Because a store is not an instance, but rather a plain-object collection of
* functions, copies can be easily created and modified without mutating the
* original store. There is an example in `compose` documentation
* demonstrating that.
*
* Most likely you'll never write a store enhancer, but you may use the one
* provided by the developer tools. It is what makes time travel possible
* without the app being aware it is happening. Amusingly, the Redux
* middleware implementation is itself a store enhancer.
*
* @template Ext Store extension that is mixed into the Store type.
* @template StateExt State extension that is mixed into the state type.
*/
type StoreEnhancer<Ext extends {} = {}, StateExt extends {} = {}> = <NextExt extends {}, NextStateExt extends {}>(next: StoreEnhancerStoreCreator<NextExt, NextStateExt>) => StoreEnhancerStoreCreator<NextExt & Ext, NextStateExt & StateExt>;
type StoreEnhancerStoreCreator<Ext extends {} = {}, StateExt extends {} = {}> = <S, A extends Action, PreloadedState>(reducer: Reducer<S, A, PreloadedState>, preloadedState?: PreloadedState | undefined) => Store<S, A, StateExt> & Ext;
/**
* @deprecated
*
* **We recommend using the `configureStore` method
* of the `@reduxjs/toolkit` package**, which replaces `createStore`.
*
* Redux Toolkit is our recommended approach for writing Redux logic today,
* including store setup, reducers, data fetching, and more.
*
* **For more details, please read this Redux docs page:**
* **https://redux.js.org/introduction/why-rtk-is-redux-today**
*
* `configureStore` from Redux Toolkit is an improved version of `createStore` that
* simplifies setup and helps avoid common bugs.
*
* You should not be using the `redux` core package by itself today, except for learning purposes.
* The `createStore` method from the core `redux` package will not be removed, but we encourage
* all users to migrate to using Redux Toolkit for all Redux code.
*
* If you want to use `createStore` without this visual deprecation warning, use
* the `legacy_createStore` import instead:
*
* `import { legacy_createStore as createStore} from 'redux'`
*
*/
declare function createStore<S, A extends Action, Ext extends {} = {}, StateExt extends {} = {}>(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<Ext, StateExt>): Store<S, A, UnknownIfNonSpecific<StateExt>> & Ext;
/**
* @deprecated
*
* **We recommend using the `configureStore` method
* of the `@reduxjs/toolkit` package**, which replaces `createStore`.
*
* Redux Toolkit is our recommended approach for writing Redux logic today,
* including store setup, reducers, data fetching, and more.
*
* **For more details, please read this Redux docs page:**
* **https://redux.js.org/introduction/why-rtk-is-redux-today**
*
* `configureStore` from Redux Toolkit is an improved version of `createStore` that
* simplifies setup and helps avoid common bugs.
*
* You should not be using the `redux` core package by itself today, except for learning purposes.
* The `createStore` method from the core `redux` package will not be removed, but we encourage
* all users to migrate to using Redux Toolkit for all Redux code.
*
* If you want to use `createStore` without this visual deprecation warning, use
* the `legacy_createStore` import instead:
*
* `import { legacy_createStore as createStore} from 'redux'`
*
*/
declare function createStore<S, A extends Action, Ext extends {} = {}, StateExt extends {} = {}, PreloadedState = S>(reducer: Reducer<S, A, PreloadedState>, preloadedState?: PreloadedState | undefined, enhancer?: StoreEnhancer<Ext, StateExt>): Store<S, A, UnknownIfNonSpecific<StateExt>> & Ext;
/**
* Creates a Redux store that holds the state tree.
*
* **We recommend using `configureStore` from the
* `@reduxjs/toolkit` package**, which replaces `createStore`:
* **https://redux.js.org/introduction/why-rtk-is-redux-today**
*
* The only way to change the data in the store is to call `dispatch()` on it.
*
* There should only be a single store in your app. To specify how different
* parts of the state tree respond to actions, you may combine several reducers
* into a single reducer function by using `combineReducers`.
*
* @param {Function} reducer A function that returns the next state tree, given
* the current state tree and the action to handle.
*
* @param {any} [preloadedState] The initial state. You may optionally specify it
* to hydrate the state from the server in universal apps, or to restore a
* previously serialized user session.
* If you use `combineReducers` to produce the root reducer function, this must be
* an object with the same shape as `combineReducers` keys.
*
* @param {Function} [enhancer] The store enhancer. You may optionally specify it
* to enhance the store with third-party capabilities such as middleware,
* time travel, persistence, etc. The only store enhancer that ships with Redux
* is `applyMiddleware()`.
*
* @returns {Store} A Redux store that lets you read the state, dispatch actions
* and subscribe to changes.
*/
declare function legacy_createStore<S, A extends Action, Ext extends {} = {}, StateExt extends {} = {}>(reducer: Reducer<S, A>, enhancer?: StoreEnhancer<Ext, StateExt>): Store<S, A, UnknownIfNonSpecific<StateExt>> & Ext;
/**
* Creates a Redux store that holds the state tree.
*
* **We recommend using `configureStore` from the
* `@reduxjs/toolkit` package**, which replaces `createStore`:
* **https://redux.js.org/introduction/why-rtk-is-redux-today**
*
* The only way to change the data in the store is to call `dispatch()` on it.
*
* There should only be a single store in your app. To specify how different
* parts of the state tree respond to actions, you may combine several reducers
* into a single reducer function by using `combineReducers`.
*
* @param {Function} reducer A function that returns the next state tree, given
* the current state tree and the action to handle.
*
* @param {any} [preloadedState] The initial state. You may optionally specify it
* to hydrate the state from the server in universal apps, or to restore a
* previously serialized user session.
* If you use `combineReducers` to produce the root reducer function, this must be
* an object with the same shape as `combineReducers` keys.
*
* @param {Function} [enhancer] The store enhancer. You may optionally specify it
* to enhance the store with third-party capabilities such as middleware,
* time travel, persistence, etc. The only store enhancer that ships with Redux
* is `applyMiddleware()`.
*
* @returns {Store} A Redux store that lets you read the state, dispatch actions
* and subscribe to changes.
*/
declare function legacy_createStore<S, A extends Action, Ext extends {} = {}, StateExt extends {} = {}, PreloadedState = S>(reducer: Reducer<S, A, PreloadedState>, preloadedState?: PreloadedState | undefined, enhancer?: StoreEnhancer<Ext, StateExt>): Store<S, A, UnknownIfNonSpecific<StateExt>> & Ext;
/**
* Turns an object whose values are different reducer functions, into a single
* reducer function. It will call every child reducer, and gather their results
* into a single state object, whose keys correspond to the keys of the passed
* reducer functions.
*
* @template S Combined state object type.
*
* @param reducers An object whose values correspond to different reducer
* functions that need to be combined into one. One handy way to obtain it
* is to use `import * as reducers` syntax. The reducers may never
* return undefined for any action. Instead, they should return their
* initial state if the state passed to them was undefined, and the current
* state for any unrecognized action.
*
* @returns A reducer function that invokes every reducer inside the passed
* object, and builds a state object with the same shape.
*/
declare function combineReducers<M>(reducers: M): M[keyof M] extends Reducer<any, any, any> | undefined ? Reducer<StateFromReducersMapObject<M>, ActionFromReducersMapObject<M>, Partial<PreloadedStateShapeFromReducersMapObject<M>>> : never;
/**
* Turns an object whose values are action creators, into an object with the
* same keys, but with every function wrapped into a `dispatch` call so they
* may be invoked directly. This is just a convenience method, as you can call
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
*
* For convenience, you can also pass an action creator as the first argument,
* and get a dispatch wrapped function in return.
*
* @param actionCreators An object whose values are action
* creator functions. One handy way to obtain it is to use `import * as`
* syntax. You may also pass a single function.
*
* @param dispatch The `dispatch` function available on your Redux
* store.
*
* @returns The object mimicking the original object, but with
* every action creator wrapped into the `dispatch` call. If you passed a
* function as `actionCreators`, the return value will also be a single
* function.
*/
declare function bindActionCreators<A, C extends ActionCreator<A>>(actionCreator: C, dispatch: Dispatch): C;
declare function bindActionCreators<A extends ActionCreator<any>, B extends ActionCreator<any>>(actionCreator: A, dispatch: Dispatch): B;
declare function bindActionCreators<A, M extends ActionCreatorsMapObject<A>>(actionCreators: M, dispatch: Dispatch): M;
declare function bindActionCreators<M extends ActionCreatorsMapObject, N extends ActionCreatorsMapObject>(actionCreators: M, dispatch: Dispatch): N;
interface MiddlewareAPI<D extends Dispatch = Dispatch, S = any> {
dispatch: D;
getState(): S;
}
/**
* A middleware is a higher-order function that composes a dispatch function
* to return a new dispatch function. It often turns async actions into
* actions.
*
* Middleware is composable using function composition. It is useful for
* logging actions, performing side effects like routing, or turning an
* asynchronous API call into a series of synchronous actions.
*
* @template DispatchExt Extra Dispatch signature added by this middleware.
* @template S The type of the state supported by this middleware.
* @template D The type of Dispatch of the store where this middleware is
* installed.
*/
interface Middleware<_DispatchExt = {}, // TODO: see if this can be used in type definition somehow (can't be removed, as is used to get final dispatch type)
S = any, D extends Dispatch = Dispatch> {
(api: MiddlewareAPI<D, S>): (next: (action: unknown) => unknown) => (action: unknown) => unknown;
}
/**
* Creates a store enhancer that applies middleware to the dispatch method
* of the Redux store. This is handy for a variety of tasks, such as expressing
* asynchronous actions in a concise manner, or logging every action payload.
*
* See `redux-thunk` package as an example of the Redux middleware.
*
* Because middleware is potentially asynchronous, this should be the first
* store enhancer in the composition chain.
*
* Note that each middleware will be given the `dispatch` and `getState` functions
* as named arguments.
*
* @param middlewares The middleware chain to be applied.
* @returns A store enhancer applying the middleware.
*
* @template Ext Dispatch signature added by a middleware.
* @template S The type of the state supported by a middleware.
*/
declare function applyMiddleware(): StoreEnhancer;
declare function applyMiddleware<Ext1, S>(middleware1: Middleware<Ext1, S, any>): StoreEnhancer<{
dispatch: Ext1;
}>;
declare function applyMiddleware<Ext1, Ext2, S>(middleware1: Middleware<Ext1, S, any>, middleware2: Middleware<Ext2, S, any>): StoreEnhancer<{
dispatch: Ext1 & Ext2;
}>;
declare function applyMiddleware<Ext1, Ext2, Ext3, S>(middleware1: Middleware<Ext1, S, any>, middleware2: Middleware<Ext2, S, any>, middleware3: Middleware<Ext3, S, any>): StoreEnhancer<{
dispatch: Ext1 & Ext2 & Ext3;
}>;
declare function applyMiddleware<Ext1, Ext2, Ext3, Ext4, S>(middleware1: Middleware<Ext1, S, any>, middleware2: Middleware<Ext2, S, any>, middleware3: Middleware<Ext3, S, any>, middleware4: Middleware<Ext4, S, any>): StoreEnhancer<{
dispatch: Ext1 & Ext2 & Ext3 & Ext4;
}>;
declare function applyMiddleware<Ext1, Ext2, Ext3, Ext4, Ext5, S>(middleware1: Middleware<Ext1, S, any>, middleware2: Middleware<Ext2, S, any>, middleware3: Middleware<Ext3, S, any>, middleware4: Middleware<Ext4, S, any>, middleware5: Middleware<Ext5, S, any>): StoreEnhancer<{
dispatch: Ext1 & Ext2 & Ext3 & Ext4 & Ext5;
}>;
declare function applyMiddleware<Ext, S = any>(...middlewares: Middleware<any, S, any>[]): StoreEnhancer<{
dispatch: Ext;
}>;
type Func<T extends any[], R> = (...a: T) => R;
/**
* Composes single-argument functions from right to left. The rightmost
* function can take multiple arguments as it provides the signature for the
* resulting composite function.
*
* @param funcs The functions to compose.
* @returns A function obtained by composing the argument functions from right
* to left. For example, `compose(f, g, h)` is identical to doing
* `(...args) => f(g(h(...args)))`.
*/
declare function compose(): <R>(a: R) => R;
declare function compose<F extends Function>(f: F): F;
declare function compose<A, T extends any[], R>(f1: (a: A) => R, f2: Func<T, A>): Func<T, R>;
declare function compose<A, B, T extends any[], R>(f1: (b: B) => R, f2: (a: A) => B, f3: Func<T, A>): Func<T, R>;
declare function compose<A, B, C, T extends any[], R>(f1: (c: C) => R, f2: (b: B) => C, f3: (a: A) => B, f4: Func<T, A>): Func<T, R>;
declare function compose<R>(f1: (a: any) => R, ...funcs: Function[]): (...args: any[]) => R;
declare function compose<R>(...funcs: Function[]): (...args: any[]) => R;
declare function isAction(action: unknown): action is Action<string>;
/**
* @param obj The object to inspect.
* @returns True if the argument appears to be a plain object.
*/
declare function isPlainObject(obj: any): obj is object;
/**
* These are private action types reserved by Redux.
* For any unknown actions, you must return the current state.
* If the current state is undefined, you must return the initial state.
* Do not reference these action types directly in your code.
*/
declare const ActionTypes: {
INIT: string;
REPLACE: string;
PROBE_UNKNOWN_ACTION: () => string;
};
export { Action, ActionCreator, ActionCreatorsMapObject, ActionFromReducer, ActionFromReducersMapObject, AnyAction, Dispatch, Middleware, MiddlewareAPI, Observable, Observer, PreloadedStateShapeFromReducersMapObject, Reducer, ReducerFromReducersMapObject, ReducersMapObject, StateFromReducersMapObject, Store, StoreCreator, StoreEnhancer, StoreEnhancerStoreCreator, UnknownAction, Unsubscribe, ActionTypes as __DO_NOT_USE__ActionTypes, applyMiddleware, bindActionCreators, combineReducers, compose, createStore, isAction, isPlainObject, legacy_createStore };
@@ -0,0 +1,65 @@
import arrayEach from './_arrayEach.js';
import baseCreate from './_baseCreate.js';
import baseForOwn from './_baseForOwn.js';
import baseIteratee from './_baseIteratee.js';
import getPrototype from './_getPrototype.js';
import isArray from './isArray.js';
import isBuffer from './isBuffer.js';
import isFunction from './isFunction.js';
import isObject from './isObject.js';
import isTypedArray from './isTypedArray.js';
/**
* An alternative to `_.reduce`; this method transforms `object` to a new
* `accumulator` object which is the result of running each of its own
* enumerable string keyed properties thru `iteratee`, with each invocation
* potentially mutating the `accumulator` object. If `accumulator` is not
* provided, a new object with the same `[[Prototype]]` will be used. The
* iteratee is invoked with four arguments: (accumulator, value, key, object).
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* @static
* @memberOf _
* @since 1.3.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @param {*} [accumulator] The custom accumulator value.
* @returns {*} Returns the accumulated value.
* @example
*
* _.transform([2, 3, 4], function(result, n) {
* result.push(n *= n);
* return n % 2 == 0;
* }, []);
* // => [4, 9]
*
* _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
* (result[value] || (result[value] = [])).push(key);
* }, {});
* // => { '1': ['a', 'c'], '2': ['b'] }
*/
function transform(object, iteratee, accumulator) {
var isArr = isArray(object),
isArrLike = isArr || isBuffer(object) || isTypedArray(object);
iteratee = baseIteratee(iteratee, 4);
if (accumulator == null) {
var Ctor = object && object.constructor;
if (isArrLike) {
accumulator = isArr ? new Ctor : [];
}
else if (isObject(object)) {
accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
}
else {
accumulator = {};
}
}
(isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
return iteratee(accumulator, value, index, object);
});
return accumulator;
}
export default transform;
@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/crypto-js`
# Summary
This package contains type definitions for crypto-js (https://github.com/brix/crypto-js).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/crypto-js.
### Additional Details
* Last updated: Mon, 22 Jan 2024 06:37:11 GMT
* Dependencies: none
# Credits
These definitions were written by [Michael Zabka](https://github.com/misak113), [Max Lysenko](https://github.com/maximlysenko), [Brendan Early](https://github.com/mymindstorm), and [Doma](https://github.com/SevenOutman).
@@ -0,0 +1,6 @@
import { ResolvedValueBinding } from '../../binding/models/ResolvedValueBinding';
import { ResolvedValueBindingNode } from '../../planning/models/ResolvedValueBindingNode';
import { ResolutionParams } from '../models/ResolutionParams';
import { Resolved } from '../models/Resolved';
export declare function resolveResolvedValueBindingNode<TActivated, TBinding extends ResolvedValueBinding<TActivated> = ResolvedValueBinding<TActivated>>(resolveResolvedValueBindingParams: (params: ResolutionParams, node: ResolvedValueBindingNode<TBinding>) => unknown[] | Promise<unknown[]>): (params: ResolutionParams, node: ResolvedValueBindingNode<TBinding>) => Resolved<TActivated>;
//# sourceMappingURL=resolveResolvedValueBindingNode.d.ts.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"E F A B","8":"K D wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 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","33":"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 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB 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","33":"J ZB K D E F"},E:{"1":"K D E F A B C L M G 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","33":"J ZB 2C ZC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z FD GD HD ID NC uC JD OC","2":"F"},G:{"1":"E LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","33":"ZC KD vC"},H:{"1":"hD"},I:{"1":"J I lD vC mD nD","33":"TC iD jD kD"},J:{"1":"A","33":"D"},K:{"1":"A B C H NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:5,C:"CSS3 Box-sizing",D:true};
@@ -0,0 +1,48 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
test("generics", () => {
async function stripOuter<TData extends z.ZodTypeAny>(schema: TData, data: unknown) {
return z
.object({
nested: schema, // as z.ZodTypeAny,
})
.transform((data) => {
return data.nested!;
})
.parse({ nested: data });
}
const result = stripOuter(z.object({ a: z.string() }), { a: "asdf" });
util.assertEqual<typeof result, Promise<{ a: string }>>(true);
});
// test("assignability", () => {
// const createSchemaAndParse = <K extends string, VS extends z.ZodString>(
// key: K,
// valueSchema: VS,
// data: unknown
// ) => {
// const schema = z.object({
// [key]: valueSchema,
// } as { [k in K]: VS });
// return { [key]: valueSchema };
// const parsed = schema.parse(data);
// return parsed;
// // const inferred: z.infer<z.ZodObject<{ [k in K]: VS }>> = parsed;
// // return inferred;
// };
// const parsed = createSchemaAndParse("foo", z.string(), { foo: "" });
// util.assertEqual<typeof parsed, { foo: string }>(true);
// });
test("nested no undefined", () => {
const inner = z.string().or(z.array(z.string()));
const outer = z.object({ inner });
type outerSchema = z.infer<typeof outer>;
z.util.assertEqual<outerSchema, { inner: string | string[] }>(true);
expect(outer.safeParse({ inner: undefined }).success).toEqual(false);
});
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAqED,IAAI,uCAAiB,OAAO,aAAa,cAAc,OAAO,cAAc,GAAG;AAMxE,SAAS,0CAAmB,KAAwB;IACzD,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAC1B,IAAI,aACF,YAAY,cACZ,SAAS,cACT,UAAU,aACV,YAAY,uBACZ,YAAY,4BACZ,mBAAmB,gBACnB,aAAa,uBACb,kBAAkB,OAAO,aAAa,cAAc,SA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AI,CAAC,WAAW,OAAO,EACrB,oBAAA,8BAAA;IAEJ,GAAG;QAAC;QAAS;KAAW;IAExB,kFAAkF;IAClF,mEAAmE;IACnE,CAAA,GAAA,0CAAe,EAAE;QACf,YAAY;gBACZ;QACA,SAAS,WAAW;IACtB;QAQiB,qBAGJ;IATb,OAAO;QACL,cAAc;YACZ,OAAO;gBACL,UAAU;gBACV,QAAQ;mBACL,qBAAA,+BAAA,SAAU,QAAQ,AAArB;gBACA,WAAW,CAAA,sBAAA,qBAAA,+BAAA,SAAU,SAAS,cAAnB,iCAAA,sBAAuB;YACpC;QACF;QACA,WAAW,CAAA,sBAAA,qBAAA,+BAAA,SAAU,SAAS,cAAnB,iCAAA,sBAAuB;QAClC,YAAY;YACV,eAAe;YACf,MAAM;YACN,OAAO;gBACL,IAAI,EAAE,qBAAA,+BAAA,SAAU,eAAe;gBAC/B,GAAG,EAAE,qBAAA,+BAAA,SAAU,cAAc;YAC/B;QACF;wBACA;IACF;AACF;AAEA,SAAS,gCAAU,QAAQ;IACzB,CAAA,GAAA,qCAAc,EAAE;QACd,OAAO,gBAAgB,CAAC,UAAU,UAAU;QAC5C,OAAO;YACL,OAAO,mBAAmB,CAAC,UAAU,UAAU;QACjD;IACF,GAAG;QAAC;KAAS;AACf;AAEA,SAAS,mCAAa,QAAQ,EAAE,SAAS;IACvC,IAAI,cAAc,OAChB,OAAO,SAAS,OAAO,CAAC,SAAS,SAAS,OAAO,CAAC,OAAO;IAE3D,OAAO,SAAS,OAAO,CAAC,SAAS,QAAQ,OAAO,CAAC,OAAO;AAC1D","sources":["packages/@react-aria/overlays/src/useOverlayPosition.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\niLine truncated
@@ -0,0 +1 @@
{"name":"react-use-websocket","version":"4.13.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532115422,"integrity":"sha512-dzgGRUJmJ511CVysarAgQC5AswWBwp6KfWLzWUlxxZa3aDHoZxf6ZQ75Jv6CaVFDlAWJH+WAtmNVAF0vyhbiaQ==","mode":420,"size":1070},"dist/lib/attach-listener.js":{"checkedAt":1794532115422,"integrity":"sha512-35bCvnBctOGFPuM7xj3bXlBMN1r3PQoanBNfG6xuoNnm737bNEGSs9W5UKHr7R0b+aMe6IKqwX0WHN6TYmEGpw==","mode":420,"size":7086},"dist/lib/attach-shared-listeners.js":{"checkedAt":1794532115422,"integrity":"sha512-ZX5iLsSL8LckKC1DaaRvUnKP832s3k1hkCeBwPhDKm/ZTdaVFFE6spE0N/Qebkioh9cnJDj8Lr4zQpX7C99Xaw==","mode":420,"size":6549},"dist/lib/constants.js":{"checkedAt":1794532115423,"integrity":"sha512-lYOy8dmONcTTNbellTCqWTia5hS5wWs4srOUSas2KcnTEd3mGLu6XWdYYkw2uhbPy1Mg1KplT9lxwbVqXbIsTw==","mode":420,"size":1836},"dist/lib/create-or-join.js":{"checkedAt":1794532115423,"integrity":"sha512-HUjEMAQ4NLG4Z2uXHIQI4mV0eLurT/Ifb0Eozxcn7DpzACs1jeYKTmLjImhjyNPWl2r9U5L2EVRhpn94xFpdcw==","mode":420,"size":3889},"dist/lib/get-url.js":{"checkedAt":1794532115423,"integrity":"sha512-4CDqFU9ukerq9sV84RTa+zXdSk2+yqFABHy3H1xkjAvFasKqF3irIBN/zUZjnbQ5Qe0fCoIUDShzGbSDCLpWqQ==","mode":420,"size":6293},"dist/lib/globals.js":{"checkedAt":1794532115423,"integrity":"sha512-c1awOtAxMK1mCfxVABnBX9WbdAnwfl8eECYzcwl3RX6NRd5nNZ0+uJZ2Xg05Hc/AheyAmbxivVafWWfnIYqOYw==","mode":420,"size":621},"dist/lib/heartbeat.js":{"checkedAt":1794532115423,"integrity":"sha512-FR5nHBvH1fIIkDKEumKktFgBSUAWv5OLt/JWku4FInt1BjGBHKeQyLaU2+nuC/KygWm0igt8w1nG4rXoU/nWkg==","mode":420,"size":2222},"dist/index.js":{"checkedAt":1794532115423,"integrity":"sha512-IRw8XEQdbG2+2Z30kcycXH/FHj2/Bo92uRiGfuOcRNgRMT2gozQg81MKjd/Rf2+DqKQkfKbT/KRpbG6v9h+lYQ==","mode":420,"size":1117},"dist/lib/manage-subscribers.js":{"checkedAt":1794532115423,"integrity":"sha512-/LwzPvJ6z0KuWUAJnrSjjLHGhVoRUpWtBfaNiVp9Jdy6McCJIEnzILietVr18G496ptvq47fBDz1R7cTkC42tQ==","mode":420,"size":1362},"dist/lib/proxy.js":{"checkedAt":1794532115423,"integrity":"sha512-k03l2UG9BjW6xB3yRfAHra1cwOu1yzgItNxou/ketBAsHsg/9EjcSJGHsPhyewL4821yvfhSr4mhRJ4kJ2Av6Q==","mode":420,"size":1223},"dist/lib/socket-io.js":{"checkedAt":1794532115424,"integrity":"sha512-f66w7qBnGVybbXn5jj6VNea50SsXyBNbxiCziailUfM2SyjKA0Nf+B9BM17CNEGZ4WJDbe/oDgaf6ALthAq6Nw==","mode":420,"size":1930},"dist/lib/types.js":{"checkedAt":1794532096255,"integrity":"sha512-nhU68BdqPrnDQLwwwBa2/FQQRm6PTNXOCac/25gmXJN8MGd/us9Sb/dVXJPn2oVcihcP12eYp0aT4/28wYI4Cg==","mode":420,"size":110},"dist/lib/use-event-source.js":{"checkedAt":1794532115424,"integrity":"sha512-L+YkeaMww7OzN0kA0tO4fOh5PF4mcLKI2hickFQ2EkwYXefkbLQp7BEik44ljYxXXSkSzBiWJJaI5NWTc01Cdg==","mode":420,"size":2480},"dist/lib/use-socket-io.js":{"checkedAt":1794532115424,"integrity":"sha512-f4ZNFCeHFl09AcPbsl5QRkS3XoUXPAk6N93ldRNhyc8UiHamtV82GfHfXoE2GHNV+/aYL7J/qUpiiyDqvBt+7w==","mode":420,"size":2070},"dist/lib/use-websocket.js":{"checkedAt":1794532115424,"integrity":"sha512-45WeyC8dm/gQWahJoUtHydtIxH7Q17XimV07yMALN4qqOYP2XXN8/WvhpkVY2QbigiZQH5FLowllJYxAjQGA6A==","mode":420,"size":10899},"dist/lib/util.js":{"checkedAt":1794532115424,"integrity":"sha512-WDj5DjUUvUPJEeHqUWFHuaxiMCjH5A+T3MOW9DL75VMnNInFkB27ANsgqR6FZNqtDNQ4k9FTQ6VUjSGqB9nQsw==","mode":420,"size":584},"package.json":{"checkedAt":1794532115424,"integrity":"sha512-8ongnduYKAXQKq6ZzSdfmykDHl8Dka2Jvwy+OUt9GsPfY9XlgVKLB9nGDA6elqcLXfGAJuQUiJr5W3/U3rO3jw==","mode":420,"size":2116},"dist/lib/attach-listener.js.map":{"checkedAt":1794532115424,"integrity":"sha512-J5jTkRluQH5TBUdh9UkAV4FpSE40qwJgxNDnqbc3uCD8NFQMu3OPVoqfqs/DVOULmqTN5Mgb6+1IkDALHbHtJA==","mode":420,"size":5065},"dist/lib/attach-shared-listeners.js.map":{"checkedAt":1794532115424,"integrity":"sha512-c7mpq+gOKe2O7ySLZ2WpjUTrzDygtxZLxOA+k1keVJPJxa6fWBZvsvPKfl0m+dg03FlqtQXkr/U3DPyPZZ8sLQ==","mode":420,"size":4584},"dist/lib/constants.js.map":{"checkedAt":1794532115424,"integrity":"sha512-Mr29jROrr7FHnkonMBqmYj9N511+oVzKlPoTmUVRHODFvGDDkNwI/5M5CSMXsg+Vj89A2BOaYu+Uw4LXKbfLKw==","mode":420,"size":1066},"dist/lib/create-or-join.js.map":{"checkedAt":1794532115425,"integrity":"sha512-C6MW09vIsrhqvjFfV1/ZQtEiuQWY2VEvVQinEiIPFq14Js17f5E+EyHGaOcBQEFljiu3MRy9C+rE+iaGGylGfQ==","mode":420,"size":2761},"dist/lib/get-url.js.map":{"checkedAt":1794532115425,"integrity":"sha512-o8pNbstcTi3SLfdaLM6ji+PjkHff7MT4wZ3ssNXEp/VIDewLjrN4VSYTB0c0CslJAccIdQWh86bH/Yh9JAeIbA==","mode":420,"size":1494},"dist/lib/globals.js.map":{"checkedAt":1794532115425,"integrity":"sha512-4EFg4Xu0mGbahh49mS9sYChJqpewZCiA98b1T3C/JmzLTQCocI984aCpIfz9XNdz+jgfVMXXMzYhKnya8+iiKw==","mode":420,"size":503},"dist/lib/heartbeat.js.map":{"checkedAt":1794532115425,"integrity":"sha512-ja/SsizxnCvgrZV1y0TyYeIiChGs+tgWq91q+DKnEKS7Uemq7vz2Y+lEliSACHmdgiL0FC0qN9U9XQXxS4/1zg==","mode":420,"size":1827},"dist/index.js.map":{"checkedAt":1794532115425,"integrity":"sha512-j6PTkEh3X8N0bejE0BUb4idcJLYBduurO/gK9YFrz3XKq0hPs8SE5kQp2WKYIiltrtCppBbn7GbgCs8NoL3JRg==","mode":420,"size":280},"dist/lib/manage-subscribers.js.map":{"checkedAt":1794532115425,"inLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"delay.interface.js","sourceRoot":"","sources":["../../src/delay/delay.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,62 @@
var $a7a032acae3ddda9$exports = require("./FocusScope.main.js");
var $6RLDH$reactariautils = require("@react-aria/utils");
var $6RLDH$react = require("react");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useHasTabbableChild", () => $259c6413a286f2e6$export$eac1895992b9f3d6);
/*
* Copyright 2022 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 $259c6413a286f2e6$export$eac1895992b9f3d6(ref, options) {
let isDisabled = options === null || options === void 0 ? void 0 : options.isDisabled;
let [hasTabbableChild, setHasTabbableChild] = (0, $6RLDH$react.useState)(false);
(0, $6RLDH$reactariautils.useLayoutEffect)(()=>{
if ((ref === null || ref === void 0 ? void 0 : ref.current) && !isDisabled) {
let update = ()=>{
if (ref.current) {
let walker = (0, $a7a032acae3ddda9$exports.getFocusableTreeWalker)(ref.current, {
tabbable: true
});
setHasTabbableChild(!!walker.nextNode());
}
};
update();
// Update when new elements are inserted, or the tabIndex/disabled attribute updates.
let observer = new MutationObserver(update);
observer.observe(ref.current, {
subtree: true,
childList: true,
attributes: true,
attributeFilter: [
'tabIndex',
'disabled'
]
});
return ()=>{
// Disconnect mutation observer when a React update occurs on the top-level component
// so we update synchronously after re-rendering. Otherwise React will emit act warnings
// in tests since mutation observers fire asynchronously. The mutation observer is necessary
// so we also update if a child component re-renders and adds/removes something tabbable.
observer.disconnect();
};
}
});
return isDisabled ? false : hasTabbableChild;
}
//# sourceMappingURL=useHasTabbableChild.main.js.map
@@ -0,0 +1,109 @@
# import/no-duplicates
⚠️ This rule _warns_ in the following configs: ☑️ `recommended`, 🚸 `warnings`.
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
<!-- end auto-generated rule header -->
Reports if a resolved path is imported more than once.
ESLint core has a similar rule ([`no-duplicate-imports`](https://eslint.org/docs/rules/no-duplicate-imports)), but this version
is different in two key ways:
1. the paths in the source code don't have to exactly match, they just have to point to the same module on the filesystem. (i.e. `./foo` and `./foo.js`)
2. this version distinguishes Flow `type` imports from standard imports. ([#334](https://github.com/import-js/eslint-plugin-import/pull/334))
## Rule Details
Valid:
```js
import SomeDefaultClass, * as names from './mod'
// Flow `type` import from same module is fine
import type SomeType from './mod'
```
...whereas here, both `./mod` imports will be reported:
```js
import SomeDefaultClass from './mod'
// oops, some other import separated these lines
import foo from './some-other-mod'
import * as names from './mod'
// will catch this too, assuming it is the same target module
import { something } from './mod.js'
```
The motivation is that this is likely a result of two developers importing different
names from the same module at different times (and potentially largely different
locations in the file.) This rule brings both (or n-many) to attention.
### Query Strings
By default, this rule ignores query strings (i.e. paths followed by a question mark), and thus imports from `./mod?a` and `./mod?b` will be considered as duplicates. However you can use the option `considerQueryString` to handle them as different (primarily because browsers will resolve those imports differently).
Config:
```json
"import/no-duplicates": ["error", {"considerQueryString": true}]
```
And then the following code becomes valid:
```js
import minifiedMod from './mod?minify'
import noCommentsMod from './mod?comments=0'
import originalMod from './mod'
```
It will still catch duplicates when using the same module and the exact same query string:
```js
import SomeDefaultClass from './mod?minify'
// This is invalid, assuming `./mod` and `./mod.js` are the same target:
import * from './mod.js?minify'
```
### Inline Type imports
TypeScript 4.5 introduced a new [feature](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5/#type-on-import-names) that allows mixing of named value and type imports. In order to support fixing to an inline type import when duplicate imports are detected, `prefer-inline` can be set to true.
Config:
```json
"import/no-duplicates": ["error", {"prefer-inline": true}]
```
<!--tabs-->
❌ Invalid `["error", {"prefer-inline": true}]`
```js
import { AValue, type AType } from './mama-mia'
import type { BType } from './mama-mia'
import { CValue } from './papa-mia'
import type { CType } from './papa-mia'
```
✅ Valid with `["error", {"prefer-inline": true}]`
```js
import { AValue, type AType, type BType } from './mama-mia'
import { CValue, type CType } from './papa-mia'
```
<!--tabs-->
## When Not To Use It
If the core ESLint version is good enough (i.e. you're _not_ using Flow and you _are_ using [`import/extensions`](./extensions.md)), keep it and don't use this.
If you like to split up imports across lines or may need to import a default and a namespace,
you may not want to enable this rule.
@@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_me=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=t(e),a={name:"me",weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),weekStart:1,weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),ordinal:function(e){return e},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"}};return _.default.locale(a,null,!0),a}));
@@ -0,0 +1,43 @@
// Vietnamese [vi]
import dayjs from '../index';
var locale = {
name: 'vi',
weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),
months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),
weekStart: 1,
weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
monthsShort: 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),
weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
ordinal: function ordinal(n) {
return n;
},
formats: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM [năm] YYYY',
LLL: 'D MMMM [năm] YYYY HH:mm',
LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
l: 'DD/M/YYYY',
ll: 'D MMM YYYY',
lll: 'D MMM YYYY HH:mm',
llll: 'ddd, D MMM YYYY HH:mm'
},
relativeTime: {
future: '%s tới',
past: '%s trước',
s: 'vài giây',
m: 'một phút',
mm: '%d phút',
h: 'một giờ',
hh: '%d giờ',
d: 'một ngày',
dd: '%d ngày',
M: 'một tháng',
MM: '%d tháng',
y: 'một năm',
yy: '%d năm'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1 @@
{"mappings":";;;AAAA;;;;;;;;;;CAUC,GAED,gEAAgE;AAChE,gGAAgG;;;AAMhG,MAAM,sCAAgB;AAEtB,wEAAwE;AACxE,MAAM,oCAAc;IAClB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAK,SAAS;CACf;AAQM,MAAM;IAGX,cAAc,EAAU,EAAgB;QACtC,IAAI,iBAAiB,KAAK;QAC1B,IAAI,OAAO,IAAI,KAAK,KAAK,CAAC,AAAC,CAAA,KAAK,iBAAiB,CAAA,IAAK;QACtD,IAAI,aAAa,MAAO,CAAA,OAAO,CAAA,IAAK,KAAK,KAAK,CAAC,AAAC,CAAA,IAAI,OAAO,EAAC,IAAK;QACjE,IAAI,YAAY,iBAAiB;QACjC,IAAI,QAAQ,YAAY,MACpB,KAAK,KAAK,CAAC,YAAY,MACvB,KAAK,KAAK,CAAC,AAAC,CAAA,YAAY,CAAA,IAAK;QACjC,IAAI,MAAM,YAAY,iCAAW,CAAC,MAAM,GAAG;QAC3C,OAAO,IAAI,CAAA,GAAA,yCAAW,EAAE,IAAI,EAAE,MAAM,QAAQ,GAAG;IACjD;IAEA,YAAY,IAAqB,EAAU;QACzC,IAAI,KAAK,sCAAgB,IAAI,MAAO,CAAA,KAAK,IAAI,GAAG,CAAA,IAAK,KAAK,KAAK,CAAC,AAAC,CAAA,IAAI,KAAK,IAAI,GAAG,EAAC,IAAK;QACvF,MAAM,iCAAW,CAAC,KAAK,KAAK,GAAG,EAAE;QACjC,MAAM,KAAK,GAAG;QACd,OAAO;IACT;IAEA,kBAA0B;QACxB,OAAO;IACT;IAEA,eAAe,IAAqB,EAAU;QAC5C,IAAI,KAAK,KAAK,IAAI,GAChB,OAAO;QAGT,IAAI,KAAK,KAAK,IAAI,IAChB,OAAO;QAGT,IAAI,aAAa,CAAA,GAAA,yCAAE,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,MAAM;QAChD,OAAO,aAAa,KAAK;IAC3B;IAEA,UAAoB;QAClB,OAAO;YAAC;SAAK;IACf;IAEA,gBAAwB;QACtB,8CAA8C;QAC9C,mDAAmD;QACnD,OAAO;IACT;;aA9CA,aAAiC;;AA+CnC","sources":["packages/@internationalized/date/src/calendars/PersianCalendar.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, Calendar, CalendarIdentifier} from '../types';\nimport {CalendarDate} from '../CalendarDate';\nimport {mod} from '../utils';\n\nconst PERSIAN_EPOCH = 1948320;\n\n// Number of days from the start of the year to the start of each month.\nconst MONTH_START = [\n 0, // Farvardin\n 31, // Ordibehesht\n 62, // Khordad\n 93, // Tir\n 124, // Mordad\n 155, // Shahrivar\n 186, // Mehr\n 216, // Aban\n 246, // Azar\n 276, // Dey\n 306, // Bahman\n 336 // Esfand\n];\n\n/**\n * The Persian calendar is the main calendar used in Iran and Afghanistan. It has 12 months\n * in each year, the first 6 of which have 31 days, and the next 5 have 30 days. The 12th month\n * has either 29 or 30 days depending on whether it is a leap year. The Persian year starts\n * around the March equinox.\n */\nexport class PersianCalendar implements Calendar {\n identifier: CalendarIdentifier = 'persian';\n\n fromJulianDay(jd: number): CalendarDate {\n let daysSinceEpoch = jd - PERSIAN_EPOCH;\n let year = 1 + Math.floor((33 * daysSinceEpoch + 3) / 12053);\n let farvardin1 = 365 * (year - 1) + Math.floor((8 * year + 21) / 33);\n let dayOfYear = daysSinceEpoch - farvardin1;\n let month = dayOfYear < 216\n ? Math.floor(dayOfYear / 31)\n : Math.floor((dayOfYear - 6) / 30);\n let day = dayOfYear - MONTH_START[month] + 1;\n return new CalendarDate(this, year, month + 1, day);\n }\n\n toJulianDay(date: AnyCalendarDate): number {\n let jd = PERSIAN_EPOCH - 1 + 365 * (date.year - 1) + Math.floor((8 * date.year + 21) / 33);\n jd += MONTH_START[date.month - 1];\n jd += date.day;\n return jd;\n }\n\n getMonthsInYear(): number {\n return 12;\n }\n\n getDaysInMonth(date: AnyCalendarDate): number {\n if (date.month <= 6) {\n return 31;\n }\n\n if (date.month <= 11) {\n return 30;\n }\n\n let isLeapYear = mod(25 * date.year + 11, 33) < 8;\n return isLeapYear ? 30 : 29;\n }\n\n getEras(): string[] {\n return ['AP'];\n }\n\n getYearsInEra(): number {\n // 9378-10-10 persian is 9999-12-31 gregorian.\n // Round down to 9377 to set the maximum full year.\n return 9377;\n }\n}\n"],"names":[],"version":3,"file":"PersianCalendar.module.js.map"}
@@ -0,0 +1,50 @@
type ScrollOverflowVisibility = "auto" | "top" | "bottom" | "left" | "right" | "both" | "none";
type ScrollOverflowEdgeCheck = "all" | "top" | "bottom" | "left" | "right";
type ScrollOverflowOrientation = "horizontal" | "vertical";
type ScrollOverflowCheck = ScrollOverflowOrientation | "both";
interface UseDataScrollOverflowProps {
/**
* The reference to the DOM element on which we're checking overflow.
*/
domRef?: React.RefObject<HTMLElement>;
/**
* Determines the direction of overflow to check.
* - "horizontal" will check for overflow on the x-axis.
* - "vertical" will check for overflow on the y-axis.
* - "both" (default) will check for overflow on both axes.
*
* @default "both"
*/
overflowCheck?: ScrollOverflowCheck;
/**
* Controlled visible state. Passing "auto" will make the shadow visible only when the scroll reaches the edge.
* use "left" / "right" for horizontal scroll and "top" / "bottom" for vertical scroll.
* @default "auto"
*/
visibility?: ScrollOverflowVisibility;
/**
* Enables or disables the overflow checking mechanism.
* @default true
*/
isEnabled?: boolean;
/**
* Defines a buffer or margin within which we won't treat the scroll as reaching the edge.
*
* @default 0 - meaning the check will behave exactly at the edge.
*/
offset?: number;
/**
* List of dependencies to update the overflow check.
*/
updateDeps?: any[];
/**
* Callback to be called when the overflow state changes.
*
* @param visibility ScrollOverflowVisibility
*/
onVisibilityChange?: (overflow: ScrollOverflowVisibility) => void;
}
declare function useDataScrollOverflow(props?: UseDataScrollOverflowProps): void;
type UseDataScrollOverflowReturn = ReturnType<typeof useDataScrollOverflow>;
export { ScrollOverflowCheck, ScrollOverflowEdgeCheck, ScrollOverflowOrientation, ScrollOverflowVisibility, UseDataScrollOverflowProps, UseDataScrollOverflowReturn, useDataScrollOverflow };
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAIM,MAAM;IAgDX,CAAC,CAAC,OAAO,QAAQ,CAAC,GAAG;QACnB,OAAO,IAAI,CAAC,QAAQ;IACtB;IAEA,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI;IACzB;IAEA,UAAU;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI;IACzB;IAEA,aAAa,GAAQ,EAAE;QACrB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;YACb;QAAd,OAAO,OAAO,CAAA,gBAAA,KAAK,OAAO,cAAZ,2BAAA,gBAAgB,OAAO;IACvC;IAEA,YAAY,GAAQ,EAAE;QACpB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;YACb;QAAd,OAAO,OAAO,CAAA,gBAAA,KAAK,OAAO,cAAZ,2BAAA,gBAAgB,OAAO;IACvC;IAEA,cAAc;QACZ,OAAO,IAAI,CAAC,QAAQ;IACtB;IAEA,aAAa;QACX,OAAO,IAAI,CAAC,OAAO;IACrB;IAEA,QAAQ,GAAQ,EAAE;YACT;QAAP,OAAO,CAAA,mBAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAhB,8BAAA,mBAAwB;IACjC;IAEA,GAAG,GAAW,EAAE;QACd,MAAM,OAAO;eAAI,IAAI,CAAC,OAAO;SAAG;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI;IAC/B;IAEA,YAAY,GAAQ,EAAqB;QACvC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;QAC3B,OAAO,CAAA,iBAAA,2BAAA,KAAM,UAAU,KAAI,EAAE;IAC/B;IApFA,YAAY,KAAwB,CAAE;aAL9B,SAA4B,IAAI;aAEhC,WAAuB;aACvB,UAAsB;QAG5B,IAAI,CAAC,QAAQ,GAAG;QAEhB,IAAI,QAAQ,CAAC;YACX,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE;YAE1B,IAAI,KAAK,UAAU,IAAI,KAAK,IAAI,KAAK,WACnC,KAAK,IAAI,SAAS,KAAK,UAAU,CAC/B,MAAM;QAGZ;QAEA,KAAK,IAAI,QAAQ,MACf,MAAM;QAGR,IAAI,OAAuB;QAC3B,IAAI,QAAQ;QACZ,KAAK,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,CAAE;YACnC,IAAI,MAAM;gBACR,KAAK,OAAO,GAAG;gBACf,KAAK,OAAO,GAAG,KAAK,GAAG;YACzB,OAAO;gBACL,IAAI,CAAC,QAAQ,GAAG;gBAChB,KAAK,OAAO,GAAG;YACjB;YAEA,IAAI,KAAK,IAAI,KAAK,QAChB,KAAK,KAAK,GAAG;YAGf,OAAO;YAEP,6DAA6D;YAC7D,iFAAiF;YACjF,KAAK,OAAO,GAAG;QACjB;YAEe;QAAf,IAAI,CAAC,OAAO,GAAG,CAAA,YAAA,iBAAA,2BAAA,KAAM,GAAG,cAAT,uBAAA,YAAa;IAC9B;AA6CF","sources":["packages/@react-stately/list/src/ListCollection.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, Key, Node} from '@react-types/shared';\n\nexport class ListCollection<T> implements Collection<Node<T>> {\n private keyMap: Map<Key, Node<T>> = new Map();\n private iterable: Iterable<Node<T>>;\n private firstKey: Key | null = null;\n private lastKey: Key | null = null;\n\n constructor(nodes: Iterable<Node<T>>) {\n this.iterable = nodes;\n\n let visit = (node: Node<T>) => {\n this.keyMap.set(node.key, node);\n\n if (node.childNodes && node.type === 'section') {\n for (let child of node.childNodes) {\n visit(child);\n }\n }\n };\n\n for (let node of nodes) {\n visit(node);\n }\n\n let last: Node<T> | null = null;\n let index = 0;\n for (let [key, node] of this.keyMap) {\n if (last) {\n last.nextKey = key;\n node.prevKey = last.key;\n } else {\n this.firstKey = key;\n node.prevKey = undefined;\n }\n\n if (node.type === 'item') {\n node.index = index++;\n }\n\n last = node;\n\n // Set nextKey as undefined since this might be the last node\n // If it isn't the last node, last.nextKey will properly set at start of new loop\n last.nextKey = undefined;\n }\n\n this.lastKey = last?.key ?? null;\n }\n\n *[Symbol.iterator]() {\n yield* this.iterable;\n }\n\n get size() {\n return this.keyMap.size;\n }\n\n getKeys() {\n return this.keyMap.keys();\n }\n\n getKeyBefore(key: Key) {\n let node = this.keyMap.get(key);\n return node ? node.prevKey ?? null : null;\n }\n\n getKeyAfter(key: Key) {\n let node = this.keyMap.get(key);\n return node ? node.nextKey ?? null : null;\n }\n\n getFirstKey() {\n return this.firstKey;\n }\n\n getLastKey() {\n return this.lastKey;\n }\n\n getItem(key: Key) {\n return this.keyMap.get(key) ?? null;\n }\n\n at(idx: number) {\n const keys = [...this.getKeys()];\n return this.getItem(keys[idx]);\n }\n\n getChildren(key: Key): Iterable<Node<T>> {\n let node = this.keyMap.get(key);\n return node?.childNodes || [];\n }\n}\n"],"names":[],"version":3,"file":"ListCollection.module.js.map"}
@@ -0,0 +1,316 @@
export default `flf2a$ 3 2 8 -1 8
Short and sweet by Sub-Zero (bodom@ugly.ucs.indiana.edu)
Completed and ported to figlet by Juan Car (jc@juguete.quim.ucm.es)
Improved again by Sub-Zero
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$$@
$$@
$$@@
|@
.@
@@
''@
@
@@
||@
||@
@@
(|\`@
_|)@
@@
o/@
/o@
@@
()@
(X@
@@
,@
@
@@
/@
\\@
@@
\\@
/@
@@
\\|/@
/|\\@
@@
_|_@
| @
@@
@
,@
@@
__@
@
@@
@
.@
@@
/@
/ @
@@
/\\@
\\/@
@@
'| @
_|_@
@@
')@
/_@
@@
')@
.)@
@@
/| @
~|~@
@@
|~@
_)@
@@
/ @
(_)@
@@
~/@
/ @
@@
(~)@
(_)@
@@
(~)@
/ @
@@
.@
.@
@@
.@
/@
@@
/@
\\@
@@
_@
-@
@@
\\@
/@
@@
~)@
| @
@@
_ @
(\\)@
~~@@
/|@
/-|@
@@
|)@
|)@
@@
/\`@
\\,@
@@
|\\@
|/@
@@
[~@
[_@
@@
[~@
| @
@@
/~ @
\\_|@
@@
|_|@
| |@
@@
|@
|@
@@
|@
_|@
@@
|/@
|\\@
@@
| @
|_@
@@
|\\/|@
| |@
@@
|\\ |@
| \\|@
@@
/\\@
\\/@
@@
|)@
| @
@@
/\\@
\\X@
@@
|)@
|\\@
@@
(\`@
_)@
@@
~|~@
| @
@@
| |@
|_|@
@@
| /@
|/ @
@@
| | |@
\\|\\|@
@@
\\/@
/\\@
@@
\\ /@
| @
@@
~/@
/_@
@@
|~@
|_@
@@
\\ @
\\@
@@
~|@
_|@
@@
/\\@
@
@@
@
__@
@@
\\@
@
@@
@
(|@
@@
| @
|)@
@@
_@
(_@
@@
|@
(|@
@@
_ @
(/_@
@@
[\`@
|$@
@@
@
(|@
_|@@
|_@
||@
@@
.@
|@
@@
.@
|@
_|@@
| @
|<@
@@
|@
|@
@@
,_ @
|||@
@@
,_@
||@
@@
@
()@
@@
@
|)@
| @@
@
(|@
|@@
@
|\`@
@@
_@
_\\@
@@
|-@
|_@
@@
@
L|@
@@
@
\\/@
@@
@
LL|@
@@
@
><@
@@
@
\\/@
/ @@
_ @
/_@
@@
|~@
< @
|_@@
|@
|@
@@
~|@
>@
_|@@
nu@
@
@@
..@
(|@
@@
..@
()@
@@
..@
L|@
@@
..@
(|@
@@
..@
()@
@@
..@
L|@
@@
|)@
;)@
@@
`
@@ -0,0 +1,24 @@
import * as os from 'os'
import * as path from 'path'
import { normalizePath } from 'vite'
const isWindows = os.platform() == 'win32'
export const resolve = isWindows
? (...paths: string[]) => normalizePath(path.win32.resolve(...paths))
: path.posix.resolve
export const isAbsolute = isWindows
? path.win32.isAbsolute
: path.posix.isAbsolute
/** Only call this on normalized paths */
export const join = path.posix.join
/** Only call this on normalized paths */
export const relative = path.posix.relative
/** Only call this on normalized paths */
export const basename = path.posix.basename
export { dirname } from 'path'
@@ -0,0 +1,25 @@
import baseIteratee from './_baseIteratee.js';
import isArrayLike from './isArrayLike.js';
import keys from './keys.js';
/**
* Creates a `_.find` or `_.findLast` function.
*
* @private
* @param {Function} findIndexFunc The function to find the collection index.
* @returns {Function} Returns the new find function.
*/
function createFind(findIndexFunc) {
return function(collection, predicate, fromIndex) {
var iterable = Object(collection);
if (!isArrayLike(collection)) {
var iteratee = baseIteratee(predicate, 3);
collection = keys(collection);
predicate = function(key) { return iteratee(iterable[key], key, iterable); };
}
var index = findIndexFunc(collection, predicate, fromIndex);
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
};
}
export default createFind;
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["// Compute what scrolling needs to be done on required scrolling boxes for target to be in view\n\n// The type names here are named after the spec to make it easier to find more information around what they mean:\n// To reduce churn and reduce things that need be maintained things from the official TS DOM library is used here\n// https://drafts.csswg.org/cssom-view/\n\n// For a definition on what is \"block flow direction\" exactly, check this: https://drafts.csswg.org/css-writing-modes-4/#block-flow-direction\n\n/**\n * This new option is tracked in this PR, which is the most likely candidate at the time: https://github.com/w3c/csswg-drafts/pull/1805\n * @public\n */\nexport type ScrollMode = 'always' | 'if-needed'\n\n/** @public */\nexport interface Options {\n /**\n * Control the logical scroll position on the y-axis. The spec states that the `block` direction is related to the [writing-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/writing-mode), but this is not implemented yet in this library.\n * This means that `block: 'start'` aligns to the top edge and `block: 'end'` to the bottom.\n * @defaultValue 'center'\n */\n block?: ScrollLogicalPosition\n /**\n * Like `block` this is affected by the [writing-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/writing-mode). In left-to-right pages `inline: 'start'` will align to the left edge. In right-to-left it should be flipped. This will be supported in a future release.\n * @defaultValue 'nearest'\n */\n inline?: ScrollLogicalPosition\n /**\n * This is a proposed addition to the spec that you can track here: https://github.com/w3c/csswg-drafts/pull/5677\n *\n * This library will be updated to reflect any changes to the spec and will provide a migration path.\n * To be backwards compatible with `Element.scrollIntoViewIfNeeded` if something is not 100% visible it will count as \"needs scrolling\". If you need a different visibility ratio your best option would be to implement an [Intersection Observer](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API).\n * @defaultValue 'always'\n */\n scrollMode?: ScrollMode\n /**\n * By default there is no boundary. All the parent elements of your target is checked until it reaches the viewport ([`document.scrollingElement`](https://developer.mozilla.org/en-US/docs/Web/API/document/scrollingElement)) when calculating layout and what to scroll.\n * By passing a boundary you can short-circuit this loop depending on your needs:\n * \n * - Prevent the browser window from scrolling.\n * - Scroll elements into view in a list, without scrolling container elements.\n * \n * You can also pass a function to do more dynamic checks to override the scroll scoping:\n * \n * ```js\n * let actions = compute(target, {\n * boundary: (parent) => {\n * // By default `overflow: hidden` elements are allowed, only `overflow: visible | clip` is skipped as\n * // this is required by the CSSOM spec\n * if (getComputedStyle(parent)['overflow'] === 'hidden') {\n * return false\n * }\n\n * return true\n * },\n * })\n * ```\n * @defaultValue null\n */\n boundary?: Element | ((parent: Element) => boolean) | null\n /**\n * New option that skips auto-scrolling all nodes with overflow: hidden set\n * See FF implementation: https://hg.mozilla.org/integration/fx-team/rev/c48c3ec05012#l7.18\n * @defaultValue false\n * @public\n */\n skipOverflowHiddenElements?: boolean\n}\n\n/** @public */\nexport interface ScrollAction {\n el: Element\n top: number\n left: number\n}\n\n// @TODO better shadowdom test, 11 = document fragment\nconst isElement = (el: any): el is Element =>\n typeof el === 'object' && el != null && el.nodeType === 1\n\nconst canOverflow = (\n overflow: string | null,\n skipOverflowHiddenElements?: boolean\n) => {\n if (skipOverflowHiddenElements && overflow === 'hidden') {\n return false\n }\n\n return overflow !== 'visible' && overflow !== 'clip'\n}\n\nconst getFrameElement = (el: Element) => {\n if (!el.ownerDocument || !el.ownerDocument.defaultView) {\n return null\n }\n\n try {\n return el.ownerDocument.defaultView.frameElement\n } catch (e) {\n return null\n }\n}\n\nconst isHiddenByFrame = (el: Element): boolean => {\n const frame = getFrameElement(el)\n if (!frame) {\n return false\n }\n\n return (\n frame.clientHeight < el.scrollHeight || frame.clientWidth < el.scrollWidth\n )\n}\n\nconst isScrollable = (el: Element, skipOverflowHiddenElements?: boolean) => {\n if (el.clientHeight < el.scrollHeight || el.clientWidth < el.scrollWidth) {\n const style = getComputedStyle(el, null)\n return (\n canOverflow(style.overflowY, skipOverflowHiddenElements) ||\n canOverflow(style.overflowX, skipOverflowHiddenElements) ||\n isHiddenByFrame(el)\n )\n }\nLine truncated
@@ -0,0 +1,53 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
/**
* @typedef {Partial<import('enhanced-resolve').ResolveOptions>} ResolverConfig
*/
/** @type {ResolverConfig} */
const DEFAULT_VALUE = {}
/**
* @typedef {{ resolverConfig?: ResolverConfig } | undefined} ResolverConfigOption
*/
/**
* Gets `resolverConfig` property from a given option object.
*
* @param {ResolverConfigOption} option - An option object to get.
* @returns {ResolverConfig | undefined} The `allowModules` value, or `null`.
*/
function get(option) {
if (option?.resolverConfig) return option.resolverConfig
}
/**
* Gets "resolverConfig" setting.
*
* 1. This checks `options` property, then returns it if exists.
* 2. This checks `settings.n` | `settings.node` property, then returns it if exists.
* 3. This returns `[]`.
*
* @param {import('eslint').Rule.RuleContext} context - The rule context.
* @returns {ResolverConfig} A resolver config object.
*/
module.exports = function getResolverConfig(context, optionIndex = 0) {
return (
get(
/** @type {ResolverConfigOption} */ (context.options?.[optionIndex])
) ??
get(/** @type {ResolverConfigOption} */ (context.settings?.n)) ??
get(/** @type {ResolverConfigOption} */ (context.settings?.node)) ??
DEFAULT_VALUE
)
}
module.exports.schema = {
type: "object",
properties: {},
additionalProperties: true,
}
@@ -0,0 +1 @@
{"version":3,"file":"BaseResolvedValueElementMetadata.d.ts","sourceRoot":"","sources":["../../../../src/metadata/models/BaseResolvedValueElementMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE/E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,WAAW,gCAAgC,CAAC,KAAK;IACrD,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChC,KAAK,EAAE,iBAAiB,GAAG,qBAAqB,CAAC;CAClD"}
@@ -0,0 +1,23 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = require("react");
var _depsAreSame = _interopRequireDefault(require("../utils/depsAreSame"));
var useCreation = function useCreation(factory, deps) {
var current = (0, _react.useRef)({
deps: deps,
obj: undefined,
initialized: false
}).current;
if (current.initialized === false || !(0, _depsAreSame["default"])(current.deps, deps)) {
current.deps = deps;
current.obj = factory();
current.initialized = true;
}
return current.obj;
};
var _default = exports["default"] = useCreation;
@@ -0,0 +1,227 @@
# rc
The non-configurable configuration loader for lazy people.
## Usage
The only option is to pass rc the name of your app, and your default configuration.
```javascript
var conf = require('rc')(appname, {
//defaults go here.
port: 2468,
//defaults which are objects will be merged, not replaced
views: {
engine: 'jade'
}
});
```
`rc` will return your configuration options merged with the defaults you specify.
If you pass in a predefined defaults object, it will be mutated:
```javascript
var conf = {};
require('rc')(appname, conf);
```
If `rc` finds any config files for your app, the returned config object will have
a `configs` array containing their paths:
```javascript
var appCfg = require('rc')(appname, conf);
appCfg.configs[0] // /etc/appnamerc
appCfg.configs[1] // /home/dominictarr/.config/appname
appCfg.config // same as appCfg.configs[appCfg.configs.length - 1]
```
## Standards
Given your application name (`appname`), rc will look in all the obvious places for configuration.
* command line arguments, parsed by minimist _(e.g. `--foo baz`, also nested: `--foo.bar=baz`)_
* environment variables prefixed with `${appname}_`
* or use "\_\_" to indicate nested properties <br/> _(e.g. `appname_foo__bar__baz` => `foo.bar.baz`)_
* if you passed an option `--config file` then from that file
* a local `.${appname}rc` or the first found looking in `./ ../ ../../ ../../../` etc.
* `$HOME/.${appname}rc`
* `$HOME/.${appname}/config`
* `$HOME/.config/${appname}`
* `$HOME/.config/${appname}/config`
* `/etc/${appname}rc`
* `/etc/${appname}/config`
* the defaults object you passed in.
All configuration sources that were found will be flattened into one object,
so that sources **earlier** in this list override later ones.
## Configuration File Formats
Configuration files (e.g. `.appnamerc`) may be in either [json](http://json.org/example) or [ini](http://en.wikipedia.org/wiki/INI_file) format. **No** file extension (`.json` or `.ini`) should be used. The example configurations below are equivalent:
#### Formatted as `ini`
```
; You can include comments in `ini` format if you want.
dependsOn=0.10.0
; `rc` has built-in support for ini sections, see?
[commands]
www = ./commands/www
console = ./commands/repl
; You can even do nested sections
[generators.options]
engine = ejs
[generators.modules]
new = generate-new
engine = generate-backend
```
#### Formatted as `json`
```javascript
{
// You can even comment your JSON, if you want
"dependsOn": "0.10.0",
"commands": {
"www": "./commands/www",
"console": "./commands/repl"
},
"generators": {
"options": {
"engine": "ejs"
},
"modules": {
"new": "generate-new",
"backend": "generate-backend"
}
}
}
```
Comments are stripped from JSON config via [strip-json-comments](https://github.com/sindresorhus/strip-json-comments).
> Since ini, and env variables do not have a standard for types, your application needs be prepared for strings.
To ensure that string representations of booleans and numbers are always converted into their proper types (especially useful if you intend to do strict `===` comparisons), consider using a module such as [parse-strings-in-object](https://github.com/anselanza/parse-strings-in-object) to wrap the config object returned from rc.
## Simple example demonstrating precedence
Assume you have an application like this (notice the hard-coded defaults passed to rc):
```
const conf = require('rc')('myapp', {
port: 12345,
mode: 'test'
});
console.log(JSON.stringify(conf, null, 2));
```
You also have a file `config.json`, with these contents:
```
{
"port": 9000,
"foo": "from config json",
"something": "else"
}
```
And a file `.myapprc` in the same folder, with these contents:
```
{
"port": "3001",
"foo": "bar"
}
```
Here is the expected output from various commands:
`node .`
```
{
"port": "3001",
"mode": "test",
"foo": "bar",
"_": [],
"configs": [
"/Users/stephen/repos/conftest/.myapprc"
],
"config": "/Users/stephen/repos/conftest/.myapprc"
}
```
*Default `mode` from hard-coded object is retained, but port is overridden by `.myapprc` file (automatically found based on appname match), and `foo` is added.*
`node . --foo baz`
```
{
"port": "3001",
"mode": "test",
"foo": "baz",
"_": [],
"configs": [
"/Users/stephen/repos/conftest/.myapprc"
],
"config": "/Users/stephen/repos/conftest/.myapprc"
}
```
*Same result as above but `foo` is overridden because command-line arguments take precedence over `.myapprc` file.*
`node . --foo barbar --config config.json`
```
{
"port": 9000,
"mode": "test",
"foo": "barbar",
"something": "else",
"_": [],
"config": "config.json",
"configs": [
"/Users/stephen/repos/conftest/.myapprc",
"config.json"
]
}
```
*Now the `port` comes from the `config.json` file specified (overriding the value from `.myapprc`), and `foo` value is overriden by command-line despite also being specified in the `config.json` file.*
## Advanced Usage
#### Pass in your own `argv`
You may pass in your own `argv` as the third argument to `rc`. This is in case you want to [use your own command-line opts parser](https://github.com/dominictarr/rc/pull/12).
```javascript
require('rc')(appname, defaults, customArgvParser);
```
## Pass in your own parser
If you have a special need to use a non-standard parser,
you can do so by passing in the parser as the 4th argument.
(leave the 3rd as null to get the default args parser)
```javascript
require('rc')(appname, defaults, null, parser);
```
This may also be used to force a more strict format,
such as strict, valid JSON only.
## Note on Performance
`rc` is running `fs.statSync`-- so make sure you don't use it in a hot code path (e.g. a request handler)
## License
Multi-licensed under the two-clause BSD License, MIT License, or Apache License, version 2.0
@@ -0,0 +1,5 @@
'use strict';
export default function isCancel(value) {
return !!(value && value.__CANCEL__);
}
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Undefined = Undefined;
const type_1 = require("../create/type");
const index_1 = require("../symbols/index");
/** `[JavaScript]` Creates a Undefined type */
function Undefined(options) {
return (0, type_1.CreateType)({ [index_1.Kind]: 'Undefined', type: 'undefined' }, options);
}
@@ -0,0 +1 @@
{"version":3,"file":"regexps-uri.js","sourceRoot":"","sources":["../../src/regexps-uri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,oBAAoB,KAAa;IACtC,MACC,OAAO,GAAG,UAAU,EACpB,GAAG,GAAG,SAAS,EACf,OAAO,GAAG,OAAO,EACjB,QAAQ,GAAG,SAAS,EACpB,QAAQ,GAAG,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,EAAG,kBAAkB;IAC1D,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,SAAS,EAChB,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ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G,MAAM,CAAC,WAAW,GAAG,aAAa,CAAC,EAAG,YAAY;IACnE,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,GAAG,EAClC,KAAK,GAAG,MAAM,CAAC,aAAa,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,cAAc,GAAG,GAAG,GAAG,WAAW,CAAC,EACtH,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,GAAG,GAAG,CAAC,EAC3E,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,WAAW,CAAC,GAAG,GAAG,CAAC,EACtD,UAAU,GAAG,MAAM,CAALine truncated
@@ -0,0 +1,21 @@
#!/bin/bash
pkgs=(
"com.apple.pkg.DeveloperToolsCLILeo" # standalone
"com.apple.pkg.DeveloperToolsCLI" # from XCode
"com.apple.pkg.CLTools_Executables" # Mavericks
)
for pkg in "${pkgs[@]}"; do
output=$(/usr/sbin/pkgutil --pkg-info "$pkg" 2>/dev/null)
if [ "$output" ]; then
version=$(echo "$output" | grep 'version' | cut -d' ' -f2)
break
fi
done
if [ "$version" ]; then
echo "Command Line Tools version: $version"
else
echo >&2 'Command Line Tools not found'
fi
@@ -0,0 +1,21 @@
{
"name": "@react-types/select",
"version": "3.9.8",
"description": "Spectrum UI components in React",
"license": "Apache-2.0",
"types": "src/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/adobe/react-spectrum"
},
"dependencies": {
"@react-types/shared": "^3.26.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
},
"publishConfig": {
"access": "public"
},
"gitHead": "71f0ef23053f9e03ee7e97df736e8b083e006849"
}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015 Blaine Bublitz, Eric Schoffstall and other contributors
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 @@
import {onCloseMap as $dd149f63282afbbf$export$f6211563215e3b37} from "./useCloseOnScroll.mjs";
import {useEffect as $gMvIk$useEffect} from "react";
import {useId as $gMvIk$useId} 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 $628037886ba31236$export$f9d5c8beee7d008d(props, state, ref) {
let { type: type } = props;
let { isOpen: isOpen } = state;
// Backward compatibility. Share state close function with useOverlayPosition so it can close on scroll
// without forcing users to pass onClose.
(0, $gMvIk$useEffect)(()=>{
if (ref && ref.current) (0, $dd149f63282afbbf$export$f6211563215e3b37).set(ref.current, state.close);
});
// Aria 1.1 supports multiple values for aria-haspopup other than just menus.
// https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup
// However, we only add it for menus for now because screen readers often
// announce it as a menu even for other values.
let ariaHasPopup = undefined;
if (type === 'menu') ariaHasPopup = true;
else if (type === 'listbox') ariaHasPopup = 'listbox';
let overlayId = (0, $gMvIk$useId)();
return {
triggerProps: {
'aria-haspopup': ariaHasPopup,
'aria-expanded': isOpen,
'aria-controls': isOpen ? overlayId : undefined,
onPress: state.toggle
},
overlayProps: {
id: overlayId
}
};
}
export {$628037886ba31236$export$f9d5c8beee7d008d as useOverlayTrigger};
//# sourceMappingURL=useOverlayTrigger.module.js.map
@@ -0,0 +1,51 @@
/**
* @typedef {import('micromark-util-types').CompileContext} CompileContext
* @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension
* @typedef {import('micromark-util-types').Token} Token
*/
// An opening or closing tag start, followed by a case-insensitive specific tag name,
// followed by HTML whitespace, a greater than, or a slash.
const reFlow =
/<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi
// As HTML (text) parses tags separately (and very strictly), we don’t need to be
// global.
const reText = new RegExp('^' + reFlow.source, 'i')
/**
* Create an HTML extension for `micromark` to support GitHubs weird and
* useless tagfilter when serializing to HTML.
*
* @returns {HtmlExtension}
* Extension for `micromark` that can be passed in `htmlExtensions` to support
* GitHubs weird and useless tagfilter when serializing to HTML.
*/
export function gfmTagfilterHtml() {
return {
exit: {
htmlFlowData(token) {
exitHtmlData.call(this, token, reFlow)
},
htmlTextData(token) {
exitHtmlData.call(this, token, reText)
}
}
}
}
/**
* @this {CompileContext}
* @param {Token} token
* @param {RegExp} filter
* @returns {undefined}
*/
function exitHtmlData(token, filter) {
let value = this.sliceSerialize(token)
if (this.options.allowDangerousHtml) {
value = value.replace(filter, '&lt;$1$2')
}
this.raw(this.encode(value))
}
@@ -0,0 +1,35 @@
import {getInteractionModality as $507fabe10e71c6fb$export$630ff653c5ada6a9} from "./useFocusVisible.module.js";
import {getOwnerDocument as $k50bp$getOwnerDocument, getActiveElement as $k50bp$getActiveElement, runAfterTransition as $k50bp$runAfterTransition, focusWithoutScrolling as $k50bp$focusWithoutScrolling} 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 $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
// If the user is interacting with a virtual cursor, e.g. screen reader, then
// wait until after any animated transitions that are currently occurring on
// the page before shifting focus. This avoids issues with VoiceOver on iOS
// causing the page to scroll when moving focus if the element is transitioning
// from off the screen.
const ownerDocument = (0, $k50bp$getOwnerDocument)(element);
const activeElement = (0, $k50bp$getActiveElement)(ownerDocument);
if ((0, $507fabe10e71c6fb$export$630ff653c5ada6a9)() === 'virtual') {
let lastFocusedElement = activeElement;
(0, $k50bp$runAfterTransition)(()=>{
// If focus did not move and the element is still in the document, focus it.
if ((0, $k50bp$getActiveElement)(ownerDocument) === lastFocusedElement && element.isConnected) (0, $k50bp$focusWithoutScrolling)(element);
});
} else (0, $k50bp$focusWithoutScrolling)(element);
}
export {$3ad3f6e1647bc98d$export$80f3e147d781571c as focusSafely};
//# sourceMappingURL=focusSafely.module.js.map
@@ -0,0 +1,83 @@
import { AsnArray, OctetString } from "@peculiar/asn1-schema";
import { AuthorizationList, SecurityLevel, Version } from "./key_description";
/**
* This file contains classes to handle non-standard key descriptions and authorizations.
*
* Due to an issue with the asn1-schema library, referenced at https://github.com/PeculiarVentures/asn1-schema/issues/98#issuecomment-1764345351,
* the standard key description does not allow for a non-strict order of fields in the `softwareEnforced` and `teeEnforced` attributes.
*
* To address this and provide greater flexibility, the `NonStandardKeyDescription` and
* `NonStandardAuthorizationList` classes were created, allowing for the use of non-standard authorizations and a flexible field order.
*
* The purpose of these modifications is to ensure compatibility with specific requirements and standards, as well as to offer
* more convenient tools for working with key descriptions and authorizations.
*
* Please refer to the documentation and class comments before using or modifying them.
*/
/**
* Represents a non-standard authorization for NonStandardAuthorizationList. It uses the same
* structure as AuthorizationList, but it is a CHOICE instead of a SEQUENCE, that allows for
* non-strict ordering of fields.
*/
export declare class NonStandardAuthorization extends AuthorizationList {
}
/**
* Represents a list of non-standard authorizations.
* ```asn
* NonStandardAuthorizationList ::= SEQUENCE OF NonStandardAuthorization
* ```
*/
export declare class NonStandardAuthorizationList extends AsnArray<NonStandardAuthorization> {
constructor(items?: NonStandardAuthorization[]);
/**
* Finds the first authorization that contains the specified key.
* @param key The key to search for.
* @returns The first authorization that contains the specified key, or `undefined` if not found.
*/
findProperty<K extends keyof AuthorizationList>(key: K): AuthorizationList[K] | undefined;
}
/**
* The AuthorizationList class allows for non-strict ordering of fields in the
* softwareEnforced and teeEnforced/hardwareEnforced fields.
*
* This behavior is due to an issue with the asn1-schema library, which is
* documented here: https://github.com/PeculiarVentures/asn1-schema/issues/98#issuecomment-1764345351
*
* ```asn
* KeyDescription ::= SEQUENCE {
* attestationVersion INTEGER, # versions 1, 2, 3, 4, 100, 200, 300, and 400
* attestationSecurityLevel SecurityLevel,
* keymasterVersion/keyMintVersion INTEGER,
* keymasterSecurityLevel/keyMintSecurityLevel SecurityLevel,
* attestationChallenge OCTET_STRING,
* uniqueId OCTET_STRING,
* softwareEnforced NonStandardAuthorizationList,
* teeEnforced/hardwareEnforced NonStandardAuthorizationList,
* }
* ```
*/
export declare class NonStandardKeyDescription {
attestationVersion: number | Version;
attestationSecurityLevel: SecurityLevel;
keymasterVersion: number;
keymasterSecurityLevel: SecurityLevel;
attestationChallenge: OctetString;
uniqueId: OctetString;
softwareEnforced: NonStandardAuthorizationList;
teeEnforced: NonStandardAuthorizationList;
get keyMintVersion(): number;
set keyMintVersion(value: number);
get keyMintSecurityLevel(): SecurityLevel;
set keyMintSecurityLevel(value: SecurityLevel);
get hardwareEnforced(): NonStandardAuthorizationList;
set hardwareEnforced(value: NonStandardAuthorizationList);
constructor(params?: Partial<NonStandardKeyDescription>);
}
/**
* New class for v300 and v400 KeyMint non-standard key description.
* This uses the same underlying structure as NonStandardKeyDescription,
* but with renamed properties to match the updated specification.
*/
export declare class NonStandardKeyMintKeyDescription extends NonStandardKeyDescription {
constructor(params?: Partial<NonStandardKeyDescription>);
}
@@ -0,0 +1,35 @@
declare const scaleInOut: {
enter: {
scale: string;
y: string;
opacity: number;
willChange: string;
transition: {
scale: {
duration: number;
ease: readonly [0.36, 0.66, 0.4, 1];
};
opacity: {
duration: number;
ease: readonly [0.36, 0.66, 0.4, 1];
};
y: {
type: string;
bounce: number;
duration: number;
};
};
};
exit: {
scale: string;
y: string;
opacity: number;
willChange: string;
transition: {
duration: number;
ease: readonly [0.36, 0.66, 0.4, 1];
};
};
};
export { scaleInOut };
@@ -0,0 +1,60 @@
var $6CumN$reactariautils = require("@react-aria/utils");
var $6CumN$reactariaselection = require("@react-aria/selection");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "menuData", () => $a3815f0132802737$export$6f49b4016bfc8d56);
$parcel$export(module.exports, "useMenu", () => $a3815f0132802737$export$38eaa17faae8f579);
/*
* 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 $a3815f0132802737$export$6f49b4016bfc8d56 = new WeakMap();
function $a3815f0132802737$export$38eaa17faae8f579(props, state, ref) {
let { shouldFocusWrap: shouldFocusWrap = true, onKeyDown: onKeyDown, onKeyUp: onKeyUp, ...otherProps } = props;
if (!props['aria-label'] && !props['aria-labelledby']) console.warn('An aria-label or aria-labelledby prop is required for accessibility.');
let domProps = (0, $6CumN$reactariautils.filterDOMProps)(props, {
labelable: true
});
let { listProps: listProps } = (0, $6CumN$reactariaselection.useSelectableList)({
...otherProps,
ref: ref,
selectionManager: state.selectionManager,
collection: state.collection,
disabledKeys: state.disabledKeys,
shouldFocusWrap: shouldFocusWrap,
linkBehavior: 'override'
});
$a3815f0132802737$export$6f49b4016bfc8d56.set(state, {
onClose: props.onClose,
onAction: props.onAction
});
return {
menuProps: (0, $6CumN$reactariautils.mergeProps)(domProps, {
onKeyDown: onKeyDown,
onKeyUp: onKeyUp
}, {
role: 'menu',
...listProps,
onKeyDown: (e)=>{
var _listProps_onKeyDown;
// don't clear the menu selected keys if the user is presses escape since escape closes the menu
if (e.key !== 'Escape') (_listProps_onKeyDown = listProps.onKeyDown) === null || _listProps_onKeyDown === void 0 ? void 0 : _listProps_onKeyDown.call(listProps, e);
}
})
};
}
//# sourceMappingURL=useMenu.main.js.map
@@ -0,0 +1,247 @@
'use strict';
var forEach = require('for-each');
var has = Object.prototype.hasOwnProperty;
var assign = require('object.assign');
var define = require('define-properties');
var entries = require('object.entries');
var inspect = require('object-inspect');
var hasSticky = typeof (/a/).sticky === 'boolean';
var hasGroups = 'groups' in (/a/).exec('a');
var groups = function groups(matchObject) {
return hasGroups ? assign(matchObject, { groups: matchObject.groups }, matchObject) : matchObject;
};
var arraySpread = function arraySpread(iterator) {
if (Array.isArray(iterator)) { return iterator; }
var result;
var values = [];
do {
result = iterator.next();
values.push(result);
} while (!result.done);
return values;
};
var testResults = function (t, iterator, expectedResults, item) {
var prefix = arguments.length > 3 ? inspect(item) + ': ' : '';
var results = arraySpread(iterator);
var expecteds = arraySpread(expectedResults);
t.test(prefix + 'actual vs expected result lengths', function (st) {
st.equal(results.length, expecteds.length, 'actual and expected result counts are the same');
st.end();
});
t.test(prefix + 'actual vs expected results', { skip: results.length !== expecteds.length }, function (st) {
forEach(expecteds, function (expected, index) {
var result = results.shift();
st.equal(result.done, expected.done, 'result ' + (index + 1) + ' is ' + (expected.done ? '' : 'not ') + 'done');
st.test('result ' + (index + 1), { skip: result.done !== expected.done }, function (s2t) {
if (expected.done) {
s2t.equal(result.value, undefined, 'result ' + (index + 1) + ' value is undefined');
} else {
s2t.equal(Array.isArray(result.value), true, 'result ' + (index + 1) + ' value is an array');
s2t.deepEqual(entries(result.value || {}), entries(expected.value || {}), 'result ' + (index + 1) + ' has the same entries');
s2t.deepEqual(result.value, expected.value, 'result ' + (index + 1) + ' value is expected value');
}
s2t.end();
});
});
});
};
module.exports = function (matchAll, regexMatchAll, t) {
t.test('non-regexes', function (st) {
var notRegexes = [
[null, [{ value: undefined, done: true }]],
[undefined, [
{ value: assign([''], groups({ index: 0, input: 'abc' })), done: false },
{ value: assign([''], groups({ index: 1, input: 'abc' })), done: false },
{ value: assign([''], groups({ index: 2, input: 'abc' })), done: false },
{ value: assign([''], groups({ index: 3, input: 'abc' })), done: false },
{ value: undefined, done: true }
]],
[NaN, [{ value: undefined, done: true }]],
[42, [{ value: undefined, done: true }]],
[new Date(), [{ value: undefined, done: true }]],
[{}, [
{ value: assign(['b'], groups({ index: 1, input: 'abc' })), done: false },
{ value: assign(['c'], groups({ index: 2, input: 'abc' })), done: false },
{ value: undefined, done: true }
]],
[[], [
{ value: assign([''], groups({ index: 0, input: 'abc' })), done: false },
{ value: assign([''], groups({ index: 1, input: 'abc' })), done: false },
{ value: assign([''], groups({ index: 2, input: 'abc' })), done: false },
{ value: assign([''], groups({ index: 3, input: 'abc' })), done: false },
{ value: undefined, done: true }
]]
];
var str = 'abc';
forEach(notRegexes, function (notRegex) {
testResults(st, matchAll(str, notRegex[0]), notRegex[1], notRegex[0]);
});
st.end();
});
t.test('passing a string instead of a regex', function (st) {
var str = 'aabcaba';
testResults(st, matchAll(str, 'a'), matchAll(str, /a/g));
st.end();
});
t.test('ToString-able objects', function (st) {
var str = 'aabc';
var strObj = { toString: function () { return str; } };
var regex = /[ac]/g;
var expectedResults = [
{ value: assign(['a'], groups({ index: 0, input: str })), done: false },
{ value: assign(['a'], groups({ index: 1, input: str })), done: false },
{ value: assign(['c'], groups({ index: 3, input: str })), done: false },
{ value: undefined, done: true }
];
testResults(st, matchAll(strObj, regex), expectedResults);
st.end();
});
t.test('#flags', function (st) {
st.test('without a flags property', function (s2t) {
var str = 'aabc';
var regex = /[ac]/g;
if (define.supportsDescriptors) {
Object.defineProperty(regex, 'flags', { value: undefined });
}
s2t.equal(regex.flags, undefined, 'regex has an undefined "flags" property');
s2t['throws'](
function () { matchAll(str, regex); },
'undefined flags throws'
);
s2t.end();
});
st.test('with a static flags property', function (s2t) {
var str = 'AaBC';
var regex = /[ac]/;
define(regex, { flags: 'ig' }, { flags: function () { return true; } });
try {
define(regex, { global: true }, { global: function () { return true; } });
s2t.equal(regex.global, true);
} catch (e) {
s2t.comment('# SKIP in node < 6, `global` is not configurable on regexes');
return s2t.end();
}
s2t.equal(regex.flags, 'ig');
var expectedResults = [
{ value: assign(['A'], groups({ index: 0, input: str })), done: false },
{ value: assign(['a'], groups({ index: 1, input: str })), done: false },
{ value: assign(['C'], groups({ index: 3, input: str })), done: false },
{ value: undefined, done: true }
];
testResults(s2t, matchAll(str, regex), expectedResults);
return s2t.end();
});
st.test('respects flags', function (s2t) {
var str = 'A\na\nb\nC';
var regex = /^[ac]/img;
var expectedResults = [
{ value: assign(['A'], groups({ index: 0, input: str })), done: false },
{ value: assign(['a'], groups({ index: 2, input: str })), done: false },
{ value: assign(['C'], groups({ index: 6, input: str })), done: false },
{ value: undefined, done: true }
];
testResults(s2t, matchAll(str, regex), expectedResults);
s2t.end();
});
st.test('throws with a non-global regex', function (s2t) {
var str = 'AaBbCc';
var regex = /[bc]/i;
s2t['throws'](
function () { matchAll(str, regex); },
TypeError,
'a non-global regex throws'
);
s2t.end();
});
st.test('works with a global non-sticky regex', function (s2t) {
var str = 'AaBbCc';
var regex = /[bc]/gi;
var expectedResults = [
{ value: assign(['B'], groups({ index: 2, input: str })), done: false },
{ value: assign(['b'], groups({ index: 3, input: str })), done: false },
{ value: assign(['C'], groups({ index: 4, input: str })), done: false },
{ value: assign(['c'], groups({ index: 5, input: str })), done: false },
{ value: undefined, done: true }
];
testResults(s2t, matchAll(str, regex), expectedResults);
s2t.end();
});
});
t.test('returns an iterator', function (st) {
var str = 'aabc';
var iterator = matchAll(str, /[ac]/g);
st.ok(iterator, 'iterator is truthy');
st.equal(has.call(iterator, 'next'), false, 'iterator does not have own property "next"');
for (var key in iterator) {
st.fail('iterator has enumerable properties: ' + key);
}
var expectedResults = [
{ value: assign(['a'], groups({ index: 0, input: str })), done: false },
{ value: assign(['a'], groups({ index: 1, input: str })), done: false },
{ value: assign(['c'], groups({ index: 3, input: str })), done: false },
{ value: undefined, done: true }
];
testResults(st, iterator, expectedResults);
st.end();
});
t.test('zero-width matches', function (st) {
var str = 'abcde';
st.test('global', function (s2t) {
var expectedResults = [
{ value: assign([''], groups({ index: 1, input: str })), done: false },
{ value: assign([''], groups({ index: 2, input: str })), done: false },
{ value: assign([''], groups({ index: 3, input: str })), done: false },
{ value: assign([''], groups({ index: 4, input: str })), done: false },
{ value: undefined, done: true }
];
testResults(s2t, matchAll(str, /\B/g), expectedResults);
s2t.end();
});
st.test('sticky', { skip: !hasSticky }, function (s2t) {
var expectedResults = [
{ value: undefined, done: true }
];
/* eslint no-invalid-regexp: [2, { "allowConstructorFlags": ["y"] }] */
var regex = new RegExp('\\B', 'y');
s2t['throws'](
function () { matchAll(str, regex); },
TypeError,
'non-global sticky regex throws'
);
/* eslint no-invalid-regexp: [2, { "allowConstructorFlags": ["y"] }] */
testResults(s2t, matchAll(str, new RegExp('\\B', 'gy')), expectedResults);
s2t.end();
});
st.test('unflagged', function (s2t) {
s2t['throws'](
function () { matchAll(str, /\B/); },
TypeError,
'unflagged regex throws'
);
s2t.end();
});
st.end();
});
};
@@ -0,0 +1 @@
module.exports={A:{A:{"132":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","4":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC J ZB K D E F A B 0C 1C","33":"6 7 8 9 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"},D:{"1":"0 1 2 3 4 5 sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB","322":"gB hB iB jB kB lB mB nB oB pB qB rB"},E:{"1":"QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD"},F:{"1":"0 1 2 3 4 5 fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 F B C G N O P aB FD GD HD ID NC uC JD OC","578":"8 9 AB BB CB DB EB FB bB cB dB eB"},G:{"1":"QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD"},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:{"132":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD","2":"J"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","33":"1D"}},B:4,C:"CSS3 text-align-last",D:true};
@@ -0,0 +1,10 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from './types.js';
import 'react';
interface CheckIconProps extends IconSvgProps {
filled?: boolean;
}
declare const CheckIcon: ({ filled, ...props }: CheckIconProps) => react_jsx_runtime.JSX.Element;
export { CheckIcon, CheckIconProps };
@@ -0,0 +1,101 @@
import { stringifyNumber } from '../../stringify/stringifyNumber.js';
/** Internal types handle bigint as number, because TS can't figure it out. */
function parseSexagesimal(str, asBigInt) {
const sign = str[0];
const parts = sign === '-' || sign === '+' ? str.substring(1) : str;
const num = (n) => asBigInt ? BigInt(n) : Number(n);
const res = parts
.replace(/_/g, '')
.split(':')
.reduce((res, p) => res * num(60) + num(p), num(0));
return (sign === '-' ? num(-1) * res : res);
}
/**
* hhhh:mm:ss.sss
*
* Internal types handle bigint as number, because TS can't figure it out.
*/
function stringifySexagesimal(node) {
let { value } = node;
let num = (n) => n;
if (typeof value === 'bigint')
num = n => BigInt(n);
else if (isNaN(value) || !isFinite(value))
return stringifyNumber(node);
let sign = '';
if (value < 0) {
sign = '-';
value *= num(-1);
}
const _60 = num(60);
const parts = [value % _60]; // seconds, including ms
if (value < 60) {
parts.unshift(0); // at least one : is required
}
else {
value = (value - parts[0]) / _60;
parts.unshift(value % _60); // minutes
if (value >= 60) {
value = (value - parts[0]) / _60;
parts.unshift(value); // hours
}
}
return (sign +
parts
.map(n => String(n).padStart(2, '0'))
.join(':')
.replace(/000000\d*$/, '') // % 60 may introduce error
);
}
const intTime = {
identify: value => typeof value === 'bigint' || Number.isInteger(value),
default: true,
tag: 'tag:yaml.org,2002:int',
format: 'TIME',
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt),
stringify: stringifySexagesimal
};
const floatTime = {
identify: value => typeof value === 'number',
default: true,
tag: 'tag:yaml.org,2002:float',
format: 'TIME',
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
resolve: str => parseSexagesimal(str, false),
stringify: stringifySexagesimal
};
const timestamp = {
identify: value => value instanceof Date,
default: true,
tag: 'tag:yaml.org,2002:timestamp',
// If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part
// may be omitted altogether, resulting in a date format. In such a case, the time part is
// assumed to be 00:00:00Z (start of day, UTC).
test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd
'(?:' + // time is optional
'(?:t|T|[ \\t]+)' + // t | T | whitespace
'([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?
'(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30
')?$'),
resolve(str) {
const match = str.match(timestamp.test);
if (!match)
throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd');
const [, year, month, day, hour, minute, second] = match.map(Number);
const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0;
let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);
const tz = match[8];
if (tz && tz !== 'Z') {
let d = parseSexagesimal(tz, false);
if (Math.abs(d) < 30)
d *= 60;
date -= 60000 * d;
}
return new Date(date);
},
stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\.000Z$/, '') ?? ''
};
export { floatTime, intTime, timestamp };
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more