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,80 @@
"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/components/drip.ts
var drip_exports = {};
__export(drip_exports, {
drip: () => drip
});
module.exports = __toCommonJS(drip_exports);
// src/utils/tv.ts
var import_tailwind_variants = require("tailwind-variants");
// src/utils/tw-merge-config.ts
var COMMON_UNITS = ["small", "medium", "large"];
var twMergeConfig = {
theme: {
opacity: ["disabled"],
spacing: ["divider"],
borderWidth: COMMON_UNITS,
borderRadius: COMMON_UNITS
},
classGroups: {
shadow: [{ shadow: COMMON_UNITS }],
"font-size": [{ text: ["tiny", ...COMMON_UNITS] }],
"bg-image": [
"bg-stripe-gradient-default",
"bg-stripe-gradient-primary",
"bg-stripe-gradient-secondary",
"bg-stripe-gradient-success",
"bg-stripe-gradient-warning",
"bg-stripe-gradient-danger"
]
}
};
// src/utils/tv.ts
var tv = (options, config) => {
var _a, _b, _c;
return (0, import_tailwind_variants.tv)(options, {
...config,
twMerge: (_a = config == null ? void 0 : config.twMerge) != null ? _a : true,
twMergeConfig: {
...config == null ? void 0 : config.twMergeConfig,
theme: {
...(_b = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _b.theme,
...twMergeConfig.theme
},
classGroups: {
...(_c = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _c.classGroups,
...twMergeConfig.classGroups
}
}
});
};
// src/components/drip.ts
var drip = tv({
base: ["absolute", "will-change-transform", "bg-current", "rounded-full", "animate-drip-expand"]
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
drip
});
@@ -0,0 +1,5 @@
import { useLayoutEffect } from 'react';
declare const useSafeLayoutEffect: typeof useLayoutEffect;
export { useSafeLayoutEffect };
@@ -0,0 +1,41 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.analyze = analyze;
const visitor_keys_1 = require("@typescript-eslint/visitor-keys");
const referencer_1 = require("./referencer");
const ScopeManager_1 = require("./ScopeManager");
const DEFAULT_OPTIONS = {
childVisitorKeys: visitor_keys_1.visitorKeys,
emitDecoratorMetadata: false,
globalReturn: false,
impliedStrict: false,
jsxFragmentName: null,
jsxPragma: 'React',
lib: ['es2018'],
sourceType: 'script',
};
/**
* Takes an AST and returns the analyzed scopes.
*/
function analyze(tree, providedOptions) {
const options = {
childVisitorKeys: providedOptions?.childVisitorKeys ?? DEFAULT_OPTIONS.childVisitorKeys,
emitDecoratorMetadata: false,
globalReturn: providedOptions?.globalReturn ?? DEFAULT_OPTIONS.globalReturn,
impliedStrict: providedOptions?.impliedStrict ?? DEFAULT_OPTIONS.impliedStrict,
jsxFragmentName: providedOptions?.jsxFragmentName ?? DEFAULT_OPTIONS.jsxFragmentName,
jsxPragma:
// eslint-disable-next-line @typescript-eslint/internal/eqeq-nullish
providedOptions?.jsxPragma === undefined
? DEFAULT_OPTIONS.jsxPragma
: providedOptions.jsxPragma,
lib: providedOptions?.lib ?? ['esnext'],
sourceType: providedOptions?.sourceType ?? DEFAULT_OPTIONS.sourceType,
};
// ensure the option is lower cased
options.lib = options.lib.map(l => l.toLowerCase());
const scopeManager = new ScopeManager_1.ScopeManager(options);
const referencer = new referencer_1.Referencer(options, scopeManager);
referencer.visit(tree);
return scopeManager;
}
@@ -0,0 +1,39 @@
// Central Atlas Tamazight Latin [tzm-latn]
import dayjs from '../index';
var locale = {
name: 'tzm-latn',
weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
weekStart: 6,
weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
ordinal: function ordinal(n) {
return n;
},
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: 'dadkh s yan %s',
past: 'yan %s',
s: 'imik',
m: 'minuḍ',
mm: '%d minuḍ',
h: 'saɛa',
hh: '%d tassaɛin',
d: 'ass',
dd: '%d ossan',
M: 'ayowr',
MM: '%d iyyirn',
y: 'asgas',
yy: '%d isgasn'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1 @@
{"version":3,"file":"cloneConstantValueBinding.d.ts","sourceRoot":"","sources":["../../../../src/binding/calculations/cloneConstantValueBinding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAGtE;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAClD,OAAO,EAAE,oBAAoB,CAAC,UAAU,CAAC,GACxC,oBAAoB,CAAC,UAAU,CAAC,CAclC"}
@@ -0,0 +1,6 @@
module.exports = {
"longPressMessage": `H\xe5ll nedtryckt eller tryck p\xe5 Alt + pil ned\xe5t f\xf6r att \xf6ppna menyn`
};
//# sourceMappingURL=sv-SE.main.js.map
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2016_full: LibDefinition;
@@ -0,0 +1 @@
{"version":3,"file":"isUndefined.d.ts","sourceRoot":"","sources":["../../src/utils/isUndefined.ts"],"names":[],"mappings":"yBAAgB,KAAK,OAAO,KAAG,GAAG,IAAI,SAAS;AAA/C,wBAAqE"}
@@ -0,0 +1 @@
{"version":3,"names":["_t","require","_helpersGenerated","cloneNode","identifier","deep","obj","path","value","parts","split","last","shift","length","arguments","e","message","permuteHelperAST","ast","metadata","bindingName","localBindings","getDependency","adjustAst","locals","dependencies","exportBindingAssignments","exportName","bindings","Set","add","name","paths","Object","entries","o","keys","map","k","newName","has","ref","forEach","p","helperData","create","loadHelper","helper","helpers","assign","ReferenceError","code","minVersion","build","nodes","body","globals","getDependencies","get","id","type","undefined","isInternal","_helpers$name","internal","exports","ensure","list","replace","_default","default"],"sources":["../src/index.ts"],"sourcesContent":["import { cloneNode, identifier } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport helpers from \"./helpers-generated.ts\";\nimport type { HelperMetadata } from \"./helpers-generated.ts\";\n\ntype GetDependency = (name: string) => t.Expression;\n\nfunction deep(obj: any, path: string, value?: unknown) {\n try {\n const parts = path.split(\".\");\n let last = parts.shift();\n while (parts.length > 0) {\n obj = obj[last];\n last = parts.shift();\n }\n if (arguments.length > 2) {\n obj[last] = value;\n } else {\n return obj[last];\n }\n } catch (e) {\n e.message += ` (when accessing ${path})`;\n throw e;\n }\n}\n\ntype AdjustAst = (\n ast: t.Program,\n exportName: string,\n mapExportBindingAssignments: (\n map: (node: t.Expression) => t.Expression,\n ) => void,\n) => void;\n\n/**\n * Given a helper AST and information about how it will be used, update the AST to match the usage.\n */\nfunction permuteHelperAST(\n ast: t.Program,\n metadata: HelperMetadata,\n bindingName: string | undefined,\n localBindings: string[] | undefined,\n getDependency: GetDependency | undefined,\n adjustAst: AdjustAst | undefined,\n) {\n const { locals, dependencies, exportBindingAssignments, exportName } =\n metadata;\n\n const bindings = new Set(localBindings || []);\n if (bindingName) bindings.add(bindingName);\n for (const [name, paths] of Object.entries(locals)) {\n let newName = name;\n if (bindingName && name === exportName) {\n newName = bindingName;\n } else {\n while (bindings.has(newName)) newName = \"_\" + newName;\n }\n\n if (newName !== name) {\n for (const path of paths) {\n deep(ast, path, identifier(newName));\n }\n }\n }\n\n for (const [name, paths] of Object.entries(dependencies)) {\n const ref =\n (typeof getDependency === \"function\" && getDependency(name)) ||\n identifier(name);\n for (const path of paths) {\n deep(ast, path, cloneNode(ref));\n }\n }\n\n adjustAst?.(ast, exportName, map => {\n exportBindingAssignments.forEach(p => deep(ast, p, map(deep(ast, p))));\n });\n}\n\ninterface HelperData {\n build: (\n getDependency: GetDependency | undefined,\n bindingName: string | undefined,\n localBindings: string[] | undefined,\n adjustAst: AdjustAst | undefined,\n ) => {\n nodes: t.Program[\"body\"];\n globals: string[];\n };\n minVersion: string;\n getDependencies: () => string[];\n}\n\nconst helperData: Record<string, HelperData> = Object.create(null);\nfunction loadHelper(name: string) {\n if (!helperData[name]) {\n const helper = helpers[name];\n if (!helper) {\n throw Object.assign(new ReferenceError(`Unknown helper ${name}`), {\n code: \"BABEL_HELPER_UNKNOWN\",\n helper: name,\n });\n }\n\n helperData[name] = {\n minVersion: helper.minVersion,\n build(getDependency, bindingName, localBindings, adjustAst) {\n const ast = helper.ast();\n permuteHelperAST(\n ast,\n helper.metadata,\n bindingName,\n localBindings,\n getDependency,\n adjustAst,\n );\n\n return {\n nodes: ast.body,\n globals: helper.metadata.globals,\n };\n },\n getDependencies() {\n return Object.keys(helper.metadata.dependencies);\n },\n };\n }\n\n return helperData[name];\n}\n\nexport function get(\n name: string,\n getDependency?: GetDependency,\n bindingName?: string,\n localBindings?: string[],\n adjustAst?: AdjustAst,\n) {\n if (!process.env.BABEL_8_BREAKING) {\n // In older versions, bindingName was a t.Identifier | t.MemberExpression\n if (typeof bindingName === \"object\") {\n const id = bindingName as t.Identifier | t.MemberExpression | null;\n if (id?.type === \"Identifier\") {\n bindingName = id.name;\n } else {\n bindingName = undefined;\n }\n }\n }\n return loadHelper(name).build(\n getDependency,\n bindingName,\n localBindings,\n adjustAst,\n );\n}\n\nexport function minVersion(name: string) {\n return loadHelper(name).minVersion;\n}\n\nLine truncated
@@ -0,0 +1,31 @@
/**
* The base implementation of `_.slice` without an iteratee call guard.
*
* @private
* @param {Array} array The array to slice.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the slice of `array`.
*/
function baseSlice(array, start, end) {
var index = -1,
length = array.length;
if (start < 0) {
start = -start > length ? 0 : (length + start);
}
end = end > length ? length : end;
if (end < 0) {
end += length;
}
length = start > end ? 0 : ((end - start) >>> 0);
start >>>= 0;
var result = Array(length);
while (++index < length) {
result[index] = array[index + start];
}
return result;
}
module.exports = baseSlice;
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('sortedIndexOf', require('../sortedIndexOf'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,166 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.1.15](https://github.com/inspect-js/is-typed-array/compare/v1.1.14...v1.1.15) - 2024-12-18
### Commits
- [types] improve types [`d934b49`](https://github.com/inspect-js/is-typed-array/commit/d934b49f7a16d5e20ba437a795b887f1f71ef240)
- [Dev Deps] update `@types/tape` [`da26511`](https://github.com/inspect-js/is-typed-array/commit/da26511ad7515c50fdc720701d5735b0d8a40800)
## [v1.1.14](https://github.com/inspect-js/is-typed-array/compare/v1.1.13...v1.1.14) - 2024-12-17
### Commits
- [types] use shared config [`eafa7fa`](https://github.com/inspect-js/is-typed-array/commit/eafa7fad2fc8d464a68e218d39a7eab782d9ce76)
- [actions] split out node 10-20, and 20+ [`cd6d5a3`](https://github.com/inspect-js/is-typed-array/commit/cd6d5a3283a1e65cf5885e57daede65a5176fd91)
- [types] use `which-typed-array`’s `TypedArray` type; re-export it [`d7d9fcd`](https://github.com/inspect-js/is-typed-array/commit/d7d9fcd75d538b7f8146dcd9faca5142534a3d45)
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/node`, `@types/object-inspect`, `@types/tape`, `auto-changelog`, `object-inspect`, `tape` [`65afb42`](https://github.com/inspect-js/is-typed-array/commit/65afb4263ff4f4ee4ee51b284dc7519ce969a666)
- [Dev Deps] update `@types/node`, `has-tostringtag`, `tape` [`9e27ddd`](https://github.com/inspect-js/is-typed-array/commit/9e27ddd62a51ebae46781de0adbd8871341c633c)
- [Tests] replace `aud` with `npm audit` [`ad4defe`](https://github.com/inspect-js/is-typed-array/commit/ad4defe211c77d42b880d13faf7737b8f1adaf13)
- [Tests] use `@arethetypeswrong/cli` [`ac4bcca`](https://github.com/inspect-js/is-typed-array/commit/ac4bcca4ee2215662e79aa21681756984bb0b6d1)
- [Deps] update `which-typed-array` [`c298129`](https://github.com/inspect-js/is-typed-array/commit/c2981299c09cd64d89bf1e496447c0379b45d03a)
- [Deps] update `which-typed-array` [`744c29a`](https://github.com/inspect-js/is-typed-array/commit/744c29aa8d4f9df360082074f7b4f2f0d42d76e5)
- [Dev Deps] add missing peer dep [`94d2f5a`](https://github.com/inspect-js/is-typed-array/commit/94d2f5a11016516823e8d943e0bfc7b29dcb146d)
## [v1.1.13](https://github.com/inspect-js/is-typed-array/compare/v1.1.12...v1.1.13) - 2024-02-01
### Commits
- [patch] add types [`8a8a679`](https://github.com/inspect-js/is-typed-array/commit/8a8a679937d1c4b970c98556460cef2b7fa0bffb)
- [Dev Deps] update `aud`, `has-tostringtag`, `npmignore`, `object-inspect`, `tape` [`8146b60`](https://github.com/inspect-js/is-typed-array/commit/8146b6019a24f502e66e2c224ce5bea8df9f39bc)
- [actions] optimize finishers [`34f875a`](https://github.com/inspect-js/is-typed-array/commit/34f875ace16c4900d6b0ef4688e9e3eb7d502715)
- [Deps] update `which-typed-array` [`19c974f`](https://github.com/inspect-js/is-typed-array/commit/19c974f4bbd93ffc45cb8638b86688bc00f1420b)
- [meta] add `sideEffects` flag [`0b68e5e`](https://github.com/inspect-js/is-typed-array/commit/0b68e5e58684b79110a82a0a51df8beb7574d6a2)
## [v1.1.12](https://github.com/inspect-js/is-typed-array/compare/v1.1.11...v1.1.12) - 2023-07-17
### Commits
- [Refactor] use `which-typed-array` for all internals [`7619405`](https://github.com/inspect-js/is-typed-array/commit/761940532de595f6721fed101b02814dcfa7fe4e)
## [v1.1.11](https://github.com/inspect-js/is-typed-array/compare/v1.1.10...v1.1.11) - 2023-07-17
### Commits
- [Fix] `node &lt; v0.6` lacks proper Object toString behavior [`c94b90d`](https://github.com/inspect-js/is-typed-array/commit/c94b90dc6bc457783d6f8cc208415a49da0933b7)
- [Robustness] use `call-bind` [`573b00b`](https://github.com/inspect-js/is-typed-array/commit/573b00b8deec42ac1ac262415e442ea0b7e1c96b)
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`c88c2d4`](https://github.com/inspect-js/is-typed-array/commit/c88c2d479976110478fa4038fe8921251c06a163)
## [v1.1.10](https://github.com/inspect-js/is-typed-array/compare/v1.1.9...v1.1.10) - 2022-11-02
### Commits
- [meta] add `auto-changelog` [`cf6d86b`](https://github.com/inspect-js/is-typed-array/commit/cf6d86bf2f693eca357439d4d12e76d641f91f92)
- [actions] update rebase action to use reusable workflow [`8da51a5`](https://github.com/inspect-js/is-typed-array/commit/8da51a5dce6d2442ae31ccbc2be136f2e04d6bef)
- [Dev Deps] update `aud`, `is-callable`, `object-inspect`, `tape` [`554e3de`](https://github.com/inspect-js/is-typed-array/commit/554e3deec59dec926d0badc628e589ab363e465b)
- [Refactor] use `gopd` instead of an `es-abstract` helper` [`cdaa465`](https://github.com/inspect-js/is-typed-array/commit/cdaa465d5f94bfc9e32475e31209e1c2458a9603)
- [Deps] update `es-abstract` [`677ae4b`](https://github.com/inspect-js/is-typed-array/commit/677ae4b3c8323b59d6650a9254ab945045c33f79)
<!-- auto-changelog-above -->
1.1.9 / 2022-05-13
=================
* [Refactor] use `foreach` instead of `for-each`
* [readme] markdown URL cleanup
* [Deps] update `es-abstract`
* [meta] use `npmignore` to autogenerate an npmignore file
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape`
* [actions] reuse common workflows
* [actions] update codecov uploader
1.1.8 / 2021-08-30
=================
* [Refactor] use `globalThis` if available (#53)
* [Deps] update `available-typed-arrays`
* [Dev Deps] update `@ljharb/eslint-config`
1.1.7 / 2021-08-07
=================
* [Fix] if Symbol.toStringTag exists but is not present, use Object.prototype.toString
* [Dev Deps] update `is-callable`, `tape`
1.1.6 / 2021-08-05
=================
* [Fix] use `has-tostringtag` to behave correctly in the presence of symbol shams
* [readme] add actions and codecov badges
* [meta] use `prepublishOnly` script for npm 7+
* [Deps] update `available-typed-arrays`, `es-abstract`
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape`
* [actions] use `node/install` instead of `node/run`; use `codecov` action
1.1.5 / 2021-02-14
=================
* [meta] do not publish github action workflow files or nyc output
* [Deps] update `call-bind`, `es-abstract`
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `is-callable`, `tape`
1.1.4 / 2020-12-05
=================
* [readme] fix repo URLs, remove defunct badges
* [Deps] update `available-typed-arrays`, `es-abstract`; use `call-bind` where applicable
* [meta] gitignore nyc output
* [meta] only audit prod deps
* [actions] add "Allow Edits" workflow
* [actions] switch Automatic Rebase workflow to `pull_request_target` event
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is-callable`, `make-arrow-function`, `make-generator-function`, `object-inspect`, `tape`; add `aud`
* [Tests] migrate tests to Github Actions
* [Tests] run `nyc` on all tests
1.1.3 / 2020-01-24
=================
* [Refactor] use `es-abstract`’s `callBound`, `available-typed-arrays`, `has-symbols`
1.1.2 / 2020-01-20
=================
* [Fix] in envs without Symbol.toStringTag, dc8a8cc made arrays return `true`
* [Tests] add `evalmd` to `prelint`
1.1.1 / 2020-01-18
=================
* [Robustness] don’t rely on Array.prototype.indexOf existing
* [meta] remove unused Makefile and associated utilities
* [meta] add `funding` field; create FUNDING.yml
* [actions] add automatic rebasing / merge commit blocking
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is-callable`, `replace`, `semver`, `tape`; add `safe-publish-latest`
* [Tests] use shared travis-ci configs
* [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops
1.1.0 / 2019-02-16
=================
* [New] add `BigInt64Array` and `BigUint64Array`
* [Refactor] use an array instead of an object for storing Typed Array names
* [meta] ignore `test.html`
* [Tests] up to `node` `v11.10`, `v10.15`, `v8.15`, `v7.10`, `v6.16`, `v5.10`, `v4.9`
* [Tests] remove `jscs`
* [Tests] use `npm audit` instead of `nsp`
* [Dev Deps] update `eslint`,` @ljharb/eslint-config`, `is-callable`, `tape`, `replace`, `semver`
* [Dev Deps] remove unused eccheck script + dep
1.0.4 / 2016-03-19
=================
* [Fix] `Symbol.toStringTag` is on the super-`[[Prototype]]` of Float32Array, not the `[[Prototype]]` (#3)
* [Tests] up to `node` `v5.9`, `v4.4`
* [Tests] use pretest/posttest for linting/security
* [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `is-callable`
1.0.3 / 2015-10-13
=================
* [Deps] Add missing `foreach` dependency (#1)
1.0.2 / 2015-10-05
=================
* [Deps] Remove unneeded "isarray" dependency
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`
1.0.1 / 2015-10-02
=================
* Rerelease: avoid instanceof and the constructor property; work cross-realm; work with Symbol.toStringTag.
1.0.0 / 2015-05-06
=================
* Initial release.
@@ -0,0 +1,90 @@
import {getScrollParents as $a40c673dc9f6d9c7$export$94ed1c92c7beeb22} from "./getScrollParents.module.js";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element) {
let offsetX = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, 'left');
let offsetY = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, 'top');
let width = element.offsetWidth;
let height = element.offsetHeight;
let x = scrollView.scrollLeft;
let y = scrollView.scrollTop;
// Account for top/left border offsetting the scroll top/Left
let { borderTopWidth: borderTopWidth, borderLeftWidth: borderLeftWidth } = getComputedStyle(scrollView);
let borderAdjustedX = scrollView.scrollLeft + parseInt(borderLeftWidth, 10);
let borderAdjustedY = scrollView.scrollTop + parseInt(borderTopWidth, 10);
// Ignore end/bottom border via clientHeight/Width instead of offsetHeight/Width
let maxX = borderAdjustedX + scrollView.clientWidth;
let maxY = borderAdjustedY + scrollView.clientHeight;
if (offsetX <= x) x = offsetX - parseInt(borderLeftWidth, 10);
else if (offsetX + width > maxX) x += offsetX + width - maxX;
if (offsetY <= borderAdjustedY) y = offsetY - parseInt(borderTopWidth, 10);
else if (offsetY + height > maxY) y += offsetY + height - maxY;
scrollView.scrollLeft = x;
scrollView.scrollTop = y;
}
/**
* Computes the offset left or top from child to ancestor by accumulating
* offsetLeft or offsetTop through intervening offsetParents.
*/ function $2f04cbc44ee30ce0$var$relativeOffset(ancestor, child, axis) {
const prop = axis === 'left' ? 'offsetLeft' : 'offsetTop';
let sum = 0;
while(child.offsetParent){
sum += child[prop];
if (child.offsetParent === ancestor) break;
else if (child.offsetParent.contains(ancestor)) {
// If the ancestor is not `position:relative`, then we stop at
// _its_ offset parent, and we subtract off _its_ offset, so that
// we end up with the proper offset from child to ancestor.
sum -= ancestor[prop];
break;
}
child = child.offsetParent;
}
return sum;
}
function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
if (targetElement && document.contains(targetElement)) {
let root = document.scrollingElement || document.documentElement;
let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden';
// If scrolling is not currently prevented then we aren’t in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view
if (!isScrollPrevented) {
var // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()
// won't cause a scroll if the element is already focused and doesn't behave consistently when an element is partially out of view horizontally vs vertically
_targetElement_scrollIntoView;
let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
targetElement === null || targetElement === void 0 ? void 0 : (_targetElement_scrollIntoView = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView === void 0 ? void 0 : _targetElement_scrollIntoView.call(targetElement, {
block: 'nearest'
});
let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
// Account for sub pixel differences from rounding
if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
var _opts_containingElement_scrollIntoView, _opts_containingElement, _targetElement_scrollIntoView1;
opts === null || opts === void 0 ? void 0 : (_opts_containingElement = opts.containingElement) === null || _opts_containingElement === void 0 ? void 0 : (_opts_containingElement_scrollIntoView = _opts_containingElement.scrollIntoView) === null || _opts_containingElement_scrollIntoView === void 0 ? void 0 : _opts_containingElement_scrollIntoView.call(_opts_containingElement, {
block: 'center',
inline: 'center'
});
(_targetElement_scrollIntoView1 = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView1 === void 0 ? void 0 : _targetElement_scrollIntoView1.call(targetElement, {
block: 'nearest'
});
}
} else {
let scrollParents = (0, $a40c673dc9f6d9c7$export$94ed1c92c7beeb22)(targetElement);
// If scrolling is prevented, we don't want to scroll the body since it might move the overlay partially offscreen and the user can't scroll it back into view.
for (let scrollParent of scrollParents)$2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, targetElement);
}
}
}
export {$2f04cbc44ee30ce0$export$53a0910f038337bd as scrollIntoView, $2f04cbc44ee30ce0$export$c826860796309d1b as scrollIntoViewport};
//# sourceMappingURL=scrollIntoView.module.js.map
@@ -0,0 +1,47 @@
wide-align
----------
A wide-character aware text alignment function for use in terminals / on the
console.
### Usage
```
var align = require('wide-align')
// Note that if you view this on a unicode console, all of the slashes are
// aligned. This is because on a console, all narrow characters are
// an en wide and all wide characters are an em. In browsers, this isn't
// held to and wide characters like "古" can be less than two narrow
// characters even with a fixed width font.
console.log(align.center('abc', 10)) // ' abc '
console.log(align.center('古古古', 10)) // ' 古古古 '
console.log(align.left('abc', 10)) // 'abc '
console.log(align.left('古古古', 10)) // '古古古 '
console.log(align.right('abc', 10)) // ' abc'
console.log(align.right('古古古', 10)) // ' 古古古'
```
### Functions
#### `align.center(str, length)` → `str`
Returns *str* with spaces added to both sides such that that it is *length*
chars long and centered in the spaces.
#### `align.left(str, length)` → `str`
Returns *str* with spaces to the right such that it is *length* chars long.
### `align.right(str, length)` → `str`
Returns *str* with spaces to the left such that it is *length* chars long.
### Origins
These functions were originally taken from
[cliui](https://npmjs.com/package/cliui). Changes include switching to the
MUCH faster pad generation function from
[lodash](https://npmjs.com/package/lodash), making center alignment pad
both sides and adding left alignment.
@@ -0,0 +1,252 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
enum testEnum {
A = 0,
B = 1,
}
test("flat inference", () => {
const readonlyString = z.string().readonly();
const readonlyNumber = z.number().readonly();
const readonlyNaN = z.nan().readonly();
const readonlyBigInt = z.bigint().readonly();
const readonlyBoolean = z.boolean().readonly();
const readonlyDate = z.date().readonly();
const readonlyUndefined = z.undefined().readonly();
const readonlyNull = z.null().readonly();
const readonlyAny = z.any().readonly();
const readonlyUnknown = z.unknown().readonly();
const readonlyVoid = z.void().readonly();
const readonlyStringArray = z.array(z.string()).readonly();
const readonlyTuple = z.tuple([z.string(), z.number()]).readonly();
const readonlyMap = z.map(z.string(), z.date()).readonly();
const readonlySet = z.set(z.string()).readonly();
const readonlyStringRecord = z.record(z.string(), z.string()).readonly();
const readonlyNumberRecord = z.record(z.string(), z.number()).readonly();
const readonlyObject = z.object({ a: z.string(), 1: z.number() }).readonly();
const readonlyEnum = z.nativeEnum(testEnum).readonly();
const readonlyPromise = z.promise(z.string()).readonly();
expectTypeOf<typeof readonlyString._output>().toEqualTypeOf<string>();
expectTypeOf<typeof readonlyNumber._output>().toEqualTypeOf<number>();
expectTypeOf<typeof readonlyNaN._output>().toEqualTypeOf<number>();
expectTypeOf<typeof readonlyBigInt._output>().toEqualTypeOf<bigint>();
expectTypeOf<typeof readonlyBoolean._output>().toEqualTypeOf<boolean>();
expectTypeOf<typeof readonlyDate._output>().toEqualTypeOf<Date>();
expectTypeOf<typeof readonlyUndefined._output>().toEqualTypeOf<undefined>();
expectTypeOf<typeof readonlyNull._output>().toEqualTypeOf<null>();
expectTypeOf<typeof readonlyAny._output>().toEqualTypeOf<any>();
expectTypeOf<typeof readonlyUnknown._output>().toEqualTypeOf<Readonly<unknown>>();
expectTypeOf<typeof readonlyVoid._output>().toEqualTypeOf<void>();
expectTypeOf<typeof readonlyStringArray._output>().toEqualTypeOf<readonly string[]>();
expectTypeOf<typeof readonlyTuple._output>().toEqualTypeOf<readonly [string, number]>();
expectTypeOf<typeof readonlyMap._output>().toEqualTypeOf<ReadonlyMap<string, Date>>();
expectTypeOf<typeof readonlySet._output>().toEqualTypeOf<ReadonlySet<string>>();
expectTypeOf<typeof readonlyStringRecord._output>().toEqualTypeOf<Readonly<Record<string, string>>>();
expectTypeOf<typeof readonlyNumberRecord._output>().toEqualTypeOf<Readonly<Record<string, number>>>();
expectTypeOf<typeof readonlyObject._output>().toEqualTypeOf<{ readonly a: string; readonly 1: number }>();
expectTypeOf<typeof readonlyEnum._output>().toEqualTypeOf<Readonly<testEnum>>();
expectTypeOf<typeof readonlyPromise._output>().toEqualTypeOf<string>();
});
// test("deep inference", () => {
// expectTypeOf<z.infer<(typeof deepReadonlySchemas_0)[0]>>().toEqualTypeOf<string>();
// expectTypeOf<z.infer<(typeof deepReadonlySchemas_0)[1]>>().toEqualTypeOf<number>();
// expectTypeOf<z.infer<(typeof deepReadonlySchemas_0)[2]>>().toEqualTypeOf<number>();
// expectTypeOf<z.infer<(typeof deepReadonlySchemas_0)[3]>>().toEqualTypeOf<bigint>();
// expectTypeOf<z.infer<(typeof deepReadonlySchemas_0)[4]>>().toEqualTypeOf<boolean>();
// expectTypeOf<z.infer<(typeof deepReadonlySchemas_0)[5]>>().toEqualTypeOf<Date>();
// expectTypeOf<z.infer<(typeof deepReadonlySchemas_0)[6]>>().toEqualTypeOf<undefined>();
// expectTypeOf<z.infer<(typeof deepReadonlySchemas_0)[7]>>().toEqualTypeOf<null>();
// expectTypeOf<z.infer<(typeof deepReadonlySchemas_0)[8]>>().toEqualTypeOf<any>();
// expectTypeOf<
// z.infer<(typeof deepReadonlySchemas_0)[9]>
// >().toEqualTypeOf<Readonly<unknown>>();
// expectTypeOf<z.infer<(typeof deepReadonlySchemas_0)[10]>>().toEqualTypeOf<void>();
// expectTypeOf<
// z.infer<(typeof deepReadonlySchemas_0)[11]>
// >().toEqualTypeOf<(args_0: string, args_1: number, ...args_2: unknown[]) => unknown>();
// expectTypeOf<
// z.infer<(typeof deepReadonlySchemas_0)[12]>
// >().toEqualTypeOf<readonly string[]>();
// expectTypeOf<
// z.infer<(typeof deepReadonlySchemas_0)[13]>
// >().toEqualTypeOf<readonly [string, number]>();
// expectTypeOf<
// z.infer<(typeof deepReadonlySchemas_0)[14]>
// >().toEqualTypeOf<ReadonlyMap<string, Date>>();
// expectTypeOf<
// z.infer<(typeof deepReadonlySchemas_0)[15]>
// >().toEqualTypeOf<ReadonlySet<Promise<string>>>();
// expectTypeOf<
// z.infer<(typeof deepReadonlySchemas_0)[16]>
// >().toEqualTypeOf<Readonly<Record<string, string>>>();
// expectTypeOf<
// z.infer<(typeof deepReadonlySchemas_0)[17]>
// >().toEqualTypeOf<Readonly<Record<string, number>>>();
// expectTypeOf<
// z.infer<(typeof deepReadonlySchemas_0)[18]>
// >().toEqualTypeOf<{ readonly a: string; readonly 1: number }>();
// expectTypeOf<
// z.infer<(typeof deepReadonlySchemas_0)[19]>
// >().toEqualTypeOf<Readonly<testEnum>>();
// expectTypeOf<
// z.infer<(typeof deepReadonlySchemas_0)[20]>
// >().toEqualTypeOf<Promise<string>>();
// expectTypeOf<
// z.infer<typeof crazyDeepReadonlySchema>
// >().toEqualTypeOf<ReadonlyMap<
// ReadonlySet<readonly [string, number]>,
// {
// readonly a: {
// readonly [x: string]: readonly any[];
// };
// readonly b: {
// readonly c: {
// readonly d: {
// readonly e: {
// readonly f: {
// readonly g?: {};
// };
// };
// };
// };
// };
// }
// >>();
// });
test("object freezing", async () => {
expect(Object.isFrozen(z.array(z.string()).readonly().parse(["a"]))).toBe(true);
expect(Object.isFrozen(z.tuple([z.string(), z.number()]).readonly().parse(["a", 1]))).toBe(true);
expect(
Object.isFrozen(
z
.map(z.string(), z.date())
.readonly()
.parse(new Map([["a", new Date()]]))
)
).toBe(true);
expect(Object.isFrozen(z.record(z.string(), z.string()).readonly().parse({ a: "b" }))).toBe(true);
expect(Object.isFrozen(z.record(z.string(), z.number()).readonly().parse({ a: 1 }))).toBe(true);
expect(Object.isFrozen(z.object({ a: z.string(), 1: z.number() }).readonly().parse({ a: "b", 1: 2 }))).toBe(true);
expect(
Object.isFrozen(
await z
.set(z.promise(z.string()))
.readonly()
.parseAsync(new Set([Promise.resolve("a")]))
)
).toBe(true);
expect(Object.isFrozen(await z.promise(z.string()).readonly().parseAsync(Promise.resolve("a")))).toBe(true);
});
test("async object freezing", async () => {
expect(Object.isFrozen(await z.array(z.string()).readonly().parseAsync(["a"]))).toBe(true);
expect(Object.isFrozen(await z.tuple([z.string(), z.number()]).readonly().parseAsync(["a", 1]))).toBe(true);
expect(
Object.isFrozen(
await z
.map(z.string(), z.date())
.readonly()
.parseAsync(new Map([["a", new Date()]]))
)
).toBe(true);
expect(
Object.isFrozen(
await z
.set(z.promise(z.string()))
.readonly()
.parseAsync(new Set([Promise.resolve("a")]))
)
).toBe(true);
expect(Object.isFrozen(await z.record(z.string(), z.string()).readonly().parseAsync({ a: "b" }))).toBe(true);
expect(Object.isFrozen(await z.record(z.string(), z.number()).readonly().parseAsync({ a: 1 }))).toBe(true);
expect(
Object.isFrozen(await z.object({ a: z.string(), 1: z.number() }).readonly().parseAsync({ a: "b", 1: 2 }))
).toBe(true);
expect(Object.isFrozen(await z.promise(z.string()).readonly().parseAsync(Promise.resolve("a")))).toBe(true);
});
test("readonly inference", () => {
const readonlyStringArray = z.string().array().readonly();
const readonlyStringTuple = z.tuple([z.string()]).readonly();
const deepReadonly = z.object({ a: z.string() }).readonly();
type readonlyStringArray = z.infer<typeof readonlyStringArray>;
type readonlyStringTuple = z.infer<typeof readonlyStringTuple>;
type deepReadonly = z.infer<typeof deepReadonly>;
expectTypeOf<readonlyStringArray>().toEqualTypeOf<readonly string[]>();
expectTypeOf<readonlyStringTuple>().toEqualTypeOf<readonly [string]>();
expectTypeOf<deepReadonly>().toEqualTypeOf<{ readonly a: string }>();
});
test("readonly parse", () => {
const schema = z.array(z.string()).readonly();
const readonlyArray = ["a", "b", "c"] as const;
const mutableArray = ["a", "b", "c"];
const result1 = schema.parse(readonlyArray);
const result2 = schema.parse(mutableArray);
expect(result1).toEqual(readonlyArray);
expect(result2).toEqual(mutableArray);
});
test("readonly parse with tuples", () => {
const schema = z.tuple([z.string(), z.number()]).readonly();
schema.parse(["a", 1]);
});
test("readonly and the get method", () => {
const readonlyString = z.string().readonly();
const readonlyNumber1 = z.number().readonly();
const readonlyNumber2 = z.number().readonly();
const readonlyBigInt = z.bigint().readonly();
const readonlyBoolean = z.boolean().readonly();
const readonlyDate = z.date().readonly();
const readonlyUndefined = z.undefined().readonly();
const readonlyNull = z.null().readonly();
const readonlyAny = z.any().readonly();
const readonlyUnknown = z.unknown().readonly();
const readonlyVoid = z.void().readonly();
// const readonlyFunction = z.function(z.tuple([z.string(), z.number()]), z.unknown()).readonly();
const readonlyStringArray = z.string().array().readonly();
const readonlyTuple = z.tuple([z.string(), z.number()]).readonly();
expectTypeOf<z.infer<typeof readonlyString>>().toEqualTypeOf<string>();
expectTypeOf<z.infer<typeof readonlyNumber1>>().toEqualTypeOf<number>();
expectTypeOf<z.infer<typeof readonlyNumber2>>().toEqualTypeOf<number>();
expectTypeOf<z.infer<typeof readonlyBigInt>>().toEqualTypeOf<bigint>();
expectTypeOf<z.infer<typeof readonlyBoolean>>().toEqualTypeOf<boolean>();
expectTypeOf<z.infer<typeof readonlyDate>>().toEqualTypeOf<Date>();
expectTypeOf<z.infer<typeof readonlyUndefined>>().toEqualTypeOf<undefined>();
expectTypeOf<z.infer<typeof readonlyNull>>().toEqualTypeOf<null>();
expectTypeOf<z.infer<typeof readonlyAny>>().toEqualTypeOf<any>();
expectTypeOf<z.infer<typeof readonlyUnknown>>().toEqualTypeOf<Readonly<unknown>>();
expectTypeOf<z.infer<typeof readonlyVoid>>().toEqualTypeOf<void>();
// expectTypeOf<z.infer<typeof readonlyFunction>>().toEqualTypeOf<
// (args_0: string, args_1: number, ...args_2: unknown[]) => unknown
// >();
expectTypeOf<z.infer<typeof readonlyStringArray>>().toEqualTypeOf<readonly string[]>();
expectTypeOf<z.infer<typeof readonlyTuple>>().toEqualTypeOf<readonly [string, number]>();
expect(readonlyString.parse("asdf")).toEqual("asdf");
expect(readonlyNumber1.parse(1234)).toEqual(1234);
expect(readonlyNumber2.parse(1234)).toEqual(1234);
const bigIntVal = BigInt(1);
expect(readonlyBigInt.parse(bigIntVal)).toEqual(bigIntVal);
expect(readonlyBoolean.parse(true)).toEqual(true);
const dateVal = new Date();
expect(readonlyDate.parse(dateVal)).toEqual(dateVal);
expect(readonlyUndefined.parse(undefined)).toEqual(undefined);
expect(readonlyNull.parse(null)).toEqual(null);
expect(readonlyAny.parse("whatever")).toEqual("whatever");
expect(readonlyUnknown.parse("whatever")).toEqual("whatever");
expect(readonlyVoid.parse(undefined)).toEqual(undefined);
// expect(readonlyFunction.parse(() => void 0)).toEqual(() => void 0);
expect(readonlyStringArray.parse(["asdf"])).toEqual(["asdf"]);
expect(readonlyTuple.parse(["asdf", 1234])).toEqual(["asdf", 1234]);
});
@@ -0,0 +1,18 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
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/index.ts
var src_exports = {};
module.exports = __toCommonJS(src_exports);
@@ -0,0 +1,41 @@
import { SlotsToClasses, ListboxSectionSlots } from '@heroui/theme';
import { SectionProps } from '@heroui/aria-utils';
import { DividerProps } from '@heroui/divider';
import { ListboxItemProps } from '../listbox-item.js';
import 'react/jsx-runtime';
import '../use-listbox-item.js';
import './listbox-item-base.js';
import '@react-aria/listbox';
import '@react-types/shared';
import 'react';
import 'tailwind-variants';
import '@heroui/system';
import '@react-stately/list';
interface ListboxSectionBaseProps<T extends object = {}> extends SectionProps<"ul", T> {
/**
* The listbox section classNames.
*/
classNames?: SlotsToClasses<ListboxSectionSlots>;
/**
* The listbox items classNames.
*/
itemClasses?: ListboxItemProps["classNames"];
/**
* Whether to hide the check icon when the items are selected.
* @default false
*/
hideSelectedIcon?: boolean;
/**
* Shows a divider between sections
* @default false
*/
showDivider?: boolean;
/**
* The divider props
*/
dividerProps?: DividerProps;
}
declare const ListboxSectionBase: <T extends object>(props: ListboxSectionBaseProps<T>) => JSX.Element;
export { ListboxSectionBaseProps, ListboxSectionBase as default };
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"2":"C L M G N O P","16":"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"},C:{"2":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC 0C 1C","16":"YC yC zC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","16":"XC MC YC"},E:{"1":"C L OC","2":"J ZB K D E F A B 2C ZC 3C 4C 5C 6C aC NC","16":"M G 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"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 FD GD HD ID NC uC JD OC","16":"0 1 2 3 4 5 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"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"16":"hD"},I:{"2":"TC J iD jD kD lD vC mD nD","16":"I"},J:{"2":"D","16":"A"},K:{"2":"A B C NC uC OC","16":"H"},L:{"16":"I"},M:{"16":"MC"},N:{"2":"A","16":"B"},O:{"16":"PC"},P:{"2":"J oD pD","16":"6 7 8 9 AB BB CB DB EB FB qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"16":"zD"},R:{"16":"0D"},S:{"2":"1D 2D"}},B:1,C:"Password Rules",D:false};
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('replace', require('../replace'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,96 @@
const { dirname, resolve } = require('path')
const url = require('url')
const fs = require('../fs.js')
// given a path, find the owner of the nearest parent
const find = async (path) => {
// if we have no getuid, permissions are irrelevant on this platform
if (!process.getuid) {
return {}
}
// fs methods accept URL objects with a scheme of file: so we need to unwrap
// those into an actual path string before we can resolve it
const resolved = path != null && path.href && path.origin
? resolve(url.fileURLToPath(path))
: resolve(path)
let stat
try {
stat = await fs.lstat(resolved)
} finally {
// if we got a stat, return its contents
if (stat) {
return { uid: stat.uid, gid: stat.gid }
}
// try the parent directory
if (resolved !== dirname(resolved)) {
return find(dirname(resolved))
}
// no more parents, never got a stat, just return an empty object
return {}
}
}
// given a path, uid, and gid update the ownership of the path if necessary
const update = async (path, uid, gid) => {
// nothing to update, just exit
if (uid === undefined && gid === undefined) {
return
}
try {
// see if the permissions are already the same, if they are we don't
// need to do anything, so return early
const stat = await fs.stat(path)
if (uid === stat.uid && gid === stat.gid) {
return
}
} catch {
// ignore errors
}
try {
await fs.chown(path, uid, gid)
} catch {
// ignore errors
}
}
// accepts a `path` and the `owner` property of an options object and normalizes
// it into an object with numerical `uid` and `gid`
const validate = async (path, input) => {
let uid
let gid
if (typeof input === 'string' || typeof input === 'number') {
uid = input
gid = input
} else if (input && typeof input === 'object') {
uid = input.uid
gid = input.gid
}
if (uid === 'inherit' || gid === 'inherit') {
const owner = await find(path)
if (uid === 'inherit') {
uid = owner.uid
}
if (gid === 'inherit') {
gid = owner.gid
}
}
return { uid, gid }
}
module.exports = {
find,
update,
validate,
}
@@ -0,0 +1 @@
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAYM,MAAM,4CAAoE,IAAI","sources":["packages/@react-aria/checkbox/src/utils.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CheckboxGroupState} from '@react-stately/checkbox';\n\ninterface CheckboxGroupData {\n name?: string,\n form?: string,\n descriptionId?: string,\n errorMessageId?: string,\n validationBehavior: 'aria' | 'native'\n}\n\nexport const checkboxGroupData: WeakMap<CheckboxGroupState, CheckboxGroupData> = new WeakMap<CheckboxGroupState, CheckboxGroupData>();\n"],"names":[],"version":3,"file":"utils.main.js.map"}
@@ -0,0 +1,98 @@
/**
* @file ttf2woff
* @author junmer
*/
/* eslint-env node */
var isTtf = require('is-ttf');
var through = require('through2');
var ttf2woff = require('fonteditor-core').ttf2woff;
var b2ab = require('b3b').b2ab;
var ab2b = require('b3b').ab2b;
var replaceExt = require('replace-ext');
var deflate = require('pako').deflate;
var _ = require('lodash');
function compileTtf(buffer, options, cb) {
var output;
var ttf2woffOpts = {};
if (options.deflate) {
ttf2woffOpts.deflate = function (input) {
return deflate(Uint8Array.from(input));
};
}
try {
output = ab2b(
// fix: have problem in some android device, close deflate
ttf2woff(
b2ab(buffer),
ttf2woffOpts
)
);
}
catch (ex) {
cb(ex);
}
output && cb(null, output);
}
/**
* ttf2woff fontmin plugin
*
* @param {Object} opts opts
* @return {Object} stream.Transform instance
* @api public
*/
module.exports = function (opts) {
opts = _.extend({clone: true}, opts);
return through.ctor({
objectMode: true
}, function (file, enc, cb) {
// check null
if (file.isNull()) {
cb(null, file);
return;
}
// check stream
if (file.isStream()) {
cb(new Error('Streaming is not supported'));
return;
}
// check ttf
if (!isTtf(file.contents)) {
cb(null, file);
return;
}
// clone
if (opts.clone) {
this.push(file.clone(false));
}
// replace ext
file.path = replaceExt(file.path, '.woff');
compileTtf(file.contents, opts, function (err, buffer) {
if (err) {
cb(err);
return;
}
file.contents = buffer;
cb(null, file);
});
});
};
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"E F A B","2":"K D wC"},B:{"2":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C"},D:{"2":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"1":"F B C FD GD HD ID NC uC JD OC","16":"0 1 2 3 4 5 6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"16":"hD"},I:{"2":"TC J I iD jD kD lD vC mD nD"},J:{"16":"D A"},K:{"2":"H","16":"A B C NC uC OC"},L:{"16":"I"},M:{"16":"MC"},N:{"16":"A B"},O:{"16":"PC"},P:{"16":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"2":"zD"},R:{"16":"0D"},S:{"1":"1D 2D"}},B:1,C:"Alternate stylesheet",D:false};
@@ -0,0 +1,73 @@
{
"name": "domhandler",
"version": "5.0.3",
"description": "Handler for htmlparser2 that turns pages into a dom",
"author": "Felix Boehm <me@feedic.com>",
"funding": {
"url": "https://github.com/fb55/domhandler?sponsor=1"
},
"license": "BSD-2-Clause",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"module": "lib/esm/index.js",
"exports": {
"require": "./lib/index.js",
"import": "./lib/esm/index.js"
},
"sideEffects": false,
"files": [
"lib"
],
"scripts": {
"test": "npm run test:jest && npm run lint",
"test:jest": "jest",
"lint": "npm run lint:es && npm run lint:prettier",
"lint:es": "eslint --ignore-path .gitignore .",
"lint:prettier": "npm run prettier -- --check",
"format": "npm run format:es && npm run format:prettier",
"format:es": "npm run lint:es -- --fix",
"format:prettier": "npm run prettier -- --write",
"prettier": "prettier \"**/*.{ts,md,json,yml}\" --ignore-path .gitignore",
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc",
"build:esm": "tsc --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json",
"prepare": "npm run build"
},
"repository": {
"type": "git",
"url": "git://github.com/fb55/domhandler.git"
},
"keywords": [
"dom",
"htmlparser2"
],
"engines": {
"node": ">= 4"
},
"dependencies": {
"domelementtype": "^2.3.0"
},
"devDependencies": {
"@types/jest": "^27.4.1",
"@types/node": "^17.0.30",
"@typescript-eslint/eslint-plugin": "^5.21.0",
"@typescript-eslint/parser": "^5.21.0",
"eslint": "^8.14.0",
"eslint-config-prettier": "^8.5.0",
"htmlparser2": "^8.0.0",
"jest": "^27.5.1",
"prettier": "^2.6.2",
"ts-jest": "^27.1.4",
"typescript": "^4.6.4"
},
"jest": {
"preset": "ts-jest",
"testEnvironment": "node",
"moduleNameMapper": {
"^(.*)\\.js$": "$1"
}
},
"prettier": {
"tabWidth": 4
}
}
@@ -0,0 +1,9 @@
import type { RuleCreateFunction, RuleModule } from '../ts-eslint';
/**
* Uses type inference to fetch the Options type from the given RuleModule
*/
export type InferOptionsTypeFromRule<T> = T extends RuleModule<infer _MessageIds, infer Options> ? Options : T extends RuleCreateFunction<infer _MessageIds, infer Options> ? Options : unknown;
/**
* Uses type inference to fetch the MessageIds type from the given RuleModule
*/
export type InferMessageIdsTypeFromRule<T> = T extends RuleModule<infer MessageIds, infer _TOptions> ? MessageIds : T extends RuleCreateFunction<infer MessageIds, infer _TOptions> ? MessageIds : unknown;
@@ -0,0 +1,50 @@
# is-what-type
[![npm package](https://nodei.co/npm/is-what-type.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/is-what-type)
[![NPM Version](https://img.shields.io/npm/v/is-what-type.svg?style=flat)](https://npmjs.org/package/is-what-type)
[![NPM Downloads](https://img.shields.io/npm/dm/is-what-type.svg?style=flat)](https://npmjs.org/package/is-what-type)
[![jsdelivr](https://data.jsdelivr.com/v1/package/npm/camel-kit/badge)](https://www.jsdelivr.com/package/npm/is-what-type)
> A simple type-checking utility library.
## Installation
::: code-group
```bash [npm]
npm add is-what-type
```
```bash [pnpm]
pnpm add is-what-type
```
```bash [yarn]
yarn add is-what-type
```
```bash [bun]
bun add is-what-type
```
:::
## Documentation
For detailed usage instructions and API references, please visit the official documentation:
👉 [View Full Documentation](https://fengxinming.github.io/util/modules/is-what-type/)
## Contributing
We welcome contributions from the community! If you find a bug or want to suggest an improvement, feel free to open an issue or submit a pull request.
### How to Contribute
1. Fork the repository.
2. Create a new branch for your changes.
3. Submit a pull request with a clear description of your changes.
## License
This project is licensed under the [MIT License](LICENSE).
@@ -0,0 +1,39 @@
{
"root": true,
"extends": "@ljharb",
"ignorePatterns": [
"dist/",
],
"rules": {
"complexity": 0,
"consistent-return": 1,
"func-name-matching": 0,
"id-length": [2, { "min": 1, "max": 25, "properties": "never" }],
"indent": [2, 4],
"max-lines": 0,
"max-lines-per-function": [2, { "max": 150 }],
"max-params": [2, 18],
"max-statements": [2, 100],
"multiline-comment-style": 0,
"no-continue": 1,
"no-magic-numbers": 0,
"no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"],
},
"overrides": [
{
"files": "test/**",
"rules": {
"function-paren-newline": 0,
"max-lines-per-function": 0,
"max-statements": 0,
"no-buffer-constructor": 0,
"no-extend-native": 0,
"no-throw-literal": 0,
},
},
],
}
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=jsx-no-script-url.d.ts.map
@@ -0,0 +1 @@
module.exports={C:{"112":0.00775,"113":0.00775,"115":0.0465,"116":0.00775,"128":0.0155,"136":0.00775,"139":0.00775,"140":0.03875,"141":0.00775,"142":0.0155,"143":0.31775,"144":0.28675,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 114 117 118 119 120 121 122 123 124 125 126 127 129 130 131 132 133 134 135 137 138 145 146 147 3.5 3.6"},D:{"39":0.02325,"40":0.02325,"41":0.02325,"42":0.02325,"43":0.02325,"44":0.02325,"45":0.02325,"46":0.02325,"47":0.02325,"48":0.02325,"49":0.02325,"50":0.02325,"51":0.02325,"52":0.02325,"53":0.02325,"54":0.02325,"55":0.031,"56":0.02325,"57":0.02325,"58":0.02325,"59":0.02325,"60":0.02325,"66":0.0155,"75":0.00775,"78":0.00775,"79":0.00775,"87":0.00775,"103":0.00775,"104":0.02325,"105":0.00775,"108":0.00775,"109":0.36425,"112":32.69725,"113":0.00775,"114":0.0155,"115":0.00775,"116":0.0155,"119":0.02325,"120":0.06975,"121":0.00775,"122":0.02325,"123":0.00775,"124":0.0155,"125":20.1035,"126":2.82875,"127":0.0155,"128":0.06975,"129":0.0155,"130":0.02325,"131":0.05425,"132":0.02325,"133":0.031,"134":0.031,"135":0.03875,"136":0.0465,"137":0.05425,"138":0.155,"139":0.25575,"140":3.51075,"141":9.69525,"142":0.155,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 65 67 68 69 70 71 72 73 74 76 77 80 81 83 84 85 86 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 106 107 110 111 117 118 143 144 145"},F:{"92":0.00775,"95":0.00775,"120":0.0465,"121":0.20925,"122":1.3175,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00775,"109":0.0155,"114":0.031,"131":0.00775,"134":0.0155,"135":0.00775,"136":0.00775,"137":0.00775,"138":0.0155,"139":0.0155,"140":0.39525,"141":1.96075,"142":0.00775,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 132 133"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 6.1 7.1 9.1 10.1 11.1 12.1 13.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.2 17.3 17.4 18.0 18.2 18.4 26.2","5.1":0.00775,"15.6":0.00775,"16.6":0.0155,"17.1":0.00775,"17.5":0.00775,"17.6":0.0155,"18.1":0.00775,"18.3":0.00775,"18.5-18.6":0.0155,"26.0":0.10075,"26.1":0.00775},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00022,"5.0-5.1":0,"6.0-6.1":0.00086,"7.0-7.1":0.00065,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00195,"10.0-10.2":0.00022,"10.3":0.00368,"11.0-11.2":0.05449,"11.3-11.4":0.0013,"12.0-12.1":0.00043,"12.2-12.5":0.0106,"13.0-13.1":0,"13.2":0.00108,"13.3":0.00043,"13.4-13.7":0.00173,"14.0-14.4":0.00368,"14.5-14.8":0.00389,"15.0-15.1":0.00368,"15.2-15.3":0.00281,"15.4":0.00324,"15.5":0.00368,"15.6-15.8":0.048,"16.0":0.00649,"16.1":0.01211,"16.2":0.00627,"16.3":0.01124,"16.4":0.00281,"16.5":0.00497,"16.6-16.7":0.06422,"17.0":0.00454,"17.1":0.00692,"17.2":0.00497,"17.3":0.00735,"17.4":0.01297,"17.5":0.02227,"17.6-17.7":0.05622,"18.0":0.01276,"18.1":0.02638,"18.2":0.01427,"18.3":0.04584,"18.4":0.02357,"18.5-18.6":1.20178,"26.0":0.14855,"26.1":0.00541},P:{"25":0.01082,"26":0.01082,"27":0.01082,"28":0.43277,"29":0.03246,_:"4 20 21 22 23 24 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.01082},I:{"0":0.04494,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00002},K:{"0":0.0765,_:"10 11 12 11.1 11.5 12.1"},A:{"8":0.0093,"9":0.0186,"11":0.0186,_:"6 7 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.04275},Q:{_:"14.9"},O:{"0":0.0045},H:{"0":0},L:{"0":20.48125}};
@@ -0,0 +1,190 @@
/*
* Module dependencies
*/
import * as ElementType from "domelementtype";
import { encodeXML, escapeAttribute, escapeText } from "entities";
/**
* Mixed-case SVG and MathML tags & attributes
* recognized by the HTML parser.
*
* @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign
*/
import { elementNames, attributeNames } from "./foreignNames.js";
const unencodedElements = new Set([
"style",
"script",
"xmp",
"iframe",
"noembed",
"noframes",
"plaintext",
"noscript",
]);
function replaceQuotes(value) {
return value.replace(/"/g, "&quot;");
}
/**
* Format attributes
*/
function formatAttributes(attributes, opts) {
var _a;
if (!attributes)
return;
const encode = ((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) === false
? replaceQuotes
: opts.xmlMode || opts.encodeEntities !== "utf8"
? encodeXML
: escapeAttribute;
return Object.keys(attributes)
.map((key) => {
var _a, _b;
const value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : "";
if (opts.xmlMode === "foreign") {
/* Fix up mixed-case attribute names */
key = (_b = attributeNames.get(key)) !== null && _b !== void 0 ? _b : key;
}
if (!opts.emptyAttrs && !opts.xmlMode && value === "") {
return key;
}
return `${key}="${encode(value)}"`;
})
.join(" ");
}
/**
* Self-enclosing tags
*/
const singleTag = new Set([
"area",
"base",
"basefont",
"br",
"col",
"command",
"embed",
"frame",
"hr",
"img",
"input",
"isindex",
"keygen",
"link",
"meta",
"param",
"source",
"track",
"wbr",
]);
/**
* Renders a DOM node or an array of DOM nodes to a string.
*
* Can be thought of as the equivalent of the `outerHTML` of the passed node(s).
*
* @param node Node to be rendered.
* @param options Changes serialization behavior
*/
export function render(node, options = {}) {
const nodes = "length" in node ? node : [node];
let output = "";
for (let i = 0; i < nodes.length; i++) {
output += renderNode(nodes[i], options);
}
return output;
}
export default render;
function renderNode(node, options) {
switch (node.type) {
case ElementType.Root:
return render(node.children, options);
// @ts-expect-error We don't use `Doctype` yet
case ElementType.Doctype:
case ElementType.Directive:
return renderDirective(node);
case ElementType.Comment:
return renderComment(node);
case ElementType.CDATA:
return renderCdata(node);
case ElementType.Script:
case ElementType.Style:
case ElementType.Tag:
return renderTag(node, options);
case ElementType.Text:
return renderText(node, options);
}
}
const foreignModeIntegrationPoints = new Set([
"mi",
"mo",
"mn",
"ms",
"mtext",
"annotation-xml",
"foreignObject",
"desc",
"title",
]);
const foreignElements = new Set(["svg", "math"]);
function renderTag(elem, opts) {
var _a;
// Handle SVG / MathML in HTML
if (opts.xmlMode === "foreign") {
/* Fix up mixed-case element names */
elem.name = (_a = elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;
/* Exit foreign mode at integration points */
if (elem.parent &&
foreignModeIntegrationPoints.has(elem.parent.name)) {
opts = { ...opts, xmlMode: false };
}
}
if (!opts.xmlMode && foreignElements.has(elem.name)) {
opts = { ...opts, xmlMode: "foreign" };
}
let tag = `<${elem.name}`;
const attribs = formatAttributes(elem.attribs, opts);
if (attribs) {
tag += ` ${attribs}`;
}
if (elem.children.length === 0 &&
(opts.xmlMode
? // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags
opts.selfClosingTags !== false
: // User explicitly asked for self-closing tags, even in HTML mode
opts.selfClosingTags && singleTag.has(elem.name))) {
if (!opts.xmlMode)
tag += " ";
tag += "/>";
}
else {
tag += ">";
if (elem.children.length > 0) {
tag += render(elem.children, opts);
}
if (opts.xmlMode || !singleTag.has(elem.name)) {
tag += `</${elem.name}>`;
}
}
return tag;
}
function renderDirective(elem) {
return `<${elem.data}>`;
}
function renderText(elem, opts) {
var _a;
let data = elem.data || "";
// If entities weren't decoded, no need to encode them back
if (((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) !== false &&
!(!opts.xmlMode &&
elem.parent &&
unencodedElements.has(elem.parent.name))) {
data =
opts.xmlMode || opts.encodeEntities !== "utf8"
? encodeXML(data)
: escapeText(data);
}
return data;
}
function renderCdata(elem) {
return `<![CDATA[${elem.children[0].data}]]>`;
}
function renderComment(elem) {
return `<!--${elem.data}-->`;
}
@@ -0,0 +1,5 @@
import { Newable } from '@inversifyjs/common';
import { AutobindOptions } from '../models/AutobindOptions';
import { InstanceBinding } from '../models/InstanceBinding';
export declare function buildInstanceBinding<TResolved = unknown>(autobindOptions: AutobindOptions, serviceIdentifier: Newable): InstanceBinding<TResolved>;
//# sourceMappingURL=buildInstanceBinding.d.ts.map
@@ -0,0 +1,145 @@
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "DateFormatter", () => $8f23a04ae90a588b$export$ad991b66133851cf);
/*
* 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.
*/ let $8f23a04ae90a588b$var$formatterCache = new Map();
class $8f23a04ae90a588b$export$ad991b66133851cf {
/** Formats a date as a string according to the locale and format options passed to the constructor. */ format(value) {
return this.formatter.format(value);
}
/** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */ formatToParts(value) {
return this.formatter.formatToParts(value);
}
/** Formats a date range as a string. */ formatRange(start, end) {
// @ts-ignore
if (typeof this.formatter.formatRange === 'function') // @ts-ignore
return this.formatter.formatRange(start, end);
if (end < start) throw new RangeError('End date must be >= start date');
// Very basic fallback for old browsers.
return `${this.formatter.format(start)} \u{2013} ${this.formatter.format(end)}`;
}
/** Formats a date range as an array of parts. */ formatRangeToParts(start, end) {
// @ts-ignore
if (typeof this.formatter.formatRangeToParts === 'function') // @ts-ignore
return this.formatter.formatRangeToParts(start, end);
if (end < start) throw new RangeError('End date must be >= start date');
let startParts = this.formatter.formatToParts(start);
let endParts = this.formatter.formatToParts(end);
return [
...startParts.map((p)=>({
...p,
source: 'startRange'
})),
{
type: 'literal',
value: " \u2013 ",
source: 'shared'
},
...endParts.map((p)=>({
...p,
source: 'endRange'
}))
];
}
/** Returns the resolved formatting options based on the values passed to the constructor. */ resolvedOptions() {
let resolvedOptions = this.formatter.resolvedOptions();
if ($8f23a04ae90a588b$var$hasBuggyResolvedHourCycle()) {
if (!this.resolvedHourCycle) this.resolvedHourCycle = $8f23a04ae90a588b$var$getResolvedHourCycle(resolvedOptions.locale, this.options);
resolvedOptions.hourCycle = this.resolvedHourCycle;
resolvedOptions.hour12 = this.resolvedHourCycle === 'h11' || this.resolvedHourCycle === 'h12';
}
// Safari uses a different name for the Ethiopic (Amete Alem) calendar.
// https://bugs.webkit.org/show_bug.cgi?id=241564
if (resolvedOptions.calendar === 'ethiopic-amete-alem') resolvedOptions.calendar = 'ethioaa';
return resolvedOptions;
}
constructor(locale, options = {}){
this.formatter = $8f23a04ae90a588b$var$getCachedDateFormatter(locale, options);
this.options = options;
}
}
// There are multiple bugs involving the hour12 and hourCycle options in various browser engines.
// - Chrome [1] (and the ECMA 402 spec [2]) resolve hour12: false in English and other locales to h24 (24:00 - 23:59)
// rather than h23 (00:00 - 23:59). Same can happen with hour12: true in French, which Chrome resolves to h11 (00:00 - 11:59)
// rather than h12 (12:00 - 11:59).
// - WebKit returns an incorrect hourCycle resolved option in the French locale due to incorrect parsing of 'h' literal
// in the resolved pattern. It also formats incorrectly when specifying the hourCycle option for the same reason. [3]
// [1] https://bugs.chromium.org/p/chromium/issues/detail?id=1045791
// [2] https://github.com/tc39/ecma402/issues/402
// [3] https://bugs.webkit.org/show_bug.cgi?id=229313
// https://github.com/unicode-org/cldr/blob/018b55eff7ceb389c7e3fc44e2f657eae3b10b38/common/supplemental/supplementalData.xml#L4774-L4802
const $8f23a04ae90a588b$var$hour12Preferences = {
true: {
// Only Japanese uses the h11 style for 12 hour time. All others use h12.
ja: 'h11'
},
false: {
}
};
function $8f23a04ae90a588b$var$getCachedDateFormatter(locale, options = {}) {
// Work around buggy hour12 behavior in Chrome / ECMA 402 spec by using hourCycle instead.
// Only apply the workaround if the issue is detected, because the hourCycle option is buggy in Safari.
if (typeof options.hour12 === 'boolean' && $8f23a04ae90a588b$var$hasBuggyHour12Behavior()) {
options = {
...options
};
let pref = $8f23a04ae90a588b$var$hour12Preferences[String(options.hour12)][locale.split('-')[0]];
let defaultHourCycle = options.hour12 ? 'h12' : 'h23';
options.hourCycle = pref !== null && pref !== void 0 ? pref : defaultHourCycle;
delete options.hour12;
}
let cacheKey = locale + (options ? Object.entries(options).sort((a, b)=>a[0] < b[0] ? -1 : 1).join() : '');
if ($8f23a04ae90a588b$var$formatterCache.has(cacheKey)) return $8f23a04ae90a588b$var$formatterCache.get(cacheKey);
let numberFormatter = new Intl.DateTimeFormat(locale, options);
$8f23a04ae90a588b$var$formatterCache.set(cacheKey, numberFormatter);
return numberFormatter;
}
let $8f23a04ae90a588b$var$_hasBuggyHour12Behavior = null;
function $8f23a04ae90a588b$var$hasBuggyHour12Behavior() {
if ($8f23a04ae90a588b$var$_hasBuggyHour12Behavior == null) $8f23a04ae90a588b$var$_hasBuggyHour12Behavior = new Intl.DateTimeFormat('en-US', {
hour: 'numeric',
hour12: false
}).format(new Date(2020, 2, 3, 0)) === '24';
return $8f23a04ae90a588b$var$_hasBuggyHour12Behavior;
}
let $8f23a04ae90a588b$var$_hasBuggyResolvedHourCycle = null;
function $8f23a04ae90a588b$var$hasBuggyResolvedHourCycle() {
if ($8f23a04ae90a588b$var$_hasBuggyResolvedHourCycle == null) $8f23a04ae90a588b$var$_hasBuggyResolvedHourCycle = new Intl.DateTimeFormat('fr', {
hour: 'numeric',
hour12: false
}).resolvedOptions().hourCycle === 'h12';
return $8f23a04ae90a588b$var$_hasBuggyResolvedHourCycle;
}
function $8f23a04ae90a588b$var$getResolvedHourCycle(locale, options) {
if (!options.timeStyle && !options.hour) return undefined;
// Work around buggy results in resolved hourCycle and hour12 options in WebKit.
// Format the minimum possible hour and maximum possible hour in a day and parse the results.
locale = locale.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, '');
locale += (locale.includes('-u-') ? '' : '-u') + '-nu-latn';
let formatter = $8f23a04ae90a588b$var$getCachedDateFormatter(locale, {
...options,
timeZone: undefined // use local timezone
});
let min = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 0)).find((p)=>p.type === 'hour').value, 10);
let max = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 23)).find((p)=>p.type === 'hour').value, 10);
if (min === 0 && max === 23) return 'h23';
if (min === 24 && max === 23) return 'h24';
if (min === 0 && max === 11) return 'h11';
if (min === 12 && max === 11) return 'h12';
throw new Error('Unexpected hour cycle result');
}
//# sourceMappingURL=DateFormatter.main.js.map
@@ -0,0 +1 @@
{"name":"minipass-collect","version":"1.0.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532121274,"integrity":"sha512-P6dI5Z+zrwxSk1MIRPqpYG2ScYNkidLIATQXd50QzBgBh/XmcEd/nsd9NB4O9k6rfc+4dsY5DwJ7xvhpoS0PRg==","mode":420,"size":765},"index.js":{"checkedAt":1794532121274,"integrity":"sha512-OwHz7EqUiIXQKBOuEdw5aIrQvaDmVFibIoxU3PilD25c5mcPGhRwDuAuuFwDfDHdXnG+zNOEThCAKOytdhIuhQ==","mode":420,"size":1990},"package.json":{"checkedAt":1794532121274,"integrity":"sha512-kJg+oGYFtMllmqMy64Z11wA2IYeqZ8nDOzJ/W+LBPxW52oamDXvbUKOFB0bxqkHGoDxUxUkYocIOhHBaHIMGcA==","mode":420,"size":609},"README.md":{"checkedAt":1794532121274,"integrity":"sha512-JKeXvXruS+8zfY+gatDp1ChRodBxgT1eXk6ymN6rQSdUa0JdMNpoRHMSkZ+w887IozCBiHc0uzgCgJhpn97DWw==","mode":420,"size":1506}}}
@@ -0,0 +1,110 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports._parseAuthenticatorDataInternals = void 0;
exports.parseAuthenticatorData = parseAuthenticatorData;
const decodeAuthenticatorExtensions_js_1 = require("./decodeAuthenticatorExtensions.js");
const index_js_1 = require("./iso/index.js");
/**
* Make sense of the authData buffer contained in an Attestation
*/
function parseAuthenticatorData(authData) {
if (authData.byteLength < 37) {
throw new Error(`Authenticator data was ${authData.byteLength} bytes, expected at least 37 bytes`);
}
let pointer = 0;
const dataView = index_js_1.isoUint8Array.toDataView(authData);
const rpIdHash = authData.slice(pointer, pointer += 32);
const flagsBuf = authData.slice(pointer, pointer += 1);
const flagsInt = flagsBuf[0];
// Bit positions can be referenced here:
// https://www.w3.org/TR/webauthn-2/#flags
const flags = {
up: !!(flagsInt & (1 << 0)), // User Presence
uv: !!(flagsInt & (1 << 2)), // User Verified
be: !!(flagsInt & (1 << 3)), // Backup Eligibility
bs: !!(flagsInt & (1 << 4)), // Backup State
at: !!(flagsInt & (1 << 6)), // Attested Credential Data Present
ed: !!(flagsInt & (1 << 7)), // Extension Data Present
flagsInt,
};
const counterBuf = authData.slice(pointer, pointer + 4);
const counter = dataView.getUint32(pointer, false);
pointer += 4;
let aaguid = undefined;
let credentialID = undefined;
let credentialPublicKey = undefined;
if (flags.at) {
aaguid = authData.slice(pointer, pointer += 16);
const credIDLen = dataView.getUint16(pointer);
pointer += 2;
credentialID = authData.slice(pointer, pointer += credIDLen);
/**
* Firefox 117 incorrectly CBOR-encodes authData when EdDSA (-8) is used for the public key.
* A CBOR "Map of 3 items" (0xa3) should be "Map of 4 items" (0xa4), and if we manually adjust
* the single byte there's a good chance the authData can be correctly parsed.
*
* This browser release also incorrectly uses the string labels "OKP" and "Ed25519" instead of
* their integer representations for kty and crv respectively. That's why the COSE public key
* in the hex below looks so odd.
*/
// Bytes decode to `{ 1: "OKP", 3: -8, -1: "Ed25519" }` (it's missing key -2 a.k.a. COSEKEYS.x)
const badEdDSACBOR = index_js_1.isoUint8Array.fromHex('a301634f4b500327206745643235353139');
const bytesAtCurrentPosition = authData.slice(pointer, pointer + badEdDSACBOR.byteLength);
let foundBadCBOR = false;
if (index_js_1.isoUint8Array.areEqual(badEdDSACBOR, bytesAtCurrentPosition)) {
// Change the bad CBOR 0xa3 to 0xa4 so that the credential public key can be recognized
foundBadCBOR = true;
authData[pointer] = 0xa4;
}
// Decode the next CBOR item in the buffer, then re-encode it back to a Buffer
const firstDecoded = index_js_1.isoCBOR.decodeFirst(authData.slice(pointer));
const firstEncoded = Uint8Array.from(
/**
* Casting to `Map` via `as unknown` here because TS doesn't make it possible to define Maps
* with discrete keys and properties with known types per pair, and CBOR libs typically parse
* CBOR Major Type 5 to `Map` because you can have numbers for keys. A `COSEPublicKey` can be
* generalized as "a Map with numbers for keys and either numbers or bytes for values" though.
* If this presumption falls apart then other parts of verification later on will fail so we
* should be safe doing this here.
*/
index_js_1.isoCBOR.encode(firstDecoded));
if (foundBadCBOR) {
// Restore the bit we changed so that `authData` is the same as it came in and won't break
// signature verification.
authData[pointer] = 0xa3;
}
credentialPublicKey = firstEncoded;
pointer += firstEncoded.byteLength;
}
let extensionsData = undefined;
let extensionsDataBuffer = undefined;
if (flags.ed) {
const firstDecoded = index_js_1.isoCBOR.decodeFirst(authData.slice(pointer));
extensionsDataBuffer = Uint8Array.from(index_js_1.isoCBOR.encode(firstDecoded));
extensionsData = (0, decodeAuthenticatorExtensions_js_1.decodeAuthenticatorExtensions)(extensionsDataBuffer);
pointer += extensionsDataBuffer.byteLength;
}
// Pointer should be at the end of the authenticator data, otherwise too much data was sent
if (authData.byteLength > pointer) {
throw new Error('Leftover bytes detected while parsing authenticator data');
}
return exports._parseAuthenticatorDataInternals.stubThis({
rpIdHash,
flagsBuf,
flags,
counter,
counterBuf,
aaguid,
credentialID,
credentialPublicKey,
extensionsData,
extensionsDataBuffer,
});
}
/**
* Make it possible to stub the return value during testing
* @ignore Don't include this in docs output
*/
exports._parseAuthenticatorDataInternals = {
stubThis: (value) => value,
};
@@ -0,0 +1,19 @@
"use client";
// src/utils/index.ts
import { isAppleDevice } from "@react-aria/utils";
import { isMac } from "@react-aria/utils";
function isNonContiguousSelectionModifier(e) {
return isAppleDevice() ? e.altKey : e.ctrlKey;
}
function isCtrlKeyPressed(e) {
if (isMac()) {
return e.metaKey;
}
return e.ctrlKey;
}
export {
isNonContiguousSelectionModifier,
isCtrlKeyPressed
};
@@ -0,0 +1,98 @@
import { IsObject, IsArray, IsTypedArray, IsValueType } from '../guard/index.mjs';
import { ValuePointer } from '../pointer/index.mjs';
import { Clone } from '../clone/index.mjs';
import { TypeBoxError } from '../../type/error/index.mjs';
// ------------------------------------------------------------------
// IsStandardObject
// ------------------------------------------------------------------
function IsStandardObject(value) {
return IsObject(value) && !IsArray(value);
}
// ------------------------------------------------------------------
// Errors
// ------------------------------------------------------------------
export class ValueMutateError extends TypeBoxError {
constructor(message) {
super(message);
}
}
function ObjectType(root, path, current, next) {
if (!IsStandardObject(current)) {
ValuePointer.Set(root, path, Clone(next));
}
else {
const currentKeys = Object.getOwnPropertyNames(current);
const nextKeys = Object.getOwnPropertyNames(next);
for (const currentKey of currentKeys) {
if (!nextKeys.includes(currentKey)) {
delete current[currentKey];
}
}
for (const nextKey of nextKeys) {
if (!currentKeys.includes(nextKey)) {
current[nextKey] = null;
}
}
for (const nextKey of nextKeys) {
Visit(root, `${path}/${nextKey}`, current[nextKey], next[nextKey]);
}
}
}
function ArrayType(root, path, current, next) {
if (!IsArray(current)) {
ValuePointer.Set(root, path, Clone(next));
}
else {
for (let index = 0; index < next.length; index++) {
Visit(root, `${path}/${index}`, current[index], next[index]);
}
current.splice(next.length);
}
}
function TypedArrayType(root, path, current, next) {
if (IsTypedArray(current) && current.length === next.length) {
for (let i = 0; i < current.length; i++) {
current[i] = next[i];
}
}
else {
ValuePointer.Set(root, path, Clone(next));
}
}
function ValueType(root, path, current, next) {
if (current === next)
return;
ValuePointer.Set(root, path, next);
}
function Visit(root, path, current, next) {
if (IsArray(next))
return ArrayType(root, path, current, next);
if (IsTypedArray(next))
return TypedArrayType(root, path, current, next);
if (IsStandardObject(next))
return ObjectType(root, path, current, next);
if (IsValueType(next))
return ValueType(root, path, current, next);
}
// ------------------------------------------------------------------
// IsNonMutableValue
// ------------------------------------------------------------------
function IsNonMutableValue(value) {
return IsTypedArray(value) || IsValueType(value);
}
function IsMismatchedValue(current, next) {
// prettier-ignore
return ((IsStandardObject(current) && IsArray(next)) ||
(IsArray(current) && IsStandardObject(next)));
}
// ------------------------------------------------------------------
// Mutate
// ------------------------------------------------------------------
/** `[Mutable]` Performs a deep mutable value assignment while retaining internal references */
export function Mutate(current, next) {
if (IsNonMutableValue(current) || IsNonMutableValue(next))
throw new ValueMutateError('Only object and array types can be mutated at the root level');
if (IsMismatchedValue(current, next))
throw new ValueMutateError('Cannot assign due type mismatch of assignable values');
Visit(current, '', current, next);
}
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return bigSign;
}
});
function bigSign(bigIntValue) {
return (bigIntValue > 0n) - (bigIntValue < 0n);
}
@@ -0,0 +1 @@
{"name":"@babel/plugin-transform-react-jsx-self","version":"7.27.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532117543,"integrity":"sha512-KYRMN3MVTuiy5XkFDHd5PnQmHaQnt3z16nsBDePxZ9YNmq7IFlslpBBlR3UI+zvlbEemzowOYeKil9a0ZkOYxQ==","mode":420,"size":1106},"README.md":{"checkedAt":1794532117543,"integrity":"sha512-l5yrThD8/UxJ+tqqo1cvDJnimvA5Pluwzb0Z19DhIk7fbpC902BO7rz7ab2WlzXouHo6B+tI04ONZljRsGHu0Q==","mode":420,"size":403},"lib/index.js":{"checkedAt":1794532117543,"integrity":"sha512-9jAe3PrcZiQt2PYoZ1R08Bl/HCfMmjccGUu4fzB9L1SZMPn839kT2uX+lArFFK+GEuM/N1Nwtu4+WkjIqyL5Zg==","mode":420,"size":1578},"lib/index.js.map":{"checkedAt":1794532117543,"integrity":"sha512-0ioxFHOREKDRXytCasLEwqjqhT36uE0lvvcQiAADnZBbiQKFywHybYNAkvnYYpGsRRnuEtLDTfcQvNPotx0ZsA==","mode":420,"size":5022},"package.json":{"checkedAt":1794532117543,"integrity":"sha512-2fn0bOwgnW4eDuXpx8LWJNZU4DkH8e3Wnw2Jim4qz5TOPM3YmInzemFljJXa6z0OARb/Q3PLGEPxi3LCGr5TWA==","mode":420,"size":913}}}
@@ -0,0 +1,19 @@
# @babel/parser
> A JavaScript parser
See our website [@babel/parser](https://babeljs.io/docs/babel-parser) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20parser%22+is%3Aopen) associated with this package.
## Install
Using npm:
```sh
npm install --save-dev @babel/parser
```
or using yarn:
```sh
yarn add @babel/parser --dev
```
@@ -0,0 +1,8 @@
import {
kbdKeysLabelMap,
kbdKeysMap
} from "./chunk-7BVYOJX6.mjs";
export {
kbdKeysLabelMap,
kbdKeysMap
};
@@ -0,0 +1,72 @@
/*global navigator*/
'use strict';
const {
REGEX_BACKSLASH,
REGEX_REMOVE_BACKSLASH,
REGEX_SPECIAL_CHARS,
REGEX_SPECIAL_CHARS_GLOBAL
} = require('./constants');
exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
exports.isWindows = () => {
if (typeof navigator !== 'undefined' && navigator.platform) {
const platform = navigator.platform.toLowerCase();
return platform === 'win32' || platform === 'windows';
}
if (typeof process !== 'undefined' && process.platform) {
return process.platform === 'win32';
}
return false;
};
exports.removeBackslashes = str => {
return str.replace(REGEX_REMOVE_BACKSLASH, match => {
return match === '\\' ? '' : match;
});
};
exports.escapeLast = (input, char, lastIdx) => {
const idx = input.lastIndexOf(char, lastIdx);
if (idx === -1) return input;
if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
return `${input.slice(0, idx)}\\${input.slice(idx)}`;
};
exports.removePrefix = (input, state = {}) => {
let output = input;
if (output.startsWith('./')) {
output = output.slice(2);
state.prefix = './';
}
return output;
};
exports.wrapOutput = (input, state = {}, options = {}) => {
const prepend = options.contains ? '' : '^';
const append = options.contains ? '' : '$';
let output = `${prepend}(?:${input})${append}`;
if (state.negated === true) {
output = `(?:^(?!${output}).*$)`;
}
return output;
};
exports.basename = (path, { windows } = {}) => {
const segs = path.split(windows ? /[\\/]/ : '/');
const last = segs[segs.length - 1];
if (last === '') {
return segs[segs.length - 2];
}
return last;
};
@@ -0,0 +1,3 @@
import * as z from "./external.js";
export * from "./external.js";
export { z };
@@ -0,0 +1,5 @@
export default (function (o, c) {
c.prototype.isSameOrAfter = function (that, units) {
return this.isSame(that, units) || this.isAfter(that, units);
};
});
@@ -0,0 +1 @@
{"version":3,"names":["_index","require","traverse","node","handlers","state","enter","exit","traverseSimpleImpl","ancestors","keys","VISITOR_KEYS","type","key","subNode","Array","isArray","i","length","child","push","index","pop"],"sources":["../../src/traverse/traverse.ts"],"sourcesContent":["import { VISITOR_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\nexport type TraversalAncestors = Array<{\n node: t.Node;\n key: string;\n index?: number;\n}>;\n\nexport type TraversalHandler<T> = (\n this: undefined,\n node: t.Node,\n parent: TraversalAncestors,\n state: T,\n) => void;\n\nexport type TraversalHandlers<T> = {\n enter?: TraversalHandler<T>;\n exit?: TraversalHandler<T>;\n};\n\n/**\n * A general AST traversal with both prefix and postfix handlers, and a\n * state object. Exposes ancestry data to each handler so that more complex\n * AST data can be taken into account.\n */\nexport default function traverse<T>(\n node: t.Node,\n handlers: TraversalHandler<T> | TraversalHandlers<T>,\n state?: T,\n): void {\n if (typeof handlers === \"function\") {\n handlers = { enter: handlers };\n }\n\n const { enter, exit } = handlers;\n\n traverseSimpleImpl(node, enter, exit, state, []);\n}\n\nfunction traverseSimpleImpl<T>(\n node: any,\n enter: Function | undefined,\n exit: Function | undefined,\n state: T | undefined,\n ancestors: TraversalAncestors,\n) {\n const keys = VISITOR_KEYS[node.type];\n if (!keys) return;\n\n if (enter) enter(node, ancestors, state);\n\n for (const key of keys) {\n const subNode = node[key];\n\n if (Array.isArray(subNode)) {\n for (let i = 0; i < subNode.length; i++) {\n const child = subNode[i];\n if (!child) continue;\n\n ancestors.push({\n node,\n key,\n index: i,\n });\n\n traverseSimpleImpl(child, enter, exit, state, ancestors);\n\n ancestors.pop();\n }\n } else if (subNode) {\n ancestors.push({\n node,\n key,\n });\n\n traverseSimpleImpl(subNode, enter, exit, state, ancestors);\n\n ancestors.pop();\n }\n }\n\n if (exit) exit(node, ancestors, state);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AA0Be,SAASC,QAAQA,CAC9BC,IAAY,EACZC,QAAoD,EACpDC,KAAS,EACH;EACN,IAAI,OAAOD,QAAQ,KAAK,UAAU,EAAE;IAClCA,QAAQ,GAAG;MAAEE,KAAK,EAAEF;IAAS,CAAC;EAChC;EAEA,MAAM;IAAEE,KAAK;IAAEC;EAAK,CAAC,GAAGH,QAAQ;EAEhCI,kBAAkB,CAACL,IAAI,EAAEG,KAAK,EAAEC,IAAI,EAAEF,KAAK,EAAE,EAAE,CAAC;AAClD;AAEA,SAASG,kBAAkBA,CACzBL,IAAS,EACTG,KAA2B,EAC3BC,IAA0B,EAC1BF,KAAoB,EACpBI,SAA6B,EAC7B;EACA,MAAMC,IAAI,GAAGC,mBAAY,CAACR,IAAI,CAACS,IAAI,CAAC;EACpC,IAAI,CAACF,IAAI,EAAE;EAEX,IAAIJ,KAAK,EAAEA,KAAK,CAACH,IAAI,EAAEM,SAAS,EAAEJ,KAAK,CAAC;EAExC,KAAK,MAAMQ,GAAG,IAAIH,IAAI,EAAE;IACtB,MAAMI,OAAO,GAAGX,IAAI,CAACU,GAAG,CAAC;IAEzB,IAAIE,KAAK,CAACC,OAAO,CAACF,OAAO,CAAC,EAAE;MAC1B,KAAK,IAAIG,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,OAAO,CAACI,MAAM,EAAED,CAAC,EAAE,EAAE;QACvC,MAAME,KAAK,GAAGL,OAAO,CAACG,CAAC,CAAC;QACxB,IAAI,CAACE,KAAK,EAAE;QAEZV,SAAS,CAACW,IAAI,CAAC;UACbjB,IAAI;UACJU,GAAG;UACHQ,KAAK,EAAEJ;QACT,CAAC,CAAC;QAEFT,kBAAkB,CAACW,KAAK,EAAEb,KAAK,EAAEC,IAAI,EAAEF,KAAK,EAAEI,SAAS,CAAC;QAExDA,SAAS,CAACa,GAAG,CAAC,CAAC;MACjB;IACF,CAAC,MAAM,IAAIR,OAAO,EAAE;MAClBL,SAAS,CAACW,IAAI,CAAC;QACbjB,IAAI;QACJU;MACF,CAAC,CAAC;MAEFL,kBAAkB,CAACM,OAAO,EAAER,KAAK,EAAEC,IAAI,EAAEF,KAAK,EAAEI,SAAS,CAAC;MAE1DA,SAAS,CAACa,GAAG,CAAC,CAAC;IACjB;EACF;EAEA,IAAIf,IAAI,EAAEA,IAAI,CAACJ,IAAI,EAAEM,SAAS,EAAEJ,KAAK,CAAC;AACxC","ignoreList":[]}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016 Jon Schlinkert
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,59 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TemplateLiteralSyntax = TemplateLiteralSyntax;
const index_1 = require("../literal/index");
const index_2 = require("../boolean/index");
const index_3 = require("../bigint/index");
const index_4 = require("../number/index");
const index_5 = require("../string/index");
const index_6 = require("../union/index");
const index_7 = require("../never/index");
// ------------------------------------------------------------------
// SyntaxParsers
// ------------------------------------------------------------------
// prettier-ignore
function* FromUnion(syntax) {
const trim = syntax.trim().replace(/"|'/g, '');
return (trim === 'boolean' ? yield (0, index_2.Boolean)() :
trim === 'number' ? yield (0, index_4.Number)() :
trim === 'bigint' ? yield (0, index_3.BigInt)() :
trim === 'string' ? yield (0, index_5.String)() :
yield (() => {
const literals = trim.split('|').map((literal) => (0, index_1.Literal)(literal.trim()));
return (literals.length === 0 ? (0, index_7.Never)() :
literals.length === 1 ? literals[0] :
(0, index_6.UnionEvaluated)(literals));
})());
}
// prettier-ignore
function* FromTerminal(syntax) {
if (syntax[1] !== '{') {
const L = (0, index_1.Literal)('$');
const R = FromSyntax(syntax.slice(1));
return yield* [L, ...R];
}
for (let i = 2; i < syntax.length; i++) {
if (syntax[i] === '}') {
const L = FromUnion(syntax.slice(2, i));
const R = FromSyntax(syntax.slice(i + 1));
return yield* [...L, ...R];
}
}
yield (0, index_1.Literal)(syntax);
}
// prettier-ignore
function* FromSyntax(syntax) {
for (let i = 0; i < syntax.length; i++) {
if (syntax[i] === '$') {
const L = (0, index_1.Literal)(syntax.slice(0, i));
const R = FromTerminal(syntax.slice(i));
return yield* [L, ...R];
}
}
yield (0, index_1.Literal)(syntax);
}
/** Parses TemplateLiteralSyntax and returns a tuple of TemplateLiteralKinds */
function TemplateLiteralSyntax(syntax) {
return [...FromSyntax(syntax)];
}
@@ -0,0 +1,66 @@
/**
* @file 对ttf对象进行优化,查找错误,去除冗余点
* @author mengke01(kekee000@gmail.com)
*/
import reduceGlyf from './reduceGlyf';
import pathCeil from '../../graphics/pathCeil';
/**
* 对ttf对象进行优化
*
* @param {Object} ttf ttf对象
* @return {true|Object} 错误信息
*/
export default function optimizettf(ttf) {
const checkUnicodeRepeat = {}; // 检查是否有重复代码点
const repeatList = [];
ttf.glyf.forEach((glyf, index) => {
if (glyf.unicode) {
glyf.unicode = glyf.unicode.sort();
// 将glyf的代码点按小到大排序
glyf.unicode.sort((a, b) => a - b).forEach((u) => {
if (checkUnicodeRepeat[u]) {
repeatList.push(index);
}
else {
checkUnicodeRepeat[u] = true;
}
});
}
if (!glyf.compound && glyf.contours) {
// 整数化
glyf.contours.forEach((contour) => {
pathCeil(contour);
});
// 缩减glyf
reduceGlyf(glyf);
}
// 整数化
glyf.xMin = Math.round(glyf.xMin || 0);
glyf.xMax = Math.round(glyf.xMax || 0);
glyf.yMin = Math.round(glyf.yMin || 0);
glyf.yMax = Math.round(glyf.yMax || 0);
glyf.leftSideBearing = Math.round(glyf.leftSideBearing || 0);
glyf.advanceWidth = Math.round(glyf.advanceWidth || 0);
});
// 过滤无轮廓字体,如果存在复合字形不进行过滤
if (!ttf.glyf.some((a) => a.compound)) {
ttf.glyf = ttf.glyf.filter((glyf, index) => index === 0 || glyf.contours && glyf.contours.length);
}
if (!repeatList.length) {
return true;
}
return {
repeat: repeatList
};
}
@@ -0,0 +1 @@
{"name":"@types/triple-beam","version":"1.3.5","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532089978,"integrity":"sha512-HQaIQk9pwOcyKutyDk4o2a87WnotwYuLGYFW43emGm4FvIJFKPyg+OYaw5sTegKAKf+C5SKa1ACjzCLivbaHrQ==","mode":420,"size":1141},"README.md":{"checkedAt":1794532101346,"integrity":"sha512-5zDYR4kyYK0A/FpFtPPrwpc5nODX4wcljtjloXmwxUsBjl144uJzZR5/xDkjP+ZoHrrcB2xkAf4EyxIFhreJJw==","mode":420,"size":1013},"index.d.ts":{"checkedAt":1794532101346,"integrity":"sha512-gfhDetgvwc4U7htPPd0GBEf86BAJuStP5thYQxD8kCsihGFpj6nYe7Y8oGJPkSN8ksXknMtbpMe//5PJPZ9UDw==","mode":420,"size":403},"package.json":{"checkedAt":1794532101347,"integrity":"sha512-m81FzF0XtE6ewcGGiWTVHnnngvTSpPgc3vmFSgV+DOJkVgOraYSGyQFxE1gW2JOFpGCEwV/FWsLHiZKWaIAUAQ==","mode":420,"size":804}}}
@@ -0,0 +1,2 @@
import 'reflect-metadata';
//# sourceMappingURL=tagged.int.spec.d.ts.map
@@ -0,0 +1,8 @@
export { CheckLinearIcon } from './check.js';
export { CopyLinearIcon } from './copy.js';
export { ChevronCircleTopLinearIcon } from './chevron-circle-top.js';
export { SearchLinearIcon } from './search.js';
export { ClockCircleLinearIcon } from './clock-circle-linear.js';
import 'react/jsx-runtime';
import '../types.js';
import 'react';
@@ -0,0 +1,24 @@
"use client";
import {
useButtonGroup
} from "./chunk-6XRBX2TW.mjs";
import {
ButtonGroupProvider
} from "./chunk-3SAWKTTV.mjs";
// src/button-group.tsx
import { forwardRef } from "@heroui/system";
import { jsx } from "react/jsx-runtime";
var ButtonGroup = forwardRef((props, ref) => {
const { Component, domRef, context, children, classNames, getButtonGroupProps } = useButtonGroup({
...props,
ref
});
return /* @__PURE__ */ jsx(ButtonGroupProvider, { value: context, children: /* @__PURE__ */ jsx(Component, { ref: domRef, className: classNames, ...getButtonGroupProps(), children }) });
});
ButtonGroup.displayName = "HeroUI.ButtonGroup";
var button_group_default = ButtonGroup;
export {
button_group_default
};
@@ -0,0 +1,80 @@
import {
Patch,
PatchListener,
Drafted,
Immer,
DRAFT_STATE,
ImmerState,
ArchType,
getPlugin
} from "../internal"
/** Each scope represents a `produce` call. */
export interface ImmerScope {
patches_?: Patch[]
inversePatches_?: Patch[]
canAutoFreeze_: boolean
drafts_: any[]
parent_?: ImmerScope
patchListener_?: PatchListener
immer_: Immer
unfinalizedDrafts_: number
}
let currentScope: ImmerScope | undefined
export function getCurrentScope() {
return currentScope!
}
function createScope(
parent_: ImmerScope | undefined,
immer_: Immer
): ImmerScope {
return {
drafts_: [],
parent_,
immer_,
// Whenever the modified draft contains a draft from another scope, we
// need to prevent auto-freezing so the unowned draft can be finalized.
canAutoFreeze_: true,
unfinalizedDrafts_: 0
}
}
export function usePatchesInScope(
scope: ImmerScope,
patchListener?: PatchListener
) {
if (patchListener) {
getPlugin("Patches") // assert we have the plugin
scope.patches_ = []
scope.inversePatches_ = []
scope.patchListener_ = patchListener
}
}
export function revokeScope(scope: ImmerScope) {
leaveScope(scope)
scope.drafts_.forEach(revokeDraft)
// @ts-ignore
scope.drafts_ = null
}
export function leaveScope(scope: ImmerScope) {
if (scope === currentScope) {
currentScope = scope.parent_
}
}
export function enterScope(immer: Immer) {
return (currentScope = createScope(currentScope, immer))
}
function revokeDraft(draft: Drafted) {
const state: ImmerState = draft[DRAFT_STATE]
if (state.type_ === ArchType.Object || state.type_ === ArchType.Array)
state.revoke_()
else state.revoked_ = true
}
@@ -0,0 +1,39 @@
import { __awaiter, __generator, __read, __spreadArray } from "tslib";
import { useRef, useCallback } from 'react';
function useLockFn(fn) {
var _this = this;
var lockRef = useRef(false);
return useCallback(function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return __awaiter(_this, void 0, void 0, function () {
var ret, e_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (lockRef.current) {
return [2 /*return*/];
}
lockRef.current = true;
_a.label = 1;
case 1:
_a.trys.push([1, 3, 4, 5]);
return [4 /*yield*/, fn.apply(void 0, __spreadArray([], __read(args), false))];
case 2:
ret = _a.sent();
return [2 /*return*/, ret];
case 3:
e_1 = _a.sent();
throw e_1;
case 4:
lockRef.current = false;
return [7 /*endfinally*/];
case 5: return [2 /*return*/];
}
});
});
}, [fn]);
}
export default useLockFn;
@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveFactoryBindingCallback = resolveFactoryBindingCallback;
function resolveFactoryBindingCallback(params, binding) {
return binding.factory(params.context);
}
//# sourceMappingURL=resolveFactoryBindingCallback.js.map
@@ -0,0 +1,157 @@
import { sharedWebSockets } from './globals';
import { DEFAULT_RECONNECT_LIMIT, DEFAULT_RECONNECT_INTERVAL_MS, ReadyState, isEventSourceSupported } from './constants';
import { getSubscribers } from './manage-subscribers';
import { MutableRefObject } from 'react';
import { HeartbeatOptions, Options, SendMessage, WebSocketLike } from './types';
import { setUpSocketIOPing } from './socket-io';
import { heartbeat } from './heartbeat';
const bindMessageHandler = (
webSocketInstance: WebSocketLike,
url: string,
heartbeatOptions?: boolean | HeartbeatOptions
) => {
webSocketInstance.onmessage = (message: WebSocketEventMap['message']) => {
getSubscribers(url).forEach(subscriber => {
if (subscriber.optionsRef.current.onMessage) {
subscriber.optionsRef.current.onMessage(message);
}
if (typeof subscriber?.lastMessageTime?.current === 'number') {
subscriber.lastMessageTime.current = Date.now();
}
if (
typeof subscriber.optionsRef.current.filter === 'function' &&
subscriber.optionsRef.current.filter(message) !== true
) {
return;
}
if (
heartbeatOptions &&
typeof heartbeatOptions !== "boolean" &&
heartbeatOptions?.returnMessage === message.data
)
return;
subscriber.setLastMessage(message);
});
};
};
const bindOpenHandler = (
webSocketInstance: WebSocketLike,
url: string,
heartbeatOptions?: boolean | HeartbeatOptions
) => {
webSocketInstance.onopen = (event: WebSocketEventMap['open']) => {
const subscribers = getSubscribers(url);
subscribers.forEach(subscriber => {
subscriber.reconnectCount.current = 0;
if (subscriber.optionsRef.current.onOpen) {
subscriber.optionsRef.current.onOpen(event);
}
subscriber.setReadyState(ReadyState.OPEN);
let onMessageCb: () => void;
if (heartbeatOptions && webSocketInstance instanceof WebSocket) {
subscriber.lastMessageTime.current = Date.now();
}
});
if (heartbeatOptions && webSocketInstance instanceof WebSocket) {
heartbeat(webSocketInstance, subscribers.map(subscriber => subscriber.lastMessageTime), typeof heartbeatOptions === 'boolean' ? undefined : heartbeatOptions,);
}
};
};
const bindCloseHandler = (
webSocketInstance: WebSocketLike,
url: string,
) => {
if (webSocketInstance instanceof WebSocket) {
webSocketInstance.onclose = (event: WebSocketEventMap['close']) => {
getSubscribers(url).forEach(subscriber => {
if (subscriber.optionsRef.current.onClose) {
subscriber.optionsRef.current.onClose(event);
}
subscriber.setReadyState(ReadyState.CLOSED);
});
delete sharedWebSockets[url];
getSubscribers(url).forEach(subscriber => {
if (
subscriber.optionsRef.current.shouldReconnect &&
subscriber.optionsRef.current.shouldReconnect(event)
) {
const reconnectAttempts = subscriber.optionsRef.current.reconnectAttempts ?? DEFAULT_RECONNECT_LIMIT;
if (subscriber.reconnectCount.current < reconnectAttempts) {
const nextReconnectInterval = typeof subscriber.optionsRef.current.reconnectInterval === 'function' ?
subscriber.optionsRef.current.reconnectInterval(subscriber.reconnectCount.current) :
subscriber.optionsRef.current.reconnectInterval;
setTimeout(() => {
subscriber.reconnectCount.current++;
subscriber.reconnect.current();
}, nextReconnectInterval ?? DEFAULT_RECONNECT_INTERVAL_MS);
} else {
subscriber.optionsRef.current.onReconnectStop && subscriber.optionsRef.current.onReconnectStop(subscriber.optionsRef.current.reconnectAttempts as number);
console.warn(`Max reconnect attempts of ${reconnectAttempts} exceeded`);
}
}
});
};
}
};
const bindErrorHandler = (
webSocketInstance: WebSocketLike,
url: string,
) => {
webSocketInstance.onerror = (error: WebSocketEventMap['error']) => {
getSubscribers(url).forEach(subscriber => {
if (subscriber.optionsRef.current.onError) {
subscriber.optionsRef.current.onError(error);
}
if (isEventSourceSupported && webSocketInstance instanceof EventSource) {
subscriber.optionsRef.current.onClose && subscriber.optionsRef.current.onClose({
...error,
code: 1006,
reason: `An error occurred with the EventSource: ${error}`,
wasClean: false,
});
subscriber.setReadyState(ReadyState.CLOSED);
}
});
if (isEventSourceSupported && webSocketInstance instanceof EventSource) {
webSocketInstance.close();
}
};
};
export const attachSharedListeners = (
webSocketInstance: WebSocketLike,
url: string,
optionsRef: MutableRefObject<Options>,
sendMessage: SendMessage,
) => {
let interval: number;
if (optionsRef.current.fromSocketIO) {
interval = setUpSocketIOPing(sendMessage);
}
bindMessageHandler(webSocketInstance, url, optionsRef.current.heartbeat);
bindCloseHandler(webSocketInstance, url);
bindOpenHandler(webSocketInstance, url, optionsRef.current.heartbeat);
bindErrorHandler(webSocketInstance, url);
return () => {
if (interval) clearInterval(interval);
};
};
@@ -0,0 +1,2 @@
export declare function getDescription(symbol: symbol): string;
//# sourceMappingURL=getDescription.d.ts.map
@@ -0,0 +1,28 @@
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var callBound = require('call-bound');
var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var polyfill = getPolyfill();
var shim = require('./shim');
var $slice = callBound('Array.prototype.slice');
var bound = callBind.apply(polyfill);
// eslint-disable-next-line no-unused-vars
var boundFindLast = function findLastIndex(array, predicate) {
RequireObjectCoercible(array);
return bound(array, $slice(arguments, 1));
};
define(boundFindLast, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = boundFindLast;
@@ -0,0 +1,6 @@
import isEqual from 'react-fast-compare';
export var depsEqual = function (aDeps, bDeps) {
if (aDeps === void 0) { aDeps = []; }
if (bDeps === void 0) { bDeps = []; }
return isEqual(aDeps, bDeps);
};
@@ -0,0 +1,15 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ const $1af922eb41e03c8f$export$e6235c0d09b995d0 = new WeakMap();
export {$1af922eb41e03c8f$export$e6235c0d09b995d0 as gridMap};
//# sourceMappingURL=utils.module.js.map
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _classStaticPrivateFieldDestructureSet;
var _classApplyDescriptorDestructureSet = require("classApplyDescriptorDestructureSet");
var _assertClassBrand = require("assertClassBrand");
var _classCheckPrivateStaticFieldDescriptor = require("classCheckPrivateStaticFieldDescriptor");
function _classStaticPrivateFieldDestructureSet(receiver, classConstructor, descriptor) {
_assertClassBrand(classConstructor, receiver);
_classCheckPrivateStaticFieldDescriptor(descriptor, "set");
return _classApplyDescriptorDestructureSet(receiver, descriptor);
}
//# sourceMappingURL=classStaticPrivateFieldDestructureSet.js.map
@@ -0,0 +1,49 @@
'use strict';
var test = require('tape');
var inspect = require('object-inspect');
var forEach = require('for-each');
var v = require('es-value-fixtures');
var availableTypedArrays = require('available-typed-arrays')();
var isArrayBuffer = require('..');
test('isArrayBuffer', function (t) {
t.equal(typeof isArrayBuffer, 'function', 'is a function');
/** @type {unknown[]} */
var nonABs = [].concat(
// @ts-expect-error TS sucks with [].concat
v.primitives,
v.objects,
typeof SharedArrayBuffer === 'function' ? new SharedArrayBuffer(0) : []
);
forEach(nonABs, function (nonAB) {
t.equal(isArrayBuffer(nonAB), false, inspect(nonAB) + ' is not an ArrayBuffer');
});
t.test('actual ArrayBuffer instances', { skip: typeof ArrayBuffer === 'undefined' }, function (st) {
var ab = new ArrayBuffer();
st.equal(isArrayBuffer(ab), true, inspect(ab) + ' is an ArrayBuffer');
var ab42 = new ArrayBuffer(42);
st.equal(isArrayBuffer(ab42), true, inspect(ab42) + ' is an ArrayBuffer');
var dv = new DataView(ab42);
st.equal(isArrayBuffer(dv), false, inspect(dv) + ' is not an ArrayBuffer');
st.end();
});
t.test('Typed Arrays', { skip: availableTypedArrays.length === 0 }, function (st) {
forEach(availableTypedArrays, function (TypedArray) {
var ta = new global[TypedArray](0);
st.equal(isArrayBuffer(ta.buffer), true, inspect(ta.buffer) + ', the TA\'s buffer, is an ArrayBuffer');
st.equal(isArrayBuffer(ta), false, inspect(ta) + ' is not an ArrayBuffer');
});
st.end();
});
t.end();
});
@@ -0,0 +1,33 @@
import {getActiveElement, getOwnerDocument} from '@react-aria/utils';
export function moveVirtualFocus(to: Element | null): void {
let from = getVirtuallyFocusedElement(getOwnerDocument(to));
if (from !== to) {
if (from) {
dispatchVirtualBlur(from, to);
}
if (to) {
dispatchVirtualFocus(to, from);
}
}
}
export function dispatchVirtualBlur(from: Element, to: Element | null): void {
from.dispatchEvent(new FocusEvent('blur', {relatedTarget: to}));
from.dispatchEvent(new FocusEvent('focusout', {bubbles: true, relatedTarget: to}));
}
export function dispatchVirtualFocus(to: Element, from: Element | null): void {
to.dispatchEvent(new FocusEvent('focus', {relatedTarget: from}));
to.dispatchEvent(new FocusEvent('focusin', {bubbles: true, relatedTarget: from}));
}
export function getVirtuallyFocusedElement(document: Document): Element | null {
let activeElement = getActiveElement(document);
let activeDescendant = activeElement?.getAttribute('aria-activedescendant');
if (activeDescendant) {
return document.getElementById(activeDescendant) || activeElement;
}
return activeElement;
}
@@ -0,0 +1,4 @@
import { GroupDetailInfoV2Param, GroupExtInfo, GroupExtFilter } from '../types';
export declare function createGroupDetailInfoV2Param(group_code: string): GroupDetailInfoV2Param;
export declare function createGroupExtInfo(group_code: string): GroupExtInfo;
export declare function createGroupExtFilter(): GroupExtFilter;
@@ -0,0 +1 @@
module.exports={A:{D:{"1":"0 1 2 3 4 5 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B"},L:{"1":"I"},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 hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC J ZB 0C 1C","33":"6 7 8 9 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"},M:{"1":"MC"},A:{"2":"K D E F A B wC"},F:{"1":"0 1 2 3 4 5 pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB FD GD HD ID NC uC JD OC"},K:{"1":"H","2":"A B C NC uC OC"},E:{"1":"L M G 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","2":"J ZB K D 2C ZC 3C 4C 5C ED","33":"E F A B C 6C aC NC"},G:{"1":"WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC LD MD ND","33":"E OD PD QD RD SD TD UD VD"},P:{"1":"6 7 8 9 AB BB CB DB EB FB qD rD sD aC tD uD vD wD xD QC RC SC yD","2":"J oD pD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"}},B:6,C:"text-decoration-color property",D:undefined};
@@ -0,0 +1 @@
{"version":3,"file":"decorate.js","sourceRoot":"","sources":["../../../../src/decorator/actions/decorate.ts"],"names":[],"mappings":";;AAyBA,4BAwDC;AAxDD,SAAgB,QAAQ,CACtB,UAQuB,EACvB,MAAgB,EAChB,wBAAmD,EACnD,cAAuB;IAEvB,MAAM,gBAAgB,GAII,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;QACjD,CAAC,CAAC,UAAU;QACZ,CAAC,CAAE,CAAC,UAAU,CAIY,CAAC;IAE7B,IAAI,wBAAwB,KAAK,SAAS,EAAE,CAAC;QAC3C,yBAAyB;QAEzB,OAAO,CAAC,QAAQ,CAAC,gBAAoC,EAAE,MAAM,CAAC,CAAC;QAC/D,OAAO;IACT,CAAC;IAED,IAAI,OAAO,wBAAwB,KAAK,QAAQ,EAAE,CAAC;QACjD,6BAA6B;QAE7B,KAAK,MAAM,SAAS,IAAI,gBAAwC,EAAE,CAAC;YACjE,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,wBAAwB,CAAC,CAAC;QACzD,CAAC;QAED,OAAO;IACT,CAAC;IAED,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QACjC,OAAO,CAAC,QAAQ,CACd,gBAA2D,EAC3D,MAAM,CAAC,SAAmB,EAC1B,wBAAwB,CACzB,CAAC;QAEF,OAAO;IACT,CAAC;IAED,KAAK,MAAM,SAAS,IAAI,gBAAwC,EAAE,CAAC;QACjE,SAAS,CAAC,MAAM,EAAE,wBAAwB,EAAE,cAAc,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC"}
@@ -0,0 +1,8 @@
"use client";
import {
snippet_default
} from "./chunk-ITOWTN7W.mjs";
import "./chunk-NYSKDETM.mjs";
export {
snippet_default as default
};
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/index.ts","../../src/utils/react.ts","../../src/utils/react-is.ts","../../src/connect/selectorFactory.ts","../../src/utils/bindActionCreators.ts","../../src/connect/wrapMapToProps.ts","../../src/connect/invalidArgFactory.ts","../../src/connect/mapDispatchToProps.ts","../../src/connect/mapStateToProps.ts","../../src/connect/mergeProps.ts","../../src/utils/batch.ts","../../src/utils/Subscription.ts","../../src/utils/useIsomorphicLayoutEffect.ts","../../src/utils/shallowEqual.ts","../../src/utils/hoistStatics.ts","../../src/components/Context.ts","../../src/components/connect.tsx","../../src/components/Provider.tsx","../../src/hooks/useReduxContext.ts","../../src/hooks/useStore.ts","../../src/hooks/useDispatch.ts","../../src/hooks/useSelector.ts","../../src/exports.ts"],"sourcesContent":["export * from './exports'\n","import * as React from 'react'\n\nexport { React }\n","import type { ElementType, MemoExoticComponent, ReactElement } from 'react'\nimport { React } from './react'\n\n// Directly ported from:\n// https://unpkg.com/browse/react-is@19.0.0/cjs/react-is.production.js\n// It's very possible this could change in the future, but given that\n// we only use these in `connect`, this is a low priority.\n\nexport const IS_REACT_19 = /* @__PURE__ */ React.version.startsWith('19')\n\nconst REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for(\n IS_REACT_19 ? 'react.transitional.element' : 'react.element',\n)\nconst REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for('react.portal')\nconst REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for('react.fragment')\nconst REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for('react.strict_mode')\nconst REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for('react.profiler')\nconst REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for('react.consumer')\nconst REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for('react.context')\nconst REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for('react.forward_ref')\nconst REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for('react.suspense')\nconst REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for(\n 'react.suspense_list',\n)\nconst REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for('react.memo')\nconst REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for('react.lazy')\nconst REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for('react.offscreen')\nconst REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for(\n 'react.client.reference',\n)\n\nexport const ForwardRef = REACT_FORWARD_REF_TYPE\nexport const Memo = REACT_MEMO_TYPE\n\nexport function isValidElementType(type: any): type is ElementType {\n return typeof type === 'string' ||\n typeof type === 'function' ||\n type === REACT_FRAGMENT_TYPE ||\n type === REACT_PROFILER_TYPE ||\n type === REACT_STRICT_MODE_TYPE ||\n type === REACT_SUSPENSE_TYPE ||\n type === REACT_SUSPENSE_LIST_TYPE ||\n type === REACT_OFFSCREEN_TYPE ||\n (typeof type === 'object' &&\n type !== null &&\n (type.$$typeof === REACT_LAZY_TYPE ||\n type.$$typeof === REACT_MEMO_TYPE ||\n type.$$typeof === REACT_CONTEXT_TYPE ||\n type.$$typeof === REACT_CONSUMER_TYPE ||\n type.$$typeof === REACT_FORWARD_REF_TYPE ||\n type.$$typeof === REACT_CLIENT_REFERENCE ||\n type.getModuleId !== undefined))\n ? !0\n : !1\n}\n\nfunction typeOf(object: any): symbol | undefined {\n if (typeof object === 'object' && object !== null) {\n const { $$typeof } = object\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n switch (((object = object.type), object)) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return object\n default:\n switch (((object = object && object.$$typeof), object)) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n return object\n case REACT_CONSUMER_TYPE:\n return object\n default:\n return $$typeof\n }\n }\n case REACT_PORTAL_TYPE:\n return $$typeof\n }\n }\n}\n\nexport function isContextConsumer(object: any): object is ReactElement {\n return IS_REACT_19\n ? typeOf(object) === REACT_CONSUMER_TYPE\n : typeOf(object) === REACT_CONTEXT_TYPE\n}\n\nexport function isMemo(object: any): object is MemoExoticComponent<any> {\n return typeOf(object) === REACT_MEMO_TYPE\n}\n","import type { Dispatch, Action } from 'redux'\nimport type { ComponentType } from 'react'\nimport verifySubselectors from './verifySubselectors'\nimport type { EqualityFn, ExtendedEqualityFn } from '../types'\n\nexport type SelectorFactory<S, TProps, TOwnProps, TFactoryOptions> = (\n dispatch: Dispatch<Action<string>>,\n factoryOptions: TFactoryOptions,\n) => Line truncated
@@ -0,0 +1,111 @@
export namespace jsx {
let name: string;
let ignores: string[];
namespace languageOptions {
namespace parserOptions {
namespace ecmaFeatures {
let jsx: true;
}
}
}
namespace plugins {
let react: import("eslint").ESLint.Plugin;
}
namespace settings {
export namespace react_1 {
let version: string;
}
export { react_1 as react };
export let linkComponents: string[];
}
let rules: {
'react/jsx-boolean-value': "error";
'react/jsx-fragments': ["error", string];
'react/jsx-handler-names': "error";
'react/jsx-key': ["error", {
checkFragmentShorthand: boolean;
}];
'react/jsx-no-comment-textnodes': "error";
'react/jsx-no-duplicate-props': "error";
'react/jsx-no-target-blank': ["error", {
enforceDynamicLinks: string;
}];
'react/jsx-no-undef': ["error", {
allowGlobals: boolean;
}];
'react/jsx-uses-react': "error";
'react/jsx-uses-vars': "error";
'react/no-children-prop': "error";
'react/no-danger-with-children': "error";
'react/no-deprecated': "error";
'react/no-direct-mutation-state': "error";
'react/no-find-dom-node': "error";
'react/no-is-mounted': "error";
'react/no-string-refs': ["error", {
noTemplateLiterals: boolean;
}];
'react/no-unescaped-entities': ["error", {
forbid: string[];
}];
'react/no-render-return-value': "error";
'react/require-render-return': "error";
'react/self-closing-comp': "error";
};
}
export namespace jsxStyles {
let name_1: string;
export { name_1 as name };
let ignores_1: string[];
export { ignores_1 as ignores };
let rules_1: {
'@stylistic/jsx-quotes': ["error", string];
'@stylistic/jsx-closing-bracket-location': ["error", string];
'@stylistic/jsx-closing-tag-location': "error";
'@stylistic/jsx-curly-brace-presence': ["error", {
props: string;
children: string;
}];
'@stylistic/jsx-curly-newline': ["error", {
multiline: string;
singleline: string;
}];
'@stylistic/jsx-curly-spacing': ["error", {
attributes: {
when: string;
allowMultiline: boolean;
};
children: {
when: string;
allowMultiline: boolean;
};
}];
'@stylistic/jsx-equals-spacing': ["error", string];
'@stylistic/jsx-first-prop-new-line': ["error", string];
'@stylistic/jsx-indent': ["error", number, {
checkAttributes: boolean;
indentLogicalExpressions: boolean;
}];
'@stylistic/jsx-indent-props': ["error", number];
'@stylistic/jsx-pascal-case': ["error", {
allowAllCaps: boolean;
}];
'@stylistic/jsx-props-no-multi-spaces': "error";
'@stylistic/jsx-tag-spacing': ["error", {
closingSlash: string;
beforeSelfClosing: string;
afterOpening: string;
beforeClosing: string;
}];
'@stylistic/jsx-wrap-multilines': ["error", {
declaration: string;
assignment: string;
return: string;
arrow: string;
condition: string;
logical: string;
prop: string;
}];
};
export { rules_1 as rules };
}
//# sourceMappingURL=jsx.d.ts.map
@@ -0,0 +1,163 @@
/*
* Copyright 2021 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {AriaTextFieldProps} from '@react-types/textfield';
import {mergeProps, useEffectEvent} from '@react-aria/utils';
import {RefObject} from '@react-types/shared';
import {TextFieldAria, useTextField} from './useTextField';
import {useEffect, useRef} from 'react';
interface FormattedTextFieldState {
validate: (val: string) => boolean,
setInputValue: (val: string) => void
}
function supportsNativeBeforeInputEvent() {
return typeof window !== 'undefined' &&
window.InputEvent &&
typeof InputEvent.prototype.getTargetRanges === 'function';
}
export function useFormattedTextField(props: AriaTextFieldProps, state: FormattedTextFieldState, inputRef: RefObject<HTMLInputElement | null>): TextFieldAria {
// All browsers implement the 'beforeinput' event natively except Firefox
// (currently behind a flag as of Firefox 84). React's polyfill does not
// run in all cases that the native event fires, e.g. when deleting text.
// Use the native event if available so that we can prevent invalid deletions.
// We do not attempt to polyfill this in Firefox since it would be very complicated,
// the benefit of doing so is fairly minor, and it's going to be natively supported soon.
let onBeforeInputFallback = useEffectEvent((e: InputEvent) => {
let input = inputRef.current;
if (!input) {
return;
}
// Compute the next value of the input if the event is allowed to proceed.
// See https://www.w3.org/TR/input-events-2/#interface-InputEvent-Attributes for a full list of input types.
let nextValue: string | null = null;
switch (e.inputType) {
case 'historyUndo':
case 'historyRedo':
// Explicitly allow undo/redo. e.data is null in this case, but there's no need to validate,
// because presumably the input would have already been validated previously.
return;
case 'insertLineBreak':
// Explicitly allow "insertLineBreak" event, to allow onSubmit for "enter" key. e.data is null in this case.
return;
case 'deleteContent':
case 'deleteByCut':
case 'deleteByDrag':
nextValue = input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);
break;
case 'deleteContentForward':
// This is potentially incorrect, since the browser may actually delete more than a single UTF-16
// character. In reality, a full Unicode grapheme cluster consisting of multiple UTF-16 characters
// or code points may be deleted. However, in our currently supported locales, there are no such cases.
// If we support additional locales in the future, this may need to change.
nextValue = input.selectionEnd === input.selectionStart
? input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd! + 1)
: input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);
break;
case 'deleteContentBackward':
nextValue = input.selectionEnd === input.selectionStart
? input.value.slice(0, input.selectionStart! - 1) + input.value.slice(input.selectionStart!)
: input.value.slice(0, input.selectionStart!) + input.value.slice(input.selectionEnd!);
break;
case 'deleteSoftLineBackward':
case 'deleteHardLineBackward':
nextValue = input.value.slice(input.selectionStart!);
break;
default:
if (e.data != null) {
nextValue =
input.value.slice(0, input.selectionStart!) +
e.data +
input.value.slice(input.selectionEnd!);
}
break;
}
// If we did not compute a value, or the new value is invalid, prevent the event
// so that the browser does not update the input text, move the selection, or add to
// the undo/redo stack.
if (nextValue == null || !state.validate(nextValue)) {
e.preventDefault();
}
});
useEffect(() => {
if (!supportsNativeBeforeInputEvent() || !inputRef.current) {
return;
}
let input = inputRef.current;
input.addEventListener('beforeinput', onBeforeInputFallback, false);
return () => {
input.removeEventListener('beforeinput', onBeforeInputFallback, false);
};
}, [inputRef, onBeforeInputFallback]);
let onBeforeInput = !supportsNativeBeforeInputEvent()
? e => {
let nextValue =
e.target.value.slice(0, e.target.selectionStart) +
e.data +
e.target.value.slice(e.target.selectionEnd);
if (!state.validate(nextValue)) {
e.preventDefault();
}
}
: null;
let {labelProps, inputProps: textFieldProps, descriptionProps, errorMessageProps, ...validation} = useTextField(props, inputRef);
let compositionStartState = useRef<{value: string, selectionStart: number | null, selectionEnd: number | null} | null>(null);
return {
inputProps: mergeProps(
textFieldProps,
{
onBeforeInput,
onCompositionStart() {
// Chrome does not implement Input Events Level 2, which specifies the insertFromComposition
// and deleteByComposition inputType values for the beforeinput event. These are meant to occur
// at the end of a composition (e.g. Pinyin IME, Android auto correct, etc.), and crucially, are
// cancelable. The insertCompositionText and deleteCompositionText input types are not cancelable,
// nor would we want to cancel them because the input from the user is incomplete at that point.
// In Safari, insertFromComposition/deleteFromComposition will fire, however, allowing us to cancel
// the final composition result if it is invalid. As a fallback for Chrome and Firefox, which either
// don't support Input Events Level 2, or beforeinput at all, we store the state of the input when
// the compositionstart event fires, and undo the changes in compositionend (below) if it is invalid.
// Unfortunately, this messes up the undo/redo stack, but until insertFromComposition/deleteByComposition
// are implemented, there is no other way to prevent composed input.
// See https://bugs.chromium.org/p/chromium/issues/detail?id=1022204
let {value, selectionStart, selectionEnd} = inputRef.current!;
compositionStartState.current = {value, selectionStart, selectionEnd};
},
onCompositionEnd() {
if (inputRef.current && !state.validate(inputRef.current.value)) {
// Restore the input value in the DOM immediately so we can synchronously update the selection position.
// But also update the value in React state as well so it is correct for future updates.
let {value, selectionStart, selectionEnd} = compositionStartState.current!;
inputRef.current.value = value;
inputRef.current.setSelectionRange(selectionStart, selectionEnd);
state.setInputValue(value);
}
}
}
),
labelProps,
descriptionProps,
errorMessageProps,
...validation
};
}
@@ -0,0 +1,12 @@
# `@typescript-eslint/utils`
> Utilities for working with TypeScript + ESLint together.
[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/utils.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/utils)
[![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/utils.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/utils)
👉 See **https://typescript-eslint.io/packages/utils** for documentation on this package.
> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
<!-- Local path for docs: docs/packages/Utils.mdx -->
@@ -0,0 +1 @@
{"version":3,"file":"ServiceIdentifier.js","sourceRoot":"","sources":["../../../../src/services/models/ServiceIdentifier.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
/**
Create an array of unique values, in order, from the input arrays.
@example
```
import arrayUnion = require('array-union');
arrayUnion([1, 1, 2, 3], [2, 3]);
//=> [1, 2, 3]
arrayUnion(['foo', 'foo', 'bar']);
//=> ['foo', 'bar']
arrayUnion(['🐱', '🦄', '🐻'], ['🦄', '🌈']);
//=> ['🐱', '🦄', '🐻', '🌈']
arrayUnion(['🐱', '🦄'], ['🐻', '🦄'], ['🐶', '🌈', '🌈']);
//=> ['🐱', '🦄', '🐻', '🐶', '🌈']
```
*/
declare function arrayUnion<ArgumentsType extends readonly unknown[]>(
...arguments: readonly ArgumentsType[]
): ArgumentsType;
export = arrayUnion;
@@ -0,0 +1,14 @@
'use strict';
var n = require('fs');
var s = require('path');
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var n__default = /*#__PURE__*/_interopDefault(n);
var s__default = /*#__PURE__*/_interopDefault(s);
var t=e=>{n__default.default.writeFileSync(s__default.default.join(__dirname,"generated.d.ts"),e);},c=e=>`export type TVGeneratedScreens = ${Object.keys(e).map(r=>`"${r}"`).join(" | ")};
`,p=e=>{queueMicrotask(()=>{if(e!=null&&e.screens){let r=c(e.screens);t(r);}});};
exports.generateTypes = p;
@@ -0,0 +1 @@
export { _lt as lt, _lte as lte, _lte as maximum, _gt as gt, _gte as gte, _gte as minimum, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, } from "../core/index.js";
@@ -0,0 +1,38 @@
// Punjabi (India) [pa-in]
import dayjs from '../index';
var locale = {
name: 'pa-in',
weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'),
months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),
weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),
weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
ordinal: function ordinal(n) {
return n;
},
formats: {
LT: 'A h:mm ਵਜੇ',
LTS: 'A h:mm:ss ਵਜੇ',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ'
},
relativeTime: {
future: '%s ਵਿੱਚ',
past: '%s ਪਿਛਲੇ',
s: 'ਕੁਝ ਸਕਿੰਟ',
m: 'ਇਕ ਮਿੰਟ',
mm: '%d ਮਿੰਟ',
h: 'ਇੱਕ ਘੰਟਾ',
hh: '%d ਘੰਟੇ',
d: 'ਇੱਕ ਦਿਨ',
dd: '%d ਦਿਨ',
M: 'ਇੱਕ ਮਹੀਨਾ',
MM: '%d ਮਹੀਨੇ',
y: 'ਇੱਕ ਸਾਲ',
yy: '%d ਸਾਲ'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1,46 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
const { getSourceCode } = require("eslint-compat-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `Math.hypot` method.",
category: "ES2015",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-math-hypot.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"(program) {
const sourceCode = getSourceCode(context)
const tracker = new ReferenceTracker(
sourceCode.getScope(program),
)
for (const { node, path } of tracker.iterateGlobalReferences({
Math: {
hypot: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,37 @@
{
"name": "is-otf",
"version": "0.1.2",
"description": "Check if a String/Buffer/ArrayBuffer is OTF",
"license": "MIT",
"repository": "junmer/is-otf",
"author": {
"name": "junmer"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha"
},
"files": [
"index.js"
],
"keywords": [
"font",
"OpenType",
"OTF",
"type",
"detect",
"check",
"is",
"string",
"str",
"buffer"
],
"devDependencies": {
"mocha": "*"
},
"dependencies": {
"b3b": "0.0.1"
}
}
@@ -0,0 +1,60 @@
# isarray
`Array#isArray` for older browsers.
[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray)
[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray)
[![browser support](https://ci.testling.com/juliangruber/isarray.png)
](https://ci.testling.com/juliangruber/isarray)
## Usage
```js
var isArray = require('isarray');
console.log(isArray([])); // => true
console.log(isArray({})); // => false
```
## Installation
With [npm](http://npmjs.org) do
```bash
$ npm install isarray
```
Then bundle for the browser with
[browserify](https://github.com/substack/browserify).
With [component](http://component.io) do
```bash
$ component install juliangruber/isarray
```
## License
(MIT)
Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
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,4 @@
import type { Config } from './types/config'
declare function loadConfig(path: string): Config
export = loadConfig
@@ -0,0 +1 @@
{"version":3,"file":"static-property-placement.d.ts","sourceRoot":"","sources":["static-property-placement.js"],"names":[],"mappings":"wBA0DW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1,2 @@
import * as ts from 'typescript';
export declare function isHigherPrecedenceThanAwait(tsNode: ts.Node): boolean;
@@ -0,0 +1,7 @@
"use client";
import {
useDropdown
} from "./chunk-IURKDIR4.mjs";
export {
useDropdown
};
@@ -0,0 +1,7 @@
Copyright 2018 Rich Harris
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,45 @@
"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;
};
})();
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Token = exports.Guard = void 0;
exports.Guard = __importStar(require("./guard"));
exports.Token = __importStar(require("./token"));
__exportStar(require("./types"), exports);
__exportStar(require("./module"), exports);
__exportStar(require("./parse"), exports);
@@ -0,0 +1,40 @@
/// <reference types="node" />
import * as taskManager from './managers/tasks';
import { Options as OptionsInternal } from './settings';
import { Entry as EntryInternal, FileSystemAdapter as FileSystemAdapterInternal, Pattern as PatternInternal } from './types';
type EntryObjectModePredicate = {
[TKey in keyof Pick<OptionsInternal, 'objectMode'>]-?: true;
};
type EntryStatsPredicate = {
[TKey in keyof Pick<OptionsInternal, 'stats'>]-?: true;
};
type EntryObjectPredicate = EntryObjectModePredicate | EntryStatsPredicate;
declare function FastGlob(source: PatternInternal | PatternInternal[], options: OptionsInternal & EntryObjectPredicate): Promise<EntryInternal[]>;
declare function FastGlob(source: PatternInternal | PatternInternal[], options?: OptionsInternal): Promise<string[]>;
declare namespace FastGlob {
type Options = OptionsInternal;
type Entry = EntryInternal;
type Task = taskManager.Task;
type Pattern = PatternInternal;
type FileSystemAdapter = FileSystemAdapterInternal;
const glob: typeof FastGlob;
const globSync: typeof sync;
const globStream: typeof stream;
const async: typeof FastGlob;
function sync(source: PatternInternal | PatternInternal[], options: OptionsInternal & EntryObjectPredicate): EntryInternal[];
function sync(source: PatternInternal | PatternInternal[], options?: OptionsInternal): string[];
function stream(source: PatternInternal | PatternInternal[], options?: OptionsInternal): NodeJS.ReadableStream;
function generateTasks(source: PatternInternal | PatternInternal[], options?: OptionsInternal): Task[];
function isDynamicPattern(source: PatternInternal, options?: OptionsInternal): boolean;
function escapePath(source: string): PatternInternal;
function convertPathToPattern(source: string): PatternInternal;
namespace posix {
function escapePath(source: string): PatternInternal;
function convertPathToPattern(source: string): PatternInternal;
}
namespace win32 {
function escapePath(source: string): PatternInternal;
function convertPathToPattern(source: string): PatternInternal;
}
}
export = FastGlob;
@@ -0,0 +1,47 @@
'use strict';
var $pow = require('math-intrinsics/pow');
module.exports = function bytesAsFloat32(rawBytes) {
// return new $Float16Array(new $Uint8Array(rawBytes).buffer)[0];
/*
Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2019 binary16 value.
If value is a NaN, return NaN.
Return the Number value that corresponds to value.
*/
var bits = (rawBytes[1] << 8) | rawBytes[0];
// extract sign, exponent, mantissa
var sign = bits & 0x8000 ? -1 : 1;
var exponent = (bits & 0x7C00) >> 10;
var mantissa = bits & 0x03FF;
// zero (±0)
if (exponent === 0 && mantissa === 0) {
return sign === 1 ? 0 : -0;
}
// infinities
if (exponent === 0x1F && mantissa === 0) {
return sign === 1 ? Infinity : -Infinity;
}
// NaN
if (exponent === 0x1F && mantissa !== 0) {
return NaN;
}
// remove bias (15)
exponent -= 15;
// subnormals
if (exponent === -15) {
// value = sign * (mantissa) * 2^(1-bias-10) = mantissa * 2^(-14-10)
return sign * mantissa * $pow(2, -24);
}
// normals
// value = sign * (1 + mantissa/2^10) * 2^exponent
return sign * (1 + (mantissa * $pow(2, -10))) * $pow(2, exponent);
};
@@ -0,0 +1,51 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RSAPrivateKey = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const other_prime_info_1 = require("./other_prime_info");
class RSAPrivateKey {
constructor(params = {}) {
this.version = 0;
this.modulus = new ArrayBuffer(0);
this.publicExponent = new ArrayBuffer(0);
this.privateExponent = new ArrayBuffer(0);
this.prime1 = new ArrayBuffer(0);
this.prime2 = new ArrayBuffer(0);
this.exponent1 = new ArrayBuffer(0);
this.exponent2 = new ArrayBuffer(0);
this.coefficient = new ArrayBuffer(0);
Object.assign(this, params);
}
}
exports.RSAPrivateKey = RSAPrivateKey;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer })
], RSAPrivateKey.prototype, "version", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, converter: asn1_schema_1.AsnIntegerArrayBufferConverter })
], RSAPrivateKey.prototype, "modulus", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, converter: asn1_schema_1.AsnIntegerArrayBufferConverter })
], RSAPrivateKey.prototype, "publicExponent", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, converter: asn1_schema_1.AsnIntegerArrayBufferConverter })
], RSAPrivateKey.prototype, "privateExponent", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, converter: asn1_schema_1.AsnIntegerArrayBufferConverter })
], RSAPrivateKey.prototype, "prime1", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, converter: asn1_schema_1.AsnIntegerArrayBufferConverter })
], RSAPrivateKey.prototype, "prime2", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, converter: asn1_schema_1.AsnIntegerArrayBufferConverter })
], RSAPrivateKey.prototype, "exponent1", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, converter: asn1_schema_1.AsnIntegerArrayBufferConverter })
], RSAPrivateKey.prototype, "exponent2", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, converter: asn1_schema_1.AsnIntegerArrayBufferConverter })
], RSAPrivateKey.prototype, "coefficient", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: other_prime_info_1.OtherPrimeInfos, optional: true })
], RSAPrivateKey.prototype, "otherPrimeInfos", void 0);
@@ -0,0 +1 @@
{"version":3,"file":"isInstanceBindingNode.spec.d.ts","sourceRoot":"","sources":["../../../../src/planning/calculations/isInstanceBindingNode.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export {useButton} from './useButton';
export {useToggleButton} from './useToggleButton';
export {useToggleButtonGroup, useToggleButtonGroupItem} from './useToggleButtonGroup';
export type {AriaButtonOptions, ButtonAria} from './useButton';
export type {AriaButtonProps, AriaToggleButtonProps} from '@react-types/button';
export type {AriaToggleButtonGroupProps, ToggleButtonGroupAria, AriaToggleButtonGroupItemProps} from './useToggleButtonGroup';
@@ -0,0 +1,253 @@
/**
* The `node:inspector` module provides an API for interacting with the V8
* inspector.
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/inspector.js)
*/
declare module "inspector" {
import EventEmitter = require("node:events");
/**
* The `inspector.Session` is used for dispatching messages to the V8 inspector
* back-end and receiving message responses and notifications.
*/
class Session extends EventEmitter {
/**
* Create a new instance of the inspector.Session class.
* The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
*/
constructor();
/**
* Connects a session to the inspector back-end.
*/
connect(): void;
/**
* Connects a session to the inspector back-end.
* An exception will be thrown if this API was not called on a Worker thread.
* @since v12.11.0
*/
connectToMainThread(): void;
/**
* Immediately close the session. All pending message callbacks will be called with an error.
* `session.connect()` will need to be called to be able to send messages again.
* Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
*/
disconnect(): void;
}
/**
* Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has
* started.
*
* If wait is `true`, will block until a client has connected to the inspect port
* and flow control has been passed to the debugger client.
*
* See the [security warning](https://nodejs.org/docs/latest-v22.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure)
* regarding the `host` parameter usage.
* @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI.
* @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI.
* @param wait Block until a client has connected. Defaults to what was specified on the CLI.
* @returns Disposable that calls `inspector.close()`.
*/
function open(port?: number, host?: string, wait?: boolean): Disposable;
/**
* Deactivate the inspector. Blocks until there are no active connections.
*/
function close(): void;
/**
* Return the URL of the active inspector, or `undefined` if there is none.
*
* ```console
* $ node --inspect -p 'inspector.url()'
* Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
* For help, see: https://nodejs.org/en/docs/inspector
* ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
*
* $ node --inspect=localhost:3000 -p 'inspector.url()'
* Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
* For help, see: https://nodejs.org/en/docs/inspector
* ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
*
* $ node -p 'inspector.url()'
* undefined
* ```
*/
function url(): string | undefined;
/**
* Blocks until a client (existing or connected later) has sent `Runtime.runIfWaitingForDebugger` command.
*
* An exception will be thrown if there is no active inspector.
* @since v12.7.0
*/
function waitForDebugger(): void;
// These methods are exposed by the V8 inspector console API (inspector/v8-console.h).
// The method signatures differ from those of the Node.js console, and are deliberately
// typed permissively.
interface InspectorConsole {
debug(...data: any[]): void;
error(...data: any[]): void;
info(...data: any[]): void;
log(...data: any[]): void;
warn(...data: any[]): void;
dir(...data: any[]): void;
dirxml(...data: any[]): void;
table(...data: any[]): void;
trace(...data: any[]): void;
group(...data: any[]): void;
groupCollapsed(...data: any[]): void;
groupEnd(...data: any[]): void;
clear(...data: any[]): void;
count(label?: any): void;
countReset(label?: any): void;
assert(value?: any, ...data: any[]): void;
profile(label?: any): void;
profileEnd(label?: any): void;
time(label?: any): void;
timeLog(label?: any): void;
timeStamp(label?: any): void;
}
/**
* An object to send messages to the remote inspector console.
* @since v11.0.0
*/
const console: InspectorConsole;
// DevTools protocol event broadcast methods
namespace Network {
/**
* This feature is only available with the `--experimental-network-inspection` flag enabled.
*
* Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that
* the application is about to send an HTTP request.
* @since v22.6.0
*/
function requestWillBeSent(params: RequestWillBeSentEventDataType): void;
/**
* This feature is only available with the `--experimental-network-inspection` flag enabled.
*
* Broadcasts the `Network.dataReceived` event to connected frontends, or buffers the data if
* `Network.streamResourceContent` command was not invoked for the given request yet.
*
* Also enables `Network.getResponseBody` command to retrieve the response data.
* @since v22.17.0
*/
function dataReceived(params: DataReceivedEventDataType): void;
/**
* This feature is only available with the `--experimental-network-inspection` flag enabled.
*
* Enables `Network.getRequestPostData` command to retrieve the request data.
* @since v22.18.0
*/
function dataSent(params: unknown): void;
/**
* This feature is only available with the `--experimental-network-inspection` flag enabled.
*
* Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that
* HTTP response is available.
* @since v22.6.0
*/
function responseReceived(params: ResponseReceivedEventDataType): void;
/**
* This feature is only available with the `--experimental-network-inspection` flag enabled.
*
* Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that
* HTTP request has finished loading.
* @since v22.6.0
*/
function loadingFinished(params: LoadingFinishedEventDataType): void;
/**
* This feature is only available with the `--experimental-network-inspection` flag enabled.
*
* Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that
* HTTP request has failed to load.
* @since v22.7.0
*/
function loadingFailed(params: LoadingFailedEventDataType): void;
}
namespace NetworkResources {
/**
* This feature is only available with the `--experimental-inspector-network-resource` flag enabled.
*
* The inspector.NetworkResources.put method is used to provide a response for a loadNetworkResource
* request issued via the Chrome DevTools Protocol (CDP).
* This is typically triggered when a source map is specified by URL, and a DevTools frontend—such as
* Chrome—requests the resource to retrieve the source map.
*
* This method allows developers to predefine the resource content to be served in response to such CDP requests.
*
* ```js
* const inspector = require('node:inspector');
* // By preemptively calling put to register the resource, a source map can be resolved when
* // a loadNetworkResource request is made from the frontend.
* async function setNetworkResources() {
* const mapUrl = 'http://localhost:3000/dist/app.js.map';
* const tsUrl = 'http://localhost:3000/src/app.ts';
* const distAppJsMap = await fetch(mapUrl).then((res) => res.text());
* const srcAppTs = await fetch(tsUrl).then((res) => res.text());
* inspector.NetworkResources.put(mapUrl, distAppJsMap);
* inspector.NetworkResources.put(tsUrl, srcAppTs);
* };
* setNetworkResources().then(() => {
* require('./dist/app');
* });
* ```
*
* For more details, see the official CDP documentation: [Network.loadNetworkResource](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-loadNetworkResource)
* @since v22.19.0
* @experimental
*/
function put(url: string, data: string): void;
}
}
/**
* The `node:inspector` module provides an API for interacting with the V8
* inspector.
*/
declare module "node:inspector" {
export * from "inspector";
}
/**
* The `node:inspector/promises` module provides an API for interacting with the V8
* inspector.
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/inspector/promises.js)
* @since v19.0.0
*/
declare module "inspector/promises" {
import EventEmitter = require("node:events");
export { close, console, NetworkResources, open, url, waitForDebugger } from "inspector";
/**
* The `inspector.Session` is used for dispatching messages to the V8 inspector
* back-end and receiving message responses and notifications.
* @since v19.0.0
*/
export class Session extends EventEmitter {
/**
* Create a new instance of the inspector.Session class.
* The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
*/
constructor();
/**
* Connects a session to the inspector back-end.
*/
connect(): void;
/**
* Connects a session to the inspector back-end.
* An exception will be thrown if this API was not called on a Worker thread.
* @since v12.11.0
*/
connectToMainThread(): void;
/**
* Immediately close the session. All pending message callbacks will be called with an error.
* `session.connect()` will need to be called to be able to send messages again.
* Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
*/
disconnect(): void;
}
}
/**
* The `node:inspector/promises` module provides an API for interacting with the V8
* inspector.
* @since v19.0.0
*/
declare module "node:inspector/promises" {
export * from "inspector/promises";
}
@@ -0,0 +1,15 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export type {LocalizedStrings} from './MessageDictionary';
export {MessageDictionary} from './MessageDictionary';
export {MessageFormatter} from './MessageFormatter';
@@ -0,0 +1 @@
{"version":3,"file":"container-phrasing.d.ts","sourceRoot":"","sources":["container-phrasing.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;GAaG;AACH,0CATW,eAAe,SAEf,KAAK,QAEL,IAAI,GAEF,MAAM,CA0GlB;qCA1HiC,aAAa;2BADT,wBAAwB;0BAAxB,wBAAwB"}
@@ -0,0 +1,68 @@
import {useEvent as $e9faafb641e167db$export$90fc3a17d93f704c} from "./useEvent.mjs";
import {useLayoutEffect as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c} from "./useLayoutEffect.mjs";
import {useRef as $hDRkU$useRef, useCallback as $hDRkU$useCallback} from "react";
/*
* Copyright 2024 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $26f7f3da73fcd9d6$export$7717c92ee915373e(props, ref) {
let { isLoading: isLoading, onLoadMore: onLoadMore, scrollOffset: scrollOffset = 1, items: items } = props;
// Handle scrolling, and call onLoadMore when nearing the bottom.
let isLoadingRef = (0, $hDRkU$useRef)(isLoading);
let prevProps = (0, $hDRkU$useRef)(props);
let onScroll = (0, $hDRkU$useCallback)(()=>{
if (ref.current && !isLoadingRef.current && onLoadMore) {
let shouldLoadMore = ref.current.scrollHeight - ref.current.scrollTop - ref.current.clientHeight < ref.current.clientHeight * scrollOffset;
if (shouldLoadMore) {
isLoadingRef.current = true;
onLoadMore();
}
}
}, [
onLoadMore,
ref,
scrollOffset
]);
let lastItems = (0, $hDRkU$useRef)(items);
(0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
// Only update isLoadingRef if props object actually changed,
// not if a local state change occurred.
if (props !== prevProps.current) {
isLoadingRef.current = isLoading;
prevProps.current = props;
}
// TODO: Eventually this hook will move back into RAC during which we will accept the collection as a option to this hook.
// We will only load more if the collection has changed after the last load to prevent multiple onLoadMore from being called
// while the data from the last onLoadMore is being processed by RAC collection.
let shouldLoadMore = (ref === null || ref === void 0 ? void 0 : ref.current) && !isLoadingRef.current && onLoadMore && (!items || items !== lastItems.current) && ref.current.clientHeight === ref.current.scrollHeight;
if (shouldLoadMore) {
isLoadingRef.current = true;
onLoadMore === null || onLoadMore === void 0 ? void 0 : onLoadMore();
}
lastItems.current = items;
}, [
isLoading,
onLoadMore,
props,
ref,
items
]);
// TODO: maybe this should still just return scroll props?
// Test against case where the ref isn't defined when this is called
// Think this was a problem when trying to attach to the scrollable body of the table in OnLoadMoreTableBodyScroll
(0, $e9faafb641e167db$export$90fc3a17d93f704c)(ref, 'scroll', onScroll);
}
export {$26f7f3da73fcd9d6$export$7717c92ee915373e as useLoadMore};
//# sourceMappingURL=useLoadMore.module.js.map
@@ -0,0 +1,612 @@
/**
* @fileoverview Rule to require or disallow newlines between statements
* @author Toru Nagashima
* @deprecated in ESLint v8.53.0
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const LT = `[${Array.from(astUtils.LINEBREAKS).join("")}]`;
const PADDING_LINE_SEQUENCE = new RegExp(
String.raw`^(\s*?${LT})\s*${LT}(\s*;?)$`,
"u",
);
const CJS_EXPORT = /^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u;
const CJS_IMPORT = /^require\(/u;
/**
* Creates tester which check if a node starts with specific keyword.
* @param {string} keyword The keyword to test.
* @returns {Object} the created tester.
* @private
*/
function newKeywordTester(keyword) {
return {
test: (node, sourceCode) =>
sourceCode.getFirstToken(node).value === keyword,
};
}
/**
* Creates tester which check if a node starts with specific keyword and spans a single line.
* @param {string} keyword The keyword to test.
* @returns {Object} the created tester.
* @private
*/
function newSinglelineKeywordTester(keyword) {
return {
test: (node, sourceCode) =>
node.loc.start.line === node.loc.end.line &&
sourceCode.getFirstToken(node).value === keyword,
};
}
/**
* Creates tester which check if a node starts with specific keyword and spans multiple lines.
* @param {string} keyword The keyword to test.
* @returns {Object} the created tester.
* @private
*/
function newMultilineKeywordTester(keyword) {
return {
test: (node, sourceCode) =>
node.loc.start.line !== node.loc.end.line &&
sourceCode.getFirstToken(node).value === keyword,
};
}
/**
* Creates tester which check if a node is specific type.
* @param {string} type The node type to test.
* @returns {Object} the created tester.
* @private
*/
function newNodeTypeTester(type) {
return {
test: node => node.type === type,
};
}
/**
* Checks the given node is an expression statement of IIFE.
* @param {ASTNode} node The node to check.
* @returns {boolean} `true` if the node is an expression statement of IIFE.
* @private
*/
function isIIFEStatement(node) {
if (node.type === "ExpressionStatement") {
let call = astUtils.skipChainExpression(node.expression);
if (call.type === "UnaryExpression") {
call = astUtils.skipChainExpression(call.argument);
}
return (
call.type === "CallExpression" && astUtils.isFunction(call.callee)
);
}
return false;
}
/**
* Checks whether the given node is a block-like statement.
* This checks the last token of the node is the closing brace of a block.
* @param {SourceCode} sourceCode The source code to get tokens.
* @param {ASTNode} node The node to check.
* @returns {boolean} `true` if the node is a block-like statement.
* @private
*/
function isBlockLikeStatement(sourceCode, node) {
// do-while with a block is a block-like statement.
if (
node.type === "DoWhileStatement" &&
node.body.type === "BlockStatement"
) {
return true;
}
/*
* IIFE is a block-like statement specially from
* JSCS#disallowPaddingNewLinesAfterBlocks.
*/
if (isIIFEStatement(node)) {
return true;
}
// Checks the last token is a closing brace of blocks.
const lastToken = sourceCode.getLastToken(
node,
astUtils.isNotSemicolonToken,
);
const belongingNode =
lastToken && astUtils.isClosingBraceToken(lastToken)
? sourceCode.getNodeByRangeIndex(lastToken.range[0])
: null;
return (
Boolean(belongingNode) &&
(belongingNode.type === "BlockStatement" ||
belongingNode.type === "SwitchStatement")
);
}
/**
* Gets the actual last token.
*
* If a semicolon is semicolon-less style's semicolon, this ignores it.
* For example:
*
* foo()
* ;[1, 2, 3].forEach(bar)
* @param {SourceCode} sourceCode The source code to get tokens.
* @param {ASTNode} node The node to get.
* @returns {Token} The actual last token.
* @private
*/
function getActualLastToken(sourceCode, node) {
const semiToken = sourceCode.getLastToken(node);
const prevToken = sourceCode.getTokenBefore(semiToken);
const nextToken = sourceCode.getTokenAfter(semiToken);
const isSemicolonLessStyle = Boolean(
prevToken &&
nextToken &&
prevToken.range[0] >= node.range[0] &&
astUtils.isSemicolonToken(semiToken) &&
semiToken.loc.start.line !== prevToken.loc.end.line &&
semiToken.loc.end.line === nextToken.loc.start.line,
);
return isSemicolonLessStyle ? prevToken : semiToken;
}
/**
* This returns the concatenation of the first 2 captured strings.
* @param {string} _ Unused. Whole matched string.
* @param {string} trailingSpaces The trailing spaces of the first line.
* @param {string} indentSpaces The indentation spaces of the last line.
* @returns {string} The concatenation of trailingSpaces and indentSpaces.
* @private
*/
function replacerToRemovePaddingLines(_, trailingSpaces, indentSpaces) {
return trailingSpaces + indentSpaces;
}
/**
* Check and report statements for `any` configuration.
* It does nothing.
* @returns {void}
* @private
*/
function verifyForAny() {}
/**
* Check and report statements for `never` configuration.
* This autofix removes blank lines between the given 2 statements.
* However, if comments exist between 2 blank lines, it does not remove those
* blank lines automatically.
* @param {RuleContext} context The rule context to report.
* @param {ASTNode} _ Unused. The previous node to check.
* @param {ASTNode} nextNode The next node to check.
* @param {Array<Token[]>} paddingLines The array of token pairs that blank
* lines exist between the pair.
* @returns {void}
* @private
*/
function verifyForNever(context, _, nextNode, paddingLines) {
if (paddingLines.length === 0) {
return;
}
context.report({
node: nextNode,
messageId: "unexpectedBlankLine",
fix(fixer) {
if (paddingLines.length >= 2) {
return null;
}
const prevToken = paddingLines[0][0];
const nextToken = paddingLines[0][1];
const start = prevToken.range[1];
const end = nextToken.range[0];
const text = context.sourceCode.text
.slice(start, end)
.replace(PADDING_LINE_SEQUENCE, replacerToRemovePaddingLines);
return fixer.replaceTextRange([start, end], text);
},
});
}
/**
* Check and report statements for `always` configuration.
* This autofix inserts a blank line between the given 2 statements.
* If the `prevNode` has trailing comments, it inserts a blank line after the
* trailing comments.
* @param {RuleContext} context The rule context to report.
* @param {ASTNode} prevNode The previous node to check.
* @param {ASTNode} nextNode The next node to check.
* @param {Array<Token[]>} paddingLines The array of token pairs that blank
* lines exist between the pair.
* @returns {void}
* @private
*/
function verifyForAlways(context, prevNode, nextNode, paddingLines) {
if (paddingLines.length > 0) {
return;
}
context.report({
node: nextNode,
messageId: "expectedBlankLine",
fix(fixer) {
const sourceCode = context.sourceCode;
let prevToken = getActualLastToken(sourceCode, prevNode);
const nextToken =
sourceCode.getFirstTokenBetween(prevToken, nextNode, {
includeComments: true,
/**
* Skip the trailing comments of the previous node.
* This inserts a blank line after the last trailing comment.
*
* For example:
*
* foo(); // trailing comment.
* // comment.
* bar();
*
* Get fixed to:
*
* foo(); // trailing comment.
*
* // comment.
* bar();
* @param {Token} token The token to check.
* @returns {boolean} `true` if the token is not a trailing comment.
* @private
*/
filter(token) {
if (astUtils.isTokenOnSameLine(prevToken, token)) {
prevToken = token;
return false;
}
return true;
},
}) || nextNode;
const insertText = astUtils.isTokenOnSameLine(prevToken, nextToken)
? "\n\n"
: "\n";
return fixer.insertTextAfter(prevToken, insertText);
},
});
}
/**
* Types of blank lines.
* `any`, `never`, and `always` are defined.
* Those have `verify` method to check and report statements.
* @private
*/
const PaddingTypes = {
any: { verify: verifyForAny },
never: { verify: verifyForNever },
always: { verify: verifyForAlways },
};
/**
* Types of statements.
* Those have `test` method to check it matches to the given statement.
* @private
*/
const StatementTypes = {
"*": { test: () => true },
"block-like": {
test: (node, sourceCode) => isBlockLikeStatement(sourceCode, node),
},
"cjs-export": {
test: (node, sourceCode) =>
node.type === "ExpressionStatement" &&
node.expression.type === "AssignmentExpression" &&
CJS_EXPORT.test(sourceCode.getText(node.expression.left)),
},
"cjs-import": {
test: (node, sourceCode) =>
node.type === "VariableDeclaration" &&
node.declarations.length > 0 &&
Boolean(node.declarations[0].init) &&
CJS_IMPORT.test(sourceCode.getText(node.declarations[0].init)),
},
directive: {
test: astUtils.isDirective,
},
expression: {
test: node =>
node.type === "ExpressionStatement" && !astUtils.isDirective(node),
},
iife: {
test: isIIFEStatement,
},
"multiline-block-like": {
test: (node, sourceCode) =>
node.loc.start.line !== node.loc.end.line &&
isBlockLikeStatement(sourceCode, node),
},
"multiline-expression": {
test: node =>
node.loc.start.line !== node.loc.end.line &&
node.type === "ExpressionStatement" &&
!astUtils.isDirective(node),
},
"multiline-const": newMultilineKeywordTester("const"),
"multiline-let": newMultilineKeywordTester("let"),
"multiline-var": newMultilineKeywordTester("var"),
"singleline-const": newSinglelineKeywordTester("const"),
"singleline-let": newSinglelineKeywordTester("let"),
"singleline-var": newSinglelineKeywordTester("var"),
block: newNodeTypeTester("BlockStatement"),
empty: newNodeTypeTester("EmptyStatement"),
function: newNodeTypeTester("FunctionDeclaration"),
break: newKeywordTester("break"),
case: newKeywordTester("case"),
class: newKeywordTester("class"),
const: newKeywordTester("const"),
continue: newKeywordTester("continue"),
debugger: newKeywordTester("debugger"),
default: newKeywordTester("default"),
do: newKeywordTester("do"),
export: newKeywordTester("export"),
for: newKeywordTester("for"),
if: newKeywordTester("if"),
import: newKeywordTester("import"),
let: newKeywordTester("let"),
return: newKeywordTester("return"),
switch: newKeywordTester("switch"),
throw: newKeywordTester("throw"),
try: newKeywordTester("try"),
var: newKeywordTester("var"),
while: newKeywordTester("while"),
with: newKeywordTester("with"),
};
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "padding-line-between-statements",
url: "https://eslint.style/rules/padding-line-between-statements",
},
},
],
},
type: "layout",
docs: {
description: "Require or disallow padding lines between statements",
recommended: false,
url: "https://eslint.org/docs/latest/rules/padding-line-between-statements",
},
fixable: "whitespace",
schema: {
definitions: {
paddingType: {
enum: Object.keys(PaddingTypes),
},
statementType: {
anyOf: [
{ enum: Object.keys(StatementTypes) },
{
type: "array",
items: { enum: Object.keys(StatementTypes) },
minItems: 1,
uniqueItems: true,
},
],
},
},
type: "array",
items: {
type: "object",
properties: {
blankLine: { $ref: "#/definitions/paddingType" },
prev: { $ref: "#/definitions/statementType" },
next: { $ref: "#/definitions/statementType" },
},
additionalProperties: false,
required: ["blankLine", "prev", "next"],
},
},
messages: {
unexpectedBlankLine: "Unexpected blank line before this statement.",
expectedBlankLine: "Expected blank line before this statement.",
},
},
create(context) {
const sourceCode = context.sourceCode;
const configureList = context.options || [];
let scopeInfo = null;
/**
* Processes to enter to new scope.
* This manages the current previous statement.
* @returns {void}
* @private
*/
function enterScope() {
scopeInfo = {
upper: scopeInfo,
prevNode: null,
};
}
/**
* Processes to exit from the current scope.
* @returns {void}
* @private
*/
function exitScope() {
scopeInfo = scopeInfo.upper;
}
/**
* Checks whether the given node matches the given type.
* @param {ASTNode} node The statement node to check.
* @param {string|string[]} type The statement type to check.
* @returns {boolean} `true` if the statement node matched the type.
* @private
*/
function match(node, type) {
let innerStatementNode = node;
while (innerStatementNode.type === "LabeledStatement") {
innerStatementNode = innerStatementNode.body;
}
if (Array.isArray(type)) {
return type.some(match.bind(null, innerStatementNode));
}
return StatementTypes[type].test(innerStatementNode, sourceCode);
}
/**
* Finds the last matched configure from configureList.
* @param {ASTNode} prevNode The previous statement to match.
* @param {ASTNode} nextNode The current statement to match.
* @returns {Object} The tester of the last matched configure.
* @private
*/
function getPaddingType(prevNode, nextNode) {
for (let i = configureList.length - 1; i >= 0; --i) {
const configure = configureList[i];
const matched =
match(prevNode, configure.prev) &&
match(nextNode, configure.next);
if (matched) {
return PaddingTypes[configure.blankLine];
}
}
return PaddingTypes.any;
}
/**
* Gets padding line sequences between the given 2 statements.
* Comments are separators of the padding line sequences.
* @param {ASTNode} prevNode The previous statement to count.
* @param {ASTNode} nextNode The current statement to count.
* @returns {Array<Token[]>} The array of token pairs.
* @private
*/
function getPaddingLineSequences(prevNode, nextNode) {
const pairs = [];
let prevToken = getActualLastToken(sourceCode, prevNode);
if (nextNode.loc.start.line - prevToken.loc.end.line >= 2) {
do {
const token = sourceCode.getTokenAfter(prevToken, {
includeComments: true,
});
if (token.loc.start.line - prevToken.loc.end.line >= 2) {
pairs.push([prevToken, token]);
}
prevToken = token;
} while (prevToken.range[0] < nextNode.range[0]);
}
return pairs;
}
/**
* Verify padding lines between the given node and the previous node.
* @param {ASTNode} node The node to verify.
* @returns {void}
* @private
*/
function verify(node) {
const parentType = node.parent.type;
const validParent =
astUtils.STATEMENT_LIST_PARENTS.has(parentType) ||
parentType === "SwitchStatement";
if (!validParent) {
return;
}
// Save this node as the current previous statement.
const prevNode = scopeInfo.prevNode;
// Verify.
if (prevNode) {
const type = getPaddingType(prevNode, node);
const paddingLines = getPaddingLineSequences(prevNode, node);
type.verify(context, prevNode, node, paddingLines);
}
scopeInfo.prevNode = node;
}
/**
* Verify padding lines between the given node and the previous node.
* Then process to enter to new scope.
* @param {ASTNode} node The node to verify.
* @returns {void}
* @private
*/
function verifyThenEnterScope(node) {
verify(node);
enterScope();
}
return {
Program: enterScope,
BlockStatement: enterScope,
SwitchStatement: enterScope,
StaticBlock: enterScope,
"Program:exit": exitScope,
"BlockStatement:exit": exitScope,
"SwitchStatement:exit": exitScope,
"StaticBlock:exit": exitScope,
":statement": verify,
SwitchCase: verifyThenEnterScope,
"SwitchCase:exit": exitScope,
};
},
};
@@ -0,0 +1 @@
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AA6CD,MAAM,wCAA+C,EAAE;AAOhD,SAAS,0CAAW,KAAuB,EAAE,GAA8B;IAChF,IAAI,WACF,OAAO,qBACP,iBAAiB,UACjB,MAAM,iBACN,gBAAgB,kCAChB,4BAA4B,qCAC5B,4BAA4B,EAC7B,GAAG;IAEJ,wFAAwF;IACxF,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,UAAU,CAAC,sCAAgB,QAAQ,CAAC,MAAM;YAC5C,sCAAgB,IAAI,CAAC;YACrB,OAAO;gBACL,IAAI,QAAQ,sCAAgB,OAAO,CAAC;gBACpC,IAAI,SAAS,GACX,sCAAgB,MAAM,CAAC,OAAO;YAElC;QACF;IACF,GAAG;QAAC;QAAQ;KAAI;IAEhB,4EAA4E;IAC5E,IAAI,SAAS;QACX,IAAI,qCAAe,CAAC,sCAAgB,MAAM,GAAG,EAAE,KAAK,OAAO,SACzD;IAEJ;IAEA,IAAI,yBAAyB,CAAC;QAC5B,IAAI,CAAC,gCAAgC,6BAA6B,EAAE,MAAM,GACxE;YAAA,IAAI,qCAAe,CAAC,sCAAgB,MAAM,GAAG,EAAE,KAAK,KAAK;gBACvD,EAAE,eAAe;gBACjB,EAAE,cAAc;YAClB;QAAA;IAEJ;IAEA,IAAI,oBAAoB,CAAC;QACvB,IAAI,CAAC,gCAAgC,6BAA6B,EAAE,MAAM,GAAc;YACtF,IAAI,qCAAe,CAAC,sCAAgB,MAAM,GAAG,EAAE,KAAK,KAAK;gBACvD,EAAE,eAAe;gBACjB,EAAE,cAAc;YAClB;YACA;QACF;IACF;IAEA,wBAAwB;IACxB,IAAI,YAAY,CAAC;QACf,IAAI,EAAE,GAAG,KAAK,YAAY,CAAC,6BAA6B,CAAC,EAAE,WAAW,CAAC,WAAW,EAAE;YAClF,EAAE,eAAe;YACjB,EAAE,cAAc;YAChB;QACF;IACF;IAEA,kDAAkD;IAClD,CAAA,GAAA,yBAAiB,EAAE;aAAC;QAAK,mBAAmB,iBAAiB,SAAS,oBAAoB;gCAAW;IAAsB;IAE3H,IAAI,oBAAC,gBAAgB,EAAC,GAAG,CAAA,GAAA,qBAAa,EAAE;QACtC,YAAY,CAAC;QACb,cAAc,CAAC;YACb,gFAAgF;YAChF,8GAA8G;YAC9G,6FAA6F;YAC7F,sDAAsD;YACtD,sDAAsD;YACtD,EAAE;YACF,2EAA2E;YAC3E,yEAAyE;YACzE,kEAAkE;YAClE,IAAI,CAAC,EAAE,aAAa,IAAI,CAAA,GAAA,oCAA4B,EAAE,EAAE,aAAa,GACnE;YAGF,IAAI,CAAC,gCAAgC,6BAA6B,EAAE,aAAa,GAC/E,oBAAA,8BAAA;QAEJ;IACF;IAEA,IAAI,wBAAwB,CAAA;QAC1B,wGAAwG;QACxG,IAAI,EAAE,MAAM,KAAK,EAAE,aAAa,EAC9B,EAAE,cAAc;IAEpB;IAEA,OAAO;QACL,cAAc;uBACZ;YACA,GAAG,gBAAgB;QACrB;QACA,eAAe;YACb,eAAe;QACjB;IACF;AACF","sources":["packages/@react-aria/overlays/src/useOverlay.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes, RefObject} from '@react-types/shared';\nimport {isElementInChildOfActiveScope} from '@react-aria/focus';\nimport {useEffect} from 'react';\nimport {useFocusWithin, useInteractOutside} from '@react-aria/interactions';\n\nexport interface AriaOverlayProps {\n /** Whether the overlay is currently open. */\n isOpen?: boolean,\n\n /** Handler that is called when the overlay should close. */\n onClose?: () => void,\n\n /**\n * Whether to close the overlay when the user interacts outside it.\n * @default false\n */\n isDismissable?: boolean,\n\n /** Whether the overlay should close when focus is lost or moves outside it. */\n shouldCloseOnBlur?: boolean,\n\n /**\n * Whether pressing the escape key to close the overlay should be disabled.\n * @default false\n */\n isKeyboardDismissDisabled?: boolean,\n\n /**\n * When user interacts with the argument element outside of the overlay ref,\n * return true if onClose should be called. This gives you a chance to filter\n * out interaction with elements that should not dismiss the overlay.\n * By default, onClose will always be called on interaction outside the overlay ref.\n */\n shouldCloseOnInteractOutside?: (element: Element) => boolean\n}\n\nexport interface OverlayAria {\n /** Props to apply to the overlay container element. */\n overlayProps: DOMAttributes,\n /** Props to apply to the underlay element, if any. */\n underlayProps: DOMAttributes\n}\n\nconst visibleOverlays: RefObject<Element | null>[] = [];\n\n/**\n * Provides the behavior for overlays such as dialogs, popovers, and menus.\n * Hides the overlay when the user interacts outside it, when the Escape key is pressed,\n * or optionally, on blur. Only the top-most overlay will close at once.\n */\nexport function useOverlay(props: AriaOverlayProps, ref: RefObject<Element | null>): OverlayAria {\n let {\n onClose,\n shouldCloseOnBlur,\n isOpen,\n isDismissable = false,\n isKeyboardDismissDisabled = false,\n shouldCloseOnInteractOutside\n } = props;\n\n // Add the overlay ref to the stack of visible overlays on mount, and remove on unmount.\n useEffect(() => {\n if (isOpen && !visibleOverlays.includes(ref)) {\n visibleOverlays.push(ref);\n return () => {\n let index = visibleOverlays.indexOf(ref);\n if (index >= 0) {\n visibleOverlays.splice(index, 1);\n }\n };\n }\n }, [isOpen, ref]);\n\n // Only hide the overlay when it is the topmost visible overlay in the stack\n let onHide = () => {\n if (visibleOverlays[visibleOverlays.length - 1] === ref && onClose) {\n onClose();\n }\nLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"multi_inject.int.spec.d.ts","sourceRoot":"","sources":["../../../../src/test/annotation/multi_inject.int.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = extractValueFromLiteral;
/**
* Extractor function for a Literal type value node.
*
* @param - value - AST Value object with type `Literal`
* @returns { String|Boolean } - The extracted value converted to correct type.
*/
function extractValueFromLiteral(value) {
var extractedValue = value.value;
var normalizedStringValue = typeof extractedValue === 'string' && extractedValue.toLowerCase();
if (normalizedStringValue === 'true') {
return true;
}
if (normalizedStringValue === 'false') {
return false;
}
return extractedValue;
}
@@ -0,0 +1,501 @@
/**
* Rule: no-multiple-resolved
* Disallow creating new promises with paths that resolve multiple times
*/
'use strict'
const { getScope } = require('./lib/eslint-compat')
const getDocsUrl = require('./lib/get-docs-url')
const {
isPromiseConstructorWithInlineExecutor,
} = require('./lib/is-promise-constructor')
/**
* @typedef {import('estree').Node} Node
* @typedef {import('estree').Expression} Expression
* @typedef {import('estree').Identifier} Identifier
* @typedef {import('estree').FunctionExpression} FunctionExpression
* @typedef {import('estree').ArrowFunctionExpression} ArrowFunctionExpression
* @typedef {import('estree').SimpleCallExpression} CallExpression
* @typedef {import('estree').MemberExpression} MemberExpression
* @typedef {import('estree').NewExpression} NewExpression
* @typedef {import('estree').ImportExpression} ImportExpression
* @typedef {import('estree').YieldExpression} YieldExpression
* @typedef {import('eslint').Rule.CodePath} CodePath
* @typedef {import('eslint').Rule.CodePathSegment} CodePathSegment
*/
/**
* An expression that can throw an error.
* see https://github.com/eslint/eslint/blob/e940be7a83d0caea15b64c1e1c2785a6540e2641/lib/linter/code-path-analysis/code-path-analyzer.js#L639-L643
* @typedef {CallExpression | MemberExpression | NewExpression | ImportExpression | YieldExpression} ThrowableExpression
*/
/**
* Iterate all previous path segments.
* @param {CodePathSegment} segment
* @returns {Iterable<CodePathSegment[]>}
*/
function* iterateAllPrevPathSegments(segment) {
yield* iterate(segment, [])
/**
* @param {CodePathSegment} segment
* @param {CodePathSegment[]} processed
*/
function* iterate(segment, processed) {
if (processed.includes(segment)) {
return
}
const nextProcessed = [segment, ...processed]
for (const prev of segment.prevSegments) {
if (prev.prevSegments.length === 0) {
yield [prev]
} else {
for (const segments of iterate(prev, nextProcessed)) {
yield [prev, ...segments]
}
}
}
}
}
/**
* Iterate all next path segments.
* @param {CodePathSegment} segment
* @returns {Iterable<CodePathSegment[]>}
*/
function* iterateAllNextPathSegments(segment) {
yield* iterate(segment, [])
/**
* @param {CodePathSegment} segment
* @param {CodePathSegment[]} processed
*/
function* iterate(segment, processed) {
if (processed.includes(segment)) {
return
}
const nextProcessed = [segment, ...processed]
for (const next of segment.nextSegments) {
if (next.nextSegments.length === 0) {
yield [next]
} else {
for (const segments of iterate(next, nextProcessed)) {
yield [next, ...segments]
}
}
}
}
}
/**
* Finds the same route path from the given path following previous path segments.
* @param {CodePathSegment} segment
* @returns {CodePathSegment | null}
*/
function findSameRoutePathSegment(segment) {
/** @type {Set<CodePathSegment>} */
const routeSegments = new Set()
for (const route of iterateAllPrevPathSegments(segment)) {
if (routeSegments.size === 0) {
// First
for (const seg of route) {
routeSegments.add(seg)
}
continue
}
for (const seg of routeSegments) {
if (!route.includes(seg)) {
routeSegments.delete(seg)
}
}
}
for (const routeSegment of routeSegments) {
let hasUnreached = false
for (const segments of iterateAllNextPathSegments(routeSegment)) {
if (!segments.includes(segment)) {
// It has a route that does not reach the given path.
hasUnreached = true
break
}
}
if (!hasUnreached) {
return routeSegment
}
}
return null
}
class CodePathInfo {
/**
* @param {CodePath} path
*/
constructor(path) {
this.path = path
/** @type {Map<CodePathSegment, CodePathSegmentInfo>} */
this.segmentInfos = new Map()
this.resolvedCount = 0
/** @type {Set<CodePathSegment>} */
this.currentSegments = new Set()
}
/** @param {CodePathSegment} segment */
onSegmentEnter(segment) {
this.currentSegments.add(segment)
}
/** @param {CodePathSegment} segment */
onSegmentExit(segment) {
this.currentSegments.delete(segment)
}
getCurrentSegmentInfos() {
return [...this.currentSegments].map((segment) => {
const info = this.segmentInfos.get(segment)
if (info) {
return info
}
const newInfo = new CodePathSegmentInfo(this, segment)
this.segmentInfos.set(segment, newInfo)
return newInfo
})
}
/**
* @typedef {object} AlreadyResolvedData
* @property {Identifier} resolved
* @property {'certain' | 'potential'} kind
*/
/**
* Check all paths and return paths resolved multiple times.
* @param {PromiseCodePathContext} promiseCodePathContext
* @returns {Iterable<AlreadyResolvedData & { node: Identifier }>}
*/
*iterateReports(promiseCodePathContext) {
const targets = [...this.segmentInfos.values()].filter(
(info) => info.resolved,
)
for (const segmentInfo of targets) {
const result = this._getAlreadyResolvedData(
segmentInfo.segment,
promiseCodePathContext,
)
if (result) {
yield {
node: segmentInfo.resolved,
resolved: result.resolved,
kind: result.kind,
}
}
}
}
/**
* Compute the previously resolved path.
* @param {CodePathSegment} segment
* @param {PromiseCodePathContext} promiseCodePathContext
* @returns {AlreadyResolvedData | null}
*/
_getAlreadyResolvedData(segment, promiseCodePathContext) {
const prevSegments = segment.prevSegments.filter(
(prev) => !promiseCodePathContext.isResolvedTryBlockCodePathSegment(prev),
)
if (prevSegments.length === 0) {
return null
}
const prevSegmentInfos = prevSegments.map((prev) =>
this._getProcessedSegmentInfo(prev, promiseCodePathContext),
)
if (prevSegmentInfos.every((info) => info.resolved)) {
// If the previous paths are all resolved, the next path is also resolved.
return {
resolved: prevSegmentInfos[0].resolved,
kind: 'certain',
}
}
for (const prevSegmentInfo of prevSegmentInfos) {
if (prevSegmentInfo.resolved) {
// If the previous path is partially resolved,
// then the next path is potentially resolved.
return {
resolved: prevSegmentInfo.resolved,
kind: 'potential',
}
}
if (prevSegmentInfo.potentiallyResolved) {
let potential = false
if (prevSegmentInfo.segment.nextSegments.length === 1) {
// If the previous path is potentially resolved and there is one next path,
// then the next path is potentially resolved.
potential = true
} else {
// This is necessary, for example, if `resolve()` in the finally section.
const segmentInfo = this.segmentInfos.get(segment)
if (segmentInfo && segmentInfo.resolved) {
if (
prevSegmentInfo.segment.nextSegments.every((next) => {
const nextSegmentInfo = this.segmentInfos.get(next)
return (
nextSegmentInfo &&
nextSegmentInfo.resolved === segmentInfo.resolved
)
})
) {
// If the previous path is potentially resolved and
// the next paths all point to the same resolved node,
// then the next path is potentially resolved.
potential = true
}
}
}
if (potential) {
return {
resolved: prevSegmentInfo.potentiallyResolved,
kind: 'potential',
}
}
}
}
const sameRoute = findSameRoutePathSegment(segment)
if (sameRoute) {
const sameRouteSegmentInfo = this._getProcessedSegmentInfo(sameRoute)
if (sameRouteSegmentInfo.potentiallyResolved) {
return {
resolved: sameRouteSegmentInfo.potentiallyResolved,
kind: 'potential',
}
}
}
return null
}
/**
* @param {CodePathSegment} segment
* @param {PromiseCodePathContext} promiseCodePathContext
*/
_getProcessedSegmentInfo(segment, promiseCodePathContext) {
const segmentInfo = this.segmentInfos.get(segment)
if (segmentInfo) {
return segmentInfo
}
const newInfo = new CodePathSegmentInfo(this, segment)
this.segmentInfos.set(segment, newInfo)
const alreadyResolvedData = this._getAlreadyResolvedData(
segment,
promiseCodePathContext,
)
if (alreadyResolvedData) {
if (alreadyResolvedData.kind === 'certain') {
newInfo.resolved = alreadyResolvedData.resolved
} else {
newInfo.potentiallyResolved = alreadyResolvedData.resolved
}
}
return newInfo
}
}
class CodePathSegmentInfo {
/**
* @param {CodePathInfo} pathInfo
* @param {CodePathSegment} segment
*/
constructor(pathInfo, segment) {
this.pathInfo = pathInfo
this.segment = segment
/** @type {Identifier | null} */
this._resolved = null
/** @type {Identifier | null} */
this.potentiallyResolved = null
}
get resolved() {
return this._resolved
}
/** @type {Identifier} */
set resolved(identifier) {
this._resolved = identifier
this.pathInfo.resolvedCount++
}
}
class PromiseCodePathContext {
constructor() {
/** @type {Set<string>} */
this.resolvedSegmentIds = new Set()
}
/** @param {CodePathSegment} */
addResolvedTryBlockCodePathSegment(segment) {
this.resolvedSegmentIds.add(segment.id)
}
/** @param {CodePathSegment} */
isResolvedTryBlockCodePathSegment(segment) {
return this.resolvedSegmentIds.has(segment.id)
}
}
module.exports = {
meta: {
type: 'problem',
docs: {
description:
'Disallow creating new promises with paths that resolve multiple times.',
url: getDocsUrl('no-multiple-resolved'),
},
messages: {
alreadyResolved:
'Promise should not be resolved multiple times. Promise is already resolved on line {{line}}.',
potentiallyAlreadyResolved:
'Promise should not be resolved multiple times. Promise is potentially resolved on line {{line}}.',
},
schema: [],
},
/** @param {import('eslint').Rule.RuleContext} context */
create(context) {
const reported = new Set()
const promiseCodePathContext = new PromiseCodePathContext()
/**
* @param {Identifier} node
* @param {Identifier} resolved
* @param {'certain' | 'potential'} kind
*/
function report(node, resolved, kind) {
if (reported.has(node)) {
return
}
reported.add(node)
context.report({
node: node.parent,
messageId:
kind === 'certain' ? 'alreadyResolved' : 'potentiallyAlreadyResolved',
data: {
line: resolved.loc.start.line,
},
})
}
/**
* @param {CodePathInfo} codePathInfo
* @param {PromiseCodePathContext} promiseCodePathContext
*/
function verifyMultipleResolvedPath(codePathInfo, promiseCodePathContext) {
for (const { node, resolved, kind } of codePathInfo.iterateReports(
promiseCodePathContext,
)) {
report(node, resolved, kind)
}
}
/** @type {CodePathInfo[]} */
const codePathInfoStack = []
/** @type {Set<Identifier>[]} */
const resolverReferencesStack = [new Set()]
/** @type {ThrowableExpression | null} */
let lastThrowableExpression = null
return {
/** @param {FunctionExpression | ArrowFunctionExpression} node */
'FunctionExpression, ArrowFunctionExpression'(node) {
if (!isPromiseConstructorWithInlineExecutor(node.parent)) {
return
}
// Collect and stack `resolve` and `reject` references.
/** @type {Set<Identifier>} */
const resolverReferences = new Set()
const resolvers = node.params.filter(
/** @returns {node is Identifier} */
(node) => node && node.type === 'Identifier',
)
for (const resolver of resolvers) {
const variable = getScope(context, node).set.get(resolver.name)
// istanbul ignore next -- Usually always present.
if (!variable) continue
for (const reference of variable.references) {
resolverReferences.add(reference.identifier)
}
}
resolverReferencesStack.unshift(resolverReferences)
},
/** @param {FunctionExpression | ArrowFunctionExpression} node */
'FunctionExpression, ArrowFunctionExpression:exit'(node) {
if (!isPromiseConstructorWithInlineExecutor(node.parent)) {
return
}
resolverReferencesStack.shift()
},
/** @param {CodePath} path */
onCodePathStart(path) {
codePathInfoStack.unshift(new CodePathInfo(path))
},
onCodePathEnd() {
const codePathInfo = codePathInfoStack.shift()
if (codePathInfo.resolvedCount > 1) {
verifyMultipleResolvedPath(codePathInfo, promiseCodePathContext)
}
},
/** @param {ThrowableExpression} node */
'CallExpression, MemberExpression, NewExpression, ImportExpression, YieldExpression:exit'(
node,
) {
lastThrowableExpression = node
},
/** @param {CodePathSegment} segment */
onCodePathSegmentStart(segment) {
codePathInfoStack[0].onSegmentEnter(segment)
},
/** @param {CodePathSegment} segment */
/* istanbul ignore next */ // It is not called in ESLint v7.
onUnreachableCodePathSegmentStart(segment) {
codePathInfoStack[0].onSegmentEnter(segment)
},
/**
* @param {CodePathSegment} segment
* @param {Node} node
*/
onCodePathSegmentEnd(segment, node) {
if (
node.type === 'CatchClause' &&
lastThrowableExpression &&
lastThrowableExpression.type === 'CallExpression' &&
node.parent.type === 'TryStatement' &&
node.parent.range[0] <= lastThrowableExpression.range[0] &&
lastThrowableExpression.range[1] <= node.parent.range[1]
) {
const resolverReferences = resolverReferencesStack[0]
if (resolverReferences.has(lastThrowableExpression.callee)) {
// Mark a segment if the last expression in the try block is a call to resolve.
promiseCodePathContext.addResolvedTryBlockCodePathSegment(segment)
}
}
codePathInfoStack[0].onSegmentExit(segment)
},
/** @param {CodePathSegment} segment */
/* istanbul ignore next */ // It is not called in ESLint v7.
onUnreachableCodePathSegmentEnd(segment) {
codePathInfoStack[0].onSegmentExit(segment)
},
/** @type {Identifier} */
'CallExpression > Identifier.callee'(node) {
const codePathInfo = codePathInfoStack[0]
const resolverReferences = resolverReferencesStack[0]
if (!resolverReferences.has(node)) {
return
}
for (const segmentInfo of codePathInfo.getCurrentSegmentInfos()) {
// If a resolving path is found, report if the path is already resolved.
// Store the information if it is not already resolved.
if (segmentInfo.resolved) {
report(node, segmentInfo.resolved, 'certain')
continue
}
segmentInfo.resolved = node
}
},
}
},
}
@@ -0,0 +1,50 @@
var $f2vao$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, "onCloseMap", () => $9a8aa1b0b336ea3a$export$f6211563215e3b37);
$parcel$export(module.exports, "useCloseOnScroll", () => $9a8aa1b0b336ea3a$export$18fc8428861184da);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $9a8aa1b0b336ea3a$export$f6211563215e3b37 = new WeakMap();
function $9a8aa1b0b336ea3a$export$18fc8428861184da(opts) {
let { triggerRef: triggerRef, isOpen: isOpen, onClose: onClose } = opts;
(0, $f2vao$react.useEffect)(()=>{
if (!isOpen || onClose === null) return;
let onScroll = (e)=>{
// Ignore if scrolling an scrollable region outside the trigger's tree.
let target = e.target;
// window is not a Node and doesn't have contain, but window contains everything
if (!triggerRef.current || target instanceof Node && !target.contains(triggerRef.current)) return;
// Ignore scroll events on any input or textarea as the cursor position can cause it to scroll
// such as in a combobox. Clicking the dropdown button places focus on the input, and if the
// text inside the input extends beyond the 'end', then it will scroll so the cursor is visible at the end.
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) return;
let onCloseHandler = onClose || $9a8aa1b0b336ea3a$export$f6211563215e3b37.get(triggerRef.current);
if (onCloseHandler) onCloseHandler();
};
window.addEventListener('scroll', onScroll, true);
return ()=>{
window.removeEventListener('scroll', onScroll, true);
};
}, [
isOpen,
onClose,
triggerRef
]);
}
//# sourceMappingURL=useCloseOnScroll.main.js.map
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more