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

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

No files matched your search

@@ -0,0 +1,69 @@
Copyright (c) 2012-2015, Christopher Jeffrey (https://github.com/chjj/)
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.
The MIT License (MIT)
Copyright (c) 2016, Daniel Imms (http://www.growingwiththeweb.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2018 - present Microsoft Corporation
All rights reserved.
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,30 @@
import { isBuiltin } from 'node:module';
import path from 'node:path';
import { ResolverFactory } from 'unrs-resolver';
export function createNodeResolver({ extensions = ['.mjs', '.cjs', '.js', '.json', '.node'], conditionNames = ['import', 'require', 'default'], mainFields = ['module', 'main'], ...restOptions } = {}) {
const resolver = new ResolverFactory({
extensions,
conditionNames,
mainFields,
...restOptions,
});
return {
interfaceVersion: 3,
name: 'eslint-plugin-import-x:node',
resolve(modulePath, sourceFile) {
if (isBuiltin(modulePath) || modulePath.startsWith('data:')) {
return { found: true, path: null };
}
try {
const resolved = resolver.sync(path.dirname(sourceFile), modulePath);
if (resolved.path) {
return { found: true,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"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// We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is\n// guarded by a check that it only runs on the client side.\n// eslint-disable-next-line rulesdir/useLayoutEffectRule\nimport React, {JSX, ReactNode, useContext, useLayoutEffect, useMemo, useRef, useState} from 'react';\n\n// To support SSR, the auto incrementing id counter is stored in a context. This allows\n// it to be reset on every request to ensure the client and server are consistent.\n// There is also a prefix string that is used to support async loading components\n// Each async boundary must be wrapped in an SSR provider, which appends to the prefix\n// and resets the current id counter. This ensures that async loaded components have\n// consistent ids regardless of the loading order.\ninterface SSRContextValue {\n prefix: string,\n current: number\n}\n\n// Default context value to use in case there is no SSRProvider. This is fine for\n// client-only apps. In order to support multiple copies of React Aria potentially\n// being on the page at once, the prefix is set to a random number. SSRProvider\n// will reset this to zero for consistency between server and client, so in the\n// SSR case multiple copies of React Aria is not suppoLine truncated
@@ -0,0 +1,91 @@
{
"name": "is-array-buffer",
"version": "3.0.5",
"description": "Is this value a JS ArrayBuffer?",
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"types": "./index.d.ts",
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"lint": "eslint --ext=.js,.mjs .",
"postlint": "tsc && attw -P",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only --",
"posttest": "npx npm@'>= 10.2' audit --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)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/inspect-js/is-array-buffer.git"
},
"keywords": [
"javascript",
"ecmascript",
"is",
"arraybuffer",
"array",
"buffer"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/inspect-js/is-array-buffer/issues"
},
"homepage": "https://github.com/inspect-js/is-array-buffer#readme",
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.1",
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.2.2",
"@types/call-bind": "^1.0.5",
"@types/for-each": "^0.3.3",
"@types/get-intrinsic": "^1.2.3",
"@types/object-inspect": "^1.13.0",
"@types/tape": "^5.7.0",
"auto-changelog": "^2.5.0",
"available-typed-arrays": "^1.0.7",
"encoding": "^0.1.13",
"es-value-fixtures": "^1.5.0",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true,
"startingVersion": "2.0.1"
},
"dependencies": {
"call-bind": "^1.0.8",
"call-bound": "^1.0.3",
"get-intrinsic": "^1.2.6"
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.stat = exports.readFile = void 0;
function _fs() {
const data = require("fs");
_fs = function () {
return data;
};
return data;
}
function _gensync() {
const data = require("gensync");
_gensync = function () {
return data;
};
return data;
}
const readFile = exports.readFile = _gensync()({
sync: _fs().readFileSync,
errback: _fs().readFile
});
const stat = exports.stat = _gensync()({
sync: _fs().statSync,
errback: _fs().stat
});
0 && 0;
//# sourceMappingURL=fs.js.map
@@ -0,0 +1,711 @@
import { inspect } from "node:util";
import { expect, test } from "vitest";
import * as z from "zod/v4";
test("error creation", () => {
const err1 = new z.ZodError([]);
err1.issues.push({
code: "invalid_type",
expected: "object",
path: [],
message: "",
input: "adf",
});
err1.isEmpty;
const err2 = new z.ZodError(err1.issues);
const err3 = new z.ZodError([]);
err3.addIssues(err1.issues);
err3.addIssue(err1.issues[0]);
err1.message;
err2.message;
err3.message;
});
test("do not allow error and message together", () => {
expect(() =>
z.string().refine((_) => true, {
message: "override",
error: (iss) => (iss.input === undefined ? "asdf" : null),
})
).toThrow();
});
const errorMap: z.ZodErrorMap = (issue) => {
if (issue.code === "invalid_type") {
if (issue.expected === "string") {
return { message: "bad type!" };
}
}
if (issue.code === "custom") {
return { message: `less-than-${issue.params?.minimum}` };
}
return undefined;
};
test("type error with custom error map", () => {
const result = z.string().safeParse(234, { error: errorMap });
expect(result.success).toBe(false);
expect(result.error).toMatchInlineSnapshot(`
[ZodError: [
{
"expected": "string",
"code": "invalid_type",
"path": [],
"message": "bad type!"
}
]]
`);
});
test("refinement fail with params", () => {
const result = z
.number()
.refine((val) => val >= 3, {
params: { minimum: 3 },
})
.safeParse(2, { error: errorMap });
expect(result.success).toBe(false);
expect(result.error).toMatchInlineSnapshot(`
[ZodError: [
{
"code": "custom",
"path": [],
"params": {
"minimum": 3
},
"message": "less-than-3"
}
]]
`);
});
test("hard coded error with custom errormap", () => {
const result = z
.string()
.refine((val) => val.length > 12, {
params: { minimum: 13 },
message: "override",
})
.safeParse("asdf", { error: () => "contextual" });
expect(result.success).toBe(false);
expect(result.error).toMatchInlineSnapshot(`
[ZodError: [
{
"code": "custom",
"path": [],
"params": {
"minimum": 13
},
"message": "override"
}
]]
`);
});
test("default error message", () => {
const result = z
.number()
.refine((x) => x > 3)
.safeParse(2);
expect(result.success).toBe(false);
expect(result.error).toMatchInlineSnapshot(`
[ZodError: [
{
"code": "custom",
"path": [],
"message": "Invalid input"
}
]]
`);
});
test("override error in refine", () => {
const result = z
.number()
.refine((x) => x > 3, "override")
.safeParse(2);
expect(result.success).toBe(false);
expect(result.error!.issues.length).toEqual(1);
expect(result.error).toMatchInlineSnapshot(`
[ZodError: [
{
"code": "custom",
"path": [],
"message": "override"
}
]]
`);
});
test("override error in refinement", () => {
const result = z
.number()
.refine((x) => x > 3, {
message: "override",
})
.safeParse(2);
expect(result.success).toBe(false);
expect(result.error!.issues.length).toEqual(1);
expect(result.error).toMatchInlineSnapshot(`
[ZodError: [
{
"code": "custom",
"path": [],
"message": "override"
}
]]
`);
});
test("array minimum", () => {
let result = z.array(z.string()).min(3, "tooshort").safeParse(["asdf", "qwer"]);
expect(result.success).toBe(false);
expect(result.error!.issues[0].code).toEqual("too_small");
expect(result.error!.issues[0].message).toEqual("tooshort");
result = z.array(z.string()).min(3).safeParse(["asdf", "qwer"]);
expect(result.success).toBe(false);
expect(result.error!.issues[0].code).toEqual("too_small");
expect(result.error).toMatchInlineSnapshot(`
[ZodError: [
{
"origin": "array",
"code": "too_small",
"minimum": 3,
"inclusive": true,
"path": [],
"message": "Too small: expected array to have >=3 items"
}
]]
`);
});
test("literal bigint default error message", () => {
const result = z.literal(BigInt(12)).safeParse(BigInt(13));
expect(result.success).toBe(false);
expect(result.error!.issues.length).toEqual(1);
expect(result.error).toMatchInlineSnapshot(`
[ZodError: [
{
"code": "invalid_value",
"values": [
"12"
],
"path": [],
"message": "Invalid input: expected 12n"
}
]]
`);
});
test("custom path in custom error map", () => {
const schema = z.object({
items: z.array(z.string()).refine((data) => data.length > 3, {
path: ["items-too-few"],
}),
});
const errorMap: z.ZodErrorMap = (issue) => {
expect((issue.path ?? []).length).toBe(2);
return { message: "doesnt matter" };
};
const result = schema.safeParse({ items: ["first"] }, { error: errorMap });
expect(result.success).toBe(false);
expect(result.error).toMatchInlineSnapshot(`
[ZodError: [
{
"code": "custom",
"path": [
"items",
"items-too-few"
],
"message": "doesnt matter"
}
]]
`);
});
// test("error metadata from value", () => {
// const dynamicRefine = z.string().refine(
// (val) => val === val.toUpperCase(),
// (val) => ({ params: { val } })
// );
// const result = dynamicRefine.safeParse("asdf");
// expect(result.success).toEqual(false);
// if (!result.success) {
// const sub = result.error.issues[0];
// expect(result.error.issues[0].code).toEqual("custom");
// if (sub.code === "custom") {
// expect(sub.params?.val).toEqual("asdf");
// }
// }
// });
// test("don't call refine after validation failed", () => {
// const asdf = z
// .union([
// z.number(),
// z.string().transform(z.number(), (val) => {
// return parseFloat(val);
// }),
// ])
// .refine((v) => v >= 1);
// expect(() => asdf.safeParse("foo")).not.toThrow();
// });
test("root level formatting", () => {
const schema = z.string().email();
const result = schema.safeParse("asdfsdf");
expect(result.success).toBe(false);
expect(result.error!.format()).toMatchInlineSnapshot(`
{
"_errors": [
"Invalid email address",
],
}
`);
});
test("custom path", () => {
const schema = z
.object({
password: z.string(),
confirm: z.string(),
})
.refine((val) => val.confirm === val.password, { path: ["confirm"] });
const result = schema.safeParse({
password: "peanuts",
confirm: "qeanuts",
});
expect(result.success).toBe(false);
const error = result.error!.format();
expect(error._errors).toEqual([]);
expect(error.password?._errors).toEqual(undefined);
expect(error.confirm?._errors).toEqual(["Invalid input"]);
});
test("custom path", () => {
const schema = z
.object({
password: z.string().min(6),
confirm: z.string().min(6),
})
.refine((val) => val.confirm === val.password);
const result = schema.safeParse({
password: "qwer",
confirm: "asdf",
});
expect(result.success).toBe(false);
expect(result.error!.issues.length).toEqual(3);
});
const schema = z.object({
inner: z.object({
name: z
.string()
.refine((val) => val.length > 5)
.array()
.refine((val) => val.length <= 1),
}),
});
test("no abort early on refinements", () => {
const invalidItem = {
inner: { name: ["aasd", "asdfasdfasfd"] },
};
const result1 = schema.safeParse(invalidItem);
expect(result1.success).toBe(false);
expect(result1.error!.issues.length).toEqual(2);
});
test("detect issue with input fallback", () => {
const schema = z
.string()
.transform((val) => val.length)
.refine(() => false, { message: "always fails" })
.refine(
(val) => {
if (typeof val !== "number") throw new Error();
return (val ^ 2) > 10;
} // should be number but it's a string
);
expect(() => schema.parse("hello")).toThrow(z.ZodError);
});
test("formatting", () => {
const invalidItem = {
inner: { name: ["aasd", "asdfasdfasfd"] },
};
const invalidArray = {
inner: { name: ["asdfasdf", "asdfasdfasfd"] },
};
const result1 = schema.safeParse(invalidItem);
const result2 = schema.safeParse(invalidArray);
expect(result1.success).toBe(false);
expect(result2.success).toBe(false);
const error1 = result1.error!.format();
expect(error1._errors).toEqual([]);
expect(error1.inner?._errors).toEqual([]);
expect(error1.inner?.name?.[1]).toEqual(undefined);
type FormattedError = z.inferFormattedError<typeof schema>;
const error2: FormattedError = result2.error!.format();
expect(error2._errors).toEqual([]);
expect(error2.inner?._errors).toEqual([]);
expect(error2.inner?.name?._errors).toEqual(["Invalid input"]);
expect(error2.inner?.name?.[0]).toEqual(undefined);
expect(error2.inner?.name?.[1]).toEqual(undefined);
expect(error2.inner?.name?.[2]).toEqual(undefined);
// test custom mapper
type FormattedErrorWithNumber = z.inferFormattedError<typeof schema, number>;
const errorWithNumber: FormattedErrorWithNumber = result2.error!.format(() => 5);
expect(errorWithNumber._errors).toEqual([]);
expect(errorWithNumber.inner?._errors).toEqual([]);
expect(errorWithNumber.inner?.name?._errors).toEqual([5]);
});
test("formatting with nullable and optional fields", () => {
const nameSchema = z.string().refine((val) => val.length > 5);
const schema = z.object({
nullableObject: z.object({ name: nameSchema }).nullable(),
nullableArray: z.array(nameSchema).nullable(),
nullableTuple: z.tuple([nameSchema, nameSchema, z.number()]).nullable(),
optionalObject: z.object({ name: nameSchema }).optional(),
optionalArray: z.array(nameSchema).optional(),
optionalTuple: z.tuple([nameSchema, nameSchema, z.number()]).optional(),
});
const invalidItem = {
nullableObject: { name: "abcd" },
nullableArray: ["abcd"],
nullableTuple: ["abcd", "abcd", 1],
optionalObject: { name: "abcd" },
optionalArray: ["abcd"],
optionalTuple: ["abcd", "abcd", 1],
};
const result = schema.safeParse(invalidItem);
expect(result.success).toBe(false);
const error: z.inferFormattedError<typeof schema> = result.error!.format();
expect(error._errors).toEqual([]);
expect(error.nullableObject?._errors).toEqual([]);
expect(error.nullableObject?.name?._errors).toEqual(["Invalid input"]);
expect(error.nullableArray?._errors).toEqual([]);
expect(error.nullableArray?.[0]?._errors).toEqual(["Invalid input"]);
expect(error.nullableTuple?._errors).toEqual([]);
expect(error.nullableTuple?.[0]?._errors).toEqual(["Invalid input"]);
expect(error.nullableTuple?.[1]?._errors).toEqual(["Invalid input"]);
expect(error.optionalObject?._errors).toEqual([]);
expect(error.optionalObject?.name?._errors).toEqual(["Invalid input"]);
expect(error.optionalArray?._errors).toEqual([]);
expect(error.optionalArray?.[0]?._errors).toEqual(["Invalid input"]);
expect(error.optionalTuple?._errors).toEqual([]);
expect(error.optionalTuple?.[0]?._errors).toEqual(["Invalid input"]);
expect(error.optionalTuple?.[1]?._errors).toEqual(["Invalid input"]);
expect(error).toMatchInlineSnapshot(`
{
"_errors": [],
"nullableArray": {
"0": {
"_errors": [
"Invalid input",
],
},
"_errors": [],
},
"nullableObject": {
"_errors": [],
"name": {
"_errors": [
"Invalid input",
],
},
},
"nullableTuple": {
"0": {
"_errors": [
"Invalid input",
],
},
"1": {
"_errors": [
"Invalid input",
],
},
"_errors": [],
},
"optionalArray": {
"0": {
"_errors": [
"Invalid input",
],
},
"_errors": [],
},
"optionalObject": {
"_errors": [],
"name": {
"_errors": [
"Invalid input",
],
},
},
"optionalTuple": {
"0": {
"_errors": [
"Invalid input",
],
},
"1": {
"_errors": [
"Invalid input",
],
},
"_errors": [],
},
}
`);
});
test("inferFlattenedErrors", () => {
const schemaWithTransform = z.object({ foo: z.string() }).transform((o) => ({ bar: o.foo }));
const result = schemaWithTransform.safeParse({});
expect(result.success).toBe(false);
type ValidationErrors = z.inferFlattenedErrors<typeof schemaWithTransform>;
const error: ValidationErrors = result.error!.flatten();
expect(error).toMatchInlineSnapshot(`
{
"fieldErrors": {
"foo": [
"Invalid input: expected string, received undefined",
],
},
"formErrors": [],
}
`);
});
const stringWithCustomError = z.string({
error: () => "bound",
});
test("schema-bound error map", () => {
const result = stringWithCustomError.safeParse(1234);
expect(result.success).toBe(false);
expect(result.error!.issues[0].message).toEqual("bound");
});
test("bound error map overrides contextual", () => {
// support contextual override
const result = stringWithCustomError.safeParse(undefined, {
error: () => ({ message: "override" }),
});
expect(result.success).toBe(false);
expect(result.error!.issues[0].message).toEqual("bound");
});
test("z.config customError ", () => {
// support overrideErrorMap
z.config({ customError: () => ({ message: "override" }) });
const result = stringWithCustomError.min(10).safeParse("tooshort");
expect(result.success).toBe(false);
expect(result.error).toMatchInlineSnapshot(`
[ZodError: [
{
"origin": "string",
"code": "too_small",
"minimum": 10,
"inclusive": true,
"path": [],
"message": "override"
}
]]
`);
expect(result.error!.issues[0].message).toEqual("override");
z.config({ customError: undefined });
});
// test("invalid and required", () => {
// const str = z.string({
// invalid_type_error: "Invalid name",
// required_error: "Name is required",
// });
// const result1 = str.safeParse(1234);
// expect(result1.success).toBe(false);
// if (!result1.success) {
// expect(result1.error.issues[0].message).toEqual("Invalid name");
// }
// const result2 = str.safeParse(undefined);
// expect(result2.success).toBe(false);
// if (!result2.success) {
// expect(result2.error.issues[0].message).toEqual("Name is required");
// }
// });
// test("Fallback to default required error", () => {
// const str = z.string({
// invalid_type_error: "Invalid name",
// // required_error: "Name is required",
// });
// const result2 = str.safeParse(undefined);
// expect(result2.success).toBe(false);
// if (!result2.success) {
// expect(result2.error.issues[0].message).toEqual("Required");
// }
// });
// test("invalid and required and errorMap", () => {
// expect(() => {
// return z.string({
// invalid_type_error: "Invalid name",
// required_error: "Name is required",
// errorMap: () => ({ message: "override" }),
// });
// }).toThrow();
// });
// test("strict error message", () => {
// const errorMsg = "Invalid object";
// const obj = z.object({ x: z.string() }).strict(errorMsg);
// const result = obj.safeParse({ x: "a", y: "b" });
// expect(result.success).toBe(false);
// if (!result.success) {
// expect(result.error.issues[0].message).toEqual(errorMsg);
// }
// });
test("empty string error message", () => {
const schema = z.string().max(1, { message: "" });
const result = schema.safeParse("asdf");
expect(result.success).toBe(false);
expect(result.error!.issues[0].message).toEqual("");
});
test("dont short circuit on continuable errors", () => {
const user = z
.object({
password: z.string().min(6),
confirm: z.string(),
})
.refine((data) => data.password === data.confirm, {
message: "Passwords don't match",
path: ["confirm"],
});
const result = user.safeParse({ password: "asdf", confirm: "qwer" });
expect(result.success).toBe(false);
expect(result.error).toMatchInlineSnapshot(`
[ZodError: [
{
"origin": "string",
"code": "too_small",
"minimum": 6,
"inclusive": true,
"path": [
"password"
],
"message": "Too small: expected string to have >=6 characters"
},
{
"code": "custom",
"path": [
"confirm"
],
"message": "Passwords don't match"
}
]]
`);
// expect(result.error!.issues.length).toEqual(2);
});
test("string error params", () => {
const a = z.string("Bad!");
expect(a.safeParse(123).error!.issues[0].message).toBe("Bad!");
const b = z.string().min(5, "Too short!");
expect(b.safeParse("abc").error!.issues[0].message).toBe("Too short!");
const c = z.uuid("Bad UUID!");
expect(c.safeParse("not-a-uuid").error!.issues[0].message).toBe("Bad UUID!");
const d = z.string().datetime({ message: "Bad date!" });
expect(d.safeParse("not-a-date").error!.issues[0].message).toBe("Bad date!");
const e = z.array(z.string(), "Bad array!");
expect(e.safeParse("not-an-array").error!.issues[0].message).toBe("Bad array!");
const f = z.array(z.string()).min(5, "Too few items!");
expect(f.safeParse(["a", "b"]).error!.issues[0].message).toBe("Too few items!");
const g = z.set(z.string(), "Bad set!");
expect(g.safeParse("not-a-set").error!.issues[0].message).toBe("Bad set!");
const h = z.array(z.string(), "Bad array!");
expect(h.safeParse(123).error!.issues[0].message).toBe("Bad array!");
const i = z.set(z.string(), "Bad set!");
expect(i.safeParse(123).error!.issues[0].message).toBe("Bad set!");
const j = z.array(z.string(), "Bad array!");
expect(j.safeParse(null).error!.issues[0].message).toBe("Bad array!");
});
test("error inheritance", () => {
const e1 = z.string().safeParse(123).error!;
expect(e1).toBeInstanceOf(z.core.$ZodError);
expect(e1).toBeInstanceOf(z.ZodError);
expect(e1).toBeInstanceOf(z.ZodRealError);
// expect(e1).not.toBeInstanceOf(Error);
try {
z.string().parse(123);
} catch (e2) {
expect(e1).toBeInstanceOf(z.core.$ZodError);
expect(e2).toBeInstanceOf(z.ZodError);
expect(e2).toBeInstanceOf(z.ZodRealError);
// expect(e2).toBeInstanceOf(Error);
}
});
test("error serialization", () => {
try {
z.string().parse(123);
} catch (e) {
expect(e).toMatchInlineSnapshot(`
[ZodError: [
{
"expected": "string",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected string, received number"
}
]]
`);
expect(inspect(e).split("\n").slice(0, 8).join("\n")).toMatchInlineSnapshot(`
"ZodError: [
{
"expected": "string",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected string, received number"
}
]"
`);
}
});
@@ -0,0 +1,158 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/use-modal.ts
var use_modal_exports = {};
__export(use_modal_exports, {
useModal: () => useModal
});
module.exports = __toCommonJS(use_modal_exports);
var import_use_aria_modal_overlay = require("@heroui/use-aria-modal-overlay");
var import_react = require("react");
var import_theme = require("@heroui/theme");
var import_system = require("@heroui/system");
var import_use_aria_button = require("@heroui/use-aria-button");
var import_focus = require("@react-aria/focus");
var import_shared_utils = require("@heroui/shared-utils");
var import_react_utils = require("@heroui/react-utils");
var import_overlays = require("@react-stately/overlays");
var import_utils = require("@react-aria/utils");
function useModal(originalProps) {
var _a, _b, _c;
const globalContext = (0, import_system.useProviderContext)();
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.modal.variantKeys);
const {
ref,
as,
className,
classNames,
isOpen,
defaultOpen,
onOpenChange,
motionProps,
closeButton,
isDismissable = true,
hideCloseButton = false,
shouldBlockScroll = true,
portalContainer,
isKeyboardDismissDisabled = false,
onClose,
...otherProps
} = props;
const Component = as || "section";
const domRef = (0, import_react_utils.useDOMRef)(ref);
const closeButtonRef = (0, import_react.useRef)(null);
const [headerMounted, setHeaderMounted] = (0, import_react.useState)(false);
const [bodyMounted, setBodyMounted] = (0, import_react.useState)(false);
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const dialogId = (0, import_react.useId)();
const headerId = (0, import_react.useId)();
const bodyId = (0, import_react.useId)();
const state = (0, import_overlays.useOverlayTriggerState)({
isOpen,
defaultOpen,
onOpenChange: (isOpen2) => {
onOpenChange == null ? void 0 : onOpenChange(isOpen2);
if (!isOpen2) {
onClose == null ? void 0 : onClose();
}
}
});
const { modalProps, underlayProps } = (0, import_use_aria_modal_overlay.useAriaModalOverlay)(
{
isDismissable,
shouldBlockScroll,
isKeyboardDismissDisabled
},
state,
domRef
);
const { buttonProps: closeButtonProps } = (0, import_use_aria_button.useAriaButton)({ onPress: state.close }, closeButtonRef);
const { isFocusVisible: isCloseButtonFocusVisible, focusProps: closeButtonFocusProps } = (0, import_focus.useFocusRing)();
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className);
const slots = (0, import_react.useMemo)(
() => (0, import_theme.modal)({
...variantProps,
disableAnimation
}),
[(0, import_shared_utils.objectToDeps)(variantProps), disableAnimation]
);
const getDialogProps = (props2 = {}, ref2 = null) => {
var _a2;
return {
ref: (0, import_utils.mergeRefs)(ref2, domRef),
...(0, import_utils.mergeProps)(modalProps, otherProps, props2),
className: slots.base({ class: (0, import_shared_utils.clsx)(baseStyles, props2.className) }),
id: dialogId,
"data-open": (0, import_shared_utils.dataAttr)(state.isOpen),
"data-dismissable": (0, import_shared_utils.dataAttr)(isDismissable),
"aria-modal": (0, import_shared_utils.dataAttr)(true),
"data-placement": (_a2 = originalProps == null ? void 0 : originalProps.placement) != null ? _a2 : "right",
"aria-labelledby": headerMounted ? headerId : void 0,
"aria-describedby": bodyMounted ? bodyId : void 0
};
};
const getBackdropProps = (0, import_react.useCallback)(
(props2 = {}) => ({
className: slots.backdrop({ class: classNames == null ? void 0 : classNames.backdrop }),
onClick: () => state.close(),
...underlayProps,
...props2
}),
[slots, classNames, underlayProps]
);
const getCloseButtonProps = () => {
return {
role: "button",
tabIndex: 0,
"aria-label": "Close",
"data-focus-visible": (0, import_shared_utils.dataAttr)(isCloseButtonFocusVisible),
className: slots.closeButton({ class: classNames == null ? void 0 : classNames.closeButton }),
...(0, import_utils.mergeProps)(closeButtonProps, closeButtonFocusProps)
};
};
return {
Component,
slots,
domRef,
headerId,
bodyId,
motionProps,
classNames,
isDismissable,
closeButton,
hideCloseButton,
portalContainer,
shouldBlockScroll,
backdrop: (_c = originalProps.backdrop) != null ? _c : "opaque",
isOpen: state.isOpen,
onClose: state.close,
disableAnimation,
setBodyMounted,
setHeaderMounted,
getDialogProps,
getBackdropProps,
getCloseButtonProps
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
useModal
});
@@ -0,0 +1 @@
!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_km=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"km",weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekStart:1,weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"}};return t.default.locale(d,null,!0),d}));
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AA6BA;IACE;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,oBALW,UAAU,GAAG,IAAI,GAAG,SAAS,EA4HvC;IAvGC;;;;OAIG;IAGH,KAJU,MAAM,CAIgC;IAEhD;;;;;;;OAOG;IACH,MAFU,IAAI,CAEA;IAEd;;;;;;OAMG;IACH,SAFU,KAAK,CAAC,MAAM,CAAC,CAEN;IAEjB;;;;OAIG;IACH,UAFU,KAAK,CAAC,YAAY,CAAC,CAEX;IAElB;;;;OAIG;IACH,OAFU,KAAK,CAEL;IAIV;;;;;;;OAOG;IACH,KAFU,GAAG,GAAG,IAAI,GAAG,SAAS,CAExB;IAER;;;;;;;OAOG;IACH,QAFU,OAAO,CAEN;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GAAG,SAAS,GACvB,YAAY,CAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA,eACQ,KAAK,GAAG,YAAY,SACpB,KAAK,GAAG,QAAQ,GAAG,IAAI,GAAG,SAAS,WACnC,MAAM,GAAG,IAAI,GAAG,SAAS,GACvB,YAAY,CAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA,eACQ,KAAK,GAAG,YAAY,WACpB,MAAM,GAAG,IAAI,GAAG,SAAS,GACvB,YAAY,CAEtB;IA8BH;;;;;;;;;;;;OAYG;IACH,oBANW,MAAM,GAAG,IAAI,GAAG,SAAS,GAGvB,MAAM,CAclB;CACF;uBAxjBY,MAAM,GAAG;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAAC;0BAJb,OAAO;6BAOpC,eAAe;2BAPc,OAAO;yBAAP,OAAO;+CADnB,eAAe;0BADnB,OAAO;2BAAP,OAAO;8BAAP,OAAO;gCAES,OAAO"}
@@ -0,0 +1,115 @@
'use strict';
var createNode = require('../doc/createNode.js');
var stringifyCollection = require('../stringify/stringifyCollection.js');
var Collection = require('./Collection.js');
var identity = require('./identity.js');
var Scalar = require('./Scalar.js');
var toJS = require('./toJS.js');
class YAMLSeq extends Collection.Collection {
static get tagName() {
return 'tag:yaml.org,2002:seq';
}
constructor(schema) {
super(identity.SEQ, schema);
this.items = [];
}
add(value) {
this.items.push(value);
}
/**
* Removes a value from the collection.
*
* `key` must contain a representation of an integer for this to succeed.
* It may be wrapped in a `Scalar`.
*
* @returns `true` if the item was found and removed.
*/
delete(key) {
const idx = asItemIndex(key);
if (typeof idx !== 'number')
return false;
const del = this.items.splice(idx, 1);
return del.length > 0;
}
get(key, keepScalar) {
const idx = asItemIndex(key);
if (typeof idx !== 'number')
return undefined;
const it = this.items[idx];
return !keepScalar && identity.isScalar(it) ? it.value : it;
}
/**
* Checks if the collection includes a value with the key `key`.
*
* `key` must contain a representation of an integer for this to succeed.
* It may be wrapped in a `Scalar`.
*/
has(key) {
const idx = asItemIndex(key);
return typeof idx === 'number' && idx < this.items.length;
}
/**
* Sets a value in this collection. For `!!set`, `value` needs to be a
* boolean to add/remove the item from the set.
*
* If `key` does not contain a representation of an integer, this will throw.
* It may be wrapped in a `Scalar`.
*/
set(key, value) {
const idx = asItemIndex(key);
if (typeof idx !== 'number')
throw new Error(`Expected a valid index, not ${key}.`);
const prev = this.items[idx];
if (identity.isScalar(prev) && Scalar.isScalarValue(value))
prev.value = value;
else
this.items[idx] = value;
}
toJSON(_, ctx) {
const seq = [];
if (ctx?.onCreate)
ctx.onCreate(seq);
let i = 0;
for (const item of this.items)
seq.push(toJS.toJS(item, String(i++), ctx));
return seq;
}
toString(ctx, onComment, onChompKeep) {
if (!ctx)
return JSON.stringify(this);
return stringifyCollection.stringifyCollection(this, ctx, {
blockItemPrefix: '- ',
flowChars: { start: '[', end: ']' },
itemIndent: (ctx.indent || '') + ' ',
onChompKeep,
onComment
});
}
static from(schema, obj, ctx) {
const { replacer } = ctx;
const seq = new this(schema);
if (obj && Symbol.iterator in Object(obj)) {
let i = 0;
for (let it of obj) {
if (typeof replacer === 'function') {
const key = obj instanceof Set ? it : String(i++);
it = replacer.call(obj, key, it);
}
seq.items.push(createNode.createNode(it, undefined, ctx));
}
}
return seq;
}
}
function asItemIndex(key) {
let idx = identity.isScalar(key) ? key.value : key;
if (idx && typeof idx === 'string')
idx = Number(idx);
return typeof idx === 'number' && Number.isInteger(idx) && idx >= 0
? idx
: null;
}
exports.YAMLSeq = YAMLSeq;
@@ -0,0 +1,80 @@
'use strict';
module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $errorKeyword;
var $data = 'data' + ($dataLvl || '');
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
if (!($isData || typeof $schema == 'number')) {
throw new Error($keyword + ' must be number');
}
var $op = $keyword == 'maxProperties' ? '>' : '<';
out += 'if ( ';
if ($isData) {
out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || ';
}
out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';
var $errorKeyword = $keyword;
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';
if (it.opts.messages !== false) {
out += ' , message: \'should NOT have ';
if ($keyword == 'maxProperties') {
out += 'more';
} else {
out += 'fewer';
}
out += ' than ';
if ($isData) {
out += '\' + ' + ($schemaValue) + ' + \'';
} else {
out += '' + ($schema);
}
out += ' properties\' ';
}
if (it.opts.verbose) {
out += ' , schema: ';
if ($isData) {
out += 'validate.schema' + ($schemaPath);
} else {
out += '' + ($schema);
}
out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += '} ';
if ($breakOnError) {
out += ' else { ';
}
return out;
}
@@ -0,0 +1,12 @@
'use strict';
var includes = require('../');
var test = require('tape');
var runTests = require('./tests');
test('as a function', function (t) {
runTests(includes, t);
t.end();
});
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"K D E wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC","260":"J ZB K D E F A B C L M G N O P aB 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"1":"J ZB K D E F A 2C ZC 3C 4C 5C 6C aC","513":"B C L M G NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},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 HD ID NC uC JD OC","2":"F FD GD"},G:{"1025":"E ZC KD vC LD MD ND OD PD QD RD SD","1537":"TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"1":"TC J I kD lD vC mD nD","132":"iD jD"},J:{"1":"D A"},K:{"1":"B C H NC uC OC","2":"A"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"Video element",D:true};
@@ -0,0 +1,485 @@
## 1.5.4 (2025-09-18)
### Bug fixes
Support `this` parameters in function types.
## 1.5.3 (2025-09-09)
### Bug fixes
Fix missing highlight tag for `defer` contextual keyword.
## 1.5.2 (2025-09-04)
### Bug fixes
Allow `const` casts with old angle-bracket cast syntax.
Add support for `import defer` syntax.
## 1.5.1 (2025-04-18)
### Bug fixes
Properly highlight `satisfies` as a keyword.
## 1.5.0 (2025-04-17)
### Bug fixes
Support `in`/`out` modifiers on TypeScript type parameters.
### New features
Support the TypeScript `satisfies` operator.
## 1.4.21 (2024-12-03)
### Bug fixes
Add support for `const` modifiers on TypeScript type parameters.
Allow TypeScript syntax, where the condition is just a variable.
Fix a bug where some TypeScript `<` tokens didn't appear in the syntax tree.
## 1.4.20 (2024-12-02)
### Bug fixes
Use the `className` style tag for variable names used as constructors with `new`.
Add support for `asserts` syntax in function return types.
## 1.4.19 (2024-10-08)
### Bug fixes
Support question marks after method names in TypeScript object type notation.
Support bracketed property names in TypeScript object types.
Allow TypeScript interface declarations to extend multiple types.
## 1.4.18 (2024-09-17)
### Bug fixes
Support `as` syntax in mapped object types.
Make sure the parser doesn't get confused when a template interpolation is missing its expression.
## 1.4.17 (2024-06-11)
### Bug fixes
Add support for `{-readonly [K in T]-?: U}` TypeScript syntax.
## 1.4.16 (2024-05-04)
### Bug fixes
Don't consume `?.` tokens when followed by a digit.
Support type arguments on non-call expressions.
## 1.4.15 (2024-04-23)
### Bug fixes
Add support for `new.target` syntax.
## 1.4.14 (2024-03-30)
### Bug fixes
Recognize the `d` and `v` RegExp flags. Support destructured parameters in function types
Allow destructured parameters in function signature types.
## 1.4.13 (2024-01-16)
### Bug fixes
Fix inverted relative precedence of `&`, `|`, and `^` bitwise operators.
Add an explicit dependency on @lezer/common ^1.2.0.
## 1.4.12 (2024-01-04)
### Bug fixes
Mark strings, comments, and interpolations as isolating for bidirectional text.
## 1.4.11 (2023-12-18)
### Bug fixes
In TSX mode, parse `<T,>` or `<T extends U>` as type parameters, not JSX tags.
## 1.4.10 (2023-12-06)
### Bug fixes
Support `|` and `&` as prefixes in TypeScript types.
## 1.4.9 (2023-10-30)
### Bug fixes
Allow `default` to be used in `import`/`export` binding sets.
## 1.4.8 (2023-10-05)
### Bug fixes
Properly highlight `using` as a keyword.
## 1.4.7 (2023-08-23)
### Bug fixes
Properly parse hashbang comments.
## 1.4.6 (2023-08-22)
### Bug fixes
Make sure that, in TypeScript, type argument lists are prefered over comparison operators when both produce valid parses.
## 1.4.5 (2023-07-25)
### Bug fixes
Allow the index in a TypeScript indexed type to be any kind of type.
## 1.4.4 (2023-07-03)
### Bug fixes
Add support for `using` syntax.
Make the package work with new TS resolution styles.
## 1.4.3 (2023-04-24)
### Bug fixes
Properly parse `this: Type` within parameter lists for TypeScript.
## 1.4.2 (2023-03-29)
### Bug fixes
Properly parse `declare` in front of class properties and methods in TypeScript.
## 1.4.1 (2023-01-09)
### Bug fixes
Fix a bug where something like `yield [1]` (or `await`) was parsed as a member expression.
Add support for `yield*` syntax.
Escapes in strings are now parsed as their own tokens (and styled with the `escape` tag).
## 1.4.0 (2022-12-19)
### New features
The new `"SingleClassItem"` top-level rule can be used to parse only a class item (method, property, or static block).
## 1.3.2 (2022-12-14)
### Bug fixes
Typescript allows `override` on all class elements, not just methods.
Allow expressions in class extends clauses in TypeScript.
## 1.3.1 (2022-11-29)
### Bug fixes
Actually emit a tree node for the `@` characters in decorators.
## 1.3.0 (2022-11-28)
### New features
Add support for decorator syntax.
## 1.2.0 (2022-11-24)
### New features
The grammar now supports `top: "SingleExpression"` to parse an expression rather than a script.
## 1.1.1 (2022-11-19)
### Bug fixes
Fix parsing of computed properties in class declarations.
## 1.1.0 (2022-11-17)
### Bug fixes
Fix parsing of 'null' as type in TypeScript.
Allow computed properties in object destructuring patterns.
Add TypeScript 4.9's `satisfies` operator.
Support `accessor` syntax on class properties.
### New features
Add support for optional call syntax.
Distinguish lower-case JSX element names syntactically, give them a `standard(tagName)` highlight tag.
## 1.0.2 (2022-07-21)
### Bug fixes
Properly assign a highlighting tag to the `super` keyword.
## 1.0.1 (2022-06-27)
### Bug fixes
Fix parsing of TypeScript conditional types.
Support type parameters in TypeScript function type syntax.
## 1.0.0 (2022-06-06)
### New features
First stable version.
## 0.16.0 (2022-04-20)
### Breaking changes
Move to 0.16 serialized parser format.
### Bug fixes
Allow commas as separators in TypeScript object type syntax.
### New features
Add `CatchClause` and `FinallyClause` nodes wrapping parts of `TryStatement`.
The parser now includes syntax highlighting information in its node types.
## 0.15.3 (2022-01-26)
### Bug fixes
Support missing values in array pattern syntax.
Support quoted module export names.
### New features
Template string interpolations now get their own nodes in the syntax tree.
## 0.15.2 (2021-12-08)
### Bug fixes
Fix a typo in the `TaggedTemplateExpression` node name. Support n suffixes after non-decimal integers
Add support for non-decimal bignum literals ().
Add support for static class initialization blocks.
## 0.15.1 (2021-11-12)
### Bug fixes
Add support for TypeScript `import {type X} from y` syntax.
Indexed TypeScript types can now take type parameters.
Add support for private field syntax.
Rename PropertyNameDefinition node to PropertyDefinition for consistency with other names.
### New features
Recognize TypeScript 4.3's `override` keyword.
## 0.15.0 (2021-08-11)
### Breaking changes
The module's name changed from `lezer-javascript` to `@lezer/javascript`.
Upgrade to the 0.15.0 lezer interfaces.
## 0.13.4 (2021-04-30)
### Bug fixes
Fixes a bug where arrow functions with expression bodies would include commas after the expression.
## 0.13.3 (2021-02-15)
### Bug fixes
Wrap escaped JSX attribute values in a `JSXEscape` node.
## 0.13.2 (2021-01-18)
### Bug fixes
Fix parsing of async function expressions.
## 0.13.1 (2020-12-04)
### Bug fixes
Fix versions of lezer packages depended on.
## 0.13.0 (2020-12-04)
## 0.12.0 (2020-10-23)
### Breaking changes
Adjust to changed serialized parser format.
## 0.11.1 (2020-09-26)
### Bug fixes
Fix lezer depencency versions
## 0.11.0 (2020-09-26)
### Breaking changes
Follow change in serialized parser format.
## 0.10.1 (2020-09-02)
### Bug fixes
Fix associativity of `else` and ternary operators.
Work around accidental ambiguity of TypeScript method and constructor signatures.
Properly parse `??=` as an update operator.
## 0.10.0 (2020-08-07)
### Breaking changes
Upgrade to 0.10 parser serialization
### New features
The gammar now supports TypeScript (use the `"ts"` dialect).
The grammar can now parse JSX syntax (use the `"jsx"` dialect).
## 0.9.1 (2020-06-29)
### Bug fixes
Fix accidental use of non-ES5 library methods.
## 0.9.0 (2020-06-08)
### Breaking changes
Upgrade to 0.9 parser serialization
## 0.8.4 (2020-05-30)
### Bug fixes
Fix the package.json `main` field pointing at the wrong file, breaking the library in node versions older than 13.
## 0.8.3 (2020-04-09)
### Bug fixes
Regenerate parser with a fix in lezer-generator so that the top node prop is properly assigned.
## 0.8.2 (2020-04-01)
### Bug fixes
Make the package load as an ES module on node
## 0.8.1 (2020-02-28)
### New features
Provide an ES module file.
## 0.8.0 (2020-02-03)
### Bug fixes
Add support for the spread ... operator in array literals.
### New features
Follow 0.8.0 release of the library.
Add support for nullish coalescing and optional chaining.
## 0.7.0 (2020-01-20)
### Breaking changes
Use the lezer 0.7.0 parser format.
## 0.5.2 (2020-01-15)
### Bug fixes
Regenerate with lezer-generator 0.5.2 to avoid cyclic forced reductions.
## 0.5.1 (2019-10-22)
### Bug fixes
Fix top prop missing from build output.
## 0.5.0 (2019-10-22)
### Breaking changes
Move from `lang` to `top` prop on document node.
## 0.4.0 (2019-09-10)
### Breaking changes
Adjust to 0.4.0 parse table format.
## 0.3.0 (2019-08-22)
### New features
Go back to node names, add props, follow changes in grammar syntax.
## 0.2.0 (2019-08-02)
### New features
Use tags rather than names.
## 0.1.0 (2019-07-09)
### New Features
First documented release.
@@ -0,0 +1,3 @@
import { BindingConstraints, MetadataTag } from '@inversifyjs/core';
export declare function isParentBindingConstraintsWithTag(tag: MetadataTag, value: unknown): (constraints: BindingConstraints) => boolean;
//# sourceMappingURL=isParentBindingConstraintsWithTag.d.ts.map
@@ -0,0 +1,2 @@
const t=Symbol.for("@inversifyjs/plugin/isPlugin");class n{[t]=!0;_container;_context;constructor(t,n){this._container=t,this._context=n}}export{n as Plugin,t as isPlugin};
//# sourceMappingURL=index.js.map
@@ -0,0 +1,35 @@
{
"name": "@internationalized/number",
"version": "3.6.5",
"description": "Internationalized number formatting and parsing utilities",
"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": {
"@swc/helpers": "^0.5.0"
},
"publishConfig": {
"access": "public"
},
"gitHead": "2c58ed3ddd9be9100af9b1d0cfd137fcdc95ba2d"
}
@@ -0,0 +1,22 @@
/**
* Checks if `url` is an absolute URL.
*
* 校验是否是绝对URL
*
* @example
* ```js
* import { isAbsoluteURL } from 'is-what-type';
*
* isAbsoluteURL('https://example.com'); // true
* isAbsoluteURL('/foo/bar'); // false
* isAbsoluteURL('ftp://example.com'); // true
* isAbsoluteURL('mailto:foo@bar.com'); // true
* isAbsoluteURL('file:///usr/bin/myfile'); // true
* isAbsoluteURL('//example.com'); // true
* isAbsoluteURL('example.com'); // false
* ```
*
* @param value - The value to check.
* @returns `true` if the value is an absolute URL, `false` otherwise.
*/
export declare function isAbsoluteURL(value: any): boolean;
@@ -0,0 +1,14 @@
module.exports = {
"ascending": `croissant`,
"ascendingSort": (args)=>`tri\xe9 en fonction de la colonne\xa0${args.columnName} par ordre croissant`,
"columnSize": (args)=>`${args.value}\xa0pixels`,
"descending": `d\xe9croissant`,
"descendingSort": (args)=>`tri\xe9 en fonction de la colonne\xa0${args.columnName} par ordre d\xe9croissant`,
"resizerDescription": `Appuyez sur Entr\xe9e pour commencer le redimensionnement.`,
"select": `S\xe9lectionner`,
"selectAll": `S\xe9lectionner tout`,
"sortable": `colonne triable`
};
//# sourceMappingURL=fr-FR.main.js.map
@@ -0,0 +1,35 @@
'use strict';
var callBind = require('call-bind-apply-helpers');
var gOPD = require('gopd');
var $TypeError = require('es-errors/type');
/** @type {{ __proto__?: object | null }} */
var obj = {};
try {
obj.__proto__ = null; // eslint-disable-line no-proto
} catch (e) {
if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
throw e;
}
}
var hasProtoMutator = !('toString' in obj);
// eslint-disable-next-line no-extra-parens
var desc = gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
/** @type {import('./set')} */
module.exports = hasProtoMutator && (
// eslint-disable-next-line no-extra-parens
(!!desc && typeof desc.set === 'function' && /** @type {import('./set')} */ (callBind([desc.set])))
|| /** @type {import('./set')} */ function setDunder(object, proto) {
// this is node v0.10 or older, which doesn't have Object.setPrototypeOf and has undeniable __proto__
if (object == null) { // eslint-disable-line eqeqeq
throw new $TypeError('set Object.prototype.__proto__ called on null or undefined');
}
// eslint-disable-next-line no-proto, no-param-reassign, no-extra-parens
/** @type {{ __proto__?: object | null }} */ (object).__proto__ = proto;
return proto;
}
);
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_dispose.cjs",
"module": "../../esm/_dispose.js"
}
@@ -0,0 +1,32 @@
'use strict';
// https://262.ecma-international.org/6.0/#table-49
module.exports = {
__proto__: null,
name: {
__proto__: null,
$Int8Array: 'Int8',
$Uint8Array: 'Uint8',
$Uint8ClampedArray: 'Uint8C',
$Int16Array: 'Int16',
$Uint16Array: 'Uint16',
$Int32Array: 'Int32',
$Uint32Array: 'Uint32',
$Float32Array: 'Float32',
$Float64Array: 'Float64'
},
size: {
__proto__: null,
$Int8: 1,
$Uint8: 1,
$Uint8C: 1,
$Int16: 2,
$Uint16: 2,
$Int32: 4,
$Uint32: 4,
$Float32: 4,
$Float64: 8
},
choices: '"Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"'
};
@@ -0,0 +1,52 @@
import constants from 'node:constants';
export const allSignals =
// this is the full list of signals that Node will let us do anything with
Object.keys(constants).filter(k => k.startsWith('SIG') &&
// https://github.com/tapjs/signal-exit/issues/21
k !== 'SIGPROF' &&
// no sense trying to listen for SIGKILL, it's impossible
k !== 'SIGKILL');
// These are some obscure signals that are reported by kill -l
// on macOS, Linux, or Windows, but which don't have any mapping
// in Node.js. No sense trying if they're just going to throw
// every time on every platform.
//
// 'SIGEMT',
// 'SIGLOST',
// 'SIGPOLL',
// 'SIGRTMAX',
// 'SIGRTMAX-1',
// 'SIGRTMAX-10',
// 'SIGRTMAX-11',
// 'SIGRTMAX-12',
// 'SIGRTMAX-13',
// 'SIGRTMAX-14',
// 'SIGRTMAX-15',
// 'SIGRTMAX-2',
// 'SIGRTMAX-3',
// 'SIGRTMAX-4',
// 'SIGRTMAX-5',
// 'SIGRTMAX-6',
// 'SIGRTMAX-7',
// 'SIGRTMAX-8',
// 'SIGRTMAX-9',
// 'SIGRTMIN',
// 'SIGRTMIN+1',
// 'SIGRTMIN+10',
// 'SIGRTMIN+11',
// 'SIGRTMIN+12',
// 'SIGRTMIN+13',
// 'SIGRTMIN+14',
// 'SIGRTMIN+15',
// 'SIGRTMIN+16',
// 'SIGRTMIN+2',
// 'SIGRTMIN+3',
// 'SIGRTMIN+4',
// 'SIGRTMIN+5',
// 'SIGRTMIN+6',
// 'SIGRTMIN+7',
// 'SIGRTMIN+8',
// 'SIGRTMIN+9',
// 'SIGSTKFLT',
// 'SIGUNUSED',
//# sourceMappingURL=all-signals.js.map
@@ -0,0 +1,76 @@
// Copyright 2013 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Build per-context histograms of literals, commands and distance codes.
#include "./histogram.h"
#include <stdint.h>
#include <cmath>
#include "./block_splitter.h"
#include "./command.h"
#include "./context.h"
#include "./prefix.h"
namespace brotli {
void BuildHistograms(
const Command* cmds,
const size_t num_commands,
const BlockSplit& literal_split,
const BlockSplit& insert_and_copy_split,
const BlockSplit& dist_split,
const uint8_t* ringbuffer,
size_t start_pos,
size_t mask,
uint8_t prev_byte,
uint8_t prev_byte2,
const std::vector<int>& context_modes,
std::vector<HistogramLiteral>* literal_histograms,
std::vector<HistogramCommand>* insert_and_copy_histograms,
std::vector<HistogramDistance>* copy_dist_histograms) {
size_t pos = start_pos;
BlockSplitIterator literal_it(literal_split);
BlockSplitIterator insert_and_copy_it(insert_and_copy_split);
BlockSplitIterator dist_it(dist_split);
for (int i = 0; i < num_commands; ++i) {
const Command &cmd = cmds[i];
insert_and_copy_it.Next();
(*insert_and_copy_histograms)[insert_and_copy_it.type_].Add(
cmd.cmd_prefix_);
for (int j = 0; j < cmd.insert_len_; ++j) {
literal_it.Next();
int context = (literal_it.type_ << kLiteralContextBits) +
Context(prev_byte, prev_byte2, context_modes[literal_it.type_]);
(*literal_histograms)[context].Add(ringbuffer[pos & mask]);
prev_byte2 = prev_byte;
prev_byte = ringbuffer[pos & mask];
++pos;
}
pos += cmd.copy_len_;
if (cmd.copy_len_ > 0) {
prev_byte2 = ringbuffer[(pos - 2) & mask];
prev_byte = ringbuffer[(pos - 1) & mask];
if (cmd.cmd_prefix_ >= 128) {
dist_it.Next();
int context = (dist_it.type_ << kDistanceContextBits) +
cmd.DistanceContext();
(*copy_dist_histograms)[context].Add(cmd.dist_prefix_);
}
}
}
}
} // namespace brotli
@@ -0,0 +1,2 @@
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"useNamespace", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,188 @@
import { groupBy } from './utils.js';
/**
* @typedef HelpListOptions
* @property {boolean} [fixedPadName] When set to true, padName will be treated as a fixed rather than minimum padding
* @property {string} [keyPrefix] A prefix for the name, eg. "--"
* @property {number} [padName] The minimum padding between names and descriptions
* @property {string} [shortFlagPrefix] A prefix for the shortFlag, defaults to "-"
*/
/**
* @param {string} name
* @param {string|import('./help-list-types.d.ts').HelpListItem|undefined} item
* @param {Readonly<Pick<HelpListOptions, 'keyPrefix'|'padName'|'shortFlagPrefix'>>} options
* @returns {string}
*/
function formatHelpListName (name, item, options = {}) {
if (!item) {
return '';
}
const {
keyPrefix = '',
padName = 0,
shortFlagPrefix = '-',
} = options;
const richItem = typeof item === 'string' ? { description: item } : item;
let formattedShortFlag = '';
if ('type' in richItem) {
if (richItem.type === 'string' && richItem.default) {
name = richItem.multiple
? `${name} [${richItem.default.join(', ')}]`
: `${name} [${richItem.default}]`;
}
if (richItem.short) {
formattedShortFlag = ` ${shortFlagPrefix}${richItem.short}`;
}
}
return (keyPrefix + name).padEnd(padName - formattedShortFlag.length) + formattedShortFlag;
}
/**
* @param {import('./help-list-types.d.ts').HelpList} list
* @param {Readonly<Pick<HelpListOptions, 'keyPrefix'>>} options
* @returns {number}
*/
export function getHelpListMaxNamePadding (list, options = {}) {
let longestLength = 0;
for (const name in list) {
const item = list[name];
const itemName = formatHelpListName(name, item, options);
if (longestLength < itemName.length) {
longestLength = itemName.length;
}
}
return longestLength;
}
/**
* @param {import('./help-list-types.d.ts').HelpList} list
* @param {number} indent
* @param {HelpListOptions} options
* @returns {string}
*/
export function formatHelpList (list, indent, options = {}) {
const {
fixedPadName = false,
padName = 0,
} = options;
const names = Object.keys(list).sort();
const calculatedPadName = fixedPadName
? padName
: Math.max(padName, getHelpListMaxNamePadding(list, options));
let result = '';
for (const name of names) {
const item = list[name];
result += ''.padEnd(indent) +
formatHelpListName(name, item, { ...options, padName: calculatedPadName }) + ' ' +
(typeof item === 'object' ? item.description : item) + '\n';
}
return result.trim();
}
/**
* @typedef HelpListGroupOptionsExtras
* @property {boolean} [alignWithinGroups]
* @property {string} [defaultGroupName]
* @property {boolean} [defaultGroupOrderFirst]
*/
/** @typedef {Readonly<HelpListOptions & HelpListGroupOptionsExtras>} HelpListGroupOptions */
/**
* @param {import('./help-list-types.d.ts').HelpList} list
* @param {number} indent
* @param {HelpListGroupOptions} options
* @returns {string}
*/
export function formatGroupedHelpList (list, indent, options = {}) {
const {
alignWithinGroups = false,
defaultGroupName = 'Default',
defaultGroupOrderFirst = false,
fixedPadName = false,
padName = 0,
...incomingListOptions
} = options;
const calculatedPadName = (alignWithinGroups || fixedPadName)
? undefined
: Math.max(padName, getHelpListMaxNamePadding(list, options));
const defaultGroupSymbol = Symbol('Default group');
const {
[defaultGroupSymbol]: defaultGroup,
...groups
} = groupBy(
Object.entries(list),
([, item]) => (typeof item === 'object' && item.listGroup) || defaultGroupSymbol
);
const sortedGroupNames = Object.keys(groups).sort();
const groupNames = defaultGroup
? (
defaultGroupOrderFirst
? /** @type {const} */ ([defaultGroupSymbol, ...sortedGroupNames])
: /** @type {const} */ ([...sortedGroupNames, defaultGroupSymbol])
)
: sortedGroupNames;
/** @type {HelpListOptions} */
const listOptions = {
...incomingListOptions,
fixedPadName: calculatedPadName === undefined ? fixedPadName : true, // Avoids redoing calculation
padName: calculatedPadName || padName,
};
const flagIndent = indent + 2;
let result = '';
for (const groupKey of groupNames) {
const groupItem = groupKey === defaultGroupSymbol ? defaultGroup : groups[groupKey];
const groupList = Object.fromEntries(groupItem || []);
const groupName = groupKey === defaultGroupSymbol ? defaultGroupName : groupKey;
result += '\n' + ''.padEnd(indent) + groupName + '\n';
result += ''.padEnd(flagIndent) + formatHelpList(groupList, flagIndent, listOptions) + '\n';
}
return result;
}
/**
* @param {import('./help-list-types.d.ts').HelpList} list
* @param {number} indent
* @param {Readonly<HelpListOptions>} options
* @returns {string}
*/
export function formatFlagList (list, indent, options = {}) {
return formatHelpList(list, indent, { keyPrefix: '--', ...options });
}
/**
* @param {import('./help-list-types.d.ts').HelpList} list
* @param {number} indent
* @param {HelpListGroupOptions} options
* @returns {string}
*/
export function formatGroupedFlagList (list, indent, options = {}) {
return formatGroupedHelpList(list, indent, { defaultGroupName: 'Options', keyPrefix: '--', ...options });
}
@@ -0,0 +1,18 @@
# @codemirror/lint [![NPM version](https://img.shields.io/npm/v/@codemirror/lint.svg)](https://www.npmjs.org/package/@codemirror/lint)
[ [**WEBSITE**](https://codemirror.net/) | [**DOCS**](https://codemirror.net/docs/ref/#lint) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/lint/blob/main/CHANGELOG.md) ]
This package implements linting support for the
[CodeMirror](https://codemirror.net/) code editor.
The [project page](https://codemirror.net/) has more information, a
number of [examples](https://codemirror.net/examples/) and the
[documentation](https://codemirror.net/docs/).
This code is released under an
[MIT license](https://github.com/codemirror/lint/tree/main/LICENSE).
We aim to be an inclusive, welcoming community. To make that explicit,
we have a [code of
conduct](http://contributor-covenant.org/version/1/1/0/) that applies
to communication around the project.
@@ -0,0 +1,8 @@
"use strict";
/**
* This is a fork of https://github.com/DefinitelyTyped/DefinitelyTyped/blob/13f63c2eb8d7479caf01ab8d72f9e3683368a8f5/types/json-schema/index.d.ts
* We intentionally fork this because:
* - ESLint ***ONLY*** supports JSONSchema v4
* - We want to provide stricter types
*/
Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,aAAa,CAAC,wDAAQ,CAAC;IACzC,iBAAiB,CAAC,OAAS,CAAC,0HAAoB,EAAE,KAAK,UAAU,CAAC,qGAAiB,CAAC;IACpF,cAAc,CAAC,OAAS,GAAG,KAAK,KAAK,CAAC,kDAAQ,CAAC;IAC/C,cAAc,CAAC,wDAAQ,CAAC;IACxB,kBAAkB,CAAC,OAAS,CAAC,0HAAoB,EAAE,KAAK,UAAU,CAAC,uFAAe,CAAC;IACnF,sBAAsB,CAAC,6SAAqD,CAAC;IAC7E,UAAU,CAAC,wDAAQ,CAAC;IACpB,aAAa,CAAC,mGAAe,CAAC;IAC9B,YAAY,CAAC,0GAAgB,CAAC;AAChC","sources":["packages/@react-aria/table/intl/bg-BG.json"],"sourcesContent":["{\n \"ascending\": \"възходящ\",\n \"ascendingSort\": \"сортирано по колона {columnName} във възходящ ред\",\n \"columnSize\": \"{value} пиксела\",\n \"descending\": \"низходящ\",\n \"descendingSort\": \"сортирано по колона {columnName} в низходящ ред\",\n \"resizerDescription\": \"Натиснете „Enter“, за да започнете да преоразмерявате\",\n \"select\": \"Изберете\",\n \"selectAll\": \"Изберете всичко\",\n \"sortable\": \"сортираща колона\"\n}\n"],"names":[],"version":3,"file":"bg-BG.module.js.map"}
@@ -0,0 +1,800 @@
import { AutomockOptions } from './automock.js';
export { automockModule } from './automock.js';
import { Plugin, Rollup, ViteDevServer } from 'vite';
import { SourceMap } from 'magic-string';
import { M as MockerRegistry, S as ServerMockResolution, e as ServerIdResolution } from './types.d-B8CCKmHt.js';
export { findMockRedirect } from './redirect.js';
declare function createManualModuleSource(moduleUrl: string, exports: string[], globalAccessor?: string): string;
declare function automockPlugin(options?: AutomockOptions): Plugin;
interface DynamicImportPluginOptions {
/**
* @default `"__vitest_mocker__"`
*/
globalThisAccessor?: string;
filter?: (id: string) => boolean;
}
declare function dynamicImportPlugin(options?: DynamicImportPluginOptions): Plugin;
// This definition file follows a somewhat unusual format. ESTree allows
// runtime type checks based on the `type` parameter. In order to explain this
// to typescript we want to use discriminated union types:
// https://github.com/Microsoft/TypeScript/pull/9163
//
// For ESTree this is a bit tricky because the high level interfaces like
// Node or Function are pulling double duty. We want to pass common fields down
// to the interfaces that extend them (like Identifier or
// ArrowFunctionExpression), but you can't extend a type union or enforce
// common fields on them. So we've split the high level interfaces into two
// types, a base type which passes down inherited fields, and a type union of
// all types which extend the base type. Only the type union is exported, and
// the union is how other types refer to the collection of inheriting types.
//
// This makes the definitions file here somewhat more difficult to maintain,
// but it has the notable advantage of making ESTree much easier to use as
// an end user.
interface BaseNodeWithoutComments {
// Every leaf interface that extends BaseNode must specify a type property.
// The type property should be a string literal. For example, Identifier
// has: `type: "Identifier"`
type: string;
loc?: SourceLocation | null | undefined;
range?: [number, number] | undefined;
}
interface BaseNode extends BaseNodeWithoutComments {
leadingComments?: Comment[] | undefined;
trailingComments?: Comment[] | undefined;
}
interface NodeMap {
AssignmentProperty: AssignmentProperty;
CatchClause: CatchClause;
Class: Class;
ClassBody: ClassBody;
Expression: Expression;
Function: Function;
Identifier: Identifier;
Literal: Literal;
MethodDefinition: MethodDefinition;
ModuleDeclaration: ModuleDeclaration;
ModuleSpecifier: ModuleSpecifier;
Pattern: Pattern;
PrivateIdentifier: PrivateIdentifier;
Program: Program;
Property: Property;
PropertyDefinition: PropertyDefinition;
SpreadElement: SpreadElement;
Statement: Statement;
Super: Super;
SwitchCase: SwitchCase;
TemplateElement: TemplateElement;
VariableDeclarator: VariableDeclarator;
}
type Node$1 = NodeMap[keyof NodeMap];
interface Comment extends BaseNodeWithoutComments {
type: "Line" | "Block";
value: string;
}
interface SourceLocation {
source?: string | null | undefined;
start: Position;
end: Position;
}
interface Position {
/** >= 1 */
line: number;
/** >= 0 */
column: number;
}
interface Program extends BaseNode {
type: "Program";
sourceType: "script" | "module";
body: Array<Directive | Statement | ModuleDeclaration>;
comments?: Comment[] | undefined;
}
interface Directive extends BaseNode {
type: "ExpressionStatement";
expression: Literal;
directive: string;
}
interface BaseFunction extends BaseNode {
params: Pattern[];
generator?: boolean | undefined;
async?: boolean | undefined;
// The body is either BlockStatement or Expression because arrow functions
// can have a body that's either. FunctionDeclarations and
// FunctionExpressions have only BlockStatement bodies.
body: BlockStatement | Expression;
}
type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
type Statement =
| ExpressionStatement
| BlockStatement
| StaticBlock
| EmptyStatement
| DebuggerStatement
| WithStatement
| ReturnStatement
| LabeledStatement
| BreakStatement
| ContinueStatement
| IfStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| Declaration;
interface BaseStatement extends BaseNode {}
interface EmptyStatement extends BaseStatement {
type: "EmptyStatement";
}
interface BlockStatement extends BaseStatement {
type: "BlockStatement";
body: Statement[];
innerComments?: Comment[] | undefined;
}
interface StaticBlock extends Omit<BlockStatement, "type"> {
type: "StaticBlock";
}
interface ExpressionStatement extends BaseStatement {
type: "ExpressionStatement";
expression: Expression;
}
interface IfStatement extends BaseStatement {
type: "IfStatement";
test: Expression;
consequent: Statement;
alternate?: Statement | null | undefined;
}
interface LabeledStatement extends BaseStatement {
type: "LabeledStatement";
label: Identifier;
body: Statement;
}
interface BreakStatement extends BaseStatement {
type: "BreakStatement";
label?: Identifier | null | undefined;
}
interface ContinueStatement extends BaseStatement {
type: "ContinueStatement";
label?: Identifier | null | undefined;
}
interface WithStatement extends BaseStatement {
type: "WithStatement";
object: Expression;
body: Statement;
}
interface SwitchStatement extends BaseStatement {
type: "SwitchStatement";
discriminant: Expression;
cases: SwitchCase[];
}
interface ReturnStatement extends BaseStatement {
type: "ReturnStatement";
argument?: Expression | null | undefined;
}
interface ThrowStatement extends BaseStatement {
type: "ThrowStatement";
argument: Expression;
}
interface TryStatement extends BaseStatement {
type: "TryStatement";
block: BlockStatement;
handler?: CatchClause | null | undefined;
finalizer?: BlockStatement | null | undefined;
}
interface WhileStatement extends BaseStatement {
type: "WhileStatement";
test: Expression;
body: Statement;
}
interface DoWhileStatement extends BaseStatement {
type: "DoWhileStatement";
body: Statement;
test: Expression;
}
interface ForStatement extends BaseStatement {
type: "ForStatement";
init?: VariableDeclaration | Expression | null | undefined;
test?: Expression | null | undefined;
update?: Expression | null | undefined;
body: Statement;
}
interface BaseForXStatement extends BaseStatement {
left: VariableDeclaration | Pattern;
right: Expression;
body: Statement;
}
interface ForInStatement extends BaseForXStatement {
type: "ForInStatement";
}
interface DebuggerStatement extends BaseStatement {
type: "DebuggerStatement";
}
type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
interface BaseDeclaration extends BaseStatement {}
interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration {
type: "FunctionDeclaration";
/** It is null when a function declaration is a part of the `export default function` statement */
id: Identifier | null;
body: BlockStatement;
}
interface FunctionDeclaration extends MaybeNamedFunctionDeclaration {
id: Identifier;
}
interface VariableDeclaration extends BaseDeclaration {
type: "VariableDeclaration";
declarations: VariableDeclarator[];
kind: "var" | "let" | "const" | "using" | "await using";
}
interface VariableDeclarator extends BaseNode {
type: "VariableDeclarator";
id: Pattern;
init?: Expression | null | undefined;
}
interface ExpressionMap {
ArrayExpression: ArrayExpression;
ArrowFunctionExpression: ArrowFunctionExpression;
AssignmentExpression: AssignmentExpression;
AwaitExpression: AwaitExpression;
BinaryExpression: BinaryExpression;
CallExpression: CallExpression;
ChainExpression: ChainExpression;
ClassExpression: ClassExpression;
ConditionalExpression: ConditionalExpression;
FunctionExpression: FunctionExpression;
Identifier: Identifier;
ImportExpression: ImportExpression;
Literal: Literal;
LogicalExpression: LogicalExpression;
MemberExpression: MemberExpression;
MetaProperty: MetaProperty;
NewExpression: NewExpression;
ObjectExpression: ObjectExpression;
SequenceExpression: SequenceExpression;
TaggedTemplateExpression: TaggedTemplateExpression;
TemplateLiteral: TemplateLiteral;
ThisExpression: ThisExpression;
UnaryExpression: UnaryExpression;
UpdateExpression: UpdateExpression;
YieldExpression: YieldExpression;
}
type Expression = ExpressionMap[keyof ExpressionMap];
interface BaseExpression extends BaseNode {}
type ChainElement = SimpleCallExpression | MemberExpression;
interface ChainExpression extends BaseExpression {
type: "ChainExpression";
expression: ChainElement;
}
interface ThisExpression extends BaseExpression {
type: "ThisExpression";
}
interface ArrayExpression extends BaseExpression {
type: "ArrayExpression";
elements: Array<Expression | SpreadElement | null>;
}
interface ObjectExpression extends BaseExpression {
type: "ObjectExpression";
properties: Array<Property | SpreadElement>;
}
interface PrivateIdentifier extends BaseNode {
type: "PrivateIdentifier";
name: string;
}
interface Property extends BaseNode {
type: "Property";
key: Expression | PrivateIdentifier;
value: Expression | Pattern; // Could be an AssignmentProperty
kind: "init" | "get" | "set";
method: boolean;
shorthand: boolean;
computed: boolean;
}
interface PropertyDefinition extends BaseNode {
type: "PropertyDefinition";
key: Expression | PrivateIdentifier;
value?: Expression | null | undefined;
computed: boolean;
static: boolean;
}
interface FunctionExpression extends BaseFunction, BaseExpression {
id?: Identifier | null | undefined;
type: "FunctionExpression";
body: BlockStatement;
}
interface SequenceExpression extends BaseExpression {
type: "SequenceExpression";
expressions: Expression[];
}
interface UnaryExpression extends BaseExpression {
type: "UnaryExpression";
operator: UnaryOperator;
prefix: true;
argument: Expression;
}
interface BinaryExpression extends BaseExpression {
type: "BinaryExpression";
operator: BinaryOperator;
left: Expression | PrivateIdentifier;
right: Expression;
}
interface AssignmentExpression extends BaseExpression {
type: "AssignmentExpression";
operator: AssignmentOperator;
left: Pattern | MemberExpression;
right: Expression;
}
interface UpdateExpression extends BaseExpression {
type: "UpdateExpression";
operator: UpdateOperator;
argument: Expression;
prefix: boolean;
}
interface LogicalExpression extends BaseExpression {
type: "LogicalExpression";
operator: LogicalOperator;
left: Expression;
right: Expression;
}
interface ConditionalExpression extends BaseExpression {
type: "ConditionalExpression";
test: Expression;
alternate: Expression;
consequent: Expression;
}
interface BaseCallExpression extends BaseExpression {
callee: Expression | Super;
arguments: Array<Expression | SpreadElement>;
}
type CallExpression = SimpleCallExpression | NewExpression;
interface SimpleCallExpression extends BaseCallExpression {
type: "CallExpression";
optional: boolean;
}
interface NewExpression extends BaseCallExpression {
type: "NewExpression";
}
interface MemberExpression extends BaseExpression, BasePattern {
type: "MemberExpression";
object: Expression | Super;
property: Expression | PrivateIdentifier;
computed: boolean;
optional: boolean;
}
type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression;
interface BasePattern extends BaseNode {}
interface SwitchCase extends BaseNode {
type: "SwitchCase";
test?: Expression | null | undefined;
consequent: Statement[];
}
interface CatchClause extends BaseNode {
type: "CatchClause";
param: Pattern | null;
body: BlockStatement;
}
interface Identifier extends BaseNode, BaseExpression, BasePattern {
type: "Identifier";
name: string;
}
type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
interface SimpleLiteral extends BaseNode, BaseExpression {
type: "Literal";
value: string | boolean | number | null;
raw?: string | undefined;
}
interface RegExpLiteral extends BaseNode, BaseExpression {
type: "Literal";
value?: RegExp | null | undefined;
regex: {
pattern: string;
flags: string;
};
raw?: string | undefined;
}
interface BigIntLiteral extends BaseNode, BaseExpression {
type: "Literal";
value?: bigint | null | undefined;
bigint: string;
raw?: string | undefined;
}
type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
type BinaryOperator =
| "=="
| "!="
| "==="
| "!=="
| "<"
| "<="
| ">"
| ">="
| "<<"
| ">>"
| ">>>"
| "+"
| "-"
| "*"
| "/"
| "%"
| "**"
| "|"
| "^"
| "&"
| "in"
| "instanceof";
type LogicalOperator = "||" | "&&" | "??";
type AssignmentOperator =
| "="
| "+="
| "-="
| "*="
| "/="
| "%="
| "**="
| "<<="
| ">>="
| ">>>="
| "|="
| "^="
| "&="
| "||="
| "&&="
| "??=";
type UpdateOperator = "++" | "--";
interface ForOfStatement extends BaseForXStatement {
type: "ForOfStatement";
await: boolean;
}
interface Super extends BaseNode {
type: "Super";
}
interface SpreadElement extends BaseNode {
type: "SpreadElement";
argument: Expression;
}
interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
type: "ArrowFunctionExpression";
expression: boolean;
body: BlockStatement | Expression;
}
interface YieldExpression extends BaseExpression {
type: "YieldExpression";
argument?: Expression | null | undefined;
delegate: boolean;
}
interface TemplateLiteral extends BaseExpression {
type: "TemplateLiteral";
quasis: TemplateElement[];
expressions: Expression[];
}
interface TaggedTemplateExpression extends BaseExpression {
type: "TaggedTemplateExpression";
tag: Expression;
quasi: TemplateLiteral;
}
interface TemplateElement extends BaseNode {
type: "TemplateElement";
tail: boolean;
value: {
/** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */
cooked?: string | null | undefined;
raw: string;
};
}
interface AssignmentProperty extends Property {
value: Pattern;
kind: "init";
method: boolean; // false
}
interface ObjectPattern extends BasePattern {
type: "ObjectPattern";
properties: Array<AssignmentProperty | RestElement>;
}
interface ArrayPattern extends BasePattern {
type: "ArrayPattern";
elements: Array<Pattern | null>;
}
interface RestElement extends BasePattern {
type: "RestElement";
argument: Pattern;
}
interface AssignmentPattern extends BasePattern {
type: "AssignmentPattern";
left: Pattern;
right: Expression;
}
type Class = ClassDeclaration | ClassExpression;
interface BaseClass extends BaseNode {
superClass?: Expression | null | undefined;
body: ClassBody;
}
interface ClassBody extends BaseNode {
type: "ClassBody";
body: Array<MethodDefinition | PropertyDefinition | StaticBlock>;
}
interface MethodDefinition extends BaseNode {
type: "MethodDefinition";
key: Expression | PrivateIdentifier;
value: FunctionExpression;
kind: "constructor" | "method" | "get" | "set";
computed: boolean;
static: boolean;
}
interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration {
type: "ClassDeclaration";
/** It is null when a class declaration is a part of the `export default class` statement */
id: Identifier | null;
}
interface ClassDeclaration extends MaybeNamedClassDeclaration {
id: Identifier;
}
interface ClassExpression extends BaseClass, BaseExpression {
type: "ClassExpression";
id?: Identifier | null | undefined;
}
interface MetaProperty extends BaseExpression {
type: "MetaProperty";
meta: Identifier;
property: Identifier;
}
type ModuleDeclaration =
| ImportDeclaration
| ExportNamedDeclaration
| ExportDefaultDeclaration
| ExportAllDeclaration;
interface BaseModuleDeclaration extends BaseNode {}
type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier;
interface BaseModuleSpecifier extends BaseNode {
local: Identifier;
}
interface ImportDeclaration extends BaseModuleDeclaration {
type: "ImportDeclaration";
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
attributes: ImportAttribute[];
source: Literal;
}
interface ImportSpecifier extends BaseModuleSpecifier {
type: "ImportSpecifier";
imported: Identifier | Literal;
}
interface ImportAttribute extends BaseNode {
type: "ImportAttribute";
key: Identifier | Literal;
value: Literal;
}
interface ImportExpression extends BaseExpression {
type: "ImportExpression";
source: Expression;
options?: Expression | null | undefined;
}
interface ImportDefaultSpecifier extends BaseModuleSpecifier {
type: "ImportDefaultSpecifier";
}
interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
type: "ImportNamespaceSpecifier";
}
interface ExportNamedDeclaration extends BaseModuleDeclaration {
type: "ExportNamedDeclaration";
declaration?: Declaration | null | undefined;
specifiers: ExportSpecifier[];
attributes: ImportAttribute[];
source?: Literal | null | undefined;
}
interface ExportSpecifier extends Omit<BaseModuleSpecifier, "local"> {
type: "ExportSpecifier";
local: Identifier | Literal;
exported: Identifier | Literal;
}
interface ExportDefaultDeclaration extends BaseModuleDeclaration {
type: "ExportDefaultDeclaration";
declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression;
}
interface ExportAllDeclaration extends BaseModuleDeclaration {
type: "ExportAllDeclaration";
exported: Identifier | Literal | null;
attributes: ImportAttribute[];
source: Literal;
}
interface AwaitExpression extends BaseExpression {
type: "AwaitExpression";
argument: Expression;
}
type Positioned<T> = T & {
start: number;
end: number;
};
type Node = Positioned<Node$1>;
interface HoistMocksOptions {
/**
* List of modules that should always be imported before compiler hints.
* @default 'vitest'
*/
hoistedModule?: string;
/**
* @default ["vi", "vitest"]
*/
utilsObjectNames?: string[];
/**
* @default ["mock", "unmock"]
*/
hoistableMockMethodNames?: string[];
/**
* @default ["mock", "unmock", "doMock", "doUnmock"]
*/
dynamicImportMockMethodNames?: string[];
/**
* @default ["hoisted"]
*/
hoistedMethodNames?: string[];
regexpHoistable?: RegExp;
codeFrameGenerator?: CodeFrameGenerator;
}
interface HoistMocksPluginOptions extends Omit<HoistMocksOptions, "regexpHoistable"> {
include?: string | RegExp | (string | RegExp)[];
exclude?: string | RegExp | (string | RegExp)[];
/**
* overrides include/exclude options
*/
filter?: (id: string) => boolean;
}
declare function hoistMocksPlugin(options?: HoistMocksPluginOptions): Plugin;
interface HoistMocksResult {
code: string;
map: SourceMap;
}
interface CodeFrameGenerator {
(node: Positioned<Node>, id: string, code: string): string;
}
declare function hoistMocks(code: string, id: string, parse: Rollup.PluginContext["parse"], options?: HoistMocksOptions): HoistMocksResult | undefined;
interface InterceptorPluginOptions {
/**
* @default "__vitest_mocker__"
*/
globalThisAccessor?: string;
registry?: MockerRegistry;
}
declare function interceptorPlugin(options?: InterceptorPluginOptions): Plugin;
interface MockerPluginOptions extends AutomockOptions {
hoistMocks?: HoistMocksPluginOptions;
}
declare function mockerPlugin(options?: MockerPluginOptions): Plugin[];
interface ServerResolverOptions {
/**
* @default ['/node_modules/']
*/
moduleDirectories?: string[];
}
declare class ServerMockResolver {
private server;
private options;
constructor(server: ViteDevServer, options?: ServerResolverOptions);
resolveMock(rawId: string, importer: string, options: {
mock: "spy" | "factory" | "auto";
}): Promise<ServerMockResolution>;
invalidate(ids: string[]): void;
resolveId(id: string, importer?: string): Promise<ServerIdResolution | null>;
private normalizeResolveIdToUrl;
private resolveMockId;
private resolveModule;
}
export { AutomockOptions as AutomockPluginOptions, ServerMockResolver, automockPlugin, createManualModuleSource, dynamicImportPlugin, hoistMocks, hoistMocksPlugin, interceptorPlugin, mockerPlugin };
export type { HoistMocksPluginOptions, HoistMocksResult, InterceptorPluginOptions, ServerResolverOptions };
@@ -0,0 +1,215 @@
// this is just a very light wrapper around 2 arrays with an offset index
import { GLOBSTAR } from 'minimatch';
const isPatternList = (pl) => pl.length >= 1;
const isGlobList = (gl) => gl.length >= 1;
/**
* An immutable-ish view on an array of glob parts and their parsed
* results
*/
export class Pattern {
#patternList;
#globList;
#index;
length;
#platform;
#rest;
#globString;
#isDrive;
#isUNC;
#isAbsolute;
#followGlobstar = true;
constructor(patternList, globList, index, platform) {
if (!isPatternList(patternList)) {
throw new TypeError('empty pattern list');
}
if (!isGlobList(globList)) {
throw new TypeError('empty glob list');
}
if (globList.length !== patternList.length) {
throw new TypeError('mismatched pattern list and glob list lengths');
}
this.length = patternList.length;
if (index < 0 || index >= this.length) {
throw new TypeError('index out of range');
}
this.#patternList = patternList;
this.#globList = globList;
this.#index = index;
this.#platform = platform;
// normalize root entries of absolute patterns on initial creation.
if (this.#index === 0) {
// c: => ['c:/']
// C:/ => ['C:/']
// C:/x => ['C:/', 'x']
// //host/share => ['//host/share/']
// //host/share/ => ['//host/share/']
// //host/share/x => ['//host/share/', 'x']
// /etc => ['/', 'etc']
// / => ['/']
if (this.isUNC()) {
// '' / '' / 'host' / 'share'
const [p0, p1, p2, p3, ...prest] = this.#patternList;
const [g0, g1, g2, g3, ...grest] = this.#globList;
if (prest[0] === '') {
// ends in /
prest.shift();
grest.shift();
}
const p = [p0, p1, p2, p3, ''].join('/');
const g = [g0, g1, g2, g3, ''].join('/');
this.#patternList = [p, ...prest];
this.#globList = [g, ...grest];
this.length = this.#patternList.length;
}
else if (this.isDrive() || this.isAbsolute()) {
const [p1, ...prest] = this.#patternList;
const [g1, ...grest] = this.#globList;
if (prest[0] === '') {
// ends in /
prest.shift();
grest.shift();
}
const p = p1 + '/';
const g = g1 + '/';
this.#patternList = [p, ...prest];
this.#globList = [g, ...grest];
this.length = this.#patternList.length;
}
}
}
/**
* The first entry in the parsed list of patterns
*/
pattern() {
return this.#patternList[this.#index];
}
/**
* true of if pattern() returns a string
*/
isString() {
return typeof this.#patternList[this.#index] === 'string';
}
/**
* true of if pattern() returns GLOBSTAR
*/
isGlobstar() {
return this.#patternList[this.#index] === GLOBSTAR;
}
/**
* true if pattern() returns a regexp
*/
isRegExp() {
return this.#patternList[this.#index] instanceof RegExp;
}
/**
* The /-joined set of glob parts that make up this pattern
*/
globString() {
return (this.#globString =
this.#globString ||
(this.#index === 0 ?
this.isAbsolute() ?
this.#globList[0] + this.#globList.slice(1).join('/')
: this.#globList.join('/')
: this.#globList.slice(this.#index).join('/')));
}
/**
* true if there are more pattern parts after this one
*/
hasMore() {
return this.length > this.#index + 1;
}
/**
* The rest of the pattern after this part, or null if this is the end
*/
rest() {
if (this.#rest !== undefined)
return this.#rest;
if (!this.hasMore())
return (this.#rest = null);
this.#rest = new Pattern(this.#patternList, this.#globList, this.#index + 1, this.#platform);
this.#rest.#isAbsolute = this.#isAbsolute;
this.#rest.#isUNC = this.#isUNC;
this.#rest.#isDrive = this.#isDrive;
return this.#rest;
}
/**
* true if the pattern represents a //unc/path/ on windows
*/
isUNC() {
const pl = this.#patternList;
return this.#isUNC !== undefined ?
this.#isUNC
: (this.#isUNC =
this.#platform === 'win32' &&
this.#index === 0 &&
pl[0] === '' &&
pl[1] === '' &&
typeof pl[2] === 'string' &&
!!pl[2] &&
typeof pl[3] === 'string' &&
!!pl[3]);
}
// pattern like C:/...
// split = ['C:', ...]
// XXX: would be nice to handle patterns like `c:*` to test the cwd
// in c: for *, but I don't know of a way to even figure out what that
// cwd is without actually chdir'ing into it?
/**
* True if the pattern starts with a drive letter on Windows
*/
isDrive() {
const pl = this.#patternList;
return this.#isDrive !== undefined ?
this.#isDrive
: (this.#isDrive =
this.#platform === 'win32' &&
this.#index === 0 &&
this.length > 1 &&
typeof pl[0] === 'string' &&
/^[a-z]:$/i.test(pl[0]));
}
// pattern = '/' or '/...' or '/x/...'
// split = ['', ''] or ['', ...] or ['', 'x', ...]
// Drive and UNC both considered absolute on windows
/**
* True if the pattern is rooted on an absolute path
*/
isAbsolute() {
const pl = this.#patternList;
return this.#isAbsolute !== undefined ?
this.#isAbsolute
: (this.#isAbsolute =
(pl[0] === '' && pl.length > 1) ||
this.isDrive() ||
this.isUNC());
}
/**
* consume the root of the pattern, and return it
*/
root() {
const p = this.#patternList[0];
return (typeof p === 'string' && this.isAbsolute() && this.#index === 0) ?
p
: '';
}
/**
* Check to see if the current globstar pattern is allowed to follow
* a symbolic link.
*/
checkFollowGlobstar() {
return !(this.#index === 0 ||
!this.isGlobstar() ||
!this.#followGlobstar);
}
/**
* Mark that the current globstar pattern is following a symbolic link
*/
markFollowGlobstar() {
if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)
return false;
this.#followGlobstar = false;
return true;
}
}
//# sourceMappingURL=pattern.js.map
@@ -0,0 +1,110 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Required = Required;
const type_1 = require("../create/type");
const index_1 = require("../computed/index");
const index_2 = require("../object/index");
const index_3 = require("../intersect/index");
const index_4 = require("../union/index");
const index_5 = require("../ref/index");
const index_6 = require("../symbols/index");
const index_7 = require("../discard/index");
const required_from_mapped_result_1 = require("./required-from-mapped-result");
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
const KindGuard = __importStar(require("../guard/kind"));
// prettier-ignore
function FromComputed(target, parameters) {
return (0, index_1.Computed)('Required', [(0, index_1.Computed)(target, parameters)]);
}
// prettier-ignore
function FromRef($ref) {
return (0, index_1.Computed)('Required', [(0, index_5.Ref)($ref)]);
}
// prettier-ignore
function FromProperties(properties) {
const requiredProperties = {};
for (const K of globalThis.Object.getOwnPropertyNames(properties))
requiredProperties[K] = (0, index_7.Discard)(properties[K], [index_6.OptionalKind]);
return requiredProperties;
}
// prettier-ignore
function FromObject(type) {
const options = (0, index_7.Discard)(type, [index_6.TransformKind, '$id', 'required', 'properties']);
const properties = FromProperties(type['properties']);
return (0, index_2.Object)(properties, options);
}
// prettier-ignore
function FromRest(types) {
return types.map(type => RequiredResolve(type));
}
// ------------------------------------------------------------------
// RequiredResolve
// ------------------------------------------------------------------
// prettier-ignore
function RequiredResolve(type) {
return (
// Mappable
KindGuard.IsComputed(type) ? FromComputed(type.target, type.parameters) :
KindGuard.IsRef(type) ? FromRef(type.$ref) :
KindGuard.IsIntersect(type) ? (0, index_3.Intersect)(FromRest(type.allOf)) :
KindGuard.IsUnion(type) ? (0, index_4.Union)(FromRest(type.anyOf)) :
KindGuard.IsObject(type) ? FromObject(type) :
// Intrinsic
KindGuard.IsBigInt(type) ? type :
KindGuard.IsBoolean(type) ? type :
KindGuard.IsInteger(type) ? type :
KindGuard.IsLiteral(type) ? type :
KindGuard.IsNull(type) ? type :
KindGuard.IsNumber(type) ? type :
KindGuard.IsString(type) ? type :
KindGuard.IsSymbol(type) ? type :
KindGuard.IsUndefined(type) ? type :
// Passthrough
(0, index_2.Object)({}));
}
/** `[Json]` Constructs a type where all properties are required */
function Required(type, options) {
if (KindGuard.IsMappedResult(type)) {
return (0, required_from_mapped_result_1.RequiredFromMappedResult)(type, options);
}
else {
// special: mapping types require overridable options
return (0, type_1.CreateType)({ ...RequiredResolve(type), ...options });
}
}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2013 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> 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,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var TimeRole = {
relatedConcepts: [{
module: 'HTML',
concept: {
name: 'time'
}
}],
type: 'structure'
};
var _default = TimeRole;
exports.default = _default;
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=no-direct-mutation-state.d.ts.map
@@ -0,0 +1,317 @@
/**
* @fileoverview Rule to enforce the use of `u` or `v` flag on regular expressions.
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const {
CALL,
CONSTRUCT,
ReferenceTracker,
getStringIfConstant,
} = require("@eslint-community/eslint-utils");
const astUtils = require("./utils/ast-utils.js");
const { isValidWithUnicodeFlag } = require("./utils/regular-expressions");
/**
* Checks whether the flag configuration should be treated as a missing flag.
* @param {"u"|"v"|undefined} requireFlag A particular flag to require
* @param {string} flags The regex flags
* @returns {boolean} Whether the flag configuration results in a missing flag.
*/
function checkFlags(requireFlag, flags) {
let missingFlag;
if (requireFlag === "v") {
missingFlag = !flags.includes("v");
} else if (requireFlag === "u") {
missingFlag = !flags.includes("u");
} else {
missingFlag = !flags.includes("u") && !flags.includes("v");
}
return missingFlag;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
defaultOptions: [{}],
docs: {
description:
"Enforce the use of `u` or `v` flag on regular expressions",
recommended: false,
url: "https://eslint.org/docs/latest/rules/require-unicode-regexp",
},
hasSuggestions: true,
messages: {
addUFlag: "Add the 'u' flag.",
addVFlag: "Add the 'v' flag.",
requireUFlag: "Use the 'u' flag.",
requireVFlag: "Use the 'v' flag.",
},
schema: [
{
type: "object",
properties: {
requireFlag: {
enum: ["u", "v"],
},
},
additionalProperties: false,
},
],
},
create(context) {
const sourceCode = context.sourceCode;
const [{ requireFlag }] = context.options;
return {
"Literal[regex]"(node) {
const flags = node.regex.flags || "";
const missingFlag = checkFlags(requireFlag, flags);
if (missingFlag) {
context.report({
messageId:
requireFlag === "v"
? "requireVFlag"
: "requireUFlag",
node,
suggest: isValidWithUnicodeFlag(
context.languageOptions.ecmaVersion,
node.regex.pattern,
requireFlag,
)
? [
{
fix(fixer) {
const replaceFlag =
requireFlag ?? "u";
const regex =
sourceCode.getText(node);
const slashPos =
regex.lastIndexOf("/");
if (requireFlag) {
const flag =
requireFlag === "u"
? "v"
: "u";
if (
regex.includes(
flag,
slashPos,
)
) {
return fixer.replaceText(
node,
regex.slice(
0,
slashPos,
) +
regex
.slice(slashPos)
.replace(
flag,
requireFlag,
),
);
}
}
return fixer.insertTextAfter(
node,
replaceFlag,
);
},
messageId:
requireFlag === "v"
? "addVFlag"
: "addUFlag",
},
]
: null,
});
}
},
Program(node) {
const scope = sourceCode.getScope(node);
const tracker = new ReferenceTracker(scope);
const trackMap = {
RegExp: { [CALL]: true, [CONSTRUCT]: true },
};
for (const { node: refNode } of tracker.iterateGlobalReferences(
trackMap,
)) {
const [patternNode, flagsNode] = refNode.arguments;
if (patternNode && patternNode.type === "SpreadElement") {
continue;
}
const pattern = getStringIfConstant(patternNode, scope);
const flags = getStringIfConstant(flagsNode, scope);
let missingFlag = !flagsNode;
if (typeof flags === "string") {
missingFlag = checkFlags(requireFlag, flags);
}
if (missingFlag) {
context.report({
messageId:
requireFlag === "v"
? "requireVFlag"
: "requireUFlag",
node: refNode,
suggest:
typeof pattern === "string" &&
isValidWithUnicodeFlag(
context.languageOptions.ecmaVersion,
pattern,
requireFlag,
)
? [
{
fix(fixer) {
const replaceFlag =
requireFlag ?? "u";
if (flagsNode) {
if (
(flagsNode.type ===
"Literal" &&
typeof flagsNode.value ===
"string") ||
flagsNode.type ===
"TemplateLiteral"
) {
const flagsNodeText =
sourceCode.getText(
flagsNode,
);
const flag =
requireFlag ===
"u"
? "v"
: "u";
if (
flags.includes(
flag,
)
) {
// Avoid replacing "u" in escapes like `\uXXXX`
if (
flagsNode.type ===
"Literal" &&
flagsNode.raw.includes(
"\\",
)
) {
return null;
}
// Avoid replacing "u" in expressions like "`${regularFlags}g`"
if (
flagsNode.type ===
"TemplateLiteral" &&
(flagsNode
.expressions
.length ||
flagsNode.quasis.some(
({
value: {
raw,
},
}) =>
raw.includes(
"\\",
),
))
) {
return null;
}
return fixer.replaceText(
flagsNode,
flagsNodeText.replace(
flag,
replaceFlag,
),
);
}
return fixer.replaceText(
flagsNode,
[
flagsNodeText.slice(
0,
flagsNodeText.length -
1,
),
flagsNodeText.slice(
flagsNodeText.length -
1,
),
].join(
replaceFlag,
),
);
}
// We intentionally don't suggest concatenating + "u" to non-literals
return null;
}
const penultimateToken =
sourceCode.getLastToken(
refNode,
{ skip: 1 },
); // skip closing parenthesis
return fixer.insertTextAfter(
penultimateToken,
astUtils.isCommaToken(
penultimateToken,
)
? ` "${replaceFlag}",`
: `, "${replaceFlag}"`,
);
},
messageId:
requireFlag === "v"
? "addVFlag"
: "addUFlag",
},
]
: null,
});
}
}
},
};
},
};
@@ -0,0 +1,14 @@
import { OB11GroupNoticeEvent } from './OB11GroupNoticeEvent';
import { NapCatCore } from '../../../napcat-core';
export interface MsgEmojiLike {
emoji_id: string;
count: number;
}
export declare class OB11GroupMsgEmojiLikeEvent extends OB11GroupNoticeEvent {
notice_type: string;
message_id: number;
likes: MsgEmojiLike[];
is_add: boolean;
message_seq?: string;
constructor(core: NapCatCore, groupId: number, userId: number, messageId: number, likes: MsgEmojiLike[], isAdd: boolean, _messageSeq?: string);
}
@@ -0,0 +1 @@
{"name":"path-key","version":"3.1.1","requiresBuild":false,"files":{"license":{"checkedAt":1794532093346,"integrity":"sha512-nIst73auX/5NY2Fmv5Y116vWnNrEv4GaIUX3lpZG05rpXJY2S8EX+fpUS5hRjClCM0VdT2Za9DDHXXB5jdSrEw==","mode":420,"size":1109},"index.js":{"checkedAt":1794532094049,"integrity":"sha512-W9M3yPPrfWD5dueOzLMgomq1eysBjylf2IfpJ4WXDDFKaaaeyBVB8B5O6qYP1PBb/EYyqnNMlUbvQI22BMciBw==","mode":420,"size":415},"package.json":{"checkedAt":1794532094049,"integrity":"sha512-6nWMHmCb9lw+zAzVWlAgxsAL1/4V/7DaMZHFh9CgHk4ODzeBHNrs5CnRetDYS6K8l6wZahlBvr0DYDw/E3Uvgw==","mode":420,"size":650},"readme.md":{"checkedAt":1794532094049,"integrity":"sha512-7nsF5OK/jv3dEhCbQv7B4XF9HYz2HsLL4BWu/SI4kC6HdvpOMA5ZkqmtDDJHm/iFZpxf44pXIHIF77aSa+DACQ==","mode":420,"size":1347},"index.d.ts":{"checkedAt":1794532094049,"integrity":"sha512-gHWuJ5iZud9jB6l3L5armDQasErRVFuMQMO8OAnCuaXANuW8tBLfTFm2qm08poLXqvQJxWUaJ72coEk+yYDBmg==","mode":420,"size":1032}}}
@@ -0,0 +1,122 @@
import {
mapPropsVariants
} from "./chunk-YFAKJTDR.mjs";
// src/extend-variants.js
import * as React from "react";
import { tv } from "@heroui/theme";
import clsx from "clsx";
function getSlots(variants) {
return variants ? Object.values(variants).flatMap(Object.values).reduce((acc, slot) => {
if (typeof slot === "object" && slot !== null && !(slot instanceof String)) {
Object.keys(slot).forEach((key) => {
if (!acc.hasOwnProperty(key)) {
acc[key] = "";
}
});
}
return acc;
}, {}) : {};
}
function getClassNamesWithProps({
props = {},
variants,
slots,
defaultVariants,
compoundVariants,
hasSlots,
opts
}) {
var _a, _b, _c;
const keys = [];
if (defaultVariants && typeof defaultVariants === "object") {
for (const key in defaultVariants) {
const value = defaultVariants[key];
const propValue = props == null ? void 0 : props[key];
if (propValue && propValue !== value) {
keys.push(key);
}
}
}
const customTv = tv(
{
variants,
defaultVariants: defaultVariants && typeof defaultVariants === "object" ? (
// Do not apply default variants when the props variant is different
Object.keys(defaultVariants).filter((k) => !keys.includes(k)).reduce((o, k) => {
o[k] = defaultVariants[k];
return o;
}, [])
) : defaultVariants,
compoundVariants,
...hasSlots && { slots }
},
{
twMerge: (_a = opts.twMerge) != null ? _a : true,
twMergeConfig: (_b = opts.twMergeConfig) != null ? _b : {}
}
);
const [baseProps, variantProps] = mapPropsVariants(props, customTv.variantKeys, false);
const newProps = { ...defaultVariants, ...baseProps };
let classNames = {};
const result = customTv(variantProps);
if (!hasSlots) {
newProps.className = clsx(result, props.className);
} else {
Object.entries(result).forEach(([key, value]) => {
const slotResult = value();
if (typeof slotResult === "string") {
classNames[key] = slotResult;
}
});
Object.entries((_c = props.classNames) != null ? _c : {}).forEach(([key, value]) => {
classNames[key] = clsx(classNames[key], value);
});
}
if (Object.keys(classNames).length !== 0) {
newProps.classNames = classNames;
}
return newProps;
}
function extendVariants(BaseComponent, styles = {}, opts = {}) {
const { variants, defaultVariants, compoundVariants } = styles || {};
const slots = getSlots(variants);
const hasSlots = typeof slots === "object" && Object.keys(slots).length !== 0;
const ForwardedComponent = React.forwardRef((originalProps = {}, ref) => {
const newProps = React.useMemo(
() => getClassNamesWithProps(
{
slots,
variants,
compoundVariants,
props: originalProps,
defaultVariants,
hasSlots,
opts
},
[originalProps]
)
);
return React.createElement(BaseComponent, { ...originalProps, ...newProps, ref });
});
if (BaseComponent.getCollectionNode) {
ForwardedComponent.getCollectionNode = (itemProps) => {
const newProps = getClassNamesWithProps({
slots,
variants,
compoundVariants,
props: itemProps,
defaultVariants,
hasSlots,
opts
});
return BaseComponent.getCollectionNode({ ...itemProps, ...newProps });
};
}
ForwardedComponent.displayName = `Extended(${BaseComponent.displayName || BaseComponent.name})`;
return ForwardedComponent;
}
export {
extendVariants
};
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P Q H R S T U V W X Y Z"},C:{"1":"0 1 2 3 4 5 Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X 0C 1C"},D:{"1":"0 1 2 3 4 5 a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 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"},E:{"1":"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 QC dC eC fC"},F:{"1":"0 1 2 3 4 5 KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB 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 FD GD HD ID NC uC JD OC"},G:{"1":"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 QC dC eC fC"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB QC RC SC yD","2":"J oD pD qD rD sD aC tD uD vD wD xD"},Q:{"16":"zD"},R:{"16":"0D"},S:{"2":"1D","16":"2D"}},B:5,C:"WebAssembly SIMD",D:true};
@@ -0,0 +1 @@
{"name":"prop-types","version":"15.8.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532098673,"integrity":"sha512-QA5f/yUkf7D6jAElBzZYyPQpw5/CDv7+mopptcX5JanfGBizJOZpGIS6EIRjkIt1dY8HtHlr+fuXJAFpbTNx9A==","mode":420,"size":1080},"checkPropTypes.js":{"checkedAt":1794532098673,"integrity":"sha512-UI2RN2hyUTsLSYN26AuYEQ+0DCI49W4nbJSJhr44x9T5cxZH1me0UkJj6Yz9RE4wPNmVZSacu6PowSu1nx/Pzw==","mode":420,"size":3868},"factory.js":{"checkedAt":1794532098673,"integrity":"sha512-Rv4GBmrX1NIFiNJOEgAuEvHy/rvSEBAGYorHTy3R8YJvTTBvOkKTw4oVIcGCw8+HUpt+HHId3u0Yi1vymlmvMw==","mode":420,"size":768},"factoryWithThrowingShims.js":{"checkedAt":1794532098673,"integrity":"sha512-4etqX6NdkRXEsFFrY2fctnWnTxL/2XTetjQnhUOIamGZ9qW/BaQWZd5l0N8Pkm6UrgILtwawEt63bb5z+pW/SQ==","mode":420,"size":1639},"factoryWithTypeCheckers.js":{"checkedAt":1794532098673,"integrity":"sha512-newxe1CxDW1RplfW8M4xSANgjVkOxca2Z1DeUUyO/EDKCT+Tt4U7gKUrJ+ZEdvZTFMZK/+o87BhBjdOTvuMi2w==","mode":420,"size":22716},"lib/has.js":{"checkedAt":1794532098673,"integrity":"sha512-pbWWgKgbk0Yus02IiFjbNTFArq5ZkqlRllGF1fEDcEbcruq7sFtGL6Xe5SzEBsWCOQFWWnKd48y6/BqfhnPJDw==","mode":420,"size":70},"index.js":{"checkedAt":1794532098673,"integrity":"sha512-auCUH7LBENQQ7Vd1BZg5hmcPdOOsFgPwDySs1rTWgC0mpk1hGd4xEMHq+tpEFAx/+yq+pmaT28dhG4lzScSPDQ==","mode":420,"size":710},"prop-types.js":{"checkedAt":1794532098674,"integrity":"sha512-Y1I7EwGGjtHaioSQ70oCoWR73HqUN2YdVmSFf9G0u2cnUToGIZRPkW+QNEZ77afq8hxao7cD+CugWdZI3SQULg==","mode":420,"size":48333},"prop-types.min.js":{"checkedAt":1794532098674,"integrity":"sha512-M1OTu9xD1JPdXo2cOeJI+Z/f8P6E/pqK9ug3G8PRNLw1caUePewEmpFYKSYh4LEz483qnyB/UTlgX1Q4VCEsKg==","mode":420,"size":1722},"lib/ReactPropTypesSecret.js":{"checkedAt":1794532098674,"integrity":"sha512-3Na0OtapfA3MvdzkFGTHNX4m597NPtWdqzAktl1stdO1KyXqaUmC4QKN+Sflvh7nMaGGpFJt99O5ROHhkfFnfg==","mode":420,"size":314},"package.json":{"checkedAt":1794532098674,"integrity":"sha512-ENfAZccED0r9eV66Sg9Sik1r1ckr+OnFNYtDVyJZVDLpX/NY1pn4YZu/7sutSKGy4omnOXiqAQvrAGM4YAROpA==","mode":420,"size":1656},"README.md":{"checkedAt":1794532098674,"integrity":"sha512-PJJJDi3yHzwn2uJ6k6efi4CPz37rAPOCVq6Goka0LrNzaQjxs2VXiGSNiJKLiTq2cmKD/hysjU5PlARPEyXFYg==","mode":420,"size":11661}}}
@@ -0,0 +1,22 @@
var $5076d97fb6884665$exports = require("./useOverlayTriggerState.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useOverlayTriggerState", () => $5076d97fb6884665$exports.useOverlayTriggerState);
/*
* 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.
*/
//# sourceMappingURL=main.js.map
@@ -0,0 +1,36 @@
var root = require('./_root');
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeIsFinite = root.isFinite;
/**
* Checks if `value` is a finite primitive number.
*
* **Note:** This method is based on
* [`Number.isFinite`](https://mdn.io/Number/isFinite).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
* @example
*
* _.isFinite(3);
* // => true
*
* _.isFinite(Number.MIN_VALUE);
* // => true
*
* _.isFinite(Infinity);
* // => false
*
* _.isFinite('3');
* // => false
*/
function isFinite(value) {
return typeof value == 'number' && nativeIsFinite(value);
}
module.exports = isFinite;
@@ -0,0 +1,47 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ } = require("@eslint-community/eslint-utils")
const checkForPreferGlobal = require("../../util/check-prefer-global")
const traceMap = {
globals: {
TextEncoder: { [READ]: true },
},
modules: {
util: { TextEncoder: { [READ]: true } },
"node:util": { TextEncoder: { [READ]: true } },
},
}
/** @type {import('../rule-module').RuleModule} */
module.exports = {
meta: {
docs: {
description:
'enforce either `TextEncoder` or `require("util").TextEncoder`',
recommended: false,
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/text-encoder.md",
},
type: "suggestion",
fixable: null,
schema: [{ enum: ["always", "never"] }],
messages: {
preferGlobal:
"Unexpected use of 'require(\"util\").TextEncoder'. Use the global variable 'TextEncoder' instead.",
preferModule:
"Unexpected use of the global variable 'TextEncoder'. Use 'require(\"util\").TextEncoder' instead.",
},
},
create(context) {
return {
"Program:exit"() {
checkForPreferGlobal(context, traceMap)
},
}
},
}
@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/node`
# Summary
This package contains type definitions for node (https://nodejs.org/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v22.
### Additional Details
* Last updated: Tue, 11 Nov 2025 23:33:13 GMT
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
# Credits
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), and [René](https://github.com/Renegade334).
@@ -0,0 +1 @@
{"version":3,"file":"jsx-indent.d.ts","sourceRoot":"","sources":["jsx-indent.js"],"names":[],"mappings":"wBAoDW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAMM,SAAS,0CACd,GAA6F,EAC7F,YAAe,EACf,OAA2B;IAE3B,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,IAAI,SACF,QAAQ;IAEZ;IAEA,CAAA,GAAA,sBAAQ,EAAE;YACG;QAAX,IAAI,OAAO,gBAAA,2BAAA,eAAA,IAAK,OAAO,cAAZ,mCAAA,aAAc,IAAI;QAE7B,iBAAA,2BAAA,KAAM,gBAAgB,CAAC,SAAS;QAChC,OAAO;YACL,iBAAA,2BAAA,KAAM,mBAAmB,CAAC,SAAS;QACrC;IACF,GAAG;QAAC;QAAK;KAAY;AACvB","sources":["packages/@react-aria/utils/src/useFormReset.ts"],"sourcesContent":["/*\n * Copyright 2023 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 {RefObject} from '@react-types/shared';\nimport {useEffect} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nexport function useFormReset<T>(\n ref: RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null> | undefined,\n initialValue: T,\n onReset: (value: T) => void\n): void {\n let handleReset = useEffectEvent(() => {\n if (onReset) {\n onReset(initialValue);\n }\n });\n\n useEffect(() => {\n let form = ref?.current?.form;\n\n form?.addEventListener('reset', handleReset);\n return () => {\n form?.removeEventListener('reset', handleReset);\n };\n }, [ref, handleReset]);\n}\n"],"names":[],"version":3,"file":"useFormReset.main.js.map"}
@@ -0,0 +1,2 @@
var convert = require('./convert');
module.exports = convert(require('../math'));
@@ -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_sr=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e),r={words:{m:["jedan minut","jednog minuta"],mm:["%d minut","%d minuta","%d minuta"],h:["jedan sat","jednog sata"],hh:["%d sat","%d sata","%d sati"],d:["jedan dan","jednog dana"],dd:["%d dan","%d dana","%d dana"],M:["jedan mesec","jednog meseca"],MM:["%d mesec","%d meseca","%d meseci"],y:["jednu godinu","jedne godine"],yy:["%d godinu","%d godine","%d godina"]},correctGrammarCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10==1?t[0]:t[1]:t[2]},relativeTimeFormatter:function(e,t,a,d){var n=r.words[a];if(1===a.length)return"y"===a&&t?"jedna godina":d||t?n[0]:n[1];var i=r.correctGrammarCase(e,n);return"yy"===a&&t&&"%d godinu"===i?e+" godina":i.replace("%d",e)}},d={name:"sr",weekdays:"Nedelja_Ponedeljak_Utorak_Sreda_Četvrtak_Petak_Subota".split("_"),weekdaysShort:"Ned._Pon._Uto._Sre._Čet._Pet._Sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),months:"Januar_Februar_Mart_April_Maj_Jun_Jul_Avgust_Septembar_Oktobar_Novembar_Decembar".split("_"),monthsShort:"Jan._Feb._Mar._Apr._Maj_Jun_Jul_Avg._Sep._Okt._Nov._Dec.".split("_"),weekStart:1,relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:r.relativeTimeFormatter,mm:r.relativeTimeFormatter,h:r.relativeTimeFormatter,hh:r.relativeTimeFormatter,d:r.relativeTimeFormatter,dd:r.relativeTimeFormatter,M:r.relativeTimeFormatter,MM:r.relativeTimeFormatter,y:r.relativeTimeFormatter,yy:r.relativeTimeFormatter},ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"}};return a.default.locale(d,null,!0),d}));
@@ -0,0 +1,30 @@
'use strict';
var $TypeError = require('es-errors/type');
var IsTypedArrayOutOfBounds = require('./IsTypedArrayOutOfBounds');
var IsViewOutOfBounds = require('./IsViewOutOfBounds');
var MakeDataViewWithBufferWitnessRecord = require('./MakeDataViewWithBufferWitnessRecord');
var MakeTypedArrayWithBufferWitnessRecord = require('./MakeTypedArrayWithBufferWitnessRecord');
var isDataView = require('is-data-view');
var isTypedArray = require('is-typed-array');
// https://262.ecma-international.org/15.0/#sec-isarraybufferviewoutofbounds
module.exports = function IsArrayBufferViewOutOfBounds(O) {
var isDV = isDataView(O);
if (!isTypedArray(O) && !isDV) {
throw new $TypeError('Assertion failed: `O` must be a TypedArray or DataView');
}
if (isDV) { // step 1
var viewRecord = MakeDataViewWithBufferWitnessRecord(O, 'SEQ-CST'); // step 1.a
return IsViewOutOfBounds(viewRecord); // step 1.b
}
var taRecord = MakeTypedArrayWithBufferWitnessRecord(O, 'SEQ-CST'); // step 2
return IsTypedArrayOutOfBounds(taRecord); // step 3
};
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/tabs/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {useTab} from './useTab';\nexport {useTabPanel} from './useTabPanel';\nexport {useTabList} from './useTabList';\nexport type {AriaTabListProps, AriaTabPanelProps, AriaTabProps} from '@react-types/tabs';\nexport type {Orientation} from '@react-types/shared';\nexport type {TabAria} from './useTab';\nexport type {TabPanelAria} from './useTabPanel';\nexport type {AriaTabListOptions, TabListAria} from './useTabList';\n"],"names":[],"version":3,"file":"main.js.map"}
@@ -0,0 +1,6 @@
import { Delay } from "../delay.base";
export declare class SkipFirstDelay extends Delay {
apply(): Promise<unknown>;
private readonly isFirstAttempt;
protected readonly numOfDelayedAttempts: number;
}
@@ -0,0 +1,58 @@
declare const DEFAULT_TRANSITION_DURATION = "250ms";
declare const _default: {
/**
* Transition utilities
*/
".transition-background": {
"transition-property": string;
"transition-timing-function": string;
"transition-duration": string;
};
".transition-colors-opacity": {
"transition-property": string;
"transition-timing-function": string;
"transition-duration": string;
};
".transition-width": {
"transition-property": string;
"transition-timing-function": string;
"transition-duration": string;
};
".transition-height": {
"transition-property": string;
"transition-timing-function": string;
"transition-duration": string;
};
".transition-size": {
"transition-property": string;
"transition-timing-function": string;
"transition-duration": string;
};
".transition-left": {
"transition-property": string;
"transition-timing-function": string;
"transition-duration": string;
};
".transition-transform-opacity": {
"transition-property": string;
"transition-timing-function": string;
"transition-duration": string;
};
".transition-transform-background": {
"transition-property": string;
"transition-timing-function": string;
"transition-duration": string;
};
".transition-transform-colors": {
"transition-property": string;
"transition-timing-function": string;
"transition-duration": string;
};
".transition-transform-colors-opacity": {
"transition-property": string;
"transition-timing-function": string;
"transition-duration": string;
};
};
export { DEFAULT_TRANSITION_DURATION, _default as default };
@@ -0,0 +1,59 @@
'use strict';
var test = require('tape');
var debug = require('object-inspect');
var forEach = require('for-each');
var isSet = require('..');
test('non-collections', function (t) {
forEach([
null,
undefined,
true,
false,
42,
0,
-0,
NaN,
Infinity,
'',
'foo',
/a/g,
[],
{},
function () {}
], function (nonCollection) {
t.equal(isSet(nonCollection), false, debug(nonCollection) + ' is not a Set');
});
t.end();
});
test('Maps', { skip: typeof Map !== 'function' }, function (t) {
var m = new Map();
t.equal(isSet(m), false, debug(m) + ' is not a Set');
t.end();
});
test('Sets', { skip: typeof Set !== 'function' }, function (t) {
var s = new Set();
t.equal(isSet(s), true, debug(s) + ' is a Set');
t.end();
});
test('WeakMaps', { skip: typeof WeakMap !== 'function' }, function (t) {
var wm = new WeakMap();
t.equal(isSet(wm), false, debug(wm) + ' is not a Set');
t.end();
});
test('WeakSets', { skip: typeof WeakSet !== 'function' }, function (t) {
var ws = new WeakSet();
t.equal(isSet(ws), false, debug(ws) + ' is not a Set');
t.end();
});
@@ -0,0 +1,33 @@
/**
* @import {
* Construct,
* State,
* TokenizeContext,
* Tokenizer
* } from 'micromark-util-types'
*/
import { factorySpace } from 'micromark-factory-space';
import { markdownLineEnding } from 'micromark-util-character';
/** @type {Construct} */
export const lineEnding = {
name: 'lineEnding',
tokenize: tokenizeLineEnding
};
/**
* @this {TokenizeContext}
* Context.
* @type {Tokenizer}
*/
function tokenizeLineEnding(effects, ok) {
return start;
/** @type {State} */
function start(code) {
effects.enter("lineEnding");
effects.consume(code);
effects.exit("lineEnding");
return factorySpace(effects, ok, "linePrefix");
}
}
@@ -0,0 +1,168 @@
import * as tailwind_variants from 'tailwind-variants';
import * as react from 'react';
import { ReactElement, ReactNode, Key } from 'react';
import * as _heroui_system from '@heroui/system';
import { PropGetter, HTMLHeroUIProps } from '@heroui/system';
import { BreadcrumbsVariantProps, SlotsToClasses, BreadcrumbsSlots } from '@heroui/theme';
import { AriaBreadcrumbsProps } from '@react-types/breadcrumbs';
import { ReactRef } from '@heroui/react-utils';
import { BreadcrumbItemProps } from './breadcrumb-item.js';
import './use-breadcrumb-item.js';
type RenderEllipsisItemProps = {
/**
* The collapsed items.
*/
items: BreadcrumbItemProps[];
/**
* The max number of items.
*/
maxItems: number;
/**
* The picked item to render the ellipsis.
*/
collapsedItem: ReactNode;
/**
* The default ellipsis icon.
*/
ellipsisIcon: ReactNode;
/**
* Number of items to show before the ellipsis.
*/
itemsBeforeCollapse: number;
/**
* Number of items to show after the ellipsis.
*/
itemsAfterCollapse: number;
/**
* The separator between each breadcrumb. It is a chevron by default.
*/
separator: ReactNode;
};
interface Props extends HTMLHeroUIProps<"nav">, AriaBreadcrumbsProps {
/**
* Ref to the DOM node.
*/
ref?: ReactRef<HTMLElement | null>;
/**
* If max items is exceeded, the number of items to show before the ellipsis.
* @default 1
*/
itemsBeforeCollapse?: number;
/**
* If max items is exceeded, the number of items to show after the ellipsis.
* @default 2
*/
itemsAfterCollapse?: number;
/**
* Specifies the maximum number of breadcrumbs to display. When there are more
* than the maximum number, only the first `itemsBeforeCollapse` and last `itemsAfterCollapse`
* will be shown, with an ellipsis in between.
* @default 8
*/
maxItems?: number;
/**
* The separator between each breadcrumb. It is a chevron by default.
*/
separator?: ReactNode;
/**
* Breadcrumbs in a disabled state shows items, but indicates that navigation is
* not available. This can be used to maintain layout continuity.
* @default false
*/
isDisabled?: boolean;
/**
* The breadcrumbs classNames.
*/
classNames?: SlotsToClasses<BreadcrumbsSlots>;
/**
* The breadcrumbs items classNames.
*/
itemClasses?: BreadcrumbItemProps["classNames"];
/**
* A function that allows to render the ellipsis when the number of items is exceeded.
*
* @param props RenderEllipsisItemProps
*/
renderEllipsis?: (props: RenderEllipsisItemProps) => ReactNode;
/**
* Callback when any of the breadcrumbs is pressed.
* @param key string
*/
onAction?: (key: Key) => void;
}
type UseBreadcrumbsProps = Props & BreadcrumbsVariantProps & Partial<Pick<BreadcrumbItemProps, "color" | "size" | "underline" | "hideSeparator" | "disableAnimation">>;
declare function useBreadcrumbs(originalProps: UseBreadcrumbsProps): {
Component: _heroui_system.As<any>;
children: ReactElement<any, string | react.JSXElementConstructor<any>>[] | undefined;
slots: {
base: (slotProps?: ({
size?: "sm" | "md" | "lg" | undefined;
radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
variant?: "solid" | "bordered" | "light" | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
list: (slotProps?: ({
size?: "sm" | "md" | "lg" | undefined;
radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
variant?: "solid" | "bordered" | "light" | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
ellipsis: (slotProps?: ({
size?: "sm" | "md" | "lg" | undefined;
radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
variant?: "solid" | "bordered" | "light" | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
separator: (slotProps?: ({
size?: "sm" | "md" | "lg" | undefined;
radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
variant?: "solid" | "bordered" | "light" | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
} & {
base: (slotProps?: ({
size?: "sm" | "md" | "lg" | undefined;
radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
variant?: "solid" | "bordered" | "light" | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
list: (slotProps?: ({
size?: "sm" | "md" | "lg" | undefined;
radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
variant?: "solid" | "bordered" | "light" | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
ellipsis: (slotProps?: ({
size?: "sm" | "md" | "lg" | undefined;
radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
variant?: "solid" | "bordered" | "light" | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
separator: (slotProps?: ({
size?: "sm" | "md" | "lg" | undefined;
radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
variant?: "solid" | "bordered" | "light" | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
} & {};
separator: ReactNode;
childCount: number;
itemsAfterCollapse: number;
itemsBeforeCollapse: number;
maxItems: number;
classNames: SlotsToClasses<"base" | "list" | "ellipsis" | "separator"> | undefined;
isDisabled: boolean | undefined;
itemProps: Partial<BreadcrumbItemProps>;
renderEllipsis: ((props: RenderEllipsisItemProps) => ReactNode) | undefined;
getBaseProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getListProps: () => {
"data-slot": string;
className: string;
};
getEllipsisProps: () => {
"data-slot": string;
className: string;
};
getSeparatorProps: () => {
"data-slot": string;
"aria-hidden": boolean | "true" | "false";
className: string;
};
onAction: ((key: Key) => void) | undefined;
};
type UseBreadcrumbsReturn = ReturnType<typeof useBreadcrumbs>;
export { UseBreadcrumbsProps, UseBreadcrumbsReturn, useBreadcrumbs };
@@ -0,0 +1,35 @@
import type { TSchema, SchemaOptions } from '../schema/index';
import type { Evaluate, Ensure } from '../helpers/index';
import type { TMappedResult } from '../mapped/index';
import { type TReadonlyOptional } from '../readonly-optional/index';
import { type TComputed } from '../computed/index';
import { type TOptional } from '../optional/index';
import { type TReadonly } from '../readonly/index';
import { type TRecursive } from '../recursive/index';
import { type TObject, type TProperties } from '../object/index';
import { type TIntersect } from '../intersect/index';
import { type TUnion } from '../union/index';
import { type TRef } from '../ref/index';
import { type TBigInt } from '../bigint/index';
import { type TBoolean } from '../boolean/index';
import { type TInteger } from '../integer/index';
import { type TLiteral } from '../literal/index';
import { type TNull } from '../null/index';
import { type TNumber } from '../number/index';
import { type TString } from '../string/index';
import { type TSymbol } from '../symbol/index';
import { type TUndefined } from '../undefined/index';
import { type TPartialFromMappedResult } from './partial-from-mapped-result';
type TFromComputed<Target extends string, Parameters extends TSchema[]> = Ensure<TComputed<'Partial', [TComputed<Target, Parameters>]>>;
type TFromRef<Ref extends string> = Ensure<TComputed<'Partial', [TRef<Ref>]>>;
type TFromProperties<Properties extends TProperties> = Evaluate<{
[K in keyof Properties]: Properties[K] extends (TReadonlyOptional<infer S>) ? TReadonlyOptional<S> : Properties[K] extends (TReadonly<infer S>) ? TReadonlyOptional<S> : Properties[K] extends (TOptional<infer S>) ? TOptional<S> : TOptional<Properties[K]>;
}>;
type TFromObject<_Type extends TObject, Properties extends TProperties, MappedProperties extends TProperties = TFromProperties<Properties>, Result extends TSchema = TObject<MappedProperties>> = Result;
type TFromRest<Types extends TSchema[], Result extends TSchema[] = []> = (Types extends [infer L extends TSchema, ...infer R extends TSchema[]] ? TFromRest<R, [...Result, TPartial<L>]> : Result);
export type TPartial<Type extends TSchema> = (Type extends TRecursive<infer Type extends TSchema> ? TRecursive<TPartial<Type>> : Type extends TComputed<infer Target extends string, infer Parameters extends TSchema[]> ? TFromComputed<Target, Parameters> : Type extends TRef<infer Ref extends string> ? TFromRef<Ref> : Type extends TIntersect<infer Types extends TSchema[]> ? TIntersect<TFromRest<Types>> : Type extends TUnion<infer Types extends TSchema[]> ? TUnion<TFromRest<Types>> : Type extends TObject<infer Properties extends TProperties> ? TFromObject<TObject, Properties> : Type extends TBigInt ? Type : Type extends TBoolean ? Type : Type extends TInteger ? Type : Type extends TLiteral ? Type : Type extends TNull ? Type : Type extends TNumber ? Type : Type extends TString ? Type : Type extends TSymbol ? Type : Type extends TUndefined ? Type : TObject<{}>);
/** `[Json]` Constructs a type where all properties are optional */
export declare function Partial<MappedResult extends TMappedResult>(type: MappedResult, options?: SchemaOptions): TPartialFromMappedResult<MappedResult>;
/** `[Json]` Constructs a type where all properties are optional */
export declare function Partial<Type extends TSchema>(type: Type, options?: SchemaOptions): TPartial<Type>;
export {};
@@ -0,0 +1,8 @@
# `@peculiar/asn1-x509-attr`
[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/PeculiarVentures/asn1-schema/master/packages/x509-attr/LICENSE.md)
[![npm version](https://badge.fury.io/js/%40peculiar%2Fasn1-x509-attr.svg)](https://badge.fury.io/js/%40peculiar%2Fasn1-x509-attr)
[![NPM](https://nodei.co/npm/@peculiar/asn1-x509-attr.png)](https://nodei.co/npm/@peculiar/asn1-x509-attr/)
[RFC 5755](https://tools.ietf.org/html/rfc5755) An Internet Attribute Certificate
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAiC;AACjC,mCAA8B;AAC9B,2CAAoC;AACpC,uCAA4E;AAoB5E,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,KAAK;IACZ,cAAc,EAAE,SAAS;IACzB,MAAM,EAAE,SAAS;IACjB,SAAS,EAAE,SAAS;CACrB,CAAC;AAEF,MAAM,cAAc,GAAG,IAAA,mBAAM,EAAC,GAAG,CAAC,CAAC;AAMnC,SAAsB,oBAAoB,CACxC,4BAA4C,aAAa,CAAE;;QAE3D,MAAM,MAAM,GAAG,MAAM,IAAA,uBAAa,EAAC,OAAO,CAAC,CAAC;QAC5C,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAG7B,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAC5E,MAAM,WAA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C9D,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;YACrC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;YACxC,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;gBAChC,MAAM,CAAC,KAAK,EAAE,CAAC;gBACf,YAAY,CAAC,KAAK,EAAE,CAAC;gBACrB,eAAe,CAAC,KAAK,EAAE,CAAC;gBACxB,oBAAoB,CAAC,OAAO,CAAC,CAAC;YAChC,CAAC,CAAC,CAAC;SACJ;QACD,IAAI,OAAO,CAAC,cAAc,EAAE;YAC1B,oBAAoB,iCACf,OAAO,KACV,MAAM,EAAE,OAAO,CAAC,cAAc,EAC9B,cAAc,EAAE,SAAS,EACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,SAAS,EAAE,SAAS,IACpB,CAAC;SACJ;IACH,CAAC;CAAA;AA/DD,oDA+DC;AAYD,SAAsB,qCAAqC,CACzD,4BAA4C,aAAa,CAAE;;QAE3D,MAAM,MAAM,GAAG,MAAM,IAAA,uBAAa,EAAC,OAAO,CAAC,CAAC;QAE5C,OAAO,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE;YACpC,OAAO,IAAA,4BAAkB,EACvB,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,EACzB,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,oBAAoB,CAC9B,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CAAA;AAdD,sFAcC","sourcesContent":["import { watch } from 'chokidar';\nimport { sync } from 'globby';\nimport { pLimit } from 'plimit-lit';\nimport { prepareConfig, replaceAlias, replaceAliasString } from './helpers';\nimport {\n AliasReplacer,\n AliasReplacerArguments,\n IConfig,\n IOutput,\n IProjectConfig,\n ReplaceTscAliasPathsOptions\n} from './interfaces';\n\n// export interfaces for api use.\nexport {\n ReplaceTscAliasPathsOptions,\n AliasReplacer,\n AliasReplacerArguments,\n IConfig,\n IProjectConfig,\n IOutput\n};\n\nconst defaultConfig = {\n watch: false,\n verbose: false,\n debug: false,\n declarationDir: undefined,\n output: undefined,\n aliasTrie: undefined\n};\n\nconst OpenFilesLimit = pLimit(500);\n\n/**\n * replaceTscAliasPaths replaces the aliases in the project.\n * @param {ReplaceTscAliasPathsOptions} options tsc-alias options.\n */\nexport async function replaceTscAliasPaths(\n options: ReplaceTscAliasPathsOptions = { ...defaultConfig }\n) {\n const config = await prepareConfig(options);\n const output = config.output;\n\n // Finding files and changing alias paths\n const posixOutput = config.outPath.replace(/\\\\/g, '/').replace(/\\/+$/g, '');\n const globPattern = [\n `${posixOutput}/**/*.${config.inputGlob}`,\n `!${posixOutput}/**/node_modules`\n ];\n output.debug('Search pattern:', globPattern);\n const files = sync(globPattern, {\n dot: true,\n onlyFiles: true\n });\n output.debug('Found files:', files);\n\n // Make array with promises for file changes\n // Wait for all promises to resolve\n const replaceList = await Promise.all(\n files.map((file) =>\n OpenFilesLimit(() =>\n replaceAlias(\n config,\n file,\n options?.resolveFullPaths,\n options?.resolveFullExtension\n )\n )\n )\n );\n\n // Count all changed files\n const replaceCount = replaceList.filter(Boolean).length;\n\n output.info(`${replaceCount} files were affected!`);\n if (options.watch) {\n output.verbose = true;\n output.info('[Watching for file changes...]');\n const filesWatcher = watch(globPattern);\n const tsconfigWatcher = watch(config.configFile);\n const onFileChange = async (file: string) =>\n await replaceAlias(config, file, options?.resolveFullPaths);\n filesWatcher.on('add', onFileChange);\n filesWatcher.on('change', onFileChange);\n tsconfigWatcher.on('change', () => {\n output.clear();\n filesLine truncated
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=NonCachedServiceNodeContext.js.map
@@ -0,0 +1,36 @@
import { invariant } from './utils';
/**
* Partition a pattern into a list of literals and placeholders
* https://tc39.es/ecma402/#sec-partitionpattern
* @param pattern
*/
export function PartitionPattern(pattern) {
var result = [];
var beginIndex = pattern.indexOf('{');
var endIndex = 0;
var nextIndex = 0;
var length = pattern.length;
while (beginIndex < pattern.length && beginIndex > -1) {
endIndex = pattern.indexOf('}', beginIndex);
invariant(endIndex > beginIndex, "Invalid pattern ".concat(pattern));
if (beginIndex > nextIndex) {
result.push({
type: 'literal',
value: pattern.substring(nextIndex, beginIndex),
});
}
result.push({
type: pattern.substring(beginIndex + 1, endIndex),
value: undefined,
});
nextIndex = endIndex + 1;
beginIndex = pattern.indexOf('{', nextIndex);
}
if (nextIndex < length) {
result.push({
type: 'literal',
value: pattern.substring(nextIndex, length),
});
}
return result;
}
@@ -0,0 +1,55 @@
#!/usr/bin/env python3
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Unit tests for the ninja.py file. """
import sys
import unittest
import gyp.generator.ninja as ninja
class TestPrefixesAndSuffixes(unittest.TestCase):
def test_BinaryNamesWindows(self):
# These cannot run on non-Windows as they require a VS installation to
# correctly handle variable expansion.
if sys.platform.startswith("win"):
writer = ninja.NinjaWriter(
"foo", "wee", ".", ".", "build.ninja", ".", "build.ninja", "win"
)
spec = {"target_name": "wee"}
self.assertTrue(
writer.ComputeOutputFileName(spec, "executable").endswith(".exe")
)
self.assertTrue(
writer.ComputeOutputFileName(spec, "shared_library").endswith(".dll")
)
self.assertTrue(
writer.ComputeOutputFileName(spec, "static_library").endswith(".lib")
)
def test_BinaryNamesLinux(self):
writer = ninja.NinjaWriter(
"foo", "wee", ".", ".", "build.ninja", ".", "build.ninja", "linux"
)
spec = {"target_name": "wee"}
self.assertTrue("." not in writer.ComputeOutputFileName(spec, "executable"))
self.assertTrue(
writer.ComputeOutputFileName(spec, "shared_library").startswith("lib")
)
self.assertTrue(
writer.ComputeOutputFileName(spec, "static_library").startswith("lib")
)
self.assertTrue(
writer.ComputeOutputFileName(spec, "shared_library").endswith(".so")
)
self.assertTrue(
writer.ComputeOutputFileName(spec, "static_library").endswith(".a")
)
if __name__ == "__main__":
unittest.main()
@@ -0,0 +1 @@
{"name":"html-url-attributes","version":"3.0.1","requiresBuild":false,"files":{"license":{"checkedAt":1794532114490,"integrity":"sha512-q26vDGEULbekRCaibFZl94v6LpglYXz7lr+w4O0kkFGRO41q8Hr46vED6XCX36P3p+c3Jxk3AbSohxcyRzECxA==","mode":420,"size":1070},"index.js":{"checkedAt":1794532114491,"integrity":"sha512-XaffXAPrGus/Ho7xAa5u4YAe76N8WbFZPcNrQ1OoNhjgPcEv4ldnZQKAAobXRxjngCSNoHRs+BTjJeOvtgzYKw==","mode":420,"size":755},"lib/index.js":{"checkedAt":1794532114491,"integrity":"sha512-Ad4hNt2SF2Fo3WpKi1AhC1RIuWSSVrHWwOZreKUN1jt6XEW9l8RteqG0Hptau82SXqt6Sm8QrX4pkB5jErHMiQ==","mode":420,"size":637},"package.json":{"checkedAt":1794532114491,"integrity":"sha512-Ja2s5yJnCaL3E5x9yIlKp3M+6HgvSbECUFuzu2gBfSGs2J6eAQCWAZGAHqCH7ZAiP+UOA40XNH9Pq4eI4w6F9w==","mode":420,"size":998},"index.d.ts.map":{"checkedAt":1794532114491,"integrity":"sha512-HKAZ34kzr06RpepS08RdCaqDDJkDHvl030WbEUv3glzGXkKDmPlJJRFG7X9JeXzZ7SCu9cFwcoIJ3OM4eQgU9w==","mode":420,"size":97},"lib/index.d.ts.map":{"checkedAt":1794532114491,"integrity":"sha512-IPeRkg8kglSnptYw0WjvKKAse9/XGhvGf1j8kqLUQOLWwmFR3rus1L44pc4D1ZUIMACEIge3upZsRtnRiJGKCg==","mode":420,"size":185},"readme.md":{"checkedAt":1794532114491,"integrity":"sha512-xq+dWCsKNhVu1aVJ2Ex5CKV6ABIazW2YDh89O70Wep1LD0udxqyGgRwvRc+2Qqn8/t0jTHz2WIo/HQhR+2L3cQ==","mode":420,"size":4536},"index.d.ts":{"checkedAt":1794532114491,"integrity":"sha512-X3Ppohymgw3Zs2ZDMlMLGPN/mZRNc8BPhLWW3VmYKbz7t2f2AV77HnxPmBss9ruGhWR7hr6sY5TMT1hZWJeNoQ==","mode":420,"size":83},"lib/index.d.ts":{"checkedAt":1794532114492,"integrity":"sha512-d3fXY1rt5ESPoe/WaAeYjQXTBd97VR7Y7jVKT0sb+R/93IszlK6+MaZJaIUgMy5S/Onn9Stlheg5kag9oxEDag==","mode":420,"size":314}}}
@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ResolvedValueElementMetadataKind = void 0;
var ResolvedValueElementMetadataKind;
(function (ResolvedValueElementMetadataKind) {
ResolvedValueElementMetadataKind[ResolvedValueElementMetadataKind["multipleInjection"] = 0] = "multipleInjection";
ResolvedValueElementMetadataKind[ResolvedValueElementMetadataKind["singleInjection"] = 1] = "singleInjection";
})(ResolvedValueElementMetadataKind || (exports.ResolvedValueElementMetadataKind = ResolvedValueElementMetadataKind = {}));
//# sourceMappingURL=ResolvedValueElementMetadataKind.js.map
@@ -0,0 +1,23 @@
var get = require('./get');
/**
* The base implementation of `_.at` without support for individual paths.
*
* @private
* @param {Object} object The object to iterate over.
* @param {string[]} paths The property paths to pick.
* @returns {Array} Returns the picked elements.
*/
function baseAt(object, paths) {
var index = -1,
length = paths.length,
result = Array(length),
skip = object == null;
while (++index < length) {
result[index] = skip ? undefined : get(object, paths[index]);
}
return result;
}
module.exports = baseAt;
@@ -0,0 +1,185 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isArrayLike = require('./internal/isArrayLike.js');
var _isArrayLike2 = _interopRequireDefault(_isArrayLike);
var _breakLoop = require('./internal/breakLoop.js');
var _breakLoop2 = _interopRequireDefault(_breakLoop);
var _eachOfLimit = require('./eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _once = require('./internal/once.js');
var _once2 = _interopRequireDefault(_once);
var _onlyOnce = require('./internal/onlyOnce.js');
var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// eachOf implementation optimized for array-likes
function eachOfArrayLike(coll, iteratee, callback) {
callback = (0, _once2.default)(callback);
var index = 0,
completed = 0,
{ length } = coll,
canceled = false;
if (length === 0) {
callback(null);
}
function iteratorCallback(err, value) {
if (err === false) {
canceled = true;
}
if (canceled === true) return;
if (err) {
callback(err);
} else if (++completed === length || value === _breakLoop2.default) {
callback(null);
}
}
for (; index < length; index++) {
iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback));
}
}
// a generic version of eachOf which can handle array, object, and iterator cases.
function eachOfGeneric(coll, iteratee, callback) {
return (0, _eachOfLimit2.default)(coll, Infinity, iteratee, callback);
}
/**
* Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument
* to the iteratee.
*
* @name eachOf
* @static
* @memberOf module:Collections
* @method
* @alias forEachOf
* @category Collection
* @see [async.each]{@link module:Collections.each}
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A function to apply to each
* item in `coll`.
* The `key` is the item's key, or index in the case of an array.
* Invoked with (item, key, callback).
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
* @returns {Promise} a promise, if a callback is omitted
* @example
*
* // dev.json is a file containing a valid json object config for dev environment
* // dev.json is a file containing a valid json object config for test environment
* // prod.json is a file containing a valid json object config for prod environment
* // invalid.json is a file with a malformed json object
*
* let configs = {}; //global variable
* let validConfigFileMap = {dev: 'dev.json', test: 'test.json', prod: 'prod.json'};
* let invalidConfigFileMap = {dev: 'dev.json', test: 'test.json', invalid: 'invalid.json'};
*
* // asynchronous function that reads a json file and parses the contents as json object
* function parseFile(file, key, callback) {
* fs.readFile(file, "utf8", function(err, data) {
* if (err) return calback(err);
* try {
* configs[key] = JSON.parse(data);
* } catch (e) {
* return callback(e);
* }
* callback();
* });
* }
*
* // Using callbacks
* async.forEachOf(validConfigFileMap, parseFile, function (err) {
* if (err) {
* console.error(err);
* } else {
* console.log(configs);
* // configs is now a map of JSON data, e.g.
* // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
* }
* });
*
* //Error handing
* async.forEachOf(invalidConfigFileMap, parseFile, function (err) {
* if (err) {
* console.error(err);
* // JSON parse error exception
* } else {
* console.log(configs);
* }
* });
*
* // Using Promises
* async.forEachOf(validConfigFileMap, parseFile)
* .then( () => {
* console.log(configs);
* // configs is now a map of JSON data, e.g.
* // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
* }).catch( err => {
* console.error(err);
* });
*
* //Error handing
* async.forEachOf(invalidConfigFileMap, parseFile)
* .then( () => {
* console.log(configs);
* }).catch( err => {
* console.error(err);
* // JSON parse error exception
* });
*
* // Using async/await
* async () => {
* try {
* let result = await async.forEachOf(validConfigFileMap, parseFile);
* console.log(configs);
* // configs is now a map of JSON data, e.g.
* // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
* }
* catch (err) {
* console.log(err);
* }
* }
*
* //Error handing
* async () => {
* try {
* let result = await async.forEachOf(invalidConfigFileMap, parseFile);
* console.log(configs);
* }
* catch (err) {
* console.log(err);
* // JSON parse error exception
* }
* }
*
*/
function eachOf(coll, iteratee, callback) {
var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric;
return eachOfImplementation(coll, (0, _wrapAsync2.default)(iteratee), callback);
}
exports.default = (0, _awaitify2.default)(eachOf, 3);
module.exports = exports.default;
@@ -0,0 +1,91 @@
var $5Cus8$reactstatelycollections = require("@react-stately/collections");
var $5Cus8$reactstatelyselection = require("@react-stately/selection");
var $5Cus8$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, "useGridState", () => $38009b28e45912ea$export$4007ac09ff9c68ed);
function $38009b28e45912ea$export$4007ac09ff9c68ed(props) {
let { collection: collection, focusMode: focusMode } = props;
// eslint-disable-next-line react-hooks/rules-of-hooks
let selectionState = props.UNSAFE_selectionState || (0, $5Cus8$reactstatelyselection.useMultipleSelectionState)(props);
let disabledKeys = (0, $5Cus8$react.useMemo)(()=>props.disabledKeys ? new Set(props.disabledKeys) : new Set(), [
props.disabledKeys
]);
let setFocusedKey = selectionState.setFocusedKey;
selectionState.setFocusedKey = (key, child)=>{
// If focusMode is cell and an item is focused, focus a child cell instead.
if (focusMode === 'cell' && key != null) {
let item = collection.getItem(key);
if ((item === null || item === void 0 ? void 0 : item.type) === 'item') {
var _getLastItem, _getFirstItem;
let children = (0, $5Cus8$reactstatelycollections.getChildNodes)(item, collection);
var _getLastItem_key, _getFirstItem_key;
if (child === 'last') key = (_getLastItem_key = (_getLastItem = (0, $5Cus8$reactstatelycollections.getLastItem)(children)) === null || _getLastItem === void 0 ? void 0 : _getLastItem.key) !== null && _getLastItem_key !== void 0 ? _getLastItem_key : null;
else key = (_getFirstItem_key = (_getFirstItem = (0, $5Cus8$reactstatelycollections.getFirstItem)(children)) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key) !== null && _getFirstItem_key !== void 0 ? _getFirstItem_key : null;
}
}
setFocusedKey(key, child);
};
let selectionManager = (0, $5Cus8$react.useMemo)(()=>new (0, $5Cus8$reactstatelyselection.SelectionManager)(collection, selectionState), [
collection,
selectionState
]);
// Reset focused key if that item is deleted from the collection.
const cachedCollection = (0, $5Cus8$react.useRef)(null);
(0, $5Cus8$react.useEffect)(()=>{
if (selectionState.focusedKey != null && cachedCollection.current && !collection.getItem(selectionState.focusedKey)) {
const node = cachedCollection.current.getItem(selectionState.focusedKey);
const parentNode = (node === null || node === void 0 ? void 0 : node.parentKey) != null && (node.type === 'cell' || node.type === 'rowheader' || node.type === 'column') ? cachedCollection.current.getItem(node.parentKey) : node;
if (!parentNode) {
selectionState.setFocusedKey(null);
return;
}
const cachedRows = cachedCollection.current.rows;
const rows = collection.rows;
const diff = cachedRows.length - rows.length;
let index = Math.min(diff > 1 ? Math.max(parentNode.index - diff + 1, 0) : parentNode.index, rows.length - 1);
let newRow = null;
while(index >= 0){
if (!selectionManager.isDisabled(rows[index].key) && rows[index].type !== 'headerrow') {
newRow = rows[index];
break;
}
// Find next, not disabled row.
if (index < rows.length - 1) index++;
else {
if (index > parentNode.index) index = parentNode.index;
index--;
}
}
if (newRow) {
const childNodes = newRow.hasChildNodes ? [
...(0, $5Cus8$reactstatelycollections.getChildNodes)(newRow, collection)
] : [];
const keyToFocus = newRow.hasChildNodes && parentNode !== node && node && node.index < childNodes.length ? childNodes[node.index].key : newRow.key;
selectionState.setFocusedKey(keyToFocus);
} else selectionState.setFocusedKey(null);
}
cachedCollection.current = collection;
}, [
collection,
selectionManager,
selectionState,
selectionState.focusedKey
]);
return {
collection: collection,
disabledKeys: disabledKeys,
isKeyboardNavigationDisabled: false,
selectionManager: selectionManager
};
}
//# sourceMappingURL=useGridState.main.js.map
@@ -0,0 +1,120 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Container = void 0;
const core_1 = require("@inversifyjs/core");
const BindingManager_1 = require("./BindingManager");
const ContainerModuleManager_1 = require("./ContainerModuleManager");
const DeactivationParamsManager_1 = require("./DeactivationParamsManager");
const PlanParamsOperationsManager_1 = require("./PlanParamsOperationsManager");
const PlanResultCacheManager_1 = require("./PlanResultCacheManager");
const PluginManager_1 = require("./PluginManager");
const ServiceReferenceManager_1 = require("./ServiceReferenceManager");
const ServiceResolutionManager_1 = require("./ServiceResolutionManager");
const SnapshotManager_1 = require("./SnapshotManager");
const DEFAULT_DEFAULT_SCOPE = core_1.bindingScopeValues.Transient;
class Container {
#bindingManager;
#containerModuleManager;
#pluginManager;
#serviceReferenceManager;
#serviceResolutionManager;
#snapshotManager;
constructor(options) {
const autobind = options?.autobind ?? false;
const defaultScope = options?.defaultScope ?? DEFAULT_DEFAULT_SCOPE;
this.#serviceReferenceManager = this.#buildServiceReferenceManager(options, autobind, defaultScope);
const planParamsOperationsManager = new PlanParamsOperationsManager_1.PlanParamsOperationsManager(this.#serviceReferenceManager);
const planResultCacheManager = new PlanResultCacheManager_1.PlanResultCacheManager(planParamsOperationsManager, this.#serviceReferenceManager);
const deactivationParamsManager = new DeactivationParamsManager_1.DeactivationParamsManager(this.#serviceReferenceManager);
this.#bindingManager = new BindingManager_1.BindingManager(deactivationParamsManager.deactivationParams, defaultScope, planResultCacheManager, this.#serviceReferenceManager);
this.#containerModuleManager = new ContainerModuleManager_1.ContainerModuleManager(this.#bindingManager, deactivationParamsManager.deactivationParams, defaultScope, planResultCacheManager, this.#serviceReferenceManager);
this.#serviceResolutionManager = new ServiceResolutionManager_1.ServiceResolutionManager(planParamsOperationsManager, this.#serviceReferenceManager, autobind, defaultScope);
this.#pluginManager = new PluginManager_1.PluginManager(this, this.#serviceReferenceManager, this.#serviceResolutionManager);
this.#snapshotManager = new SnapshotManager_1.SnapshotManager(this.#serviceReferenceManager);
}
bind(serviceIdentifier) {
return this.#bindingManager.bind(serviceIdentifier);
}
get(serviceIdentifier, options) {
return this.#serviceResolutionManager.get(serviceIdentifier, options);
}
getAll(serviceIdentifier, options) {
return this.#serviceResolutionManager.getAll(serviceIdentifier, options);
}
async getAllAsync(serviceIdentifier, options) {
return this.#serviceResolutionManager.getAllAsync(serviceIdentifier, options);
}
async getAsync(serviceIdentifier, options) {
return this.#serviceResolutionManager.getAsync(serviceIdentifier, options);
}
isBound(serviceIdentifier, options) {
return this.#bindingManager.isBound(serviceIdentifier, options);
}
isCurrentBound(serviceIdentifier, options) {
return this.#bindingManager.isCurrentBound(serviceIdentifier, options);
}
async load(...modules) {
return this.#containerModuleManager.load(...modules);
}
loadSync(...modules) {
this.#containerModuleManager.loadSync(...modules);
}
onActivation(serviceIdentifier, activation) {
this.#serviceReferenceManager.activationService.add(activation, {
serviceId: serviceIdentifier,
});
}
onDeactivation(serviceIdentifier, deactivation) {
this.#serviceReferenceManager.deactivationService.add(deactivation, {
serviceId: serviceIdentifier,
});
}
register(pluginConstructor) {
this.#pluginManager.register(this, pluginConstructor);
}
restore() {
this.#snapshotManager.restore();
}
async rebind(serviceIdentifier) {
return this.#bindingManager.rebind(serviceIdentifier);
}
rebindSync(serviceIdentifier) {
return this.#bindingManager.rebindSync(serviceIdentifier);
}
snapshot() {
this.#snapshotManager.snapshot();
}
async unbind(identifier) {
await this.#bindingManager.unbind(identifier);
}
async unbindAll() {
return this.#bindingManager.unbindAll();
}
unbindSync(identifier) {
this.#bindingManager.unbindSync(identifier);
}
async unload(...modules) {
return this.#containerModuleManager.unload(...modules);
}
unloadSync(...modules) {
this.#containerModuleManager.unloadSync(...modules);
}
#buildAutobindOptions(autobind, defaultScope) {
if (autobind) {
return { scope: defaultScope };
}
return undefined;
}
#buildServiceReferenceManager(options, autobind, defaultScope) {
const autobindOptions = this.#buildAutobindOptions(autobind, defaultScope);
if (options?.parent === undefined) {
return new ServiceReferenceManager_1.ServiceReferenceManager(core_1.ActivationsService.build(() => undefined), core_1.BindingService.build(() => undefined, autobindOptions), core_1.DeactivationsService.build(() => undefined), new core_1.PlanResultCacheService());
}
const planResultCacheService = new core_1.PlanResultCacheService();
const parent = options.parent;
parent.#serviceReferenceManager.planResultCacheService.subscribe(planResultCacheService);
return new ServiceReferenceManager_1.ServiceReferenceManager(core_1.ActivationsService.build(() => parent.#serviceReferenceManager.activationService), core_1.BindingService.build(() => parent.#serviceReferenceManager.bindingService, autobindOptions), core_1.DeactivationsService.build(() => parent.#serviceReferenceManager.deactivationService), planResultCacheService);
}
}
exports.Container = Container;
//# sourceMappingURL=Container.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB 0C 1C"},D:{"1":"0 1 2 3 4 5 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB","194":"xB yB zB 0B 1B 2B 3B UC 4B VC"},E:{"1":"A B C L M G aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F 2C ZC 3C 4C 5C 6C"},F:{"1":"0 1 2 3 4 5 xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB FD GD HD ID NC uC JD OC","194":"kB lB mB nB oB pB qB rB sB tB uB vB wB"},G:{"1":"RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB rD sD aC tD uD vD wD xD QC RC SC yD","2":"J","194":"oD pD qD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","2":"1D"}},B:4,C:"#rrggbbaa hex color notation",D:true};
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_to_array.cjs",
"module": "../../esm/_to_array.js"
}
@@ -0,0 +1,71 @@
import { EndOfStreamError, AbortError } from "./Errors.js";
export class AbstractStreamReader {
constructor() {
this.endOfStream = false;
this.interrupted = false;
/**
* Store peeked data
* @type {Array}
*/
this.peekQueue = [];
}
async peek(uint8Array, mayBeLess = false) {
const bytesRead = await this.read(uint8Array, mayBeLess);
this.peekQueue.push(uint8Array.subarray(0, bytesRead)); // Put read data back to peek buffer
return bytesRead;
}
async read(buffer, mayBeLess = false) {
if (buffer.length === 0) {
return 0;
}
let bytesRead = this.readFromPeekBuffer(buffer);
if (!this.endOfStream) {
bytesRead += await this.readRemainderFromStream(buffer.subarray(bytesRead), mayBeLess);
}
if (bytesRead === 0 && !mayBeLess) {
throw new EndOfStreamError();
}
return bytesRead;
}
/**
* Read chunk from stream
* @param buffer - Target Uint8Array (or Buffer) to store data read from stream in
* @returns Number of bytes read
*/
readFromPeekBuffer(buffer) {
let remaining = buffer.length;
let bytesRead = 0;
// consume peeked data first
while (this.peekQueue.length > 0 && remaining > 0) {
const peekData = this.peekQueue.pop(); // Front of queue
if (!peekData)
throw new Error('peekData should be defined');
const lenCopy = Math.min(peekData.length, remaining);
buffer.set(peekData.subarray(0, lenCopy), bytesRead);
bytesRead += lenCopy;
remaining -= lenCopy;
if (lenCopy < peekData.length) {
// remainder back to queue
this.peekQueue.push(peekData.subarray(lenCopy));
}
}
return bytesRead;
}
async readRemainderFromStream(buffer, mayBeLess) {
let bytesRead = 0;
// Continue reading from stream if required
while (bytesRead < buffer.length && !this.endOfStream) {
if (this.interrupted) {
throw new AbortError();
}
const chunkLen = await this.readFromStream(buffer.subarray(bytesRead), mayBeLess);
if (chunkLen === 0)
break;
bytesRead += chunkLen;
}
if (!mayBeLess && bytesRead < buffer.length) {
throw new EndOfStreamError();
}
return bytesRead;
}
}
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=forward-ref-uses-ref.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"file.js","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":";;;AAqrCA,wCAyBC;AA9sCY,QAAA,iBAAiB,GAAG,IAAI,GAAG,CAAC;IACrC,gGAAgG;IAChG,CAAC,KAAK,EAAE,8CAA8C,CAAC;IACvD,CAAC,MAAM,EAAE,oBAAoB,CAAC;IAC9B,CAAC,KAAK,EAAE,aAAa,CAAC;IACtB,CAAC,KAAK,EAAE,aAAa,CAAC;IACtB,CAAC,KAAK,EAAE,WAAW,CAAC;IACpB,CAAC,MAAM,EAAE,YAAY,CAAC;IACtB,CAAC,KAAK,EAAE,WAAW,CAAC;IACpB,CAAC,IAAI,EAAE,6BAA6B,CAAC;IACrC,CAAC,MAAM,EAAE,6BAA6B,CAAC;IACvC,CAAC,KAAK,EAAE,6BAA6B,CAAC;IACtC,CAAC,KAAK,EAAE,8BAA8B,CAAC;IACvC,CAAC,KAAK,EAAE,aAAa,CAAC;IACtB,CAAC,KAAK,EAAE,8BAA8B,CAAC;IACvC,CAAC,KAAK,EAAE,8BAA8B,CAAC;IACvC,CAAC,KAAK,EAAE,uBAAuB,CAAC;IAChC,CAAC,IAAI,EAAE,qCAAqC,CAAC;IAC7C,CAAC,KAAK,EAAE,WAAW,CAAC;IACpB,CAAC,KAAK,EAAE,sCAAsC,CAAC;IAC/C,CAAC,KAAK,EAAE,8BAA8B,CAAC;IACvC,CAAC,KAAK,EAAE,0BAA0B,CAAC;IACnC,CAAC,OAAO,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0,0 +1,4 @@
export { DragOverlay } from './DragOverlay';
export type { Props } from './DragOverlay';
export { defaultDropAnimation, defaultDropAnimationSideEffects } from './hooks';
export type { DropAnimation, DropAnimationFunction, DropAnimationFunctionArguments, DropAnimationKeyframeResolver, DropAnimationSideEffects, } from './hooks';
@@ -0,0 +1 @@
{"name":"end-of-stream","version":"1.4.5","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532099722,"integrity":"sha512-tSuhQwQoEtbdEDGhKUav3bbo+Ou8cWnFnBONFqr8XiYarpL+ax6pSj2A450kFcSyGXEO9Gk5ot8TXbJKDPcS+w==","mode":420,"size":1078},"index.js":{"checkedAt":1794532099930,"integrity":"sha512-fRIGRvC/YHgz9kAxaGCQAqwMsHlpRn35B7zypV4Vna01DdobhHgmwQJT1KQEYLnGSPha7/Y9XRT0aXxHtrPcvw==","mode":420,"size":2739},"package.json":{"checkedAt":1794532099930,"integrity":"sha512-p/i5Yt9m2Px6/ZPBaU5Ys7kqKdhNQ6bhkz/v+bugBbSzUnOHrCGaEkHHNk2le7QrOt6aV16/onihomqtIJ6sBg==","mode":420,"size":777},"README.md":{"checkedAt":1794532099930,"integrity":"sha512-4PFBMrAIXHNJMCPuhJAD2VEW6UBQf11Hcamh1hI0nsc/D9okRWVaoNe0dme2aIsltUVDoNsPzWYfxmd/qvTTBg==","mode":420,"size":1701}}}
@@ -0,0 +1,269 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const adjacent_overload_signatures_1 = __importDefault(require("./adjacent-overload-signatures"));
const array_type_1 = __importDefault(require("./array-type"));
const await_thenable_1 = __importDefault(require("./await-thenable"));
const ban_ts_comment_1 = __importDefault(require("./ban-ts-comment"));
const ban_tslint_comment_1 = __importDefault(require("./ban-tslint-comment"));
const class_literal_property_style_1 = __importDefault(require("./class-literal-property-style"));
const class_methods_use_this_1 = __importDefault(require("./class-methods-use-this"));
const consistent_generic_constructors_1 = __importDefault(require("./consistent-generic-constructors"));
const consistent_indexed_object_style_1 = __importDefault(require("./consistent-indexed-object-style"));
const consistent_return_1 = __importDefault(require("./consistent-return"));
const consistent_type_assertions_1 = __importDefault(require("./consistent-type-assertions"));
const consistent_type_definitions_1 = __importDefault(require("./consistent-type-definitions"));
const consistent_type_exports_1 = __importDefault(require("./consistent-type-exports"));
const consistent_type_imports_1 = __importDefault(require("./consistent-type-imports"));
const default_param_last_1 = __importDefault(require("./default-param-last"));
const dot_notation_1 = __importDefault(require("./dot-notation"));
const explicit_function_return_type_1 = __importDefault(require("./explicit-function-return-type"));
const explicit_member_accessibility_1 = __importDefault(require("./explicit-member-accessibility"));
const explicit_module_boundary_types_1 = __importDefault(require("./explicit-module-boundary-types"));
const init_declarations_1 = __importDefault(require("./init-declarations"));
const max_params_1 = __importDefault(require("./max-params"));
const member_ordering_1 = __importDefault(require("./member-ordering"));
const method_signature_style_1 = __importDefault(require("./method-signature-style"));
const naming_convention_1 = __importDefault(require("./naming-convention"));
const no_array_constructor_1 = __importDefault(require("./no-array-constructor"));
const no_array_delete_1 = __importDefault(require("./no-array-delete"));
const no_base_to_string_1 = __importDefault(require("./no-base-to-string"));
const no_confusing_non_null_assertion_1 = __importDefault(require("./no-confusing-non-null-assertion"));
const no_confusing_void_expression_1 = __importDefault(require("./no-confusing-void-expression"));
const no_deprecated_1 = __importDefault(require("./no-deprecated"));
const no_dupe_class_members_1 = __importDefault(require("./no-dupe-class-members"));
const no_duplicate_enum_values_1 = __importDefault(require("./no-duplicate-enum-values"));
const no_duplicate_type_constituents_1 = __importDefault(require("./no-duplicate-type-constituents"));
const no_dynamic_delete_1 = __importDefault(require("./no-dynamic-delete"));
const no_empty_function_1 = __importDefault(require("./no-empty-function"));
const no_empty_interface_1 = __importDefault(require("./no-empty-interface"));
const no_empty_object_type_1 = __importDefault(require("./no-empty-object-type"));
const no_explicit_any_1 = __importDefault(require("./no-explicit-any"));
const no_extra_non_null_assertion_1 = __importDefault(require("./no-extra-non-null-assertion"));
const no_extraneous_class_1 = __importDefault(require("./no-extraneous-class"));
const no_floating_promises_1 = __importDefault(require("./no-floating-promises"));
const no_for_in_array_1 = __importDefault(require("./no-for-in-array"));
const no_implied_eval_1 = __importDefault(require("./no-implied-eval"));
const no_import_type_side_effects_1 = __importDefault(require("./no-import-type-side-effects"));
const no_inferrable_types_1 = __importDefault(require("./no-inferrable-types"));
const no_invalid_this_1 = __importDefault(require("./no-invalid-this"));
const no_invalid_void_type_1 = __importDefault(require("./no-invalid-void-type"));
const no_loop_func_1 = __importDefault(require("./no-loop-func"));
const no_loss_of_precision_1 = __importDefault(require("./no-loss-of-precision"));
const no_magic_numbers_1 = __importDefault(require("./no-magic-numbers"));
const no_meaningless_void_operator_1 = __importDefault(require("./no-meaningless-void-operator"));
const no_misused_new_1 = __importDefault(require("./no-misused-new"));
const no_misused_promises_1 = __importDefault(require("./no-misused-promises"));
const no_misused_spread_1 = __importDefault(require("./no-misused-spread"));
const no_mixed_enums_1 = __importDefault(require("./no-mixed-enums"));
const no_namespace_1 = __importDefault(require("./no-namespace"));
const no_non_null_asserted_nullish_coalescing_1 = __importDefault(require("./no-non-null-asserted-nullish-coalescing"));
const no_non_null_asserted_optional_chain_1 = __importDefault(require("./no-non-null-asserted-optional-chain"));
const no_non_null_assertion_1 = __importDefault(require("./no-non-null-assertion"));
const no_redeclare_1 = __importDefault(require("./no-redeclare"));
const no_redundant_type_constituents_1 = __importDefault(require("./no-redundant-type-constituents"));
const no_require_imports_1 = __importDefault(require("./no-require-imports"));
const no_restricted_imports_1 = __importDefault(require("./no-restricted-imports"));
const no_restricted_types_1 = __importDefault(require("./no-restricted-types"));
const no_shadow_1 = __importDefault(require("./no-shadow"));
const no_this_alias_1 = __importDefault(require("./no-this-alias"));
const no_type_alias_1 = __importDefault(require("./no-type-alias"));
const no_unnecessary_boolean_literal_compare_1 = __importDefault(require("./no-unnecessary-boolean-literal-compare"));
const no_unnecessary_condition_1 = __importDefault(require("./no-unnecessary-condition"));
const no_unnecessary_parameter_property_assignment_1 = __importDefault(require("./no-unnecessary-parameter-property-assignment"));
const no_unnecessary_qualifier_1 = __importDefault(require("./no-unnecessary-qualifier"));
const no_unnecessary_template_expression_1 = __importDefault(require("./no-unnecessary-template-expression"));
const no_unnecessary_type_arguments_1 = __importDefault(require("./no-unnecessary-type-arguments"));
const no_unnecessary_type_assertion_1 = __importDefault(require("./no-unnecessary-type-assertion"));
const no_unnecessary_type_constraint_1 = __importDefault(require("./no-unnecessary-type-constraint"));
const no_unnecessary_type_conversion_1 = __importDefault(require("./no-unnecessary-type-conversion"));
const no_unnecessary_type_parameters_1 = __importDefault(require("./no-unnecessary-type-parameters"));
const no_unsafe_argument_1 = __importDefault(require("./no-unsafe-argument"));
const no_unsafe_assignment_1 = __importDefault(require("./no-unsafe-assignment"));
const no_unsafe_call_1 = __importDefault(require("./no-unsafe-call"));
const no_unsafe_declaration_merging_1 = __importDefault(require("./no-unsafe-declaration-merging"));
const no_unsafe_enum_comparison_1 = __importDefault(require("./no-unsafe-enum-comparison"));
const no_unsafe_function_type_1 = __importDefault(require("./no-unsafe-function-type"));
const no_unsafe_member_access_1 = __importDefault(require("./no-unsafe-member-access"));
const no_unsafe_return_1 = __importDefault(require("./no-unsafe-return"));
const no_unsafe_type_assertion_1 = __importDefault(require("./no-unsafe-type-assertion"));
const no_unsafe_unary_minus_1 = __importDefault(require("./no-unsafe-unary-minus"));
const no_unused_expressions_1 = __importDefault(require("./no-unused-expressions"));
const no_unused_vars_1 = __importDefault(require("./no-unused-vars"));
const no_use_before_define_1 = __importDefault(require("./no-use-before-define"));
const no_useless_constructor_1 = __importDefault(require("./no-useless-constructor"));
const no_useless_empty_export_1 = __importDefault(require("./no-useless-empty-export"));
const no_var_requires_1 = __importDefault(require("./no-var-requires"));
const no_wrapper_object_types_1 = __importDefault(require("./no-wrapper-object-types"));
const non_nullable_type_assertion_style_1 = __importDefault(require("./non-nullable-type-assertion-style"));
const only_throw_error_1 = __importDefault(require("./only-throw-error"));
const parameter_properties_1 = __importDefault(require("./parameter-properties"));
const prefer_as_const_1 = __importDefault(require("./prefer-as-const"));
const prefer_destructuring_1 = __importDefault(require("./prefer-destructuring"));
const prefer_enum_initializers_1 = __importDefault(require("./prefer-enum-initializers"));
const prefer_find_1 = __importDefault(require("./prefer-find"));
const prefer_for_of_1 = __importDefault(require("./prefer-for-of"));
const prefer_function_type_1 = __importDefault(require("./prefer-function-type"));
const prefer_includes_1 = __importDefault(require("./prefer-includes"));
const prefer_literal_enum_member_1 = __importDefault(require("./prefer-literal-enum-member"));
const prefer_namespace_keyword_1 = __importDefault(require("./prefer-namespace-keyword"));
const prefer_nullish_coalescing_1 = __importDefault(require("./prefer-nullish-coalescing"));
const prefer_optional_chain_1 = __importDefault(require("./prefer-optional-chain"));
const prefer_promise_reject_errors_1 = __importDefault(require("./prefer-promise-reject-errors"));
const prefer_readonly_1 = __importDefault(require("./prefer-readonly"));
const prefer_readonly_parameter_types_1 = __importDefault(require("./prefer-readonly-parameter-types"));
const prefer_reduce_type_parameter_1 = __importDefault(require("./prefer-reduce-type-parameter"));
const prefer_regexp_exec_1 = __importDefault(require("./prefer-regexp-exec"));
const prefer_return_this_type_1 = __importDefault(require("./prefer-return-this-type"));
const prefer_string_starts_ends_with_1 = __importDefault(require("./prefer-string-starts-ends-with"));
const prefer_ts_expect_error_1 = __importDefault(require("./prefer-ts-expect-error"));
const promise_function_async_1 = __importDefault(require("./promise-function-async"));
const related_getter_setter_pairs_1 = __importDefault(require("./related-getter-setter-pairs"));
const require_array_sort_compare_1 = __importDefault(require("./require-array-sort-compare"));
const require_await_1 = __importDefault(require("./require-await"));
const restrict_plus_operands_1 = __importDefault(require("./restrict-plus-operands"));
const restrict_template_expressions_1 = __importDefault(require("./restrict-template-expressions"));
const return_await_1 = __importDefault(require("./return-await"));
const sort_type_constituents_1 = __importDefault(require("./sort-type-constituents"));
const strict_boolean_expressions_1 = __importDefault(require("./strict-boolean-expressions"));
const switch_exhaustiveness_check_1 = __importDefault(require("./switch-exhaustiveness-check"));
const triple_slash_reference_1 = __importDefault(require("./triple-slash-reference"));
const typedef_1 = __importDefault(require("./typedef"));
const unbound_method_1 = __importDefault(require("./unbound-method"));
const unified_signatures_1 = __importDefault(require("./unified-signatures"));
const use_unknown_in_catch_callback_variable_1 = __importDefault(require("./use-unknown-in-catch-callback-variable"));
const rules = {
'adjacent-overload-signatures': adjacent_overload_signatures_1.default,
'array-type': array_type_1.default,
'await-thenable': await_thenable_1.default,
'ban-ts-comment': ban_ts_comment_1.default,
'ban-tslint-comment': ban_tslint_comment_1.default,
'class-literal-property-style': class_literal_property_style_1.default,
'class-methods-use-this': class_methods_use_this_1.default,
'consistent-generic-constructors': consistent_generic_constructors_1.default,
'consistent-indexed-object-style': consistent_indexed_object_style_1.default,
'consistent-return': consistent_return_1.default,
'consistent-type-assertions': consistent_type_assertions_1.default,
'consistent-type-definitions': consistent_type_definitions_1.default,
'consistent-type-exports': consistent_type_exports_1.default,
'consistent-type-imports': consistent_type_imports_1.default,
'default-param-last': default_param_last_1.default,
'dot-notation': dot_notation_1.default,
'explicit-function-return-type': explicit_function_return_type_1.default,
'explicit-member-accessibility': explicit_member_accessibility_1.default,
'explicit-module-boundary-types': explicit_module_boundary_types_1.default,
'init-declarations': init_declarations_1.default,
'max-params': max_params_1.default,
'member-ordering': member_ordering_1.default,
'method-signature-style': method_signature_style_1.default,
'naming-convention': naming_convention_1.default,
'no-array-constructor': no_array_constructor_1.default,
'no-array-delete': no_array_delete_1.default,
'no-base-to-string': no_base_to_string_1.default,
'no-confusing-non-null-assertion': no_confusing_non_null_assertion_1.default,
'no-confusing-void-expression': no_confusing_void_expression_1.default,
'no-deprecated': no_deprecated_1.default,
'no-dupe-class-members': no_dupe_class_members_1.default,
'no-duplicate-enum-values': no_duplicate_enum_values_1.default,
'no-duplicate-type-constituents': no_duplicate_type_constituents_1.default,
'no-dynamic-delete': no_dynamic_delete_1.default,
'no-empty-function': no_empty_function_1.default,
'no-empty-interface': no_empty_interface_1.default,
'no-empty-object-type': no_empty_object_type_1.default,
'no-explicit-any': no_explicit_any_1.default,
'no-extra-non-null-assertion': no_extra_non_null_assertion_1.default,
'no-extraneous-class': no_extraneous_class_1.default,
'no-floating-promises': no_floating_promises_1.default,
'no-for-in-array': no_for_in_array_1.default,
'no-implied-eval': no_implied_eval_1.default,
'no-import-type-side-effects': no_import_type_side_effects_1.default,
'no-inferrable-types': no_inferrable_types_1.default,
'no-invalid-this': no_invalid_this_1.default,
'no-invalid-void-type': no_invalid_void_type_1.default,
'no-loop-func': no_loop_func_1.default,
'no-loss-of-precision': no_loss_of_precision_1.default,
'no-magic-numbers': no_magic_numbers_1.default,
'no-meaningless-void-operator': no_meaningless_void_operator_1.default,
'no-misused-new': no_misused_new_1.default,
'no-misused-promises': no_misused_promises_1.default,
'no-misused-spread': no_misused_spread_1.default,
'no-mixed-enums': no_mixed_enums_1.default,
'no-namespace': no_namespace_1.default,
'no-non-null-asserted-nullish-coalescing': no_non_null_asserted_nullish_coalescing_1.default,
'no-non-null-asserted-optional-chain': no_non_null_asserted_optional_chain_1.default,
'no-non-null-assertion': no_non_null_assertion_1.default,
'no-redeclare': no_redeclare_1.default,
'no-redundant-type-constituents': no_redundant_type_constituents_1.default,
'no-require-imports': no_require_imports_1.default,
'no-restricted-imports': no_restricted_imports_1.default,
'no-restricted-types': no_restricted_types_1.default,
'no-shadow': no_shadow_1.default,
'no-this-alias': no_this_alias_1.default,
'no-type-alias': no_type_alias_1.default,
'no-unnecessary-boolean-literal-compare': no_unnecessary_boolean_literal_compare_1.default,
'no-unnecessary-condition': no_unnecessary_condition_1.default,
'no-unnecessary-parameter-property-assignment': no_unnecessary_parameter_property_assignment_1.default,
'no-unnecessary-qualifier': no_unnecessary_qualifier_1.default,
'no-unnecessary-template-expression': no_unnecessary_template_expression_1.default,
'no-unnecessary-type-arguments': no_unnecessary_type_arguments_1.default,
'no-unnecessary-type-assertion': no_unnecessary_type_assertion_1.default,
'no-unnecessary-type-constraint': no_unnecessary_type_constraint_1.default,
'no-unnecessary-type-conversion': no_unnecessary_type_conversion_1.default,
'no-unnecessary-type-parameters': no_unnecessary_type_parameters_1.default,
'no-unsafe-argument': no_unsafe_argument_1.default,
'no-unsafe-assignment': no_unsafe_assignment_1.default,
'no-unsafe-call': no_unsafe_call_1.default,
'no-unsafe-declaration-merging': no_unsafe_declaration_merging_1.default,
'no-unsafe-enum-comparison': no_unsafe_enum_comparison_1.default,
'no-unsafe-function-type': no_unsafe_function_type_1.default,
'no-unsafe-member-access': no_unsafe_member_access_1.default,
'no-unsafe-return': no_unsafe_return_1.default,
'no-unsafe-type-assertion': no_unsafe_type_assertion_1.default,
'no-unsafe-unary-minus': no_unsafe_unary_minus_1.default,
'no-unused-expressions': no_unused_expressions_1.default,
'no-unused-vars': no_unused_vars_1.default,
'no-use-before-define': no_use_before_define_1.default,
'no-useless-constructor': no_useless_constructor_1.default,
'no-useless-empty-export': no_useless_empty_export_1.default,
'no-var-requires': no_var_requires_1.default,
'no-wrapper-object-types': no_wrapper_object_types_1.default,
'non-nullable-type-assertion-style': non_nullable_type_assertion_style_1.default,
'only-throw-error': only_throw_error_1.default,
'parameter-properties': parameter_properties_1.default,
'prefer-as-const': prefer_as_const_1.default,
'prefer-destructuring': prefer_destructuring_1.default,
'prefer-enum-initializers': prefer_enum_initializers_1.default,
'prefer-find': prefer_find_1.default,
'prefer-for-of': prefer_for_of_1.default,
'prefer-function-type': prefer_function_type_1.default,
'prefer-includes': prefer_includes_1.default,
'prefer-literal-enum-member': prefer_literal_enum_member_1.default,
'prefer-namespace-keyword': prefer_namespace_keyword_1.default,
'prefer-nullish-coalescing': prefer_nullish_coalescing_1.default,
'prefer-optional-chain': prefer_optional_chain_1.default,
'prefer-promise-reject-errors': prefer_promise_reject_errors_1.default,
'prefer-readonly': prefer_readonly_1.default,
'prefer-readonly-parameter-types': prefer_readonly_parameter_types_1.default,
'prefer-reduce-type-parameter': prefer_reduce_type_parameter_1.default,
'prefer-regexp-exec': prefer_regexp_exec_1.default,
'prefer-return-this-type': prefer_return_this_type_1.default,
'prefer-string-starts-ends-with': prefer_string_starts_ends_with_1.default,
'prefer-ts-expect-error': prefer_ts_expect_error_1.default,
'promise-function-async': promise_function_async_1.default,
'related-getter-setter-pairs': related_getter_setter_pairs_1.default,
'require-array-sort-compare': require_array_sort_compare_1.default,
'require-await': require_await_1.default,
'restrict-plus-operands': restrict_plus_operands_1.default,
'restrict-template-expressions': restrict_template_expressions_1.default,
'return-await': return_await_1.default,
'sort-type-constituents': sort_type_constituents_1.default,
'strict-boolean-expressions': strict_boolean_expressions_1.default,
'switch-exhaustiveness-check': switch_exhaustiveness_check_1.default,
'triple-slash-reference': triple_slash_reference_1.default,
typedef: typedef_1.default,
'unbound-method': unbound_method_1.default,
'unified-signatures': unified_signatures_1.default,
'use-unknown-in-catch-callback-variable': use_unknown_in_catch_callback_variable_1.default,
};
module.exports = rules;
@@ -0,0 +1,22 @@
{
"name": "goober.macro",
"version": "1.0.0",
"description": "A babel macro for goober, rewriting styled.div to styled('div') calls",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/cristianbote/goober.git",
"directory": "macro"
},
"author": "Hadeeb Farhan <hadeebfarhan1@gmail.com>",
"keywords": [
"babel-plugin-macros",
"goober",
"styled"
],
"license": "MIT",
"peerDependencies": {
"@babel/helper-module-imports": "^7.8.3",
"babel-plugin-macros": "^2.8.0"
}
}
@@ -0,0 +1,32 @@
// src/mail.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var MailIcon = (props) => /* @__PURE__ */ jsx(
"svg",
{
"aria-hidden": "true",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: /* @__PURE__ */ jsxs(
"g",
{
fill: "none",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5,
children: [
/* @__PURE__ */ jsx("path", { d: "M12 20.5H7c-3 0-5-1.5-5-5v-7c0-3.5 2-5 5-5h10c3 0 5 1.5 5 5v3" }),
/* @__PURE__ */ jsx("path", { d: "M17 9l-3.13 2.5a3.166 3.166 0 01-3.75 0L7 9M19.21 14.77l-3.539 3.54a1.232 1.232 0 00-.3.59l-.19 1.35a.635.635 0 00.76.76l1.35-.19a1.189 1.189 0 00.59-.3l3.54-3.54a1.365 1.365 0 000-2.22 1.361 1.361 0 00-2.211.01zM18.7 15.28a3.185 3.185 0 002.22 2.22" })
]
}
)
}
);
export {
MailIcon
};
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClassFieldInitializerScope = void 0;
const ScopeBase_1 = require("./ScopeBase");
const ScopeType_1 = require("./ScopeType");
class ClassFieldInitializerScope extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.classFieldInitializer, upperScope, block, false);
}
}
exports.ClassFieldInitializerScope = ClassFieldInitializerScope;
@@ -0,0 +1,23 @@
import * as core from "../core/index.cjs";
import { type ZodError } from "./errors.cjs";
export type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
export type ZodSafeParseSuccess<T> = {
success: true;
data: T;
error?: never;
};
export type ZodSafeParseError<T> = {
success: false;
data?: never;
error: ZodError<T>;
};
export declare const parse: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>, _params?: {
callee?: core.util.AnyFunc;
Err?: core.$ZodErrorClass;
}) => core.output<T>;
export declare const parseAsync: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>, _params?: {
callee?: core.util.AnyFunc;
Err?: core.$ZodErrorClass;
}) => Promise<core.output<T>>;
export declare const safeParse: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>) => ZodSafeParseResult<core.output<T>>;
export declare const safeParseAsync: <T extends core.$ZodType>(schema: T, value: unknown, _ctx?: core.ParseContext<core.$ZodIssue>) => Promise<ZodSafeParseResult<core.output<T>>>;
@@ -0,0 +1,24 @@
var arraySample = require('./_arraySample'),
baseSample = require('./_baseSample'),
isArray = require('./isArray');
/**
* Gets a random element from `collection`.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Collection
* @param {Array|Object} collection The collection to sample.
* @returns {*} Returns the random element.
* @example
*
* _.sample([1, 2, 3, 4]);
* // => 2
*/
function sample(collection) {
var func = isArray(collection) ? arraySample : baseSample;
return func(collection);
}
module.exports = sample;
@@ -0,0 +1,42 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/console.ts
var console_exports = {};
__export(console_exports, {
warn: () => warn
});
module.exports = __toCommonJS(console_exports);
var warningStack = {};
function warn(message, component, ...args) {
const tag = component ? ` [${component}]` : " ";
const log = `[Next UI]${tag}: ${message}`;
if (typeof console === "undefined")
return;
if (warningStack[log])
return;
warningStack[log] = true;
if (process.env.NODE_ENV !== "production") {
return console.warn(log, args);
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
warn
});
@@ -0,0 +1,34 @@
'use strict';
var $TypeError = require('es-errors/type');
var GetV = require('./GetV');
var IsCallable = require('./IsCallable');
var isPropertyKey = require('../helpers/isPropertyKey');
var inspect = require('object-inspect');
// https://262.ecma-international.org/6.0/#sec-getmethod
module.exports = function GetMethod(O, P) {
// 7.3.9.1
if (!isPropertyKey(P)) {
throw new $TypeError('Assertion failed: P is not a Property Key');
}
// 7.3.9.2
var func = GetV(O, P);
// 7.3.9.4
if (func == null) {
return void 0;
}
// 7.3.9.5
if (!IsCallable(func)) {
throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));
}
// 7.3.9.6
return func;
};
@@ -0,0 +1,41 @@
import { toHash } from './toHash.js';
import { isoUint8Array } from './iso/index.js';
/**
* Go through each expected RP ID and try to find one that matches. Returns the unhashed RP ID
* that matched the hash in the response.
*
* Raises an `UnexpectedRPIDHash` error if no match is found
*/
export async function matchExpectedRPID(rpIDHash, expectedRPIDs) {
try {
const matchedRPID = await Promise.any(expectedRPIDs.map((expected) => {
return new Promise((resolve, reject) => {
toHash(isoUint8Array.fromASCIIString(expected)).then((expectedRPIDHash) => {
if (isoUint8Array.areEqual(rpIDHash, expectedRPIDHash)) {
resolve(expected);
}
else {
reject();
}
});
});
}));
return matchedRPID;
}
catch (err) {
const _err = err;
// This means no matches were found
if (_err.name === 'AggregateError') {
throw new UnexpectedRPIDHash();
}
// An unexpected error occurred
throw err;
}
}
class UnexpectedRPIDHash extends Error {
constructor() {
const message = 'Unexpected RP ID hash';
super(message);
this.name = 'UnexpectedRPIDHash';
}
}
@@ -0,0 +1,32 @@
import listCacheClear from './_listCacheClear.js';
import listCacheDelete from './_listCacheDelete.js';
import listCacheGet from './_listCacheGet.js';
import listCacheHas from './_listCacheHas.js';
import listCacheSet from './_listCacheSet.js';
/**
* Creates an list cache object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function ListCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
export default ListCache;
@@ -0,0 +1,118 @@
import type {
ThunkDispatch,
ActionCreatorWithoutPayload, // Workaround for API-Extractor
} from '@reduxjs/toolkit'
import { createAction } from './rtkImports'
export const INTERNAL_PREFIX = '__rtkq/'
const ONLINE = 'online'
const OFFLINE = 'offline'
const FOCUS = 'focus'
const FOCUSED = 'focused'
const VISIBILITYCHANGE = 'visibilitychange'
export const onFocus = /* @__PURE__ */ createAction(
`${INTERNAL_PREFIX}${FOCUSED}`,
)
export const onFocusLost = /* @__PURE__ */ createAction(
`${INTERNAL_PREFIX}un${FOCUSED}`,
)
export const onOnline = /* @__PURE__ */ createAction(
`${INTERNAL_PREFIX}${ONLINE}`,
)
export const onOffline = /* @__PURE__ */ createAction(
`${INTERNAL_PREFIX}${OFFLINE}`,
)
const actions = {
onFocus,
onFocusLost,
onOnline,
onOffline,
}
let initialized = false
/**
* A utility used to enable `refetchOnMount` and `refetchOnReconnect` behaviors.
* It requires the dispatch method from your store.
* Calling `setupListeners(store.dispatch)` will configure listeners with the recommended defaults,
* but you have the option of providing a callback for more granular control.
*
* @example
* ```ts
* setupListeners(store.dispatch)
* ```
*
* @param dispatch - The dispatch method from your store
* @param customHandler - An optional callback for more granular control over listener behavior
* @returns Return value of the handler.
* The default handler returns an `unsubscribe` method that can be called to remove the listeners.
*/
export function setupListeners(
dispatch: ThunkDispatch<any, any, any>,
customHandler?: (
dispatch: ThunkDispatch<any, any, any>,
actions: {
onFocus: typeof onFocus
onFocusLost: typeof onFocusLost
onOnline: typeof onOnline
onOffline: typeof onOffline
},
) => () => void,
) {
function defaultHandler() {
const [handleFocus, handleFocusLost, handleOnline, handleOffline] = [
onFocus,
onFocusLost,
onOnline,
onOffline,
].map((action) => () => dispatch(action()))
const handleVisibilityChange = () => {
if (window.document.visibilityState === 'visible') {
handleFocus()
} else {
handleFocusLost()
}
}
let unsubscribe = () => {
initialized = false
}
if (!initialized) {
if (typeof window !== 'undefined' && window.addEventListener) {
const handlers = {
[FOCUS]: handleFocus,
[VISIBILITYCHANGE]: handleVisibilityChange,
[ONLINE]: handleOnline,
[OFFLINE]: handleOffline,
}
function updateListeners(add: boolean) {
Object.entries(handlers).forEach(([event, handler]) => {
if (add) {
window.addEventListener(event, handler, false)
} else {
window.removeEventListener(event, handler)
}
})
}
// Handle focus events
updateListeners(true)
initialized = true
unsubscribe = () => {
updateListeners(false)
initialized = false
}
}
}
return unsubscribe
}
return customHandler ? customHandler(dispatch, actions) : defaultHandler()
}
@@ -0,0 +1,13 @@
{
"root": true,
"extends": "@ljharb",
"globals": {
"globalThis": false
},
"rules": {
"max-statements-per-line": [2, { "max": 2 }]
},
}
@@ -0,0 +1,49 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/close-filled.tsx
var close_filled_exports = {};
__export(close_filled_exports, {
CloseFilledIcon: () => CloseFilledIcon
});
module.exports = __toCommonJS(close_filled_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var CloseFilledIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"svg",
{
"aria-hidden": "true",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",
fill: "currentColor"
}
)
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
CloseFilledIcon
});
@@ -0,0 +1,7 @@
export { default as Image, ImageProps } from './image.js';
export { useImage } from './use-image.js';
import '@heroui/system';
import 'tailwind-variants';
import 'react';
import '@heroui/theme';
import '@heroui/react-utils';
@@ -0,0 +1,8 @@
"use client";
import {
card_header_default
} from "./chunk-D5XJWRAV.mjs";
import "./chunk-XHGGCEVJ.mjs";
export {
card_header_default as default
};
@@ -0,0 +1,27 @@
import React from 'react';
import type { FieldValues, FormProps } from './types';
/**
* Form component to manage submission.
*
* @param props - to setup submission detail. {@link FormProps}
*
* @returns form component or headless render prop.
*
* @example
* ```tsx
* function App() {
* const { control, formState: { errors } } = useForm();
*
* return (
* <Form action="/api" control={control}>
* <input {...register("name")} />
* <p>{errors?.root?.server && 'Server error'}</p>
* <button>Submit</button>
* </Form>
* );
* }
* ```
*/
declare function Form<TFieldValues extends FieldValues, TTransformedValues = TFieldValues>(props: FormProps<TFieldValues, TTransformedValues>): React.JSX.Element;
export { Form };
//# sourceMappingURL=form.d.ts.map
@@ -0,0 +1,20 @@
# MIT License
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,25 @@
const CoverageProviderMap = {
v8: "@vitest/coverage-v8",
istanbul: "@vitest/coverage-istanbul"
};
async function resolveCoverageProviderModule(options, loader) {
if (!options?.enabled || !options.provider) return null;
const provider = options.provider;
if (provider === "v8" || provider === "istanbul") {
let builtInModule = CoverageProviderMap[provider];
if (provider === "v8" && loader.isBrowser) builtInModule += "/browser";
const { default: coverageModule } = await loader.import(builtInModule);
if (!coverageModule) throw new Error(`Failed to load ${CoverageProviderMap[provider]}. Default export is missing.`);
return coverageModule;
}
let customProviderModule;
try {
customProviderModule = await loader.import(options.customProviderModule);
} catch (error) {
throw new Error(`Failed to load custom CoverageProviderModule from ${options.customProviderModule}`, { cause: error });
}
if (customProviderModule.default == null) throw new Error(`Custom CoverageProviderModule loaded from ${options.customProviderModule} was not the default export`);
return customProviderModule.default;
}
export { CoverageProviderMap as C, resolveCoverageProviderModule as r };
@@ -0,0 +1 @@
{"version":3,"file":"windowsConoutConnection.js","sourceRoot":"","sources":["../src/windowsConoutConnection.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iDAAwC;AAGxC,0CAAsF;AACtF,6BAA4B;AAC5B,iDAAwD;AAExD;;;;GAIG;AACH,IAAM,mBAAmB,GAAG,IAAI,CAAC;AAEjC;;;;;;;;;;;GAWG;AACH;IAQE,0BACU,eAAuB;QADjC,iBAeC;QAdS,oBAAe,GAAf,eAAe,CAAQ;QANzB,gBAAW,GAAY,KAAK,CAAC;QAE7B,aAAQ,GAAG,IAAI,6BAAa,EAAQ,CAAC;QAM3C,IAAM,UAAU,GAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;QACpE,IAAM,UAAU,GAAG,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;IACH,uBAAC;AAAD,CAAC,AAhDD,IAgDC;AAhDY,4CAAgB"}
@@ -0,0 +1 @@
{"version":3,"file":"decode-data-html.js","sourceRoot":"","sources":["../../../src/generated/decode-data-html.ts"],"names":[],"mappings":";AAAA,8CAA8C;;;AAEjC,QAAA,cAAc,GAAgC,IAAI,WAAW;AACtE,kBAAkB;AAClB,eAAe,CAAC,268CAA268C;KACt78C,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACnC,CAAC"}
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RSAES_OAEP = exports.RsaEsOaepParams = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const asn1_x509_1 = require("@peculiar/asn1-x509");
const object_identifiers_1 = require("../object_identifiers");
const algorithms_1 = require("../algorithms");
class RsaEsOaepParams {
constructor(params = {}) {
this.hashAlgorithm = new asn1_x509_1.AlgorithmIdentifier(algorithms_1.sha1);
this.maskGenAlgorithm = new asn1_x509_1.AlgorithmIdentifier({
algorithm: object_identifiers_1.id_mgf1,
parameters: asn1_schema_1.AsnConvert.serialize(algorithms_1.sha1),
});
this.pSourceAlgorithm = new asn1_x509_1.AlgorithmIdentifier(algorithms_1.pSpecifiedEmpty);
Object.assign(this, params);
}
}
exports.RsaEsOaepParams = RsaEsOaepParams;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.AlgorithmIdentifier, context: 0, defaultValue: algorithms_1.sha1 })
], RsaEsOaepParams.prototype, "hashAlgorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.AlgorithmIdentifier, context: 1, defaultValue: algorithms_1.mgf1SHA1 })
], RsaEsOaepParams.prototype, "maskGenAlgorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.AlgorithmIdentifier, context: 2, defaultValue: algorithms_1.pSpecifiedEmpty })
], RsaEsOaepParams.prototype, "pSourceAlgorithm", void 0);
exports.RSAES_OAEP = new asn1_x509_1.AlgorithmIdentifier({
algorithm: object_identifiers_1.id_RSAES_OAEP,
parameters: asn1_schema_1.AsnConvert.serialize(new RsaEsOaepParams()),
});
@@ -0,0 +1,85 @@
export declare namespace util {
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
export type isAny<T> = 0 extends 1 & T ? true : false;
export const assertEqual: <A, B>(_: AssertEqual<A, B>) => void;
export function assertIs<T>(_arg: T): void;
export function assertNever(_x: never): never;
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
export type InexactPartial<T> = {
[k in keyof T]?: T[k] | undefined;
};
export const arrayToEnum: <T extends string, U extends [T, ...T[]]>(items: U) => { [k in U[number]]: k; };
export const getValidEnumValues: (obj: any) => any[];
export const objectValues: (obj: any) => any[];
export const objectKeys: ObjectConstructor["keys"];
export const find: <T>(arr: T[], checker: (arg: T) => any) => T | undefined;
export type identity<T> = objectUtil.identity<T>;
export type flatten<T> = objectUtil.flatten<T>;
export type noUndefined<T> = T extends undefined ? never : T;
export const isInteger: NumberConstructor["isInteger"];
export function joinValues<T extends any[]>(array: T, separator?: string): string;
export const jsonStringifyReplacer: (_: string, value: any) => any;
export {};
}
export declare namespace objectUtil {
export type MergeShapes<U, V> = keyof U & keyof V extends never ? U & V : {
[k in Exclude<keyof U, keyof V>]: U[k];
} & V;
type optionalKeys<T extends object> = {
[k in keyof T]: undefined extends T[k] ? k : never;
}[keyof T];
type requiredKeys<T extends object> = {
[k in keyof T]: undefined extends T[k] ? never : k;
}[keyof T];
export type addQuestionMarks<T extends object, _O = any> = {
[K in requiredKeys<T>]: T[K];
} & {
[K in optionalKeys<T>]?: T[K];
} & {
[k in keyof T]?: unknown;
};
export type identity<T> = T;
export type flatten<T> = identity<{
[k in keyof T]: T[k];
}>;
export type noNeverKeys<T> = {
[k in keyof T]: [T[k]] extends [never] ? never : k;
}[keyof T];
export type noNever<T> = identity<{
[k in noNeverKeys<T>]: k extends keyof T ? T[k] : never;
}>;
export const mergeShapes: <U, T>(first: U, second: T) => T & U;
export type extendShape<A extends object, B extends object> = keyof A & keyof B extends never ? A & B : {
[K in keyof A as K extends keyof B ? never : K]: A[K];
} & {
[K in keyof B]: B[K];
};
export {};
}
export declare const ZodParsedType: {
string: "string";
nan: "nan";
number: "number";
integer: "integer";
float: "float";
boolean: "boolean";
date: "date";
bigint: "bigint";
symbol: "symbol";
function: "function";
undefined: "undefined";
null: "null";
array: "array";
object: "object";
unknown: "unknown";
promise: "promise";
void: "void";
never: "never";
map: "map";
set: "set";
};
export type ZodParsedType = keyof typeof ZodParsedType;
export declare const getParsedType: (data: any) => ZodParsedType;
@@ -0,0 +1,12 @@
export declare class PathCache {
useCache: boolean;
existsCache: Map<string, boolean>;
absoluteCache: Map<string, string>;
fileExtensions: string[];
constructor(useCache: boolean, fileExtensions?: string[]);
existsResolvedAlias(path: string): boolean;
getAbsoluteAliasPath(basePath: string, aliasPath: string): string;
private getCacheKey;
private getAAP;
private exists;
}
@@ -0,0 +1 @@
{"version":3,"file":"MaybeClassElementMetadata.d.ts","sourceRoot":"","sources":["../../../../src/metadata/models/MaybeClassElementMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF,MAAM,MAAM,yBAAyB,GACjC,2BAA2B,GAC3B,gCAAgC,GAChC,6BAA6B,CAAC"}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more