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 @@
{"version":3,"file":"classMetadataKindIsARuntimeDiscriminator.int.spec.d.ts","sourceRoot":"","sources":["../../../src/issues/classMetadataKindIsARuntimeDiscriminator.int.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,80 @@
/**
* @author Jamund Ferguson
* See LICENSE file in root directory for full license.
*/
"use strict"
const callbackNames = ["callback", "cb"]
/** @type {import('./rule-module').RuleModule} */
module.exports = {
meta: {
docs: {
description:
"enforce Node.js-style error-first callback pattern is followed",
recommended: false,
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-callback-literal.md",
},
type: "problem",
fixable: null,
schema: [],
messages: {
unexpectedLiteral:
"Unexpected literal in error position of callback.",
},
},
create(context) {
return {
CallExpression(node) {
const errorArg = node.arguments[0]
if (
errorArg &&
!couldBeError(errorArg) &&
node.callee.type === "Identifier" &&
callbackNames.includes(node.callee.name)
) {
context.report({
node,
messageId: "unexpectedLiteral",
})
}
},
}
},
}
/**
* Determine if a node has a possiblity to be an Error object
* @param {import('estree').Node} [node] ASTNode to check
* @returns {boolean} True if there is a chance it contains an Error obj
*/
function couldBeError(node) {
switch (node?.type) {
case "Identifier":
case "CallExpression":
case "NewExpression":
case "MemberExpression":
case "TaggedTemplateExpression":
case "YieldExpression":
return true // possibly an error object.
case "Literal":
return node.value == null
case "AssignmentExpression":
return couldBeError(node.right)
case "SequenceExpression": {
const exprs = node.expressions
return exprs.length !== 0 && couldBeError(exprs[exprs.length - 1])
}
case "LogicalExpression":
return couldBeError(node.left) || couldBeError(node.right)
case "ConditionalExpression":
return couldBeError(node.consequent) || couldBeError(node.alternate)
default:
return true // assuming unknown nodes can be error objects.
}
}
@@ -0,0 +1,40 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ValueGuard = exports.TypeGuard = exports.KindGuard = void 0;
exports.KindGuard = __importStar(require("./kind"));
exports.TypeGuard = __importStar(require("./type"));
exports.ValueGuard = __importStar(require("./value"));
@@ -0,0 +1,41 @@
{
"name": "aggregate-error",
"version": "3.1.0",
"description": "Create an error from multiple errors",
"license": "MIT",
"repository": "sindresorhus/aggregate-error",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"aggregate",
"error",
"combine",
"multiple",
"many",
"collection",
"iterable",
"iterator"
],
"dependencies": {
"clean-stack": "^2.0.0",
"indent-string": "^4.0.0"
},
"devDependencies": {
"ava": "^2.4.0",
"tsd": "^0.7.1",
"xo": "^0.25.3"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../../src/reflectMetadata/utils/buildArrayMetadataWithArray.ts","../../src/reflectMetadata/utils/buildArrayMetadataWithElement.ts","../../src/reflectMetadata/utils/buildArrayMetadataWithIndex.ts","../../src/reflectMetadata/utils/buildEmptyArrayMetadata.ts","../../src/reflectMetadata/utils/buildEmptyMapMetadata.ts","../../src/reflectMetadata/utils/buildEmptySetMetadata.ts","../../src/reflectMetadata/utils/getOwnReflectMetadata.ts","../../src/reflectMetadata/utils/getReflectMetadata.ts","../../src/reflectMetadata/utils/setReflectMetadata.ts","../../src/reflectMetadata/utils/updateOwnReflectMetadata.ts","../../src/reflectMetadata/utils/updateReflectMetadata.ts","../../src/reflectMetadata/utils/updateSetMetadataWithList.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null],"names":["buildArrayMetadataWithArray","newArrayMetadata","arrayMetadata","push","buildArrayMetadataWithElement","newMetadata","buildArrayMetadataWithIndex","index","buildEmptyArrayMetadata","buildEmptyMapMetadata","Map","buildEmptySetMetadata","Set","getOwnReflectMetadata","target","metadataKey","propertyKey","Reflect","getOwnMetadata","getReflectMetadata","getMetadata","setReflectMetadata","metadata","defineMetadata","updateOwnReflectMetadata","buildDefaultValue","callback","updatedMetadata","updateReflectMetadata","updateSetMetadataWithList","metadataList","setMetadata","item","add"],"mappings":"AAAM,SAAUA,EACdC,GAEA,OAAQC,IACNA,EAAcC,QAAQF,GAEfC,EAEX,CCRM,SAAUE,EACdC,GAEA,OAAQH,IACNA,EAAcC,KAAKE,GAEZH,EAEX,CCRM,SAAUI,EACdD,EACAE,GAEA,OAAQL,IACNA,EAAcK,GAASF,EAEhBH,EAEX,UCTgBM,IACd,MAAO,EACT,UCFgBC,IACd,OAAO,IAAIC,GACb,UCFgBC,IACd,OAAO,IAAIC,GACb,UCDgBC,EACdC,EACAC,EACAC,GAEA,OAAOC,QAAQC,eAAeH,EAAaD,EAAQE,EAGrD,UCRgBG,EACdL,EACAC,EACAC,GAEA,OAAOC,QAAQG,YAAYL,EAAaD,EAAQE,EAGlD,CCTM,SAAUK,EACdP,EACAC,EACAO,EACAN,GAEAC,QAAQM,eAAeR,EAAaO,EAAUR,EAAQE,EACxD,CCLM,SAAUQ,EACdV,EACAC,EACAU,EACAC,EACAV,GAEA,MAIMW,EAA6BD,EAHjCb,EAAsBC,EAAQC,EAAaC,IAC3CS,KAIFR,QAAQM,eAAeR,EAAaY,EAAiBb,EAAQE,EAC/D,CCdM,SAAUY,EACdd,EACAC,EACAU,EACAC,EACAV,GAEA,MAGMW,EAA6BD,EAFjCP,EAAmBL,EAAQC,EAAaC,IAAgBS,KAI1DR,QAAQM,eAAeR,EAAaY,EAAiBb,EAAQE,EAC/D,CCfM,SAAUa,EACdC,GAEA,OAAQC,IACN,IAAK,MAAMC,KAAQF,EACjBC,EAAYE,IAAID,GAGlB,OAAOD,EAEX"}
@@ -0,0 +1,53 @@
/**
* @file ttf 相关错误号定义
* @author mengke01(kekee000@gmail.com)
*/
import string from '../common/string';
import i18n from './i18n';
export default {
/**
* 抛出一个异常
*
* @param {Object} e 异常号或者异常对象
* @param {...Array} fargs args 参数
*
* 例如:
* e = 1001
* e = {
* number: 1001,
* data: 错误数据
* }
*/
raise(e, ...fargs) {
let number;
let data;
if (typeof e === 'object') {
number = e.number || 0;
data = e.data;
}
else {
number = e;
}
let message = i18n.lang[number];
if (fargs.length > 0) {
const args = typeof fargs[0] === 'object'
? fargs[0]
: fargs;
message = string.format(message, args);
}
const event = new Error(message);
event.number = number;
if (data) {
event.data = data;
}
throw event;
}
};
@@ -0,0 +1,14 @@
"use strict";
const normalizeUnit = require("./normalizeUnit-Cn0hUyBC.js");
const endOf = require("./endOf.js");
const parse = require("./parse.js");
const startOf = require("./startOf.js");
function isSame(date, input, unit) {
unit = normalizeUnit.normalizeUnit(unit);
const inputMs = +parse(input);
if (!unit) {
return +date === inputMs;
}
return +startOf(new Date(date), unit) <= inputMs && inputMs <= +endOf(new Date(date), unit);
}
module.exports = isSame;
@@ -0,0 +1,24 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
/// <reference lib="es2017" />
/// <reference lib="es2018.asynciterable" />
/// <reference lib="es2018.asyncgenerator" />
/// <reference lib="es2018.promise" />
/// <reference lib="es2018.regexp" />
/// <reference lib="es2018.intl" />
@@ -0,0 +1 @@
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAYM,MAAM,0DAAiB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,CAAC,YAAC,QAAQ,EAAE,GAAG,OAA2B,EAAE;IACzF,IAAI,eAAe,CAAA,GAAA,aAAK,EAAE;IAC1B,IAAI,cAAc,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAoB;IACjD,MAAM,CAAA,GAAA,mBAAW,EAAE,QAAO,wBAAA,kCAAA,YAAa,GAAG;IAC1C,IAAI,UAAU,CAAA,GAAA,iBAAS,EAAE,eAAe,CAAC,GAAG;QAC1C,GAAG,KAAK;aACR;QACA;YACE,aAAa,OAAO,GAAG;YACvB,IAAI,aACF,YAAY,QAAQ;QAExB;IACF;IAEA,CAAA,GAAA,iBAAS,EAAE,aAAa;IAExB,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,CAAC,aAAa,OAAO,EAAE;YACzB,QAAQ,IAAI,CACV;YAGF,aAAa,OAAO,GAAG,MAAM,iCAAiC;QAChE;IACF,GAAG,EAAE;IAEL,qBACE,gCAAC,CAAA,GAAA,yCAAoB,EAAE,QAAQ;QAAC,OAAO;OACpC;AAGP;AAEO,SAAS,0CAAoB,YAAC,QAAQ,EAAwB;IACnE,IAAI,UAAU,CAAA,GAAA,cAAM,EAAE,IAAO,CAAA;YAAC,UAAU,KAAO;QAAC,CAAA,GAAI,EAAE;IACtD,qBACE,gCAAC,CAAA,GAAA,yCAAoB,EAAE,QAAQ;QAAC,OAAO;OACpC;AAGP","sources":["packages/@react-aria/interactions/src/PressResponder.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\nimport {mergeProps, useObjectRef, useSyncRef} from '@react-aria/utils';\nimport {PressProps} from './usePress';\nimport {PressResponderContext} from './context';\nimport React, {ForwardedRef, ReactNode, useContext, useEffect, useMemo, useRef} from 'react';\n\ninterface PressResponderProps extends PressProps {\n children: ReactNode\n}\n\nexport const PressResponder = React.forwardRef(({children, ...props}: PressResponderProps, ref: ForwardedRef<FocusableElement>) => {\n let isRegistered = useRef(false);\n let prevContext = useContext(PressResponderContext);\n ref = useObjectRef(ref || prevContext?.ref);\n let context = mergeProps(prevContext || {}, {\n ...props,\n ref,\n register() {\n isRegistered.current = true;\n if (prevContext) {\n prevContext.register();\n }\n }\n });\n\n useSyncRef(prevContext, ref);\n\n useEffect(() => {\n if (!isRegistered.current) {\n console.warn(\n 'A PressResponder was rendered without a pressable child. ' +\n 'Either call the usePress hook, or wrap your DOM node with <Pressable> component.'\n );\n isRegistered.current = true; // only warn once in strict mode.\n }\n }, []);\n\n return (\n <PressResponderContext.Provider value={context}>\n {children}\n </PressResponderContext.Provider>\n );\n});\n\nexport function ClearPressResponder({children}: {children: ReactNode}) {\n let context = useMemo(() => ({register: () => {}}), []);\n return (\n <PressResponderContext.Provider value={context}>\n {children}\n </PressResponderContext.Provider>\n );\n}\n"],"names":[],"version":3,"file":"PressResponder.module.js.map"}
@@ -0,0 +1,13 @@
/**
* @license React
* use-sync-external-store.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var useSyncExternalStore = require("react").useSyncExternalStore;
exports.useSyncExternalStore = useSyncExternalStore;
@@ -0,0 +1,101 @@
'use strict';
const buffers = [
Buffer.from(
(new Array(100)).fill('').map((_, i) => `key${i}=value${i}`).join('&')
),
];
const calls = {
field: 0,
end: 0,
};
let n = 3e3;
const moduleName = process.argv[2];
switch (moduleName) {
case 'busboy': {
const busboy = require('busboy');
console.time(moduleName);
(function next() {
const parser = busboy({
limits: {
fieldSizeLimit: Infinity,
},
headers: {
'content-type': 'application/x-www-form-urlencoded; charset=utf-8',
},
});
parser.on('field', (name, val, info) => {
++calls.field;
}).on('close', () => {
++calls.end;
if (--n === 0)
console.timeEnd(moduleName);
else
process.nextTick(next);
});
for (const buf of buffers)
parser.write(buf);
parser.end();
})();
break;
}
case 'formidable': {
const QuerystringParser =
require('formidable/src/parsers/Querystring.js');
console.time(moduleName);
(function next() {
const parser = new QuerystringParser();
parser.on('data', (obj) => {
++calls.field;
}).on('end', () => {
++calls.end;
if (--n === 0)
console.timeEnd(moduleName);
else
process.nextTick(next);
});
for (const buf of buffers)
parser.write(buf);
parser.end();
})();
break;
}
case 'formidable-streaming': {
const QuerystringParser =
require('formidable/src/parsers/StreamingQuerystring.js');
console.time(moduleName);
(function next() {
const parser = new QuerystringParser();
parser.on('data', (obj) => {
++calls.field;
}).on('end', () => {
++calls.end;
if (--n === 0)
console.timeEnd(moduleName);
else
process.nextTick(next);
});
for (const buf of buffers)
parser.write(buf);
parser.end();
})();
break;
}
default:
if (moduleName === undefined)
console.error('Missing parser module name');
else
console.error(`Invalid parser module name: ${moduleName}`);
process.exit(1);
}
@@ -0,0 +1,94 @@
import path from 'node:path';
import { minimatch } from 'minimatch';
import { cjsRequire } from '../require.js';
import { createRule, pkgUp } from '../utils/index.js';
function getEntryPoint(context) {
const pkgPath = pkgUp({
cwd: context.physicalFilename,
});
try {
return cjsRequire.resolve(path.dirname(pkgPath));
}
catch {
return null;
}
}
function findScope(context, identifier) {
const { scopeManager } = context.sourceCode;
return scopeManager?.scopes
.slice()
.reverse()
.find(scope => scope.variables.some(variable => variable.identifiers.some(node => node.name === identifier)));
}
function findDefinition(objectScope, identifier) {
const variable = objectScope.variables.find(variable => variable.name === identifier);
return variable.defs.find(def => 'name' in def.name && def.name.name === identifier);
}
export default createRule({
name: 'no-import-module-exports',
meta: {
type: 'problem',
docs: {
category: 'Module systems',
description: 'Forbid import statements with CommonJS module.exports.',
recommended: true,
},
fixable: 'code',
schema: [
{
type: 'object',
properties: {
exceptions: { type: 'array' },
},
additionalProperties: false,
},
],
messages: {
notAllowed: "Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi')",
},
},
defaultOptions: [],
create(context) {
const importDeclarations = [];
const entryPoint = getEntryPoint(context);
const options = context.options[0] || {};
let alreadyReported = false;
return {
ImportDeclaration(node) {
importDeclarations.push(node);
},
MemberExpression(node) {
if (alreadyReported) {
return;
}
const filename = context.physicalFilename;
const isEntryPoint = entryPoint === filename;
const isIdentifier = node.object.type === 'Identifier';
if (!('name' in node.object)) {
return;
}
const hasKeywords = /^(module|exports)$/.test(node.object.name);
const objectScope = hasKeywords
? findScope(context, node.object.name)
: undefined;
const variableDefinition = objectScope && findDefinition(objectScope, node.object.name);
const isImportBinding = variableDefinition?.type === 'ImportBinding';
const hasCJSExportReference = hasKeywords && (!objectScope || objectScope.type === 'module');
if (isIdentifier &&
hasCJSExportReference &&
!isEntryPoint &&
!options.exceptions?.some(glob => minimatch(filename, glob, { nocomment: true })) &&
!isImportBinding) {
for (const importDeclaration of importDeclarations) {
context.report({
node: importDeclaration,
messageId: 'notAllowed',
});
}
alreadyReported = true;
}
},
};
},
});
//# sourceMappingURL=no-import-module-exports.js.map
@@ -0,0 +1,16 @@
'use strict';
var $abs = require('./abs');
var $floor = require('./floor');
var $isNaN = require('./isNaN');
var $isFinite = require('./isFinite');
/** @type {import('./isInteger')} */
module.exports = function isInteger(argument) {
if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {
return false;
}
var absValue = $abs(argument);
return $floor(absValue) === absValue;
};
@@ -0,0 +1 @@
export { parse, safeParse, parseAsync, safeParseAsync } from "../core/index.js";
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('restFrom', require('../rest'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,21 @@
The MIT License
Copyright JS Foundation and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/function-bind
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,60 @@
# is-stream
> Check if something is a [Node.js stream](https://nodejs.org/api/stream.html)
## Install
```
$ npm install is-stream
```
## Usage
```js
const fs = require('fs');
const isStream = require('is-stream');
isStream(fs.createReadStream('unicorn.png'));
//=> true
isStream({});
//=> false
```
## API
### isStream(stream)
Returns a `boolean` for whether it's a [`Stream`](https://nodejs.org/api/stream.html#stream_stream).
#### isStream.writable(stream)
Returns a `boolean` for whether it's a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable).
#### isStream.readable(stream)
Returns a `boolean` for whether it's a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable).
#### isStream.duplex(stream)
Returns a `boolean` for whether it's a [`stream.Duplex`](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
#### isStream.transform(stream)
Returns a `boolean` for whether it's a [`stream.Transform`](https://nodejs.org/api/stream.html#stream_class_stream_transform).
## Related
- [is-file-stream](https://github.com/jamestalmage/is-file-stream) - Detect if a stream is a file stream
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-is-stream?utm_source=npm-is-stream&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
@@ -0,0 +1,85 @@
{
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"bugs": "https://github.com/syntax-tree/mdast-util-find-and-replace/issues",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
],
"dependencies": {
"@types/mdast": "^4.0.0",
"escape-string-regexp": "^5.0.0",
"unist-util-is": "^6.0.0",
"unist-util-visit-parents": "^6.0.0"
},
"description": "mdast utility to find and replace text in a tree",
"devDependencies": {
"@types/node": "^22.0.0",
"c8": "^10.0.0",
"prettier": "^3.0.0",
"remark-cli": "^12.0.0",
"remark-preset-wooorm": "^10.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"unist-builder": "^4.0.0",
"xo": "^0.60.0"
},
"exports": "./index.js",
"files": [
"index.d.ts.map",
"index.d.ts",
"index.js",
"lib/"
],
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"keywords": [
"find",
"markdown",
"mdast-util",
"mdast",
"unist",
"utility",
"util",
"replace"
],
"license": "MIT",
"name": "mdast-util-find-and-replace",
"prettier": {
"bracketSpacing": false,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false
},
"remarkConfig": {
"plugins": [
"remark-preset-wooorm"
]
},
"repository": "syntax-tree/mdast-util-find-and-replace",
"scripts": {
"build": "tsc --build --clean && tsc --build && type-coverage",
"format": "remark --frail --output --quiet -- . && prettier --log-level warn --write -- . && xo --fix",
"test-api": "node --conditions development test.js",
"test-coverage": "c8 --100 --reporter lcov -- npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
},
"sideEffects": false,
"typeCoverage": {
"atLeast": 100,
"ignoreFiles": [
"lib/index.d.ts"
],
"strict": true
},
"type": "module",
"version": "3.0.2",
"xo": {
"prettier": true,
"rules": {
"unicorn/prefer-at": "off"
}
}
}
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=SingleBindingPlanParamsConstraint.js.map
@@ -0,0 +1,2 @@
import 'reflect-metadata';
//# sourceMappingURL=containerGetShouldNotInstantiateAsyncSingletonBindingsTwice.int.spec.d.ts.map
@@ -0,0 +1,22 @@
import { dirname, resolve } from 'path';
import { readdir, stat } from 'fs';
import { promisify } from 'util';
const toStats = promisify(stat);
const toRead = promisify(readdir);
export default async function (start, callback) {
let dir = resolve('.', start);
let tmp, stats = await toStats(dir);
if (!stats.isDirectory()) {
dir = dirname(dir);
}
while (true) {
tmp = await callback(dir, await toRead(dir));
if (tmp) return resolve(dir, tmp);
dir = dirname(tmp = dir);
if (tmp === dir) break;
}
}
@@ -0,0 +1 @@
{"name":"@tanstack/virtual-core","version":"3.11.2","requiresBuild":false,"files":{"dist/cjs/index.cjs":{"checkedAt":1794532108670,"integrity":"sha512-LCh9ZPupAoeRCVHwFbC6JST2zon6nm4Hwn9MG462Kxe7eN5pU7PfdU19PdMgTAB8AMuCLINHIbXMw9YAvue9Ag==","mode":420,"size":24917},"dist/cjs/utils.cjs":{"checkedAt":1794532108670,"integrity":"sha512-EttFWr3hMXxJoJBG1T7AtQgtNzuhoGF4n9TecR2mr6zSS9Tey/zG0GhTJ7bzhegLNxDseHk9t1CuTAkF/rhiuA==","mode":420,"size":2182},"dist/cjs/index.d.cts":{"checkedAt":1794532108671,"integrity":"sha512-vZ+ItRosnjms8MmtyxkXmKbWpDfw5oZumiALMTXmNVMHmDaOYIkaacp2+wSjgVhwpSc78aIZ+o3y89Q/XkJMAg==","mode":420,"size":6132},"dist/cjs/utils.d.cts":{"checkedAt":1794532108671,"integrity":"sha512-ttvDRC5UADFTLQx0LLVyc3F4Cn2AWit+IqTMkmiA8pN/p3zA1Du4AaPPpJ2dZy7VKFMIrdk7HC1rV1psRizdig==","mode":420,"size":737},"dist/esm/index.js":{"checkedAt":1794532108671,"integrity":"sha512-57yj5+Ng4i5Z7FOW9d8d1GRhsZCHneCZixuKtRvujzQ3u9CkTxPbC8GHNi669104tvftd+FzjTf+VvW1ps7SOw==","mode":420,"size":24453},"dist/esm/utils.js":{"checkedAt":1794532108671,"integrity":"sha512-1q/bnA165COX+L6hh4VqLZNnlYmFOVXvGfnxTfrlLjJSdgROeIHpftZEkxwPGgetUmvdzaZuHAAWm47QmvHq1Q==","mode":420,"size":2034},"package.json":{"checkedAt":1794532108671,"integrity":"sha512-Zb7rKkN9ZUzJVWyUryW554JC+unLHWhUBQnkvnoG86DWWyU3i/jaDKkTjiW98MRGRTMIBm6eIWimdwC81Tzt5w==","mode":420,"size":1089},"dist/cjs/index.cjs.map":{"checkedAt":1794532108671,"integrity":"sha512-gYfIO26uuKD9O8MdHwGbdxAYvOJO7cNNnohOdM9eCBqof4swbteXs5y4kd4KhXgy7qeH1UYh8QCiVyA4MMa5VQ==","mode":420,"size":44697},"dist/esm/index.js.map":{"checkedAt":1794532108672,"integrity":"sha512-89+jgAHeA5Zvg7LjtKcJLupt78O7dEmfA12p+BHCjs1Wh0S2hcdraSX4Mxu51obim9BE8LMAp7iU6X6h4OlYYg==","mode":420,"size":44560},"dist/cjs/utils.cjs.map":{"checkedAt":1794532108672,"integrity":"sha512-cxamP+U1ezB5WNqhGvlhLxmH2ntfla7FzLT54WttDvTLRYzk7DWZnOX957fFfmkBxrIfO4892qASb9DncZ2pZQ==","mode":420,"size":3889},"dist/esm/utils.js.map":{"checkedAt":1794532108672,"integrity":"sha512-FJt6He4/Ki5V0gocpvHQuXghMxl4/XixC8yaiLpR/8NiekT70JJqn6+ug5CyrbM3JnF2J58BdHKqVYzWi/lXbQ==","mode":420,"size":3885},"dist/esm/index.d.ts":{"checkedAt":1794532108672,"integrity":"sha512-EVtuml8iXx4ZUVajoideJg9zrmKK6udu49i7fms7V6REUcHB3mjNLnSg9M9o1PJEGGC408nbMPQo7rHek1/Hbg==","mode":420,"size":6131},"src/index.ts":{"checkedAt":1794532108672,"integrity":"sha512-yJhC9cKUJQqn6mzp+tXFX4TYc1MLca6w5TCTstNTwBeV5X9Pzjg2+S413dLtHm9hSa/Po/zg6Zu5ugyzd0iiuQ==","mode":420,"size":27803},"dist/esm/utils.d.ts":{"checkedAt":1794532108671,"integrity":"sha512-ttvDRC5UADFTLQx0LLVyc3F4Cn2AWit+IqTMkmiA8pN/p3zA1Du4AaPPpJ2dZy7VKFMIrdk7HC1rV1psRizdig==","mode":420,"size":737},"src/utils.ts":{"checkedAt":1794532108673,"integrity":"sha512-A+sy8cVVAouqaOXLatCf7HUjHxYRqdKFquBLvnKI3CkNcZyktdrSBf/h/v8xBvLTNHT9YAGyhPtJr5rspZg3lQ==","mode":420,"size":2364},"LICENSE":{"checkedAt":1794532108673,"integrity":"sha512-WxtFIdggoRh30SS8TYSc02iM8s4IjRzRhQrMRS3MpMFMBjXm7XdZynlNto4YSzcwwKwOG8mcHFszSJLjYm0hHg==","mode":420,"size":1079}}}
@@ -0,0 +1,7 @@
"use client";
import {
useSliderThumb
} from "./chunk-DARTHXYH.mjs";
export {
useSliderThumb
};
@@ -0,0 +1,86 @@
/**
* Copy partial data into the target message.
*
* If a singular scalar or enum field is present in the source, it
* replaces the field in the target.
*
* If a singular message field is present in the source, it is merged
* with the target field by calling mergePartial() of the responsible
* message type.
*
* If a repeated field is present in the source, its values replace
* all values in the target array, removing extraneous values.
* Repeated message fields are copied, not merged.
*
* If a map field is present in the source, entries are added to the
* target map, replacing entries with the same key. Entries that only
* exist in the target remain. Entries with message values are copied,
* not merged.
*
* Note that this function differs from protobuf merge semantics,
* which appends repeated fields.
*/
export function reflectionMergePartial(info, target, source) {
let fieldValue, // the field value we are working with
input = source, output; // where we want our field value to go
for (let field of info.fields) {
let name = field.localName;
if (field.oneof) {
const group = input[field.oneof]; // this is the oneof`s group in the source
if ((group === null || group === void 0 ? void 0 : group.oneofKind) == undefined) { // the user is free to omit
continue; // we skip this field, and all other members too
}
fieldValue = group[name]; // our value comes from the the oneof group of the source
output = target[field.oneof]; // and our output is the oneof group of the target
output.oneofKind = group.oneofKind; // always update discriminator
if (fieldValue == undefined) {
delete output[name]; // remove any existing value
continue; // skip further work on field
}
}
else {
fieldValue = input[name]; // we are using the source directly
output = target; // we want our field value to go directly into the target
if (fieldValue == undefined) {
continue; // skip further work on field, existing value is used as is
}
}
if (field.repeat)
output[name].length = fieldValue.length; // resize target array to match source array
// now we just work with `fieldValue` and `output` to merge the value
switch (field.kind) {
case "scalar":
case "enum":
if (field.repeat)
for (let i = 0; i < fieldValue.length; i++)
output[name][i] = fieldValue[i]; // not a reference type
else
output[name] = fieldValue; // not a reference type
break;
case "message":
let T = field.T();
if (field.repeat)
for (let i = 0; i < fieldValue.length; i++)
output[name][i] = T.create(fieldValue[i]);
else if (output[name] === undefined)
output[name] = T.create(fieldValue); // nothing to merge with
else
T.mergePartial(output[name], fieldValue);
break;
case "map":
// Map and repeated fields are simply overwritten, not appended or merged
switch (field.V.kind) {
case "scalar":
case "enum":
Object.assign(output[name], fieldValue); // elements are not reference types
break;
case "message":
let T = field.V.T();
for (let k of Object.keys(fieldValue))
output[name][k] = T.create(fieldValue[k]);
break;
}
break;
}
}
}
@@ -0,0 +1,63 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var listboxRole = {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-errormessage': null,
'aria-expanded': null,
'aria-invalid': null,
'aria-multiselectable': null,
'aria-readonly': null,
'aria-required': null,
'aria-orientation': 'vertical'
},
relatedConcepts: [{
concept: {
attributes: [{
constraints: ['>1'],
name: 'size'
}],
constraints: ['the size attribute value is greater than 1'],
name: 'select'
},
module: 'HTML'
}, {
concept: {
attributes: [{
name: 'multiple'
}],
name: 'select'
},
module: 'HTML'
}, {
concept: {
name: 'datalist'
},
module: 'HTML'
}, {
concept: {
name: 'list'
},
module: 'ARIA'
}, {
concept: {
name: 'select'
},
module: 'XForms'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [['option', 'group'], ['option']],
requiredProps: {},
superClass: [['roletype', 'widget', 'composite', 'select'], ['roletype', 'structure', 'section', 'group', 'select']]
};
var _default = exports.default = listboxRole;
@@ -0,0 +1,41 @@
// This is an example of using tokens to add a custom behaviour.
//
// This adds a option order check so that --some-unstable-option
// may only be used after --enable-experimental-options
//
// Note: this is not a common behaviour, the order of different options
// does not usually matter.
import { parseArgs } from '../index.js';
function findTokenIndex(tokens, target) {
return tokens.findIndex((token) => token.kind === 'option' &&
token.name === target
);
}
const experimentalName = 'enable-experimental-options';
const unstableName = 'some-unstable-option';
const options = {
[experimentalName]: { type: 'boolean' },
[unstableName]: { type: 'boolean' },
};
const { values, tokens } = parseArgs({ options, tokens: true });
const experimentalIndex = findTokenIndex(tokens, experimentalName);
const unstableIndex = findTokenIndex(tokens, unstableName);
if (unstableIndex !== -1 &&
((experimentalIndex === -1) || (unstableIndex < experimentalIndex))) {
throw new Error(`'--${experimentalName}' must be specified before '--${unstableName}'`);
}
console.log(values);
/* eslint-disable max-len */
// Try the following:
// node ordered-options.mjs
// node ordered-options.mjs --some-unstable-option
// node ordered-options.mjs --some-unstable-option --enable-experimental-options
// node ordered-options.mjs --enable-experimental-options --some-unstable-option
@@ -0,0 +1,125 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getChildren = getChildren;
exports.getParent = getParent;
exports.getSiblings = getSiblings;
exports.getAttributeValue = getAttributeValue;
exports.hasAttrib = hasAttrib;
exports.getName = getName;
exports.nextElementSibling = nextElementSibling;
exports.prevElementSibling = prevElementSibling;
var domhandler_1 = require("domhandler");
/**
* Get a node's children.
*
* @category Traversal
* @param elem Node to get the children of.
* @returns `elem`'s children, or an empty array.
*/
function getChildren(elem) {
return (0, domhandler_1.hasChildren)(elem) ? elem.children : [];
}
/**
* Get a node's parent.
*
* @category Traversal
* @param elem Node to get the parent of.
* @returns `elem`'s parent node, or `null` if `elem` is a root node.
*/
function getParent(elem) {
return elem.parent || null;
}
/**
* Gets an elements siblings, including the element itself.
*
* Attempts to get the children through the element's parent first. If we don't
* have a parent (the element is a root node), we walk the element's `prev` &
* `next` to get all remaining nodes.
*
* @category Traversal
* @param elem Element to get the siblings of.
* @returns `elem`'s siblings, including `elem`.
*/
function getSiblings(elem) {
var _a, _b;
var parent = getParent(elem);
if (parent != null)
return getChildren(parent);
var siblings = [elem];
var prev = elem.prev, next = elem.next;
while (prev != null) {
siblings.unshift(prev);
(_a = prev, prev = _a.prev);
}
while (next != null) {
siblings.push(next);
(_b = next, next = _b.next);
}
return siblings;
}
/**
* Gets an attribute from an element.
*
* @category Traversal
* @param elem Element to check.
* @param name Attribute name to retrieve.
* @returns The element's attribute value, or `undefined`.
*/
function getAttributeValue(elem, name) {
var _a;
return (_a = elem.attribs) === null || _a === void 0 ? void 0 : _a[name];
}
/**
* Checks whether an element has an attribute.
*
* @category Traversal
* @param elem Element to check.
* @param name Attribute name to look for.
* @returns Returns whether `elem` has the attribute `name`.
*/
function hasAttrib(elem, name) {
return (elem.attribs != null &&
Object.prototype.hasOwnProperty.call(elem.attribs, name) &&
elem.attribs[name] != null);
}
/**
* Get the tag name of an element.
*
* @category Traversal
* @param elem The element to get the name for.
* @returns The tag name of `elem`.
*/
function getName(elem) {
return elem.name;
}
/**
* Returns the next element sibling of a node.
*
* @category Traversal
* @param elem The element to get the next sibling of.
* @returns `elem`'s next sibling that is a tag, or `null` if there is no next
* sibling.
*/
function nextElementSibling(elem) {
var _a;
var next = elem.next;
while (next !== null && !(0, domhandler_1.isTag)(next))
(_a = next, next = _a.next);
return next;
}
/**
* Returns the previous element sibling of a node.
*
* @category Traversal
* @param elem The element to get the previous sibling of.
* @returns `elem`'s previous sibling that is a tag, or `null` if there is no
* previous sibling.
*/
function prevElementSibling(elem) {
var _a;
var prev = elem.prev;
while (prev !== null && !(0, domhandler_1.isTag)(prev))
(_a = prev, prev = _a.prev);
return prev;
}
//# sourceMappingURL=traversal.js.map
@@ -0,0 +1,15 @@
module.exports = {
"deselectedItem": (args)=>`${args.item} nepasirinkta.`,
"longPressToSelect": `Nor\u{117}dami \u{12F}jungti pasirinkimo re\u{17E}im\u{105}, paspauskite ir palaikykite.`,
"select": `Pasirinkti`,
"selectedAll": `Pasirinkti visi elementai.`,
"selectedCount": (args, formatter)=>`${formatter.plural(args.count, {
"=0": `Nepasirinktas n\u{117} vienas elementas`,
one: ()=>`Pasirinktas ${formatter.number(args.count)} elementas`,
other: ()=>`Pasirinkta element\u{173}: ${formatter.number(args.count)}`
})}.`,
"selectedItem": (args)=>`Pasirinkta: ${args.item}.`
};
//# sourceMappingURL=lt-LT.main.js.map
@@ -0,0 +1,28 @@
import { Pair } from '../../nodes/Pair';
import type { Scalar } from '../../nodes/Scalar';
import type { ToJSContext } from '../../nodes/toJS';
import { YAMLMap } from '../../nodes/YAMLMap';
import type { Schema } from '../../schema/Schema';
import type { StringifyContext } from '../../stringify/stringify';
import type { CreateNodeContext } from '../../util';
import type { CollectionTag } from '../types';
export declare class YAMLSet<T = unknown> extends YAMLMap<T, Scalar<null> | null> {
static tag: string;
constructor(schema?: Schema);
add(key: T | Pair<T, Scalar<null> | null> | {
key: T;
value: Scalar<null> | null;
}): void;
/**
* If `keepPair` is `true`, returns the Pair matching `key`.
* Otherwise, returns the value of that Pair's key.
*/
get(key: unknown, keepPair?: boolean): any;
set(key: T, value: boolean): void;
/** @deprecated Will throw; `value` must be boolean */
set(key: T, value: null): void;
toJSON(_?: unknown, ctx?: ToJSContext): any;
toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string;
static from(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLSet;
}
export declare const set: CollectionTag;
@@ -0,0 +1,12 @@
import { createClassGroupUtils } from './class-group-utils'
import { createLruCache } from './lru-cache'
import { createParseClassName } from './parse-class-name'
import { AnyConfig } from './types'
export type ConfigUtils = ReturnType<typeof createConfigUtils>
export const createConfigUtils = (config: AnyConfig) => ({
cache: createLruCache<string, string>(config.cacheSize),
parseClassName: createParseClassName(config),
...createClassGroupUtils(config),
})
@@ -0,0 +1,201 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/use-button.ts
var use_button_exports = {};
__export(use_button_exports, {
useButton: () => useButton
});
module.exports = __toCommonJS(use_button_exports);
var import_system = require("@heroui/system");
var import_shared_utils = require("@heroui/shared-utils");
var import_react = require("react");
var import_focus = require("@react-aria/focus");
var import_utils = require("@react-aria/utils");
var import_react_utils2 = require("@heroui/react-utils");
var import_theme = require("@heroui/theme");
var import_react2 = require("react");
var import_use_aria_button = require("@heroui/use-aria-button");
var import_interactions = require("@react-aria/interactions");
var import_ripple = require("@heroui/ripple");
// src/button-group-context.ts
var import_react_utils = require("@heroui/react-utils");
var [ButtonGroupProvider, useButtonGroupContext] = (0, import_react_utils.createContext)({
name: "ButtonGroupContext",
strict: false
});
// src/use-button.ts
function useButton(props) {
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
const groupContext = useButtonGroupContext();
const globalContext = (0, import_system.useProviderContext)();
const isInGroup = !!groupContext;
const {
ref,
as,
children,
startContent: startContentProp,
endContent: endContentProp,
autoFocus,
className,
spinner,
isLoading = false,
disableRipple: disableRippleProp = false,
fullWidth = (_a = groupContext == null ? void 0 : groupContext.fullWidth) != null ? _a : false,
radius = groupContext == null ? void 0 : groupContext.radius,
size = (_b = groupContext == null ? void 0 : groupContext.size) != null ? _b : "md",
color = (_c = groupContext == null ? void 0 : groupContext.color) != null ? _c : "default",
variant = (_d = groupContext == null ? void 0 : groupContext.variant) != null ? _d : "solid",
disableAnimation = (_f = (_e = groupContext == null ? void 0 : groupContext.disableAnimation) != null ? _e : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _f : false,
isDisabled: isDisabledProp = (_g = groupContext == null ? void 0 : groupContext.isDisabled) != null ? _g : false,
isIconOnly = (_h = groupContext == null ? void 0 : groupContext.isIconOnly) != null ? _h : false,
spinnerPlacement = "start",
onPress,
onClick,
...otherProps
} = props;
const Component = as || "button";
const shouldFilterDOMProps = typeof Component === "string";
const domRef = (0, import_react_utils2.useDOMRef)(ref);
const disableRipple = (_i = disableRippleProp || (globalContext == null ? void 0 : globalContext.disableRipple)) != null ? _i : disableAnimation;
const { isFocusVisible, isFocused, focusProps } = (0, import_focus.useFocusRing)({
autoFocus
});
const isDisabled = isDisabledProp || isLoading;
const styles = (0, import_react2.useMemo)(
() => (0, import_theme.button)({
size,
color,
variant,
radius,
fullWidth,
isDisabled,
isInGroup,
disableAnimation,
isIconOnly,
className
}),
[
size,
color,
variant,
radius,
fullWidth,
isDisabled,
isInGroup,
isIconOnly,
disableAnimation,
className
]
);
const { onPress: onRipplePressHandler, onClear: onClearRipple, ripples } = (0, import_ripple.useRipple)();
const handlePress = (0, import_react.useCallback)(
(e) => {
if (disableRipple || isDisabled || disableAnimation)
return;
domRef.current && onRipplePressHandler(e);
},
[disableRipple, isDisabled, disableAnimation, domRef, onRipplePressHandler]
);
const { buttonProps: ariaButtonProps, isPressed } = (0, import_use_aria_button.useAriaButton)(
{
elementType: as,
isDisabled,
onPress: (0, import_utils.chain)(onPress, handlePress),
onClick,
...otherProps
},
domRef
);
const { isHovered, hoverProps } = (0, import_interactions.useHover)({ isDisabled });
const getButtonProps = (0, import_react.useCallback)(
(props2 = {}) => ({
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
"data-pressed": (0, import_shared_utils.dataAttr)(isPressed),
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
"data-hover": (0, import_shared_utils.dataAttr)(isHovered),
"data-loading": (0, import_shared_utils.dataAttr)(isLoading),
...(0, import_utils.mergeProps)(
ariaButtonProps,
focusProps,
hoverProps,
(0, import_react_utils2.filterDOMProps)(otherProps, {
enabled: shouldFilterDOMProps
}),
(0, import_react_utils2.filterDOMProps)(props2)
)
}),
[
isLoading,
isDisabled,
isFocused,
isPressed,
shouldFilterDOMProps,
isFocusVisible,
isHovered,
ariaButtonProps,
focusProps,
hoverProps,
otherProps
]
);
const getIconClone = (icon) => (0, import_react2.isValidElement)(icon) ? (0, import_react2.cloneElement)(icon, {
"aria-hidden": true,
focusable: false,
tabIndex: -1
}) : null;
const startContent = getIconClone(startContentProp);
const endContent = getIconClone(endContentProp);
const spinnerSize = (0, import_react2.useMemo)(() => {
const buttonSpinnerSizeMap = {
sm: "sm",
md: "sm",
lg: "md"
};
return buttonSpinnerSizeMap[size];
}, [size]);
const getRippleProps = (0, import_react.useCallback)(
() => ({ ripples, onClear: onClearRipple }),
[ripples, onClearRipple]
);
return {
Component,
children,
domRef,
spinner,
styles,
startContent,
endContent,
isLoading,
spinnerPlacement,
spinnerSize,
disableRipple,
getButtonProps,
getRippleProps,
isIconOnly
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
useButton
});
@@ -0,0 +1,15 @@
export { default as at } from './wrapperAt.js';
export { default as chain } from './chain.js';
export { default as commit } from './commit.js';
export { default as lodash } from './wrapperLodash.js';
export { default as next } from './next.js';
export { default as plant } from './plant.js';
export { default as reverse } from './wrapperReverse.js';
export { default as tap } from './tap.js';
export { default as thru } from './thru.js';
export { default as toIterator } from './toIterator.js';
export { default as toJSON } from './toJSON.js';
export { default as value } from './wrapperValue.js';
export { default as valueOf } from './valueOf.js';
export { default as wrapperChain } from './wrapperChain.js';
export { default } from './seq.default.js';
@@ -0,0 +1,143 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = readWindowsAllCodes;
/* eslint-disable */
/**
* @file 读取windows支持的字符集
* @author mengke01(kekee000@gmail.com)
*
* @see
* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6cmap.html
*/
/**
* 读取ttf中windows字符表的字符
*
* @param {Array} tables cmap表结构
* @param {Object} ttf ttf对象
* @return {Object} 字符字典索引,unicode => glyf index
*/
function readWindowsAllCodes(tables, ttf) {
var codes = {};
// 读取windows unicode 编码段
var format0 = tables.find(function (item) {
return item.format === 0;
});
// 读取windows unicode 编码段
var format12 = tables.find(function (item) {
return item.platformID === 3 && item.encodingID === 10 && item.format === 12;
});
var format4 = tables.find(function (item) {
return item.platformID === 3 && item.encodingID === 1 && item.format === 4;
});
var format2 = tables.find(function (item) {
return item.platformID === 3 && item.encodingID === 3 && item.format === 2;
});
var format14 = tables.find(function (item) {
return item.platformID === 0 && item.encodingID === 5 && item.format === 14;
});
if (format0) {
for (var i = 0, l = format0.glyphIdArray.length; i < l; i++) {
if (format0.glyphIdArray[i]) {
codes[i] = format0.glyphIdArray[i];
}
}
}
// format 14 support
if (format14) {
for (var _i = 0, _l = format14.groups.length; _i < _l; _i++) {
var _format14$groups$_i = format14.groups[_i],
unicode = _format14$groups$_i.unicode,
glyphId = _format14$groups$_i.glyphId;
if (unicode) {
codes[unicode] = glyphId;
}
}
}
// 读取format12表
if (format12) {
for (var _i2 = 0, _l2 = format12.nGroups; _i2 < _l2; _i2++) {
var group = format12.groups[_i2];
var startId = group.startId;
var start = group.start;
var end = group.end;
for (; start <= end;) {
codes[start++] = startId++;
}
}
}
// 读取format4表
else if (format4) {
var segCount = format4.segCountX2 / 2;
// graphIdArray 和idRangeOffset的偏移量
var graphIdArrayIndexOffset = (format4.glyphIdArrayOffset - format4.idRangeOffsetOffset) / 2;
for (var _i3 = 0; _i3 < segCount; ++_i3) {
// 读取单个字符
for (var _start = format4.startCode[_i3], _end = format4.endCode[_i3]; _start <= _end; ++_start) {
// range offset = 0
if (format4.idRangeOffset[_i3] === 0) {
codes[_start] = (_start + format4.idDelta[_i3]) % 0x10000;
}
// rely on to glyphIndexArray
else {
var index = _i3 + format4.idRangeOffset[_i3] / 2 + (_start - format4.startCode[_i3]) - graphIdArrayIndexOffset;
var graphId = format4.glyphIdArray[index];
if (graphId !== 0) {
codes[_start] = (graphId + format4.idDelta[_i3]) % 0x10000;
} else {
codes[_start] = 0;
}
}
}
}
delete codes[65535];
}
// 读取format2表
// see https://github.com/fontforge/fontforge/blob/master/fontforge/parsettf.c
else if (format2) {
var subHeadKeys = format2.subHeadKeys;
var subHeads = format2.subHeads;
var glyphs = format2.glyphs;
var numGlyphs = ttf.maxp.numGlyphs;
var _index = 0;
for (var _i4 = 0; _i4 < 256; _i4++) {
// 单字节编码
if (subHeadKeys[_i4] === 0) {
if (_i4 >= format2.maxPos) {
_index = 0;
} else if (_i4 < subHeads[0].firstCode || _i4 >= subHeads[0].firstCode + subHeads[0].entryCount || subHeads[0].idRangeOffset + (_i4 - subHeads[0].firstCode) >= glyphs.length) {
_index = 0;
} else if ((_index = glyphs[subHeads[0].idRangeOffset + (_i4 - subHeads[0].firstCode)]) !== 0) {
_index = _index + subHeads[0].idDelta;
}
// 单字节解码
if (_index !== 0 && _index < numGlyphs) {
codes[_i4] = _index;
}
} else {
var k = subHeadKeys[_i4];
for (var j = 0, entryCount = subHeads[k].entryCount; j < entryCount; j++) {
if (subHeads[k].idRangeOffset + j >= glyphs.length) {
_index = 0;
} else if ((_index = glyphs[subHeads[k].idRangeOffset + j]) !== 0) {
_index = _index + subHeads[k].idDelta;
}
if (_index !== 0 && _index < numGlyphs) {
var _unicode = (_i4 << 8 | j + subHeads[k].firstCode) % 0xffff;
codes[_unicode] = _index;
}
}
}
}
}
return codes;
}
@@ -0,0 +1,99 @@
import { ListboxItemVariantProps, SlotsToClasses, ListboxItemSlots } from '@heroui/theme';
import { AriaOptionProps } from '@react-aria/listbox';
import { FocusableProps, PressEvents } from '@react-types/shared';
import { ItemProps } from '@heroui/aria-utils';
import { ReactNode } from 'react';
type ListboxItemSelectedIconProps = {
/**
* The current icon, usually an checkmark icon.
*/
icon?: ReactNode;
/**
* The current selected status.
*/
isSelected?: boolean;
/**
* The current disabled status.
* @default false
*/
isDisabled?: boolean;
};
interface Props<T extends object = {}> extends Omit<ItemProps<"li", T>, "children" | "title"> {
/**
* The content of the component.
*/
children?: ReactNode;
/**
* The listbox item title.
*/
title?: ReactNode;
/**
* The listbox item subtitle.
*/
description?: ReactNode;
/**
* The listbox item start content.
*/
startContent?: ReactNode;
/**
* The listbox item end content.
*/
endContent?: ReactNode;
/**
* Whether the listbox press events are disabled.
* @default false
*/
isReadOnly?: boolean;
/**
* Whether to hide the check icon when the items are selected.
* @default false
*/
hideSelectedIcon?: boolean;
/**
* The listbox item `selected` icon, it's usually an checkmark icon.
* If you pass a function, HeroUI will expose the current selected icon and the selected status,
* In case you want to use a custom indicator or modify the current one.
*
* Important: The selected icon will be rendered only if the listbox selection mode is different than `none`.
*/
selectedIcon?: ReactNode | ((props: ListboxItemSelectedIconProps) => ReactNode) | null;
/**
* Whether the item should be highlighted on focus.
* @default false
*/
shouldHighlightOnFocus?: boolean;
/**
* Whether to disable the items animation.
* @default false
*/
disableAnimation?: boolean;
/**
* Classname or List of classes to change the classNames of the element.
* if `className` is passed, it will be added to the base slot.
*
* @example
* ```ts
* <ListboxItem classNames={{
* base:"base-classes",
* title:"label-classes",
* wrapper:"wrapper-classes", // title and description wrapper
* description:"description-classes",
* selectedIcon:"selected-icon-classes",
* shortcut:"shortcut-classes",
* }} />
* ```
*/
classNames?: SlotsToClasses<ListboxItemSlots>;
}
type ListboxItemBaseProps<T extends object = {}> = Omit<Props<T>, "onClick"> & Omit<ListboxItemVariantProps, "hasDescriptionTextChild" | "hasTitleTextChild"> & Omit<AriaOptionProps, "key"> & FocusableProps & PressEvents & {
/**
* The native click event handler.
* use `onPress` instead.
* @deprecated
*/
onClick?: (e: React.MouseEvent<HTMLLIElement | HTMLAnchorElement>) => void;
};
declare const ListboxItemBase: <T extends object>(props: ListboxItemBaseProps<T>) => JSX.Element;
export { ListboxItemBaseProps, ListboxItemSelectedIconProps, ListboxItemBase as default };
@@ -0,0 +1,6 @@
import {
CloseFilledIcon
} from "./chunk-M3MASYO7.mjs";
export {
CloseFilledIcon
};
@@ -0,0 +1,34 @@
import { GetPacketStatusDepends } from '../../action/packet/GetPacketStatus';
import { Static } from '@sinclair/typebox';
declare const PayloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
file_id: import("@sinclair/typebox").TString;
}>;
type PayloadType = Static<typeof PayloadSchema>;
declare const ReturnSchema: import("@sinclair/typebox").TObject<{
ok: import("@sinclair/typebox").TBoolean;
}>;
type ReturnType = Static<typeof ReturnSchema>;
export declare class TransGroupFile extends GetPacketStatusDepends<PayloadType, ReturnType> {
actionName: "trans_group_file";
actionSummary: string;
actionTags: string[];
payloadExample: {
group_id: string;
file_id: string;
};
returnExample: {
ok: boolean;
};
payloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
file_id: import("@sinclair/typebox").TString;
}>;
returnSchema: import("@sinclair/typebox").TObject<{
ok: import("@sinclair/typebox").TBoolean;
}>;
_handle(payload: PayloadType): Promise<{
ok: boolean;
}>;
}
export {};
@@ -0,0 +1,22 @@
Copyright (c) 2011-2016 Heather Arthur <fayearthur@gmail.com>.
Copyright (c) 2016-2021 Josh Junon <josh@junon.me>.
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,6 @@
import {
useCode
} from "./chunk-RYFHIXXN.mjs";
export {
useCode
};
@@ -0,0 +1 @@
{"version":3,"file":"regular-expressions.js","sourceRoot":"","sources":["../../src/v6/regular-expressions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,gDAEC;AAED,4BAMC;AAID,0DA+BC;AAED,4CA4CC;AA7FD,gDAAkC;AAElC,SAAgB,kBAAkB,CAAC,aAAuB;IACxD,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AACxC,CAAC;AAED,SAAgB,QAAQ,CAAC,KAAa;IACpC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,OAAO,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,EAAE,CAAC;IAC5C,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAEY,QAAA,gBAAgB,GAAG,eAAe,CAAC;AAEhD,SAAgB,uBAAuB,CAAC,MAAgB;IACtD,MAAM,WAAW,GAAa,EAAE,CAAC;IAEjC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;QAC1B,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEzC,IAAI,YAAY,KAAK,CAAC,EAAE,CAAC;YACvB,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,6EAA6E;IAC7E,4BAA4B;IAC5B,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAClD,MAAM;SACH,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;QAChB,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;YACpB,MAAM,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YAE1D,OAAO,kBAAkB,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;QACxD,CAAC;QAED,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,CACb,CAAC;IAEF,oBAAoB;IACpB,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAEnD,OAAO,kBAAkB,CAAC,aAAa,CAAC,CAAC;AAC3C,CAAC;AAED,SAAgB,gBAAgB,CAC9B,YAAoB,EACpB,QAAkB,EAClB,SAAmB;IAEnB,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IACjC,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IAEnC,MAAM,aAAa,GAAG,EAAE,CAAC;IAEzB,gCAAgC;IAChC,IAAI,CAAC,QAAQ,IAAI,CAAC,SAAS,EAAE,CAAC;QAC5B,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED,oCAAoC;IACpC,IAAI,QAAQ,IAAI,SAAS,EAAE,CAAC;QAC1B,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC;IAED,IAAI,CAAC,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,SAAS,IAAI,QAAQ,CAAC,EAAE,CAAC;QACzD,kCAAkC;QAClC,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IAED,gCAAgC;IAChC,aAAa,CAAC,IAAI,CAAC,GAAG,IAAI,eAAe,YAAY,GAAG,CAAC,GAAG,CAAC,CAAC;IAE9D,iCAAiC;IACjC,aAAa,CAAC,IAAI,CAAC,eAAe,YAAY,GAAG,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAE/D,gBAAgB;IAChB,aAAa,CAAC,IAAI,CAAC,aAAa,YAAY,GAAG,CAAC,SAAS,CAAC,CAAC;IAE3D,wDAAwD;IACxD,KAAK,IAAI,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;QACzD,KAAK,IAAI,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC;YACpE,aAAa,CAAC,IAAI,CAChB,aAAa,QAAQ,eAAe,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,CAAC,SAAS,CAClF,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,kBAAkB,CAAC,aAAa,CAAC,CAAC;AAC3C,CAAC"}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAmGM,SAAS,yCACd,KAA8B,EAC9B,GAA0B;IAE1B,IAAI,oBACF,mBAAmB,qBACnB,aAAa,mBACb,aAAa,mBACb,aAAa,aACb,OAAO,4BACP,qBAAqB,QACtB,GAAG;IACJ,IAAI,CAAC,OAAO,SAAS,GAAG,CAAA,GAAA,yBAAiB,EAAU,MAAM,KAAK,EAAE,MAAM,YAAY,IAAI,IAAI,MAAM,QAAQ;IACxG,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW,EAA+B,OAAO;IACxE,IAAI,kBAAkB,CAAA,GAAA,6BAAqB,EAAE;QAC3C,GAAG,KAAK;eACR;IACF;IACA,IAAI,aAAC,SAAS,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAC,GAAG,gBAAgB,iBAAiB;IACxF,IAAI,cAAC,UAAU,cAAE,UAAU,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;QAC3E,GAAG,KAAK;mBACR;QACA,cAAc,MAAM,YAAY,IAAI;IACtC;IACA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IAErD,MAAM,iBAAiB;cACrB;QACA,SAAS,MAAM,OAAO;IACxB;IAEA,CAAA,GAAA,mBAAW,EAAE,KAAK,OAAO;IACzB,CAAA,GAAA,wBAAgB,EAAE,OAAO,iBAAiB;IAE1C,CAAA,GAAA,gBAAQ,EAAE;QACR,wGAAwG;QACxG,gGAAgG;QAChG,4FAA4F;QAC5F,2FAA2F;QAC3F,wBAAwB;QACxB,iDAAiD;QACjD,iDAAiD;QACjD,IAAI,IAAI,OAAO,YAAY,CAAA,GAAA,qBAAa,EAAE,IAAI,OAAO,EAAE,mBAAmB,EAAE;YAC1E,IAAI,QAAQ,IAAI,OAAO;YACvB,OAAO,cAAc,CAAC,OAAO,gBAAgB;gBAC3C,KAAK,IAAM,MAAM,KAAK;gBACtB,KAAK,KAAO;gBACZ,cAAc;YAChB;QACF;IACF,GAAG;QAAC;KAAI;IAER,OAAO;oBACL;QACA,YAAY,CAAA,GAAA,iBAAS,EACnB,UACA,qBAAqB,UAAU,iBAAiB,WAChD;YACE,UAAU;YACV,UAAU;YACV,UAAU,cAAc,uBAAuB;YAC/C,iBAAiB,AAAC,cAAc,uBAAuB,UAAW;YAClE,gBAAgB,aAAa;YAC7B,qBAAqB,KAAK,CAAC,oBAAoB;YAC/C,yBAAyB,KAAK,CAAC,wBAAwB;YACvD,qBAAqB,KAAK,CAAC,oBAAoB;YAC/C,iBAAiB,KAAK,CAAC,gBAAgB;mBACvC;YACA,UAAU,CAAC,IAAqC,SAAS,EAAE,MAAM,CAAC,KAAK;YACvE,cAAc,MAAM,YAAY;YAChC,gBAAgB,MAAM,cAAc;YACpC,WAAW,MAAM,SAAS;YAC1B,WAAW,MAAM,SAAS;YAC1B,MAAM,MAAM,IAAI;YAChB,aAAa,MAAM,WAAW;YAC9B,WAAW,MAAM,SAAS;YAE1B,mBAAmB;YACnB,QAAQ,MAAM,MAAM;YACpB,OAAO,MAAM,KAAK;YAClB,SAAS,MAAM,OAAO;YAEtB,qBAAqB;YACrB,kBAAkB,MAAM,gBAAgB;YACxC,oBAAoB,MAAM,kBAAkB;YAC5C,qBAAqB,MAAM,mBAAmB;YAE9C,mBAAmB;YACnB,UAAU,MAAM,QAAQ;YAExB,eAAe;YACf,eAAe,MAAM,aAAa;YAClC,SAAS,MAAM,OAAO;YACtB,GAAG,cAAc;YACjB,GAAG,UAAU;QACf;0BAEF;2BACA;mBACA;0BACA;2BACA;IACF;AACF","sources":["packages/@react-aria/textfield/src/useTextField.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 {AriaTextFieldProps} from '@react-types/textfield';\nimport {\n ChangeEvent,\n HTMLAttributes,\n type JSX,\n LabelHTMLAttributes,\n RefObject,\n useEffect\n} from 'react';\nimport {DOMAttributes, ValidationResult} from '@react-types/shared';\nimport {filterDOMProps, getOwnerWindow, mergeProps, useFormReset} from '@react-aria/utils';\nimport {useControlledState} from '@react-stately/utils';\nimport {useField} from '@react-aria/label';\nimport {useFocusable} from '@react-aria/focus';\nimport {useFormValidation} from '@react-aria/form';\nimport {useFormValidationState} from '@react-stately/form';\n\n/**\n * A map of HTML element names and their interface types.\n * For example `'a'` -> `HTMLAnchorElement`.\n */\ntype IntrinsicHTMLElements = {\n [K in keyof IntrinsicHTMLAttributes]: IntrinsicHTMLAttributes[K] extends HTMLAttributes<infer T> ? T : never\n};\n\n/**\n * A map of HTML element names and their attribute interface types.\n * For example `'a'` -> `AnchorHTMLAttributes<HTMLAnchorElement>`.\n */\ntype IntrinsicHTMLAttributes = JSX.IntrinsicElements;\n\ntype DefaultElementType = 'input';\n\n/**\n * The intrinsic HTML element names that `useTextField` supports; e.g. `input`,\n * `textarea`.\n */\ntype TextFieldIntrinsicElements = keyof Pick<IntrinsicHTMLElements, 'input' | 'textarea'>;\n\n/**\n * The HTML element interfaces that `useTextField` supports based on what is\n * defined for `TextFieldIntrinsicElements`; e.g. `HTMLInputElement`,\n * `HTMLTextAreaElement`.\n */\ntype TextFieldHTMLElementType = Pick<IntrinsicHTMLElements, TextFieldIntrinsicElements>;\n\n/**\n * The HTML attributes interfaces that `useTextField` supports based on what\n * is defined for `TextFieldIntrinsicElements`; e.g. `InputHTMLAttributes`,\n * `TextareaHTMLAttributes`.\n */\ntype TextFieldHTMLAttributesType = Pick<IntrinsicHTMLAttributes, TextFieldIntrinsicElements>;\n\n/**\n * The type of `inputProps` returned by `useTextField`; e.g. `InputHTMLAttributes`,\n * `TextareaHTMLAttributes`.\n */\ntype TextFieldInputProps<T extends TextFieldIntrinsicElements> = TextFieldHTMLAttributesType[T];\n\nexport interface AriaTextFieldOptions<T extends TextFieldIntrinsicElements> extends AriaTextFieldProps<TextFieldHTMLElementType[T]> {\n /**\n * The HTML element used to render the input, e.g. 'input', or 'textLine truncated
@@ -0,0 +1 @@
{"name":"mkdirp","version":"1.0.4","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532120968,"integrity":"sha512-RbYaRJPpxWLz06i4LYayqgxkc9vOjO7wgBAJZbaClDTm81N4PpAWC0ifxTWbo59z7xUlinYx9OI8WjLDlZTvdg==","mode":420,"size":1166},"bin/cmd.js":{"checkedAt":1794532120968,"integrity":"sha512-s/llhpE3nyViWqbormxGBxTfHdNh7UDGW8e82iEaPGtI3RvTGC6cm/Av4sKSQ+wJx+qpt0nirdNljnqi11xeQA==","mode":493,"size":1830},"lib/find-made.js":{"checkedAt":1794532120968,"integrity":"sha512-jVnW+Epce52zeWpozyHnP917rMTLvz7pdfppCjpXEcbX3n7eLwTiv6mxFtjmMbPYR51W+0qi7NkyG4t2MVZPSg==","mode":420,"size":763},"index.js":{"checkedAt":1794532120969,"integrity":"sha512-x9WSdWTWJooVbWBmd5wfSEJYmDeOj8UQmwVXoGajM8TyrVSwk8rruc7uSkJGnIB//+ag5gmyfh3PXppJNHOW1w==","mode":420,"size":1029},"lib/mkdirp-manual.js":{"checkedAt":1794532120969,"integrity":"sha512-Arl2e+BHsxuJZkbT6/eMgU3eX0+qbhjrGbZmQ3/WK29/izKLeiZXw97bDQAjv3ylwpTvD4ScEG9rs8BRPjoDDw==","mode":420,"size":1610},"lib/mkdirp-native.js":{"checkedAt":1794532120969,"integrity":"sha512-UqNgM9g+nibYRVYK+qBlNqg6AfIdj/o54Gp2kIxsjJmxmv+rRtxEdP176ezf0bDnBCZYHjZHvDWpdkyrSZ3Npw==","mode":420,"size":969},"lib/opts-arg.js":{"checkedAt":1794532120969,"integrity":"sha512-MHim/1mXsyGwADP+qTZ26gJfpwDRNvgWn4RXYEjkhEhQR4KcU5VQFkh5JMfIS+QorigYRVLzMbBuXoW6Z8R+AA==","mode":420,"size":784},"lib/path-arg.js":{"checkedAt":1794532120969,"integrity":"sha512-SmwOMASp64H5zd5g6M732x4LHfJz63VUjDw27SF2BhOJIRlLkRF9egMKDxBVJi5W1DaJgE1moEoj3bNlXr/xjg==","mode":420,"size":730},"lib/use-native.js":{"checkedAt":1794532120969,"integrity":"sha512-S2WhXREwlTld1uQTnnr3M05jyk8Tm3Arzmw88wqwJ9cbXzjMsn1qEGzyf6eKMP+UsbsXCOb+W2pBC83wcAY0Ng==","mode":420,"size":448},"package.json":{"checkedAt":1794532120969,"integrity":"sha512-tNCC9FCMYZrCFrwaM6VZahQA3dPdOvK7XA9NgfHvp5cZx1jcMzQnvmq0keDa2VEqLGIECByxhjQw5rh5kVRvaw==","mode":420,"size":804},"readme.markdown":{"checkedAt":1794532120970,"integrity":"sha512-rJ1KhROrXlPL1XeclD83f1SzvJG0vkgG2FusAGA7GRrHKEwsg3vW0g5TkKTPY1zChHh7EJpqX/ok3KOQIKdZcw==","mode":420,"size":8507},"CHANGELOG.md":{"checkedAt":1794532120970,"integrity":"sha512-Do/UADGYX2zhcFk2vnm9MSveGXMZJMf04AdhSiu3e+KT1j1azRN1DYMR+0mth0wWTd6P+W7ij3JpNAaZ+k6oxA==","mode":420,"size":448}}}
@@ -0,0 +1,663 @@
/* global window */
/* eslint-disable eqeqeq, prefer-const, @typescript-eslint/no-empty-function */
/*! Copyright (c) Meta Platforms, Inc. and affiliates. **/
/**
* This is simplified pure-js version of https://github.com/facebook/react/blob/main/packages/react-refresh/src/ReactFreshRuntime.js
* without IE11 compatibility and verbose isDev checks.
* Some utils are appended at the bottom for HMR integration.
*/
const REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref')
const REACT_MEMO_TYPE = Symbol.for('react.memo')
// We never remove these associations.
// It's OK to reference families, but use WeakMap/Set for types.
let allFamiliesByID = new Map()
let allFamiliesByType = new WeakMap()
let allSignaturesByType = new WeakMap()
// This WeakMap is read by React, so we only put families
// that have actually been edited here. This keeps checks fast.
const updatedFamiliesByType = new WeakMap()
// This is cleared on every performReactRefresh() call.
// It is an array of [Family, NextType] tuples.
let pendingUpdates = []
// This is injected by the renderer via DevTools global hook.
const helpersByRendererID = new Map()
const helpersByRoot = new Map()
// We keep track of mounted roots so we can schedule updates.
const mountedRoots = new Set()
// If a root captures an error, we remember it so we can retry on edit.
const failedRoots = new Set()
// We also remember the last element for every root.
// It needs to be weak because we do this even for roots that failed to mount.
// If there is no WeakMap, we won't attempt to do retrying.
let rootElements = new WeakMap()
let isPerformingRefresh = false
function computeFullKey(signature) {
if (signature.fullKey !== null) {
return signature.fullKey
}
let fullKey = signature.ownKey
let hooks
try {
hooks = signature.getCustomHooks()
} catch (err) {
// This can happen in an edge case, e.g. if expression like Foo.useSomething
// depends on Foo which is lazily initialized during rendering.
// In that case just assume we'll have to remount.
signature.forceReset = true
signature.fullKey = fullKey
return fullKey
}
for (let i = 0; i < hooks.length; i++) {
const hook = hooks[i]
if (typeof hook !== 'function') {
// Something's wrong. Assume we need to remount.
signature.forceReset = true
signature.fullKey = fullKey
return fullKey
}
const nestedHookSignature = allSignaturesByType.get(hook)
if (nestedHookSignature === undefined) {
// No signature means Hook wasn't in the source code, e.g. in a library.
// We'll skip it because we can assume it won't change during this session.
continue
}
const nestedHookKey = computeFullKey(nestedHookSignature)
if (nestedHookSignature.forceReset) {
signature.forceReset = true
}
fullKey += '\n---\n' + nestedHookKey
}
signature.fullKey = fullKey
return fullKey
}
function haveEqualSignatures(prevType, nextType) {
const prevSignature = allSignaturesByType.get(prevType)
const nextSignature = allSignaturesByType.get(nextType)
if (prevSignature === undefined && nextSignature === undefined) {
return true
}
if (prevSignature === undefined || nextSignature === undefined) {
return false
}
if (computeFullKey(prevSignature) !== computeFullKey(nextSignature)) {
return false
}
if (nextSignature.forceReset) {
return false
}
return true
}
function isReactClass(type) {
return type.prototype && type.prototype.isReactComponent
}
function canPreserveStateBetween(prevType, nextType) {
if (isReactClass(prevType) || isReactClass(nextType)) {
return false
}
if (haveEqualSignatures(prevType, nextType)) {
return true
}
return false
}
function resolveFamily(type) {
// Only check updated types to keep lookups fast.
return updatedFamiliesByType.get(type)
}
// This is a safety mechanism to protect against rogue getters and Proxies.
function getProperty(object, property) {
try {
return object[property]
} catch (err) {
// Intentionally ignore.
return undefined
}
}
function performReactRefresh() {
if (pendingUpdates.length === 0) {
return null
}
if (isPerformingRefresh) {
return null
}
isPerformingRefresh = true
try {
const staleFamilies = new Set()
const updatedFamilies = new Set()
const updates = pendingUpdates
pendingUpdates = []
updates.forEach(([family, nextType]) => {
// Now that we got a real edit, we can create associations
// that will be read by the React reconciler.
const prevType = family.current
updatedFamiliesByType.set(prevType, family)
updatedFamiliesByType.set(nextType, family)
family.current = nextType
// Determine whether this should be a re-render or a re-mount.
if (canPreserveStateBetween(prevType, nextType)) {
updatedFamilies.add(family)
} else {
staleFamilies.add(family)
}
})
// TODO: rename these fields to something more meaningful.
const update = {
updatedFamilies, // Families that will re-render preserving state
staleFamilies, // Families that will be remounted
}
helpersByRendererID.forEach((helpers) => {
// Even if there are no roots, set the handler on first update.
// This ensures that if *new* roots are mounted, they'll use the resolve handler.
helpers.setRefreshHandler(resolveFamily)
})
let didError = false
let firstError = null
// We snapshot maps and sets that are mutated during commits.
// If we don't do this, there is a risk they will be mutated while
// we iterate over them. For example, trying to recover a failed root
// may cause another root to be added to the failed list -- an infinite loop.
const failedRootsSnapshot = new Set(failedRoots)
const mountedRootsSnapshot = new Set(mountedRoots)
const helpersByRootSnapshot = new Map(helpersByRoot)
failedRootsSnapshot.forEach((root) => {
const helpers = helpersByRootSnapshot.get(root)
if (helpers === undefined) {
throw new Error(
'Could not find helpers for a root. This is a bug in React Refresh.',
)
}
if (!failedRoots.has(root)) {
// No longer failed.
}
if (rootElements === null) {
return
}
if (!rootElements.has(root)) {
return
}
const element = rootElements.get(root)
try {
helpers.scheduleRoot(root, element)
} catch (err) {
if (!didError) {
didError = true
firstError = err
}
// Keep trying other roots.
}
})
mountedRootsSnapshot.forEach((root) => {
const helpers = helpersByRootSnapshot.get(root)
if (helpers === undefined) {
throw new Error(
'Could not find helpers for a root. This is a bug in React Refresh.',
)
}
if (!mountedRoots.has(root)) {
// No longer mounted.
}
try {
helpers.scheduleRefresh(root, update)
} catch (err) {
if (!didError) {
didError = true
firstError = err
}
// Keep trying other roots.
}
})
if (didError) {
throw firstError
}
return update
} finally {
isPerformingRefresh = false
}
}
export function register(type, id) {
if (type === null) {
return
}
if (typeof type !== 'function' && typeof type !== 'object') {
return
}
// This can happen in an edge case, e.g. if we register
// return value of a HOC but it returns a cached component.
// Ignore anything but the first registration for each type.
if (allFamiliesByType.has(type)) {
return
}
// Create family or remember to update it.
// None of this bookkeeping affects reconciliation
// until the first performReactRefresh() call above.
let family = allFamiliesByID.get(id)
if (family === undefined) {
family = { current: type }
allFamiliesByID.set(id, family)
} else {
pendingUpdates.push([family, type])
}
allFamiliesByType.set(type, family)
// Visit inner types because we might not have registered them.
if (typeof type === 'object' && type !== null) {
switch (getProperty(type, '$$typeof')) {
case REACT_FORWARD_REF_TYPE:
register(type.render, id + '$render')
break
case REACT_MEMO_TYPE:
register(type.type, id + '$type')
break
}
}
}
function setSignature(type, key, forceReset, getCustomHooks) {
if (!allSignaturesByType.has(type)) {
allSignaturesByType.set(type, {
forceReset,
ownKey: key,
fullKey: null,
getCustomHooks: getCustomHooks || (() => []),
})
}
// Visit inner types because we might not have signed them.
if (typeof type === 'object' && type !== null) {
switch (getProperty(type, '$$typeof')) {
case REACT_FORWARD_REF_TYPE:
setSignature(type.render, key, forceReset, getCustomHooks)
break
case REACT_MEMO_TYPE:
setSignature(type.type, key, forceReset, getCustomHooks)
break
}
}
}
// This is lazily called during first render for a type.
// It captures Hook list at that time so inline requires don't break comparisons.
function collectCustomHooksForSignature(type) {
const signature = allSignaturesByType.get(type)
if (signature !== undefined) {
computeFullKey(signature)
}
}
export function injectIntoGlobalHook(globalObject) {
// For React Native, the global hook will be set up by require('react-devtools-core').
// That code will run before us. So we need to monkeypatch functions on existing hook.
// For React Web, the global hook will be set up by the extension.
// This will also run before us.
let hook = globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__
if (hook === undefined) {
// However, if there is no DevTools extension, we'll need to set up the global hook ourselves.
// Note that in this case it's important that renderer code runs *after* this method call.
// Otherwise, the renderer will think that there is no global hook, and won't do the injection.
let nextID = 0
globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__ = hook = {
renderers: new Map(),
supportsFiber: true,
inject: (injected) => nextID++,
onScheduleFiberRoot: (id, root, children) => {},
onCommitFiberRoot: (id, root, maybePriorityLevel, didError) => {},
onCommitFiberUnmount() {},
}
}
if (hook.isDisabled) {
// This isn't a real property on the hook, but it can be set to opt out
// of DevTools integration and associated warnings and logs.
// Using console['warn'] to evade Babel and ESLint
console['warn'](
'Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). ' +
'Fast Refresh is not compatible with this shim and will be disabled.',
)
return
}
// Here, we just want to get a reference to scheduleRefresh.
const oldInject = hook.inject
hook.inject = function (injected) {
const id = oldInject.apply(this, arguments)
if (
typeof injected.scheduleRefresh === 'function' &&
typeof injected.setRefreshHandler === 'function'
) {
// This version supports React Refresh.
helpersByRendererID.set(id, injected)
}
return id
}
// Do the same for any already injected roots.
// This is useful if ReactDOM has already been initialized.
// https://github.com/facebook/react/issues/17626
hook.renderers.forEach((injected, id) => {
if (
typeof injected.scheduleRefresh === 'function' &&
typeof injected.setRefreshHandler === 'function'
) {
// This version supports React Refresh.
helpersByRendererID.set(id, injected)
}
})
// We also want to track currently mounted roots.
const oldOnCommitFiberRoot = hook.onCommitFiberRoot
const oldOnScheduleFiberRoot = hook.onScheduleFiberRoot || (() => {})
hook.onScheduleFiberRoot = function (id, root, children) {
if (!isPerformingRefresh) {
// If it was intentionally scheduled, don't attempt to restore.
// This includes intentionally scheduled unmounts.
failedRoots.delete(root)
if (rootElements !== null) {
rootElements.set(root, children)
}
}
return oldOnScheduleFiberRoot.apply(this, arguments)
}
hook.onCommitFiberRoot = function (id, root, maybePriorityLevel, didError) {
const helpers = helpersByRendererID.get(id)
if (helpers !== undefined) {
helpersByRoot.set(root, helpers)
const current = root.current
const alternate = current.alternate
// We need to determine whether this root has just (un)mounted.
// This logic is copy-pasted from similar logic in the DevTools backend.
// If this breaks with some refactoring, you'll want to update DevTools too.
if (alternate !== null) {
const wasMounted =
alternate.memoizedState != null &&
alternate.memoizedState.element != null &&
mountedRoots.has(root)
const isMounted =
current.memoizedState != null && current.memoizedState.element != null
if (!wasMounted && isMounted) {
// Mount a new root.
mountedRoots.add(root)
failedRoots.delete(root)
} else if (wasMounted && isMounted) {
// Update an existing root.
// This doesn't affect our mounted root Set.
} else if (wasMounted && !isMounted) {
// Unmount an existing root.
mountedRoots.delete(root)
if (didError) {
// We'll remount it on future edits.
failedRoots.add(root)
} else {
helpersByRoot.delete(root)
}
} else if (!wasMounted && !isMounted) {
if (didError) {
// We'll remount it on future edits.
failedRoots.add(root)
}
}
} else {
// Mount a new root.
mountedRoots.add(root)
}
}
// Always call the decorated DevTools hook.
return oldOnCommitFiberRoot.apply(this, arguments)
}
}
// This is a wrapper over more primitive functions for setting signature.
// Signatures let us decide whether the Hook order has changed on refresh.
//
// This function is intended to be used as a transform target, e.g.:
// var _s = createSignatureFunctionForTransform()
//
// function Hello() {
// const [foo, setFoo] = useState(0);
// const value = useCustomHook();
// _s(); /* Call without arguments triggers collecting the custom Hook list.
// * This doesn't happen during the module evaluation because we
// * don't want to change the module order with inline requires.
// * Next calls are noops. */
// return <h1>Hi</h1>;
// }
//
// /* Call with arguments attaches the signature to the type: */
// _s(
// Hello,
// 'useState{[foo, setFoo]}(0)',
// () => [useCustomHook], /* Lazy to avoid triggering inline requires */
// );
export function createSignatureFunctionForTransform() {
let savedType
let hasCustomHooks
let didCollectHooks = false
return function (type, key, forceReset, getCustomHooks) {
if (typeof key === 'string') {
// We're in the initial phase that associates signatures
// with the functions. Note this may be called multiple times
// in HOC chains like _s(hoc1(_s(hoc2(_s(actualFunction))))).
if (!savedType) {
// We're in the innermost call, so this is the actual type.
// $FlowFixMe[escaped-generic] discovered when updating Flow
savedType = type
hasCustomHooks = typeof getCustomHooks === 'function'
}
// Set the signature for all types (even wrappers!) in case
// they have no signatures of their own. This is to prevent
// problems like https://github.com/facebook/react/issues/20417.
if (
type != null &&
(typeof type === 'function' || typeof type === 'object')
) {
setSignature(type, key, forceReset, getCustomHooks)
}
return type
} else {
// We're in the _s() call without arguments, which means
// this is the time to collect custom Hook signatures.
// Only do this once. This path is hot and runs *inside* every render!
if (!didCollectHooks && hasCustomHooks) {
didCollectHooks = true
collectCustomHooksForSignature(savedType)
}
}
}
}
function isLikelyComponentType(type) {
switch (typeof type) {
case 'function': {
// First, deal with classes.
if (type.prototype != null) {
if (type.prototype.isReactComponent) {
// React class.
return true
}
const ownNames = Object.getOwnPropertyNames(type.prototype)
if (ownNames.length > 1 || ownNames[0] !== 'constructor') {
// This looks like a class.
return false
}
if (type.prototype.__proto__ !== Object.prototype) {
// It has a superclass.
return false
}
// Pass through.
// This looks like a regular function with empty prototype.
}
// For plain functions and arrows, use name as a heuristic.
const name = type.name || type.displayName
return typeof name === 'string' && /^[A-Z]/.test(name)
}
case 'object': {
if (type != null) {
switch (getProperty(type, '$$typeof')) {
case REACT_FORWARD_REF_TYPE:
case REACT_MEMO_TYPE:
// Definitely React components.
return true
default:
return false
}
}
return false
}
default: {
return false
}
}
}
function isCompoundComponent(type) {
if (!isPlainObject(type)) return false
for (const key in type) {
if (!isLikelyComponentType(type[key])) return false
}
return true
}
function isPlainObject(obj) {
return (
Object.prototype.toString.call(obj) === '[object Object]' &&
(obj.constructor === Object || obj.constructor === undefined)
)
}
/**
* Plugin utils
*/
// Taken from https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/lib/runtime/RefreshUtils.js#L141
// This allows to resister components not detected by SWC like styled component
export function registerExportsForReactRefresh(filename, moduleExports) {
for (const key in moduleExports) {
if (key === '__esModule') continue
const exportValue = moduleExports[key]
if (isLikelyComponentType(exportValue)) {
// 'export' is required to avoid key collision when renamed exports that
// shadow a local component name: https://github.com/vitejs/vite-plugin-react/issues/116
// The register function has an identity check to not register twice the same component,
// so this is safe to not used the same key here.
register(exportValue, filename + ' export ' + key)
} else if (isCompoundComponent(exportValue)) {
for (const subKey in exportValue) {
register(
exportValue[subKey],
filename + ' export ' + key + '-' + subKey,
)
}
}
}
}
function debounce(fn, delay) {
let handle
return () => {
clearTimeout(handle)
handle = setTimeout(fn, delay)
}
}
const hooks = []
window.__registerBeforePerformReactRefresh = (cb) => {
hooks.push(cb)
}
const enqueueUpdate = debounce(async () => {
if (hooks.length) await Promise.all(hooks.map((cb) => cb()))
performReactRefresh()
}, 16)
export function validateRefreshBoundaryAndEnqueueUpdate(
id,
prevExports,
nextExports,
) {
const ignoredExports = window.__getReactRefreshIgnoredExports?.({ id }) ?? []
if (
predicateOnExport(
ignoredExports,
prevExports,
(key) => key in nextExports,
) !== true
) {
return 'Could not Fast Refresh (export removed)'
}
if (
predicateOnExport(
ignoredExports,
nextExports,
(key) => key in prevExports,
) !== true
) {
return 'Could not Fast Refresh (new export)'
}
let hasExports = false
const allExportsAreComponentsOrUnchanged = predicateOnExport(
ignoredExports,
nextExports,
(key, value) => {
hasExports = true
if (isLikelyComponentType(value)) return true
if (isCompoundComponent(value)) return true
return prevExports[key] === nextExports[key]
},
)
if (hasExports && allExportsAreComponentsOrUnchanged === true) {
enqueueUpdate()
} else {
return `Could not Fast Refresh ("${allExportsAreComponentsOrUnchanged}" export is incompatible). Learn more at __README_URL__#consistent-components-exports`
}
}
function predicateOnExport(ignoredExports, moduleExports, predicate) {
for (const key in moduleExports) {
if (ignoredExports.includes(key)) continue
if (!predicate(key, moduleExports[key])) return key
}
return true
}
// Hides vite-ignored dynamic import so that Vite can skip analysis if no other
// dynamic import is present (https://github.com/vitejs/vite/pull/12732)
export const __hmr_import = (module) => import(/* @vite-ignore */ module)
// For backwards compatibility with @vitejs/plugin-react.
export default { injectIntoGlobalHook }
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,aAAa,CAAC,sBAAgB,CAAC;IACjD,iBAAiB,CAAC,OAAS,CAAC,wBAAqB,EAAE,KAAK,UAAU,CAAC,0BAAoB,CAAC;IACxF,cAAc,CAAC,OAAS,GAAG,KAAK,KAAK,CAAC,QAAQ,CAAC;IAC/C,cAAc,CAAC,mBAAgB,CAAC;IAChC,kBAAkB,CAAC,OAAS,CAAC,wBAAqB,EAAE,KAAK,UAAU,CAAC,wBAAqB,CAAC;IAC1F,sBAAsB,CAAC,mDAAmD,CAAC;IAC3E,UAAU,CAAC,IAAI,CAAC;IAChB,aAAa,CAAC,YAAS,CAAC;IACxB,YAAY,CAAC,cAAc,CAAC;AAC9B","sources":["packages/@react-aria/table/intl/et-EE.json"],"sourcesContent":["{\n \"ascending\": \"tõusev järjestus\",\n \"ascendingSort\": \"sorditud veeru järgi {columnName} tõusvas järjestuses\",\n \"columnSize\": \"{value} pikslit\",\n \"descending\": \"laskuv järjestus\",\n \"descendingSort\": \"sorditud veeru järgi {columnName} laskuvas järjestuses\",\n \"resizerDescription\": \"Suuruse muutmise alustamiseks vajutage klahvi Enter\",\n \"select\": \"Vali\",\n \"selectAll\": \"Vali kõik\",\n \"sortable\": \"sorditav veerg\"\n}\n"],"names":[],"version":3,"file":"et-EE.module.js.map"}
@@ -0,0 +1,31 @@
import baseIteratee from './_baseIteratee.js';
import baseUniq from './_baseUniq.js';
/**
* This method is like `_.uniq` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the criterion by which
* uniqueness is computed. The order of result values is determined by the
* order they occur in the array. The iteratee is invoked with one argument:
* (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* _.uniqBy([2.1, 1.2, 2.3], Math.floor);
* // => [2.1, 1.2]
*
* // The `_.property` iteratee shorthand.
* _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 1 }, { 'x': 2 }]
*/
function uniqBy(array, iteratee) {
return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];
}
export default uniqBy;
@@ -0,0 +1,52 @@
"use strict";
var BOMChar = '\uFEFF';
exports.PrependBOM = PrependBOMWrapper
function PrependBOMWrapper(encoder, options) {
this.encoder = encoder;
this.addBOM = true;
}
PrependBOMWrapper.prototype.write = function(str) {
if (this.addBOM) {
str = BOMChar + str;
this.addBOM = false;
}
return this.encoder.write(str);
}
PrependBOMWrapper.prototype.end = function() {
return this.encoder.end();
}
//------------------------------------------------------------------------------
exports.StripBOM = StripBOMWrapper;
function StripBOMWrapper(decoder, options) {
this.decoder = decoder;
this.pass = false;
this.options = options || {};
}
StripBOMWrapper.prototype.write = function(buf) {
var res = this.decoder.write(buf);
if (this.pass || !res)
return res;
if (res[0] === BOMChar) {
res = res.slice(1);
if (typeof this.options.stripBOM === 'function')
this.options.stripBOM();
}
this.pass = true;
return res;
}
StripBOMWrapper.prototype.end = function() {
return this.decoder.end();
}
@@ -0,0 +1 @@
{"name":"@react-stately/grid","version":"3.11.6","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105972,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/GridCollection.main.js":{"checkedAt":1794532110608,"integrity":"sha512-ysfIejcl/15hKS8UfhEviktaf1WgTUWv5iTHZ9Mnzsu5WL2rc9F7Q6ap2dpqgoE2he7DXW7varmAjI+ayGx4CQ==","mode":420,"size":6606},"dist/GridCollection.module.js":{"checkedAt":1794532110608,"integrity":"sha512-PVokwJKO5Tw5kOby77umk4328yu+UH2V8dufE4qvMZhgMWuIvXbK9YdzXmRKNJomYiiEjLtBLpIbGsPLftfrfQ==","mode":420,"size":6450},"dist/main.js":{"checkedAt":1794532110608,"integrity":"sha512-8IfmLNkwIj2AP2uHpBp893UXjCO4Dy+JnSmOaDYLHjBX9oVcZUWxs2YShVy9x7HqL2OI5WPXNf51ZblctZruQA==","mode":420,"size":1115},"dist/module.js":{"checkedAt":1794532110608,"integrity":"sha512-tSWhpSDdVtv6zuWFz8H0Jnr7DzL2G4dDz+C/JYayymzwRAbfANSetmjGUD7TpCB7tya/tmnSD8nsgLSagZDUIQ==","mode":420,"size":991},"dist/useGridState.main.js":{"checkedAt":1794532110609,"integrity":"sha512-omZxUd0fhfxxgcZS1ZqCtKfqmm4+AYYutKakdo5esehERS3PdYjg0Gy00jgMTsArkmNtSXAiHvbhQy5qM9c5AQ==","mode":420,"size":4676},"dist/useGridState.module.js":{"checkedAt":1794532110609,"integrity":"sha512-F1lgPL/a+a4w/FOEwDQ3n2Qwexb6rnbZAMEodp6eIqmEOHQgNRumsPuzBbcS/ptLeQ3ln4DcY+woys639hIhyQ==","mode":420,"size":4579},"package.json":{"checkedAt":1794532110609,"integrity":"sha512-6HeKU7dGvZj7kDZ1nXyBaTU7m69DoKdOsNVN2DK+NuEdSVhXdRpntwSP/eHID/CU87zSSQSBkh6OS1baSgNCyQ==","mode":420,"size":1018},"dist/GridCollection.main.js.map":{"checkedAt":1794532110609,"integrity":"sha512-nBx1q90i6l7Ij8DAn7v6E/47jjQARbRh1oJ2G7cWT0ZNVrkHIvfssrB5DTo+TwtNE1Y+PDglzBI9H+FtNgZcBQ==","mode":420,"size":8703},"dist/GridCollection.module.js.map":{"checkedAt":1794532110609,"integrity":"sha512-tiMlG67GHhjr4kiBkUmG7gVkLoh8sXQJyGBFqD6NPElb8OBj9PXw/bWNzq8Vk4oqS/G+NElE1Bwcl/FczcSbBQ==","mode":420,"size":8699},"dist/main.js.map":{"checkedAt":1794532110609,"integrity":"sha512-HZoK4HKm8T5w3GlkV+VhjCBx3W2/9FXayQ9VAYNDUOJUoWMNLTNwZ6pU6BMJpl8nRhb5GWsuoFnCWuuJ5FVg+w==","mode":420,"size":966},"dist/module.js.map":{"checkedAt":1794532110610,"integrity":"sha512-EYllBPxpEldW0+BKg0sCIc2ZwU+5F8QnZITds69SJOPtl59UM5T9JID+BmNDaYTukF/64PA6m2kmBf063lH0bw==","mode":420,"size":961},"dist/types.d.ts.map":{"checkedAt":1794532110610,"integrity":"sha512-tHeN/FTg69fQ6keD6HNUcdlUynENHH7tZU0ad+Rx2o5cy4mLugcCV+kAVJphWB5zEhJ/0DDPSs+Ftdi2Ktin1Q==","mode":420,"size":2669},"dist/useGridState.main.js.map":{"checkedAt":1794532110610,"integrity":"sha512-q+S/luzltfN8LbkwhtoTZGyZ9L1d4BaZQfpfuq1bOT9UBfWv9MyqEUhSkS/lTkdD/rLda5l0yaiNXIwL9Wnzvw==","mode":420,"size":7064},"dist/useGridState.module.js.map":{"checkedAt":1794532110610,"integrity":"sha512-NY20bsEnfa4Nz6eGYR74LARgQTzcyoZY/y2CJNKm69XMgR96cTkoNdlCKI/VzADf5AJkGgKiY08ST537qzTYvQ==","mode":420,"size":7057},"README.md":{"checkedAt":1794532110610,"integrity":"sha512-5PLppQY92iHfB/e4GrzttfeeADAhK0kejYtE6R4SN8VduZmgvV5eNA5jgTXtMQ32dNAO3U9MfWtWobuAeVP5nw==","mode":420,"size":137},"dist/GridCollection.mjs":{"checkedAt":1794532110608,"integrity":"sha512-PVokwJKO5Tw5kOby77umk4328yu+UH2V8dufE4qvMZhgMWuIvXbK9YdzXmRKNJomYiiEjLtBLpIbGsPLftfrfQ==","mode":420,"size":6450},"dist/import.mjs":{"checkedAt":1794532110610,"integrity":"sha512-mQyuEVf66t+ODRQhVKdamkgntGmC1JF3iXXQblzmH050Hu/6/Y2ODiacUSgSB8g23Ajp/rPtloS22z9BVgXk4A==","mode":420,"size":979},"dist/useGridState.mjs":{"checkedAt":1794532110609,"integrity":"sha512-F1lgPL/a+a4w/FOEwDQ3n2Qwexb6rnbZAMEodp6eIqmEOHQgNRumsPuzBbcS/ptLeQ3ln4DcY+woys639hIhyQ==","mode":420,"size":4579},"src/GridCollection.ts":{"checkedAt":1794532110611,"integrity":"sha512-s51GLIWUmqyTRYo7H4VATUWw80lWc4m3yl+K4QsHacb4NTiG6tP00hlTP+ZMa7ZmAAWRU6RwiM2GN6Cs+7sB8w==","mode":420,"size":5020},"src/index.ts":{"checkedAt":1794532110611,"integrity":"sha512-dXmg0DI2CChaZoBLThxu/A0VWt3elTEFLbYBX8sTC9cIYoUQzjIedP+W305KvIqwDqwFjoa+b0K2EvfaqUJzBg==","mode":420,"size":781},"dist/types.d.ts":{"checkedAt":1794532110611,"integrity":"sha512-Nx+qWDwRE9vYqroV1A8QfIsh5B5PJRVCUN+j2xcLLCQt1K16QXzoCRqM5Jeln9j8PZdIDY1ffNXLc1B00FGviA==","mode":420,"size":2044},"src/useGridState.ts":{"checkedAt":1794532110611,"integrity":"sha512-tS8s0bPRwy+zuCUkcd+Mdd2xlVz8oquvJmIulQA+flrVE1xw3JG+h2om5tle/yfJ0GVmbvvzkeTiG+r+wQ7YLw==","mode":420,"size":4594}}}
@@ -0,0 +1,47 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TransformEncodeBuilder = exports.TransformDecodeBuilder = void 0;
exports.Transform = Transform;
const index_1 = require("../symbols/index");
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
const kind_1 = require("../guard/kind");
// ------------------------------------------------------------------
// TransformBuilders
// ------------------------------------------------------------------
class TransformDecodeBuilder {
constructor(schema) {
this.schema = schema;
}
Decode(decode) {
return new TransformEncodeBuilder(this.schema, decode);
}
}
exports.TransformDecodeBuilder = TransformDecodeBuilder;
// prettier-ignore
class TransformEncodeBuilder {
constructor(schema, decode) {
this.schema = schema;
this.decode = decode;
}
EncodeTransform(encode, schema) {
const Encode = (value) => schema[index_1.TransformKind].Encode(encode(value));
const Decode = (value) => this.decode(schema[index_1.TransformKind].Decode(value));
const Codec = { Encode: Encode, Decode: Decode };
return { ...schema, [index_1.TransformKind]: Codec };
}
EncodeSchema(encode, schema) {
const Codec = { Decode: this.decode, Encode: encode };
return { ...schema, [index_1.TransformKind]: Codec };
}
Encode(encode) {
return ((0, kind_1.IsTransform)(this.schema) ? this.EncodeTransform(encode, this.schema) : this.EncodeSchema(encode, this.schema));
}
}
exports.TransformEncodeBuilder = TransformEncodeBuilder;
/** `[Json]` Creates a Transform type */
function Transform(schema) {
return new TransformDecodeBuilder(schema);
}
@@ -0,0 +1,40 @@
import {getOwnerWindow as $431fbd86ca7dc216$export$f21a1ffae260145a} from "./domHelpers.mjs";
/*
* 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.
*/
const $7d2416ea0959daaa$var$supportsCheckVisibility = typeof Element !== 'undefined' && 'checkVisibility' in Element.prototype;
function $7d2416ea0959daaa$var$isStyleVisible(element) {
const windowObject = (0, $431fbd86ca7dc216$export$f21a1ffae260145a)(element);
if (!(element instanceof windowObject.HTMLElement) && !(element instanceof windowObject.SVGElement)) return false;
let { display: display, visibility: visibility } = element.style;
let isVisible = display !== 'none' && visibility !== 'hidden' && visibility !== 'collapse';
if (isVisible) {
const { getComputedStyle: getComputedStyle } = element.ownerDocument.defaultView;
let { display: computedDisplay, visibility: computedVisibility } = getComputedStyle(element);
isVisible = computedDisplay !== 'none' && computedVisibility !== 'hidden' && computedVisibility !== 'collapse';
}
return isVisible;
}
function $7d2416ea0959daaa$var$isAttributeVisible(element, childElement) {
return !element.hasAttribute('hidden') && // Ignore HiddenSelect when tree walking.
!element.hasAttribute('data-react-aria-prevent-focus') && (element.nodeName === 'DETAILS' && childElement && childElement.nodeName !== 'SUMMARY' ? element.hasAttribute('open') : true);
}
function $7d2416ea0959daaa$export$e989c0fffaa6b27a(element, childElement) {
if ($7d2416ea0959daaa$var$supportsCheckVisibility) return element.checkVisibility({
visibilityProperty: true
}) && !element.closest('[data-react-aria-prevent-focus]');
return element.nodeName !== '#comment' && $7d2416ea0959daaa$var$isStyleVisible(element) && $7d2416ea0959daaa$var$isAttributeVisible(element, childElement) && (!element.parentElement || $7d2416ea0959daaa$export$e989c0fffaa6b27a(element.parentElement, element));
}
export {$7d2416ea0959daaa$export$e989c0fffaa6b27a as isElementVisible};
//# sourceMappingURL=isElementVisible.module.js.map
@@ -0,0 +1,8 @@
function getViewAnimationLayerInfo(pseudoElement) {
const match = pseudoElement.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);
if (!match)
return null;
return { layer: match[2], type: match[1] };
}
export { getViewAnimationLayerInfo };
@@ -0,0 +1,330 @@
import type { Primitive } from "./helpers/typeAliases.js";
import { util, type ZodParsedType } from "./helpers/util.js";
import type { TypeOf, ZodType } from "./index.js";
type allKeys<T> = T extends any ? keyof T : never;
export type inferFlattenedErrors<T extends ZodType<any, any, any>, U = string> = typeToFlattenedError<TypeOf<T>, U>;
export type typeToFlattenedError<T, U = string> = {
formErrors: U[];
fieldErrors: {
[P in allKeys<T>]?: U[];
};
};
export const ZodIssueCode = util.arrayToEnum([
"invalid_type",
"invalid_literal",
"custom",
"invalid_union",
"invalid_union_discriminator",
"invalid_enum_value",
"unrecognized_keys",
"invalid_arguments",
"invalid_return_type",
"invalid_date",
"invalid_string",
"too_small",
"too_big",
"invalid_intersection_types",
"not_multiple_of",
"not_finite",
]);
export type ZodIssueCode = keyof typeof ZodIssueCode;
export type ZodIssueBase = {
path: (string | number)[];
message?: string | undefined;
};
export interface ZodInvalidTypeIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_type;
expected: ZodParsedType;
received: ZodParsedType;
}
export interface ZodInvalidLiteralIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_literal;
expected: unknown;
received: unknown;
}
export interface ZodUnrecognizedKeysIssue extends ZodIssueBase {
code: typeof ZodIssueCode.unrecognized_keys;
keys: string[];
}
export interface ZodInvalidUnionIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_union;
unionErrors: ZodError[];
}
export interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_union_discriminator;
options: Primitive[];
}
export interface ZodInvalidEnumValueIssue extends ZodIssueBase {
received: string | number;
code: typeof ZodIssueCode.invalid_enum_value;
options: (string | number)[];
}
export interface ZodInvalidArgumentsIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_arguments;
argumentsError: ZodError;
}
export interface ZodInvalidReturnTypeIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_return_type;
returnTypeError: ZodError;
}
export interface ZodInvalidDateIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_date;
}
export type StringValidation =
| "email"
| "url"
| "emoji"
| "uuid"
| "nanoid"
| "regex"
| "cuid"
| "cuid2"
| "ulid"
| "datetime"
| "date"
| "time"
| "duration"
| "ip"
| "cidr"
| "base64"
| "jwt"
| "base64url"
| { includes: string; position?: number | undefined }
| { startsWith: string }
| { endsWith: string };
export interface ZodInvalidStringIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_string;
validation: StringValidation;
}
export interface ZodTooSmallIssue extends ZodIssueBase {
code: typeof ZodIssueCode.too_small;
minimum: number | bigint;
inclusive: boolean;
exact?: boolean;
type: "array" | "string" | "number" | "set" | "date" | "bigint";
}
export interface ZodTooBigIssue extends ZodIssueBase {
code: typeof ZodIssueCode.too_big;
maximum: number | bigint;
inclusive: boolean;
exact?: boolean;
type: "array" | "string" | "number" | "set" | "date" | "bigint";
}
export interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {
code: typeof ZodIssueCode.invalid_intersection_types;
}
export interface ZodNotMultipleOfIssue extends ZodIssueBase {
code: typeof ZodIssueCode.not_multiple_of;
multipleOf: number | bigint;
}
export interface ZodNotFiniteIssue extends ZodIssueBase {
code: typeof ZodIssueCode.not_finite;
}
export interface ZodCustomIssue extends ZodIssueBase {
code: typeof ZodIssueCode.custom;
params?: { [k: string]: any };
}
export type DenormalizedError = { [k: string]: DenormalizedError | string[] };
export type ZodIssueOptionalMessage =
| ZodInvalidTypeIssue
| ZodInvalidLiteralIssue
| ZodUnrecognizedKeysIssue
| ZodInvalidUnionIssue
| ZodInvalidUnionDiscriminatorIssue
| ZodInvalidEnumValueIssue
| ZodInvalidArgumentsIssue
| ZodInvalidReturnTypeIssue
| ZodInvalidDateIssue
| ZodInvalidStringIssue
| ZodTooSmallIssue
| ZodTooBigIssue
| ZodInvalidIntersectionTypesIssue
| ZodNotMultipleOfIssue
| ZodNotFiniteIssue
| ZodCustomIssue;
export type ZodIssue = ZodIssueOptionalMessage & {
fatal?: boolean | undefined;
message: string;
};
export const quotelessJson = (obj: any) => {
const json = JSON.stringify(obj, null, 2);
return json.replace(/"([^"]+)":/g, "$1:");
};
type recursiveZodFormattedError<T> = T extends [any, ...any[]]
? { [K in keyof T]?: ZodFormattedError<T[K]> }
: T extends any[]
? { [k: number]: ZodFormattedError<T[number]> }
: T extends object
? { [K in keyof T]?: ZodFormattedError<T[K]> }
: unknown;
export type ZodFormattedError<T, U = string> = {
_errors: U[];
} & recursiveZodFormattedError<NonNullable<T>>;
export type inferFormattedError<T extends ZodType<any, any, any>, U = string> = ZodFormattedError<TypeOf<T>, U>;
export class ZodError<T = any> extends Error {
issues: ZodIssue[] = [];
get errors() {
return this.issues;
}
constructor(issues: ZodIssue[]) {
super();
const actualProto = new.target.prototype;
if (Object.setPrototypeOf) {
// eslint-disable-next-line ban/ban
Object.setPrototypeOf(this, actualProto);
} else {
(this as any).__proto__ = actualProto;
}
this.name = "ZodError";
this.issues = issues;
}
format(): ZodFormattedError<T>;
format<U>(mapper: (issue: ZodIssue) => U): ZodFormattedError<T, U>;
format(_mapper?: any) {
const mapper: (issue: ZodIssue) => any =
_mapper ||
function (issue: ZodIssue) {
return issue.message;
};
const fieldErrors: ZodFormattedError<T> = { _errors: [] } as any;
const processError = (error: ZodError) => {
for (const issue of error.issues) {
if (issue.code === "invalid_union") {
issue.unionErrors.map(processError);
} else if (issue.code === "invalid_return_type") {
processError(issue.returnTypeError);
} else if (issue.code === "invalid_arguments") {
processError(issue.argumentsError);
} else if (issue.path.length === 0) {
(fieldErrors as any)._errors.push(mapper(issue));
} else {
let curr: any = fieldErrors;
let i = 0;
while (i < issue.path.length) {
const el = issue.path[i]!;
const terminal = i === issue.path.length - 1;
if (!terminal) {
curr[el] = curr[el] || { _errors: [] };
// if (typeof el === "string") {
// curr[el] = curr[el] || { _errors: [] };
// } else if (typeof el === "number") {
// const errorArray: any = [];
// errorArray._errors = [];
// curr[el] = curr[el] || errorArray;
// }
} else {
curr[el] = curr[el] || { _errors: [] };
curr[el]._errors.push(mapper(issue));
}
curr = curr[el];
i++;
}
}
}
};
processError(this);
return fieldErrors;
}
static create = (issues: ZodIssue[]) => {
const error = new ZodError(issues);
return error;
};
static assert(value: unknown): asserts value is ZodError {
if (!(value instanceof ZodError)) {
throw new Error(`Not a ZodError: ${value}`);
}
}
override toString() {
return this.message;
}
override get message() {
return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);
}
get isEmpty(): boolean {
return this.issues.length === 0;
}
addIssue = (sub: ZodIssue) => {
this.issues = [...this.issues, sub];
};
addIssues = (subs: ZodIssue[] = []) => {
this.issues = [...this.issues, ...subs];
};
flatten(): typeToFlattenedError<T>;
flatten<U>(mapper?: (issue: ZodIssue) => U): typeToFlattenedError<T, U>;
flatten<U = string>(mapper: (issue: ZodIssue) => U = (issue: ZodIssue) => issue.message as any): any {
const fieldErrors: any = {};
const formErrors: U[] = [];
for (const sub of this.issues) {
if (sub.path.length > 0) {
const firstEl = sub.path[0]!;
fieldErrors[firstEl] = fieldErrors[firstEl] || [];
fieldErrors[firstEl].push(mapper(sub));
} else {
formErrors.push(mapper(sub));
}
}
return { formErrors, fieldErrors };
}
get formErrors() {
return this.flatten();
}
}
type stripPath<T extends object> = T extends any ? util.OmitKeys<T, "path"> : never;
export type IssueData = stripPath<ZodIssueOptionalMessage> & {
path?: (string | number)[];
fatal?: boolean | undefined;
};
export type ErrorMapCtx = {
defaultError: string;
data: any;
};
export type ZodErrorMap = (issue: ZodIssueOptionalMessage, _ctx: ErrorMapCtx) => { message: string };
@@ -0,0 +1,21 @@
Copyright (c) 2014 Andrew Kelley
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,30 @@
import { analyseComplexValue } from '../../../value/types/complex/index.mjs';
import { getAnimatableNone } from '../../../value/types/utils/animatable-none.mjs';
/**
* If we encounter keyframes like "none" or "0" and we also have keyframes like
* "#fff" or "200px 200px" we want to find a keyframe to serve as a template for
* the "none" keyframes. In this case "#fff" or "200px 200px" - then these get turned into
* zero equivalents, i.e. "#fff0" or "0px 0px".
*/
const invalidTemplates = new Set(["auto", "none", "0"]);
function makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {
let i = 0;
let animatableTemplate = undefined;
while (i < unresolvedKeyframes.length && !animatableTemplate) {
const keyframe = unresolvedKeyframes[i];
if (typeof keyframe === "string" &&
!invalidTemplates.has(keyframe) &&
analyseComplexValue(keyframe).values.length) {
animatableTemplate = unresolvedKeyframes[i];
}
i++;
}
if (animatableTemplate && name) {
for (const noneIndex of noneKeyframeIndexes) {
unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);
}
}
}
export { makeNoneKeyframesAnimatable };
@@ -0,0 +1,150 @@
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core"], factory);
}
else {
// Global (browser)
factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
(function () {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var Hasher = C_lib.Hasher;
var C_algo = C.algo;
// Reusable object
var W = [];
/**
* SHA-1 hash algorithm.
*/
var SHA1 = C_algo.SHA1 = Hasher.extend({
_doReset: function () {
this._hash = new WordArray.init([
0x67452301, 0xefcdab89,
0x98badcfe, 0x10325476,
0xc3d2e1f0
]);
},
_doProcessBlock: function (M, offset) {
// Shortcut
var H = this._hash.words;
// Working variables
var a = H[0];
var b = H[1];
var c = H[2];
var d = H[3];
var e = H[4];
// Computation
for (var i = 0; i < 80; i++) {
if (i < 16) {
W[i] = M[offset + i] | 0;
} else {
var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
W[i] = (n << 1) | (n >>> 31);
}
var t = ((a << 5) | (a >>> 27)) + e + W[i];
if (i < 20) {
t += ((b & c) | (~b & d)) + 0x5a827999;
} else if (i < 40) {
t += (b ^ c ^ d) + 0x6ed9eba1;
} else if (i < 60) {
t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;
} else /* if (i < 80) */ {
t += (b ^ c ^ d) - 0x359d3e2a;
}
e = d;
d = c;
c = (b << 30) | (b >>> 2);
b = a;
a = t;
}
// Intermediate hash value
H[0] = (H[0] + a) | 0;
H[1] = (H[1] + b) | 0;
H[2] = (H[2] + c) | 0;
H[3] = (H[3] + d) | 0;
H[4] = (H[4] + e) | 0;
},
_doFinalize: function () {
// Shortcuts
var data = this._data;
var dataWords = data.words;
var nBitsTotal = this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
// Add padding
dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;
data.sigBytes = dataWords.length * 4;
// Hash final blocks
this._process();
// Return final computed hash
return this._hash;
},
clone: function () {
var clone = Hasher.clone.call(this);
clone._hash = this._hash.clone();
return clone;
}
});
/**
* Shortcut function to the hasher's object interface.
*
* @param {WordArray|string} message The message to hash.
*
* @return {WordArray} The hash.
*
* @static
*
* @example
*
* var hash = CryptoJS.SHA1('message');
* var hash = CryptoJS.SHA1(wordArray);
*/
C.SHA1 = Hasher._createHelper(SHA1);
/**
* Shortcut function to the HMAC's object interface.
*
* @param {WordArray|string} message The message to hash.
* @param {WordArray|string} key The secret key.
*
* @return {WordArray} The HMAC.
*
* @static
*
* @example
*
* var hmac = CryptoJS.HmacSHA1(message, key);
*/
C.HmacSHA1 = Hasher._createHmacHelper(SHA1);
}());
return CryptoJS.SHA1;
}));
@@ -0,0 +1,185 @@
// Copyright 2013 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Functions to map previous bytes into a context id.
#ifndef BROTLI_ENC_CONTEXT_H_
#define BROTLI_ENC_CONTEXT_H_
#include <stdint.h>
namespace brotli {
// Second-order context lookup table for UTF8 byte streams.
//
// If p1 and p2 are the previous two bytes, we calcualte the context as
//
// context = kUTF8ContextLookup[p1] | kUTF8ContextLookup[p2 + 256].
//
// If the previous two bytes are ASCII characters (i.e. < 128), this will be
// equivalent to
//
// context = 4 * context1(p1) + context2(p2),
//
// where context1 is based on the previous byte in the following way:
//
// 0 : non-ASCII control
// 1 : \t, \n, \r
// 2 : space
// 3 : other punctuation
// 4 : " '
// 5 : %
// 6 : ( < [ {
// 7 : ) > ] }
// 8 : , ; :
// 9 : .
// 10 : =
// 11 : number
// 12 : upper-case vowel
// 13 : upper-case consonant
// 14 : lower-case vowel
// 15 : lower-case consonant
//
// and context2 is based on the second last byte:
//
// 0 : control, space
// 1 : punctuation
// 2 : upper-case letter, number
// 3 : lower-case letter
//
// If the last byte is ASCII, and the second last byte is not (in a valid UTF8
// stream it will be a continuation byte, value between 128 and 191), the
// context is the same as if the second last byte was an ASCII control or space.
//
// If the last byte is a UTF8 lead byte (value >= 192), then the next byte will
// be a continuation byte and the context id is 2 or 3 depending on the LSB of
// the last byte and to a lesser extent on the second last byte if it is ASCII.
//
// If the last byte is a UTF8 continuation byte, the second last byte can be:
// - continuation byte: the next byte is probably ASCII or lead byte (assuming
// 4-byte UTF8 characters are rare) and the context id is 0 or 1.
// - lead byte (192 - 207): next byte is ASCII or lead byte, context is 0 or 1
// - lead byte (208 - 255): next byte is continuation byte, context is 2 or 3
//
// The possible value combinations of the previous two bytes, the range of
// context ids and the type of the next byte is summarized in the table below:
//
// |--------\-----------------------------------------------------------------|
// | \ Last byte |
// | Second \---------------------------------------------------------------|
// | last byte \ ASCII | cont. byte | lead byte |
// | \ (0-127) | (128-191) | (192-) |
// |=============|===================|=====================|==================|
// | ASCII | next: ASCII/lead | not valid | next: cont. |
// | (0-127) | context: 4 - 63 | | context: 2 - 3 |
// |-------------|-------------------|---------------------|------------------|
// | cont. byte | next: ASCII/lead | next: ASCII/lead | next: cont. |
// | (128-191) | context: 4 - 63 | context: 0 - 1 | context: 2 - 3 |
// |-------------|-------------------|---------------------|------------------|
// | lead byte | not valid | next: ASCII/lead | not valid |
// | (192-207) | | context: 0 - 1 | |
// |-------------|-------------------|---------------------|------------------|
// | lead byte | not valid | next: cont. | not valid |
// | (208-) | | context: 2 - 3 | |
// |-------------|-------------------|---------------------|------------------|
static const uint8_t kUTF8ContextLookup[512] = {
// Last byte.
//
// ASCII range.
0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 4, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
8, 12, 16, 12, 12, 20, 12, 16, 24, 28, 12, 12, 32, 12, 36, 12,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 32, 32, 24, 40, 28, 12,
12, 48, 52, 52, 52, 48, 52, 52, 52, 48, 52, 52, 52, 52, 52, 48,
52, 52, 52, 52, 52, 48, 52, 52, 52, 52, 52, 24, 12, 28, 12, 12,
12, 56, 60, 60, 60, 56, 60, 60, 60, 56, 60, 60, 60, 60, 60, 56,
60, 60, 60, 60, 60, 56, 60, 60, 60, 60, 60, 24, 12, 28, 12, 0,
// UTF8 continuation byte range.
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
// UTF8 lead byte range.
2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3,
2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3,
2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3,
2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3,
// Second last byte.
//
// ASCII range.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1,
1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 0,
// UTF8 continuation byte range.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// UTF8 lead byte range.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
};
// Context lookup table for small signed integers.
static const uint8_t kSigned3BitContextLookup[] = {
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7,
};
enum ContextType {
CONTEXT_LSB6 = 0,
CONTEXT_MSB6 = 1,
CONTEXT_UTF8 = 2,
CONTEXT_SIGNED = 3
};
static inline uint8_t Context(uint8_t p1, uint8_t p2, int mode) {
switch (mode) {
case CONTEXT_LSB6:
return p1 & 0x3f;
case CONTEXT_MSB6:
return p1 >> 2;
case CONTEXT_UTF8:
return kUTF8ContextLookup[p1] | kUTF8ContextLookup[p2 + 256];
case CONTEXT_SIGNED:
return (kSigned3BitContextLookup[p1] << 3) + kSigned3BitContextLookup[p2];
default:
return 0;
}
}
} // namespace brotli
#endif // BROTLI_ENC_CONTEXT_H_
@@ -0,0 +1,57 @@
import { IAsnConverter } from "@peculiar/asn1-schema";
import { DirectoryString, Name } from "./name";
export declare const AsnIpConverter: IAsnConverter<string>;
/**
* ```asn1
* OtherName ::= SEQUENCE {
* type-id OBJECT IDENTIFIER,
* value [0] EXPLICIT ANY DEFINED BY type-id }
* ```
*/
export declare class OtherName {
typeId: string;
value: ArrayBuffer;
constructor(params?: Partial<OtherName>);
}
/**
* ```asn1
* EDIPartyName ::= SEQUENCE {
* nameAssigner [0] DirectoryString OPTIONAL,
* partyName [1] DirectoryString }
* ```
*/
export declare class EDIPartyName {
nameAssigner?: DirectoryString;
partyName: DirectoryString;
constructor(params?: Partial<EDIPartyName>);
}
/**
* ```asn1
* GeneralName ::= CHOICE {
* otherName [0] OtherName,
* rfc822Name [1] IA5String,
* dNSName [2] IA5String,
* x400Address [3] ORAddress,
* directoryName [4] Name,
* ediPartyName [5] EDIPartyName,
* uniformResourceIdentifier [6] IA5String,
* iPAddress [7] OCTET STRING,
* registeredID [8] OBJECT IDENTIFIER }
* ```
*/
export declare class GeneralName {
otherName?: OtherName;
rfc822Name?: string;
dNSName?: string;
x400Address?: ArrayBuffer;
directoryName?: Name;
ediPartyName?: EDIPartyName;
uniformResourceIdentifier?: string;
iPAddress?: string;
registeredID?: string;
/**
*
* @param params
*/
constructor(params?: Partial<GeneralName>);
}
@@ -0,0 +1,80 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = eot2ttf;
var _reader = _interopRequireDefault(require("./reader"));
var _writer = _interopRequireDefault(require("./writer"));
var _error = _interopRequireDefault(require("./error"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file eot转ttf
* @author mengke01(kekee000@gmail.com)
*/
/**
* eot格式转换成ttf字体格式
*
* @param {ArrayBuffer} eotBuffer eot缓冲数组
* @param {Object} options 选项
*
* @return {ArrayBuffer} ttf格式byte流
*/
// eslint-disable-next-line no-unused-vars
function eot2ttf(eotBuffer) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
// 这里用小尾方式读取
var eotReader = new _reader.default(eotBuffer, 0, eotBuffer.byteLength, true);
// check magic number
var magicNumber = eotReader.readUint16(34);
if (magicNumber !== 0x504C) {
_error.default.raise(10110);
}
// check version
var version = eotReader.readUint32(8);
if (version !== 0x20001 && version !== 0x10000 && version !== 0x20002) {
_error.default.raise(10110);
}
var eotSize = eotBuffer.byteLength || eotBuffer.length;
var fontSize = eotReader.readUint32(4);
var fontOffset = 82;
var familyNameSize = eotReader.readUint16(fontOffset);
fontOffset += 4 + familyNameSize;
var styleNameSize = eotReader.readUint16(fontOffset);
fontOffset += 4 + styleNameSize;
var versionNameSize = eotReader.readUint16(fontOffset);
fontOffset += 4 + versionNameSize;
var fullNameSize = eotReader.readUint16(fontOffset);
fontOffset += 2 + fullNameSize;
// version 0x20001
if (version === 0x20001 || version === 0x20002) {
var rootStringSize = eotReader.readUint16(fontOffset + 2);
fontOffset += 4 + rootStringSize;
}
// version 0x20002
if (version === 0x20002) {
fontOffset += 10;
var signatureSize = eotReader.readUint16(fontOffset);
fontOffset += 2 + signatureSize;
fontOffset += 4;
var eudcFontSize = eotReader.readUint32(fontOffset);
fontOffset += 4 + eudcFontSize;
}
if (fontOffset + fontSize > eotSize) {
_error.default.raise(10001);
}
// support slice
if (eotBuffer.slice) {
return eotBuffer.slice(fontOffset, fontOffset + fontSize);
}
// not support ArrayBuffer.slice eg. IE10
var bytes = eotReader.readBytes(fontOffset, fontSize);
return new _writer.default(new ArrayBuffer(fontSize)).writeBytes(bytes).getBuffer();
}
@@ -0,0 +1 @@
{"version":3,"file":"container-flow.d.ts","sourceRoot":"","sources":["container-flow.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;GASG;AACH,sCATW,WAAW,SAEX,KAAK,QAEL,WAAW,GAET,MAAM,CA0ClB;iCApDwD,aAAa;2BAD9C,wBAAwB;iCACS,aAAa"}
@@ -0,0 +1,468 @@
# Changelog
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.8.11](https://github.com/xmldom/xmldom/compare/0.8.10...0.8.11)
### Fixed
- update `ownerDocument` when moving nodes between documents
Thank you, [@shunkica](https://github.com/shunkica), for your contributions
## [0.8.10](https://github.com/xmldom/xmldom/compare/0.8.9...0.8.10)
### Fixed
- dom: prevent iteration over deleted items [`#514`](https://github.com/xmldom/xmldom/pull/514)/ [`#499`](https://github.com/xmldom/xmldom/issues/499)
Thank you, [@qtow](https://github.com/qtow), for your contributions
## [0.8.9](https://github.com/xmldom/xmldom/compare/0.8.8...0.8.9)
### Fixed
- Set nodeName property in ProcessingInstruction [`#509`](https://github.com/xmldom/xmldom/pull/509) / [`#505`](https://github.com/xmldom/xmldom/issues/505)
Thank you, [@cjbarth](https://github.com/cjbarth), for your contributions
## [0.8.8](https://github.com/xmldom/xmldom/compare/0.8.7...0.8.8)
### Fixed
- extend list of HTML entities [`#489`](https://github.com/xmldom/xmldom/pull/489)
Thank you, [@zorkow](https://github.com/zorkow), for your contributions
## [0.8.7](https://github.com/xmldom/xmldom/compare/0.8.6...0.8.7)
### Fixed
- properly parse closing where the last attribute has no value [`#485`](https://github.com/xmldom/xmldom/pull/485) / [`#486`](https://github.com/xmldom/xmldom/issues/486)
Thank you, [@bulandent](https://github.com/bulandent), for your contributions
## [0.7.10](https://github.com/xmldom/xmldom/compare/0.7.9...0.7.10)
### Fixed
- properly parse closing where the last attribute has no value [`#485`](https://github.com/xmldom/xmldom/pull/485) / [`#486`](https://github.com/xmldom/xmldom/issues/486)
Thank you, [@bulandent](https://github.com/bulandent), for your contributions
## [0.8.6](https://github.com/xmldom/xmldom/compare/0.8.5...0.8.6)
### Fixed
- Properly check nodes before replacement [`#457`](https://github.com/xmldom/xmldom/pull/457) / [`#455`](https://github.com/xmldom/xmldom/issues/455) / [`#456`](https://github.com/xmldom/xmldom/issues/456)
Thank you, [@edemaine](https://github.com/edemaine), [@pedro-l9](https://github.com/pedro-l9), for your contributions
## [0.8.5](https://github.com/xmldom/xmldom/compare/0.8.4...0.8.5)
### Fixed
- fix: Restore ES5 compatibility [`#452`](https://github.com/xmldom/xmldom/pull/452) / [`#453`](https://github.com/xmldom/xmldom/issues/453)
Thank you, [@fengxinming](https://github.com/fengxinming), for your contributions
## [0.8.4](https://github.com/xmldom/xmldom/compare/0.8.3...0.8.4)
### Fixed
- Security: Prevent inserting DOM nodes when they are not well-formed [`CVE-2022-39353`](https://github.com/xmldom/xmldom/security/advisories/GHSA-crh6-fp67-6883)
In case such a DOM would be created, the part that is not well-formed will be transformed into text nodes, in which xml specific characters like `<` and `>` are encoded accordingly.
In the upcoming version 0.9.0 those text nodes will no longer be added and an error will be thrown instead.
This change can break your code, if you relied on this behavior, e.g. multiple root elements in the past. We consider it more important to align with the specs that we want to be aligned with, considering the potential security issues that might derive from people not being aware of the difference in behavior.
Related Spec: <https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity>
Thank you, [@frumioj](https://github.com/frumioj), [@cjbarth](https://github.com/cjbarth), [@markgollnick](https://github.com/markgollnick) for your contributions
## [0.8.3](https://github.com/xmldom/xmldom/compare/0.8.3...0.8.2)
### Fixed
- Avoid iterating over prototype properties [`#437`](https://github.com/xmldom/xmldom/pull/437) / [`#436`](https://github.com/xmldom/xmldom/issues/436)
Thank you, [@Supraja9726](https://github.com/Supraja9726) for your contributions
## [0.8.2](https://github.com/xmldom/xmldom/compare/0.8.1...0.8.2)
### Fixed
- fix(dom): Serialize `&gt;` as specified (#395) [`#58`](https://github.com/xmldom/xmldom/issues/58)
### Other
- docs: Add `nodeType` values to public interface description [`#396`](https://github.com/xmldom/xmldom/pull/396)
- test: Add executable examples for node and typescript [`#317`](https://github.com/xmldom/xmldom/pull/317)
- fix(dom): Serialize `&gt;` as specified [`#395`](https://github.com/xmldom/xmldom/pull/395)
- chore: Add minimal `Object.assign` ponyfill [`#379`](https://github.com/xmldom/xmldom/pull/379)
- docs: Refine release documentation [`#378`](https://github.com/xmldom/xmldom/pull/378)
- chore: update various dev dependencies
Thank you [@niklasl](https://github.com/niklasl), [@cburatto](https://github.com/cburatto), [@SheetJSDev](https://github.com/SheetJSDev), [@pyrsmk](https://github.com/pyrsmk) for your contributions
## [0.8.1](https://github.com/xmldom/xmldom/compare/0.8.0...0.8.1)
### Fixes
- Only use own properties in entityMap [`#374`](https://github.com/xmldom/xmldom/pull/374)
### Docs
- Add security policy [`#365`](https://github.com/xmldom/xmldom/pull/365)
- changelog: Correct contributor name and link [`#366`](https://github.com/xmldom/xmldom/pull/366)
- Describe release/publish steps [`#358`](https://github.com/xmldom/xmldom/pull/358), [`#376`](https://github.com/xmldom/xmldom/pull/376)
- Add snyk package health badge [`#360`](https://github.com/xmldom/xmldom/pull/360)
## [0.8.0](https://github.com/xmldom/xmldom/compare/0.7.5...0.8.0)
### Fixed
- Normalize all line endings according to XML specs [1.0](https://w3.org/TR/xml/#sec-line-ends) and [1.1](https://www.w3.org/TR/xml11/#sec-line-ends) \
BREAKING CHANGE: Certain combination of line break characters are normalized to a single `\n` before parsing takes place and will no longer be preserved.
- [`#303`](https://github.com/xmldom/xmldom/issues/303) / [`#307`](https://github.com/xmldom/xmldom/pull/307)
- [`#49`](https://github.com/xmldom/xmldom/issues/49), [`#97`](https://github.com/xmldom/xmldom/issues/97), [`#324`](https://github.com/xmldom/xmldom/issues/324) / [`#314`](https://github.com/xmldom/xmldom/pull/314)
- XMLSerializer: Preserve whitespace character references [`#284`](https://github.com/xmldom/xmldom/issues/284) / [`#310`](https://github.com/xmldom/xmldom/pull/310) \
BREAKING CHANGE: If you relied on the not spec compliant preservation of literal `\t`, `\n` or `\r` in **attribute values**.
To preserve those you will have to create XML that instead contains the correct numerical (or hexadecimal) equivalent (e.g. `&#x9;`, `&#xA;`, `&#xD;`).
- Drop deprecated exports `DOMImplementation` and `XMLSerializer` from `lib/dom-parser.js` [#53](https://github.com/xmldom/xmldom/issues/53) / [`#309`](https://github.com/xmldom/xmldom/pull/309)
BREAKING CHANGE: Use the one provided by the main package export.
- dom: Remove all links as part of `removeChild` [`#343`](https://github.com/xmldom/xmldom/issues/343) / [`#355`](https://github.com/xmldom/xmldom/pull/355)
### Chore
- ci: Restore latest tested node version to 16.x [`#325`](https://github.com/xmldom/xmldom/pull/325)
- ci: Split test and lint steps into jobs [`#111`](https://github.com/xmldom/xmldom/issues/111) / [`#304`](https://github.com/xmldom/xmldom/pull/304)
- Pinned and updated devDependencies
Thank you [@marrus-sh](https://github.com/marrus-sh), [@victorandree](https://github.com/victorandree), [@mdierolf](https://github.com/mdierolf), [@tsabbay](https://github.com/tsabbay), [@fatihpense](https://github.com/fatihpense) for your contributions
## 0.7.5
[Commits](https://github.com/xmldom/xmldom/compare/0.7.4...0.7.5)
### Fixes:
- Preserve default namespace when serializing [`#319`](https://github.com/xmldom/xmldom/issues/319) / [`#321`](https://github.com/xmldom/xmldom/pull/321)
Thank you, [@lupestro](https://github.com/lupestro)
## 0.7.4
[Commits](https://github.com/xmldom/xmldom/compare/0.7.3...0.7.4)
### Fixes:
- Restore ability to parse `__prototype__` attributes [`#315`](https://github.com/xmldom/xmldom/pull/315)
Thank you, [@dsimpsonOMF](https://github.com/dsimpsonOMF)
## 0.7.3
[Commits](https://github.com/xmldom/xmldom/compare/0.7.2...0.7.3)
### Fixes:
- Add doctype when parsing from string [`#277`](https://github.com/xmldom/xmldom/issues/277) / [`#301`](https://github.com/xmldom/xmldom/pull/301)
- Correct typo in error message [`#294`](https://github.com/xmldom/xmldom/pull/294)
Thank you, [@rrthomas](https://github.com/rrthomas)
### Refactor:
- Improve exports & require statements, new main package entry [`#233`](https://github.com/xmldom/xmldom/pull/233)
### Docs:
- Fix Stryker badge [`#298`](https://github.com/xmldom/xmldom/pull/298)
- Fix link to help-wanted issues [`#299`](https://github.com/xmldom/xmldom/pull/299)
### Chore:
- Execute stryker:dry-run on branches [`#302`](https://github.com/xmldom/xmldom/pull/302)
- Fix stryker config [`#300`](https://github.com/xmldom/xmldom/pull/300)
- Split test and lint scripts [`#297`](https://github.com/xmldom/xmldom/pull/297)
- Switch to stryker dashboard owned by org [`#292`](https://github.com/xmldom/xmldom/pull/292)
## 0.7.2
[Commits](https://github.com/xmldom/xmldom/compare/0.7.1...0.7.2)
### Fixes:
- Types: Add index.d.ts to packaged files [`#288`](https://github.com/xmldom/xmldom/pull/288)
Thank you, [@forty](https://github.com/forty)
## 0.7.1
[Commits](https://github.com/xmldom/xmldom/compare/0.7.0...0.7.1)
### Fixes:
- Types: Copy types from DefinitelyTyped [`#283`](https://github.com/xmldom/xmldom/pull/283)
Thank you, [@kachkaev](https://github.com/kachkaev)
### Chore:
- package.json: remove author, maintainers, etc. [`#279`](https://github.com/xmldom/xmldom/pull/279)
## 0.7.0
[Commits](https://github.com/xmldom/xmldom/compare/0.6.0...0.7.0)
Due to [`#271`](https://github.com/xmldom/xmldom/issue/271) this version was published as
- unscoped `xmldom` package to github (git tags [`0.7.0`](https://github.com/xmldom/xmldom/tree/0.7.0) and [`0.7.0+unscoped`](https://github.com/xmldom/xmldom/tree/0.7.0%2Bunscoped))
- scoped `@xmldom/xmldom` package to npm (git tag `0.7.0+scoped`)
For more details look at [`#278`](https://github.com/xmldom/xmldom/pull/278#issuecomment-902172483)
### Fixes:
- Security: Misinterpretation of malicious XML input [`CVE-2021-32796`](https://github.com/xmldom/xmldom/security/advisories/GHSA-5fg8-2547-mr8q)
- Implement `Document.getElementsByClassName` as specified [`#213`](https://github.com/xmldom/xmldom/pull/213), thank you, [@ChALkeR](https://github.com/ChALkeR)
- Inherit namespace prefix from parent when required [`#268`](https://github.com/xmldom/xmldom/pull/268)
- Handle whitespace in closing tags [`#267`](https://github.com/xmldom/xmldom/pull/267)
- Update `DOMImplementation` according to recent specs [`#210`](https://github.com/xmldom/xmldom/pull/210)
BREAKING CHANGE: Only if you "passed features to be marked as available as a constructor arguments" and expected it to "magically work".
- No longer serializes any namespaces with an empty URI [`#244`](https://github.com/xmldom/xmldom/pull/244)
(related to [`#168`](https://github.com/xmldom/xmldom/pull/168) released in 0.6.0)
BREAKING CHANGE: Only if you rely on ["unsetting" a namespace prefix](https://github.com/xmldom/xmldom/pull/168#issuecomment-886984994) by setting it to an empty string
- Set `localName` as part of `Document.createElement` [`#229`](https://github.com/xmldom/xmldom/pull/229), thank you, [@rrthomas](https://github.com/rrthomas)
### CI
- We are now additionally running tests against node v16
- Stryker tests on the master branch now run against node v14
### Docs
- Describe relations with and between specs: [`#211`](https://github.com/xmldom/xmldom/pull/211), [`#247`](https://github.com/xmldom/xmldom/pull/247)
## 0.6.0
[Commits](https://github.com/xmldom/xmldom/compare/0.5.0...0.6.0)
### Fixes
- Stop serializing empty namespace values like `xmlns:ds=""` [`#168`](https://github.com/xmldom/xmldom/pull/168)
BREAKING CHANGE: If your code expected empty namespaces attributes to be serialized.
Thank you, [@pdecat](https://github.com/pdecat) and [@FranckDepoortere](https://github.com/FranckDepoortere)
- Escape `<` to `&lt;` when serializing attribute values [`#198`](https://github.com/xmldom/xmldom/issues/198) / [`#199`](https://github.com/xmldom/xmldom/pull/199)
## 0.5.0
[Commits](https://github.com/xmldom/xmldom/compare/0.4.0...0.5.0)
### Fixes
- Avoid misinterpretation of malicious XML input - [`GHSA-h6q6-9hqw-rwfv`](https://github.com/xmldom/xmldom/security/advisories/GHSA-h6q6-9hqw-rwfv) (CVE-2021-21366)
- Improve error reporting; throw on duplicate attribute\
BREAKING CHANGE: It is currently not clear how to consistently deal with duplicate attributes, so it's also safer for our users to fail when detecting them.
It's possible to configure the `DOMParser.errorHandler` before parsing, to handle those errors differently.
To accomplish this and also be able to verify it in tests I needed to
- create a new `Error` type `ParseError` and export it
- Throw `ParseError` from `errorHandler.fatalError` and prevent those from being caught in `XMLReader`.
- export `DOMHandler` constructor as `__DOMHandler`
- Preserve quotes in DOCTYPE declaration
Since the only purpose of parsing the DOCTYPE is to be able to restore it when serializing, we decided that it would be best to leave the parsed `publicId` and `systemId` as is, including any quotes.
BREAKING CHANGE: If somebody relies on the actual unquoted values of those ids, they will need to take care of either single or double quotes and the right escaping.
(Without this change this would not have been possible because the SAX parser already dropped the information about the quotes that have been used in the source.)
https://www.w3.org/TR/2006/REC-xml11-20060816/#dtd
https://www.w3.org/TR/2006/REC-xml11-20060816/#IDAX1KS (External Entity Declaration)
- Fix breaking preprocessors' directives when parsing attributes [`#171`](https://github.com/xmldom/xmldom/pull/171)
- fix(dom): Escape `]]&gt;` when serializing CharData [`#181`](https://github.com/xmldom/xmldom/pull/181)
- Switch to (only) MIT license (drop problematic LGPL license option) [`#178`](https://github.com/xmldom/xmldom/pull/178)
- Export DOMException; remove custom assertions; etc. [`#174`](https://github.com/xmldom/xmldom/pull/174)
### Docs
- Update MDN links in `readme.md` [`#188`](https://github.com/xmldom/xmldom/pull/188)
## 0.4.0
[Commits](https://github.com/xmldom/xmldom/compare/0.3.0...0.4.0)
### Fixes
- **BREAKING** Restore `&nbsp;` behavior from v0.1.27 [`#67`](https://github.com/xmldom/xmldom/pull/67)
- **BREAKING** Typecheck source param before parsing [`#113`](https://github.com/xmldom/xmldom/pull/113)
- Include documents in package files list [`#156`](https://github.com/xmldom/xmldom/pull/156)
- Preserve doctype with sysid [`#144`](https://github.com/xmldom/xmldom/pull/144)
- Remove ES6 syntax from getElementsByClassName [`#91`](https://github.com/xmldom/xmldom/pull/91)
- Revert "Add lowercase of åäö in entityMap" due to duplicate entries [`#84`](https://github.com/xmldom/xmldom/pull/84)
- fix: Convert all line separators to LF [`#66`](https://github.com/xmldom/xmldom/pull/66)
### Docs
- Update CHANGELOG.md through version 0.3.0 [`#63`](https://github.com/xmldom/xmldom/pull/63)
- Update badges [`#78`](https://github.com/xmldom/xmldom/pull/78)
- Add .editorconfig file [`#104`](https://github.com/xmldom/xmldom/pull/104)
- Add note about import [`#79`](https://github.com/xmldom/xmldom/pull/79)
- Modernize & improve the example in readme.md [`#81`](https://github.com/xmldom/xmldom/pull/81)
### CI
- Add Stryker Mutator [`#70`](https://github.com/xmldom/xmldom/pull/70)
- Add Stryker action to update dashboard [`#77`](https://github.com/xmldom/xmldom/pull/77)
- Add Node GitHub action workflow [`#64`](https://github.com/xmldom/xmldom/pull/64)
- add & enable eslint [`#106`](https://github.com/xmldom/xmldom/pull/106)
- Use eslint-plugin-es5 to enforce ES5 syntax [`#107`](https://github.com/xmldom/xmldom/pull/107)
- Recover `vows` tests, drop `proof` tests [`#59`](https://github.com/xmldom/xmldom/pull/59)
- Add jest tessuite and first tests [`#114`](https://github.com/xmldom/xmldom/pull/114)
- Add jest testsuite with `xmltest` cases [`#112`](https://github.com/xmldom/xmldom/pull/112)
- Configure Renovate [`#108`](https://github.com/xmldom/xmldom/pull/108)
- Test European HTML entities [`#86`](https://github.com/xmldom/xmldom/pull/86)
- Updated devDependencies
### Other
- Remove files that are not of any use [`#131`](https://github.com/xmldom/xmldom/pull/131), [`#65`](https://github.com/xmldom/xmldom/pull/65), [`#33`](https://github.com/xmldom/xmldom/pull/33)
## 0.3.0
[Commits](https://github.com/xmldom/xmldom/compare/0.2.1...0.3.0)
- **BREAKING** Node >=10.x is now required.
- **BREAKING** Remove `component.json` (deprecated package manager https://github.com/componentjs/guide)
- **BREAKING** Move existing sources into `lib` subdirectory.
- **POSSIBLY BREAKING** Introduce `files` entry in `package.json` and remove use of `.npmignore`.
- [Add `Document.getElementsByClassName`](https://github.com/xmldom/xmldom/issues/24).
- [Add `Node` to the list of exports](https://github.com/xmldom/xmldom/pull/27)
- [Add lowercase of åäö in `entityMap`](https://github.com/xmldom/xmldom/pull/23).
- Move CHANGELOG to markdown file.
- Move LICENSE to markdown file.
## 0.2.1
[Commits](https://github.com/xmldom/xmldom/compare/0.2.0...0.2.1)
- Correct `homepage`, `repository` and `bugs` URLs in `package.json`.
## 0.2.0
[Commits](https://github.com/xmldom/xmldom/compare/v0.1.27...0.2.0)
- Includes all **BREAKING** changes introduced in [`xmldom-alpha@v0.1.28`](#0128) by the original authors.
- **POSSIBLY BREAKING** [remove the `Object.create` check from the `_extends` method of `dom.js` that added a `__proto__` property](https://github.com/xmldom/xmldom/commit/0be2ae910a8a22c9ec2cac042e04de4c04317d2a#diff-7d1c5d97786fdf9af5446a241d0b6d56L19-L22) ().
- **POSSIBLY BREAKING** [remove code that added a `__proto__` property](https://github.com/xmldom/xmldom/commit/366159a76a181ce9a0d83f5dc48205686cfaf9cc)
- formatting/corrections in `package.json`
## 0.1.31
[Commits](https://github.com/xmldom/xmldom/compare/v0.1.27...v0.1.31)
The patch versions (`v0.1.29` - `v0.1.31`) that have been released on the [v0.1.x branch](https://github.com/xmldom/xmldom/tree/0.1.x), to reflect the changed maintainers, **are branched off from [`v0.1.27`](#0127) so they don't include the breaking changes introduced in [`xmldom-alpha@v0.1.28`](#0128)**:
## Maintainer changes
After the last commit to the original repository <https://github.com/jindw/xmldom> on the 9th of May 2017, the first commit to <https://github.com/xmldom/xmldom> is from the 19th of December 2019. [The fork has been announced in the original repository on the 2nd of March 2020.](https://github.com/jindw/xmldom/issues/259)
The versions listed below have been published to one or both of the following packages:
- <https://www.npmjs.com/package/xmldom-alpha>
- <https://www.npmjs.com/package/xmldom>
It is currently not planned to continue publishing the `xmldom-alpha` package.
The new maintainers did not invest time to understand changes that led to the last `xmldom` version [`0.1.27`](#0127) published by the original maintainer, but consider it the basis for their work.
A timeline of all the changes that happened from that version until `0.3.0` is available in <https://github.com/xmldom/xmldom/issues/62>. Any related questions should be asked there.
## 0.1.28
[Commits](https://github.com/xmldom/xmldom/compare/v0.1.27...xmldom-alpha@v0.1.28)
Published by @jindw on the 9th of May 2017 as
- `xmldom-alpha@0.1.28`
- **BREAKING** includes [regression regarding `&nbsp;` (issue #57)](https://github.com/xmldom/xmldom/issues/57)
- [Fix `license` field in `package.json`](https://github.com/jindw/xmldom/pull/178)
- [Conditional converting of HTML entities](https://github.com/jindw/xmldom/pull/80)
- Fix `dom.js` serialization issue for missing document element ([example that failed on `toString()` before this change](https://github.com/xmldom/xmldom/blob/a58dcf7a265522e80ce520fe3be0cddb1b976f6f/test/parse/unclosedcomment.js#L10-L11))
- Add new module `entities.js`
## 0.1.27
Published by @jindw on the 28th of Nov 2016 as
- `xmldom@0.1.27`
- `xmldom-alpha@0.1.27`
- Various bug fixes.
## 0.1.26
Published on the 18th of Nov 2016
as `xmldom@0.1.26`
- Details unknown
## 0.1.25
Published on the 18th of Nov 2016 as
- `xmldom@0.1.25`
- Details unknown
## 0.1.24
Published on the 27th of November 2016 as
- `xmldom@0.1.24`
- `xmldom-alpha@0.1.24`
- Added node filter.
## 0.1.23
Published on the 5th of May 2016 as
- `xmldom-alpha@0.1.23`
- Add namespace support for nest node serialize.
- Various other bug fixes.
## 0.1.22
- Merge XMLNS serialization.
- Remove \r from source string.
- Print namespaces for child elements.
- Switch references to nodeType to use named constants.
- Add nodelist toString support.
## 0.1.21
- Fix serialize bug.
## 0.1.20
- Optimize invalid XML support.
- Add toString sorter for attributes output.
- Add html self closed node button.
- Add `*` NS support for getElementsByTagNameNS.
- Convert attribute's value to string in setAttributeNS.
- Add support for HTML entities for HTML docs only.
- Fix TypeError when Document is created with DocumentType.
## 0.1.19
- Fix [infinite loop on unclosed comment (jindw/xmldom#68)](https://github.com/jindw/xmldom/issues/68)
- Add error report for unclosed tag.
- Various other fixes.
## 0.1.18
- Add default `ns` support.
- parseFromString now renders entirely plain text documents as textNode.
- Enable option to ignore white space on parsing.
## 0.1.17
**Details missing for this and potential earlier version**
## 0.1.16
- Correctly handle multibyte Unicode greater than two byts. #57. #56.
- Initial unit testing and test coverage. #53. #46. #19.
- Create Bower `component.json` #52.
## 0.1.8
- Add: some test case from node-o3-xml(excludes xpath support)
- Fix: remove existed attribute before setting (bug introduced in v0.1.5)
- Fix: index direct access for childNodes and any NodeList collection(not w3c standard)
- Fix: remove last child bug
@@ -0,0 +1,18 @@
import baseGetTag from './_baseGetTag.js';
import isObjectLike from './isObjectLike.js';
/** `Object#toString` result references. */
var dateTag = '[object Date]';
/**
* The base implementation of `_.isDate` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
*/
function baseIsDate(value) {
return isObjectLike(value) && baseGetTag(value) == dateTag;
}
export default baseIsDate;
@@ -0,0 +1,19 @@
/** Used to match a single whitespace character. */
var reWhitespace = /\s/;
/**
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
* character of `string`.
*
* @private
* @param {string} string The string to inspect.
* @returns {number} Returns the index of the last non-whitespace character.
*/
function trimmedEndIndex(string) {
var index = string.length;
while (index-- && reWhitespace.test(string.charAt(index))) {}
return index;
}
export default trimmedEndIndex;
@@ -0,0 +1,79 @@
let browserslist = require('browserslist')
let { agents } = require('caniuse-lite/dist/unpacker/agents')
let utils = require('./utils')
class Browsers {
constructor(data, requirements, options, browserslistOpts) {
this.data = data
this.options = options || {}
this.browserslistOpts = browserslistOpts || {}
this.selected = this.parse(requirements)
}
/**
* Return all prefixes for default browser data
*/
static prefixes() {
if (this.prefixesCache) {
return this.prefixesCache
}
this.prefixesCache = []
for (let name in agents) {
this.prefixesCache.push(`-${agents[name].prefix}-`)
}
this.prefixesCache = utils
.uniq(this.prefixesCache)
.sort((a, b) => b.length - a.length)
return this.prefixesCache
}
/**
* Check is value contain any possible prefix
*/
static withPrefix(value) {
if (!this.prefixesRegexp) {
this.prefixesRegexp = new RegExp(this.prefixes().join('|'))
}
return this.prefixesRegexp.test(value)
}
/**
* Is browser is selected by requirements
*/
isSelected(browser) {
return this.selected.includes(browser)
}
/**
* Return browsers selected by requirements
*/
parse(requirements) {
let opts = {}
for (let i in this.browserslistOpts) {
opts[i] = this.browserslistOpts[i]
}
opts.path = this.options.from
return browserslist(requirements, opts)
}
/**
* Return prefix for selected browser
*/
prefix(browser) {
let [name, version] = browser.split(' ')
let data = this.data[name]
let prefix = data.prefix_exceptions && data.prefix_exceptions[version]
if (!prefix) {
prefix = data.prefix
}
return `-${prefix}-`
}
}
module.exports = Browsers
@@ -0,0 +1,29 @@
{
"name": "yallist",
"version": "3.1.1",
"description": "Yet Another Linked List",
"main": "yallist.js",
"directories": {
"test": "test"
},
"files": [
"yallist.js",
"iterator.js"
],
"dependencies": {},
"devDependencies": {
"tap": "^12.1.0"
},
"scripts": {
"test": "tap test/*.js --100",
"preversion": "npm test",
"postversion": "npm publish",
"postpublish": "git push origin --all; git push origin --tags"
},
"repository": {
"type": "git",
"url": "git+https://github.com/isaacs/yallist.git"
},
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"license": "ISC"
}
@@ -0,0 +1,19 @@
The MIT License
Copyright (c) 2013 Brian J. Brennan
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 @@
module.exports={C:{"64":0.00325,"72":0.00325,"78":0.01625,"89":0.00325,"95":0.00325,"112":0.0065,"115":0.06175,"118":0.00325,"125":0.0065,"127":0.0065,"130":0.00325,"137":0.00325,"139":0.0325,"140":0.00325,"141":0.0195,"142":0.03575,"143":0.34125,"144":0.25675,"145":0.00325,_:"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 65 66 67 68 69 70 71 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 90 91 92 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 113 114 116 117 119 120 121 122 123 124 126 128 129 131 132 133 134 135 136 138 146 147 3.5 3.6"},D:{"42":0.00325,"43":0.00325,"46":0.00325,"47":0.00975,"48":0.01625,"49":0.00325,"50":0.00325,"51":0.00325,"52":0.00325,"55":0.00325,"56":0.00325,"58":0.013,"59":0.00975,"60":0.00325,"62":0.00325,"64":0.00325,"67":0.01625,"68":0.01625,"69":0.0065,"70":0.0325,"71":0.0065,"72":0.02275,"73":0.00325,"74":0.01625,"75":0.091,"76":0.00325,"77":0.065,"78":0.00325,"79":0.08775,"80":0.05525,"81":0.0195,"83":0.0195,"84":0.0065,"86":0.0065,"87":0.013,"88":0.00975,"89":0.00975,"90":0.00325,"91":0.0065,"92":0.00325,"93":0.04875,"94":0.03575,"95":0.00325,"96":0.00975,"98":0.01625,"99":0.0065,"100":0.00975,"103":0.08775,"105":0.00975,"106":0.00975,"108":0.00325,"109":0.12675,"110":0.0065,"111":0.013,"112":0.00325,"113":0.00325,"114":0.00975,"116":0.08775,"118":0.00325,"119":0.039,"120":0.0195,"121":0.0195,"122":0.02275,"123":0.0065,"124":0.0065,"125":0.56225,"126":0.02925,"127":0.00975,"128":0.04225,"129":0.00975,"130":0.0195,"131":0.065,"132":0.00975,"133":0.0325,"134":0.02925,"135":0.05525,"136":0.06825,"137":0.11375,"138":0.27625,"139":0.338,"140":2.86,"141":6.877,"142":0.0715,"143":0.00325,_:"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 44 45 53 54 57 61 63 65 66 85 97 101 102 104 107 115 117 144 145"},F:{"36":0.00325,"42":0.00325,"64":0.00325,"73":0.00325,"79":0.0455,"86":0.0065,"90":0.065,"91":0.0325,"92":0.01625,"95":0.01625,"108":0.01625,"112":0.00325,"113":0.0065,"116":0.0065,"117":0.00975,"119":0.0065,"120":0.24375,"121":0.0065,"122":0.67925,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 37 38 39 40 41 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 65 66 67 68 69 70 71 72 74 75 76 77 78 80 81 82 83 84 85 87 88 89 93 94 96 97 98 99 100 101 102 103 104 105 106 107 109 110 111 114 115 118 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"12":0.0065,"14":0.013,"15":0.013,"16":0.00325,"17":0.00325,"18":0.0845,"84":0.00325,"88":0.00325,"89":0.00325,"90":0.0325,"92":0.1625,"99":0.01625,"100":0.0065,"107":0.0065,"109":0.00325,"111":0.00975,"114":0.052,"122":0.02275,"126":0.00325,"128":0.0065,"130":0.00325,"131":0.0065,"132":0.013,"133":0.00325,"134":0.0065,"135":0.00325,"136":0.078,"137":0.00325,"138":0.052,"139":0.03575,"140":0.79625,"141":2.59025,"142":0.00975,_:"13 79 80 81 83 85 86 87 91 93 94 95 96 97 98 101 102 103 104 105 106 108 110 112 113 115 116 117 118 119 120 121 123 124 125 127 129"},E:{"14":0.00325,_:"0 4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 12.1 14.1 15.1 15.2-15.3 15.4 16.0 16.2 16.3 16.4 16.5 17.0 18.0 18.2 26.2","10.1":0.00975,"11.1":0.0585,"13.1":0.06825,"15.5":0.00325,"15.6":0.0325,"16.1":0.00325,"16.6":0.0585,"17.1":0.14625,"17.2":0.00325,"17.3":0.00325,"17.4":0.013,"17.5":0.0065,"17.6":0.065,"18.1":0.00325,"18.3":0.0195,"18.4":0.00325,"18.5-18.6":0.039,"26.0":0.091,"26.1":0.00325},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00054,"5.0-5.1":0,"6.0-6.1":0.00214,"7.0-7.1":0.00161,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00482,"10.0-10.2":0.00054,"10.3":0.00911,"11.0-11.2":0.13506,"11.3-11.4":0.00322,"12.0-12.1":0.00107,"12.2-12.5":0.02626,"13.0-13.1":0,"13.2":0.00268,"13.3":0.00107,"13.4-13.7":0.00429,"14.0-14.4":0.00911,"14.5-14.8":0.00965,"15.0-15.1":0.00911,"15.2-15.3":0.00697,"15.4":0.00804,"15.5":0.00911,"15.6-15.8":0.11898,"16.0":0.01608,"16.1":0.03001,"16.2":0.01554,"16.3":0.02787,"16.4":0.00697,"16.5":0.01233,"16.6-16.7":0.15918,"17.0":0.01125,"17.1":0.01715,"17.2":0.01233,"17.3":0.01822,"17.4":0.03216,"17.5":0.0552,"17.6-17.7":0.13935,"18.0":0.03162,"18.1":0.06539,"18.2":0.03537,"18.3":0.11362,"18.4":0.05842,"18.5-18.6":2.97881,"26.0":0.3682,"26.1":0.0134},P:{"4":0.10249,"21":0.0205,"22":0.0205,"23":0.01025,"24":0.14348,"25":0.28696,"26":0.09224,"27":0.21522,"28":0.96338,"29":0.0205,_:"20 8.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 18.0","5.0-5.4":0.0205,"6.2-6.4":0.01025,"7.2-7.4":0.0205,"9.2":0.01025,"17.0":0.01025,"19.0":0.01025},I:{"0":0.0337,"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":7.54825,_:"10 11 12 11.1 11.5 12.1"},A:{"10":0.00325,"11":0.0065,_:"6 7 8 9 5.5"},S:{"2.5":0.00675,_:"3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.14175},Q:{"14.9":0.00675},O:{"0":0.189},H:{"0":2.03},L:{"0":62.6665}};
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=BasePlanParams.js.map
@@ -0,0 +1,891 @@
/**
* @since v0.3.7
*/
declare module "module" {
import { URL } from "node:url";
class Module {
constructor(id: string, parent?: Module);
}
interface Module extends NodeJS.Module {}
namespace Module {
export { Module };
}
namespace Module {
/**
* A list of the names of all modules provided by Node.js. Can be used to verify
* if a module is maintained by a third party or not.
*
* Note: the list doesn't contain prefix-only modules like `node:test`.
* @since v9.3.0, v8.10.0, v6.13.0
*/
const builtinModules: readonly string[];
/**
* @since v12.2.0
* @param path Filename to be used to construct the require
* function. Must be a file URL object, file URL string, or absolute path
* string.
*/
function createRequire(path: string | URL): NodeJS.Require;
namespace constants {
/**
* The following constants are returned as the `status` field in the object returned by
* {@link enableCompileCache} to indicate the result of the attempt to enable the
* [module compile cache](https://nodejs.org/docs/latest-v22.x/api/module.html#module-compile-cache).
* @since v22.8.0
*/
namespace compileCacheStatus {
/**
* Node.js has enabled the compile cache successfully. The directory used to store the
* compile cache will be returned in the `directory` field in the
* returned object.
*/
const ENABLED: number;
/**
* The compile cache has already been enabled before, either by a previous call to
* {@link enableCompileCache}, or by the `NODE_COMPILE_CACHE=dir`
* environment variable. The directory used to store the
* compile cache will be returned in the `directory` field in the
* returned object.
*/
const ALREADY_ENABLED: number;
/**
* Node.js fails to enable the compile cache. This can be caused by the lack of
* permission to use the specified directory, or various kinds of file system errors.
* The detail of the failure will be returned in the `message` field in the
* returned object.
*/
const FAILED: number;
/**
* Node.js cannot enable the compile cache because the environment variable
* `NODE_DISABLE_COMPILE_CACHE=1` has been set.
*/
const DISABLED: number;
}
}
interface EnableCompileCacheResult {
/**
* One of the {@link constants.compileCacheStatus}
*/
status: number;
/**
* If Node.js cannot enable the compile cache, this contains
* the error message. Only set if `status` is `module.constants.compileCacheStatus.FAILED`.
*/
message?: string;
/**
* If the compile cache is enabled, this contains the directory
* where the compile cache is stored. Only set if `status` is
* `module.constants.compileCacheStatus.ENABLED` or
* `module.constants.compileCacheStatus.ALREADY_ENABLED`.
*/
directory?: string;
}
/**
* Enable [module compile cache](https://nodejs.org/docs/latest-v22.x/api/module.html#module-compile-cache)
* in the current Node.js instance.
*
* If `cacheDir` is not specified, Node.js will either use the directory specified by the
* `NODE_COMPILE_CACHE=dir` environment variable if it's set, or use
* `path.join(os.tmpdir(), 'node-compile-cache')` otherwise. For general use cases, it's
* recommended to call `module.enableCompileCache()` without specifying the `cacheDir`,
* so that the directory can be overridden by the `NODE_COMPILE_CACHE` environment
* variable when necessary.
*
* Since compile cache is supposed to be a quiet optimization that is not required for the
* application to be functional, this method is designed to not throw any exception when the
* compile cache cannot be enabled. Instead, it will return an object containing an error
* message in the `message` field to aid debugging.
* If compile cache is enabled successfully, the `directory` field in the returned object
* contains the path to the directory where the compile cache is stored. The `status`
* field in the returned object would be one of the `module.constants.compileCacheStatus`
* values to indicate the result of the attempt to enable the
* [module compile cache](https://nodejs.org/docs/latest-v22.x/api/module.html#module-compile-cache).
*
* This method only affects the current Node.js instance. To enable it in child worker threads,
* either call this method in child worker threads too, or set the
* `process.env.NODE_COMPILE_CACHE` value to compile cache directory so the behavior can
* be inherited into the child workers. The directory can be obtained either from the
* `directory` field returned by this method, or with {@link getCompileCacheDir}.
* @since v22.8.0
* @param cacheDir Optional path to specify the directory where the compile cache
* will be stored/retrieved.
*/
function enableCompileCache(cacheDir?: string): EnableCompileCacheResult;
/**
* Flush the [module compile cache](https://nodejs.org/docs/latest-v22.x/api/module.html#module-compile-cache)
* accumulated from modules already loaded
* in the current Node.js instance to disk. This returns after all the flushing
* file system operations come to an end, no matter they succeed or not. If there
* are any errors, this will fail silently, since compile cache misses should not
* interfere with the actual operation of the application.
* @since v22.10.0
*/
function flushCompileCache(): void;
/**
* @since v22.8.0
* @return Path to the [module compile cache](https://nodejs.org/docs/latest-v22.x/api/module.html#module-compile-cache)
* directory if it is enabled, or `undefined` otherwise.
*/
function getCompileCacheDir(): string | undefined;
/**
* ```text
* /path/to/project
* ├ packages/
* ├ bar/
* ├ bar.js
* └ package.json // name = '@foo/bar'
* └ qux/
* ├ node_modules/
* └ some-package/
* └ package.json // name = 'some-package'
* ├ qux.js
* └ package.json // name = '@foo/qux'
* ├ main.js
* └ package.json // name = '@foo'
* ```
* ```js
* // /path/to/project/packages/bar/bar.js
* import { findPackageJSON } from 'node:module';
*
* findPackageJSON('..', import.meta.url);
* // '/path/to/project/package.json'
* // Same result when passing an absolute specifier instead:
* findPackageJSON(new URL('../', import.meta.url));
* findPackageJSON(import.meta.resolve('../'));
*
* findPackageJSON('some-package', import.meta.url);
* // '/path/to/project/packages/bar/node_modules/some-package/package.json'
* // When passing an absolute specifier, you might get a different result if the
* // resolved module is inside a subfolder that has nested `package.json`.
* findPackageJSON(import.meta.resolve('some-package'));
* // '/path/to/project/packages/bar/node_modules/some-package/some-subfolder/package.json'
*
* findPackageJSON('@foo/qux', import.meta.url);
* // '/path/to/project/packages/qux/package.json'
* ```
* @since v22.14.0
* @param specifier The specifier for the module whose `package.json` to
* retrieve. When passing a _bare specifier_, the `package.json` at the root of
* the package is returned. When passing a _relative specifier_ or an _absolute specifier_,
* the closest parent `package.json` is returned.
* @param base The absolute location (`file:` URL string or FS path) of the
* containing module. For CJS, use `__filename` (not `__dirname`!); for ESM, use
* `import.meta.url`. You do not need to pass it if `specifier` is an _absolute specifier_.
* @returns A path if the `package.json` is found. When `startLocation`
* is a package, the package's root `package.json`; when a relative or unresolved, the closest
* `package.json` to the `startLocation`.
*/
function findPackageJSON(specifier: string | URL, base?: string | URL): string | undefined;
/**
* @since v18.6.0, v16.17.0
*/
function isBuiltin(moduleName: string): boolean;
interface RegisterOptions<Data> {
/**
* If you want to resolve `specifier` relative to a
* base URL, such as `import.meta.url`, you can pass that URL here. This
* property is ignored if the `parentURL` is supplied as the second argument.
* @default 'data:'
*/
parentURL?: string | URL | undefined;
/**
* Any arbitrary, cloneable JavaScript value to pass into the
* {@link initialize} hook.
*/
data?: Data | undefined;
/**
* [Transferable objects](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html#portpostmessagevalue-transferlist)
* to be passed into the `initialize` hook.
*/
transferList?: any[] | undefined;
}
/* eslint-disable @definitelytyped/no-unnecessary-generics */
/**
* Register a module that exports hooks that customize Node.js module
* resolution and loading behavior. See
* [Customization hooks](https://nodejs.org/docs/latest-v22.x/api/module.html#customization-hooks).
*
* This feature requires `--allow-worker` if used with the
* [Permission Model](https://nodejs.org/docs/latest-v22.x/api/permissions.html#permission-model).
* @since v20.6.0, v18.19.0
* @param specifier Customization hooks to be registered; this should be
* the same string that would be passed to `import()`, except that if it is
* relative, it is resolved relative to `parentURL`.
* @param parentURL f you want to resolve `specifier` relative to a base
* URL, such as `import.meta.url`, you can pass that URL here.
*/
function register<Data = any>(
specifier: string | URL,
parentURL?: string | URL,
options?: RegisterOptions<Data>,
): void;
function register<Data = any>(specifier: string | URL, options?: RegisterOptions<Data>): void;
interface RegisterHooksOptions {
/**
* See [load hook](https://nodejs.org/docs/latest-v22.x/api/module.html#loadurl-context-nextload).
* @default undefined
*/
load?: LoadHookSync | undefined;
/**
* See [resolve hook](https://nodejs.org/docs/latest-v22.x/api/module.html#resolvespecifier-context-nextresolve).
* @default undefined
*/
resolve?: ResolveHookSync | undefined;
}
interface ModuleHooks {
/**
* Deregister the hook instance.
*/
deregister(): void;
}
/**
* Register [hooks](https://nodejs.org/docs/latest-v22.x/api/module.html#customization-hooks)
* that customize Node.js module resolution and loading behavior.
* @since v22.15.0
* @experimental
*/
function registerHooks(options: RegisterHooksOptions): ModuleHooks;
interface StripTypeScriptTypesOptions {
/**
* Possible values are:
* * `'strip'` Only strip type annotations without performing the transformation of TypeScript features.
* * `'transform'` Strip type annotations and transform TypeScript features to JavaScript.
* @default 'strip'
*/
mode?: "strip" | "transform" | undefined;
/**
* Only when `mode` is `'transform'`, if `true`, a source map
* will be generated for the transformed code.
* @default false
*/
sourceMap?: boolean | undefined;
/**
* Specifies the source url used in the source map.
*/
sourceUrl?: string | undefined;
}
/**
* `module.stripTypeScriptTypes()` removes type annotations from TypeScript code. It
* can be used to strip type annotations from TypeScript code before running it
* with `vm.runInContext()` or `vm.compileFunction()`.
* By default, it will throw an error if the code contains TypeScript features
* that require transformation such as `Enums`,
* see [type-stripping](https://nodejs.org/docs/latest-v22.x/api/typescript.md#type-stripping) for more information.
* When mode is `'transform'`, it also transforms TypeScript features to JavaScript,
* see [transform TypeScript features](https://nodejs.org/docs/latest-v22.x/api/typescript.md#typescript-features) for more information.
* When mode is `'strip'`, source maps are not generated, because locations are preserved.
* If `sourceMap` is provided, when mode is `'strip'`, an error will be thrown.
*
* _WARNING_: The output of this function should not be considered stable across Node.js versions,
* due to changes in the TypeScript parser.
*
* ```js
* import { stripTypeScriptTypes } from 'node:module';
* const code = 'const a: number = 1;';
* const strippedCode = stripTypeScriptTypes(code);
* console.log(strippedCode);
* // Prints: const a = 1;
* ```
*
* If `sourceUrl` is provided, it will be used appended as a comment at the end of the output:
*
* ```js
* import { stripTypeScriptTypes } from 'node:module';
* const code = 'const a: number = 1;';
* const strippedCode = stripTypeScriptTypes(code, { mode: 'strip', sourceUrl: 'source.ts' });
* console.log(strippedCode);
* // Prints: const a = 1\n\n//# sourceURL=source.ts;
* ```
*
* When `mode` is `'transform'`, the code is transformed to JavaScript:
*
* ```js
* import { stripTypeScriptTypes } from 'node:module';
* const code = `
* namespace MathUtil {
* export const add = (a: number, b: number) => a + b;
* }`;
* const strippedCode = stripTypeScriptTypes(code, { mode: 'transform', sourceMap: true });
* console.log(strippedCode);
* // Prints:
* // var MathUtil;
* // (function(MathUtil) {
* // MathUtil.add = (a, b)=>a + b;
* // })(MathUtil || (MathUtil = {}));
* // # sourceMappingURL=data:application/json;base64, ...
* ```
* @since v22.13.0
* @param code The code to strip type annotations from.
* @returns The code with type annotations stripped.
*/
function stripTypeScriptTypes(code: string, options?: StripTypeScriptTypesOptions): string;
/* eslint-enable @definitelytyped/no-unnecessary-generics */
/**
* The `module.syncBuiltinESMExports()` method updates all the live bindings for
* builtin `ES Modules` to match the properties of the `CommonJS` exports. It
* does not add or remove exported names from the `ES Modules`.
*
* ```js
* import fs from 'node:fs';
* import assert from 'node:assert';
* import { syncBuiltinESMExports } from 'node:module';
*
* fs.readFile = newAPI;
*
* delete fs.readFileSync;
*
* function newAPI() {
* // ...
* }
*
* fs.newAPI = newAPI;
*
* syncBuiltinESMExports();
*
* import('node:fs').then((esmFS) => {
* // It syncs the existing readFile property with the new value
* assert.strictEqual(esmFS.readFile, newAPI);
* // readFileSync has been deleted from the required fs
* assert.strictEqual('readFileSync' in fs, false);
* // syncBuiltinESMExports() does not remove readFileSync from esmFS
* assert.strictEqual('readFileSync' in esmFS, true);
* // syncBuiltinESMExports() does not add names
* assert.strictEqual(esmFS.newAPI, undefined);
* });
* ```
* @since v12.12.0
*/
function syncBuiltinESMExports(): void;
interface ImportAttributes extends NodeJS.Dict<string> {
type?: string | undefined;
}
type ModuleFormat =
| "builtin"
| "commonjs"
| "commonjs-typescript"
| "json"
| "module"
| "module-typescript"
| "wasm";
type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray;
/**
* The `initialize` hook provides a way to define a custom function that runs in
* the hooks thread when the hooks module is initialized. Initialization happens
* when the hooks module is registered via {@link register}.
*
* This hook can receive data from a {@link register} invocation, including
* ports and other transferable objects. The return value of `initialize` can be a
* `Promise`, in which case it will be awaited before the main application thread
* execution resumes.
*/
type InitializeHook<Data = any> = (data: Data) => void | Promise<void>;
interface ResolveHookContext {
/**
* Export conditions of the relevant `package.json`
*/
conditions: string[];
/**
* An object whose key-value pairs represent the assertions for the module to import
*/
importAttributes: ImportAttributes;
/**
* The module importing this one, or undefined if this is the Node.js entry point
*/
parentURL: string | undefined;
}
interface ResolveFnOutput {
/**
* A hint to the load hook (it might be ignored); can be an intermediary value.
*/
format?: string | null | undefined;
/**
* The import attributes to use when caching the module (optional; if excluded the input will be used)
*/
importAttributes?: ImportAttributes | undefined;
/**
* A signal that this hook intends to terminate the chain of `resolve` hooks.
* @default false
*/
shortCircuit?: boolean | undefined;
/**
* The absolute URL to which this input resolves
*/
url: string;
}
/**
* The `resolve` hook chain is responsible for telling Node.js where to find and
* how to cache a given `import` statement or expression, or `require` call. It can
* optionally return a format (such as `'module'`) as a hint to the `load` hook. If
* a format is specified, the `load` hook is ultimately responsible for providing
* the final `format` value (and it is free to ignore the hint provided by
* `resolve`); if `resolve` provides a `format`, a custom `load` hook is required
* even if only to pass the value to the Node.js default `load` hook.
*/
type ResolveHook = (
specifier: string,
context: ResolveHookContext,
nextResolve: (
specifier: string,
context?: Partial<ResolveHookContext>,
) => ResolveFnOutput | Promise<ResolveFnOutput>,
) => ResolveFnOutput | Promise<ResolveFnOutput>;
type ResolveHookSync = (
specifier: string,
context: ResolveHookContext,
nextResolve: (
specifier: string,
context?: Partial<ResolveHookContext>,
) => ResolveFnOutput,
) => ResolveFnOutput;
interface LoadHookContext {
/**
* Export conditions of the relevant `package.json`
*/
conditions: string[];
/**
* The format optionally supplied by the `resolve` hook chain (can be an intermediary value).
*/
format: string | null | undefined;
/**
* An object whose key-value pairs represent the assertions for the module to import
*/
importAttributes: ImportAttributes;
}
interface LoadFnOutput {
format: string | null | undefined;
/**
* A signal that this hook intends to terminate the chain of `resolve` hooks.
* @default false
*/
shortCircuit?: boolean | undefined;
/**
* The source for Node.js to evaluate
*/
source?: ModuleSource | undefined;
}
/**
* The `load` hook provides a way to define a custom method of determining how a
* URL should be interpreted, retrieved, and parsed. It is also in charge of
* validating the import attributes.
*/
type LoadHook = (
url: string,
context: LoadHookContext,
nextLoad: (
url: string,
context?: Partial<LoadHookContext>,
) => LoadFnOutput | Promise<LoadFnOutput>,
) => LoadFnOutput | Promise<LoadFnOutput>;
type LoadHookSync = (
url: string,
context: LoadHookContext,
nextLoad: (
url: string,
context?: Partial<LoadHookContext>,
) => LoadFnOutput,
) => LoadFnOutput;
interface SourceMapsSupport {
/**
* If the source maps support is enabled
*/
enabled: boolean;
/**
* If the support is enabled for files in `node_modules`.
*/
nodeModules: boolean;
/**
* If the support is enabled for generated code from `eval` or `new Function`.
*/
generatedCode: boolean;
}
/**
* This method returns whether the [Source Map v3](https://tc39.es/ecma426/) support for stack
* traces is enabled.
* @since v22.14.0
*/
function getSourceMapsSupport(): SourceMapsSupport;
/**
* `path` is the resolved path for the file for which a corresponding source map
* should be fetched.
* @since v13.7.0, v12.17.0
* @return Returns `module.SourceMap` if a source map is found, `undefined` otherwise.
*/
function findSourceMap(path: string): SourceMap | undefined;
interface SetSourceMapsSupportOptions {
/**
* If enabling the support for files in `node_modules`.
* @default false
*/
nodeModules?: boolean | undefined;
/**
* If enabling the support for generated code from `eval` or `new Function`.
* @default false
*/
generatedCode?: boolean | undefined;
}
/**
* This function enables or disables the [Source Map v3](https://tc39.es/ecma426/) support for
* stack traces.
*
* It provides same features as launching Node.js process with commandline options
* `--enable-source-maps`, with additional options to alter the support for files
* in `node_modules` or generated codes.
*
* Only source maps in JavaScript files that are loaded after source maps has been
* enabled will be parsed and loaded. Preferably, use the commandline options
* `--enable-source-maps` to avoid losing track of source maps of modules loaded
* before this API call.
* @since v22.14.0
*/
function setSourceMapsSupport(enabled: boolean, options?: SetSourceMapsSupportOptions): void;
interface SourceMapConstructorOptions {
/**
* @since v21.0.0, v20.5.0
*/
lineLengths?: readonly number[] | undefined;
}
interface SourceMapPayload {
file: string;
version: number;
sources: string[];
sourcesContent: string[];
names: string[];
mappings: string;
sourceRoot: string;
}
interface SourceMapping {
generatedLine: number;
generatedColumn: number;
originalSource: string;
originalLine: number;
originalColumn: number;
}
interface SourceOrigin {
/**
* The name of the range in the source map, if one was provided
*/
name: string | undefined;
/**
* The file name of the original source, as reported in the SourceMap
*/
fileName: string;
/**
* The 1-indexed lineNumber of the corresponding call site in the original source
*/
lineNumber: number;
/**
* The 1-indexed columnNumber of the corresponding call site in the original source
*/
columnNumber: number;
}
/**
* @since v13.7.0, v12.17.0
*/
class SourceMap {
constructor(payload: SourceMapPayload, options?: SourceMapConstructorOptions);
/**
* Getter for the payload used to construct the `SourceMap` instance.
*/
readonly payload: SourceMapPayload;
/**
* Given a line offset and column offset in the generated source
* file, returns an object representing the SourceMap range in the
* original file if found, or an empty object if not.
*
* The object returned contains the following keys:
*
* The returned value represents the raw range as it appears in the
* SourceMap, based on zero-indexed offsets, _not_ 1-indexed line and
* column numbers as they appear in Error messages and CallSite
* objects.
*
* To get the corresponding 1-indexed line and column numbers from a
* lineNumber and columnNumber as they are reported by Error stacks
* and CallSite objects, use `sourceMap.findOrigin(lineNumber, columnNumber)`
* @param lineOffset The zero-indexed line number offset in the generated source
* @param columnOffset The zero-indexed column number offset in the generated source
*/
findEntry(lineOffset: number, columnOffset: number): SourceMapping | {};
/**
* Given a 1-indexed `lineNumber` and `columnNumber` from a call site in the generated source,
* find the corresponding call site location in the original source.
*
* If the `lineNumber` and `columnNumber` provided are not found in any source map,
* then an empty object is returned.
* @param lineNumber The 1-indexed line number of the call site in the generated source
* @param columnNumber The 1-indexed column number of the call site in the generated source
*/
findOrigin(lineNumber: number, columnNumber: number): SourceOrigin | {};
}
function runMain(main?: string): void;
function wrap(script: string): string;
}
global {
interface ImportMeta {
/**
* The directory name of the current module.
*
* This is the same as the `path.dirname()` of the `import.meta.filename`.
*
* > **Caveat**: only present on `file:` modules.
* @since v21.2.0, v20.11.0
*/
dirname: string;
/**
* The full absolute path and filename of the current module, with
* symlinks resolved.
*
* This is the same as the `url.fileURLToPath()` of the `import.meta.url`.
*
* > **Caveat** only local modules support this property. Modules not using the
* > `file:` protocol will not provide it.
* @since v21.2.0, v20.11.0
*/
filename: string;
/**
* The absolute `file:` URL of the module.
*
* This is defined exactly the same as it is in browsers providing the URL of the
* current module file.
*
* This enables useful patterns such as relative file loading:
*
* ```js
* import { readFileSync } from 'node:fs';
* const buffer = readFileSync(new URL('./data.proto', import.meta.url));
* ```
*/
url: string;
/**
* `import.meta.resolve` is a module-relative resolution function scoped to
* each module, returning the URL string.
*
* ```js
* const dependencyAsset = import.meta.resolve('component-lib/asset.css');
* // file:///app/node_modules/component-lib/asset.css
* import.meta.resolve('./dep.js');
* // file:///app/dep.js
* ```
*
* All features of the Node.js module resolution are supported. Dependency
* resolutions are subject to the permitted exports resolutions within the package.
*
* **Caveats**:
*
* * This can result in synchronous file-system operations, which
* can impact performance similarly to `require.resolve`.
* * This feature is not available within custom loaders (it would
* create a deadlock).
* @since v13.9.0, v12.16.0
* @param specifier The module specifier to resolve relative to the
* current module.
* @param parent An optional absolute parent module URL to resolve from.
* **Default:** `import.meta.url`
* @returns The absolute URL string that the specifier would resolve to.
*/
resolve(specifier: string, parent?: string | URL): string;
/**
* `true` when the current module is the entry point of the current process; `false` otherwise.
*
* Equivalent to `require.main === module` in CommonJS.
*
* Analogous to Python's `__name__ == "__main__"`.
*
* ```js
* export function foo() {
* return 'Hello, world';
* }
*
* function main() {
* const message = foo();
* console.log(message);
* }
*
* if (import.meta.main) main();
* // `foo` can be imported from another module without possible side-effects from `main`
* ```
* @since v22.18.0
* @experimental
*/
main: boolean;
}
namespace NodeJS {
interface Module {
/**
* The module objects required for the first time by this one.
* @since v0.1.16
*/
children: Module[];
/**
* The `module.exports` object is created by the `Module` system. Sometimes this is
* not acceptable; many want their module to be an instance of some class. To do
* this, assign the desired export object to `module.exports`.
* @since v0.1.16
*/
exports: any;
/**
* The fully resolved filename of the module.
* @since v0.1.16
*/
filename: string;
/**
* The identifier for the module. Typically this is the fully resolved
* filename.
* @since v0.1.16
*/
id: string;
/**
* `true` if the module is running during the Node.js preload
* phase.
* @since v15.4.0, v14.17.0
*/
isPreloading: boolean;
/**
* Whether or not the module is done loading, or is in the process of
* loading.
* @since v0.1.16
*/
loaded: boolean;
/**
* The module that first required this one, or `null` if the current module is the
* entry point of the current process, or `undefined` if the module was loaded by
* something that is not a CommonJS module (e.g. REPL or `import`).
* @since v0.1.16
* @deprecated Please use `require.main` and `module.children` instead.
*/
parent: Module | null | undefined;
/**
* The directory name of the module. This is usually the same as the
* `path.dirname()` of the `module.id`.
* @since v11.14.0
*/
path: string;
/**
* The search paths for the module.
* @since v0.4.0
*/
paths: string[];
/**
* The `module.require()` method provides a way to load a module as if
* `require()` was called from the original module.
* @since v0.5.1
*/
require(id: string): any;
}
interface Require {
/**
* Used to import modules, `JSON`, and local files.
* @since v0.1.13
*/
(id: string): any;
/**
* Modules are cached in this object when they are required. By deleting a key
* value from this object, the next `require` will reload the module.
* This does not apply to
* [native addons](https://nodejs.org/docs/latest-v22.x/api/addons.html),
* for which reloading will result in an error.
* @since v0.3.0
*/
cache: Dict<Module>;
/**
* Instruct `require` on how to handle certain file extensions.
* @since v0.3.0
* @deprecated
*/
extensions: RequireExtensions;
/**
* The `Module` object representing the entry script loaded when the Node.js
* process launched, or `undefined` if the entry point of the program is not a
* CommonJS module.
* @since v0.1.17
*/
main: Module | undefined;
/**
* @since v0.3.0
*/
resolve: RequireResolve;
}
/** @deprecated */
interface RequireExtensions extends Dict<(module: Module, filename: string) => any> {
".js": (module: Module, filename: string) => any;
".json": (module: Module, filename: string) => any;
".node": (module: Module, filename: string) => any;
}
interface RequireResolveOptions {
/**
* Paths to resolve module location from. If present, these
* paths are used instead of the default resolution paths, with the exception
* of
* [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v22.x/api/modules.html#loading-from-the-global-folders)
* like `$HOME/.node_modules`, which are
* always included. Each of these paths is used as a starting point for
* the module resolution algorithm, meaning that the `node_modules` hierarchy
* is checked from this location.
* @since v8.9.0
*/
paths?: string[] | undefined;
}
interface RequireResolve {
/**
* Use the internal `require()` machinery to look up the location of a module,
* but rather than loading the module, just return the resolved filename.
*
* If the module can not be found, a `MODULE_NOT_FOUND` error is thrown.
* @since v0.3.0
* @param request The module path to resolve.
*/
(request: string, options?: RequireResolveOptions): string;
/**
* Returns an array containing the paths searched during resolution of `request` or
* `null` if the `request` string references a core module, for example `http` or
* `fs`.
* @since v8.9.0
* @param request The module path whose lookup paths are being retrieved.
*/
paths(request: string): string[] | null;
}
}
/**
* The directory name of the current module. This is the same as the
* `path.dirname()` of the `__filename`.
* @since v0.1.27
*/
var __dirname: string;
/**
* The file name of the current module. This is the current module file's absolute
* path with symlinks resolved.
*
* For a main program this is not necessarily the same as the file name used in the
* command line.
* @since v0.0.1
*/
var __filename: string;
/**
* The `exports` variable is available within a module's file-level scope, and is
* assigned the value of `module.exports` before the module is evaluated.
* @since v0.1.16
*/
var exports: NodeJS.Module["exports"];
/**
* A reference to the current module.
* @since v0.1.16
*/
var module: NodeJS.Module;
/**
* @since v0.1.13
*/
var require: NodeJS.Require;
// Global-scope aliases for backwards compatibility with @types/node <13.0.x
/** @deprecated Use `NodeJS.Module` instead. */
interface NodeModule extends NodeJS.Module {}
/** @deprecated Use `NodeJS.Require` instead. */
interface NodeRequire extends NodeJS.Require {}
/** @deprecated Use `NodeJS.RequireResolve` instead. */
interface RequireResolve extends NodeJS.RequireResolve {}
}
export = Module;
}
declare module "node:module" {
import module = require("module");
export = module;
}
@@ -0,0 +1,65 @@
import * as Filesystem from "../filesystem";
import * as path from "path";
describe("filesystem", () => {
const fileThatExists = path.join(__dirname, "../../package.json");
const fileThatNotExists = path.join(__dirname, "../../package2.json");
it("should find file that exists, sync", () => {
const result = Filesystem.fileExistsSync(fileThatExists);
// assert.equal(result, true);
expect(result).toBe(true);
});
it("should not find file that not exists, sync", () => {
const result = Filesystem.fileExistsSync(fileThatNotExists);
// assert.equal(result, false);
expect(result).toBe(false);
});
it("should find file that exists, async", (done) => {
Filesystem.fileExistsAsync(fileThatExists, (_err, result) => {
try {
// assert.equal(result, true);
expect(result).toBe(true);
done();
} catch (error) {
done(error);
}
});
});
it("should not find file that not exists, async", (done) => {
Filesystem.fileExistsAsync(fileThatNotExists, (_err, result) => {
try {
// assert.equal(result, false);
expect(result).toBe(false);
done();
} catch (error) {
done(error);
}
});
});
it("should load json, sync", () => {
const result = Filesystem.readJsonFromDiskSync(fileThatExists);
// assert.isOk(result);
expect(result);
// assert.equal(result.main, "lib/index.js");
expect(result.main).toBe("lib/index.js");
});
it("should load json, async", (done) => {
Filesystem.readJsonFromDiskAsync(fileThatExists, (_err, result) => {
try {
// assert.isOk(result); // Asserts that object is truthy.
expect(result).toBeTruthy();
// assert.equal(result.main, "lib/index.js");
expect(result.main).toBe("lib/index.js");
done();
} catch (error) {
done(error);
}
});
});
});
@@ -0,0 +1,14 @@
'use strict';
module.exports = function generate_comment(it, $keyword, $ruleType) {
var out = ' ';
var $schema = it.schema[$keyword];
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $comment = it.util.toQuotedString($schema);
if (it.opts.$comment === true) {
out += ' console.log(' + ($comment) + ');';
} else if (typeof it.opts.$comment == 'function') {
out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);';
}
return out;
}
@@ -0,0 +1,138 @@
{
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"bugs": "https://github.com/syntax-tree/hast-util-to-jsx-runtime/issues",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
],
"dependencies": {
"@types/estree": "^1.0.0",
"@types/hast": "^3.0.0",
"@types/unist": "^3.0.0",
"comma-separated-tokens": "^2.0.0",
"devlop": "^1.0.0",
"estree-util-is-identifier-name": "^3.0.0",
"hast-util-whitespace": "^3.0.0",
"mdast-util-mdx-expression": "^2.0.0",
"mdast-util-mdx-jsx": "^3.0.0",
"mdast-util-mdxjs-esm": "^2.0.0",
"property-information": "^7.0.0",
"space-separated-tokens": "^2.0.0",
"style-to-js": "^1.0.0",
"unist-util-position": "^5.0.0",
"vfile-message": "^4.0.0"
},
"description": "hast utility to transform to preact, react, solid, svelte, vue, etc",
"devDependencies": {
"@types/node": "^22.0.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"c8": "^10.0.0",
"esbuild": "^0.25.0",
"estree-util-visit": "^2.0.0",
"hastscript": "^9.0.0",
"prettier": "^3.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"remark-cli": "^12.0.0",
"remark-preset-wooorm": "^11.0.0",
"sval": "^0.6.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"xo": "^0.60.0"
},
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
"index.js"
],
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"keywords": [
"hast-util",
"hast",
"html",
"preact",
"react",
"solid",
"svelte",
"unist",
"utility",
"util",
"vue"
],
"license": "MIT",
"name": "hast-util-to-jsx-runtime",
"prettier": {
"bracketSpacing": false,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false
},
"remarkConfig": {
"plugins": [
"remark-preset-wooorm"
]
},
"repository": "syntax-tree/hast-util-to-jsx-runtime",
"scripts": {
"build": "tsc --build --clean && tsc --build && type-coverage",
"format": "remark --frail --output --quiet -- . && prettier --log-level warn --write -- . && xo --fix",
"generate": "esbuild --bundle --format=esm --minify --outfile=example/hast-util-to-jsx-runtime.min.js --target=es2020 .",
"prepack": "npm run build && npm run format",
"test-api": "node --conditions development test/index.js",
"test-coverage": "c8 --100 --reporter lcov -- npm run test-api",
"test": "npm run generate && npm run build && npm run format && npm run test-coverage"
},
"sideEffects": false,
"typeCoverage": {
"atLeast": 100,
"detail": true,
"ignoreCatch": true,
"ignoreFiles": [
"example/**/*.js"
],
"strict": true
},
"type": "module",
"version": "2.3.6",
"xo": {
"overrides": [
{
"files": [
"**/*.d.ts"
],
"rules": {
"@typescript-eslint/array-type": [
"error",
{
"default": "generic"
}
],
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true
}
],
"@typescript-eslint/consistent-type-definitions": [
"error",
"interface"
]
}
}
],
"prettier": true,
"rules": {
"logical-assignment-operators": "off",
"unicorn/prefer-at": "off",
"unicorn/prefer-string-replace-all": "off",
"unicorn/prevent-abbreviations": "off"
}
}
}
@@ -0,0 +1,64 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const getESLintCoreRule_1 = require("../util/getESLintCoreRule");
const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-unused-expressions');
const defaultOptions = [
{
allowShortCircuit: false,
allowTaggedTemplates: false,
allowTernary: false,
},
];
exports.default = (0, util_1.createRule)({
name: 'no-unused-expressions',
meta: {
type: 'suggestion',
defaultOptions,
docs: {
description: 'Disallow unused expressions',
extendsBaseRule: true,
recommended: 'recommended',
},
hasSuggestions: baseRule.meta.hasSuggestions,
messages: baseRule.meta.messages,
schema: baseRule.meta.schema,
},
defaultOptions,
create(context, [{ allowShortCircuit = false, allowTernary = false }]) {
const rules = baseRule.create(context);
function isValidExpression(node) {
if (allowShortCircuit && node.type === utils_1.AST_NODE_TYPES.LogicalExpression) {
return isValidExpression(node.right);
}
if (allowTernary && node.type === utils_1.AST_NODE_TYPES.ConditionalExpression) {
return (isValidExpression(node.alternate) &&
isValidExpression(node.consequent));
}
return ((node.type === utils_1.AST_NODE_TYPES.ChainExpression &&
node.expression.type === utils_1.AST_NODE_TYPES.CallExpression) ||
node.type === utils_1.AST_NODE_TYPES.ImportExpression);
}
return {
ExpressionStatement(node) {
if (node.directive || isValidExpression(node.expression)) {
return;
}
const expressionType = node.expression.type;
if (expressionType ===
utils_1.TSESTree.AST_NODE_TYPES.TSInstantiationExpression ||
expressionType === utils_1.TSESTree.AST_NODE_TYPES.TSAsExpression ||
expressionType === utils_1.TSESTree.AST_NODE_TYPES.TSNonNullExpression ||
expressionType === utils_1.TSESTree.AST_NODE_TYPES.TSTypeAssertion) {
rules.ExpressionStatement({
...node,
expression: node.expression.expression,
});
return;
}
rules.ExpressionStatement(node);
},
};
},
});
@@ -0,0 +1,9 @@
export type Reviver = (key: unknown, value: unknown) => unknown;
/**
* Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,
* in section 24.5.1.1 "Runtime Semantics: InternalizeJSONProperty" of the
* 2021 edition: https://tc39.es/ecma262/#sec-json.parse
*
* Includes extensions for handling Map and Set objects.
*/
export declare function applyReviver(reviver: Reviver, obj: unknown, key: unknown, val: any): unknown;
@@ -0,0 +1,51 @@
import fs from 'node:fs';
import path from 'node:path';
import { CWD, EXTENSIONS, cjsRequire } from './constants.js';
export const tryPkg = (pkg) => {
try {
return cjsRequire.resolve(pkg);
}
catch (_a) { }
};
export const isPkgAvailable = (pkg) => !!tryPkg(pkg);
export const tryFile = (filename, includeDir = false, base = CWD) => {
if (typeof filename === 'string') {
const filepath = path.resolve(base, filename);
return fs.existsSync(filepath) &&
(includeDir || fs.statSync(filepath).isFile())
? filepath
: '';
}
for (const file of filename !== null && filename !== void 0 ? filename : []) {
const filepath = tryFile(file, includeDir, base);
if (filepath) {
return filepath;
}
}
return '';
};
export const tryExtensions = (filepath, extensions = EXTENSIONS) => {
const ext = [...extensions, ''].find(ext => tryFile(filepath + ext));
return ext == null ? '' : filepath + ext;
};
export const findUp = (searchEntry, searchFileOrIncludeDir, includeDir) => {
console.assert(path.isAbsolute(searchEntry));
if (!tryFile(searchEntry, true) ||
(searchEntry !== CWD && !searchEntry.startsWith(CWD + path.sep))) {
return '';
}
searchEntry = path.resolve(fs.statSync(searchEntry).isDirectory()
? searchEntry
: path.resolve(searchEntry, '..'));
const isSearchFile = typeof searchFileOrIncludeDir === 'string';
const searchFile = isSearchFile ? searchFileOrIncludeDir : 'package.json';
do {
const searched = tryFile(path.resolve(searchEntry, searchFile), isSearchFile && includeDir);
if (searched) {
return searched;
}
searchEntry = path.resolve(searchEntry, '..');
} while (searchEntry === CWD || searchEntry.startsWith(CWD + path.sep));
return '';
};
//# sourceMappingURL=helpers.js.map
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=BaseClassElementMetadata.js.map
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=overloaded-parameters.js.map
@@ -0,0 +1,106 @@
## Changelog
---
### 5.2.2
- Update packages and pin babel/types [#343](https://github.com/trivago/prettier-plugin-sort-imports/pull/343) by [@byara](https://github.com/byara)
### 5.2.1
- add svelte 5.x as peer dependency [#337](https://github.com/trivago/prettier-plugin-sort-imports/pull/337) by [@werner-drklein](https://github.com/werner-drklein)
### 5.2.0
- fix type import ordering [#331](https://github.com/trivago/prettier-plugin-sort-imports/pull/331) by [@rsslldnphy](https://github.com/rsslldnphy)
- Fix conditional import of prettier-plugin-svelte [#332](https://github.com/trivago/prettier-plugin-sort-imports/pull/332) by [@rsslldnphy](https://github.com/rsslldnphy)
### v5.1.0
- Fix svelte packages being required all the time [#327](https://github.com/trivago/prettier-plugin-sort-imports/pull/327) by [@byara](https://github.com/byara)
### v5.0.1
- Clean up unwanted packages and unpin dependencies [#322](https://github.com/trivago/prettier-plugin-sort-imports/pull/322) by [@byara](https://github.com/byara)
### v5.0.0
#### New features
- Type imports [#153](https://github.com/trivago/prettier-plugin-sort-imports/pull/153) by [Xenfo](https://github.com/broofa)
- Svelte support [#310](https://github.com/trivago/prettier-plugin-sort-imports/pull/310) by [canarddemagret](https://github.com/canarddemagret)
- Side effect import support [#320](https://github.com/trivago/prettier-plugin-sort-imports/pull/320) by [blutorange](https://github.com/blutorange) and [vladislavarsenev](https://github.com/vladislavarsenev)
- Fixed dollar sign group replace in Vue [#283](https://github.com/trivago/prettier-plugin-sort-imports/pull/283) by [adamDilger](https://github.com/adamDilger)
- Support `importOrderImportAttributesKeyword` [#273](https://github.com/trivago/prettier-plugin-sort-imports/pull/273) by [chentsulin](https://github.com/chentsulin)
### v4.3.0
#### New features
- added support for sort-imports-ignore [#237](https://github.com/trivago/prettier-plugin-sort-imports/pull/237) by [stephdotnet](https://github.com/stephdotnet)
- Upgrade node in CI to current and lts versions [#264](https://github.com/trivago/prettier-plugin-sort-imports/pull/264) by [harryzcy](https://github.com/harryzcy)
### v4.2.1
#### Chore
- Resolves Issue 262 - CVE-2023-45133 - upgrade to latest babel traverse [#266](https://github.com/trivago/prettier-plugin-sort-imports/pull/266) by [c-h-russell-walker](https://github.com/c-h-russell-walker)
### v4.2.0
#### Chore
- update prettier peer dependency semVer to include 3.x [#239](https://github.com/trivago/prettier-plugin-sort-imports/pull/239) by [basselworkforce](https://github.com/basselworkforce)
### v4.1.1
#### Revert
- Type imports[#153](https://github.com/trivago/prettier-plugin-sort-imports/pull/153) by [Xenfo](https://github.com/broofa)
### v4.1.0
#### New features
- Move @babel/core to devDependencies [#200](https://github.com/trivago/prettier-plugin-sort-imports/pull/200) by [yykamei](https://github.com/yykamei)
- Only preserve directives already at the start of the program [#198](https://github.com/trivago/prettier-plugin-sort-imports/pull/198) by [c-dante](https://github.com/c-dante)
- Bump babel to support satisfies keyword [#196](https://github.com/trivago/prettier-plugin-sort-imports/pull/196) by [Leomotors](https://github.com/Leomotors)
- Update prettier for TS 4.9 [#194](https://github.com/trivago/prettier-plugin-sort-imports/pull/194) by [taiwabisabi](https://github.com/taiwabisabi)
- Fixed empty/no script tag in vue component error [#192](https://github.com/trivago/prettier-plugin-sort-imports/pull/192) by [adamDilger](https://github.com/adamDilger)
- Change @vue/compiler-sfc to an optional dependency[#189](https://github.com/trivago/prettier-plugin-sort-imports/pull/189) by [transitive-bullshit](https://github.com/transitive-bullshit)
- Type imports[#153](https://github.com/trivago/prettier-plugin-sort-imports/pull/153) by [Xenfo](https://github.com/broofa)
### v4.0.0
#### New features
- Make @vue/compiler-sfc peer dependency [#183](https://github.com/trivago/prettier-plugin-sort-imports/pull/183) by [blake-newman](https://github.com/blake-newman)
- Keep script directives at top of file [#186](https://github.com/trivago/prettier-plugin-sort-imports/pull/186) by [broofa](https://github.com/broofa)
### v3.4.0
#### New features
- Vue JS support [#174](https://github.com/trivago/prettier-plugin-sort-imports/pull/174) by [blake-newman](https://github.com/blake-newman)
- Export config type [#173](https://github.com/trivago/prettier-plugin-sort-imports/pull/173) by [Leomotors](https://github.com/Leomotors)
### v3.3.1
#### Chores
- Update @babel/parser (to support TypeScript 4.7) [#161](https://github.com/trivago/prettier-plugin-sort-imports/pull/161) by [odiak](https://github.com/odiak)
### v3.3.0
#### Chores
- Update babel version [#134](https://github.com/trivago/prettier-plugin-sort-imports/pull/147) by [marvinroger](https://github.com/marvinroger)
- Fix typo in Migration docs [#158](https://github.com/trivago/prettier-plugin-sort-imports/pull/158) by [raineorshine](https://github.com/raineorshine)
### v3.2.0
#### New features
- Group Namespace specifiers [#105](https://github.com/trivago/prettier-plugin-sort-imports/pull/105) by [Mattinton](https://github.com/Mattinton)
#### Chores
- Clean up unit test and snapshot test
- Add contribution guidelines for bug fixes and new features
### v3.1.1
- Fixes package management [#100](https://github.com/trivago/prettier-plugin-sort-imports/issues/100)
### v3.1.0
#### Chores
- Update Babel parser to `7.14.6` [#79](https://github.com/trivago/prettier-plugin-sort-imports/pull/79) by [juanrgm](https://github.com/juanrgm)
- `.npmignore` cleanup [#96](https://github.com/trivago/prettier-plugin-sort-imports/issues/96) by [byara](https://github.com/byara)
- Remove npm badges in the README [#101](https://github.com/trivago/prettier-plugin-sort-imports/issues/101) by [byara](https://github.com/byara)
### v3.0.0
#### New features
- `<THIRD_PARTY_MODULES>` special word in import order to place third
party imports at desired place. [#65](https://github.com/trivago/prettier-plugin-sort-imports/pull/65) by [@risenforces](https://github.com/risenforces)
- `importOrderSortSpecifiers` option to sort the imports in an import declaration. [#72](https://github.com/trivago/prettier-plugin-sort-imports/pull/72) by [@ratierd](https://github.com/ratierd)
- `importOrderCaseInsensitive` option to control the case sensitivity [#69](https://github.com/trivago/prettier-plugin-sort-imports/pull/79) by [@timiles](https://github.com/timiles)
- `importOrderParserPlugins` option to pass plugins to babel parser [#88](https://github.com/trivago/prettier-plugin-sort-imports/pull/88) by [@saaryab](https://github.com/saaryab)
#### Breaking Changes
- Renaming of the `experimentalBabelParserPluginsList` to `importOrderParserPlugins`. by [@byara](https://github.com/byara)
@@ -0,0 +1,23 @@
{
"name": "napcat.protobuf",
"type": "module",
"version": "1.1.4",
"exports": {
".": {
"import": {
"default": "./protobuf.js"
},
"require": {
"default": "./protobuf.cjs"
}
},
"./*": "./*"
},
"files": [
"./**/*"
],
"types": "./protobuf.d.ts",
"dependencies": {
"@protobuf-ts/runtime": "^2.9.4"
}
}
@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkM3H36CX2js = require('./chunk-M3H36CX2.js');var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);var R={load:async(e,r)=>{if(await _chunkM3H36CX2js.c.call(void 0, e)){let t=await _fs2.default.promises.readFile(e);return r==null||r(t),t}else throw new Error(`Can't read from ${e}`)},save:async(e,r,t)=>{if(await _chunkM3H36CX2js.c.call(void 0, e))await _fs2.default.promises.writeFile(e,r),t==null||t();else throw new Error(`Can't write to ${e}`)},loadW:async(e,r)=>{let t=await _chunkM3H36CX2js.d.call(void 0, {method:5,path:e});return r==null||r(Buffer.from(t)),Buffer.from(t)},saveW:async(e,r,t)=>{let o=new Uint8Array(new SharedArrayBuffer(r.byteLength));o.set(r),await _chunkM3H36CX2js.d.call(void 0, {method:6,path:e,data:o,callback:t})}},O= exports.a =R;var _path = require('path'); var _path2 = _interopRequireDefault(_path);var _os = require('os'); var _os2 = _interopRequireDefault(_os);function _(e){let r={cwd:process.cwd(),relative:!0,...typeof e=="string"?{cwd:e}:e},t=[],o=r.cwd,s,i=!1;do if(o.charAt(0)==="~"&&(o=B(o)),o.charAt(0)==="@"&&(o=_path2.default.join(E||(E=v?_path2.default.resolve(c||(c=C()),"node_modules"):_path2.default.resolve(c||(c=C()),"lib/node_modules")),o.slice(1))),s=b(o),s){let n=r.relative?_path2.default.relative(r.cwd,s):s;i=t.indexOf(n)>-1,i||(t.push(n),o=_path2.default.join(s,"../../"))}while(s&&!i);return t}function b(e){let r=_path2.default.resolve(e,"node_modules"),t=_fs2.default.existsSync(r)?_path2.default.resolve(r):null;if(t)return t;let o=_path2.default.dirname(e);return o===e?null:b(o)}var E,c;function C(){if(process.env.PREFIX)c=process.env.PREFIX;else if(c=A(_path2.default.resolve(_os2.default.homedir(),".npmrc")),!c){try{c=A(_path2.default.resolve(I(),"..","..","npmrc")),c&&(c=A(_path2.default.resolve(c,"etc","npmrc"))||c)}catch (e2){}c||(v?c=process.env.APPDATA?_path2.default.join(process.env.APPDATA,"npm"):_path2.default.dirname(process.execPath):(c=_path2.default.dirname(_path2.default.dirname(process.execPath)),process.env.DESTDIR&&(c=_path2.default.join(process.env.DESTDIR,c))))}return c?B(c):""}function A(e){var r;try{return(r=F(_fs2.default.readFileSync(e,"utf-8")))==null?void 0:r.prefix}catch (e3){return null}}function F(e){let r=Object.create(null),t=r,o=null;for(let i of e.split(/[\r\n]+/g)){if(!i||i.match(/^\s*[;#]/))continue;let n=i.match(/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i);if(!n)continue;if(n[1]!==void 0){if(o=P(n[1]),o==="__proto__"){t=Object.create(null);continue}t=r[o]=r[o]||Object.create(null);continue}let u=P(n[2]||""),d=u.length>2&&u.slice(-2)==="[]",l=d?u.slice(0,-2):u;if(l==="__proto__")continue;let a=n[3]?P(n[4]||""):!0,x=a==="true"||a==="false"||a==="null"?JSON.parse(a):a;d&&(Object.hasOwnProperty.call(t,l)?Array.isArray(t[l])||(t[l]=[t[l]]):t[l]=[]),Array.isArray(t[l])?t[l].push(x):t[l]=x}let s=[];for(let i of Object.keys(r)){if(!Object.hasOwnProperty.call(r,i)||typeof r[i]!="object"||Array.isArray(r[i]))continue;let n=i.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(a=>a.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")),u=r,d=n.pop()||"",l=d.replace(/\\\./g,".");for(let a of n)a!=="__proto__"&&((!Object.hasOwnProperty.call(u,a)||typeof u[a]!="object")&&(u[a]=Object.create(null)),u=u[a]);u===r&&l===d||(u[l]=r[i],s.push(i))}return s.forEach(i=>delete r[i]),r}function P(e){e=e.trim();let r=e.charAt(0),t=e.charAt(e.length-1);if(r==='"'&&t==='"'||r==="'"&&t==="'"){e=r==="'"?e.substr(1,e.length-2):e;try{return JSON.parse(e)}catch (e4){}}else{let o=!1,s="";for(let i=0;i<e.length;i++){let n=e.charAt(i);if(o)"\\;#".indexOf(n)!==-1?s+=n:s+="\\"+n,o=!1;else{if(";#".indexOf(n)!==-1)break;n==="\\"?o=!0:s+=n}}return o&&(s+="\\"),s.trim()}return e}var B=e=>e.charAt(0)==="~"?e.charAt(1)==="+"?_path2.default.join(process.cwd(),e.slice(2)):_path2.default.join(_os2.default.homedir(),e.slice(1)):e,v=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";function I(){let e=(process.env.PATH||"").split(v?";":":"),r=[""];v&&(e.unshift(process.cwd()),r=(process.env.PATHEXT||".EXE;.CMD;.BAT;.COM").split(";"));for(let t of e){let o=_path2.default.join(t.charAt(0)==='"'&&t.slice(-1)==='"'?t.slice(1,-1):t,"npm");for(let s of r)if(M(o+s))return _fs2.default.realpathSync(o+s)}throw new Error("Can't find npm file")}function M(e){try{return(v?r=>{let t=_fs2.default.statSync(r);if(!t.isSymbolicLink()&&!t.isFile())return!1;if(!process.env.PATHEXT)return!0;let o=process.env.PATHEXT.split(";");if(o.indexOf("")!==-1)return!0;for(let s of o){let i=s.toLowerCase();if(i&&r.substr(-i.length).toLowerCase()===i)return!0}return!1}:r=>{let{mode:t,gid:o,uid:s,isFile:i}=_fs2.default.statSync(r);return i()&&(t&1||t&2&&o===process.getgid()||t&4&&s===process.getuid()||t&6&&process.getuid()===0)})(e)}catch (e5){return!1}}var X={mkS:e=>{_chunkLine truncated
@@ -0,0 +1 @@
{"name":"punycode","version":"2.3.1","requiresBuild":false,"files":{"punycode.es6.js":{"checkedAt":1794532093082,"integrity":"sha512-29y6LV1NVv7EgzIFDDj2Xno+6gtjkROdJ/+w1JKFGukjudYxhycqADkBWrJ/ytP7xMIVP7xkKtLFJeR8N0xocA==","mode":420,"size":12780},"punycode.js":{"checkedAt":1794532093083,"integrity":"sha512-yIxRBg+triSRDRItZeINUw58keNQxToni/rGa4XhykuXaBLUfHKNKz3AEVDr2WUABXgRO0SwIeqeN83jP3wReQ==","mode":420,"size":12711},"package.json":{"checkedAt":1794532093083,"integrity":"sha512-GGQMv5M+N86DxtdImY2AmPAi2zLBNBdnKgSlVEuioZCogghYifDD3x1lAObB1GtLrj2HdQFcRGCG2hT6b5NTxQ==","mode":420,"size":1227},"README.md":{"checkedAt":1794532093083,"integrity":"sha512-C0vi6/nPcxTsJih6h//DKm+NG2CgNeNSA0sTPecq+wOSERMQGkqLWnCYrAcOX8SR6GffAAy6Y2ORvblKzWoRlg==","mode":420,"size":5719},"LICENSE-MIT.txt":{"checkedAt":1794532093083,"integrity":"sha512-fWtEu2WGJSgbSBlOWj06B0Ur6h8lZQbdFveiGUHvPw0lnhvNDMYgJkK/H9EpvBh+ajkh04LVaNMSvYPzAjl5oA==","mode":420,"size":1077}}}
@@ -0,0 +1,206 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
const path = require("path");
const globParent = require("glob-parent");
const micromatch = require("micromatch");
const GLOBSTAR = '**';
const ESCAPE_SYMBOL = '\\';
const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/;
const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
const BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
/**
* Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string.
* The latter is due to the presence of the device path at the beginning of the UNC path.
*/
const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
function isStaticPattern(pattern, options = {}) {
return !isDynamicPattern(pattern, options);
}
exports.isStaticPattern = isStaticPattern;
function isDynamicPattern(pattern, options = {}) {
/**
* A special case with an empty string is necessary for matching patterns that start with a forward slash.
* An empty string cannot be a dynamic pattern.
* For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.
*/
if (pattern === '') {
return false;
}
/**
* When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
* filepath directly (without read directory).
*/
if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {
return true;
}
if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {
return true;
}
if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {
return true;
}
if (options.braceExpansion !== false && hasBraceExpansion(pattern)) {
return true;
}
return false;
}
exports.isDynamicPattern = isDynamicPattern;
function hasBraceExpansion(pattern) {
const openingBraceIndex = pattern.indexOf('{');
if (openingBraceIndex === -1) {
return false;
}
const closingBraceIndex = pattern.indexOf('}', openingBraceIndex + 1);
if (closingBraceIndex === -1) {
return false;
}
const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex);
return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent);
}
function convertToPositivePattern(pattern) {
return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
}
exports.convertToPositivePattern = convertToPositivePattern;
function convertToNegativePattern(pattern) {
return '!' + pattern;
}
exports.convertToNegativePattern = convertToNegativePattern;
function isNegativePattern(pattern) {
return pattern.startsWith('!') && pattern[1] !== '(';
}
exports.isNegativePattern = isNegativePattern;
function isPositivePattern(pattern) {
return !isNegativePattern(pattern);
}
exports.isPositivePattern = isPositivePattern;
function getNegativePatterns(patterns) {
return patterns.filter(isNegativePattern);
}
exports.getNegativePatterns = getNegativePatterns;
function getPositivePatterns(patterns) {
return patterns.filter(isPositivePattern);
}
exports.getPositivePatterns = getPositivePatterns;
/**
* Returns patterns that can be applied inside the current directory.
*
* @example
* // ['./*', '*', 'a/*']
* getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])
*/
function getPatternsInsideCurrentDirectory(patterns) {
return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern));
}
exports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;
/**
* Returns patterns to be expanded relative to (outside) the current directory.
*
* @example
* // ['../*', './../*']
* getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])
*/
function getPatternsOutsideCurrentDirectory(patterns) {
return patterns.filter(isPatternRelatedToParentDirectory);
}
exports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;
function isPatternRelatedToParentDirectory(pattern) {
return pattern.startsWith('..') || pattern.startsWith('./..');
}
exports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;
function getBaseDirectory(pattern) {
return globParent(pattern, { flipBackslashes: false });
}
exports.getBaseDirectory = getBaseDirectory;
function hasGlobStar(pattern) {
return pattern.includes(GLOBSTAR);
}
exports.hasGlobStar = hasGlobStar;
function endsWithSlashGlobStar(pattern) {
return pattern.endsWith('/' + GLOBSTAR);
}
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
function isAffectDepthOfReadingPattern(pattern) {
const basename = path.basename(pattern);
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
}
exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
function expandPatternsWithBraceExpansion(patterns) {
return patterns.reduce((collection, pattern) => {
return collection.concat(expandBraceExpansion(pattern));
}, []);
}
exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
function expandBraceExpansion(pattern) {
const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
/**
* Sort the patterns by length so that the same depth patterns are processed side by side.
* `a/{b,}/{c,}/*` – `['a///*', 'a/b//*', 'a//c/*', 'a/b/c/*']`
*/
patterns.sort((a, b) => a.length - b.length);
/**
* Micromatch can return an empty string in the case of patterns like `{a,}`.
*/
return patterns.filter((pattern) => pattern !== '');
}
exports.expandBraceExpansion = expandBraceExpansion;
function getPatternParts(pattern, options) {
let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true }));
/**
* The scan method returns an empty array in some cases.
* See micromatch/picomatch#58 for more details.
*/
if (parts.length === 0) {
parts = [pattern];
}
/**
* The scan method does not return an empty part for the pattern with a forward slash.
* This is another part of micromatch/picomatch#58.
*/
if (parts[0].startsWith('/')) {
parts[0] = parts[0].slice(1);
parts.unshift('');
}
return parts;
}
exports.getPatternParts = getPatternParts;
function makeRe(pattern, options) {
return micromatch.makeRe(pattern, options);
}
exports.makeRe = makeRe;
function convertPatternsToRe(patterns, options) {
return patterns.map((pattern) => makeRe(pattern, options));
}
exports.convertPatternsToRe = convertPatternsToRe;
function matchAny(entry, patternsRe) {
return patternsRe.some((patternRe) => patternRe.test(entry));
}
exports.matchAny = matchAny;
/**
* This package only works with forward slashes as a path separator.
* Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes.
*/
function removeDuplicateSlashes(pattern) {
return pattern.replace(DOUBLE_SLASH_RE, '/');
}
exports.removeDuplicateSlashes = removeDuplicateSlashes;
function partitionAbsoluteAndRelative(patterns) {
const absolute = [];
const relative = [];
for (const pattern of patterns) {
if (isAbsolute(pattern)) {
absolute.push(pattern);
}
else {
relative.push(pattern);
}
}
return [absolute, relative];
}
exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
function isAbsolute(pattern) {
return path.isAbsolute(pattern);
}
exports.isAbsolute = isAbsolute;
@@ -0,0 +1,2 @@
import type { Disabled } from '../types';
export declare function normalizeDisabled(disabled: boolean | Disabled): Disabled;
@@ -0,0 +1,8 @@
function _isNativeFunction(t) {
try {
return -1 !== Function.toString.call(t).indexOf("[native code]");
} catch (n) {
return "function" == typeof t;
}
}
module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,45 @@
var $aaa611146751592e$exports = require("./domHelpers.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "isElementVisible", () => $a333d78d58ab4731$export$e989c0fffaa6b27a);
/*
* 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.
*/
const $a333d78d58ab4731$var$supportsCheckVisibility = typeof Element !== 'undefined' && 'checkVisibility' in Element.prototype;
function $a333d78d58ab4731$var$isStyleVisible(element) {
const windowObject = (0, $aaa611146751592e$exports.getOwnerWindow)(element);
if (!(element instanceof windowObject.HTMLElement) && !(element instanceof windowObject.SVGElement)) return false;
let { display: display, visibility: visibility } = element.style;
let isVisible = display !== 'none' && visibility !== 'hidden' && visibility !== 'collapse';
if (isVisible) {
const { getComputedStyle: getComputedStyle } = element.ownerDocument.defaultView;
let { display: computedDisplay, visibility: computedVisibility } = getComputedStyle(element);
isVisible = computedDisplay !== 'none' && computedVisibility !== 'hidden' && computedVisibility !== 'collapse';
}
return isVisible;
}
function $a333d78d58ab4731$var$isAttributeVisible(element, childElement) {
return !element.hasAttribute('hidden') && // Ignore HiddenSelect when tree walking.
!element.hasAttribute('data-react-aria-prevent-focus') && (element.nodeName === 'DETAILS' && childElement && childElement.nodeName !== 'SUMMARY' ? element.hasAttribute('open') : true);
}
function $a333d78d58ab4731$export$e989c0fffaa6b27a(element, childElement) {
if ($a333d78d58ab4731$var$supportsCheckVisibility) return element.checkVisibility({
visibilityProperty: true
}) && !element.closest('[data-react-aria-prevent-focus]');
return element.nodeName !== '#comment' && $a333d78d58ab4731$var$isStyleVisible(element) && $a333d78d58ab4731$var$isAttributeVisible(element, childElement) && (!element.parentElement || $a333d78d58ab4731$export$e989c0fffaa6b27a(element.parentElement, element));
}
//# sourceMappingURL=isElementVisible.main.js.map
@@ -0,0 +1,27 @@
import { ReactElement } from 'react';
import { UseListboxProps } from './use-listbox.js';
import 'tailwind-variants';
import '@heroui/system';
import '@react-types/shared';
import '@react-aria/listbox';
import '@heroui/theme';
import '@react-stately/list';
import '@heroui/react-utils';
import './listbox-item.js';
import 'react/jsx-runtime';
import './use-listbox-item.js';
import './base/listbox-item-base.js';
import '@heroui/aria-utils';
interface VirtualizationProps {
maxListboxHeight: number;
itemHeight: number;
}
interface Props<T> extends UseListboxProps<T> {
isVirtualized?: boolean;
virtualization?: VirtualizationProps;
}
type ListboxProps<T extends object = object> = Props<T>;
declare const Listbox: <T extends object>(props: ListboxProps<T>) => ReactElement;
export { ListboxProps, VirtualizationProps, Listbox as default };
@@ -0,0 +1,35 @@
import { OneBotAction } from '../../action/OneBotAction';
import { Static } from '@sinclair/typebox';
export declare const GetCookiesPayloadSchema: import("@sinclair/typebox").TObject<{
domain: import("@sinclair/typebox").TString;
}>;
export type GetCookiesPayload = Static<typeof GetCookiesPayloadSchema>;
export declare const GetCookiesReturnSchema: import("@sinclair/typebox").TObject<{
cookies: import("@sinclair/typebox").TString;
bkn: import("@sinclair/typebox").TString;
}>;
export type GetCookiesResponse = Static<typeof GetCookiesReturnSchema>;
export declare class GetCookies extends OneBotAction<GetCookiesPayload, GetCookiesResponse> {
actionName: "get_cookies";
payloadSchema: import("@sinclair/typebox").TObject<{
domain: import("@sinclair/typebox").TString;
}>;
returnSchema: import("@sinclair/typebox").TObject<{
cookies: import("@sinclair/typebox").TString;
bkn: import("@sinclair/typebox").TString;
}>;
actionSummary: string;
actionDescription: string;
actionTags: string[];
payloadExample: {
domain: string;
};
returnExample: {
cookies: string;
bkn: string;
};
_handle(payload: GetCookiesPayload): Promise<{
cookies: string;
bkn: string;
}>;
}
@@ -0,0 +1 @@
{"version":3,"file":"CacheBindingInvalidation.js","sourceRoot":"","sources":["../../../../src/planning/models/CacheBindingInvalidation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,133 @@
export * from './utils.cjs';
type ScrollDirection = 'forward' | 'backward';
type ScrollAlignment = 'start' | 'center' | 'end' | 'auto';
type ScrollBehavior = 'auto' | 'smooth';
export interface ScrollToOptions {
align?: ScrollAlignment;
behavior?: ScrollBehavior;
}
type ScrollToOffsetOptions = ScrollToOptions;
type ScrollToIndexOptions = ScrollToOptions;
export interface Range {
startIndex: number;
endIndex: number;
overscan: number;
count: number;
}
type Key = number | string | bigint;
export interface VirtualItem {
key: Key;
index: number;
start: number;
end: number;
size: number;
lane: number;
}
export interface Rect {
width: number;
height: number;
}
export declare const defaultKeyExtractor: (index: number) => number;
export declare const defaultRangeExtractor: (range: Range) => number[];
export declare const observeElementRect: <T extends Element>(instance: Virtualizer<T, any>, cb: (rect: Rect) => void) => (() => void) | undefined;
export declare const observeWindowRect: (instance: Virtualizer<Window, any>, cb: (rect: Rect) => void) => (() => void) | undefined;
type ObserveOffsetCallBack = (offset: number, isScrolling: boolean) => void;
export declare const observeElementOffset: <T extends Element>(instance: Virtualizer<T, any>, cb: ObserveOffsetCallBack) => (() => void) | undefined;
export declare const observeWindowOffset: (instance: Virtualizer<Window, any>, cb: ObserveOffsetCallBack) => (() => void) | undefined;
export declare const measureElement: <TItemElement extends Element>(element: TItemElement, entry: ResizeObserverEntry | undefined, instance: Virtualizer<any, TItemElement>) => number;
export declare const windowScroll: <T extends Window>(offset: number, { adjustments, behavior, }: {
adjustments?: number | undefined;
behavior?: ScrollBehavior | undefined;
}, instance: Virtualizer<T, any>) => void;
export declare const elementScroll: <T extends Element>(offset: number, { adjustments, behavior, }: {
adjustments?: number | undefined;
behavior?: ScrollBehavior | undefined;
}, instance: Virtualizer<T, any>) => void;
export interface VirtualizerOptions<TScrollElement extends Element | Window, TItemElement extends Element> {
count: number;
getScrollElement: () => TScrollElement | null;
estimateSize: (index: number) => number;
scrollToFn: (offset: number, options: {
adjustments?: number;
behavior?: ScrollBehavior;
}, instance: Virtualizer<TScrollElement, TItemElement>) => void;
observeElementRect: (instance: Virtualizer<TScrollElement, TItemElement>, cb: (rect: Rect) => void) => void | (() => void);
observeElementOffset: (instance: Virtualizer<TScrollElement, TItemElement>, cb: ObserveOffsetCallBack) => void | (() => void);
debug?: boolean;
initialRect?: Rect;
onChange?: (instance: Virtualizer<TScrollElement, TItemElement>, sync: boolean) => void;
measureElement?: (element: TItemElement, entry: ResizeObserverEntry | undefined, instance: Virtualizer<TScrollElement, TItemElement>) => number;
overscan?: number;
horizontal?: boolean;
paddingStart?: number;
paddingEnd?: number;
scrollPaddingStart?: number;
scrollPaddingEnd?: number;
initialOffset?: number | (() => number);
getItemKey?: (index: number) => Key;
rangeExtractor?: (range: Range) => Array<number>;
scrollMargin?: number;
gap?: number;
indexAttribute?: string;
initialMeasurementsCache?: Array<VirtualItem>;
lanes?: number;
isScrollingResetDelay?: number;
useScrollendEvent?: boolean;
enabled?: boolean;
isRtl?: boolean;
}
export declare class Virtualizer<TScrollElement extends Element | Window, TItemElement extends Element> {
private unsubs;
options: Required<VirtualizerOptions<TScrollElement, TItemElement>>;
scrollElement: TScrollElement | null;
targetWindow: (Window & typeof globalThis) | null;
isScrolling: boolean;
private scrollToIndexTimeoutId;
measurementsCache: Array<VirtualItem>;
private itemSizeCache;
private pendingMeasuredCacheIndexes;
scrollRect: Rect | null;
scrollOffset: number | null;
scrollDirection: ScrollDirection | null;
private scrollAdjustments;
shouldAdjustScrollPositionOnItemSizeChange: undefined | ((item: VirtualItem, delta: number, instance: Virtualizer<TScrollElement, TItemElement>) => boolean);
elementsCache: Map<Key, TItemElement>;
private observer;
range: {
startIndex: number;
endIndex: number;
} | null;
constructor(opts: VirtualizerOptions<TScrollElement, TItemElement>);
setOptions: (opts: VirtualizerOptions<TScrollElement, TItemElement>) => void;
private notify;
private maybeNotify;
private cleanup;
_didMount: () => () => void;
_willUpdate: () => void;
private getSize;
private getScrollOffset;
private getFurthestMeasurement;
private getMeasurementOptions;
private getMeasurements;
calculateRange: () => {
startIndex: number;
endIndex: number;
} | null;
private getIndexes;
indexFromElement: (node: TItemElement) => number;
private _measureElement;
resizeItem: (index: number, size: number) => void;
measureElement: (node: TItemElement | null | undefined) => void;
getVirtualItems: () => VirtualItem[];
getVirtualItemForOffset: (offset: number) => VirtualItem | undefined;
getOffsetForAlignment: (toOffset: number, align: ScrollAlignment) => number;
getOffsetForIndex: (index: number, align?: ScrollAlignment) => readonly [number, "auto"] | readonly [number, "center"] | readonly [number, "end"] | readonly [number, "start"] | undefined;
private isDynamicMode;
private cancelScrollToIndex;
scrollToOffset: (toOffset: number, { align, behavior }?: ScrollToOffsetOptions) => void;
scrollToIndex: (index: number, { align: initialAlign, behavior }?: ScrollToIndexOptions) => void;
scrollBy: (delta: number, { behavior }?: ScrollToOffsetOptions) => void;
getTotalSize: () => number;
private _scrollToOffset;
measure: () => void;
}
@@ -0,0 +1 @@
module.exports={C:{"4":0.05708,"52":0.00571,"78":0.00571,"115":0.02283,"128":0.00571,"133":0.00571,"136":0.01712,"139":0.01712,"140":0.02854,"141":0.00571,"142":0.01712,"143":0.2854,"144":0.30252,"145":0.01712,_:"2 3 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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 125 126 127 129 130 131 132 134 135 137 138 146 147 3.5 3.6"},D:{"39":0.01712,"40":0.01712,"41":0.01712,"42":0.01712,"43":0.01712,"44":0.01712,"45":0.01712,"46":0.01712,"47":0.02283,"48":0.04566,"49":0.01712,"50":0.01712,"51":0.01712,"52":0.01712,"53":0.01712,"54":0.01712,"55":0.01712,"56":0.01712,"57":0.01712,"58":0.01712,"59":0.01712,"60":0.01712,"72":0.00571,"73":0.00571,"75":0.00571,"76":0.00571,"77":0.00571,"79":0.01712,"85":0.00571,"86":0.00571,"87":0.01142,"88":0.00571,"91":0.00571,"93":0.02854,"94":0.00571,"95":0.00571,"97":0.00571,"102":0.00571,"103":0.03996,"104":0.02283,"107":0.00571,"108":0.00571,"109":0.39385,"110":0.01712,"111":0.00571,"112":12.22083,"114":0.00571,"116":0.05137,"119":0.02283,"120":0.01142,"121":0.01142,"122":0.02854,"123":0.00571,"124":0.01142,"125":13.40809,"126":0.95324,"127":0.03425,"128":0.09704,"129":0.02854,"130":0.01142,"131":0.05137,"132":0.03425,"133":0.02854,"134":0.02283,"135":0.05708,"136":0.04566,"137":0.09133,"138":0.34819,"139":0.30252,"140":3.7787,"141":11.39888,"142":0.17695,"143":0.00571,_:"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 66 67 68 69 70 71 74 78 80 81 83 84 89 90 92 96 98 99 100 101 105 106 113 115 117 118 144 145"},F:{"69":0.00571,"92":0.00571,"95":0.00571,"114":0.00571,"120":0.09704,"121":0.10845,"122":1.24434,_:"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 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 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:{"18":0.00571,"85":0.00571,"92":0.02283,"100":0.00571,"109":0.00571,"114":0.12558,"122":0.00571,"131":0.02283,"132":0.00571,"133":0.00571,"134":0.04566,"135":0.00571,"136":0.01712,"137":0.00571,"138":0.02283,"139":0.03996,"140":0.63359,"141":3.17936,"142":0.00571,_:"12 13 14 15 16 17 79 80 81 83 84 86 87 88 89 90 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 120 121 123 124 125 126 127 128 129 130"},E:{"4":0.00571,_:"0 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 15.2-15.3 15.4 15.5 16.0 16.4 26.2","5.1":0.00571,"13.1":0.01142,"14.1":0.01712,"15.1":0.00571,"15.6":0.03996,"16.1":0.00571,"16.2":0.01142,"16.3":0.00571,"16.5":0.00571,"16.6":0.08562,"17.0":0.00571,"17.1":0.01712,"17.2":0.00571,"17.3":0.00571,"17.4":0.01142,"17.5":0.03425,"17.6":0.14841,"18.0":0.04566,"18.1":0.02854,"18.2":0.00571,"18.3":0.02854,"18.4":0.02283,"18.5-18.6":0.07991,"26.0":0.33106,"26.1":0.03425},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00168,"5.0-5.1":0,"6.0-6.1":0.00674,"7.0-7.1":0.00505,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.01516,"10.0-10.2":0.00168,"10.3":0.02864,"11.0-11.2":0.42452,"11.3-11.4":0.01011,"12.0-12.1":0.00337,"12.2-12.5":0.08255,"13.0-13.1":0,"13.2":0.00842,"13.3":0.00337,"13.4-13.7":0.01348,"14.0-14.4":0.02864,"14.5-14.8":0.03032,"15.0-15.1":0.02864,"15.2-15.3":0.0219,"15.4":0.02527,"15.5":0.02864,"15.6-15.8":0.37398,"16.0":0.05054,"16.1":0.09434,"16.2":0.04885,"16.3":0.0876,"16.4":0.0219,"16.5":0.03875,"16.6-16.7":0.50033,"17.0":0.03538,"17.1":0.05391,"17.2":0.03875,"17.3":0.05728,"17.4":0.10108,"17.5":0.17351,"17.6-17.7":0.438,"18.0":0.09939,"18.1":0.20552,"18.2":0.11118,"18.3":0.35714,"18.4":0.18362,"18.5-18.6":9.36306,"26.0":1.15733,"26.1":0.04212},P:{"4":0.01073,"21":0.01073,"22":0.01073,"24":0.01073,"25":0.01073,"26":0.03219,"27":0.03219,"28":0.60088,"29":0.07511,_:"20 23 5.0-5.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","6.2-6.4":0.02146,"7.2-7.4":0.02146},I:{"0":0.01714,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":0.12447,_:"10 11 12 11.1 11.5 12.1"},A:{"6":0.01649,"7":0.01649,"8":0.05771,"9":0.01649,"10":0.03298,"11":0.00824,_:"5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.07296},Q:{_:"14.9"},O:{"0":0.01288},H:{"0":0},L:{"0":27.97221}};
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,oBAAoB,CAAC,6GAA6D,CAAC;AACvG","sources":["packages/@react-aria/menu/intl/tr-TR.json"],"sourcesContent":["{\n \"longPressMessage\": \"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın\"\n}\n"],"names":[],"version":3,"file":"tr-TR.module.js.map"}
@@ -0,0 +1,46 @@
/**
* @param {ASTNode} node
* @param {Context} context
* @returns {boolean}
*/
export function isES5Component(node: ASTNode, context: Context): boolean;
/**
* @param {ASTNode} node
* @param {Context} context
* @returns {boolean}
*/
export function isES6Component(node: ASTNode, context: Context): boolean;
/**
* Get the parent ES5 component node from the current scope
* @param {Context} context
* @param {ASTNode} node
* @returns {ASTNode|null}
*/
export function getParentES5Component(context: Context, node: ASTNode): ASTNode | null;
/**
* Get the parent ES6 component node from the current scope
* @param {Context} context
* @param {ASTNode} node
* @returns {ASTNode | null}
*/
export function getParentES6Component(context: Context, node: ASTNode): ASTNode | null;
/**
* Check if the node is explicitly declared as a descendant of a React Component
* @param {any} node
* @param {Context} context
* @returns {boolean}
*/
export function isExplicitComponent(node: any, context: Context): boolean;
/**
* Checks if a component extends React.PureComponent
* @param {ASTNode} node
* @param {Context} context
* @returns {boolean}
*/
export function isPureComponent(node: ASTNode, context: Context): boolean;
/**
* @param {ASTNode} node
* @returns {boolean}
*/
export function isStateMemberExpression(node: ASTNode): boolean;
//# sourceMappingURL=componentUtil.d.ts.map
@@ -0,0 +1,49 @@
/**
* ```asn
* id-ct-contentInfo OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs9(9) smime(16) ct(1) 6 }
* ```
*/
export declare const id_ct_contentInfo = "1.2.840.113549.1.9.16.1.6";
/**
* ```asn
* id-data OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs7(7) 1 }
* ```
*/
export declare const id_data = "1.2.840.113549.1.7.1";
/**
* ```asn
* id-signedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2 }
* ```
*/
export declare const id_signedData = "1.2.840.113549.1.7.2";
/**
* ```asn
* id-envelopedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs7(7) 3 }
* ```
*/
export declare const id_envelopedData = "1.2.840.113549.1.7.3";
/**
* ```asn
* id-digestedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs7(7) 5 }
* ```
*/
export declare const id_digestedData = "1.2.840.113549.1.7.5";
/**
* ```asn
* id-encryptedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs7(7) 6 }
* ```
*/
export declare const id_encryptedData = "1.2.840.113549.1.7.6";
/**
* ```asn
* id-ct-authData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) ct(1) 2 }
* ```
*/
export declare const id_authData = "1.2.840.113549.1.9.16.1.2";
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more