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

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

No files matched your search

@@ -0,0 +1,19 @@
unique-slug
===========
Generate a unique character string suitible for use in files and URLs.
```
var uniqueSlug = require('unique-slug')
var randomSlug = uniqueSlug()
var fileSlug = uniqueSlug('/etc/passwd')
```
### uniqueSlug(*str*) → String (8 chars)
If *str* is passed in then the return value will be its murmur hash in
hex.
If *str* is not passed in, it will be 4 randomly generated bytes
converted into 8 hexadecimal characters.
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_await_async_generator.cjs",
"module": "../../esm/_await_async_generator.js"
}
@@ -0,0 +1,23 @@
var baseSet = require('./_baseSet'),
baseZipObject = require('./_baseZipObject');
/**
* This method is like `_.zipObject` except that it supports property paths.
*
* @static
* @memberOf _
* @since 4.1.0
* @category Array
* @param {Array} [props=[]] The property identifiers.
* @param {Array} [values=[]] The property values.
* @returns {Object} Returns the new object.
* @example
*
* _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
* // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
*/
function zipObjectDeep(props, values) {
return baseZipObject(props || [], values || [], baseSet);
}
module.exports = zipObjectDeep;
@@ -0,0 +1,42 @@
'use strict';
var $TypeError = require('es-errors/type');
var IsValidIntegerIndex = require('./IsValidIntegerIndex');
var SetValueInBuffer = require('./SetValueInBuffer');
var ToBigInt = require('./ToBigInt');
var ToNumber = require('./ToNumber');
var TypedArrayElementSize = require('./TypedArrayElementSize');
var TypedArrayElementType = require('./TypedArrayElementType');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var whichTypedArray = require('which-typed-array');
// https://262.ecma-international.org/13.0/#sec-integerindexedelementset
module.exports = function IntegerIndexedElementSet(O, index, value) {
var arrayTypeName = whichTypedArray(O);
if (!arrayTypeName) {
throw new $TypeError('Assertion failed: `O` must be a TypedArray');
}
if (typeof index !== 'number') {
throw new $TypeError('Assertion failed: `index` must be a Number');
}
var contentType = arrayTypeName === 'BigInt64Array' || arrayTypeName === 'BigUint64Array' ? 'BigInt' : 'Number';
var numValue = contentType === 'BigInt' ? ToBigInt(value) : ToNumber(value); // steps 1 - 2
if (IsValidIntegerIndex(O, index)) { // step 3
var offset = typedArrayByteOffset(O); // step 3.a
var elementSize = TypedArrayElementSize(O); // step 3.b
var indexedPosition = (index * elementSize) + offset; // step 3.c
var elementType = TypedArrayElementType(O); // step 3.d
SetValueInBuffer(typedArrayBuffer(O), indexedPosition, elementType, numValue, true, 'Unordered'); // step 3.e
}
};
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"B","2":"K D E F A wC"},B:{"1":"0 1 2 3 4 5 M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","129":"C L"},C:{"1":"0 1 2 3 4 5 vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC","260":"6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB","804":"J ZB K D E F A B C L M 0C 1C"},D:{"1":"0 1 2 3 4 5 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","260":"wB xB yB zB 0B","388":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB","1412":"6 7 8 9 G N O P aB AB BB CB DB EB FB","1956":"J ZB K D E F A B C L M"},E:{"1":"cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","129":"A B C L M G 6C aC NC OC 7C 8C 9C bC","1412":"K D E F 4C 5C","1956":"J ZB 2C ZC 3C"},F:{"1":"0 1 2 3 4 5 oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F FD GD","260":"jB kB lB mB nB","388":"6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB","1796":"HD ID","1828":"B C NC uC JD OC"},G:{"1":"cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","129":"QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC","1412":"E MD ND OD PD","1956":"ZC KD vC LD"},H:{"1828":"hD"},I:{"1":"I","388":"mD nD","1956":"TC J iD jD kD lD vC"},J:{"1412":"A","1924":"D"},K:{"1":"H","2":"A","1828":"B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"B","2":"A"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB qD rD sD aC tD uD vD wD xD QC RC SC yD","260":"oD pD","388":"J"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","260":"1D"}},B:4,C:"CSS3 Border images",D:true};
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,eAAe,CAAC,oBAAoB,CAAC;AACzD","sources":["packages/@react-aria/breadcrumbs/intl/fr-FR.json"],"sourcesContent":["{\n \"breadcrumbs\": \"Chemin de navigation\"\n}\n"],"names":[],"version":3,"file":"fr-FR.module.js.map"}
@@ -0,0 +1,25 @@
/**
* @typedef {import('hast').Element} HastElement
* @typedef {import('hast').Text} HastText
* @typedef {import('mdast').Text} MdastText
* @typedef {import('../state.js').State} State
*/
import {trimLines} from 'trim-lines'
/**
* Turn an mdast `text` node into hast.
*
* @param {State} state
* Info passed around.
* @param {MdastText} node
* mdast node.
* @returns {HastElement | HastText}
* hast node.
*/
export function text(state, node) {
/** @type {HastText} */
const result = {type: 'text', value: trimLines(String(node.value))}
state.patch(node, result)
return state.applyData(node, result)
}
@@ -0,0 +1,22 @@
import * as proto from '../../../packet/transformer/proto';
import { OidbPacket, PacketTransformer } from '../../../packet/transformer/base';
import { PacketMsg } from '../../../packet/message/message';
export interface UploadForwardMsgParams {
actionCommand: string;
actionMsg: PacketMsg[];
}
declare class UploadForwardMsgV2 extends PacketTransformer<typeof proto.SendLongMsgResp> {
build(selfUid: string, msg: UploadForwardMsgParams[], groupUin?: number): OidbPacket;
parse(data: Buffer): import("napcat-protobuf").any {
resId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
}, false, false>;
settings: import("napcat-protobuf").MessageProtoFieldType<() => {
field1: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
field2: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
field3: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
field4: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, false>;
}>;
}
declare const _default: UploadForwardMsgV2;
export default _default;
@@ -0,0 +1,55 @@
/**
* Checks if the Identifier node passed in looks like a propTypes declaration.
* @param {ASTNode} node The node to check. Must be an Identifier node.
* @returns {boolean} `true` if the node is a propTypes declaration, `false` if not
*/
export function isPropTypesDeclaration(node: ASTNode): boolean;
/**
* Checks if the node passed in looks like a contextTypes declaration.
* @param {ASTNode} node The node to check.
* @returns {boolean} `true` if the node is a contextTypes declaration, `false` if not
*/
export function isContextTypesDeclaration(node: ASTNode): boolean;
/**
* Checks if the node passed in looks like a contextType declaration.
* @param {ASTNode} node The node to check.
* @returns {boolean} `true` if the node is a contextType declaration, `false` if not
*/
export function isContextTypeDeclaration(node: ASTNode): boolean;
/**
* Checks if the node passed in looks like a childContextTypes declaration.
* @param {ASTNode} node The node to check.
* @returns {boolean} `true` if the node is a childContextTypes declaration, `false` if not
*/
export function isChildContextTypesDeclaration(node: ASTNode): boolean;
/**
* Checks if the Identifier node passed in looks like a defaultProps declaration.
* @param {ASTNode} node The node to check. Must be an Identifier node.
* @returns {boolean} `true` if the node is a defaultProps declaration, `false` if not
*/
export function isDefaultPropsDeclaration(node: ASTNode): boolean;
/**
* Checks if we are declaring a display name
* @param {ASTNode} node The AST node being checked.
* @returns {boolean} True if we are declaring a display name, false if not.
*/
export function isDisplayNameDeclaration(node: ASTNode): boolean;
/**
* Checks if the PropTypes MemberExpression node passed in declares a required propType.
* @param {ASTNode} propTypeExpression node to check. Must be a `PropTypes` MemberExpression.
* @returns {boolean} `true` if this PropType is required, `false` if not.
*/
export function isRequiredPropType(propTypeExpression: ASTNode): boolean;
/**
* Returns the type arguments of a node or type parameters if type arguments are not available.
* @param {ASTNode} node The node to get the type arguments from.
* @returns {ASTNode} The type arguments or type parameters of the node.
*/
export function getTypeArguments(node: ASTNode): ASTNode;
/**
* Returns the super type arguments of a node or super type parameters if type arguments are not available.
* @param {ASTNode} node The node to get the super type arguments from.
* @returns {ASTNode} The super type arguments or parameters of the node.
*/
export function getSuperTypeArguments(node: ASTNode): ASTNode;
//# sourceMappingURL=props.d.ts.map
@@ -0,0 +1,79 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { RegExpValidator } = require("regexpp")
const { getRegExpCalls } = require("../utils")
/**
* Verify a given regular expression.
* @param {RuleContext} context The rule context to report.
* @param {Node} node The AST node to report.
* @param {string} pattern The pattern part of a RegExp.
* @param {string} flags The flags part of a RegExp.
* @returns {void}
*/
function verify(context, node, pattern, flags) {
try {
let found = false
new RegExpValidator({
onCapturingGroupEnter(_start, name) {
if (name) {
found = true
}
},
onBackreference(_start, _end, ref) {
if (typeof ref === "string") {
found = true
}
},
}).validatePattern(pattern, 0, pattern.length, flags.includes("u"))
if (found) {
context.report({ node, messageId: "forbidden" })
}
} catch (error) {
//istanbul ignore else
if (error.message.startsWith("Invalid regular expression:")) {
return
}
//istanbul ignore next
throw error
}
}
module.exports = {
meta: {
docs: {
description: "disallow RegExp named capture groups.",
category: "ES2018",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-regexp-named-capture-groups.html",
},
fixable: null,
messages: {
forbidden: "ES2018 RegExp named capture groups are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Literal[regex]"(node) {
const { pattern, flags } = node.regex
verify(context, node, pattern || "", flags || "")
},
"Program:exit"() {
const scope = context.getScope()
for (const { node, pattern, flags } of getRegExpCalls(scope)) {
verify(context, node, pattern || "", flags || "")
}
},
}
},
}
@@ -0,0 +1,7 @@
import Picker from './picker.js';
declare class ColorPicker extends Picker {
constructor(select: HTMLSelectElement, label: string);
buildItem(option: HTMLOptionElement): HTMLSpanElement;
selectItem(item: HTMLElement | null, trigger?: boolean): void;
}
export default ColorPicker;
@@ -0,0 +1,105 @@
# Migrating 0.x to 1.x
## Parser
0.x can be mostly translated into 1.x one way or another. The idea behind the new config structure is to handle only the most common cases, and provide the fallback for alternative implementation.
### `dotted_names: boolean`
> By default dotted names like `name.subname.subsubname` will be expanded into nested sections, this can be prevented by passing opts.dotted_names = false.
**Removed** This feature is removed but still can be done on top of the `parse()` output. Please post a request or contribute a PR if you need it.
### `trim: boolean`
> Set this to false to avoid the default of trimming whitespace at the start and end of each line.
In the new parser all original spacing is kept along with comment lines in `.source`. Description lines are joined together depending on `spacing` option
**New option:**
- `spacing: "compact"` lines concatenated with a single space and no line breaks
- `spacing: "preserve"` keeps line breaks and space around as is. Indentation space counts from `*` delimiter or from the start of the line if the delimiter is omitted
- `spacing: (lines: Line[]) => string` completely freeform joining strategy, since all original spacing can be accessed, there is no limit to how this can be implemented. See [primitives.ts](./src/primitives.ts) and [spacer.ts](./src/parser/spacer.ts)
### `join: string | number | boolean`
> If the following lines of a multiline comment do not start with a star, `join` will have the following effect on tag source (and description) when joining the lines together:
>
> - If a string, use that string in place of the leading whitespace (and avoid newlines).
> - If a non-zero number (e.g., 1), do no trimming and avoid newlines.
> - If undefined, false, or 0, use the default behavior of not trimming but adding a newline.
> - Otherwise (e.g., if join is true), replace any leading whitespace with a single space and avoid newlines.
>
> Note that if a multi-line comment has lines that start with a star, these will be appended with initial whitespace as is and with newlines regardless of the join setting.
See the `spacing` option above, all the variations can be fine-tunned with `spacing: (lines: Line[]) => string`
### `fence: string | RegExp | ((source: string) => boolean)`
> Set to a string or regular expression to toggle state upon finding an odd number of matches within a line. Defaults to ```.
>
> If set to a function, it should return true to toggle fenced state; upon returning true the first time, this will prevent subsequent lines from being interpreted as starting a new jsdoc tag until such time as the function returns true again to indicate that the state has toggled back.
This is mostly kept the same
**New optoins:**
- ```` fence: '```' ```` same as 0.x
- `fencer: (source: string) => boolean` same as 0.x, see [parser/block-parser.ts](./src/parser/block-parser.ts)
### `parsers: Parser[]`
> In case you need to parse tags in different way you can pass opts.parsers = [parser1, ..., parserN], where each parser is function name(str:String, data:Object):{source:String, data:Object}.
> ...
**New options:**
- `tokenizers: []Tokenizer` is a list of functions extracting the `tag`, `type`, `name` and `description` tokens from this string. See [parser/spec-parser.ts](./src/parser/spec-parser.ts) and [primitives.ts](./src/primitives.ts)
Default tokenizers chain is
```js
[
tagTokenizer(),
typeTokenizer(),
nameTokenizer(),
descriptionTokenizer(getSpacer(spacing)),
]
```
where
```ts
type Tokenizer = (spec: Spec) => Spec
interface Spec {
tag: string;
name: string;
default?: string;
type: string;
optional: boolean;
description: string;
problems: Problem[];
source: Line[];
}
```
chain starts with blank `Spec` and each tokenizer fulfills a piece using `.source` input
## Stringifier
> One may also convert comment-parser JSON structures back into strings using the stringify method (stringify(o: (object|Array) [, opts: object]): string).
> ...
Stringifier config follows the same strategy – a couple of common cases, and freeform formatter as a fallback
**New Options:**
- `format: "none"` re-assembles the source with original spacing and delimiters preserved
- `format: "align"` aligns tag, name, type, and descriptions into fixed-width columns
- `format: (tokens: Tokens) => string[]` do what you like, resulting lines will be concatenated into the output. Despite the simple interface, this can be turned into a complex stateful formatter, see `"align"` implementation in [transforms/align.ts](./src/transforms/align.ts)
## Stream
Work in progress
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from './types.mjs';
import 'react';
declare const ChevronLeftIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { ChevronLeftIcon };
@@ -0,0 +1,201 @@
/**
* @fileoverview Counts the cyclomatic complexity of each function of the script. See http://en.wikipedia.org/wiki/Cyclomatic_complexity.
* Counts the number of if, conditional, for, while, try, switch/case,
* @author Patrick Brosset
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
const { upperCaseFirst } = require("../shared/string-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
const THRESHOLD_DEFAULT = 20;
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
defaultOptions: [THRESHOLD_DEFAULT],
docs: {
description:
"Enforce a maximum cyclomatic complexity allowed in a program",
recommended: false,
url: "https://eslint.org/docs/latest/rules/complexity",
},
schema: [
{
oneOf: [
{
type: "integer",
minimum: 0,
},
{
type: "object",
properties: {
maximum: {
type: "integer",
minimum: 0,
},
max: {
type: "integer",
minimum: 0,
},
variant: {
enum: ["classic", "modified"],
},
},
additionalProperties: false,
},
],
},
],
messages: {
complex:
"{{name}} has a complexity of {{complexity}}. Maximum allowed is {{max}}.",
},
},
create(context) {
const sourceCode = context.sourceCode;
const option = context.options[0];
let threshold = THRESHOLD_DEFAULT;
let VARIANT = "classic";
if (typeof option === "object") {
if (
Object.hasOwn(option, "maximum") ||
Object.hasOwn(option, "max")
) {
threshold = option.maximum || option.max;
}
if (Object.hasOwn(option, "variant")) {
VARIANT = option.variant;
}
} else if (typeof option === "number") {
threshold = option;
}
const IS_MODIFIED_COMPLEXITY = VARIANT === "modified";
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
// Using a stack to store complexity per code path
const complexities = [];
/**
* Increase the complexity of the code path in context
* @returns {void}
* @private
*/
function increaseComplexity() {
complexities[complexities.length - 1]++;
}
//--------------------------------------------------------------------------
// Public API
//--------------------------------------------------------------------------
return {
onCodePathStart() {
// The initial complexity is 1, representing one execution path in the CodePath
complexities.push(1);
},
// Each branching in the code adds 1 to the complexity
CatchClause: increaseComplexity,
ConditionalExpression: increaseComplexity,
LogicalExpression: increaseComplexity,
ForStatement: increaseComplexity,
ForInStatement: increaseComplexity,
ForOfStatement: increaseComplexity,
IfStatement: increaseComplexity,
WhileStatement: increaseComplexity,
DoWhileStatement: increaseComplexity,
AssignmentPattern: increaseComplexity,
// Avoid `default`
"SwitchCase[test]": () =>
IS_MODIFIED_COMPLEXITY || increaseComplexity(),
SwitchStatement: () =>
IS_MODIFIED_COMPLEXITY && increaseComplexity(),
// Logical assignment operators have short-circuiting behavior
AssignmentExpression(node) {
if (astUtils.isLogicalAssignmentOperator(node.operator)) {
increaseComplexity();
}
},
MemberExpression(node) {
if (node.optional === true) {
increaseComplexity();
}
},
CallExpression(node) {
if (node.optional === true) {
increaseComplexity();
}
},
onCodePathEnd(codePath, node) {
const complexity = complexities.pop();
/*
* This rule only evaluates complexity of functions, so "program" is excluded.
* Class field initializers and class static blocks are implicit functions. Therefore,
* they shouldn't contribute to the enclosing function's complexity, but their
* own complexity should be evaluated.
*/
if (
codePath.origin !== "function" &&
codePath.origin !== "class-field-initializer" &&
codePath.origin !== "class-static-block"
) {
return;
}
if (complexity > threshold) {
let name;
let loc = node.loc;
if (codePath.origin === "class-field-initializer") {
name = "class field initializer";
} else if (codePath.origin === "class-static-block") {
name = "class static block";
loc = sourceCode.getFirstToken(node).loc;
} else {
name = astUtils.getFunctionNameWithKind(node);
loc = astUtils.getFunctionHeadLoc(node, sourceCode);
}
context.report({
node,
loc,
messageId: "complex",
data: {
name: upperCaseFirst(name),
complexity,
max: threshold,
},
});
}
},
};
},
};
@@ -0,0 +1,41 @@
var $jo4fw$react = require("react");
var $jo4fw$reactariautils = require("@react-aria/utils");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useScrollWheel", () => $a3dbce0aed7087e2$export$2123ff2b87c81ca);
/*
* 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.
*/
function $a3dbce0aed7087e2$export$2123ff2b87c81ca(props, ref) {
let { onScroll: onScroll, isDisabled: isDisabled } = props;
let onScrollHandler = (0, $jo4fw$react.useCallback)((e)=>{
// If the ctrlKey is pressed, this is a zoom event, do nothing.
if (e.ctrlKey) return;
// stop scrolling the page
e.preventDefault();
e.stopPropagation();
if (onScroll) onScroll({
deltaX: e.deltaX,
deltaY: e.deltaY
});
}, [
onScroll
]);
(0, $jo4fw$reactariautils.useEvent)(ref, 'wheel', isDisabled ? undefined : onScrollHandler);
}
//# sourceMappingURL=useScrollWheel.main.js.map
@@ -0,0 +1 @@
{"version":3,"file":"decode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,eAAe,EAAE,EACpB,gBAAgB,EAChB,aAAa,GAChB,MAAM,uBAAuB,CAAC;AAE/B,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAExE,IAAW,SAaV;AAbD,WAAW,SAAS;IAChB,wCAAQ,CAAA;IACR,0CAAS,CAAA;IACT,8CAAW,CAAA;IACX,0CAAS,CAAA;IACT,0CAAS,CAAA;IACT,gDAAY,CAAA;IACZ,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,gDAAY,CAAA;IACZ,gDAAY,CAAA;IACZ,gDAAY,CAAA;AAChB,CAAC,EAbU,SAAS,KAAT,SAAS,QAanB;AAED,sFAAsF;AACtF,MAAM,YAAY,GAAG,QAAQ,CAAC;AAE9B,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,mEAAoC,CAAA;IACpC,qEAAqC,CAAA;IACrC,6DAAkC,CAAA;AACtC,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAED,SAAS,QAAQ,CAAC,IAAY;IAC1B,OAAO,IAAI,IAAI,SAAS,CAAC,IAAI,IAAI,IAAI,IAAI,SAAS,CAAC,IAAI,CAAC;AAC5D,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAY;IACxC,OAAO,CACH,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC;QACxD,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC,CAC3D,CAAC;AACN,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAY;IACrC,OAAO,CACH,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC;QACxD,CAAC,IAAI,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC;QACxD,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACN,CAAC;AAED;;;;;GAKG;AACH,SAAS,6BAA6B,CAAC,IAAY;IAC/C,OAAO,IAAI,KAAK,SAAS,CAAC,MAAM,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;AAClE,CAAC;AAED,IAAW,kBAMV;AAND,WAAW,kBAAkB;IACzB,yEAAW,CAAA;IACX,2EAAY,CAAA;IACZ,+EAAc,CAAA;IACd,uEAAU,CAAA;IACV,yEAAW,CAAA;AACf,CAAC,EANU,kBAAkB,KAAlB,kBAAkB,QAM5B;AAED,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACpB,8DAA8D;IAC9D,mDAAU,CAAA;IACV,uDAAuD;IACvD,mDAAU,CAAA;IACV,oEAAoE;IACpE,yDAAa,CAAA;AACjB,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AAaD;;GAEG;AACH,MAAM,OAAO,aAAa;IACtB;IACI,wCAAwC;IACvB,UAAuB;IACxC;;;;;;;;OAQG;IACc,aAAqD;IACtE,gDAAgD;IAC/B,MAA4B;QAZ5B,eAAU,GAAV,UAAU,CAAa;QAUvB,kBAAa,GAAb,aAAa,CAAwC;QAErD,WAAM,GAAN,MAAM,CAAsB;QAGjD,wCAAwC;QAChC,UAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC;QAC/C,6DAA6D;QACrD,aAAQ,GAAG,CAAC,CAAC;QACrB;;;;;WAKG;QACK,WAAM,GAAG,CAAC,CAAC;QAEnB,4CAA4C;QACpC,cAAS,GAAG,CAAC,CAAC;QACtB,6DAA6D;QACrD,WAAM,GAAG,CAAC,CAAC;QACnB,kDAAkD;QAC1C,eAAU,GAAG,YAAY,CAAC,MAAM,CAAC;IAnBtC,CAAC;IAqBJ,+CAA+C;IAC/C,WAAW,CAAC,UAAwB;QAChC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC;QAC5C,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IACtB,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,GAAW,EAAE,MAAc;QAC7B,QAAQ,IAAI,CAAC,KAAK,EAAE;YAChB,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,SAAS,CAAC,GAAG,EAAE;oBAC1C,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,YAAY,CAAC;oBAC7C,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;oBACnB,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;iBAClD;gBACD,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC;gBAC5C,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC7C;YAED,KAAK,kBAAkB,CAAC,YAAY,CAAC,CAAC;gBAClC,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC9C;YAED,KAAK,kBAAkB,CAAC,cAAc,CAAC,CAAC;gBACpC,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAChD;YAED,KAAK,kBAAkB,CAAC,UAAU,CAAC,CAAC;gBAChC,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC5C;YAED,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACjC,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;aAC7C;SACJ;IACL,CAAC;IAED;;;;;;;;OAQG;IACK,iBAAiB,CAAC,GAAW,EAAE,MAAc;QACjD,IAAI,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE;YACtB,OAAO,CAAC,CAAC,CAAC;SACb;QAED,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,KAAK,SAAS,CAAC,OAAO,EAAE;YAC/D,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,UAAU,CAAC;YAC3C,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;YACnB,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;SAChD;QAED,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,cAAc,CAAC;QAC/C,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;IAEO,kBAAkB,CACtB,GAAW,EACX,KAAa,EACb,GAAW,EACX,IAAY;QAEZ,IAAI,KAAK,KAAK,GAAG,EAAE;YACf,MAAM,UAAU,GAAG,GAAG,GAAG,KAAK,CAAC;YAC/B,IAAI,CAAC,MAAM;gBACP,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC;oBACxC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC;YAClD,IAAI,CAAC,QAAQ,IAAI,UAAU,CAAC;SAC/B;IACL,CAAC;IAED;;;;;;;;OAQG;IACK,eAAe,CAAC,GAAW,EAAE,MAAc;QAC/C,MAAM,QAAQ,GAAG,MAAM,CAAC;QAExB,OAAO,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE;YACxB,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACpC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,sBAAsB,CAAC,IAAI,CAAC,EAAE;gBAChD,MAAM,IAAI,CAAC,CAAC;aACf;iBAAM;gBACH,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;gBACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;aAC1C;SACJ;QAED,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QAEnD,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED;;;;;;;;OAQG;IACK,mBAAmB,CAAC,GAAW,EAAE,MAAc;QACnD,MAAM,QAAQ,GAAG,MAAM,CAAC;QAExB,OAAO,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE;YACxB,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACpC,IAALine truncated
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.id_ce = exports.id_ad_caRepository = exports.id_ad_timeStamping = exports.id_ad_caIssuers = exports.id_ad_ocsp = exports.id_qt_unotice = exports.id_qt_csp = exports.id_ad = exports.id_kp = exports.id_qt = exports.id_pe = exports.id_pkix = void 0;
exports.id_pkix = "1.3.6.1.5.5.7";
exports.id_pe = `${exports.id_pkix}.1`;
exports.id_qt = `${exports.id_pkix}.2`;
exports.id_kp = `${exports.id_pkix}.3`;
exports.id_ad = `${exports.id_pkix}.48`;
exports.id_qt_csp = `${exports.id_qt}.1`;
exports.id_qt_unotice = `${exports.id_qt}.2`;
exports.id_ad_ocsp = `${exports.id_ad}.1`;
exports.id_ad_caIssuers = `${exports.id_ad}.2`;
exports.id_ad_timeStamping = `${exports.id_ad}.3`;
exports.id_ad_caRepository = `${exports.id_ad}.5`;
exports.id_ce = "2.5.29";
@@ -0,0 +1 @@
{"name":"@babel/traverse","version":"7.28.5","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532116543,"integrity":"sha512-KYRMN3MVTuiy5XkFDHd5PnQmHaQnt3z16nsBDePxZ9YNmq7IFlslpBBlR3UI+zvlbEemzowOYeKil9a0ZkOYxQ==","mode":420,"size":1106},"README.md":{"checkedAt":1794532116543,"integrity":"sha512-qwcf+U6VkoLdjhSEw+IQyOKGMrkTjQF/1kx2Xsn/Z58MMstmNKr0/uxhbaquqJebeGT6AdBzNPz5YFUD9G6JVw==","mode":420,"size":525},"lib/cache.js":{"checkedAt":1794532116543,"integrity":"sha512-EnVZ0qkLqcbHVvjFgumL7HR9hgydod9qSf7l2H/lyvnJG0z8wt8q+Cu1zd7LMmbn8/M8IYlMbkjbLHm9NYqc0A==","mode":420,"size":899},"lib/cache.js.map":{"checkedAt":1794532116543,"integrity":"sha512-cBGaarGHM6nEpeoHznBsMH0iY52eXygNzxjcqvTYI12RVpjw+Wp3sEK2CKZPih2eLLLnNzXG5VvlVOgFLAYTcw==","mode":420,"size":2063},"lib/context.js":{"checkedAt":1794532116543,"integrity":"sha512-ffluGWCj2CNRgOOp/WsR20pvhMO+JMOF1mNRP2hTKMbs98a8jsp81ZpqwOWzjiUaiiPHRlJ4NjcgW25XlQTwtA==","mode":420,"size":3049},"lib/context.js.map":{"checkedAt":1794532116543,"integrity":"sha512-6Ol2d9JEv68U5GNtB3O78Amo+CA6fxRO2nRVtXUBJ6FIDkSehpErWtlPz/N1h8uSumjffHUypvIBsbnlcW4fCA==","mode":420,"size":9407},"lib/hub.js":{"checkedAt":1794532116544,"integrity":"sha512-8w5iR6ydeEGrFgm3R3IZQsTn0yINaGrfA2OU9skphV9k8ZghsTOIU2IBQFrYDhbfBvfrPFF86y7caGETK8Txtg==","mode":420,"size":373},"lib/hub.js.map":{"checkedAt":1794532116544,"integrity":"sha512-JW3CuoSXcCzSVbFm5ueu+JdPET8HUdC6DBwb9UCxH/ZqLsDGiwptfMEsSsA42Tgo6fVdLlhEuEbgVJrX6z/TIw==","mode":420,"size":1142},"lib/index.js":{"checkedAt":1794532116544,"integrity":"sha512-xhR/ljESPGa4nprkhatnNrBqe7guLsc5fs2c0ETJEqh1ulVUNEmpKmABxDbUYM/8bmj6M13oL69Kr+jLhdkFdw==","mode":420,"size":2629},"lib/index.js.map":{"checkedAt":1794532116544,"integrity":"sha512-RT3EHhbbVzGmzCWoihH3MkqeMiG8yD4eM0v+ZUHSrO8m+91jKG0DO71NmVkHz3tF3evzgHVszEauTMVYJOsGfg==","mode":420,"size":6745},"lib/path/ancestry.js":{"checkedAt":1794532116544,"integrity":"sha512-PHvNpmZL6UidOkaoKBMoPf3o9qdGkEUhpbOWZwIBrM+e0eNEARn51Mvwg69yOEm+euJ7vLCV4ufwdpIj2naNrg==","mode":420,"size":3624},"lib/path/ancestry.js.map":{"checkedAt":1794532116545,"integrity":"sha512-kWT/tBc87ufbJLYsa7MlWWDu0BXdw0YkjHqOpiDvH3XkP4z3J+8LK1QUjKlEdqJnrVj9Z7xTIKfLby9pV/97dQ==","mode":420,"size":10629},"lib/path/comments.js":{"checkedAt":1794532116545,"integrity":"sha512-Yg1B9SSe4I20aELMXSOrxmSCvzwCl3S2/2iHY7fHMZQi3pewgsAnN13E6cux2M+W0lAh1eHLWDKizn+cszKpQw==","mode":420,"size":1558},"lib/path/comments.js.map":{"checkedAt":1794532116545,"integrity":"sha512-fIPlck0oPwGAs/2gKQ+o6Iw1sChAlZaXVS77h4PlkJ5DUDYLEZyOOSo09VPQaeHEoMb3u+e6qmXgYVOI8SaCVg==","mode":420,"size":3985},"lib/path/context.js":{"checkedAt":1794532116545,"integrity":"sha512-K9g2NQAGhVHHXjpvRfbYmud2C5P5GewRnVBEB7koCi2kC7k9yil0RCVhdY4PPa/vlrAXqaMzqJHVyvV85GKiEQ==","mode":420,"size":6832},"lib/path/context.js.map":{"checkedAt":1794532116545,"integrity":"sha512-txo9D0iAwBKcdEdXNlUyggUpDAnYMUPtjokhBNKhUhsX4PX5IFBsmoOxsWHJGIFTrm9qDhlrDLUK4BbMDlWISA==","mode":420,"size":17762},"lib/path/conversion.js":{"checkedAt":1794532116545,"integrity":"sha512-zeuB4ZygCEnTSU+fVDk4fRkCkJH5S0iQFqezCgqzkFfO0UjIXuvJ+xE8qblN5gKR91ADQ5DD3KYsmg4x5ESGaA==","mode":420,"size":21587},"lib/path/conversion.js.map":{"checkedAt":1794532116545,"integrity":"sha512-1BdLXiWvxKTEyf9PN1tIASLtsWV+LCeQ5IOWP+qfvQ2mq0ow5B4VJ8s2qTOGBZzI6u8f8+KNfn1oNlHL+UibGg==","mode":420,"size":59806},"lib/path/evaluation.js":{"checkedAt":1794532116546,"integrity":"sha512-xpm57I2T5ps4ER4iNzREw9gnncekRAfiwvXW3U92WrIvMBYBcQ4Hlc5our9gBRPNCRH/HQfX5QE0egRF248+7Q==","mode":420,"size":10908},"lib/path/evaluation.js.map":{"checkedAt":1794532116546,"integrity":"sha512-pu1DA/SW8oH3kjKpxgRdhFkWH+KTaQojjD475yjug98fZ/Fet0w5OvP5sfqMGe1IKcegpk5ZpqYOPNvcpGY9ZA==","mode":420,"size":30006},"lib/path/family.js":{"checkedAt":1794532116546,"integrity":"sha512-xpSixq/1FxpaLmRnVSq99Qvxd6Jt3ddABN28e/AOgJdXTEFNxYXtdEKYZVPOq9Ov+o2cO40KdCiLdu4cr8RQgw==","mode":420,"size":10646},"lib/path/family.js.map":{"checkedAt":1794532116546,"integrity":"sha512-qyvIuU8kOLpUMVt0aNgf37CYQRCd+0LvT7jCkdkQkan6kTAsqZ3nhKorO8uTgstP77wRcrQNkWbvH/RD8NAHPw==","mode":420,"size":32262},"lib/path/index.js":{"checkedAt":1794532116546,"integrity":"sha512-vg5A6TjQH6IvsTOUYgvv1Kxr9WVsVcvD2opkCI2G9afysg7fuhorebjE6l+8L3P+542QezUmjv5DhMonY9mZyg==","mode":420,"size":11264},"lib/path/index.js.map":{"checkedAt":1794532116546,"integrity":"sha512-oZsS+Q7XuHMZNXSryqMMdWgdv9uIYmyoQYcruxk4Lh+dBdyRcF0Os5SH837tczYQpbttf/NrKU3k2f3QyNuybw==","mode":420,"size":30514},"lib/path/inference/index.js":{"checkedAt":1794532116546,"integrity":"sha512-sUqjhDmhhMXrdPsOkUgXmpzugVXHizhm/3ZmQzLmAd34M7jtaEoWCkqbti4upWs6fbDu3FwmBsiIZ2GMRaeSkg==","mode":420,"size":4270},"lib/path/inference/index.js.map":{"checkedAt":1794532116547,"integrity":"sha512-CouO99rO+ESA+LW+JAI+Og7jpUvx0dmK0PrW83AVbr3oTRHkCshSzFjxCjZ0h9/wcZgeGTgpVnfikYP0NDPNwQ==","mode":420,"size":10312},"lib/path/inference/inferer-reference.js":{"checkedAt":1794532116547,"integrity":"sha512-FbKdcz0L/ZKTkeSQhz+4PeB2Tn0vBmWffCanDdUptCUVoYxVRn7qQKqwl5/EuYx29gVbOFWwLine truncated
@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IndexPropertyKeys = IndexPropertyKeys;
const index_1 = require("../template-literal/index");
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
const kind_1 = require("../guard/kind");
// prettier-ignore
function FromTemplateLiteral(templateLiteral) {
const keys = (0, index_1.TemplateLiteralGenerate)(templateLiteral);
return keys.map(key => key.toString());
}
// prettier-ignore
function FromUnion(types) {
const result = [];
for (const type of types)
result.push(...IndexPropertyKeys(type));
return result;
}
// prettier-ignore
function FromLiteral(literalValue) {
return ([literalValue.toString()] // TS 5.4 observes TLiteralValue as not having a toString()
);
}
/** Returns a tuple of PropertyKeys derived from the given TSchema */
// prettier-ignore
function IndexPropertyKeys(type) {
return [...new Set(((0, kind_1.IsTemplateLiteral)(type) ? FromTemplateLiteral(type) :
(0, kind_1.IsUnion)(type) ? FromUnion(type.anyOf) :
(0, kind_1.IsLiteral)(type) ? FromLiteral(type.const) :
(0, kind_1.IsNumber)(type) ? ['[number]'] :
(0, kind_1.IsInteger)(type) ? ['[number]'] :
[]))];
}
@@ -0,0 +1,10 @@
"use client";
import {
table_body_default
} from "./chunk-SU3P7OYB.mjs";
import "./chunk-LNVX26OF.mjs";
import "./chunk-IAFUOJEK.mjs";
import "./chunk-CKWQQGXG.mjs";
export {
table_body_default as default
};
@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.bindingScopeValues = void 0;
exports.bindingScopeValues = {
Request: 'Request',
Singleton: 'Singleton',
Transient: 'Transient',
};
//# sourceMappingURL=BindingScope.js.map
@@ -0,0 +1,214 @@
import $fzaAv$react from "react";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
build(props, context) {
this.context = context;
return $eb2240fc39a57fa5$var$iterable(()=>this.iterateCollection(props));
}
*iterateCollection(props) {
let { children: children, items: items } = props;
if ((0, $fzaAv$react).isValidElement(children) && children.type === (0, $fzaAv$react).Fragment) yield* this.iterateCollection({
children: children.props.children,
items: items
});
else if (typeof children === 'function') {
if (!items) throw new Error('props.children was a function but props.items is missing');
let index = 0;
for (let item of items){
yield* this.getFullNode({
value: item,
index: index
}, {
renderer: children
});
index++;
}
} else {
let items = [];
(0, $fzaAv$react).Children.forEach(children, (child)=>{
if (child) items.push(child);
});
let index = 0;
for (let item of items){
let nodes = this.getFullNode({
element: item,
index: index
}, {});
for (let node of nodes){
index++;
yield node;
}
}
}
}
getKey(item, partialNode, state, parentKey) {
if (item.key != null) return item.key;
if (partialNode.type === 'cell' && partialNode.key != null) return `${parentKey}${partialNode.key}`;
let v = partialNode.value;
if (v != null) {
var _v_key;
let key = (_v_key = v.key) !== null && _v_key !== void 0 ? _v_key : v.id;
if (key == null) throw new Error('No key found for item');
return key;
}
return parentKey ? `${parentKey}.${partialNode.index}` : `$.${partialNode.index}`;
}
getChildState(state, partialNode) {
return {
renderer: partialNode.renderer || state.renderer
};
}
*getFullNode(partialNode, state, parentKey, parentNode) {
if ((0, $fzaAv$react).isValidElement(partialNode.element) && partialNode.element.type === (0, $fzaAv$react).Fragment) {
let children = [];
(0, $fzaAv$react).Children.forEach(partialNode.element.props.children, (child)=>{
children.push(child);
});
var _partialNode_index;
let index = (_partialNode_index = partialNode.index) !== null && _partialNode_index !== void 0 ? _partialNode_index : 0;
for (const child of children)yield* this.getFullNode({
element: child,
index: index++
}, state, parentKey, parentNode);
return;
}
// If there's a value instead of an element on the node, and a parent renderer function is available,
// use it to render an element for the value.
let element = partialNode.element;
if (!element && partialNode.value && state && state.renderer) {
let cached = this.cache.get(partialNode.value);
if (cached && (!cached.shouldInvalidate || !cached.shouldInvalidate(this.context))) {
cached.index = partialNode.index;
cached.parentKey = parentNode ? parentNode.key : null;
yield cached;
return;
}
element = state.renderer(partialNode.value);
}
// If there's an element with a getCollectionNode function on its type, then it's a supported component.
// Call this function to get a partial node, and recursively build a full node from there.
if ((0, $fzaAv$react).isValidElement(element)) {
let type = element.type;
if (typeof type !== 'function' && typeof type.getCollectionNode !== 'function') {
let name = element.type;
throw new Error(`Unknown element <${name}> in collection.`);
}
let childNodes = type.getCollectionNode(element.props, this.context);
var _partialNode_index1;
let index = (_partialNode_index1 = partialNode.index) !== null && _partialNode_index1 !== void 0 ? _partialNode_index1 : 0;
let result = childNodes.next();
while(!result.done && result.value){
let childNode = result.value;
partialNode.index = index;
var _childNode_key;
let nodeKey = (_childNode_key = childNode.key) !== null && _childNode_key !== void 0 ? _childNode_key : null;
if (nodeKey == null) nodeKey = childNode.element ? null : this.getKey(element, partialNode, state, parentKey);
let nodes = this.getFullNode({
...childNode,
key: nodeKey,
index: index,
wrapper: $eb2240fc39a57fa5$var$compose(partialNode.wrapper, childNode.wrapper)
}, this.getChildState(state, childNode), parentKey ? `${parentKey}${element.key}` : element.key, parentNode);
let children = [
...nodes
];
for (let node of children){
var _childNode_value, _ref;
// Cache the node based on its value
node.value = (_ref = (_childNode_value = childNode.value) !== null && _childNode_value !== void 0 ? _childNode_value : partialNode.value) !== null && _ref !== void 0 ? _ref : null;
if (node.value) this.cache.set(node.value, node);
var _parentNode_type;
// The partial node may have specified a type for the child in order to specify a constraint.
// Verify that the full node that was built recursively matches this type.
if (partialNode.type && node.type !== partialNode.type) throw new Error(`Unsupported type <${$eb2240fc39a57fa5$var$capitalize(node.type)}> in <${$eb2240fc39a57fa5$var$capitalize((_parentNode_type = parentNode === null || parentNode === void 0 ? void 0 : parentNode.type) !== null && _parentNode_type !== void 0 ? _parentNode_type : 'unknown parent type')}>. Only <${$eb2240fc39a57fa5$var$capitalize(partialNode.type)}> is supported.`);
index++;
yield node;
}
result = childNodes.next(children);
}
return;
}
// Ignore invalid elements
if (partialNode.key == null || partialNode.type == null) return;
// Create full node
let builder = this;
var _partialNode_value, _partialNode_textValue;
let node = {
type: partialNode.type,
props: partialNode.props,
key: partialNode.key,
parentKey: parentNode ? parentNode.key : null,
value: (_partialNode_value = partialNode.value) !== null && _partialNode_value !== void 0 ? _partialNode_value : null,
level: parentNode ? parentNode.level + 1 : 0,
index: partialNode.index,
rendered: partialNode.rendered,
textValue: (_partialNode_textValue = partialNode.textValue) !== null && _partialNode_textValue !== void 0 ? _partialNode_textValue : '',
'aria-label': partialNode['aria-label'],
wrapper: partialNode.wrapper,
shouldInvalidate: partialNode.shouldInvalidate,
hasChildNodes: partialNode.hasChildNodes || false,
childNodes: $eb2240fc39a57fa5$var$iterable(function*() {
if (!partialNode.hasChildNodes || !partialNode.childNodes) return;
let index = 0;
for (let child of partialNode.childNodes()){
// Ensure child keys are globally unique by prepending the parent node's key
if (child.key != null) // TODO: Remove this line entirely and enforce that users always provide unique keys.
// Currently this line will have issues when a parent has a key `a` and a child with key `bc`
// but another parent has key `ab` and its child has a key `c`. The combined keys would result in both
// children having a key of `abc`.
child.key = `${node.key}${child.key}`;
let nodes = builder.getFullNode({
...child,
index: index
}, builder.getChildState(state, child), node.key, node);
for (let node of nodes){
index++;
yield node;
}
}
})
};
yield node;
}
constructor(){
this.cache = new WeakMap();
}
}
// Wraps an iterator function as an iterable object, and caches the results.
function $eb2240fc39a57fa5$var$iterable(iterator) {
let cache = [];
let iterable = null;
return {
*[Symbol.iterator] () {
for (let item of cache)yield item;
if (!iterable) iterable = iterator();
for (let item of iterable){
cache.push(item);
yield item;
}
}
};
}
function $eb2240fc39a57fa5$var$compose(outer, inner) {
if (outer && inner) return (element)=>outer(inner(element));
if (outer) return outer;
if (inner) return inner;
}
function $eb2240fc39a57fa5$var$capitalize(str) {
return str[0].toUpperCase() + str.slice(1);
}
export {$eb2240fc39a57fa5$export$bf788dd355e3a401 as CollectionBuilder};
//# sourceMappingURL=CollectionBuilder.module.js.map
@@ -0,0 +1 @@
{"version":3,"names":["_asyncIterator","iterable","method","async","sync","retry","Symbol","asyncIterator","iterator","call","AsyncFromSyncIterator","TypeError","s","n","next","prototype","AsyncFromSyncIteratorContinuation","apply","arguments","return","value","ret","undefined","Promise","resolve","done","throw","maybeError","thr","reject","r","Object","then"],"sources":["../../src/helpers/asyncIterator.ts"],"sourcesContent":["/* @minVersion 7.15.9 */\n\ntype AsyncIteratorFn<T> = AsyncIterable<T>[typeof Symbol.asyncIterator];\ntype SyncIteratorFn<T> = Iterable<T>[typeof Symbol.iterator];\n\nexport default function _asyncIterator<T>(\n iterable: AsyncIterable<T> | Iterable<T>,\n) {\n var method: AsyncIteratorFn<T> | SyncIteratorFn<T>,\n async: typeof Symbol.asyncIterator | \"@@asyncIterator\" | undefined,\n sync: typeof Symbol.iterator | \"@@iterator\" | undefined,\n retry = 2;\n\n if (typeof Symbol !== \"undefined\") {\n async = Symbol.asyncIterator;\n sync = Symbol.iterator;\n }\n\n while (retry--) {\n // TypeScript doesn't have in-function narrowing, and TypeScript can't narrow\n // AsyncIterable<T> | Iterable<T> down to AsyncIterable<T>. So let's use any here.\n if (async && (method = (iterable as any)[async]) != null) {\n return (method as AsyncIteratorFn<T>).call(iterable as AsyncIterable<T>);\n }\n // Same here, TypeScript can't narrow AsyncIterable<T> | Iterable<T> down to Iterable<T>.\n if (sync && (method = (iterable as any)[sync]) != null) {\n return new AsyncFromSyncIterator(\n (method as SyncIteratorFn<T>).call(iterable as Iterable<T>),\n );\n }\n\n async = \"@@asyncIterator\";\n sync = \"@@iterator\";\n }\n\n throw new TypeError(\"Object is not async iterable\");\n}\n\n// AsyncFromSyncIterator is actually a class that implements AsyncIterator interface\ndeclare class AsyncFromSyncIterator<T = any, TReturn = any, TNext = undefined>\n implements AsyncIterator<T, TReturn, TNext>\n{\n s: Iterator<T>;\n n: Iterator<T>[\"next\"];\n constructor(s: Iterator<T>);\n\n next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;\n return?(\n value?: TReturn | PromiseLike<TReturn>,\n ): Promise<IteratorResult<T, TReturn>>;\n throw?(e?: any): Promise<IteratorResult<T, TReturn>>;\n}\n\n// Actual implementation of AsyncFromSyncIterator starts here\n// class only exists in ES6, so we need to use the old school way\n// This makes ESLint and TypeScript complain a lot, but it's the only way\nfunction AsyncFromSyncIterator<T, TReturn = any, TNext = undefined>(s: any) {\n // @ts-expect-error - Intentionally overriding the constructor.\n AsyncFromSyncIterator = function (\n this: AsyncFromSyncIterator,\n s: Iterator<T>,\n ) {\n this.s = s;\n this.n = s.next;\n };\n AsyncFromSyncIterator.prototype = {\n // Initiating the \"s\" and \"n\", use \"any\" to prevent TS from complaining\n /* SyncIterator */ s: null as any,\n /* SyncIterator.[[Next]] */ n: null as any,\n next: function () {\n return AsyncFromSyncIteratorContinuation<T, TReturn>(\n // Use \"arguments\" here for better compatibility and smaller bundle size\n // Intentionally casting \"arguments\" to an array for the type of func.apply\n this.n.apply(this.s, arguments as any as [] | [undefined]),\n );\n },\n return: function (value) {\n var ret = this.s[\"return\"];\n if (ret === undefined) {\n return Promise.resolve<IteratorReturnResult<TReturn>>({\n // \"TReturn | PromiseLike<TReturn>\" should have been unwrapped by Awaited<T>,\n // but TypeScript choked, let's just casting it away\n value: value as TReturn,\n done: true,\n });\n }\n return AsyncFromSyncIteratorContinuation<T, TReturn>(\n ret.apply(\n this.s,\n // Use \"arguments\" here for better compatibility and smaller bundle size\n // Intentionally casting \"arguments\" to an array for the type of func.apply\n arguments as any as [] | [TReturn | PromiseLike<TReturn>],\n ),\n );\n },\n throw: function (maybeError?: any) {\n var thr = this.s[\"return\"];\n if (thr === undefined) {\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\n return Promise.reject(maybeError);\n }\n return AsyncFromSyncIteratorContinuation<T, TReturn>(\n // Use \"arguments\" here for better compatibility and smaller bundle size\n // Intentionally casting \"arguments\" to an array for the type of func.apply\n thr.apply(this.s, arguments as any as [any]),\n );\n },\n } satisfies AsyncFromSyncIterator<T, TReturn, TNext>;\n\n function AsyncFromSyncIteratorContinuation<T, TReturn>(r: any) {\n // This step is _before_ calling AsyncFromSyncIteratorContinuation in the spec.\n if (Object(r) !== r) {\n return Promise.reject(new TypeError(r + \" is not an object.Line truncated
@@ -0,0 +1,29 @@
import baseGt from './_baseGt.js';
import createRelationalOperation from './_createRelationalOperation.js';
/**
* Checks if `value` is greater than `other`.
*
* @static
* @memberOf _
* @since 3.9.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is greater than `other`,
* else `false`.
* @see _.lt
* @example
*
* _.gt(3, 1);
* // => true
*
* _.gt(3, 3);
* // => false
*
* _.gt(1, 3);
* // => false
*/
var gt = createRelationalOperation(baseGt);
export default gt;
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=incrementPendingClassMetadataCount.spec.d.ts.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"K D E wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"1":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"1":"0 1 2 3 4 5 6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z FD GD HD ID NC uC JD OC"},G:{"1":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"1":"hD"},I:{"1":"TC J I iD jD kD lD vC mD nD"},J:{"1":"D A"},K:{"1":"A B C H NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"naturalWidth & naturalHeight image properties",D:true};
@@ -0,0 +1,52 @@
"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/linear/copy.tsx
var copy_exports = {};
__export(copy_exports, {
CopyLinearIcon: () => CopyLinearIcon
});
module.exports = __toCommonJS(copy_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var CopyLinearIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "1.5",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M16 17.1c0 3.5-1.4 4.9-4.9 4.9H6.9C3.4 22 2 20.6 2 17.1v-4.2C2 9.4 3.4 8 6.9 8h4.2c3.5 0 4.9 1.4 4.9 4.9Z" }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M8 8V6.9C8 3.4 9.4 2 12.9 2h4.2C20.6 2 22 3.4 22 6.9v4.2c0 3.5-1.4 4.9-4.9 4.9H16" }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M16 12.9C16 9.4 14.6 8 11.1 8" })
]
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
CopyLinearIcon
});
@@ -0,0 +1,92 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _alertRole = _interopRequireDefault(require("./literal/alertRole"));
var _alertdialogRole = _interopRequireDefault(require("./literal/alertdialogRole"));
var _applicationRole = _interopRequireDefault(require("./literal/applicationRole"));
var _articleRole = _interopRequireDefault(require("./literal/articleRole"));
var _bannerRole = _interopRequireDefault(require("./literal/bannerRole"));
var _blockquoteRole = _interopRequireDefault(require("./literal/blockquoteRole"));
var _buttonRole = _interopRequireDefault(require("./literal/buttonRole"));
var _captionRole = _interopRequireDefault(require("./literal/captionRole"));
var _cellRole = _interopRequireDefault(require("./literal/cellRole"));
var _checkboxRole = _interopRequireDefault(require("./literal/checkboxRole"));
var _codeRole = _interopRequireDefault(require("./literal/codeRole"));
var _columnheaderRole = _interopRequireDefault(require("./literal/columnheaderRole"));
var _comboboxRole = _interopRequireDefault(require("./literal/comboboxRole"));
var _complementaryRole = _interopRequireDefault(require("./literal/complementaryRole"));
var _contentinfoRole = _interopRequireDefault(require("./literal/contentinfoRole"));
var _definitionRole = _interopRequireDefault(require("./literal/definitionRole"));
var _deletionRole = _interopRequireDefault(require("./literal/deletionRole"));
var _dialogRole = _interopRequireDefault(require("./literal/dialogRole"));
var _directoryRole = _interopRequireDefault(require("./literal/directoryRole"));
var _documentRole = _interopRequireDefault(require("./literal/documentRole"));
var _emphasisRole = _interopRequireDefault(require("./literal/emphasisRole"));
var _feedRole = _interopRequireDefault(require("./literal/feedRole"));
var _figureRole = _interopRequireDefault(require("./literal/figureRole"));
var _formRole = _interopRequireDefault(require("./literal/formRole"));
var _genericRole = _interopRequireDefault(require("./literal/genericRole"));
var _gridRole = _interopRequireDefault(require("./literal/gridRole"));
var _gridcellRole = _interopRequireDefault(require("./literal/gridcellRole"));
var _groupRole = _interopRequireDefault(require("./literal/groupRole"));
var _headingRole = _interopRequireDefault(require("./literal/headingRole"));
var _imgRole = _interopRequireDefault(require("./literal/imgRole"));
var _insertionRole = _interopRequireDefault(require("./literal/insertionRole"));
var _linkRole = _interopRequireDefault(require("./literal/linkRole"));
var _listRole = _interopRequireDefault(require("./literal/listRole"));
var _listboxRole = _interopRequireDefault(require("./literal/listboxRole"));
var _listitemRole = _interopRequireDefault(require("./literal/listitemRole"));
var _logRole = _interopRequireDefault(require("./literal/logRole"));
var _mainRole = _interopRequireDefault(require("./literal/mainRole"));
var _markRole = _interopRequireDefault(require("./literal/markRole"));
var _marqueeRole = _interopRequireDefault(require("./literal/marqueeRole"));
var _mathRole = _interopRequireDefault(require("./literal/mathRole"));
var _menuRole = _interopRequireDefault(require("./literal/menuRole"));
var _menubarRole = _interopRequireDefault(require("./literal/menubarRole"));
var _menuitemRole = _interopRequireDefault(require("./literal/menuitemRole"));
var _menuitemcheckboxRole = _interopRequireDefault(require("./literal/menuitemcheckboxRole"));
var _menuitemradioRole = _interopRequireDefault(require("./literal/menuitemradioRole"));
var _meterRole = _interopRequireDefault(require("./literal/meterRole"));
var _navigationRole = _interopRequireDefault(require("./literal/navigationRole"));
var _noneRole = _interopRequireDefault(require("./literal/noneRole"));
var _noteRole = _interopRequireDefault(require("./literal/noteRole"));
var _optionRole = _interopRequireDefault(require("./literal/optionRole"));
var _paragraphRole = _interopRequireDefault(require("./literal/paragraphRole"));
var _presentationRole = _interopRequireDefault(require("./literal/presentationRole"));
var _progressbarRole = _interopRequireDefault(require("./literal/progressbarRole"));
var _radioRole = _interopRequireDefault(require("./literal/radioRole"));
var _radiogroupRole = _interopRequireDefault(require("./literal/radiogroupRole"));
var _regionRole = _interopRequireDefault(require("./literal/regionRole"));
var _rowRole = _interopRequireDefault(require("./literal/rowRole"));
var _rowgroupRole = _interopRequireDefault(require("./literal/rowgroupRole"));
var _rowheaderRole = _interopRequireDefault(require("./literal/rowheaderRole"));
var _scrollbarRole = _interopRequireDefault(require("./literal/scrollbarRole"));
var _searchRole = _interopRequireDefault(require("./literal/searchRole"));
var _searchboxRole = _interopRequireDefault(require("./literal/searchboxRole"));
var _separatorRole = _interopRequireDefault(require("./literal/separatorRole"));
var _sliderRole = _interopRequireDefault(require("./literal/sliderRole"));
var _spinbuttonRole = _interopRequireDefault(require("./literal/spinbuttonRole"));
var _statusRole = _interopRequireDefault(require("./literal/statusRole"));
var _strongRole = _interopRequireDefault(require("./literal/strongRole"));
var _subscriptRole = _interopRequireDefault(require("./literal/subscriptRole"));
var _superscriptRole = _interopRequireDefault(require("./literal/superscriptRole"));
var _switchRole = _interopRequireDefault(require("./literal/switchRole"));
var _tabRole = _interopRequireDefault(require("./literal/tabRole"));
var _tableRole = _interopRequireDefault(require("./literal/tableRole"));
var _tablistRole = _interopRequireDefault(require("./literal/tablistRole"));
var _tabpanelRole = _interopRequireDefault(require("./literal/tabpanelRole"));
var _termRole = _interopRequireDefault(require("./literal/termRole"));
var _textboxRole = _interopRequireDefault(require("./literal/textboxRole"));
var _timeRole = _interopRequireDefault(require("./literal/timeRole"));
var _timerRole = _interopRequireDefault(require("./literal/timerRole"));
var _toolbarRole = _interopRequireDefault(require("./literal/toolbarRole"));
var _tooltipRole = _interopRequireDefault(require("./literal/tooltipRole"));
var _treeRole = _interopRequireDefault(require("./literal/treeRole"));
var _treegridRole = _interopRequireDefault(require("./literal/treegridRole"));
var _treeitemRole = _interopRequireDefault(require("./literal/treeitemRole"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
var ariaLiteralRoles = [['alert', _alertRole.default], ['alertdialog', _alertdialogRole.default], ['application', _applicationRole.default], ['article', _articleRole.default], ['banner', _bannerRole.default], ['blockquote', _blockquoteRole.default], ['button', _buttonRole.default], ['caption', _captionRole.default], ['cell', _cellRole.default], ['checkbox', _checkboxRole.default], ['code', _codeRole.default], ['columnheader', _columnheaderRole.default], ['combobox', _comboboxRole.default], ['complementary', _complementaryRole.default], ['contentinfo', _contentinfoRole.default], ['definition', _definitionRole.default], ['deletion', _deletionRole.default], ['dialog', _dialogRole.default], ['directory', _directoryRole.default], ['document', _documentRole.default], ['emphasis', _emphasisRole.default], ['feed', _feedRole.default], ['figure', _figureRole.default], ['form', _formRole.default], ['generic', _genericRole.default], ['grid', _gridRole.default], ['gridcell', _gridcellRole.default], ['group', _groupRole.default], ['heading', _headingRole.default], ['img', _imgRole.default], ['insertion', _insertionRole.default], ['link', _linkRole.default], ['list', _listRole.default], ['listbox', _listboxRole.default], ['listitem', _listitemRole.default], ['log', _logRole.default], ['main', _mainRole.default], ['mark', _markRole.default], ['marquee', _marqueeRole.default], ['math', _mathRole.default], ['menu', _menuRole.default], ['menubar', _menubarRole.default], ['menuitem', _menuitemRole.default], ['menuitemcheckbox', _menuitemcheckboxRole.default], ['menuitemradio', _menuitemradioRole.default], ['meter', _meterRole.default], ['navigation', _navigationRole.default], ['none', _noneRole.default], ['note', _noteRole.default], ['option', _optionRole.default], ['paragraph', _paragraphRole.default], ['presentation', _presentationRole.default], ['progressbar', _progressbarRole.default], ['radio', _radioRole.default], ['radiogroup', _radiogroupRole.default], ['region', _regionRole.default], ['row', _rowRole.default], ['rowgroup', _rowgroupRole.default], ['rowheader', _rowheaderRole.default], ['scrollbar', _scrollbarRole.default], ['search', _searchRole.default], ['searchbox', _searchboxRole.default], ['separator', _separatorRole.default], ['slider', _sliderRole.default], ['spinbutton', _spinbuttonRole.default], ['status', _statusRole.default], ['strong', _strongRole.default], ['subscript', _subscriptRole.default], ['superscript', _superscriptRole.default], ['switch', _switchRole.default], ['tab', _tabRole.default], ['table', _tableRole.default], ['tablist', _tablistRole.default], ['tabpanel', _tabpanelRole.default], ['term', _termRole.default], ['textbox', _textboxRole.default], ['time', _timeRole.default], ['timer', _timerRole.default], ['toolbar', _toolbarRole.default], ['tooltip', _tooltipRole.default], ['tree', _treeRole.default], ['treegrid', _treegridRole.default], ['treeitem', _treeitemRole.default]];
var _default = exports.default = ariaLiteralRoles;
@@ -0,0 +1,152 @@
/**
* Helpers.
*/
var s = 1000;
var m = s * 60;
var h = m * 60;
var d = h * 24;
var y = d * 365.25;
/**
* Parse or format the given `val`.
*
* Options:
*
* - `long` verbose formatting [false]
*
* @param {String|Number} val
* @param {Object} [options]
* @throws {Error} throw an error if val is not a non-empty string or a number
* @return {String|Number}
* @api public
*/
module.exports = function(val, options) {
options = options || {};
var type = typeof val;
if (type === 'string' && val.length > 0) {
return parse(val);
} else if (type === 'number' && isNaN(val) === false) {
return options.long ? fmtLong(val) : fmtShort(val);
}
throw new Error(
'val is not a non-empty string or a valid number. val=' +
JSON.stringify(val)
);
};
/**
* Parse the given `str` and return milliseconds.
*
* @param {String} str
* @return {Number}
* @api private
*/
function parse(str) {
str = String(str);
if (str.length > 100) {
return;
}
var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
str
);
if (!match) {
return;
}
var n = parseFloat(match[1]);
var type = (match[2] || 'ms').toLowerCase();
switch (type) {
case 'years':
case 'year':
case 'yrs':
case 'yr':
case 'y':
return n * y;
case 'days':
case 'day':
case 'd':
return n * d;
case 'hours':
case 'hour':
case 'hrs':
case 'hr':
case 'h':
return n * h;
case 'minutes':
case 'minute':
case 'mins':
case 'min':
case 'm':
return n * m;
case 'seconds':
case 'second':
case 'secs':
case 'sec':
case 's':
return n * s;
case 'milliseconds':
case 'millisecond':
case 'msecs':
case 'msec':
case 'ms':
return n;
default:
return undefined;
}
}
/**
* Short format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/
function fmtShort(ms) {
if (ms >= d) {
return Math.round(ms / d) + 'd';
}
if (ms >= h) {
return Math.round(ms / h) + 'h';
}
if (ms >= m) {
return Math.round(ms / m) + 'm';
}
if (ms >= s) {
return Math.round(ms / s) + 's';
}
return ms + 'ms';
}
/**
* Long format for `ms`.
*
* @param {Number} ms
* @return {String}
* @api private
*/
function fmtLong(ms) {
return plural(ms, d, 'day') ||
plural(ms, h, 'hour') ||
plural(ms, m, 'minute') ||
plural(ms, s, 'second') ||
ms + ' ms';
}
/**
* Pluralization helper.
*/
function plural(ms, n, name) {
if (ms < n) {
return;
}
if (ms < n * 1.5) {
return Math.floor(ms / n) + ' ' + name;
}
return Math.ceil(ms / n) + ' ' + name + 's';
}
@@ -0,0 +1,18 @@
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"), require("./ripemd160"), require("./hmac"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core", "./ripemd160", "./hmac"], factory);
}
else {
// Global (browser)
factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
return CryptoJS.HmacRIPEMD160;
}));
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,gEAAgE;AAChE,gGAAgG;;;AAMhG,mBAAmB;AACnB,MAAM,yCAAmB;AAEzB,gEAAgE;AAChE,MAAM,0CAAoB;AAOnB,MAAM,kDAAuB,CAAA,GAAA,2CAAgB;IAGlD,cAAc,EAAU,EAAgB;QACtC,gCAAgC;QAChC,IAAI,OAAO,KAAK,CAAC,cAAc;QAE/B,mBAAmB;QACnB,IAAI,aAAa,KAAK,IAAI,GAAG;QAE7B,iDAAiD;QACjD,IAAI,OAAO,KAAK,CAAA,GAAA,8CAAmB,EAAE,KAAK,GAAG,EAAE,KAAK,IAAI,EAAE,GAAG;QAE7D,IAAI;QACJ,IAAI,OAAO,yCAAmB;YAC5B,gDAAgD;YAChD;YAEA,uDAAuD;YACvD,YAAY,CAAA,GAAA,oCAAS,EAAE,KAAK,IAAI,GAAG,KAAK,KAAK;YAC7C,QAAQ,YAAa,MAAW,KAAU;QAC5C,OAAO;YACL,8BAA8B;YAC9B,YAAY,CAAA,GAAA,oCAAS,EAAE,KAAK,IAAI,IAAI,KAAK;YACzC,QAAQ;QACV;QAEA,IAAI;QACJ,IAAI;QACJ,IAAI,OAAO,WAAW;YACpB,cAAc;YACd,YAAY,OAAO;QACrB,OAAO;YACL,IAAI,OAAO,OAAO;YAClB,IAAI,OAAQ,KAAS;gBACnB,cAAc,KAAK,KAAK,CAAC,OAAO,MAAM;gBACtC,YAAY,AAAC,OAAO,KAAM;YAC5B,OAAO;gBACL,QAAQ;gBACR,cAAc,KAAK,KAAK,CAAC,OAAO,MAAM;gBACtC,YAAY,AAAC,OAAO,KAAM;YAC5B;QACF;QAEA,OAAO,IAAI,CAAA,GAAA,sCAAW,EAAE,IAAI,EAAE,YAAY,aAAa;IACzD;IAEA,YAAY,IAAqB,EAAE;QACjC,IAAI,eAAe,KAAK,IAAI,GAAG;QAC/B,IAAI,CAAC,KAAK,KAAK,GAAG,CAAA,GAAA,0CAAe,EAAE;QAEnC,IAAI;QACJ,IAAI;QACJ,IAAI,CAAA,GAAA,oCAAS,EAAE,OAAO;YACpB,YAAY;YACZ,KAAK,CAAA,GAAA,8CAAmB,EAAE,KAAK,MAAM,GAAG;QAC1C,OAAO;YACL,YAAY;YACZ,KAAK,CAAA,GAAA,8CAAmB,EAAE,KAAK,MAAM,GAAG;QAC1C;QAEA,IAAI,KAAK,KAAK,KAAK,GACjB,OAAO,KAAK,KAAK,GAAG,GAAG;QAGzB,MAAM,YAAY,KAAK,GAAG,CAAC,KAAK,KAAK,GAAG,GAAG,KAAK;QAEhD,IAAI,KAAK,KAAK,IAAI,GAChB,MAAM,AAAC,CAAA,KAAK,KAAK,GAAG,CAAA,IAAK;QAG3B,MAAM,KAAK,GAAG,GAAG;QACjB,OAAO;IACT;IAEA,eAAe,IAAqB,EAAU;QAC5C,IAAI,KAAK,KAAK,KAAK,KAAK,CAAA,GAAA,oCAAS,EAAE,KAAK,IAAI,GAAG,yCAC7C,OAAO;QAGT,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,KAAK,IAAI,GACnC,OAAO;QAGT,OAAO;IACT;IAEA,gBAAwB;QACtB,6CAA6C;QAC7C,6CAA6C;QAC7C,OAAO;IACT;IAEA,UAAU;QACR,OAAO;YAAC;SAAO;IACjB;IAEA,cAAc,CAAC;;6BAhGf,aAAa;;AAiGf","sources":["packages/@internationalized/date/src/calendars/IndianCalendar.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate} from '../types';\nimport {CalendarDate} from '../CalendarDate';\nimport {fromExtendedYear, GregorianCalendar, gregorianToJulianDay, isLeapYear} from './GregorianCalendar';\n\n// Starts in 78 AD,\nconst INDIAN_ERA_START = 78;\n\n// The Indian year starts 80 days later than the Gregorian year.\nconst INDIAN_YEAR_START = 80;\n\n/**\n * The Indian National Calendar is similar to the Gregorian calendar, but with\n * years numbered since the Saka era in 78 AD (Gregorian). There are 12 months\n * in each year, with either 30 or 31 days. Only one era identifier is supported: 'saka'.\n */\nexport class IndianCalendar extends GregorianCalendar {\n identifier = 'indian';\n\n fromJulianDay(jd: number): CalendarDate {\n // Gregorian date for Julian day\n let date = super.fromJulianDay(jd);\n\n // Year in Saka era\n let indianYear = date.year - INDIAN_ERA_START;\n\n // Day number in Gregorian year (starting from 0)\n let yDay = jd - gregorianToJulianDay(date.era, date.year, 1, 1);\n\n let leapMonth: number;\n if (yDay < INDIAN_YEAR_START) {\n // Day is at the end of the preceding Saka year\n indianYear--;\n\n // Days in leapMonth this year, previous Gregorian year\n leapMonth = isLeapYear(date.year - 1) ? 31 : 30;\n yDay += leapMonth + (31 * 5) + (30 * 3) + 10;\n } else {\n // Days in leapMonth this year\n leapMonth = isLeapYear(date.year) ? 31 : 30;\n yDay -= INDIAN_YEAR_START;\n }\n\n let indianMonth: number;\n let indianDay: number;\n if (yDay < leapMonth) {\n indianMonth = 1;\n indianDay = yDay + 1;\n } else {\n let mDay = yDay - leapMonth;\n if (mDay < (31 * 5)) {\n indianMonth = Math.floor(mDay / 31) + 2;\n indianDay = (mDay % 31) + 1;\n } else {\n mDay -= 31 * 5;\n indianMonth = Math.floor(mDay / 30) + 7;\n indianDay = (mDay % 30) + 1;\n }\n }\n\n return new CalendarDate(this, indianYear, indianMonth, indianDay);\n }\n\n toJulianDay(date: AnyCalendarDate) {\n let extendedYear = date.year + INDIAN_ERA_START;\n let [era, year] = fromExtendedYear(extendedYear);\n\n let leapMonth: number;\n let jd: number;\n if (isLeapYear(year)) {\n leapMonth = 31;\n jd = gregorianToJulianDay(era, year, 3, 21);\n } eLine truncated
@@ -0,0 +1,9 @@
import type { TypedArray } from 'is-typed-array';
declare namespace typedArrayBuffer{
export type { TypedArray };
}
declare function typedArrayBuffer(x: typedArrayBuffer.TypedArray): ArrayBuffer;
export = typedArrayBuffer;
@@ -0,0 +1 @@
{"version":3,"names":[],"sources":["../../src/config/cache-contexts.ts"],"sourcesContent":["import type { ConfigContext } from \"./config-chain.ts\";\nimport type {\n CallerMetadata,\n TargetsListOrObject,\n} from \"./validation/options.ts\";\n\nexport type { ConfigContext as FullConfig };\n\nexport type FullPreset = {\n targets: TargetsListOrObject;\n} & ConfigContext;\nexport type FullPlugin = {\n assumptions: { [name: string]: boolean };\n} & FullPreset;\n\n// Context not including filename since it is used in places that cannot\n// process 'ignore'/'only' and other filename-based logic.\nexport type SimpleConfig = {\n envName: string;\n caller: CallerMetadata | undefined;\n};\nexport type SimplePreset = {\n targets: TargetsListOrObject;\n} & SimpleConfig;\nexport type SimplePlugin = {\n assumptions: {\n [name: string]: boolean;\n };\n} & SimplePreset;\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,8 @@
var $20c975671d6bbc63$exports = {};
$20c975671d6bbc63$exports = {
"breadcrumbs": `Navigacijski putovi`
};
export {$20c975671d6bbc63$exports as default};
//# sourceMappingURL=hr-HR.module.js.map
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('findLastFrom', require('../findLast'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,29 @@
/*! *****************************************************************************
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"/>
interface MapConstructor {
/**
* Groups members of an iterable according to the return value of the passed callback.
* @param items An iterable.
* @param keySelector A callback which will be invoked for each item in items.
*/
groupBy<K, T>(
items: Iterable<T>,
keySelector: (item: T, index: number) => K,
): Map<K, T[]>;
}
@@ -0,0 +1,17 @@
export type ParametersType = ArrayBuffer | null;
/**
* ```asn1
* AlgorithmIdentifier ::= SEQUENCE {
* algorithm OBJECT IDENTIFIER,
* parameters ANY DEFINED BY algorithm OPTIONAL }
* -- contains a value of the type
* -- registered for use with the
* -- algorithm object identifier value
* ```
*/
export declare class AlgorithmIdentifier {
algorithm: string;
parameters?: ParametersType;
constructor(params?: Partial<Omit<AlgorithmIdentifier, "isEqual">>);
isEqual(data: unknown): data is this;
}
@@ -0,0 +1 @@
{"version":3,"file":"jsx-no-script-url.d.ts","sourceRoot":"","sources":["jsx-no-script-url.js"],"names":[],"mappings":"wBA6CW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1,21 @@
'use strict';
var ES5 = require('./es5');
var ES6 = require('./es6');
var ES2015 = require('./es2015');
if (Object.defineProperty) {
Object.defineProperty(ES2015, 'ES5', { enumerable: false, value: ES5 });
Object.defineProperty(ES2015, 'ES6', { enumerable: false, value: ES6 });
Object.defineProperty(ES2015, 'ES2015', { enumerable: false, value: ES2015 });
} else {
// @ts-expect-error TODO
ES2015.ES5 = ES5;
// @ts-expect-error TODO
ES2015.ES6 = ES6;
// @ts-expect-error TODO
ES2015.ES2015 = ES2015;
}
/** @type {import('.')} */
module.exports = ES2015;
@@ -0,0 +1,49 @@
import { YAMLSeq } from '../nodes/YAMLSeq.js';
import { resolveProps } from './resolve-props.js';
import { flowIndentCheck } from './util-flow-indent-check.js';
function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {
const NodeClass = tag?.nodeClass ?? YAMLSeq;
const seq = new NodeClass(ctx.schema);
if (ctx.atRoot)
ctx.atRoot = false;
if (ctx.atKey)
ctx.atKey = false;
let offset = bs.offset;
let commentEnd = null;
for (const { start, value } of bs.items) {
const props = resolveProps(start, {
indicator: 'seq-item-ind',
next: value,
offset,
onError,
parentIndent: bs.indent,
startOnNewline: true
});
if (!props.found) {
if (props.anchor || props.tag || value) {
if (value?.type === 'block-seq')
onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');
else
onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');
}
else {
commentEnd = props.end;
if (props.comment)
seq.comment = props.comment;
continue;
}
}
const node = value
? composeNode(ctx, value, props, onError)
: composeEmptyNode(ctx, props.end, start, null, props, onError);
if (ctx.schema.compat)
flowIndentCheck(bs.indent, value, onError);
offset = node.range[2];
seq.items.push(node);
}
seq.range = [bs.offset, offset, commentEnd ?? offset];
return seq;
}
export { resolveBlockSeq };
@@ -0,0 +1 @@
{"name":"buffer-alloc-unsafe","version":"1.1.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532100957,"integrity":"sha512-y5aGlwuzm3mEkM288oi2x52+KWDjzCmxx33ln3VC6BjCNnkZm12mz+eEDOlsSZNKVvPG/KpR3J/6CHC46wHIMA==","mode":420,"size":430},"index.js":{"checkedAt":1794532100957,"integrity":"sha512-Qpm2b8StTaUmmY2QkxwIabP/Lg8mAHiQm84uCKwxFizgA1ct5EXxRTAj5cLKQHPnxZMMg4NNs0muz0tgBwvCbQ==","mode":420,"size":356},"readme.md":{"checkedAt":1794532100957,"integrity":"sha512-i4xgfXHMxtVVbvlvCXweZxDBDOiXoukjog38RQnkUJrAcF/zMygDyf8hlFBXRfMIAEFKXO4IBGVsLzMvpc3MeQ==","mode":420,"size":1150}}}
@@ -0,0 +1 @@
{"version":3,"file":"use-event-source.js","sourceRoot":"","sources":["../../src/lib/use-event-source.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAyC;AACzC,iDAA8C;AAC9C,yCAAgF;AAGzE,IAAM,cAAc,GAAG,UAC5B,GAAqD,EACrD,EAA0F,EAC1F,OAAuB;IADvB,mBAAA,EAAA,KAA8D,wCAA4B;IAAxF,IAAA,eAAe,qBAAA,EAAE,MAAM,YAAA,EAAK,OAAO,cAArC,6BAAuC,CAAF;IACrC,wBAAA,EAAA,cAAuB;IAEvB,IAAM,sBAAsB,yBACrB,OAAO,KACV,kBAAkB,EAAE;YAClB,eAAe,iBAAA;SAChB,GACJ,CAAC;IACF,IAAM,SAAS,GAAG,IAAA,cAAM,EAA2B,gCAAoB,CAAC,CAAC;IACzE,IAAI,MAAM,EAAE,CAAC;QACX,SAAS,CAAC,OAAO,GAAG,MAAM,CAAA;IAC5B,CAAC;IAEK,IAAA,KAIF,IAAA,4BAAY,EACd,GAAG,EACH,sBAAsB,EACtB,OAAO,CACR,EAPC,WAAW,iBAAA,EACX,UAAU,gBAAA,EACV,YAAY,kBAKb,CAAC;IAEF,IAAA,iBAAS,EAAC;QACR,IAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAAI,EAAE,CAAC;YACpB,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,UAAC,EAAe;oBAAd,IAAI,QAAA,EAAE,OAAO,QAAA;gBACrD,IAAI,IAAI,KAAK,WAAW,CAAC,IAAI,EAAE,CAAC;oBAC5B,OAAO,CAAC,WAAW,CAAC,CAAC;gBACzB,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;IACH,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,OAAO;QACL,SAAS,EAAE,WAAW;QACtB,UAAU,YAAA;QACV,cAAc,EAAE,YAAY;KAC7B,CAAC;AACJ,CAAC,CAAA;AAzCY,QAAA,cAAc,kBAyC1B"}
@@ -0,0 +1,151 @@
<p align="center">
<a href="https://tailwind-variants.org">
<img width="20%" src=".github/assets/isotipo.png" alt="tailwind-variants" />
<h1 align="center">tailwind-variants</h1>
</a>
</p>
<p align="center">
The <em>power</em> of Tailwind combined with a <em>first-class</em> variant API.<br><br>
<a href="https://www.npmjs.com/package/tailwind-variants">
<img src="https://img.shields.io/npm/dm/tailwind-variants.svg?style=flat-round" alt="npm downloads">
</a>
<a href="https://www.npmjs.com/package/tailwind-variants">
<img alt="NPM Version" src="https://badgen.net/npm/v/tailwind-variants" />
</a>
<a href="https://github.com/heroui-inc/tailwind-variants/blob/main/LICENSE">
<img src="https://img.shields.io/npm/l/tailwind-variants?style=flat" alt="License">
</a>
</p>
## Features
- First-class variant API
- Responsive variants
- Slots support
- Composition support
- Fully typed
- Framework agnostic
- Automatic conflict resolution
## Documentation
For full documentation, visit [tailwind-variants.org](https://tailwind-variants.org)
## Quick Start
1. Installation:
To use Tailwind Variants in your project, you can install it as a dependency:
```bash
yarn add tailwind-variants
# or
npm i tailwind-variants
```
2. Usage:
```js
import {tv} from "tailwind-variants";
const button = tv({
base: "font-medium bg-blue-500 text-white rounded-full active:opacity-80",
variants: {
color: {
primary: "bg-blue-500 text-white",
secondary: "bg-purple-500 text-white",
},
size: {
sm: "text-sm",
md: "text-base",
lg: "px-4 py-3 text-lg",
},
},
compoundVariants: [
{
size: ["sm", "md"],
class: "px-3 py-1",
},
],
defaultVariants: {
size: "md",
color: "primary",
},
});
return <button className={button({size: "sm", color: "secondary"})}>Click me</button>;
```
3. Responsive variants configuration (optional): If you want to use responsive variants
you need to add the Tailwind Variants `wrapper` to your TailwindCSS config file `tailwind.config.js`.
```js
// tailwind.config.js
const {withTV} = require("tailwind-variants/transformer");
/** @type {import('tailwindcss').Config} */
module.exports = withTV({
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {},
},
plugins: [],
});
```
If you're using a custom path to import Tailwind variants, such as creating a custom tv instance with `createTV`, it's recommended to include this path in the transformer configuration:
```js
// tailwind.config.js
const {withTV} = require("tailwind-variants/transformer");
/** @type {import('tailwindcss').Config} */
module.exports = withTV(
{
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {},
},
plugins: [],
},
{
aliases: ["@/lib/tv"],
},
);
```
## Acknowledgements
- [**cva**](https://github.com/joe-bell/cva) ([Joe Bell](https://github.com/joe-bell))
This project as started as an extension of Joe's work on `cva` – a great tool for generating variants for a single element with Tailwind CSS. Big shoutout to [Joe Bell](https://github.com/joe-bell) and [contributors](https://github.com/joe-bell/cva/graphs/contributors) you guys rock! 🤘 - we recommend to use `cva` if don't need any of the **Tailwind Variants** features listed [here](https://www.tailwind-variants.org/docs/comparison).
- [**Stitches**](https://stitches.dev/) ([Modulz](https://modulz.app))
The pioneers of the `variants` API movement. Inmense thanks to [Modulz](https://modulz.app) for their work on Stitches and the community around it. 🙏
## Community
We're excited to see the community adopt HeroUI, raise issues, and provide feedback. Whether it's a feature request, bug report, or a project to showcase, please get involved!
- [Discord](https://discord.gg/9b6yyZKmH4)
- [Twitter](https://twitter.com/getnextui)
- [GitHub Discussions](https://github.com/heroui-inc/tailwind-variants/discussions)
## Contributing
Contributions are always welcome!
Please follow our [contributing guidelines](./CONTRIBUTING.md).
Please adhere to this project's [CODE_OF_CONDUCT](./CODE_OF_CONDUCT.md).
## Authors
- Junior garcia ([@jrgarciadev](https://github.com/jrgaciadev))
- Tianen Pang ([@tianenpang](https://github.com/tianenpang))
## License
Licensed under the MIT License.
See [LICENSE](./LICENSE.md) for more information.
@@ -0,0 +1,35 @@
'use strict';
var assert = require('assert');
var path = require('path');
var resolve = require('resolve');
var basedir = __dirname + '/node_modules/@my-scope/package-b';
var expected = path.join(__dirname, '../../node_modules/jquery/dist/jquery.js');
/*
* preserveSymlinks === false
* will search NPM package from
* - packages/package-b/node_modules
* - packages/node_modules
* - node_modules
*/
assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: false }), expected);
assert.equal(resolve.sync('../../node_modules/jquery', { basedir: basedir, preserveSymlinks: false }), expected);
/*
* preserveSymlinks === true
* will search NPM package from
* - packages/package-a/node_modules/@my-scope/packages/package-b/node_modules
* - packages/package-a/node_modules/@my-scope/packages/node_modules
* - packages/package-a/node_modules/@my-scope/node_modules
* - packages/package-a/node_modules/node_modules
* - packages/package-a/node_modules
* - packages/node_modules
* - node_modules
*/
assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: true }), expected);
assert.equal(resolve.sync('../../../../../node_modules/jquery', { basedir: basedir, preserveSymlinks: true }), expected);
console.log(' * all monorepo paths successfully resolved through symlinks');
@@ -0,0 +1,17 @@
let Declaration = require('../declaration')
class Animation extends Declaration {
/**
* Don’t add prefixes for modern values.
*/
check(decl) {
return !decl.value.split(/\s+/).some(i => {
let lower = i.toLowerCase()
return lower === 'reverse' || lower === 'alternate-reverse'
})
}
}
Animation.names = ['animation', 'animation-direction']
module.exports = Animation
@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACpC,cAAc,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC;IACX,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,MAAM,CAAC;CAGlB;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EAAE,CAAC;CAGzC;AAED,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAY,SAAQ,GAAG;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;CACpB;AAKD,MAAM,MAAM,OAAO,GACf;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC"}
@@ -0,0 +1,148 @@
import { noop } from '@internal/listenerMiddleware/utils'
import { configureStore } from '@reduxjs/toolkit'
import { createApi, fakeBaseQuery } from '@reduxjs/toolkit/query'
type CustomErrorType = { type: 'Custom' }
const api = createApi({
baseQuery: fakeBaseQuery<CustomErrorType>(),
endpoints: (build) => ({
withQuery: build.query<string, string>({
// @ts-expect-error
query(arg: string) {
return `resultFrom(${arg})`
},
// @ts-expect-error
transformResponse(response) {
return response.wrappedByBaseQuery
},
}),
withQueryFn: build.query<string, string>({
queryFn(arg: string) {
return { data: `resultFrom(${arg})` }
},
}),
withInvalidDataQueryFn: build.query<string, string>({
// @ts-expect-error
queryFn(arg: string) {
return { data: 5 }
},
}),
withErrorQueryFn: build.query<string, string>({
queryFn(arg: string) {
return { error: { type: 'Custom' } }
},
}),
withInvalidErrorQueryFn: build.query<string, string>({
// @ts-expect-error
queryFn(arg: string) {
return { error: 5 }
},
}),
withAsyncQueryFn: build.query<string, string>({
async queryFn(arg: string) {
return { data: `resultFrom(${arg})` }
},
}),
withInvalidDataAsyncQueryFn: build.query<string, string>({
// @ts-expect-error
async queryFn(arg: string) {
return { data: 5 }
},
}),
withAsyncErrorQueryFn: build.query<string, string>({
async queryFn(arg: string) {
return { error: { type: 'Custom' } }
},
}),
withInvalidAsyncErrorQueryFn: build.query<string, string>({
// @ts-expect-error
async queryFn(arg: string) {
return { error: 5 }
},
}),
mutationWithQueryFn: build.mutation<string, string>({
queryFn(arg: string) {
return { data: `resultFrom(${arg})` }
},
}),
mutationWithInvalidDataQueryFn: build.mutation<string, string>({
// @ts-expect-error
queryFn(arg: string) {
return { data: 5 }
},
}),
mutationWithErrorQueryFn: build.mutation<string, string>({
queryFn(arg: string) {
return { error: { type: 'Custom' } }
},
}),
mutationWithInvalidErrorQueryFn: build.mutation<string, string>({
// @ts-expect-error
queryFn(arg: string) {
return { error: 5 }
},
}),
mutationWithAsyncQueryFn: build.mutation<string, string>({
async queryFn(arg: string) {
return { data: `resultFrom(${arg})` }
},
}),
mutationWithInvalidAsyncQueryFn: build.mutation<string, string>({
// @ts-expect-error
async queryFn(arg: string) {
return { data: 5 }
},
}),
mutationWithAsyncErrorQueryFn: build.mutation<string, string>({
async queryFn(arg: string) {
return { error: { type: 'Custom' } }
},
}),
mutationWithInvalidAsyncErrorQueryFn: build.mutation<string, string>({
// @ts-expect-error
async queryFn(arg: string) {
return { error: 5 }
},
}),
// @ts-expect-error
withNeither: build.query<string, string>({}),
// @ts-expect-error
mutationWithNeither: build.mutation<string, string>({}),
}),
})
const store = configureStore({
reducer: {
[api.reducerPath]: api.reducer,
},
middleware: (gDM) => gDM({}).concat(api.middleware),
})
test('fakeBaseQuery throws when invoking query', async () => {
const consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(noop)
const thunk = api.endpoints.withQuery.initiate('')
const result = await store.dispatch(thunk)
expect(consoleErrorSpy).toHaveBeenCalledOnce()
expect(consoleErrorSpy).toHaveBeenLastCalledWith(
`An unhandled error occurred processing a request for the endpoint "withQuery".\nIn the case of an unhandled error, no tags will be "provided" or "invalidated".`,
Error(
'When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.',
),
)
expect(result!.error).toEqual({
message:
'When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.',
name: 'Error',
stack: expect.any(String),
})
consoleErrorSpy.mockRestore()
})
@@ -0,0 +1 @@
{"name":"logform","version":"2.7.0","requiresBuild":false,"files":{".babelrc":{"checkedAt":1794532101285,"integrity":"sha512-TXjDiXzzS3JjD6lHJ8I5ULkD/Dv3FCFVeSUv/4bcsssGk+Oh3cq26b0oj65//paomZRjGGej7oI1Gnz2paPsDg==","mode":420,"size":39},".eslintrc":{"checkedAt":1794532101285,"integrity":"sha512-AfusQ9O3xQJvaTjZ5m66yIMaqFR0XZCx0Sedf8KQRMg/n8UoV1NE9xahF9mIO1wkRvlTxj0pAkFno9YEN7tdyQ==","mode":420,"size":105},".gitattributes":{"checkedAt":1794532101286,"integrity":"sha512-NvupX4GatvfOEyiT/TiqykbYNiuJlvNDGLiBjRzxNxfaYXvtoOXXSYVOvttQZIZx5K74xwmo9O+c+dCOWb4HTw==","mode":420,"size":25},"LICENSE":{"checkedAt":1794532101286,"integrity":"sha512-4z2hZ24Hu+eSBfhdkqbsWWlPzrZ9h9/qnZn5gbZ1V1qHUS9GO/PNst3eOe2A7MwrBvdNW1jSOFZtajVEuW+a4A==","mode":420,"size":1092},"align.js":{"checkedAt":1794532101286,"integrity":"sha512-NEUlOy9yweMKmlDAyWjiQRNAx1hewqflB/TFtbzNQ3jLHhSvYxiu8frk29nCSJOytgTz1PSv6IfaXk5B0IMh7A==","mode":420,"size":367},"dist/align.js":{"checkedAt":1794532101286,"integrity":"sha512-rEZeQcewlnW4adljDKiUArhF6/BIVER6yBhztORf0u4CmnMykaE4zHRDnYmQS+5QxB9dvuubIjNHZ/LEmRAHww==","mode":420,"size":378},"browser.js":{"checkedAt":1794532101286,"integrity":"sha512-/1aDNWURZb+tfrgIvWDvHtsWfOnes7h/5tqg1RJegJjJP3PUs49gWRQ2RLdHHgWq4DUSqDsfWVMCLJft34F2MQ==","mode":420,"size":1764},"dist/browser.js":{"checkedAt":1794532101286,"integrity":"sha512-Mva0C8rkK0NasG0YBmuJxw7kaa1A1cyPLCXMC14snPdXP8SAeZnUv01bKiUkEzCnWwWOwaXBq+/NYHS1YGORBg==","mode":420,"size":1720},"cli.js":{"checkedAt":1794532101287,"integrity":"sha512-vOpJbcrdMN2XjerBiBdtRP0Z5B3BeHw/npSMwvqumVJ6XpX7qV1f/BYKzQo9LyHPEacIReaxcXc9lXHJoHu/Vg==","mode":420,"size":1216},"dist/cli.js":{"checkedAt":1794532101287,"integrity":"sha512-2Y/uee8MwOmoLhCZQybo++RldfzSuX/Pl0k4uZD0cGXqv/1TS0TAQKwcRCQD+QqmZyVB7sXEHvlsWZx6igCbkQ==","mode":420,"size":2842},"colorize.js":{"checkedAt":1794532101287,"integrity":"sha512-ULg5EH0wDTI8LZps3ZdFqKEq2Af5UwH/Kg4jcp5ThYcItnLvIQ6K9PLOILnS2Okawe3khd5gqKxvmpFDieR5rQ==","mode":420,"size":3038},"dist/colorize.js":{"checkedAt":1794532101287,"integrity":"sha512-PE3Xxhvsb8ooMG3RuVQtHBhqMeu0n3ibRfmwsR24uQgcvwQ/mM0j5UPGgJmHV6KRi6Q8V8oZxP2hCgn3jcQC0A==","mode":420,"size":4822},"combine.js":{"checkedAt":1794532101287,"integrity":"sha512-gr9O5JDtZoow8vh4k2/KbivREQJ4qEgYeN81URVGVHYo9LG+n3AN+N/BR/JadvbcGJ34e5TgrWWBWUGYC+XAjg==","mode":420,"size":1801},"dist/combine.js":{"checkedAt":1794532101287,"integrity":"sha512-TdYhzV8z3McQKKn90JII1wjU1c99N7lpeTY1mx9N2R58rhsEs/DAr/j73Nsm9lkvT2H+Nm5oO8foCYhKpojrdg==","mode":420,"size":1908},"dist/errors.js":{"checkedAt":1794532101287,"integrity":"sha512-GHuNV9K6g8Vo6pJlB71kHdNjeKlhxc9Rg201UkswsG8C+Zva3/Hn4HVpaWcmjUzy7M5T8fSmHpTUIuX2hPEG6A==","mode":420,"size":2253},"errors.js":{"checkedAt":1794532101288,"integrity":"sha512-5UeYnormewu0ML5L8wHa46Qq6bj4mAtIBVlVEvLoWiJfUChBdb8ZXEceCkil1JfZr5LYSYzO7iQb6jDcHvo84A==","mode":420,"size":1216},"dist/format.js":{"checkedAt":1794532101288,"integrity":"sha512-Kw2bRNc03R14NkDNhtX8PVOoWvNd4aQ0f+Ew4LY3WqaYYe9xTGZ1RRhJyubsyG76CSEpujGyZjTWn6+dWsPQUg==","mode":420,"size":5426},"format.js":{"checkedAt":1794532101288,"integrity":"sha512-LYYxfV1eK9kKsrNZn9oXl+vluSuRD5YJabxqwUoZFNlHGd3JEGb/BKD7boBId0BYXs7wHwyvM2TJslkApVOl1A==","mode":420,"size":1168},"dist/index.js":{"checkedAt":1794532101288,"integrity":"sha512-Oei9OkixkKYf5ZrVptpHv/+NXbAkacvy/KQVtM4QkfijQw9k0aXH7uC3kJH8zsN7+gKs6fGn9H2DBnsyQbr0vw==","mode":420,"size":1918},"index.js":{"checkedAt":1794532101288,"integrity":"sha512-7RWX6woC2bNljG4J4tyl3ZJU8HUKnnCh+n/+eDl/u8eBAmRe2l7rc34pCsY8tybzdEQ31vplt0TGBq8Z/iftsQ==","mode":420,"size":1873},"dist/json.js":{"checkedAt":1794532101288,"integrity":"sha512-NoI31vkgSuy7iSvh3iVFiv3JO3+OIH4XEK+3LPOnri0C+Jwm0qx6nAMR9Dx9pX3fxszLd9of3B7FuUch56QjYQ==","mode":420,"size":1003},"json.js":{"checkedAt":1794532101288,"integrity":"sha512-qEnrPHBsCBdC7w8MfbHZYq9JKR6asXxzO3A/KWhA3Iw+pHwjcsmscBE4Om5w/Y7yqWm/jp+XmcXwvwxxEWlhRw==","mode":420,"size":983},"dist/label.js":{"checkedAt":1794532101288,"integrity":"sha512-6x12TuzhHeBe58aAmSfgHhLd3L42gNGKrR5qBIbTBO388og3OTZNt7HDYJ/dstA1i9asf6HZ0tyooA8OnMZbTg==","mode":420,"size":487},"label.js":{"checkedAt":1794532101289,"integrity":"sha512-NuDFq6Uv8biepjHsm1g95V9pNVg1ee1FHm8IPhJhwS3VUtqTOGjJTdtDt2IvTV9HEooDJt3bJIZRfXofRA7exA==","mode":420,"size":469},"dist/levels.js":{"checkedAt":1794532101289,"integrity":"sha512-56apfUD+DSJV2qMA4nYHI93JAI2A619wb4KOhYvTHYeEgtp76XekE7tBrkXhltkULCnfdemeQ+eHLdrOHEuh6A==","mode":420,"size":285},"levels.js":{"checkedAt":1794532101289,"integrity":"sha512-pRnKzhXeq61fV9t4iUIpCJHtBOWUKzA6dRR2tjrpj9+iunuhzEGmYL+vJQyUOQWsyu3SrKZVR37m7wz0UdBuMg==","mode":420,"size":251},"dist/logstash.js":{"checkedAt":1794532101289,"integrity":"sha512-UIlepZf04aVGsEgfw+lhuA5il7zFqIEltdatERes/KEllDZ68bz1v9WUSHSO3qyTR89AsO48LV/ln/YR8BjAnw==","mode":420,"size":783},"logstash.js":{"checkedAt":1794532101289,"integrity":"sha512-xLL7eHp6hacAKXVTjkC972lsNf2oyArN5v+GqNea9xUG0ha41eOP4fT5sSa9LQRIQw+hAFPORVkzhv9JJf20kw==","mode":420,"size":759},"dist/metadata.js":{"checkedAt":179453210128Line truncated
@@ -0,0 +1,80 @@
import type { SourceMapSegment } from './sourcemap-segment.mts';
import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping, Ro } from './types.mts';
export type { SourceMapSegment } from './sourcemap-segment.mts';
export type { SourceMap, DecodedSourceMap, EncodedSourceMap, Section, SectionedSourceMap, SourceMapV3, Bias, EachMapping, GeneratedMapping, InvalidGeneratedMapping, InvalidOriginalMapping, Needle, OriginalMapping, OriginalMapping as Mapping, SectionedSourceMapInput, SourceMapInput, SourceNeedle, XInput, EncodedSourceMapXInput, DecodedSourceMapXInput, SectionedSourceMapXInput, SectionXInput, } from './types.mts';
export declare const LEAST_UPPER_BOUND = -1;
export declare const GREATEST_LOWER_BOUND = 1;
export { FlattenMap, FlattenMap as AnyMap } from './flatten-map.mts';
export declare class TraceMap implements SourceMap {
version: SourceMapV3['version'];
file: SourceMapV3['file'];
names: SourceMapV3['names'];
sourceRoot: SourceMapV3['sourceRoot'];
sources: SourceMapV3['sources'];
sourcesContent: SourceMapV3['sourcesContent'];
ignoreList: SourceMapV3['ignoreList'];
resolvedSources: string[];
private _encoded;
private _decoded;
private _decodedMemo;
private _bySources;
private _bySourceMemos;
constructor(map: Ro<SourceMapInput>, mapUrl?: string | null);
}
/**
* Returns the encoded (VLQ string) form of the SourceMap's mappings field.
*/
export declare function encodedMappings(map: TraceMap): EncodedSourceMap['mappings'];
/**
* Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
*/
export declare function decodedMappings(map: TraceMap): Readonly<DecodedSourceMap['mappings']>;
/**
* A low-level API to find the segment associated with a generated line/column (think, from a
* stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
*/
export declare function traceSegment(map: TraceMap, line: number, column: number): Readonly<SourceMapSegment> | null;
/**
* A higher-level API to find the source/line/column associated with a generated line/column
* (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
* `source-map` library.
*/
export declare function originalPositionFor(map: TraceMap, needle: Needle): OriginalMapping | InvalidOriginalMapping;
/**
* Finds the generated line/column position of the provided source/line/column source position.
*/
export declare function generatedPositionFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping | InvalidGeneratedMapping;
/**
* Finds all generated line/column positions of the provided source/line/column source position.
*/
export declare function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[];
/**
* Iterates each mapping in generated position order.
*/
export declare function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void;
/**
* Retrieves the source content for a particular source, if its found. Returns null if not.
*/
export declare function sourceContentFor(map: TraceMap, source: string): string | null;
/**
* Determines if the source is marked to ignore by the source map.
*/
export declare function isIgnored(map: TraceMap, source: string): boolean;
/**
* A helper that skips sorting of the input map's mappings array, which can be expensive for larger
* maps.
*/
export declare function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap;
/**
* Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function decodedMap(map: TraceMap): Omit<DecodedSourceMap, 'mappings'> & {
mappings: readonly SourceMapSegment[][];
};
/**
* Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function encodedMap(map: TraceMap): EncodedSourceMap;
//# sourceMappingURL=trace-mapping.d.ts.map
@@ -0,0 +1,163 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {DOMAttributes, RefObject} from '@react-types/shared';
import {isElementInChildOfActiveScope} from '@react-aria/focus';
import {useEffect} from 'react';
import {useFocusWithin, useInteractOutside} from '@react-aria/interactions';
export interface AriaOverlayProps {
/** Whether the overlay is currently open. */
isOpen?: boolean,
/** Handler that is called when the overlay should close. */
onClose?: () => void,
/**
* Whether to close the overlay when the user interacts outside it.
* @default false
*/
isDismissable?: boolean,
/** Whether the overlay should close when focus is lost or moves outside it. */
shouldCloseOnBlur?: boolean,
/**
* Whether pressing the escape key to close the overlay should be disabled.
* @default false
*/
isKeyboardDismissDisabled?: boolean,
/**
* When user interacts with the argument element outside of the overlay ref,
* return true if onClose should be called. This gives you a chance to filter
* out interaction with elements that should not dismiss the overlay.
* By default, onClose will always be called on interaction outside the overlay ref.
*/
shouldCloseOnInteractOutside?: (element: Element) => boolean
}
export interface OverlayAria {
/** Props to apply to the overlay container element. */
overlayProps: DOMAttributes,
/** Props to apply to the underlay element, if any. */
underlayProps: DOMAttributes
}
const visibleOverlays: RefObject<Element | null>[] = [];
/**
* Provides the behavior for overlays such as dialogs, popovers, and menus.
* Hides the overlay when the user interacts outside it, when the Escape key is pressed,
* or optionally, on blur. Only the top-most overlay will close at once.
*/
export function useOverlay(props: AriaOverlayProps, ref: RefObject<Element | null>): OverlayAria {
let {
onClose,
shouldCloseOnBlur,
isOpen,
isDismissable = false,
isKeyboardDismissDisabled = false,
shouldCloseOnInteractOutside
} = props;
// Add the overlay ref to the stack of visible overlays on mount, and remove on unmount.
useEffect(() => {
if (isOpen) {
visibleOverlays.push(ref);
}
return () => {
let index = visibleOverlays.indexOf(ref);
if (index >= 0) {
visibleOverlays.splice(index, 1);
}
};
}, [isOpen, ref]);
// Only hide the overlay when it is the topmost visible overlay in the stack
let onHide = () => {
if (visibleOverlays[visibleOverlays.length - 1] === ref && onClose) {
onClose();
}
};
let onInteractOutsideStart = (e: PointerEvent) => {
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target as Element)) {
if (visibleOverlays[visibleOverlays.length - 1] === ref) {
e.stopPropagation();
e.preventDefault();
}
}
};
let onInteractOutside = (e: PointerEvent) => {
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target as Element)) {
if (visibleOverlays[visibleOverlays.length - 1] === ref) {
e.stopPropagation();
e.preventDefault();
}
onHide();
}
};
// Handle the escape key
let onKeyDown = (e) => {
if (e.key === 'Escape' && !isKeyboardDismissDisabled && !e.nativeEvent.isComposing) {
e.stopPropagation();
e.preventDefault();
onHide();
}
};
// Handle clicking outside the overlay to close it
useInteractOutside({ref, onInteractOutside: isDismissable && isOpen ? onInteractOutside : undefined, onInteractOutsideStart});
let {focusWithinProps} = useFocusWithin({
isDisabled: !shouldCloseOnBlur,
onBlurWithin: (e) => {
// Do not close if relatedTarget is null, which means focus is lost to the body.
// That can happen when switching tabs, or due to a VoiceOver/Chrome bug with Control+Option+Arrow navigation.
// Clicking on the body to close the overlay should already be handled by useInteractOutside.
// https://github.com/adobe/react-spectrum/issues/4130
// https://github.com/adobe/react-spectrum/issues/4922
//
// If focus is moving into a child focus scope (e.g. menu inside a dialog),
// do not close the outer overlay. At this point, the active scope should
// still be the outer overlay, since blur events run before focus.
if (!e.relatedTarget || isElementInChildOfActiveScope(e.relatedTarget)) {
return;
}
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget as Element)) {
onClose?.();
}
}
});
let onPointerDownUnderlay = e => {
// fixes a firefox issue that starts text selection https://bugzilla.mozilla.org/show_bug.cgi?id=1675846
if (e.target === e.currentTarget) {
e.preventDefault();
}
};
return {
overlayProps: {
onKeyDown,
...focusWithinProps
},
underlayProps: {
onPointerDown: onPointerDownUnderlay
}
};
}
@@ -0,0 +1,12 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2017_arraybuffer = void 0;
const base_config_1 = require("./base-config");
exports.es2017_arraybuffer = {
libs: [],
variables: [['ArrayBufferConstructor', base_config_1.TYPE]],
};
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('curry', require('../curry'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
var _typeof = require("./typeof.js")["default"];
function toPrimitive(t, r) {
if ("object" != _typeof(t) || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r || "default");
if ("object" != _typeof(i)) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,50 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = times;
var _timesLimit = require('./timesLimit.js');
var _timesLimit2 = _interopRequireDefault(_timesLimit);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Calls the `iteratee` function `n` times, and accumulates results in the same
* manner you would use with [map]{@link module:Collections.map}.
*
* @name times
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.map]{@link module:Collections.map}
* @category Control Flow
* @param {number} n - The number of times to run the function.
* @param {AsyncFunction} iteratee - The async function to call `n` times.
* Invoked with the iteration index and a callback: (n, next).
* @param {Function} callback - see {@link module:Collections.map}.
* @returns {Promise} a promise, if no callback is provided
* @example
*
* // Pretend this is some complicated async factory
* var createUser = function(id, callback) {
* callback(null, {
* id: 'user' + id
* });
* };
*
* // generate 5 users
* async.times(5, function(n, next) {
* createUser(n, function(err, user) {
* next(err, user);
* });
* }, function(err, users) {
* // we should now have 5 users
* });
*/
function times(n, iteratee, callback) {
return (0, _timesLimit2.default)(n, Infinity, iteratee, callback);
}
module.exports = exports.default;
@@ -0,0 +1,26 @@
import baseIteratee from './_baseIteratee.js';
import baseSortedUniq from './_baseSortedUniq.js';
/**
* This method is like `_.uniqBy` except that it's designed and optimized
* for sorted arrays.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
* // => [1.1, 2.3]
*/
function sortedUniqBy(array, iteratee) {
return (array && array.length)
? baseSortedUniq(array, baseIteratee(iteratee, 2))
: [];
}
export default sortedUniqBy;
@@ -0,0 +1,44 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Time = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
let Time = class Time {
constructor(time) {
if (time) {
if (typeof time === "string" || typeof time === "number" || time instanceof Date) {
const date = new Date(time);
if (date.getUTCFullYear() > 2049) {
this.generalTime = date;
}
else {
this.utcTime = date;
}
}
else {
Object.assign(this, time);
}
}
}
getTime() {
const time = this.utcTime || this.generalTime;
if (!time) {
throw new Error("Cannot get time from CHOICE object");
}
return time;
}
};
exports.Time = Time;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({
type: asn1_schema_1.AsnPropTypes.UTCTime,
})
], Time.prototype, "utcTime", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({
type: asn1_schema_1.AsnPropTypes.GeneralizedTime,
})
], Time.prototype, "generalTime", void 0);
exports.Time = Time = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Choice })
], Time);
@@ -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/safe-regex-test
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,8 @@
import { id_bagtypes } from "../object_identifiers";
export const id_keyBag = `${id_bagtypes}.1`;
export const id_pkcs8ShroudedKeyBag = `${id_bagtypes}.2`;
export const id_certBag = `${id_bagtypes}.3`;
export const id_CRLBag = `${id_bagtypes}.4`;
export const id_SecretBag = `${id_bagtypes}.5`;
export const id_SafeContents = `${id_bagtypes}.6`;
export const id_pkcs_9 = "1.2.840.113549.1.9";
@@ -0,0 +1,62 @@
"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 (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.coerce = exports.ZodMiniISODuration = exports.ZodMiniISOTime = exports.ZodMiniISODate = exports.ZodMiniISODateTime = exports.iso = exports.locales = exports.NEVER = exports.TimePrecision = exports.toJSONSchema = exports.flattenError = exports.formatError = exports.prettifyError = exports.treeifyError = exports.regexes = exports.clone = exports.function = exports.$brand = exports.$input = exports.$output = exports.config = exports.registry = exports.globalRegistry = exports.core = void 0;
exports.core = __importStar(require("../core/index.cjs"));
__exportStar(require("./parse.cjs"), exports);
__exportStar(require("./schemas.cjs"), exports);
__exportStar(require("./checks.cjs"), exports);
var index_js_1 = require("../core/index.cjs");
Object.defineProperty(exports, "globalRegistry", { enumerable: true, get: function () { return index_js_1.globalRegistry; } });
Object.defineProperty(exports, "registry", { enumerable: true, get: function () { return index_js_1.registry; } });
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return index_js_1.config; } });
Object.defineProperty(exports, "$output", { enumerable: true, get: function () { return index_js_1.$output; } });
Object.defineProperty(exports, "$input", { enumerable: true, get: function () { return index_js_1.$input; } });
Object.defineProperty(exports, "$brand", { enumerable: true, get: function () { return index_js_1.$brand; } });
Object.defineProperty(exports, "function", { enumerable: true, get: function () { return index_js_1.function; } });
Object.defineProperty(exports, "clone", { enumerable: true, get: function () { return index_js_1.clone; } });
Object.defineProperty(exports, "regexes", { enumerable: true, get: function () { return index_js_1.regexes; } });
Object.defineProperty(exports, "treeifyError", { enumerable: true, get: function () { return index_js_1.treeifyError; } });
Object.defineProperty(exports, "prettifyError", { enumerable: true, get: function () { return index_js_1.prettifyError; } });
Object.defineProperty(exports, "formatError", { enumerable: true, get: function () { return index_js_1.formatError; } });
Object.defineProperty(exports, "flattenError", { enumerable: true, get: function () { return index_js_1.flattenError; } });
Object.defineProperty(exports, "toJSONSchema", { enumerable: true, get: function () { return index_js_1.toJSONSchema; } });
Object.defineProperty(exports, "TimePrecision", { enumerable: true, get: function () { return index_js_1.TimePrecision; } });
Object.defineProperty(exports, "NEVER", { enumerable: true, get: function () { return index_js_1.NEVER; } });
exports.locales = __importStar(require("../locales/index.cjs"));
/** A special constant with type `never` */
// export const NEVER = {} as never;
// iso
exports.iso = __importStar(require("./iso.cjs"));
var iso_js_1 = require("./iso.cjs");
Object.defineProperty(exports, "ZodMiniISODateTime", { enumerable: true, get: function () { return iso_js_1.ZodMiniISODateTime; } });
Object.defineProperty(exports, "ZodMiniISODate", { enumerable: true, get: function () { return iso_js_1.ZodMiniISODate; } });
Object.defineProperty(exports, "ZodMiniISOTime", { enumerable: true, get: function () { return iso_js_1.ZodMiniISOTime; } });
Object.defineProperty(exports, "ZodMiniISODuration", { enumerable: true, get: function () { return iso_js_1.ZodMiniISODuration; } });
// coerce
exports.coerce = __importStar(require("./coerce.cjs"));
@@ -0,0 +1,10 @@
"use strict";
function _array_like_to_array(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
exports._ = _array_like_to_array;
@@ -0,0 +1,72 @@
{
"name": "is-set",
"version": "2.0.3",
"description": "Is this value a JS Set? This module works cross-realm/iframe, and despite ES6 @@toStringTag.",
"main": "index.js",
"sideEffects": false,
"scripts": {
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"pretest": "npm run lint",
"lint": "eslint --ext=.js,.mjs .",
"postlint": "tsc -p . && attw -P",
"tests-only": "nyc tape 'test/**/*.js'",
"tests:shims": "nyc tape --require=es5-shim --require=es5-shim 'test/**/*.js'",
"tests:corejs": "nyc tape --require=core-js 'test/**/*.js'",
"test": "npm run tests-only && npm run tests:shims && npm run tests:corejs",
"posttest": "npx aud --production"
},
"repository": {
"type": "git",
"url": "git+https://github.com/inspect-js/is-set.git"
},
"keywords": [
"map",
"set",
"collection",
"is",
"robust"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/inspect-js/is-set/issues"
},
"homepage": "https://github.com/inspect-js/is-set#readme",
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.0",
"@ljharb/eslint-config": "^21.1.0",
"@types/for-each": "^0.3.3",
"@types/object-inspect": "^1.8.4",
"@types/tape": "^5.6.4",
"aud": "^2.0.4",
"auto-changelog": "^2.4.0",
"core-js": "^2.6.12",
"es5-shim": "^4.6.7",
"es6-shim": "^0.35.8",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.1",
"safe-publish-latest": "^2.0.0",
"tape": "^5.7.5",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"engines": {
"node": ">= 0.4"
}
}
@@ -0,0 +1,96 @@
var $49f0d9486c2408aa$exports = require("./getScrollParents.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, "scrollIntoView", () => $449412113267a1fe$export$53a0910f038337bd);
$parcel$export(module.exports, "scrollIntoViewport", () => $449412113267a1fe$export$c826860796309d1b);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $449412113267a1fe$export$53a0910f038337bd(scrollView, element) {
let offsetX = $449412113267a1fe$var$relativeOffset(scrollView, element, 'left');
let offsetY = $449412113267a1fe$var$relativeOffset(scrollView, element, 'top');
let width = element.offsetWidth;
let height = element.offsetHeight;
let x = scrollView.scrollLeft;
let y = scrollView.scrollTop;
// Account for top/left border offsetting the scroll top/Left
let { borderTopWidth: borderTopWidth, borderLeftWidth: borderLeftWidth } = getComputedStyle(scrollView);
let borderAdjustedX = scrollView.scrollLeft + parseInt(borderLeftWidth, 10);
let borderAdjustedY = scrollView.scrollTop + parseInt(borderTopWidth, 10);
// Ignore end/bottom border via clientHeight/Width instead of offsetHeight/Width
let maxX = borderAdjustedX + scrollView.clientWidth;
let maxY = borderAdjustedY + scrollView.clientHeight;
if (offsetX <= x) x = offsetX - parseInt(borderLeftWidth, 10);
else if (offsetX + width > maxX) x += offsetX + width - maxX;
if (offsetY <= borderAdjustedY) y = offsetY - parseInt(borderTopWidth, 10);
else if (offsetY + height > maxY) y += offsetY + height - maxY;
scrollView.scrollLeft = x;
scrollView.scrollTop = y;
}
/**
* Computes the offset left or top from child to ancestor by accumulating
* offsetLeft or offsetTop through intervening offsetParents.
*/ function $449412113267a1fe$var$relativeOffset(ancestor, child, axis) {
const prop = axis === 'left' ? 'offsetLeft' : 'offsetTop';
let sum = 0;
while(child.offsetParent){
sum += child[prop];
if (child.offsetParent === ancestor) break;
else if (child.offsetParent.contains(ancestor)) {
// If the ancestor is not `position:relative`, then we stop at
// _its_ offset parent, and we subtract off _its_ offset, so that
// we end up with the proper offset from child to ancestor.
sum -= ancestor[prop];
break;
}
child = child.offsetParent;
}
return sum;
}
function $449412113267a1fe$export$c826860796309d1b(targetElement, opts) {
if (targetElement && document.contains(targetElement)) {
let root = document.scrollingElement || document.documentElement;
let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden';
// If scrolling is not currently prevented then we aren’t in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view
if (!isScrollPrevented) {
var // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()
// won't cause a scroll if the element is already focused and doesn't behave consistently when an element is partially out of view horizontally vs vertically
_targetElement_scrollIntoView;
let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
targetElement === null || targetElement === void 0 ? void 0 : (_targetElement_scrollIntoView = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView === void 0 ? void 0 : _targetElement_scrollIntoView.call(targetElement, {
block: 'nearest'
});
let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
// Account for sub pixel differences from rounding
if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
var _opts_containingElement_scrollIntoView, _opts_containingElement, _targetElement_scrollIntoView1;
opts === null || opts === void 0 ? void 0 : (_opts_containingElement = opts.containingElement) === null || _opts_containingElement === void 0 ? void 0 : (_opts_containingElement_scrollIntoView = _opts_containingElement.scrollIntoView) === null || _opts_containingElement_scrollIntoView === void 0 ? void 0 : _opts_containingElement_scrollIntoView.call(_opts_containingElement, {
block: 'center',
inline: 'center'
});
(_targetElement_scrollIntoView1 = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView1 === void 0 ? void 0 : _targetElement_scrollIntoView1.call(targetElement, {
block: 'nearest'
});
}
} else {
let scrollParents = (0, $49f0d9486c2408aa$exports.getScrollParents)(targetElement);
// If scrolling is prevented, we don't want to scroll the body since it might move the overlay partially offscreen and the user can't scroll it back into view.
for (let scrollParent of scrollParents)$449412113267a1fe$export$53a0910f038337bd(scrollParent, targetElement);
}
}
}
//# sourceMappingURL=scrollIntoView.main.js.map
@@ -0,0 +1 @@
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["version.js"],"names":[],"mappings":"AAmLA,0EAEC;AAED,yEAEC;AAvKD,yCAEC;AAID,6CAEC;AA6BD,4CAEC"}
@@ -0,0 +1,65 @@
import { LocaleData } from './core';
type LanguageTag = string;
type RegionCode = string;
type ScriptCode = string;
type CurrencyCode = string;
type CalendarCode = string;
type DateTimeFieldCode = string;
export interface DisplayNamesData {
/**
* Note that for style fields, `short` and `narrow` might not exist.
* At runtime, the fallback order will be narrow -> short -> long.
*/
types: {
/**
* Maps language subtag like `zh-CN` to their display names.
*/
language: {
dialect: {
narrow: Record<LanguageTag, string>;
short: Record<LanguageTag, string>;
long: Record<LanguageTag, string>;
};
standard: {
narrow: Record<LanguageTag, string>;
short: Record<LanguageTag, string>;
long: Record<LanguageTag, string>;
};
};
region: {
narrow: Record<RegionCode, string>;
short: Record<RegionCode, string>;
long: Record<RegionCode, string>;
};
script: {
narrow: Record<ScriptCode, string>;
short: Record<ScriptCode, string>;
long: Record<ScriptCode, string>;
};
currency: {
narrow: Record<CurrencyCode, string>;
short: Record<CurrencyCode, string>;
long: Record<CurrencyCode, string>;
};
calendar: {
narrow: Record<CalendarCode, string>;
short: Record<CalendarCode, string>;
long: Record<CalendarCode, string>;
};
dateTimeField: {
narrow: Record<DateTimeFieldCode, string>;
short: Record<DateTimeFieldCode, string>;
long: Record<DateTimeFieldCode, string>;
};
};
/**
* Not in spec, but we need this to display both language and region in display name.
* e.g. zh-Hans-SG + "{0}({1})" -> 简体中文(新加坡)
* Here {0} is replaced by language display name and {1} is replaced by region display name.
*/
patterns: {
locale: string;
};
}
export type DisplayNamesLocaleData = LocaleData<DisplayNamesData>;
export {};
@@ -0,0 +1 @@
{"version":3,"file":"optional.int.spec.d.ts","sourceRoot":"","sources":["../../../../src/metadata/decorators/optional.int.spec.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,CAAC"}
@@ -0,0 +1,22 @@
/**
* GraphemerIterator
*
* Takes a string and a "BreakHandler" method during initialisation
* and creates an iterable object that returns individual graphemes.
*
* @param str {string}
* @return GraphemerIterator
*/
declare class GraphemerIterator implements Iterator<string> {
private _index;
private _str;
private _nextBreak;
constructor(str: string, nextBreak: (str: string, index: number) => number);
[Symbol.iterator](): this;
next(): {
value: string;
done: boolean;
};
}
export default GraphemerIterator;
//# sourceMappingURL=GraphemerIterator.d.ts.map
@@ -0,0 +1,43 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _reject2 = require('./internal/reject.js');
var _reject3 = _interopRequireDefault(_reject2);
var _eachOfSeries = require('./eachOfSeries.js');
var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time.
*
* @name rejectSeries
* @static
* @memberOf module:Collections
* @method
* @see [async.reject]{@link module:Collections.reject}
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - An async truth test to apply to each item in
* `coll`.
* The should complete with a boolean value as its `result`.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Invoked with (err, results).
* @returns {Promise} a promise, if no callback is passed
*/
function rejectSeries(coll, iteratee, callback) {
return (0, _reject3.default)(_eachOfSeries2.default, coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(rejectSeries, 3);
module.exports = exports.default;
@@ -0,0 +1 @@
{"version":3,"file":"DynamicValueBinding.d.ts","sourceRoot":"","sources":["../../../../src/binding/models/DynamicValueBinding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,WAAW,mBAAmB,CAAC,UAAU,CAC7C,SAAQ,aAAa,CACnB,OAAO,iBAAiB,CAAC,YAAY,EACrC,YAAY,EACZ,UAAU,CACX;IACD,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC;CACjD"}
@@ -0,0 +1,74 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { RegExpValidator } = require("regexpp")
const { getRegExpCalls } = require("../utils")
/**
* Verify a given regular expression.
* @param {RuleContext} context The rule context to report.
* @param {Node} node The AST node to report.
* @param {string} pattern The pattern part of a RegExp.
* @param {string} flags The flags part of a RegExp.
* @returns {void}
*/
function verify(context, node, pattern, flags) {
try {
let found = false
new RegExpValidator({
onLookaroundAssertionEnter(_start, kind) {
if (kind === "lookbehind") {
found = true
}
},
}).validatePattern(pattern, 0, pattern.length, flags.includes("u"))
if (found) {
context.report({ node, messageId: "forbidden" })
}
} catch (error) {
//istanbul ignore else
if (error.message.startsWith("Invalid regular expression:")) {
return
}
//istanbul ignore next
throw error
}
}
module.exports = {
meta: {
docs: {
description: "disallow RegExp lookbehind assertions.",
category: "ES2018",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-regexp-lookbehind-assertions.html",
},
fixable: null,
messages: {
forbidden: "ES2018 RegExp lookbehind assertions are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Literal[regex]"(node) {
const { pattern, flags } = node.regex
verify(context, node, pattern || "", flags || "")
},
"Program:exit"() {
const scope = context.getScope()
for (const { node, pattern, flags } of getRegExpCalls(scope)) {
verify(context, node, pattern || "", flags || "")
}
},
}
},
}
@@ -0,0 +1,44 @@
'use strict';
var $TypeError = require('es-errors/type');
var CreateIterResultObject = require('es-abstract/2024/CreateIterResultObject');
var IsCallable = require('es-abstract/2024/IsCallable');
var Type = require('es-abstract/2024/Type');
var SLOT = require('internal-slot');
module.exports = function GeneratorStart(generator, closure) {
SLOT.assert(generator, '[[GeneratorState]]');
SLOT.assert(generator, '[[GeneratorContext]]');
SLOT.assert(generator, '[[GeneratorBrand]]');
SLOT.assert(generator, '[[Sentinel]]'); // our userland slot
SLOT.assert(generator, '[[CloseIfAbrupt]]'); // our second userland slot
if (!IsCallable(closure) || closure.length !== 0) {
throw new $TypeError('`closure` must be a function that takes no arguments');
}
var sentinel = SLOT.get(closure, '[[Sentinel]]');
if (Type(sentinel) !== 'Object') {
throw new $TypeError('`closure.[[Sentinel]]` must be an object');
}
SLOT.set(generator, '[[GeneratorContext]]', function () { // steps 2-5
try {
var result = closure();
if (result === sentinel) {
SLOT.set(generator, '[[GeneratorState]]', 'completed');
SLOT.set(generator, '[[GeneratorContext]]', null);
return CreateIterResultObject(void undefined, true);
}
SLOT.set(generator, '[[GeneratorState]]', 'suspendedYield');
return CreateIterResultObject(result, false);
} catch (e) {
SLOT.set(generator, '[[GeneratorState]]', 'completed');
SLOT.set(generator, '[[GeneratorContext]]', null);
throw e;
}
});
SLOT.set(generator, '[[GeneratorState]]', 'suspendedStart'); // step 6
};
@@ -0,0 +1,216 @@
var $6acf696f746f932c$exports = require("./utils.main.js");
var $7ff3f66df3873a5e$exports = require("./intlStrings.main.js");
var $gDW2h$react = require("react");
var $gDW2h$reactariainteractions = require("@react-aria/interactions");
var $gDW2h$reactariautils = require("@react-aria/utils");
var $gDW2h$reactariai18n = require("@react-aria/i18n");
var $gDW2h$reactariavisuallyhidden = require("@react-aria/visually-hidden");
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useTableColumnResize", () => $16d645f9e2153641$export$52994e973806c219);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $16d645f9e2153641$export$52994e973806c219(props, state, ref) {
let { column: item, triggerRef: triggerRef, isDisabled: isDisabled, onResizeStart: onResizeStart, onResize: onResize, onResizeEnd: onResizeEnd, 'aria-label': ariaLabel } = props;
const stringFormatter = (0, $gDW2h$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($7ff3f66df3873a5e$exports))), '@react-aria/table');
let id = (0, $gDW2h$reactariautils.useId)();
let isResizing = state.resizingColumn === item.key;
let isResizingRef = (0, $gDW2h$react.useRef)(isResizing);
let lastSize = (0, $gDW2h$react.useRef)(null);
let wasFocusedOnResizeStart = (0, $gDW2h$react.useRef)(false);
let editModeEnabled = state.tableState.isKeyboardNavigationDisabled;
let { direction: direction } = (0, $gDW2h$reactariai18n.useLocale)();
let { keyboardProps: keyboardProps } = (0, $gDW2h$reactariainteractions.useKeyboard)({
onKeyDown: (e)=>{
if (editModeEnabled) {
if (e.key === 'Escape' || e.key === 'Enter' || e.key === ' ' || e.key === 'Tab') {
e.preventDefault();
endResize(item);
}
} else {
// Continue propagation on keydown events so they still bubbles to useSelectableCollection and are handled there
e.continuePropagation();
if (e.key === 'Enter') startResize(item);
}
}
});
let startResize = (0, $gDW2h$reactariautils.useEffectEvent)((item)=>{
if (!isResizingRef.current) {
lastSize.current = state.updateResizedColumns(item.key, state.getColumnWidth(item.key));
state.startResize(item.key);
state.tableState.setKeyboardNavigationDisabled(true);
onResizeStart === null || onResizeStart === void 0 ? void 0 : onResizeStart(lastSize.current);
}
isResizingRef.current = true;
});
let resize = (0, $gDW2h$reactariautils.useEffectEvent)((item, newWidth)=>{
let sizes = state.updateResizedColumns(item.key, newWidth);
onResize === null || onResize === void 0 ? void 0 : onResize(sizes);
lastSize.current = sizes;
});
let endResize = (0, $gDW2h$reactariautils.useEffectEvent)((item)=>{
if (isResizingRef.current) {
if (lastSize.current == null) lastSize.current = state.updateResizedColumns(item.key, state.getColumnWidth(item.key));
state.endResize();
state.tableState.setKeyboardNavigationDisabled(false);
onResizeEnd === null || onResizeEnd === void 0 ? void 0 : onResizeEnd(lastSize.current);
isResizingRef.current = false;
if ((triggerRef === null || triggerRef === void 0 ? void 0 : triggerRef.current) && !wasFocusedOnResizeStart.current) // switch focus back to the column header unless the resizer was already focused when resizing started.
(0, $gDW2h$reactariainteractions.focusSafely)(triggerRef.current);
}
lastSize.current = null;
});
const columnResizeWidthRef = (0, $gDW2h$react.useRef)(0);
const { moveProps: moveProps } = (0, $gDW2h$reactariainteractions.useMove)({
onMoveStart () {
columnResizeWidthRef.current = state.getColumnWidth(item.key);
startResize(item);
},
onMove (e) {
let { deltaX: deltaX, deltaY: deltaY, pointerType: pointerType } = e;
if (direction === 'rtl') deltaX *= -1;
if (pointerType === 'keyboard') {
if (deltaY !== 0 && deltaX === 0) deltaX = deltaY * -1;
deltaX *= 10;
}
// if moving up/down only, no need to resize
if (deltaX !== 0) {
columnResizeWidthRef.current += deltaX;
resize(item, columnResizeWidthRef.current);
}
},
onMoveEnd (e) {
let { pointerType: pointerType } = e;
columnResizeWidthRef.current = 0;
if (pointerType === 'mouse' || pointerType === 'touch' && wasFocusedOnResizeStart.current) endResize(item);
}
});
let onKeyDown = (0, $gDW2h$react.useCallback)((e)=>{
var _moveProps_onKeyDown;
if (editModeEnabled) (_moveProps_onKeyDown = moveProps.onKeyDown) === null || _moveProps_onKeyDown === void 0 ? void 0 : _moveProps_onKeyDown.call(moveProps, e);
}, [
editModeEnabled,
moveProps
]);
let min = Math.floor(state.getColumnMinWidth(item.key));
let max = Math.floor(state.getColumnMaxWidth(item.key));
if (max === Infinity) max = Number.MAX_SAFE_INTEGER;
let value = Math.floor(state.getColumnWidth(item.key));
let modality = (0, $gDW2h$reactariainteractions.useInteractionModality)();
if (modality === 'virtual' && typeof window !== 'undefined' && 'ontouchstart' in window) modality = 'touch';
let description = (triggerRef === null || triggerRef === void 0 ? void 0 : triggerRef.current) == null && (modality === 'keyboard' || modality === 'virtual') && !isResizing ? stringFormatter.format('resizerDescription') : undefined;
let descriptionProps = (0, $gDW2h$reactariautils.useDescription)(description);
let ariaProps = {
'aria-label': ariaLabel,
'aria-orientation': 'horizontal',
'aria-labelledby': `${id} ${(0, $6acf696f746f932c$exports.getColumnHeaderId)(state.tableState, item.key)}`,
'aria-valuetext': stringFormatter.format('columnSize', {
value: value
}),
'type': 'range',
min: min,
max: max,
value: value,
...descriptionProps
};
const focusInput = (0, $gDW2h$react.useCallback)(()=>{
if (ref.current) (0, $gDW2h$reactariainteractions.focusSafely)(ref.current);
}, [
ref
]);
let resizingColumn = state.resizingColumn;
let prevResizingColumn = (0, $gDW2h$react.useRef)(null);
(0, $gDW2h$react.useEffect)(()=>{
if (prevResizingColumn.current !== resizingColumn && resizingColumn != null && resizingColumn === item.key) {
wasFocusedOnResizeStart.current = document.activeElement === ref.current;
startResize(item);
// Delay focusing input until Android Chrome's delayed click after touchend happens: https://bugs.chromium.org/p/chromium/issues/detail?id=1150073
let timeout = setTimeout(()=>focusInput(), 0);
// VoiceOver on iOS has problems focusing the input from a menu.
let VOTimeout = setTimeout(focusInput, 400);
return ()=>{
clearTimeout(timeout);
clearTimeout(VOTimeout);
};
}
prevResizingColumn.current = resizingColumn;
}, [
resizingColumn,
item,
focusInput,
ref,
startResize
]);
let onChange = (e)=>{
let currentWidth = state.getColumnWidth(item.key);
let nextValue = parseFloat(e.target.value);
if (nextValue > currentWidth) nextValue = currentWidth + 10;
else nextValue = currentWidth - 10;
resize(item, nextValue);
};
let { pressProps: pressProps } = (0, $gDW2h$reactariainteractions.usePress)({
preventFocusOnPress: true,
onPressStart: (e)=>{
if (e.ctrlKey || e.altKey || e.metaKey || e.shiftKey || e.pointerType === 'keyboard') return;
if (e.pointerType === 'virtual' && state.resizingColumn != null) {
endResize(item);
return;
}
// Sometimes onPress won't trigger for quick taps on mobile so we want to focus the input so blurring away
// can cancel resize mode for us.
focusInput();
// If resizer is always visible, mobile screenreader user can access the visually hidden resizer directly and thus we don't need
// to handle a virtual click to start the resizer.
if (e.pointerType !== 'virtual') startResize(item);
},
onPress: (e)=>{
if ((e.pointerType === 'touch' && wasFocusedOnResizeStart.current || e.pointerType === 'mouse') && state.resizingColumn != null) endResize(item);
}
});
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $gDW2h$reactariavisuallyhidden.useVisuallyHidden)();
return {
resizerProps: (0, $gDW2h$reactariautils.mergeProps)(keyboardProps, {
...moveProps,
onKeyDown: onKeyDown
}, pressProps, {
style: {
touchAction: 'none'
}
}),
inputProps: (0, $gDW2h$reactariautils.mergeProps)(visuallyHiddenProps, {
id: id,
onBlur: ()=>{
endResize(item);
},
onChange: onChange,
disabled: isDisabled
}, ariaProps),
isResizing: isResizing
};
}
//# sourceMappingURL=useTableColumnResize.main.js.map
@@ -0,0 +1,4 @@
{
"main": "../build/cjs/system/index.js",
"types": "../build/cjs/system/index.d.ts"
}
@@ -0,0 +1,301 @@
/**
* @fileoverview Disallows or enforces spaces inside of array brackets.
* @author Jamund Ferguson
* @deprecated in ESLint v8.53.0
*/
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "array-bracket-spacing",
url: "https://eslint.style/rules/array-bracket-spacing",
},
},
],
},
type: "layout",
docs: {
description: "Enforce consistent spacing inside array brackets",
recommended: false,
url: "https://eslint.org/docs/latest/rules/array-bracket-spacing",
},
fixable: "whitespace",
schema: [
{
enum: ["always", "never"],
},
{
type: "object",
properties: {
singleValue: {
type: "boolean",
},
objectsInArrays: {
type: "boolean",
},
arraysInArrays: {
type: "boolean",
},
},
additionalProperties: false,
},
],
messages: {
unexpectedSpaceAfter:
"There should be no space after '{{tokenValue}}'.",
unexpectedSpaceBefore:
"There should be no space before '{{tokenValue}}'.",
missingSpaceAfter: "A space is required after '{{tokenValue}}'.",
missingSpaceBefore: "A space is required before '{{tokenValue}}'.",
},
},
create(context) {
const spaced = context.options[0] === "always",
sourceCode = context.sourceCode;
/**
* Determines whether an option is set, relative to the spacing option.
* If spaced is "always", then check whether option is set to false.
* If spaced is "never", then check whether option is set to true.
* @param {Object} option The option to exclude.
* @returns {boolean} Whether or not the property is excluded.
*/
function isOptionSet(option) {
return context.options[1]
? context.options[1][option] === !spaced
: false;
}
const options = {
spaced,
singleElementException: isOptionSet("singleValue"),
objectsInArraysException: isOptionSet("objectsInArrays"),
arraysInArraysException: isOptionSet("arraysInArrays"),
};
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
/**
* Reports that there shouldn't be a space after the first token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportNoBeginningSpace(node, token) {
const nextToken = sourceCode.getTokenAfter(token);
context.report({
node,
loc: { start: token.loc.end, end: nextToken.loc.start },
messageId: "unexpectedSpaceAfter",
data: {
tokenValue: token.value,
},
fix(fixer) {
return fixer.removeRange([
token.range[1],
nextToken.range[0],
]);
},
});
}
/**
* Reports that there shouldn't be a space before the last token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportNoEndingSpace(node, token) {
const previousToken = sourceCode.getTokenBefore(token);
context.report({
node,
loc: { start: previousToken.loc.end, end: token.loc.start },
messageId: "unexpectedSpaceBefore",
data: {
tokenValue: token.value,
},
fix(fixer) {
return fixer.removeRange([
previousToken.range[1],
token.range[0],
]);
},
});
}
/**
* Reports that there should be a space after the first token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportRequiredBeginningSpace(node, token) {
context.report({
node,
loc: token.loc,
messageId: "missingSpaceAfter",
data: {
tokenValue: token.value,
},
fix(fixer) {
return fixer.insertTextAfter(token, " ");
},
});
}
/**
* Reports that there should be a space before the last token
* @param {ASTNode} node The node to report in the event of an error.
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportRequiredEndingSpace(node, token) {
context.report({
node,
loc: token.loc,
messageId: "missingSpaceBefore",
data: {
tokenValue: token.value,
},
fix(fixer) {
return fixer.insertTextBefore(token, " ");
},
});
}
/**
* Determines if a node is an object type
* @param {ASTNode} node The node to check.
* @returns {boolean} Whether or not the node is an object type.
*/
function isObjectType(node) {
return (
node &&
(node.type === "ObjectExpression" ||
node.type === "ObjectPattern")
);
}
/**
* Determines if a node is an array type
* @param {ASTNode} node The node to check.
* @returns {boolean} Whether or not the node is an array type.
*/
function isArrayType(node) {
return (
node &&
(node.type === "ArrayExpression" ||
node.type === "ArrayPattern")
);
}
/**
* Validates the spacing around array brackets
* @param {ASTNode} node The node we're checking for spacing
* @returns {void}
*/
function validateArraySpacing(node) {
if (options.spaced && node.elements.length === 0) {
return;
}
const first = sourceCode.getFirstToken(node),
second = sourceCode.getFirstToken(node, 1),
last = node.typeAnnotation
? sourceCode.getTokenBefore(node.typeAnnotation)
: sourceCode.getLastToken(node),
penultimate = sourceCode.getTokenBefore(last),
firstElement = node.elements[0],
lastElement = node.elements.at(-1);
const openingBracketMustBeSpaced =
(options.objectsInArraysException &&
isObjectType(firstElement)) ||
(options.arraysInArraysException &&
isArrayType(firstElement)) ||
(options.singleElementException && node.elements.length === 1)
? !options.spaced
: options.spaced;
const closingBracketMustBeSpaced =
(options.objectsInArraysException &&
isObjectType(lastElement)) ||
(options.arraysInArraysException && isArrayType(lastElement)) ||
(options.singleElementException && node.elements.length === 1)
? !options.spaced
: options.spaced;
if (astUtils.isTokenOnSameLine(first, second)) {
if (
openingBracketMustBeSpaced &&
!sourceCode.isSpaceBetweenTokens(first, second)
) {
reportRequiredBeginningSpace(node, first);
}
if (
!openingBracketMustBeSpaced &&
sourceCode.isSpaceBetweenTokens(first, second)
) {
reportNoBeginningSpace(node, first);
}
}
if (
first !== penultimate &&
astUtils.isTokenOnSameLine(penultimate, last)
) {
if (
closingBracketMustBeSpaced &&
!sourceCode.isSpaceBetweenTokens(penultimate, last)
) {
reportRequiredEndingSpace(node, last);
}
if (
!closingBracketMustBeSpaced &&
sourceCode.isSpaceBetweenTokens(penultimate, last)
) {
reportNoEndingSpace(node, last);
}
}
}
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
return {
ArrayPattern: validateArraySpacing,
ArrayExpression: validateArraySpacing,
};
},
};
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAmCM,SAAS,0CAAgB,KAA4B,EAAE,KAA0B,EAAE,GAAkC;IAC1H,IAAI,gBAAC,YAAY,iBAAE,aAAa,EAAC,GAAG,CAAA,GAAA,oCAAS,EAAE;QAC7C,GAAG,KAAK;QACR,QAAQ,MAAM,MAAM;QACpB,SAAS,MAAM,KAAK;IACtB,GAAG;IAEH,CAAA,GAAA,0CAAe,EAAE;QACf,YAAY,CAAC,MAAM,MAAM;IAC3B;IAEA,CAAA,GAAA,gDAAqB;IAErB,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,MAAM,MAAM,IAAI,IAAI,OAAO,EAC7B,OAAO,CAAA,GAAA,yCAAc,EAAE;YAAC,IAAI,OAAO;SAAC;IAExC,GAAG;QAAC,MAAM,MAAM;QAAE;KAAI;IAEtB,OAAO;QACL,YAAY,CAAA,GAAA,gCAAS,EAAE;uBACvB;IACF;AACF","sources":["packages/@react-aria/overlays/src/useModalOverlay.ts"],"sourcesContent":["/*\n * Copyright 2022 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 {ariaHideOutside} from './ariaHideOutside';\nimport {AriaOverlayProps, useOverlay} from './useOverlay';\nimport {DOMAttributes, RefObject} from '@react-types/shared';\nimport {mergeProps} from '@react-aria/utils';\nimport {OverlayTriggerState} from '@react-stately/overlays';\nimport {useEffect} from 'react';\nimport {useOverlayFocusContain} from './Overlay';\nimport {usePreventScroll} from './usePreventScroll';\n\nexport interface AriaModalOverlayProps extends Pick<AriaOverlayProps, 'shouldCloseOnInteractOutside'> {\n /**\n * Whether to close the modal when the user interacts outside it.\n * @default false\n */\n isDismissable?: boolean,\n /**\n * Whether pressing the escape key to close the modal should be disabled.\n * @default false\n */\n isKeyboardDismissDisabled?: boolean\n}\n\nexport interface ModalOverlayAria {\n /** Props for the modal element. */\n modalProps: DOMAttributes,\n /** Props for the underlay element. */\n underlayProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a modal component.\n * A modal is an overlay element which blocks interaction with elements outside it.\n */\nexport function useModalOverlay(props: AriaModalOverlayProps, state: OverlayTriggerState, ref: RefObject<HTMLElement | null>): ModalOverlayAria {\n let {overlayProps, underlayProps} = useOverlay({\n ...props,\n isOpen: state.isOpen,\n onClose: state.close\n }, ref);\n\n usePreventScroll({\n isDisabled: !state.isOpen\n });\n\n useOverlayFocusContain();\n\n useEffect(() => {\n if (state.isOpen && ref.current) {\n return ariaHideOutside([ref.current]);\n }\n }, [state.isOpen, ref]);\n\n return {\n modalProps: mergeProps(overlayProps),\n underlayProps\n };\n}\n"],"names":[],"version":3,"file":"useModalOverlay.main.js.map"}
@@ -0,0 +1,242 @@
'use strict';var _path = require('path');var _path2 = _interopRequireDefault(_path);
var _minimatch = require('minimatch');var _minimatch2 = _interopRequireDefault(_minimatch);
var _resolve = require('eslint-module-utils/resolve');var _resolve2 = _interopRequireDefault(_resolve);
var _importType = require('../core/importType');
var _moduleVisitor = require('eslint-module-utils/moduleVisitor');var _moduleVisitor2 = _interopRequireDefault(_moduleVisitor);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
var enumValues = { 'enum': ['always', 'ignorePackages', 'never'] };
var patternProperties = {
type: 'object',
patternProperties: { '.*': enumValues } };
var properties = {
type: 'object',
properties: {
pattern: patternProperties,
checkTypeImports: { type: 'boolean' },
ignorePackages: { type: 'boolean' },
pathGroupOverrides: {
type: 'array',
items: {
type: 'object',
properties: {
pattern: {
type: 'string' },
patternOptions: {
type: 'object' },
action: {
type: 'string',
'enum': ['enforce', 'ignore'] } },
additionalProperties: false,
required: ['pattern', 'action'] } } } };
function buildProperties(context) {
var result = {
defaultConfig: 'never',
pattern: {},
ignorePackages: false };
context.options.forEach(function (obj) {
// If this is a string, set defaultConfig to its value
if (typeof obj === 'string') {
result.defaultConfig = obj;
return;
}
// If this is not the new structure, transfer all props to result.pattern
if (obj.pattern === undefined && obj.ignorePackages === undefined && obj.checkTypeImports === undefined) {
Object.assign(result.pattern, obj);
return;
}
// If pattern is provided, transfer all props
if (obj.pattern !== undefined) {
Object.assign(result.pattern, obj.pattern);
}
// If ignorePackages is provided, transfer it to result
if (obj.ignorePackages !== undefined) {
result.ignorePackages = obj.ignorePackages;
}
if (obj.checkTypeImports !== undefined) {
result.checkTypeImports = obj.checkTypeImports;
}
if (obj.pathGroupOverrides !== undefined) {
result.pathGroupOverrides = obj.pathGroupOverrides;
}
});
if (result.defaultConfig === 'ignorePackages') {
result.defaultConfig = 'always';
result.ignorePackages = true;
}
return result;
}
module.exports = {
meta: {
type: 'suggestion',
docs: {
category: 'Style guide',
description: 'Ensure consistent use of file extension within the import path.',
url: (0, _docsUrl2['default'])('extensions') },
schema: {
anyOf: [
{
type: 'array',
items: [enumValues],
additionalItems: false },
{
type: 'array',
items: [
enumValues,
properties],
additionalItems: false },
{
type: 'array',
items: [properties],
additionalItems: false },
{
type: 'array',
items: [patternProperties],
additionalItems: false },
{
type: 'array',
items: [
enumValues,
patternProperties],
additionalItems: false }] } },
create: function () {function create(context) {
var props = buildProperties(context);
function getModifier(extension) {
return props.pattern[extension] || props.defaultConfig;
}
function isUseOfExtensionRequired(extension, isPackage) {
return getModifier(extension) === 'always' && (!props.ignorePackages || !isPackage);
}
function isUseOfExtensionForbidden(extension) {
return getModifier(extension) === 'never';
}
function isResolvableWithoutExtension(file) {
var extension = _path2['default'].extname(file);
var fileWithoutExtension = file.slice(0, -extension.length);
var resolvedFileWithoutExtension = (0, _resolve2['default'])(fileWithoutExtension, context);
return resolvedFileWithoutExtension === (0, _resolve2['default'])(file, context);
}
function isExternalRootModule(file) {
if (file === '.' || file === '..') {return false;}
var slashCount = file.split('/').length - 1;
if (slashCount === 0) {return true;}
if ((0, _importType.isScoped)(file) && slashCount <= 1) {return true;}
return false;
}
function computeOverrideAction(pathGroupOverrides, path) {
for (var i = 0, l = pathGroupOverrides.length; i < l; i++) {var _pathGroupOverrides$i =
pathGroupOverrides[i],pattern = _pathGroupOverrides$i.pattern,patternOptions = _pathGroupOverrides$i.patternOptions,action = _pathGroupOverrides$i.action;
if ((0, _minimatch2['default'])(path, pattern, patternOptions || { nocomment: true })) {
return action;
}
}
}
function checkFileExtension(source, node) {
// bail if the declaration doesn't have a source, e.g. "export { foo };", or if it's only partially typed like in an editor
if (!source || !source.value) {return;}
var importPathWithQueryString = source.value;
// If not undefined, the user decided if rules are enforced on this import
var overrideAction = computeOverrideAction(
props.pathGroupOverrides || [],
importPathWithQueryString);
if (overrideAction === 'ignore') {
return;
}
// don't enforce anything on builtins
if (!overrideAction && (0, _importType.isBuiltIn)(importPathWithQueryString, context.settings)) {return;}
var importPath = importPathWithQueryString.replace(/\?(.*)$/, '');
// don't enforce in root external packages as they may have names with `.js`.
// Like `import Decimal from decimal.js`)
if (!overrideAction && isExternalRootModule(importPath)) {return;}
var resolvedPath = (0, _resolve2['default'])(importPath, context);
// get extension from resolved path, if possible.
// for unresolved, use source value.
var extension = _path2['default'].extname(resolvedPath || importPath).substring(1);
// determine if this is a module
var isPackage = (0, _importType.isExternalModule)(
importPath,
(0, _resolve2['default'])(importPath, context),
context) ||
(0, _importType.isScoped)(importPath);
if (!extension || !importPath.endsWith('.' + String(extension))) {
// ignore type-only imports and exports
if (!props.checkTypeImports && (node.importKind === 'type' || node.exportKind === 'type')) {return;}
var extensionRequired = isUseOfExtensionRequired(extension, !overrideAction && isPackage);
var extensionForbidden = isUseOfExtensionForbidden(extension);
if (extensionRequired && !extensionForbidden) {
context.report({
node: source,
message: 'Missing file extension ' + (
extension ? '"' + String(extension) + '" ' : '') + 'for "' + String(importPathWithQueryString) + '"' });
}
} else if (extension) {
if (isUseOfExtensionForbidden(extension) && isResolvableWithoutExtension(importPath)) {
context.report({
node: source,
message: 'Unexpected use of file extension "' + String(extension) + '" for "' + String(importPathWithQueryString) + '"' });
}
}
}
return (0, _moduleVisitor2['default'])(checkFileExtension, { commonjs: true });
}return create;}() };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9leHRlbnNpb25zLmpzIl0sIm5hbWVzIjpbImVudW1WYWx1ZXMiLCJwYXR0ZXJuUHJvcGVydGllcyIsInR5cGUiLCJwcm9wZXJ0aWVzIiwicGF0dGVybiIsImNoZWNrVHlwZUltcG9ydHMiLCJpZ25vcmVQYWNrYWdlcyIsInBhdGhHcm91cE92ZXJyaWRlcyIsIml0ZW1zIiwicGF0dGVybk9wdGlvbnMiLCJhY3Rpb24iLCJhZGRpdGlvbmFsUHJvcGVydGllcyIsInJlcXVpcmVkIiwiYnVpbGRQcm9wZXJ0aWVzIiwiY29udGV4dCIsInJlc3VsdCIsImRlZmF1bHRDb25maWciLCJvcHRpb25zIiwiZm9yRWFjaCIsIm9iaiIsInVuZGVmaW5lZCIsIk9iamVjdCIsImFzc2lnbiIsIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwiZG9jcyIsImNhdGVnb3J5IiwiZGVzY3JpcHRpb24iLCJ1cmwiLCJzY2hlbWEiLCJhbnlPZiIsImFkZGl0aW9uYWxJdGVtcyIsImNyZWF0ZSIsInByb3BzIiwiZ2V0TW9kaWZpZXIiLCJleHRlbnNpb24iLCJpc1VzZU9mRXh0ZW5zaW9uUmVxdWlyZWQiLCJpc1BhY2thZ2UiLCJpc1VzZU9mRXh0ZW5zaW9uRm9yYmlkZGVuIiwiaXNSZXNvbHZhYmxlV2l0aG91dEV4dGVuc2lvbiIsImZpbGUiLCJwYXRoIiwiZXh0bmFtZSIsImZpbGVXaXRob3V0RXh0ZW5zaW9uIiwic2xpY2UiLCJsZW5ndGgiLCJyZXNvbHZlZEZpbGVXaXRob3V0RXh0ZW5zaW9uIiwiaXNFeHRlcm5hbFJvb3RNb2R1bGUiLCJzbGFzaENvdW50Iiwic3BsaXQiLCJjb21wdXRlT3ZlcnJpZGVBY3Rpb24iLCJpIiwibCIsIm5vY29tbWVudCIsImNoZWNrRmlsZUV4dGVuc2lvbiIsInNvdXJjZSIsIm5vZGUiLCJ2YWx1ZSIsImltcG9ydFBhdGhXaXRoUXVlcnlTdHJpbmciLCJvdmVycmlkZUFjdGlvbiIsInNldHRpbmdzIiwiaW1wb3J0UGF0aCIsInJlcGxhY2UiLCJyZXNvbHZlZFBhdGgiLCJzdWJzdHJpbmciLCJlbmRzV2l0aCIsImltcG9ydEtpbmQiLCJleHBvcnRLaW5kIiwiZXh0ZW5zaW9uUmVxdWlyZWQiLCJleHRlbnNpb25Gb3JiaWRkZW4iLCJyZXBvcnQiLCJtZXNzYWdlIiwiY29tbW9uanMiXSwibWFwcGluZ3MiOiJhQUFBLDRCOztBQUVBLHNDO0FBQ0Esc0Q7QUFDQTtBQUNBLGtFO0FBQ0EscUM7O0FBRUEsSUFBTUEsYUFBYSxFQUFFLFFBQU0sQ0FBQyxRQUFELEVBQVcsZ0JBQVgsRUFBNkIsT0FBN0IsQ0FBUixFQUFuQjtBQUNBLElBQU1DLG9CQUFvQjtBQUN4QkMsUUFBTSxRQURrQjtBQUV4QkQscUJBQW1CLEVBQUUsTUFBTUQsVUFBUixFQUZLLEVBQTFCOztBQUlBLElBQU1HLGFBQWE7QUFDakJELFFBQU0sUUFEVztBQUVqQkMsY0FBWTtBQUNWQyxhQUFTSCxpQkFEQztBQUVWSSxzQkFBa0IsRUFBRUgsTUFBTSxTQUFSLEVBRlI7QUFHVkksb0JBQWdCLEVBQUVKLE1BQU0sU0FBUixFQUhOO0FBSVZLLHdCQUFvQjtBQUNsQkwsWUFBTSxPQURZO0FBRWxCTSxhQUFPO0FBQ0xOLGNBQU0sUUFERDtBQUVMQyxvQkFBWTtBQUNWQyxtQkFBUztBQUNQRixrQkFBTSxRQURDLEVBREM7O0FBSVZPLDBCQUFnQjtBQUNkUCxrQkFBTSxRQURRLEVBSk47O0FBT1ZRLGtCQUFRO0FBQ05SLGtCQUFNLFFBREE7QUFFTixvQkFBTSxDQUFDLFNBQUQsRUFBWSxRQUFaLENBRkEsRUFQRSxFQUZQOzs7QUFjTFMsOEJBQXNCLEtBZGpCO0FBZUxDLGtCQUFVLENBQUMsU0FBRCxFQUFZLFFBQVosQ0FmTCxFQUZXLEVBSlYsRUFGSyxFQUFuQjs7Ozs7O0FBNkJBLFNBQVNDLGVBQVQsQ0FBeUJDLE9BQXpCLEVBQWtDOztBQUVoQyxNQUFNQyxTQUFTO0FBQ2JDLG1CQUFlLE9BREY7QUFFYlosYUFBUyxFQUZJO0FBR2JFLG9CQUFnQixLQUhILEVBQWY7OztBQU1BUSxVQUFRRyxPQUFSLENBQWdCQyxPQUFoQixDQUF3QixVQUFDQyxHQUFELEVBQVM7O0FBRS9CO0FBQ0EsUUFBSSxPQUFPQSxHQUFQLEtBQWUsUUFBbkIsRUFBNkI7QUFDM0JKLGFBQU9DLGFBQVAsR0FBdUJHLEdBQXZCO0FBQ0E7QUFDRDs7QUFFRDtBQUNBLFFBQUlBLElBQUlmLE9BQUosS0FBZ0JnQixTQUFoQixJQUE2QkQsSUFBSWIsY0FBSixLQUF1QmMsU0FBcEQsSUFBaUVELElBQUlkLGdCQUFKLEtBQXlCZSxTQUE5RixFQUF5RztBQUN2R0MsYUFBT0MsTUFBUCxDQUFjUCxPQUFPWCxPQUFyQixFQUE4QmUsR0FBOUI7QUFDQTtBQUNEOztBQUVEO0FBQ0EsUUFBSUEsSUFBSWYsT0FBSixLQUFnQmdCLFNBQXBCLEVBQStCO0FBQzdCQyxhQUFPQyxNQUFQLENBQWNQLE9BQU9YLE9BQXJCLEVBQThCZSxJQUFJZixPQUFsQztBQUNEOztBQUVEO0FBQ0EsUUFBSWUsSUFBSWIsY0FBSixLQUF1QmMsU0FBM0IsRUFBc0M7QUFDcENMLGFBQU9ULGNBQVAsR0FBd0JhLElBQUliLGNBQTVCO0FBQ0Q7O0FBRUQsUUFBSWEsSUFBSWQsZ0JBQUosS0FBeUJlLFNBQTdCLEVBQXdDO0FBQ3RDTCxhQUFPVixnQkFBUCxHQUEwQmMsSUFBSWQsZ0JBQTlCO0FBQ0Q7O0FBRUQsUUFBSWMsSUFBSVosa0JBQUosS0FBMkJhLFNBQS9CLEVBQTBDO0FBQ3hDTCxhQUFPUixrQkFBUCxHQUE0QlksSUFBSVosa0JBQWhDO0FBQ0Q7QUFDRixHQS9CRDs7QUFpQ0EsTUFBSVEsT0FBT0MsYUFBUCxLQUF5QixnQkFBN0IsRUFBK0M7QUFDN0NELFdBQU9DLGFBQVAsR0FBdUIsUUFBdkI7QUFDQUQsV0FBT1QsY0FBUCxHQUF3QixJQUF4QjtBQUNEOztBQUVELFNBQU9TLE1BQVA7QUFDRDs7QUFFRFEsT0FBT0MsT0FBUCxHQUFpQjtBQUNmQyxRQUFNO0FBQ0p2QixVQUFNLFlBREY7QUFFSndCLFVBQU07QUFDSkMsZ0JBQVUsYUFETjtBQUVKQyxtQkFBYSxpRUFGVDtBQUdKQyxXQUFLLDBCQUFRLFlBQVIsQ0FIRCxFQUZGOzs7QUFRSkMsWUFBUTtBQUNOQyxhQUFPO0FBQ0w7QUFDRTdCLGNBQU0sT0FEUjtBQUVFTSxlQUFPLENBQUNSLFVBQUQsQ0FGVDtBQUdFZ0MseUJBQWlCLEtBSG5CLEVBREs7O0FBTUw7QUFDRTlCLGNBQU0sT0FEUjtBQUVFTSxlQUFPO0FBQ0xSLGtCQURLO0FBRUxHLGtCQUZLLENBRlQ7O0FBTUU2Qix5QkFBaUIsS0FObkIsRUFOSzs7QUFjTDtBQUNFOUIsY0FBTSxPQURSO0FBRUVNLGVBQU8sQ0FBQ0wsVUFBRCxDQUZUO0FBR0U2Qix5QkFBaUIsS0FIbkIsRUFkSzs7QUFtQkw7QUFDRTlCLGNBQU0sT0FEUjtBQUVFTSxlQUFPLENBQUNQLGlCQUFELENBRlQ7QUFHRStCLHlCQUFpQixLQUhuQixFQW5CSzs7QUF3Qkw7QUFDRTlCLGNBQU0sT0FEUjtBQUVFTSxlQUFPO0FBQ0xSLGtCQURLO0FBRUxDLHlCQUZLLENBRlQ7O0FBTUUrQix5QkFBaUIsS0FObkIsRUF4QkssQ0FERCxFQVJKLEVBRFM7Ozs7OztBQThDZkMsUUE5Q2UsK0JBOENSbkIsT0E5Q1EsRUE4Q0M7O0FBRWQsVUFBTW9CLFFBQVFyQixnQkFBZ0JDLE9BQWhCLENBQWQ7O0FBRUEsZUFBU3FCLFdBQVQsQ0FBcUJDLFNBQXJCLEVBQWdDO0FBQzlCLGVBQU9GLE1BQU05QixPQUFOLENBQWNnQyxTQUFkLEtBQTRCRixNQUFNbEIsYUFBekM7QUFDRDs7QUFFRCxlQUFTcUIsd0JBQVQsQ0FBa0NELFNBQWxDLEVBQTZDRSxTQUE3QyxFQUF3RDtBQUN0RCxlQUFPSCxZQUFZQyxTQUFaLE1BQTJCLFFBQTNCLEtBQXdDLENBQUNGLE1BQU01QixjQUFQLElBQXlCLENBQUNnQyxTQUFsRSxDQUFQO0FBQ0Q7O0FBRUQsZUFBU0MseUJBQVQsQ0FBbUNILFNBQW5DLEVBQThDO0FBQzVDLGVBQU9ELFlBQVlDLFNBQVosTUFBMkIsT0FBbEM7QUFDRDs7QUFFRCxlQUFTSSw0QkFBVCxDQUFzQ0MsSUFBdEMsRUFBNEM7QUFDMUMsWUFBTUwsWUFBWU0sa0JBQUtDLE9BQUwsQ0FBYUYsSUFBYixDQUFsQjtBQUNBLFlBQU1HLHVCQUF1QkgsS0FBS0ksS0FBTCxDQUFLine truncated
@@ -0,0 +1,28 @@
import { AsnArray, OctetString } from "@peculiar/asn1-schema";
/**
* ```asn1
* Extension ::= SEQUENCE {
* extnID OBJECT IDENTIFIER,
* critical BOOLEAN DEFAULT FALSE,
* extnValue OCTET STRING
* -- contains the DER encoding of an ASN.1 value
* -- corresponding to the extension type identified
* -- by extnID
* }
* ```
*/
export declare class Extension {
static CRITICAL: boolean;
extnID: string;
critical: boolean;
extnValue: OctetString;
constructor(params?: Partial<Extension>);
}
/**
* ```asn1
* Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
* ```
*/
export declare class Extensions extends AsnArray<Extension> {
constructor(items?: Extension[]);
}
@@ -0,0 +1 @@
{"version":3,"file":"useFormState.d.ts","sourceRoot":"","sources":["../src/useFormState.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAIjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,CAC1B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,kBAAkB,GAAG,YAAY,EAEjC,KAAK,CAAC,EAAE,iBAAiB,CAAC,YAAY,EAAE,kBAAkB,CAAC,GAC1D,kBAAkB,CAAC,YAAY,CAAC,CA8ClC"}
@@ -0,0 +1,89 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
var newlinePerChainedCall = utils.createRule({
name: "newline-per-chained-call",
package: "js",
meta: {
type: "layout",
docs: {
description: "Require a newline after each call in a method chain"
},
fixable: "whitespace",
schema: [{
type: "object",
properties: {
ignoreChainWithDepth: {
type: "integer",
minimum: 1,
maximum: 10,
default: 2
}
},
additionalProperties: false
}],
messages: {
expected: "Expected line break before `{{callee}}`."
}
},
create(context) {
const options = context.options[0] || {};
const ignoreChainWithDepth = options.ignoreChainWithDepth || 2;
const sourceCode = context.sourceCode;
function getPrefix(node) {
if (node.computed) {
if (node.optional)
return "?.[";
return "[";
}
if (node.optional)
return "?.";
return ".";
}
function getPropertyText(node) {
const prefix = getPrefix(node);
const lines = sourceCode.getText(node.property).split(utils.LINEBREAK_MATCHER);
const suffix = node.computed && lines.length === 1 ? "]" : "";
return prefix + lines[0] + suffix;
}
return {
"CallExpression:exit": function(node) {
const callee = utils.skipChainExpression(node.callee);
if (callee.type !== "MemberExpression")
return;
let parent = utils.skipChainExpression(callee.object);
let depth = 1;
while (parent && "callee" in parent && parent.callee) {
depth += 1;
const parentCallee = utils.skipChainExpression(parent.callee);
if (!("object" in parentCallee))
break;
parent = utils.skipChainExpression(parentCallee.object);
}
if (depth > ignoreChainWithDepth && utils.isTokenOnSameLine(callee.object, callee.property)) {
const firstTokenAfterObject = sourceCode.getTokenAfter(callee.object, utils.isNotClosingParenToken);
context.report({
node: callee.property,
loc: {
start: firstTokenAfterObject.loc.start,
end: callee.loc.end
},
messageId: "expected",
data: {
callee: getPropertyText(callee)
},
fix(fixer) {
return fixer.insertTextBefore(firstTokenAfterObject, "\n");
}
});
}
}
};
}
});
module.exports = newlinePerChainedCall;
@@ -0,0 +1,57 @@
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var GetValueFromBuffer = require('./GetValueFromBuffer');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var IsInteger = require('./IsInteger');
var typedArrayLength = require('typed-array-length');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var whichTypedArray = require('which-typed-array');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/6.0/#sec-integerindexedelementget
module.exports = function IntegerIndexedElementGet(O, index) {
if (typeof index !== 'number') {
throw new $TypeError('`index` must be a Number'); // step 1
}
var arrayTypeName = whichTypedArray(O); // step 10
if (!arrayTypeName) {
throw new $TypeError('`O` must be a TypedArray'); // step 2
}
if (arrayTypeName === 'BigInt64Array' || arrayTypeName === 'BigUint64Array') {
throw new $SyntaxError('BigInt64Array and BigUint64Array do not exist until ES2020');
}
var buffer = typedArrayBuffer(O); // step 3
if (IsDetachedBuffer(buffer)) {
throw new $TypeError('`O` has a detached buffer'); // step 4
}
if (!IsInteger(index) || isNegativeZero(index)) {
return void undefined; // steps 5 - 6
}
var length = typedArrayLength(O); // step 7
if (index < 0 || index >= length) {
return void undefined; // step 8
}
var offset = typedArrayByteOffset(O); // step 9
var elementType = tableTAO.name['$' + arrayTypeName]; // step 13
var elementSize = tableTAO.size['$' + elementType]; // step 11
var indexedPosition = (index * elementSize) + offset; // step 12
return GetValueFromBuffer(buffer, indexedPosition, elementType); // step 14
};
@@ -0,0 +1,7 @@
var classApplyDescriptorSet = require("./classApplyDescriptorSet.js");
var assertClassBrand = require("./assertClassBrand.js");
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
function _classStaticPrivateFieldSpecSet(s, t, r, e) {
return assertClassBrand(t, s), classCheckPrivateStaticFieldDescriptor(r, "set"), classApplyDescriptorSet(s, r, e), e;
}
module.exports = _classStaticPrivateFieldSpecSet, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,4 @@
'use strict';
/** @type {import('./max')} */
module.exports = Math.max;
@@ -0,0 +1 @@
export { _ as default } from "../esm/_define_enumerable_properties.js";
@@ -0,0 +1,15 @@
module.exports = {
"deselectedItem": (args)=>`${args.item} n\xe3o selecionado.`,
"longPressToSelect": `Mantenha pressionado para entrar no modo de sele\xe7\xe3o.`,
"select": `Selecionar`,
"selectedAll": `Todos os itens selecionados.`,
"selectedCount": (args, formatter)=>`${formatter.plural(args.count, {
"=0": `Nenhum item selecionado`,
one: ()=>`${formatter.number(args.count)} item selecionado`,
other: ()=>`${formatter.number(args.count)} itens selecionados`
})}.`,
"selectedItem": (args)=>`${args.item} selecionado.`
};
//# sourceMappingURL=pt-BR.main.js.map
@@ -0,0 +1,46 @@
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var IsArray = require('./IsArray');
var WordCharacters = require('./WordCharacters');
var every = require('../helpers/every');
var isInteger = require('math-intrinsics/isInteger');
var isChar = function isChar(c) {
return typeof c === 'string';
};
// https://262.ecma-international.org/12.0/#sec-runtime-semantics-iswordchar-abstract-operation
// note: prior to ES2023, this AO erroneously omitted the latter of its arguments.
module.exports = function IsWordChar(e, InputLength, Input, IgnoreCase, Unicode) {
if (!isInteger(e)) {
throw new $TypeError('Assertion failed: `e` must be an integer');
}
if (!isInteger(InputLength)) {
throw new $TypeError('Assertion failed: `InputLength` must be an integer');
}
if (!IsArray(Input) || !every(Input, isChar)) {
throw new $TypeError('Assertion failed: `Input` must be a List of characters');
}
if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans');
}
if (e === -1 || e === InputLength) {
return false; // step 1
}
var c = Input[e]; // step 2
var wordChars = WordCharacters(IgnoreCase, Unicode);
return $indexOf(wordChars, c) > -1; // steps 3-4
};
@@ -0,0 +1,442 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/components/dropdown.ts
var dropdown_exports = {};
__export(dropdown_exports, {
dropdown: () => dropdown,
dropdownItem: () => dropdownItem,
dropdownMenu: () => dropdownMenu,
dropdownSection: () => dropdownSection
});
module.exports = __toCommonJS(dropdown_exports);
// src/utils/tv.ts
var import_tailwind_variants = require("tailwind-variants");
// src/utils/tw-merge-config.ts
var COMMON_UNITS = ["small", "medium", "large"];
var twMergeConfig = {
theme: {
opacity: ["disabled"],
spacing: ["divider"],
borderWidth: COMMON_UNITS,
borderRadius: COMMON_UNITS
},
classGroups: {
shadow: [{ shadow: COMMON_UNITS }],
"font-size": [{ text: ["tiny", ...COMMON_UNITS] }],
"bg-image": [
"bg-stripe-gradient-default",
"bg-stripe-gradient-primary",
"bg-stripe-gradient-secondary",
"bg-stripe-gradient-success",
"bg-stripe-gradient-warning",
"bg-stripe-gradient-danger"
]
}
};
// src/utils/tv.ts
var tv = (options, config) => {
var _a, _b, _c;
return (0, import_tailwind_variants.tv)(options, {
...config,
twMerge: (_a = config == null ? void 0 : config.twMerge) != null ? _a : true,
twMergeConfig: {
...config == null ? void 0 : config.twMergeConfig,
theme: {
...(_b = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _b.theme,
...twMergeConfig.theme
},
classGroups: {
...(_c = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _c.classGroups,
...twMergeConfig.classGroups
}
}
});
};
// src/utils/classes.ts
var dataFocusVisibleClasses = [
"outline-none",
"data-[focus-visible=true]:z-10",
"data-[focus-visible=true]:outline-2",
"data-[focus-visible=true]:outline-focus",
"data-[focus-visible=true]:outline-offset-2"
];
// src/components/dropdown.ts
var dropdown = tv({
base: ["w-full", "p-1", "min-w-[200px]"]
});
var dropdownItem = tv({
slots: {
base: [
"flex",
"group",
"gap-2",
"items-center",
"justify-between",
"relative",
"px-2",
"py-1.5",
"w-full",
"h-full",
"box-border",
"rounded-small",
"outline-none",
"cursor-pointer",
"tap-highlight-transparent",
"data-[pressed=true]:opacity-70",
...dataFocusVisibleClasses,
"data-[focus-visible=true]:dark:ring-offset-background-content1"
],
wrapper: "w-full flex flex-col items-start justify-center",
title: "flex-1 text-small font-normal truncate",
description: ["w-full", "text-tiny", "text-foreground-500", "group-hover:text-current"],
selectedIcon: ["text-inherit", "w-3", "h-3", "flex-shrink-0"],
shortcut: [
"px-1",
"py-0.5",
"rounded",
"font-sans",
"text-foreground-500",
"text-tiny",
"border-small",
"border-default-300",
"group-hover:border-current"
]
},
variants: {
variant: {
solid: {
base: ""
},
bordered: {
base: "border-medium border-transparent bg-transparent"
},
light: {
base: "bg-transparent"
},
faded: {
base: "border-small border-transparent hover:border-default data-[hover=true]:bg-default-100"
},
flat: {
base: ""
},
shadow: {
base: "data-[hover=true]:shadow-lg"
}
},
color: {
default: {},
primary: {},
secondary: {},
success: {},
warning: {},
danger: {}
},
isDisabled: {
true: {
base: "opacity-disabled pointer-events-none"
}
},
disableAnimation: {
true: {},
false: {}
}
},
defaultVariants: {
variant: "solid",
color: "default"
},
compoundVariants: [
{
variant: "solid",
color: "default",
class: {
base: "data-[hover=true]:bg-default data-[hover=true]:text-default-foreground"
}
},
{
variant: "solid",
color: "primary",
class: {
base: "data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground"
}
},
{
variant: "solid",
color: "secondary",
class: {
base: "data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground"
}
},
{
variant: "solid",
color: "success",
class: {
base: "data-[hover=true]:bg-success data-[hover=true]:text-success-foreground"
}
},
{
variant: "solid",
color: "warning",
class: {
base: "data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground"
}
},
{
variant: "solid",
color: "danger",
class: {
base: "data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground"
}
},
{
variant: "shadow",
color: "default",
class: {
base: "data-[hover=true]:shadow-default/50 data-[hover=true]:bg-default data-[hover=true]:text-default-foreground"
}
},
{
variant: "shadow",
color: "primary",
class: {
base: "data-[hover=true]:shadow-primary/30 data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground"
}
},
{
variant: "shadow",
color: "secondary",
class: {
base: "data-[hover=true]:shadow-secondary/30 data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground"
}
},
{
variant: "shadow",
color: "success",
class: {
base: "data-[hover=true]:shadow-success/30 data-[hover=true]:bg-success data-[hover=true]:text-success-foreground"
}
},
{
variant: "shadow",
color: "warning",
class: {
base: "data-[hover=true]:shadow-warning/30 data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground"
}
},
{
variant: "shadow",
color: "danger",
class: {
base: "data-[hover=true]:shadow-danger/30 data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground"
}
},
{
variant: "bordered",
color: "default",
class: {
base: "data-[hover=true]:border-default"
}
},
{
variant: "bordered",
color: "primary",
class: {
base: "data-[hover=true]:border-primary data-[hover=true]:text-primary"
}
},
{
variant: "bordered",
color: "secondary",
class: {
base: "data-[hover=true]:border-secondary data-[hover=true]:text-secondary"
}
},
{
variant: "bordered",
color: "success",
class: {
base: "data-[hover=true]:border-success data-[hover=true]:text-success"
}
},
{
variant: "bordered",
color: "warning",
class: {
base: "data-[hover=true]:border-warning data-[hover=true]:text-warning"
}
},
{
variant: "bordered",
color: "danger",
class: {
base: "data-[hover=true]:border-danger data-[hover=true]:text-danger"
}
},
{
variant: "flat",
color: "default",
class: {
base: "data-[hover=true]:bg-default/40 data-[hover=true]:text-default-foreground"
}
},
{
variant: "flat",
color: "primary",
class: {
base: "data-[hover=true]:bg-primary/20 data-[hover=true]:text-primary"
}
},
{
variant: "flat",
color: "secondary",
class: {
base: "data-[hover=true]:bg-secondary/20 data-[hover=true]:text-secondary"
}
},
{
variant: "flat",
color: "success",
class: {
base: "data-[hover=true]:bg-success/20 data-[hover=true]:text-success "
}
},
{
variant: "flat",
color: "warning",
class: {
base: "data-[hover=true]:bg-warning/20 data-[hover=true]:text-warning"
}
},
{
variant: "flat",
color: "danger",
class: {
base: "data-[hover=true]:bg-danger/20 data-[hover=true]:text-danger"
}
},
{
variant: "faded",
color: "default",
class: {
base: "data-[hover=true]:text-default-foreground"
}
},
{
variant: "faded",
color: "primary",
class: {
base: "data-[hover=true]:text-primary"
}
},
{
variant: "faded",
color: "secondary",
class: {
base: "data-[hover=true]:text-secondary"
}
},
{
variant: "faded",
color: "success",
class: {
base: "data-[hover=true]:text-success"
}
},
{
variant: "faded",
color: "warning",
class: {
base: "data-[hover=true]:text-warning"
}
},
{
variant: "faded",
color: "danger",
class: {
base: "data-[hover=true]:text-danger"
}
},
{
variant: "light",
color: "default",
class: {
base: "data-[hover=true]:text-default-500"
}
},
{
variant: "light",
color: "primary",
class: {
base: "data-[hover=true]:text-primary"
}
},
{
variant: "light",
color: "secondary",
class: {
base: "data-[hover=true]:text-secondary"
}
},
{
variant: "light",
color: "success",
class: {
base: "data-[hover=true]:text-success"
}
},
{
variant: "light",
color: "warning",
class: {
base: "data-[hover=true]:text-warning"
}
},
{
variant: "light",
color: "danger",
class: {
base: "data-[hover=true]:text-danger"
}
}
]
});
var dropdownSection = tv({
slots: {
base: "relative mb-2",
heading: "pl-1 text-tiny text-foreground-500",
group: "data-[has-title=true]:pt-1",
divider: "mt-2"
}
});
var dropdownMenu = tv({
base: "w-full flex flex-col gap-0.5 p-1"
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
dropdown,
dropdownItem,
dropdownMenu,
dropdownSection
});
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('trimChars', require('../trim'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
{"version":3,"file":"ActivationsService.d.ts","sourceRoot":"","sources":["../../../../src/binding/services/ActivationsService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,aAAK,sBAAsB;IACzB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,yBAAyB;IACxC,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAC3C,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAAE,iBAAiB,CAAC;CACvD;AAED,qBAAa,kBAAmB,YAAW,SAAS,CAAC,kBAAkB,CAAC;;IAOtE,OAAO;WAqBO,KAAK,CACjB,SAAS,EAAE,MAAM,kBAAkB,GAAG,SAAS,GAC9C,kBAAkB;IAId,GAAG,CACR,UAAU,EAAE,iBAAiB,EAC7B,QAAQ,EAAE,yBAAyB,GAClC,IAAI;IAIA,KAAK,IAAI,kBAAkB;IAS3B,GAAG,CACR,iBAAiB,EAAE,iBAAiB,GACnC,QAAQ,CAAC,iBAAiB,CAAC,GAAG,SAAS;IA2BnC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAO3C,oBAAoB,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI;CAMhE"}
@@ -0,0 +1,9 @@
'use strict';
var IsInteger = require('./IsInteger');
// https://262.ecma-international.org/11.0/#sec-isnonnegativeinteger
module.exports = function IsNonNegativeInteger(argument) {
return !!IsInteger(argument) && argument >= 0;
};
@@ -0,0 +1,4 @@
declare function dataViewBuffer(value: DataView): ArrayBuffer;
declare function dataViewBuffer(value: unknown): never;
export = dataViewBuffer;
@@ -0,0 +1,374 @@
/**
* @fileoverview Rule to enforce line breaks after each array element
* @author Jan Peer Stöcklmair <https://github.com/JPeer264>
* @deprecated in ESLint v8.53.0
*/
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "array-element-newline",
url: "https://eslint.style/rules/array-element-newline",
},
},
],
},
type: "layout",
docs: {
description: "Enforce line breaks after each array element",
recommended: false,
url: "https://eslint.org/docs/latest/rules/array-element-newline",
},
fixable: "whitespace",
schema: {
definitions: {
basicConfig: {
oneOf: [
{
enum: ["always", "never", "consistent"],
},
{
type: "object",
properties: {
multiline: {
type: "boolean",
},
minItems: {
type: ["integer", "null"],
minimum: 0,
},
},
additionalProperties: false,
},
],
},
},
type: "array",
items: [
{
oneOf: [
{
$ref: "#/definitions/basicConfig",
},
{
type: "object",
properties: {
ArrayExpression: {
$ref: "#/definitions/basicConfig",
},
ArrayPattern: {
$ref: "#/definitions/basicConfig",
},
},
additionalProperties: false,
minProperties: 1,
},
],
},
],
},
messages: {
unexpectedLineBreak: "There should be no linebreak here.",
missingLineBreak: "There should be a linebreak after this element.",
},
},
create(context) {
const sourceCode = context.sourceCode;
//----------------------------------------------------------------------
// Helpers
//----------------------------------------------------------------------
/**
* Normalizes a given option value.
* @param {string|Object|undefined} providedOption An option value to parse.
* @returns {{multiline: boolean, minItems: number}} Normalized option object.
*/
function normalizeOptionValue(providedOption) {
let consistent = false;
let multiline = false;
let minItems;
const option = providedOption || "always";
if (!option || option === "always" || option.minItems === 0) {
minItems = 0;
} else if (option === "never") {
minItems = Number.POSITIVE_INFINITY;
} else if (option === "consistent") {
consistent = true;
minItems = Number.POSITIVE_INFINITY;
} else {
multiline = Boolean(option.multiline);
minItems = option.minItems || Number.POSITIVE_INFINITY;
}
return { consistent, multiline, minItems };
}
/**
* Normalizes a given option value.
* @param {string|Object|undefined} options An option value to parse.
* @returns {{ArrayExpression: {multiline: boolean, minItems: number}, ArrayPattern: {multiline: boolean, minItems: number}}} Normalized option object.
*/
function normalizeOptions(options) {
if (options && (options.ArrayExpression || options.ArrayPattern)) {
let expressionOptions, patternOptions;
if (options.ArrayExpression) {
expressionOptions = normalizeOptionValue(
options.ArrayExpression,
);
}
if (options.ArrayPattern) {
patternOptions = normalizeOptionValue(options.ArrayPattern);
}
return {
ArrayExpression: expressionOptions,
ArrayPattern: patternOptions,
};
}
const value = normalizeOptionValue(options);
return { ArrayExpression: value, ArrayPattern: value };
}
/**
* Reports that there shouldn't be a line break after the first token
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportNoLineBreak(token) {
const tokenBefore = sourceCode.getTokenBefore(token, {
includeComments: true,
});
context.report({
loc: {
start: tokenBefore.loc.end,
end: token.loc.start,
},
messageId: "unexpectedLineBreak",
fix(fixer) {
if (astUtils.isCommentToken(tokenBefore)) {
return null;
}
if (!astUtils.isTokenOnSameLine(tokenBefore, token)) {
return fixer.replaceTextRange(
[tokenBefore.range[1], token.range[0]],
" ",
);
}
/*
* This will check if the comma is on the same line as the next element
* Following array:
* [
* 1
* , 2
* , 3
* ]
*
* will be fixed to:
* [
* 1, 2, 3
* ]
*/
const twoTokensBefore = sourceCode.getTokenBefore(
tokenBefore,
{ includeComments: true },
);
if (astUtils.isCommentToken(twoTokensBefore)) {
return null;
}
return fixer.replaceTextRange(
[twoTokensBefore.range[1], tokenBefore.range[0]],
"",
);
},
});
}
/**
* Reports that there should be a line break after the first token
* @param {Token} token The token to use for the report.
* @returns {void}
*/
function reportRequiredLineBreak(token) {
const tokenBefore = sourceCode.getTokenBefore(token, {
includeComments: true,
});
context.report({
loc: {
start: tokenBefore.loc.end,
end: token.loc.start,
},
messageId: "missingLineBreak",
fix(fixer) {
return fixer.replaceTextRange(
[tokenBefore.range[1], token.range[0]],
"\n",
);
},
});
}
/**
* Reports a given node if it violated this rule.
* @param {ASTNode} node A node to check. This is an ObjectExpression node or an ObjectPattern node.
* @returns {void}
*/
function check(node) {
const elements = node.elements;
const normalizedOptions = normalizeOptions(context.options[0]);
const options = normalizedOptions[node.type];
if (!options) {
return;
}
let elementBreak = false;
/*
* MULTILINE: true
* loop through every element and check
* if at least one element has linebreaks inside
* this ensures that following is not valid (due to elements are on the same line):
*
* [
* 1,
* 2,
* 3
* ]
*/
if (options.multiline) {
elementBreak = elements
.filter(element => element !== null)
.some(
element =>
element.loc.start.line !== element.loc.end.line,
);
}
let linebreaksCount = 0;
for (let i = 0; i < node.elements.length; i++) {
const element = node.elements[i];
const previousElement = elements[i - 1];
if (i === 0 || element === null || previousElement === null) {
continue;
}
const commaToken = sourceCode.getFirstTokenBetween(
previousElement,
element,
astUtils.isCommaToken,
);
const lastTokenOfPreviousElement =
sourceCode.getTokenBefore(commaToken);
const firstTokenOfCurrentElement =
sourceCode.getTokenAfter(commaToken);
if (
!astUtils.isTokenOnSameLine(
lastTokenOfPreviousElement,
firstTokenOfCurrentElement,
)
) {
linebreaksCount++;
}
}
const needsLinebreaks =
elements.length >= options.minItems ||
(options.multiline && elementBreak) ||
(options.consistent &&
linebreaksCount > 0 &&
linebreaksCount < node.elements.length);
elements.forEach((element, i) => {
const previousElement = elements[i - 1];
if (i === 0 || element === null || previousElement === null) {
return;
}
const commaToken = sourceCode.getFirstTokenBetween(
previousElement,
element,
astUtils.isCommaToken,
);
const lastTokenOfPreviousElement =
sourceCode.getTokenBefore(commaToken);
const firstTokenOfCurrentElement =
sourceCode.getTokenAfter(commaToken);
if (needsLinebreaks) {
if (
astUtils.isTokenOnSameLine(
lastTokenOfPreviousElement,
firstTokenOfCurrentElement,
)
) {
reportRequiredLineBreak(firstTokenOfCurrentElement);
}
} else {
if (
!astUtils.isTokenOnSameLine(
lastTokenOfPreviousElement,
firstTokenOfCurrentElement,
)
) {
reportNoLineBreak(firstTokenOfCurrentElement);
}
}
});
}
//----------------------------------------------------------------------
// Public
//----------------------------------------------------------------------
return {
ArrayPattern: check,
ArrayExpression: check,
};
},
};
@@ -0,0 +1,28 @@
var baseIsEqualDeep = require('./_baseIsEqualDeep'),
isObjectLike = require('./isObjectLike');
/**
* The base implementation of `_.isEqual` which supports partial comparisons
* and tracks traversed objects.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @param {boolean} bitmask The bitmask flags.
* 1 - Unordered comparison
* 2 - Partial comparison
* @param {Function} [customizer] The function to customize comparisons.
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
function baseIsEqual(value, other, bitmask, customizer, stack) {
if (value === other) {
return true;
}
if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}
module.exports = baseIsEqual;
@@ -0,0 +1,32 @@
{
"name": "extend",
"author": "Stefan Thomas <justmoon@members.fsf.org> (http://www.justmoon.net)",
"version": "3.0.0",
"description": "Port of jQuery.extend for node.js and the browser.",
"scripts": [
"index.js"
],
"contributors": [
{
"name": "Jordan Harband",
"url": "https://github.com/ljharb"
}
],
"keywords": [
"extend",
"clone",
"merge"
],
"repository" : {
"type": "git",
"url": "https://github.com/justmoon/node-extend.git"
},
"dependencies": {
},
"devDependencies": {
"tape" : "~3.0.0",
"covert": "~0.4.0",
"jscs": "~1.6.2"
}
}
@@ -0,0 +1,106 @@
import {ContextualKeyword} from "./keywords";
import { TokenType as tt} from "./types";
export class Scope {
constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
this.startTokenIndex = startTokenIndex;
this.endTokenIndex = endTokenIndex;
this.isFunctionScope = isFunctionScope;
}
}
export class StateSnapshot {
constructor(
potentialArrowAt,
noAnonFunctionType,
inDisallowConditionalTypesContext,
tokensLength,
scopesLength,
pos,
type,
contextualKeyword,
start,
end,
isType,
scopeDepth,
error,
) {;this.potentialArrowAt = potentialArrowAt;this.noAnonFunctionType = noAnonFunctionType;this.inDisallowConditionalTypesContext = inDisallowConditionalTypesContext;this.tokensLength = tokensLength;this.scopesLength = scopesLength;this.pos = pos;this.type = type;this.contextualKeyword = contextualKeyword;this.start = start;this.end = end;this.isType = isType;this.scopeDepth = scopeDepth;this.error = error;}
}
export default class State {constructor() { State.prototype.__init.call(this);State.prototype.__init2.call(this);State.prototype.__init3.call(this);State.prototype.__init4.call(this);State.prototype.__init5.call(this);State.prototype.__init6.call(this);State.prototype.__init7.call(this);State.prototype.__init8.call(this);State.prototype.__init9.call(this);State.prototype.__init10.call(this);State.prototype.__init11.call(this);State.prototype.__init12.call(this);State.prototype.__init13.call(this); }
// Used to signify the start of a potential arrow function
__init() {this.potentialArrowAt = -1}
// Used by Flow to handle an edge case involving function type parsing.
__init2() {this.noAnonFunctionType = false}
// Used by TypeScript to handle ambiguities when parsing conditional types.
__init3() {this.inDisallowConditionalTypesContext = false}
// Token store.
__init4() {this.tokens = []}
// Array of all observed scopes, ordered by their ending position.
__init5() {this.scopes = []}
// The current position of the tokenizer in the input.
__init6() {this.pos = 0}
// Information about the current token.
__init7() {this.type = tt.eof}
__init8() {this.contextualKeyword = ContextualKeyword.NONE}
__init9() {this.start = 0}
__init10() {this.end = 0}
__init11() {this.isType = false}
__init12() {this.scopeDepth = 0}
/**
* If the parser is in an error state, then the token is always tt.eof and all functions can
* keep executing but should be written so they don't get into an infinite loop in this situation.
*
* This approach, combined with the ability to snapshot and restore state, allows us to implement
* backtracking without exceptions and without needing to explicitly propagate error states
* everywhere.
*/
__init13() {this.error = null}
snapshot() {
return new StateSnapshot(
this.potentialArrowAt,
this.noAnonFunctionType,
this.inDisallowConditionalTypesContext,
this.tokens.length,
this.scopes.length,
this.pos,
this.type,
this.contextualKeyword,
this.start,
this.end,
this.isType,
this.scopeDepth,
this.error,
);
}
restoreFromSnapshot(snapshot) {
this.potentialArrowAt = snapshot.potentialArrowAt;
this.noAnonFunctionType = snapshot.noAnonFunctionType;
this.inDisallowConditionalTypesContext = snapshot.inDisallowConditionalTypesContext;
this.tokens.length = snapshot.tokensLength;
this.scopes.length = snapshot.scopesLength;
this.pos = snapshot.pos;
this.type = snapshot.type;
this.contextualKeyword = snapshot.contextualKeyword;
this.start = snapshot.start;
this.end = snapshot.end;
this.isType = snapshot.isType;
this.scopeDepth = snapshot.scopeDepth;
this.error = snapshot.error;
}
}
@@ -0,0 +1,4 @@
import * as z from "./external.cjs";
export * from "./external.cjs";
export { z };
export default z;
@@ -0,0 +1,32 @@
var toInteger = require('./toInteger'),
toLength = require('./toLength');
/**
* The base implementation of `_.fill` without an iteratee call guard.
*
* @private
* @param {Array} array The array to fill.
* @param {*} value The value to fill `array` with.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns `array`.
*/
function baseFill(array, value, start, end) {
var length = array.length;
start = toInteger(start);
if (start < 0) {
start = -start > length ? 0 : (length + start);
}
end = (end === undefined || end > length) ? length : toInteger(end);
if (end < 0) {
end += length;
}
end = start > end ? 0 : toLength(end);
while (start < end) {
array[start++] = value;
}
return array;
}
module.exports = baseFill;
@@ -0,0 +1,104 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.JavaScriptTypeBuilder = void 0;
const json_1 = require("./json");
const index_1 = require("../argument/index");
const index_2 = require("../async-iterator/index");
const index_3 = require("../awaited/index");
const index_4 = require("../bigint/index");
const index_5 = require("../constructor/index");
const index_6 = require("../constructor-parameters/index");
const index_7 = require("../date/index");
const index_8 = require("../function/index");
const index_9 = require("../instance-type/index");
const index_10 = require("../instantiate/index");
const index_11 = require("../iterator/index");
const index_12 = require("../parameters/index");
const index_13 = require("../promise/index");
const index_14 = require("../regexp/index");
const index_15 = require("../return-type/index");
const index_16 = require("../symbol/index");
const index_17 = require("../uint8array/index");
const index_18 = require("../undefined/index");
const index_19 = require("../void/index");
/** JavaScript Type Builder with Static Resolution for TypeScript */
class JavaScriptTypeBuilder extends json_1.JsonTypeBuilder {
/** `[JavaScript]` Creates a Generic Argument Type */
Argument(index) {
return (0, index_1.Argument)(index);
}
/** `[JavaScript]` Creates a AsyncIterator type */
AsyncIterator(items, options) {
return (0, index_2.AsyncIterator)(items, options);
}
/** `[JavaScript]` Constructs a type by recursively unwrapping Promise types */
Awaited(schema, options) {
return (0, index_3.Awaited)(schema, options);
}
/** `[JavaScript]` Creates a BigInt type */
BigInt(options) {
return (0, index_4.BigInt)(options);
}
/** `[JavaScript]` Extracts the ConstructorParameters from the given Constructor type */
ConstructorParameters(schema, options) {
return (0, index_6.ConstructorParameters)(schema, options);
}
/** `[JavaScript]` Creates a Constructor type */
Constructor(parameters, instanceType, options) {
return (0, index_5.Constructor)(parameters, instanceType, options);
}
/** `[JavaScript]` Creates a Date type */
Date(options = {}) {
return (0, index_7.Date)(options);
}
/** `[JavaScript]` Creates a Function type */
Function(parameters, returnType, options) {
return (0, index_8.Function)(parameters, returnType, options);
}
/** `[JavaScript]` Extracts the InstanceType from the given Constructor type */
InstanceType(schema, options) {
return (0, index_9.InstanceType)(schema, options);
}
/** `[JavaScript]` Instantiates a type with the given parameters */
Instantiate(schema, parameters) {
return (0, index_10.Instantiate)(schema, parameters);
}
/** `[JavaScript]` Creates an Iterator type */
Iterator(items, options) {
return (0, index_11.Iterator)(items, options);
}
/** `[JavaScript]` Extracts the Parameters from the given Function type */
Parameters(schema, options) {
return (0, index_12.Parameters)(schema, options);
}
/** `[JavaScript]` Creates a Promise type */
Promise(item, options) {
return (0, index_13.Promise)(item, options);
}
/** `[JavaScript]` Creates a RegExp type */
RegExp(unresolved, options) {
return (0, index_14.RegExp)(unresolved, options);
}
/** `[JavaScript]` Extracts the ReturnType from the given Function type */
ReturnType(type, options) {
return (0, index_15.ReturnType)(type, options);
}
/** `[JavaScript]` Creates a Symbol type */
Symbol(options) {
return (0, index_16.Symbol)(options);
}
/** `[JavaScript]` Creates a Undefined type */
Undefined(options) {
return (0, index_18.Undefined)(options);
}
/** `[JavaScript]` Creates a Uint8Array type */
Uint8Array(options) {
return (0, index_17.Uint8Array)(options);
}
/** `[JavaScript]` Creates a Void type */
Void(options) {
return (0, index_19.Void)(options);
}
}
exports.JavaScriptTypeBuilder = JavaScriptTypeBuilder;
@@ -0,0 +1 @@
{"version":3,"file":"getSelf.spec.d.ts","sourceRoot":"","sources":["../../../../src/common/calculations/getSelf.spec.ts"],"names":[],"mappings":""}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more