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

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

No files matched your search

@@ -0,0 +1,88 @@
// @ts-check
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
indentRecursive: function() {
return indentRecursive;
},
formatNodes: function() {
return formatNodes;
},
readFileWithRetries: function() {
return readFileWithRetries;
},
drainStdin: function() {
return drainStdin;
},
outputFile: function() {
return outputFile;
}
});
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function indentRecursive(node, indent = 0) {
node.each && node.each((child, i)=>{
if (!child.raws.before || !child.raws.before.trim() || child.raws.before.includes("\n")) {
child.raws.before = `\n${node.type !== "rule" && i > 0 ? "\n" : ""}${" ".repeat(indent)}`;
}
child.raws.after = `\n${" ".repeat(indent)}`;
indentRecursive(child, indent + 1);
});
}
function formatNodes(root) {
indentRecursive(root);
if (root.first) {
root.first.raws.before = "";
}
}
async function readFileWithRetries(path, tries = 5) {
for(let n = 0; n <= tries; n++){
try {
return await _fs.default.promises.readFile(path, "utf8");
} catch (err) {
if (n !== tries) {
if (err.code === "ENOENT" || err.code === "EBUSY") {
await new Promise((resolve)=>setTimeout(resolve, 10));
continue;
}
}
throw err;
}
}
}
function drainStdin() {
return new Promise((resolve, reject)=>{
let result = "";
process.stdin.on("data", (chunk)=>{
result += chunk;
});
process.stdin.on("end", ()=>resolve(result));
process.stdin.on("error", (err)=>reject(err));
});
}
async function outputFile(file, newContents) {
try {
let currentContents = await _fs.default.promises.readFile(file, "utf8");
if (currentContents === newContents) {
return; // Skip writing the file
}
} catch {}
// Write the file
await _fs.default.promises.mkdir(_path.default.dirname(file), {
recursive: true
});
await _fs.default.promises.writeFile(file, newContents, "utf8");
}
@@ -0,0 +1,214 @@
import {
tv
} from "./chunk-UWE6H66T.mjs";
import {
groupDataFocusVisibleClasses,
hiddenInputClasses
} from "./chunk-GH5E4FQB.mjs";
// src/components/checkbox.ts
var checkbox = tv({
slots: {
base: "group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none",
wrapper: [
"relative",
"inline-flex",
"items-center",
"justify-center",
"flex-shrink-0",
"overflow-hidden",
"before:content-['']",
"before:absolute",
"before:inset-0",
"before:border-solid",
"before:border-2",
"before:box-border",
"before:border-default",
"after:content-['']",
"after:absolute",
"after:inset-0",
"after:scale-50",
"after:opacity-0",
"after:origin-center",
"group-data-[selected=true]:after:scale-100",
"group-data-[selected=true]:after:opacity-100",
"group-data-[hover=true]:before:bg-default-100",
...groupDataFocusVisibleClasses
],
hiddenInput: hiddenInputClasses,
icon: "z-10 w-4 h-3 opacity-0 group-data-[selected=true]:opacity-100 pointer-events-none",
label: "relative text-foreground select-none"
},
variants: {
color: {
default: {
wrapper: "after:bg-default after:text-default-foreground text-default-foreground"
},
primary: {
wrapper: "after:bg-primary after:text-primary-foreground text-primary-foreground"
},
secondary: {
wrapper: "after:bg-secondary after:text-secondary-foreground text-secondary-foreground"
},
success: {
wrapper: "after:bg-success after:text-success-foreground text-success-foreground"
},
warning: {
wrapper: "after:bg-warning after:text-warning-foreground text-warning-foreground"
},
danger: {
wrapper: "after:bg-danger after:text-danger-foreground text-danger-foreground"
}
},
size: {
sm: {
wrapper: [
"w-4 h-4 me-2",
"rounded-[calc(theme(borderRadius.medium)*0.5)]",
"before:rounded-[calc(theme(borderRadius.medium)*0.5)]",
"after:rounded-[calc(theme(borderRadius.medium)*0.5)]"
],
label: "text-small",
icon: "w-3 h-2"
},
md: {
wrapper: [
"w-5 h-5 me-2",
"rounded-[calc(theme(borderRadius.medium)*0.6)]",
"before:rounded-[calc(theme(borderRadius.medium)*0.6)]",
"after:rounded-[calc(theme(borderRadius.medium)*0.6)]"
],
label: "text-medium",
icon: "w-4 h-3"
},
lg: {
wrapper: [
"w-6 h-6 me-2",
"rounded-[calc(theme(borderRadius.medium)*0.7)]",
"before:rounded-[calc(theme(borderRadius.medium)*0.7)]",
"after:rounded-[calc(theme(borderRadius.medium)*0.7)]"
],
label: "text-large",
icon: "w-5 h-4"
}
},
radius: {
none: {
wrapper: "rounded-none before:rounded-none after:rounded-none"
},
sm: {
wrapper: [
"rounded-[calc(theme(borderRadius.medium)*0.5)]",
"before:rounded-[calc(theme(borderRadius.medium)*0.5)]",
"after:rounded-[calc(theme(borderRadius.medium)*0.5)]"
]
},
md: {
wrapper: [
"rounded-[calc(theme(borderRadius.medium)*0.6)]",
"before:rounded-[calc(theme(borderRadius.medium)*0.6)]",
"after:rounded-[calc(theme(borderRadius.medium)*0.6)]"
]
},
lg: {
wrapper: [
"rounded-[calc(theme(borderRadius.medium)*0.7)]",
"before:rounded-[calc(theme(borderRadius.medium)*0.7)]",
"after:rounded-[calc(theme(borderRadius.medium)*0.7)]"
]
},
full: {
wrapper: "rounded-full before:rounded-full after:rounded-full"
}
},
lineThrough: {
true: {
label: [
"inline-flex",
"items-center",
"justify-center",
"before:content-['']",
"before:absolute",
"before:bg-foreground",
"before:w-0",
"before:h-0.5",
"group-data-[selected=true]:opacity-60",
"group-data-[selected=true]:before:w-full"
]
}
},
isDisabled: {
true: {
base: "opacity-disabled pointer-events-none"
}
},
isInvalid: {
true: {
wrapper: "before:border-danger",
label: "text-danger"
}
},
disableAnimation: {
true: {
wrapper: "transition-none",
icon: "transition-none",
label: "transition-none"
},
false: {
wrapper: [
"before:transition-colors",
"group-data-[pressed=true]:scale-95",
"transition-transform",
"after:transition-transform-opacity",
"after:!ease-linear",
"after:!duration-200",
"motion-reduce:transition-none"
],
icon: "transition-opacity motion-reduce:transition-none",
label: "transition-colors-opacity before:transition-width motion-reduce:transition-none"
}
}
},
defaultVariants: {
color: "primary",
size: "md",
isDisabled: false,
lineThrough: false
}
});
var checkboxGroup = tv({
slots: {
base: "relative flex flex-col gap-2",
label: "relative text-medium text-foreground-500",
wrapper: "flex flex-col flex-wrap gap-2 data-[orientation=horizontal]:flex-row",
description: "text-small text-foreground-400",
errorMessage: "text-small text-danger"
},
variants: {
isRequired: {
true: {
label: "after:content-['*'] after:text-danger after:ml-0.5"
}
},
isInvalid: {
true: {
description: "text-danger"
}
},
disableAnimation: {
true: {},
false: {
description: "transition-colors !duration-150 motion-reduce:transition-none"
}
}
},
defaultVariants: {
isInvalid: false,
isRequired: false
}
});
export {
checkbox,
checkboxGroup
};
@@ -0,0 +1,3 @@
import type { TSESLint } from '@typescript-eslint/utils';
declare const _default: TSESLint.RuleModule<"replaceUsagesWithConstraint" | "sole", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>;
export default _default;
@@ -0,0 +1 @@
{"version":3,"file":"PlanServiceNodeBindingRemovedResult.d.ts","sourceRoot":"","sources":["../../../../src/metadata/models/PlanServiceNodeBindingRemovedResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,MAAM,WAAW,mCAAmC;IAClD,kBAAkB,EAAE,eAAe,GAAG,SAAS,CAAC;IAChD,oBAAoB,EAAE,OAAO,CAAC;CAC/B"}
@@ -0,0 +1,11 @@
{
"name": "is-module",
"description": "check if a source string is an es6 module",
"keywords": ["es6", "module", "modules"],
"version": "1.0.0",
"license": "MIT",
"repo": "component/is-module",
"scripts": [
"index.js"
]
}
@@ -0,0 +1 @@
export { _ as default } from "../esm/_class_apply_descriptor_destructure.js";
@@ -0,0 +1,440 @@
// Partial port of python's argparse module, version 3.9.0 (only wrap and fill functions):
// https://github.com/python/cpython/blob/v3.9.0b4/Lib/textwrap.py
'use strict'
/*
* Text wrapping and filling.
*/
// Copyright (C) 1999-2001 Gregory P. Ward.
// Copyright (C) 2002, 2003 Python Software Foundation.
// Copyright (C) 2020 argparse.js authors
// Originally written by Greg Ward <gward@python.net>
// Hardcode the recognized whitespace characters to the US-ASCII
// whitespace characters. The main reason for doing this is that
// some Unicode spaces (like \u00a0) are non-breaking whitespaces.
//
// This less funky little regex just split on recognized spaces. E.g.
// "Hello there -- you goof-ball, use the -b option!"
// splits into
// Hello/ /there/ /--/ /you/ /goof-ball,/ /use/ /the/ /-b/ /option!/
const wordsep_simple_re = /([\t\n\x0b\x0c\r ]+)/
class TextWrapper {
/*
* Object for wrapping/filling text. The public interface consists of
* the wrap() and fill() methods; the other methods are just there for
* subclasses to override in order to tweak the default behaviour.
* If you want to completely replace the main wrapping algorithm,
* you'll probably have to override _wrap_chunks().
*
* Several instance attributes control various aspects of wrapping:
* width (default: 70)
* the maximum width of wrapped lines (unless break_long_words
* is false)
* initial_indent (default: "")
* string that will be prepended to the first line of wrapped
* output. Counts towards the line's width.
* subsequent_indent (default: "")
* string that will be prepended to all lines save the first
* of wrapped output; also counts towards each line's width.
* expand_tabs (default: true)
* Expand tabs in input text to spaces before further processing.
* Each tab will become 0 .. 'tabsize' spaces, depending on its position
* in its line. If false, each tab is treated as a single character.
* tabsize (default: 8)
* Expand tabs in input text to 0 .. 'tabsize' spaces, unless
* 'expand_tabs' is false.
* replace_whitespace (default: true)
* Replace all whitespace characters in the input text by spaces
* after tab expansion. Note that if expand_tabs is false and
* replace_whitespace is true, every tab will be converted to a
* single space!
* fix_sentence_endings (default: false)
* Ensure that sentence-ending punctuation is always followed
* by two spaces. Off by default because the algorithm is
* (unavoidably) imperfect.
* break_long_words (default: true)
* Break words longer than 'width'. If false, those words will not
* be broken, and some lines might be longer than 'width'.
* break_on_hyphens (default: true)
* Allow breaking hyphenated words. If true, wrapping will occur
* preferably on whitespaces and right after hyphens part of
* compound words.
* drop_whitespace (default: true)
* Drop leading and trailing whitespace from lines.
* max_lines (default: None)
* Truncate wrapped lines.
* placeholder (default: ' [...]')
* Append to the last line of truncated text.
*/
constructor(options = {}) {
let {
width = 70,
initial_indent = '',
subsequent_indent = '',
expand_tabs = true,
replace_whitespace = true,
fix_sentence_endings = false,
break_long_words = true,
drop_whitespace = true,
break_on_hyphens = true,
tabsize = 8,
max_lines = undefined,
placeholder=' [...]'
} = options
this.width = width
this.initial_indent = initial_indent
this.subsequent_indent = subsequent_indent
this.expand_tabs = expand_tabs
this.replace_whitespace = replace_whitespace
this.fix_sentence_endings = fix_sentence_endings
this.break_long_words = break_long_words
this.drop_whitespace = drop_whitespace
this.break_on_hyphens = break_on_hyphens
this.tabsize = tabsize
this.max_lines = max_lines
this.placeholder = placeholder
}
// -- Private methods -----------------------------------------------
// (possibly useful for subclasses to override)
_munge_whitespace(text) {
/*
* _munge_whitespace(text : string) -> string
*
* Munge whitespace in text: expand tabs and convert all other
* whitespace characters to spaces. Eg. " foo\\tbar\\n\\nbaz"
* becomes " foo bar baz".
*/
if (this.expand_tabs) {
text = text.replace(/\t/g, ' '.repeat(this.tabsize)) // not strictly correct in js
}
if (this.replace_whitespace) {
text = text.replace(/[\t\n\x0b\x0c\r]/g, ' ')
}
return text
}
_split(text) {
/*
* _split(text : string) -> [string]
*
* Split the text to wrap into indivisible chunks. Chunks are
* not quite the same as words; see _wrap_chunks() for full
* details. As an example, the text
* Look, goof-ball -- use the -b option!
* breaks into the following chunks:
* 'Look,', ' ', 'goof-', 'ball', ' ', '--', ' ',
* 'use', ' ', 'the', ' ', '-b', ' ', 'option!'
* if break_on_hyphens is True, or in:
* 'Look,', ' ', 'goof-ball', ' ', '--', ' ',
* 'use', ' ', 'the', ' ', '-b', ' ', option!'
* otherwise.
*/
let chunks = text.split(wordsep_simple_re)
chunks = chunks.filter(Boolean)
return chunks
}
_handle_long_word(reversed_chunks, cur_line, cur_len, width) {
/*
* _handle_long_word(chunks : [string],
* cur_line : [string],
* cur_len : int, width : int)
*
* Handle a chunk of text (most likely a word, not whitespace) that
* is too long to fit in any line.
*/
// Figure out when indent is larger than the specified width, and make
// sure at least one character is stripped off on every pass
let space_left
if (width < 1) {
space_left = 1
} else {
space_left = width - cur_len
}
// If we're allowed to break long words, then do so: put as much
// of the next chunk onto the current line as will fit.
if (this.break_long_words) {
cur_line.push(reversed_chunks[reversed_chunks.length - 1].slice(0, space_left))
reversed_chunks[reversed_chunks.length - 1] = reversed_chunks[reversed_chunks.length - 1].slice(space_left)
// Otherwise, we have to preserve the long word intact. Only add
// it to the current line if there's nothing already there --
// that minimizes how much we violate the width constraint.
} else if (!cur_line) {
cur_line.push(...reversed_chunks.pop())
}
// If we're not allowed to break long words, and there's already
// text on the current line, do nothing. Next time through the
// main loop of _wrap_chunks(), we'll wind up here again, but
// cur_len will be zero, so the next line will be entirely
// devoted to the long word that we can't handle right now.
}
_wrap_chunks(chunks) {
/*
* _wrap_chunks(chunks : [string]) -> [string]
*
* Wrap a sequence of text chunks and return a list of lines of
* length 'self.width' or less. (If 'break_long_words' is false,
* some lines may be longer than this.) Chunks correspond roughly
* to words and the whitespace between them: each chunk is
* indivisible (modulo 'break_long_words'), but a line break can
* come between any two chunks. Chunks should not have internal
* whitespace; ie. a chunk is either all whitespace or a "word".
* Whitespace chunks will be removed from the beginning and end of
* lines, but apart from that whitespace is preserved.
*/
let lines = []
let indent
if (this.width <= 0) {
throw Error(`invalid width ${this.width} (must be > 0)`)
}
if (this.max_lines !== undefined) {
if (this.max_lines > 1) {
indent = this.subsequent_indent
} else {
indent = this.initial_indent
}
if (indent.length + this.placeholder.trimStart().length > this.width) {
throw Error('placeholder too large for max width')
}
}
// Arrange in reverse order so items can be efficiently popped
// from a stack of chucks.
chunks = chunks.reverse()
while (chunks.length > 0) {
// Start the list of chunks that will make up the current line.
// cur_len is just the length of all the chunks in cur_line.
let cur_line = []
let cur_len = 0
// Figure out which static string will prefix this line.
let indent
if (lines) {
indent = this.subsequent_indent
} else {
indent = this.initial_indent
}
// Maximum width for this line.
let width = this.width - indent.length
// First chunk on line is whitespace -- drop it, unless this
// is the very beginning of the text (ie. no lines started yet).
if (this.drop_whitespace && chunks[chunks.length - 1].trim() === '' && lines.length > 0) {
chunks.pop()
}
while (chunks.length > 0) {
let l = chunks[chunks.length - 1].length
// Can at least squeeze this chunk onto the current line.
if (cur_len + l <= width) {
cur_line.push(chunks.pop())
cur_len += l
// Nope, this line is full.
} else {
break
}
}
// The current line is full, and the next chunk is too big to
// fit on *any* line (not just this one).
if (chunks.length && chunks[chunks.length - 1].length > width) {
this._handle_long_word(chunks, cur_line, cur_len, width)
cur_len = cur_line.map(l => l.length).reduce((a, b) => a + b, 0)
}
// If the last chunk on this line is all whitespace, drop it.
if (this.drop_whitespace && cur_line.length > 0 && cur_line[cur_line.length - 1].trim() === '') {
cur_len -= cur_line[cur_line.length - 1].length
cur_line.pop()
}
if (cur_line) {
if (this.max_lines === undefined ||
lines.length + 1 < this.max_lines ||
(chunks.length === 0 ||
this.drop_whitespace &&
chunks.length === 1 &&
!chunks[0].trim()) && cur_len <= width) {
// Convert current line back to a string and store it in
// list of all lines (return value).
lines.push(indent + cur_line.join(''))
} else {
let had_break = false
while (cur_line) {
if (cur_line[cur_line.length - 1].trim() &&
cur_len + this.placeholder.length <= width) {
cur_line.push(this.placeholder)
lines.push(indent + cur_line.join(''))
had_break = true
break
}
cur_len -= cur_line[-1].length
cur_line.pop()
}
if (!had_break) {
if (lines) {
let prev_line = lines[lines.length - 1].trimEnd()
if (prev_line.length + this.placeholder.length <=
this.width) {
lines[lines.length - 1] = prev_line + this.placeholder
break
}
}
lines.push(indent + this.placeholder.lstrip())
}
break
}
}
}
return lines
}
_split_chunks(text) {
text = this._munge_whitespace(text)
return this._split(text)
}
// -- Public interface ----------------------------------------------
wrap(text) {
/*
* wrap(text : string) -> [string]
*
* Reformat the single paragraph in 'text' so it fits in lines of
* no more than 'self.width' columns, and return a list of wrapped
* lines. Tabs in 'text' are expanded with string.expandtabs(),
* and all other whitespace characters (including newline) are
* converted to space.
*/
let chunks = this._split_chunks(text)
// not implemented in js
//if (this.fix_sentence_endings) {
// this._fix_sentence_endings(chunks)
//}
return this._wrap_chunks(chunks)
}
fill(text) {
/*
* fill(text : string) -> string
*
* Reformat the single paragraph in 'text' to fit in lines of no
* more than 'self.width' columns, and return a new string
* containing the entire wrapped paragraph.
*/
return this.wrap(text).join('\n')
}
}
// -- Convenience interface ---------------------------------------------
function wrap(text, options = {}) {
/*
* Wrap a single paragraph of text, returning a list of wrapped lines.
*
* Reformat the single paragraph in 'text' so it fits in lines of no
* more than 'width' columns, and return a list of wrapped lines. By
* default, tabs in 'text' are expanded with string.expandtabs(), and
* all other whitespace characters (including newline) are converted to
* space. See TextWrapper class for available keyword args to customize
* wrapping behaviour.
*/
let { width = 70, ...kwargs } = options
let w = new TextWrapper(Object.assign({ width }, kwargs))
return w.wrap(text)
}
function fill(text, options = {}) {
/*
* Fill a single paragraph of text, returning a new string.
*
* Reformat the single paragraph in 'text' to fit in lines of no more
* than 'width' columns, and return a new string containing the entire
* wrapped paragraph. As with wrap(), tabs are expanded and other
* whitespace characters converted to space. See TextWrapper class for
* available keyword args to customize wrapping behaviour.
*/
let { width = 70, ...kwargs } = options
let w = new TextWrapper(Object.assign({ width }, kwargs))
return w.fill(text)
}
// -- Loosely related functionality -------------------------------------
let _whitespace_only_re = /^[ \t]+$/mg
let _leading_whitespace_re = /(^[ \t]*)(?:[^ \t\n])/mg
function dedent(text) {
/*
* Remove any common leading whitespace from every line in `text`.
*
* This can be used to make triple-quoted strings line up with the left
* edge of the display, while still presenting them in the source code
* in indented form.
*
* Note that tabs and spaces are both treated as whitespace, but they
* are not equal: the lines " hello" and "\\thello" are
* considered to have no common leading whitespace.
*
* Entirely blank lines are normalized to a newline character.
*/
// Look for the longest leading string of spaces and tabs common to
// all lines.
let margin = undefined
text = text.replace(_whitespace_only_re, '')
let indents = text.match(_leading_whitespace_re) || []
for (let indent of indents) {
indent = indent.slice(0, -1)
if (margin === undefined) {
margin = indent
// Current line more deeply indented than previous winner:
// no change (previous winner is still on top).
} else if (indent.startsWith(margin)) {
// pass
// Current line consistent with and no deeper than previous winner:
// it's the new winner.
} else if (margin.startsWith(indent)) {
margin = indent
// Find the largest common whitespace between current line and previous
// winner.
} else {
for (let i = 0; i < margin.length && i < indent.length; i++) {
if (margin[i] !== indent[i]) {
margin = margin.slice(0, i)
break
}
}
}
}
if (margin) {
text = text.replace(new RegExp('^' + margin, 'mg'), '')
}
return text
}
module.exports = { wrap, fill, dedent }
@@ -0,0 +1,27 @@
import { OneBotAction } from '../../action/OneBotAction';
import { Static } from '@sinclair/typebox';
declare const PayloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
notice_id: import("@sinclair/typebox").TString;
}>;
type PayloadType = Static<typeof PayloadSchema>;
declare const ReturnSchema: import("@sinclair/typebox").TAny;
type ReturnType = Static<typeof ReturnSchema>;
export declare class DelGroupNotice extends OneBotAction<PayloadType, ReturnType> {
actionName: "_del_group_notice";
payloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
notice_id: import("@sinclair/typebox").TString;
}>;
returnSchema: import("@sinclair/typebox").TAny;
actionSummary: string;
actionDescription: string;
actionTags: string[];
payloadExample: {
group_id: string;
notice_id: string;
};
returnExample: null;
_handle(payload: PayloadType): Promise<void>;
}
export {};
@@ -0,0 +1,49 @@
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */
/* Projects */
/* Language and Environment */
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
"resolveJsonModule": true, /* Enable importing .json files. */
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
/* JavaScript Support */
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
"maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declarationMap": true, /* Create sourcemaps for d.ts files. */
"noEmit": true, /* Disable emitting files from a compilation. */
/* Interop Constraints */
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
/* Completeness */
//"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"exclude": [
"coverage"
]
}
@@ -0,0 +1,100 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = extractValueFromTSNonNullExpression;
var extractValueFromThisExpression = require('./ThisExpression').default;
var extractValueFromCallExpression = require('./CallExpression').default;
function navigate(obj, prop, value) {
if (value.computed) {
return value.optional ? obj + '?.[' + prop + ']' : obj + '[' + prop + ']';
}
return value.optional ? obj + '?.' + prop : obj + '.' + prop;
}
/**
* Extractor function for a TSNonNullExpression type value node.
* A TSNonNullExpression is accessing a TypeScript Non-Null Assertion
* Operator !
*
* @param - value - AST Value object with type `TSNonNullExpression`
* @returns - The extracted value converted to correct type
* and maintaing `obj.property` convention.
*/
function extractValueFromTSNonNullExpression(value) {
// eslint-disable-next-line global-require
// const getValue = require('.').default;
var errorMessage = 'The prop value with an expression type of TSNonNullExpression could not be resolved. Please file an issue ( https://github.com/jsx-eslint/jsx-ast-utils/issues/new ) to get this fixed immediately.';
// it's just the name
if (value.type === 'Identifier') {
var name = value.name;
return name;
}
if (value.type === 'Literal') {
return value.value;
}
if (value.type === 'TSAsExpression') {
return extractValueFromTSNonNullExpression(value.expression);
}
if (value.type === 'CallExpression') {
return extractValueFromCallExpression(value);
}
if (value.type === 'ThisExpression') {
return extractValueFromThisExpression();
}
// does not contains properties & is not parenthesized
if (value.type === 'TSNonNullExpression' && (!value.extra || value.extra.parenthesized === false)) {
var expression = value.expression;
return extractValueFromTSNonNullExpression(expression) + '!';
}
// does not contains properties & is parenthesized
if (value.type === 'TSNonNullExpression' && value.extra && value.extra.parenthesized === true) {
var _expression = value.expression;
return '(' + extractValueFromTSNonNullExpression(_expression) + '!' + ')';
}
if (value.type === 'MemberExpression') {
// contains a property & is not parenthesized
if (!value.extra || value.extra.parenthesized === false) {
return navigate(extractValueFromTSNonNullExpression(value.object), extractValueFromTSNonNullExpression(value.property), value);
}
// contains a property & is parenthesized
if (value.extra && value.extra.parenthesized === true) {
var result = navigate(extractValueFromTSNonNullExpression(value.object), extractValueFromTSNonNullExpression(value.property), value);
return '(' + result + ')';
}
}
// try to fail silently, if specs for TSNonNullExpression change
// not throw, only log error. Similar to how it was done previously
if (value.expression) {
var _expression2 = value.expression;
while (_expression2) {
if (_expression2.type === 'Identifier') {
// eslint-disable-next-line no-console
console.error(errorMessage);
return _expression2.name;
}
var _expression3 = _expression2;
_expression2 = _expression3.expression;
}
}
// eslint-disable-next-line no-console
console.error(errorMessage);
return '';
}
@@ -0,0 +1,222 @@
var _typeof = require("./typeof.js")["default"];
var checkInRHS = require("./checkInRHS.js");
var setFunctionName = require("./setFunctionName.js");
var toPropertyKey = require("./toPropertyKey.js");
function applyDecs2301Factory() {
function createAddInitializerMethod(e, t) {
return function (r) {
!function (e) {
if (e.v) throw Error("attempted to call addInitializer after decoration was finished");
}(t), assertCallable(r, "An initializer"), e.push(r);
};
}
function assertInstanceIfPrivate(e, t) {
if (!e(t)) throw new TypeError("Attempted to access private element on non-instance");
}
function memberDec(e, t, r, n, a, i, s, o, c) {
var u;
switch (a) {
case 1:
u = "accessor";
break;
case 2:
u = "method";
break;
case 3:
u = "getter";
break;
case 4:
u = "setter";
break;
default:
u = "field";
}
var l,
f,
p = {
kind: u,
name: s ? "#" + t : toPropertyKey(t),
"static": i,
"private": s
},
d = {
v: !1
};
if (0 !== a && (p.addInitializer = createAddInitializerMethod(n, d)), s || 0 !== a && 2 !== a) {
if (2 === a) l = function l(e) {
return assertInstanceIfPrivate(c, e), r.value;
};else {
var h = 0 === a || 1 === a;
(h || 3 === a) && (l = s ? function (e) {
return assertInstanceIfPrivate(c, e), r.get.call(e);
} : function (e) {
return r.get.call(e);
}), (h || 4 === a) && (f = s ? function (e, t) {
assertInstanceIfPrivate(c, e), r.set.call(e, t);
} : function (e, t) {
r.set.call(e, t);
});
}
} else l = function l(e) {
return e[t];
}, 0 === a && (f = function f(e, r) {
e[t] = r;
});
var v = s ? c.bind() : function (e) {
return t in e;
};
p.access = l && f ? {
get: l,
set: f,
has: v
} : l ? {
get: l,
has: v
} : {
set: f,
has: v
};
try {
return e(o, p);
} finally {
d.v = !0;
}
}
function assertCallable(e, t) {
if ("function" != typeof e) throw new TypeError(t + " must be a function");
}
function assertValidReturnValue(e, t) {
var r = _typeof(t);
if (1 === e) {
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init");
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0");
}
function curryThis2(e) {
return function (t) {
e(this, t);
};
}
function applyMemberDec(e, t, r, n, a, i, s, o, c) {
var u,
l,
f,
p,
d,
h,
v,
y,
g = r[0];
if (s ? (0 === a || 1 === a ? (u = {
get: (d = r[3], function () {
return d(this);
}),
set: curryThis2(r[4])
}, f = "get") : 3 === a ? (u = {
get: r[3]
}, f = "get") : 4 === a ? (u = {
set: r[3]
}, f = "set") : u = {
value: r[3]
}, 0 !== a && (1 === a && setFunctionName(u.set, "#" + n, "set"), setFunctionName(u[f || "value"], "#" + n, f))) : 0 !== a && (u = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? p = {
get: u.get,
set: u.set
} : 2 === a ? p = u.value : 3 === a ? p = u.get : 4 === a && (p = u.set), "function" == typeof g) void 0 !== (h = memberDec(g, n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? l = h : 1 === a ? (l = h.init, v = h.get || p.get, y = h.set || p.set, p = {
get: v,
set: y
}) : p = h);else for (var m = g.length - 1; m >= 0; m--) {
var b;
void 0 !== (h = memberDec(g[m], n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? b = h : 1 === a ? (b = h.init, v = h.get || p.get, y = h.set || p.set, p = {
get: v,
set: y
}) : p = h, void 0 !== b && (void 0 === l ? l = b : "function" == typeof l ? l = [l, b] : l.push(b)));
}
if (0 === a || 1 === a) {
if (void 0 === l) l = function l(e, t) {
return t;
};else if ("function" != typeof l) {
var I = l;
l = function l(e, t) {
for (var r = t, n = 0; n < I.length; n++) r = I[n].call(e, r);
return r;
};
} else {
var w = l;
l = function l(e, t) {
return w.call(e, t);
};
}
e.push(l);
}
0 !== a && (1 === a ? (u.get = p.get, u.set = p.set) : 2 === a ? u.value = p : 3 === a ? u.get = p : 4 === a && (u.set = p), s ? 1 === a ? (e.push(function (e, t) {
return p.get.call(e, t);
}), e.push(function (e, t) {
return p.set.call(e, t);
})) : 2 === a ? e.push(p) : e.push(function (e, t) {
return p.call(e, t);
}) : Object.defineProperty(t, n, u));
}
function applyMemberDecs(e, t, r) {
for (var n, a, i, s = [], o = new Map(), c = new Map(), u = 0; u < t.length; u++) {
var l = t[u];
if (Array.isArray(l)) {
var f,
p,
d = l[1],
h = l[2],
v = l.length > 3,
y = d >= 5,
g = r;
if (y ? (f = e, 0 != (d -= 5) && (p = a = a || []), v && !i && (i = function i(t) {
return checkInRHS(t) === e;
}), g = i) : (f = e.prototype, 0 !== d && (p = n = n || [])), 0 !== d && !v) {
var m = y ? c : o,
b = m.get(h) || 0;
if (!0 === b || 3 === b && 4 !== d || 4 === b && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h);
!b && d > 2 ? m.set(h, d) : m.set(h, !0);
}
applyMemberDec(s, f, l, h, d, y, v, p, g);
}
}
return pushInitializers(s, n), pushInitializers(s, a), s;
}
function pushInitializers(e, t) {
t && e.push(function (e) {
for (var r = 0; r < t.length; r++) t[r].call(e);
return e;
});
}
return function (e, t, r, n) {
return {
e: applyMemberDecs(e, t, n),
get c() {
return function (e, t) {
if (t.length > 0) {
for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) {
var s = {
v: !1
};
try {
var o = t[i](n, {
kind: "class",
name: a,
addInitializer: createAddInitializerMethod(r, s)
});
} finally {
s.v = !0;
}
void 0 !== o && (assertValidReturnValue(10, o), n = o);
}
return [n, function () {
for (var e = 0; e < r.length; e++) r[e].call(n);
}];
}
}(e, r);
}
};
};
}
function applyDecs2301(e, t, r, n) {
return (module.exports = applyDecs2301 = applyDecs2301Factory(), module.exports.__esModule = true, module.exports["default"] = module.exports)(e, t, r, n);
}
module.exports = applyDecs2301, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":";;;AAAA,yCAAkE;AAClE,yCAA6D;AAC7D,yCAKqB;AAErB,wCAAwC;AACxC,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,iCAAiC;IACjC,2CAAO,CAAA;IACP,mEAAmE;IACnE,6CAAQ,CAAA;AACZ,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB;AAED,IAAY,YA2BX;AA3BD,WAAY,YAAY;IACpB;;;OAGG;IACH,+CAAI,CAAA;IACJ;;;;OAIG;IACH,iDAAK,CAAA;IACL;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,+CAAI,CAAA;AACR,CAAC,EA3BW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QA2BvB;AAsBD;;;;;GAKG;AACH,SAAgB,MAAM,CAClB,IAAY,EACZ,OAAwD;IAAxD,wBAAA,EAAA,UAAyC,WAAW,CAAC,GAAG;IAExD,IAAM,KAAK,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAEpE,IAAI,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE;QAC5B,IAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QACpE,OAAO,IAAA,sBAAU,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACjC;IAED,OAAO,IAAA,qBAAS,EAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAZD,wBAYC;AAED;;;;;;GAMG;AACH,SAAgB,YAAY,CACxB,IAAY,EACZ,OAAwD;;IAAxD,wBAAA,EAAA,UAAyC,WAAW,CAAC,GAAG;IAExD,IAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IACxE,MAAA,IAAI,CAAC,IAAI,oCAAT,IAAI,CAAC,IAAI,GAAK,wBAAY,CAAC,MAAM,EAAC;IAElC,OAAO,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC9B,CAAC;AARD,oCAQC;AAkBD;;;;;GAKG;AACH,SAAgB,MAAM,CAClB,IAAY,EACZ,OAAwD;IAAxD,wBAAA,EAAA,UAAyC,WAAW,CAAC,GAAG;IAExD,IAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IAExE,wCAAwC;IACxC,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI;QAAE,OAAO,IAAA,sBAAU,EAAC,IAAI,CAAC,CAAC;IAC7D,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,SAAS;QAAE,OAAO,IAAA,2BAAe,EAAC,IAAI,CAAC,CAAC;IACvE,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI;QAAE,OAAO,IAAA,sBAAU,EAAC,IAAI,CAAC,CAAC;IAE7D,IAAI,IAAI,CAAC,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE;QACjC,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,KAAK,EAAE;YAClC,OAAO,IAAA,8BAAkB,EAAC,IAAI,CAAC,CAAC;SACnC;QAED,OAAO,IAAA,sBAAU,EAAC,IAAI,CAAC,CAAC;KAC3B;IAED,qCAAqC;IACrC,OAAO,IAAA,qBAAS,EAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AArBD,wBAqBC;AAED,yCAMqB;AALjB,sGAAA,SAAS,OAAA;AACT,mGAAA,MAAM,OAAA;AACN,uGAAA,UAAU,OAAA;AACV,4GAAA,eAAe,OAAA;AACf,uGAAA,UAAU,OAAA;AAGd,yCAMqB;AALjB,uGAAA,UAAU,OAAA;AACV,+GAAA,kBAAkB,OAAA;AAClB,8BAA8B;AAC9B,wGAAA,UAAU,OAAe;AACzB,wGAAA,UAAU,OAAe;AAG7B,yCAaqB;AAZjB,0GAAA,aAAa,OAAA;AACb,yGAAA,YAAY,OAAA;AACZ,sGAAA,SAAS,OAAA;AACT,uGAAA,UAAU,OAAA;AACV,6GAAA,gBAAgB,OAAA;AAChB,gHAAA,mBAAmB,OAAA;AACnB,8BAA8B;AAC9B,wGAAA,UAAU,OAAe;AACzB,wGAAA,UAAU,OAAe;AACzB,8GAAA,gBAAgB,OAAqB;AACrC,8GAAA,gBAAgB,OAAqB;AACrC,4GAAA,SAAS,OAAmB"}
@@ -0,0 +1,111 @@
# quick-lru [![Build Status](https://travis-ci.org/sindresorhus/quick-lru.svg?branch=master)](https://travis-ci.org/sindresorhus/quick-lru) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/quick-lru/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/quick-lru?branch=master)
> Simple [“Least Recently Used” (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29)
Useful when you need to cache something and limit memory usage.
Inspired by the [`hashlru` algorithm](https://github.com/dominictarr/hashlru#algorithm), but instead uses [`Map`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map) to support keys of any type, not just strings, and values can be `undefined`.
## Install
```
$ npm install quick-lru
```
## Usage
```js
const QuickLRU = require('quick-lru');
const lru = new QuickLRU({maxSize: 1000});
lru.set('🦄', '🌈');
lru.has('🦄');
//=> true
lru.get('🦄');
//=> '🌈'
```
## API
### new QuickLRU(options?)
Returns a new instance.
### options
Type: `object`
#### maxSize
*Required*\
Type: `number`
The maximum number of items before evicting the least recently used items.
#### onEviction
*Optional*\
Type: `(key, value) => void`
Called right before an item is evicted from the cache.
Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`).
### Instance
The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop.
Both `key` and `value` can be of any type.
#### .set(key, value)
Set an item. Returns the instance.
#### .get(key)
Get an item.
#### .has(key)
Check if an item exists.
#### .peek(key)
Get an item without marking it as recently used.
#### .delete(key)
Delete an item.
Returns `true` if the item is removed or `false` if the item doesn't exist.
#### .clear()
Delete all items.
#### .keys()
Iterable for all the keys.
#### .values()
Iterable for all the values.
#### .size
The stored item count.
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-quick-lru?utm_source=npm-quick-lru&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
@@ -0,0 +1,57 @@
{
"name": "micromark-factory-whitespace",
"version": "2.0.1",
"description": "micromark factory to parse markdown whitespace (found in lots of places)",
"license": "MIT",
"keywords": [
"micromark",
"factory",
"whitespace"
],
"repository": "https://github.com/micromark/micromark/tree/main/packages/micromark-factory-whitespace",
"bugs": "https://github.com/micromark/micromark/issues",
"funding": [
{
"type": "GitHub Sponsors",
"url": "https://github.com/sponsors/unifiedjs"
},
{
"type": "OpenCollective",
"url": "https://opencollective.com/unified"
}
],
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
],
"sideEffects": false,
"type": "module",
"files": [
"dev/",
"index.d.ts.map",
"index.d.ts",
"index.js"
],
"exports": {
"development": "./dev/index.js",
"default": "./index.js"
},
"dependencies": {
"micromark-factory-space": "^2.0.0",
"micromark-util-character": "^2.0.0",
"micromark-util-symbol": "^2.0.0",
"micromark-util-types": "^2.0.0"
},
"scripts": {
"build": "micromark-build"
},
"xo": {
"envs": [
"shared-node-browser"
],
"prettier": true,
"rules": {
"unicorn/prefer-code-point": "off"
}
}
}
@@ -0,0 +1,263 @@
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [20.2.9](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v20.2.8...yargs-parser-v20.2.9) (2021-06-20)
### Bug Fixes
* **build:** fixed automated release pipeline ([1fe9135](https://www.github.com/yargs/yargs-parser/commit/1fe9135884790a083615419b2861683e2597dac3))
### [20.2.8](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v20.2.7...yargs-parser-v20.2.8) (2021-06-20)
### Bug Fixes
* **locale:** Turkish camelize and decamelize issues with toLocaleLowerCase/toLocaleUpperCase ([2617303](https://www.github.com/yargs/yargs-parser/commit/261730383e02448562f737b94bbd1f164aed5143))
* **perf:** address slow parse when using unknown-options-as-args ([#394](https://www.github.com/yargs/yargs-parser/issues/394)) ([441f059](https://www.github.com/yargs/yargs-parser/commit/441f059d585d446551068ad213db79ac91daf83a))
* **string-utils:** detect [0,1] ranged values as numbers ([#388](https://www.github.com/yargs/yargs-parser/issues/388)) ([efcc32c](https://www.github.com/yargs/yargs-parser/commit/efcc32c2d6b09aba31abfa2db9bd947befe5586b))
### [20.2.7](https://www.github.com/yargs/yargs-parser/compare/v20.2.6...v20.2.7) (2021-03-10)
### Bug Fixes
* **deno:** force release for Deno ([6687c97](https://www.github.com/yargs/yargs-parser/commit/6687c972d0f3ca7865a97908dde3080b05f8b026))
### [20.2.6](https://www.github.com/yargs/yargs-parser/compare/v20.2.5...v20.2.6) (2021-02-22)
### Bug Fixes
* **populate--:** -- should always be array ([#354](https://www.github.com/yargs/yargs-parser/issues/354)) ([585ae8f](https://www.github.com/yargs/yargs-parser/commit/585ae8ffad74cc02974f92d788e750137fd65146))
### [20.2.5](https://www.github.com/yargs/yargs-parser/compare/v20.2.4...v20.2.5) (2021-02-13)
### Bug Fixes
* do not lowercase camel cased string ([#348](https://www.github.com/yargs/yargs-parser/issues/348)) ([5f4da1f](https://www.github.com/yargs/yargs-parser/commit/5f4da1f17d9d50542d2aaa206c9806ce3e320335))
### [20.2.4](https://www.github.com/yargs/yargs-parser/compare/v20.2.3...v20.2.4) (2020-11-09)
### Bug Fixes
* **deno:** address import issues in Deno ([#339](https://www.github.com/yargs/yargs-parser/issues/339)) ([3b54e5e](https://www.github.com/yargs/yargs-parser/commit/3b54e5eef6e9a7b7c6eec7c12bab3ba3b8ba8306))
### [20.2.3](https://www.github.com/yargs/yargs-parser/compare/v20.2.2...v20.2.3) (2020-10-16)
### Bug Fixes
* **exports:** node 13.0 and 13.1 require the dotted object form _with_ a string fallback ([#336](https://www.github.com/yargs/yargs-parser/issues/336)) ([3ae7242](https://www.github.com/yargs/yargs-parser/commit/3ae7242040ff876d28dabded60ac226e00150c88))
### [20.2.2](https://www.github.com/yargs/yargs-parser/compare/v20.2.1...v20.2.2) (2020-10-14)
### Bug Fixes
* **exports:** node 13.0-13.6 require a string fallback ([#333](https://www.github.com/yargs/yargs-parser/issues/333)) ([291aeda](https://www.github.com/yargs/yargs-parser/commit/291aeda06b685b7a015d83bdf2558e180b37388d))
### [20.2.1](https://www.github.com/yargs/yargs-parser/compare/v20.2.0...v20.2.1) (2020-10-01)
### Bug Fixes
* **deno:** update types for deno ^1.4.0 ([#330](https://www.github.com/yargs/yargs-parser/issues/330)) ([0ab92e5](https://www.github.com/yargs/yargs-parser/commit/0ab92e50b090f11196334c048c9c92cecaddaf56))
## [20.2.0](https://www.github.com/yargs/yargs-parser/compare/v20.1.0...v20.2.0) (2020-09-21)
### Features
* **string-utils:** export looksLikeNumber helper ([#324](https://www.github.com/yargs/yargs-parser/issues/324)) ([c8580a2](https://www.github.com/yargs/yargs-parser/commit/c8580a2327b55f6342acecb6e72b62963d506750))
### Bug Fixes
* **unknown-options-as-args:** convert positionals that look like numbers ([#326](https://www.github.com/yargs/yargs-parser/issues/326)) ([f85ebb4](https://www.github.com/yargs/yargs-parser/commit/f85ebb4face9d4b0f56147659404cbe0002f3dad))
## [20.1.0](https://www.github.com/yargs/yargs-parser/compare/v20.0.0...v20.1.0) (2020-09-20)
### Features
* adds parse-positional-numbers configuration ([#321](https://www.github.com/yargs/yargs-parser/issues/321)) ([9cec00a](https://www.github.com/yargs/yargs-parser/commit/9cec00a622251292ffb7dce6f78f5353afaa0d4c))
### Bug Fixes
* **build:** update release-please; make labels kick off builds ([#323](https://www.github.com/yargs/yargs-parser/issues/323)) ([09f448b](https://www.github.com/yargs/yargs-parser/commit/09f448b4cd66e25d2872544718df46dab8af062a))
## [20.0.0](https://www.github.com/yargs/yargs-parser/compare/v19.0.4...v20.0.0) (2020-09-09)
### ⚠ BREAKING CHANGES
* do not ship type definitions (#318)
### Bug Fixes
* only strip camel case if hyphenated ([#316](https://www.github.com/yargs/yargs-parser/issues/316)) ([95a9e78](https://www.github.com/yargs/yargs-parser/commit/95a9e785127b9bbf2d1db1f1f808ca1fb100e82a)), closes [#315](https://www.github.com/yargs/yargs-parser/issues/315)
### Code Refactoring
* do not ship type definitions ([#318](https://www.github.com/yargs/yargs-parser/issues/318)) ([8fbd56f](https://www.github.com/yargs/yargs-parser/commit/8fbd56f1d0b6c44c30fca62708812151ca0ce330))
### [19.0.4](https://www.github.com/yargs/yargs-parser/compare/v19.0.3...v19.0.4) (2020-08-27)
### Bug Fixes
* **build:** fixing publication ([#310](https://www.github.com/yargs/yargs-parser/issues/310)) ([5d3c6c2](https://www.github.com/yargs/yargs-parser/commit/5d3c6c29a9126248ba601920d9cf87c78e161ff5))
### [19.0.3](https://www.github.com/yargs/yargs-parser/compare/v19.0.2...v19.0.3) (2020-08-27)
### Bug Fixes
* **build:** switch to action for publish ([#308](https://www.github.com/yargs/yargs-parser/issues/308)) ([5c2f305](https://www.github.com/yargs/yargs-parser/commit/5c2f30585342bcd8aaf926407c863099d256d174))
### [19.0.2](https://www.github.com/yargs/yargs-parser/compare/v19.0.1...v19.0.2) (2020-08-27)
### Bug Fixes
* **types:** envPrefix should be optional ([#305](https://www.github.com/yargs/yargs-parser/issues/305)) ([ae3f180](https://www.github.com/yargs/yargs-parser/commit/ae3f180e14df2de2fd962145f4518f9aa0e76523))
### [19.0.1](https://www.github.com/yargs/yargs-parser/compare/v19.0.0...v19.0.1) (2020-08-09)
### Bug Fixes
* **build:** push tag created for deno ([2186a14](https://www.github.com/yargs/yargs-parser/commit/2186a14989749887d56189867602e39e6679f8b0))
## [19.0.0](https://www.github.com/yargs/yargs-parser/compare/v18.1.3...v19.0.0) (2020-08-09)
### ⚠ BREAKING CHANGES
* adds support for ESM and Deno (#295)
* **ts:** projects using `@types/yargs-parser` may see variations in type definitions.
* drops Node 6. begin following Node.js LTS schedule (#278)
### Features
* adds support for ESM and Deno ([#295](https://www.github.com/yargs/yargs-parser/issues/295)) ([195bc4a](https://www.github.com/yargs/yargs-parser/commit/195bc4a7f20c2a8f8e33fbb6ba96ef6e9a0120a1))
* expose camelCase and decamelize helpers ([#296](https://www.github.com/yargs/yargs-parser/issues/296)) ([39154ce](https://www.github.com/yargs/yargs-parser/commit/39154ceb5bdcf76b5f59a9219b34cedb79b67f26))
* **deps:** update to latest camelcase/decamelize ([#281](https://www.github.com/yargs/yargs-parser/issues/281)) ([8931ab0](https://www.github.com/yargs/yargs-parser/commit/8931ab08f686cc55286f33a95a83537da2be5516))
### Bug Fixes
* boolean numeric short option ([#294](https://www.github.com/yargs/yargs-parser/issues/294)) ([f600082](https://www.github.com/yargs/yargs-parser/commit/f600082c959e092076caf420bbbc9d7a231e2418))
* raise permission error for Deno if config load fails ([#298](https://www.github.com/yargs/yargs-parser/issues/298)) ([1174e2b](https://www.github.com/yargs/yargs-parser/commit/1174e2b3f0c845a1cd64e14ffc3703e730567a84))
* **deps:** update dependency decamelize to v3 ([#274](https://www.github.com/yargs/yargs-parser/issues/274)) ([4d98698](https://www.github.com/yargs/yargs-parser/commit/4d98698bc6767e84ec54a0842908191739be73b7))
* **types:** switch back to using Partial types ([#293](https://www.github.com/yargs/yargs-parser/issues/293)) ([bdc80ba](https://www.github.com/yargs/yargs-parser/commit/bdc80ba59fa13bc3025ce0a85e8bad9f9da24ea7))
### Build System
* drops Node 6. begin following Node.js LTS schedule ([#278](https://www.github.com/yargs/yargs-parser/issues/278)) ([9014ed7](https://www.github.com/yargs/yargs-parser/commit/9014ed722a32768b96b829e65a31705db5c1458a))
### Code Refactoring
* **ts:** move index.js to TypeScript ([#292](https://www.github.com/yargs/yargs-parser/issues/292)) ([f78d2b9](https://www.github.com/yargs/yargs-parser/commit/f78d2b97567ac4828624406e420b4047c710b789))
### [18.1.3](https://www.github.com/yargs/yargs-parser/compare/v18.1.2...v18.1.3) (2020-04-16)
### Bug Fixes
* **setArg:** options using camel-case and dot-notation populated twice ([#268](https://www.github.com/yargs/yargs-parser/issues/268)) ([f7e15b9](https://www.github.com/yargs/yargs-parser/commit/f7e15b9800900b9856acac1a830a5f35847be73e))
### [18.1.2](https://www.github.com/yargs/yargs-parser/compare/v18.1.1...v18.1.2) (2020-03-26)
### Bug Fixes
* **array, nargs:** support -o=--value and --option=--value format ([#262](https://www.github.com/yargs/yargs-parser/issues/262)) ([41d3f81](https://www.github.com/yargs/yargs-parser/commit/41d3f8139e116706b28de9b0de3433feb08d2f13))
### [18.1.1](https://www.github.com/yargs/yargs-parser/compare/v18.1.0...v18.1.1) (2020-03-16)
### Bug Fixes
* \_\_proto\_\_ will now be replaced with \_\_\_proto\_\_\_ in parse ([#258](https://www.github.com/yargs/yargs-parser/issues/258)), patching a potential
prototype pollution vulnerability. This was reported by the Snyk Security Research Team.([63810ca](https://www.github.com/yargs/yargs-parser/commit/63810ca1ae1a24b08293a4d971e70e058c7a41e2))
## [18.1.0](https://www.github.com/yargs/yargs-parser/compare/v18.0.0...v18.1.0) (2020-03-07)
### Features
* introduce single-digit boolean aliases ([#255](https://www.github.com/yargs/yargs-parser/issues/255)) ([9c60265](https://www.github.com/yargs/yargs-parser/commit/9c60265fd7a03cb98e6df3e32c8c5e7508d9f56f))
## [18.0.0](https://www.github.com/yargs/yargs-parser/compare/v17.1.0...v18.0.0) (2020-03-02)
### ⚠ BREAKING CHANGES
* the narg count is now enforced when parsing arrays.
### Features
* NaN can now be provided as a value for nargs, indicating "at least" one value is expected for array ([#251](https://www.github.com/yargs/yargs-parser/issues/251)) ([9db4be8](https://www.github.com/yargs/yargs-parser/commit/9db4be81417a2c7097128db34d86fe70ef4af70c))
## [17.1.0](https://www.github.com/yargs/yargs-parser/compare/v17.0.1...v17.1.0) (2020-03-01)
### Features
* introduce greedy-arrays config, for specifying whether arrays consume multiple positionals ([#249](https://www.github.com/yargs/yargs-parser/issues/249)) ([60e880a](https://www.github.com/yargs/yargs-parser/commit/60e880a837046314d89fa4725f923837fd33a9eb))
### [17.0.1](https://www.github.com/yargs/yargs-parser/compare/v17.0.0...v17.0.1) (2020-02-29)
### Bug Fixes
* normalized keys were not enumerable ([#247](https://www.github.com/yargs/yargs-parser/issues/247)) ([57119f9](https://www.github.com/yargs/yargs-parser/commit/57119f9f17cf27499bd95e61c2f72d18314f11ba))
## [17.0.0](https://www.github.com/yargs/yargs-parser/compare/v16.1.0...v17.0.0) (2020-02-10)
### ⚠ BREAKING CHANGES
* this reverts parsing behavior of booleans to that of yargs@14
* objects used during parsing are now created with a null
prototype. There may be some scenarios where this change in behavior
leaks externally.
### Features
* boolean arguments will not be collected into an implicit array ([#236](https://www.github.com/yargs/yargs-parser/issues/236)) ([34c4e19](https://www.github.com/yargs/yargs-parser/commit/34c4e19bae4e7af63e3cb6fa654a97ed476e5eb5))
* introduce nargs-eats-options config option ([#246](https://www.github.com/yargs/yargs-parser/issues/246)) ([d50822a](https://www.github.com/yargs/yargs-parser/commit/d50822ac10e1b05f2e9643671ca131ac251b6732))
### Bug Fixes
* address bugs with "uknown-options-as-args" ([bc023e3](https://www.github.com/yargs/yargs-parser/commit/bc023e3b13e20a118353f9507d1c999bf388a346))
* array should take precedence over nargs, but enforce nargs ([#243](https://www.github.com/yargs/yargs-parser/issues/243)) ([4cbc188](https://www.github.com/yargs/yargs-parser/commit/4cbc188b7abb2249529a19c090338debdad2fe6c))
* support keys that collide with object prototypes ([#234](https://www.github.com/yargs/yargs-parser/issues/234)) ([1587b6d](https://www.github.com/yargs/yargs-parser/commit/1587b6d91db853a9109f1be6b209077993fee4de))
* unknown options terminated with digits now handled by unknown-options-as-args ([#238](https://www.github.com/yargs/yargs-parser/issues/238)) ([d36cdfa](https://www.github.com/yargs/yargs-parser/commit/d36cdfa854254d7c7e0fe1d583818332ac46c2a5))
## [16.1.0](https://www.github.com/yargs/yargs-parser/compare/v16.0.0...v16.1.0) (2019-11-01)
### ⚠ BREAKING CHANGES
* populate error if incompatible narg/count or array/count options are used (#191)
### Features
* options that have had their default value used are now tracked ([#211](https://www.github.com/yargs/yargs-parser/issues/211)) ([a525234](https://www.github.com/yargs/yargs-parser/commit/a525234558c847deedd73f8792e0a3b77b26e2c0))
* populate error if incompatible narg/count or array/count options are used ([#191](https://www.github.com/yargs/yargs-parser/issues/191)) ([84a401f](https://www.github.com/yargs/yargs-parser/commit/84a401f0fa3095e0a19661670d1570d0c3b9d3c9))
### Reverts
* revert 16.0.0 CHANGELOG entry ([920320a](https://www.github.com/yargs/yargs-parser/commit/920320ad9861bbfd58eda39221ae211540fc1daf))
@@ -0,0 +1,48 @@
import baseFlatten from './_baseFlatten.js';
import baseOrderBy from './_baseOrderBy.js';
import baseRest from './_baseRest.js';
import isIterateeCall from './_isIterateeCall.js';
/**
* Creates an array of elements, sorted in ascending order by the results of
* running each element in a collection thru each iteratee. This method
* performs a stable sort, that is, it preserves the original sort order of
* equal elements. The iteratees are invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {...(Function|Function[])} [iteratees=[_.identity]]
* The iteratees to sort by.
* @returns {Array} Returns the new sorted array.
* @example
*
* var users = [
* { 'user': 'fred', 'age': 48 },
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 30 },
* { 'user': 'barney', 'age': 34 }
* ];
*
* _.sortBy(users, [function(o) { return o.user; }]);
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
*
* _.sortBy(users, ['user', 'age']);
* // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
*/
var sortBy = baseRest(function(collection, iteratees) {
if (collection == null) {
return [];
}
var length = iteratees.length;
if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
iteratees = [];
} else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
iteratees = [iteratees[0]];
}
return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
});
export default sortBy;
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IntersectCreate = IntersectCreate;
const type_1 = require("../create/type");
const index_1 = require("../symbols/index");
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
const kind_1 = require("../guard/kind");
// ------------------------------------------------------------------
// IntersectCreate
// ------------------------------------------------------------------
// prettier-ignore
function IntersectCreate(T, options = {}) {
const allObjects = T.every((schema) => (0, kind_1.IsObject)(schema));
const clonedUnevaluatedProperties = (0, kind_1.IsSchema)(options.unevaluatedProperties)
? { unevaluatedProperties: options.unevaluatedProperties }
: {};
return (0, type_1.CreateType)((options.unevaluatedProperties === false || (0, kind_1.IsSchema)(options.unevaluatedProperties) || allObjects
? { ...clonedUnevaluatedProperties, [index_1.Kind]: 'Intersect', type: 'object', allOf: T }
: { ...clonedUnevaluatedProperties, [index_1.Kind]: 'Intersect', allOf: T }), options);
}
@@ -0,0 +1,9 @@
import { InternalBindingConstraints } from '../../binding/models/BindingConstraintsImplementation';
import { SingleImmutableLinkedList } from '../../common/models/SingleImmutableLinkedList';
import { ManagedClassElementMetadata } from '../../metadata/models/ManagedClassElementMetadata';
import { ResolvedValueElementMetadata } from '../../metadata/models/ResolvedValueElementMetadata';
import { PlanBindingNode } from '../models/PlanBindingNode';
import { PlanServiceNode } from '../models/PlanServiceNode';
import { SubplanParams } from '../models/SubplanParams';
export declare function currySubplan(buildLazyPlanServiceNodeNodeFromClassElementMetadata: (params: SubplanParams, bindingConstraintsList: SingleImmutableLinkedList<InternalBindingConstraints>, elementMetadata: ManagedClassElementMetadata) => PlanServiceNode, buildLazyPlanServiceNodeNodeFromResolvedValueElementMetadata: (params: SubplanParams, bindingConstraintsList: SingleImmutableLinkedList<InternalBindingConstraints>, elementMetadata: ResolvedValueElementMetadata) => PlanServiceNode, buildPlanServiceNodeFromClassElementMetadata: (params: SubplanParams, bindingConstraintsList: SingleImmutableLinkedList<InternalBindingConstraints>, elementMetadata: ManagedClassElementMetadata) => PlanServiceNode | undefined, buildPlanServiceNodeFromResolvedValueElementMetadata: (params: SubplanParams, bindingConstraintsList: SingleImmutableLinkedList<InternalBindingConstraints>, elementMetadata: ResolvedValueElementMetadata) => PlanServiceNode | undefined): (params: SubplanParams, bindingConstraintsList: SingleImmutableLinkedList<InternalBindingConstraints>) => PlanBindingNode;
//# sourceMappingURL=currySubplan.d.ts.map
@@ -0,0 +1,88 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export type {
AnyCalendarDate,
AnyTime,
AnyDateTime,
Calendar,
DateDuration,
TimeDuration,
DateTimeDuration,
DateFields,
TimeFields,
DateField,
TimeField,
Disambiguation,
CycleOptions,
CycleTimeOptions
} from './types';
export {CalendarDate, CalendarDateTime, Time, ZonedDateTime} from './CalendarDate';
export {GregorianCalendar} from './calendars/GregorianCalendar';
export {JapaneseCalendar} from './calendars/JapaneseCalendar';
export {BuddhistCalendar} from './calendars/BuddhistCalendar';
export {TaiwanCalendar} from './calendars/TaiwanCalendar';
export {PersianCalendar} from './calendars/PersianCalendar';
export {IndianCalendar} from './calendars/IndianCalendar';
export {IslamicCivilCalendar, IslamicTabularCalendar, IslamicUmalquraCalendar} from './calendars/IslamicCalendar';
export {HebrewCalendar} from './calendars/HebrewCalendar';
export {EthiopicCalendar, EthiopicAmeteAlemCalendar, CopticCalendar} from './calendars/EthiopicCalendar';
export {createCalendar} from './createCalendar';
export {
toCalendarDate,
toCalendarDateTime,
toTime,
toCalendar,
toZoned,
toTimeZone,
toLocalTimeZone,
fromDate,
fromAbsolute
} from './conversion';
export {
isSameDay,
isSameMonth,
isSameYear,
isEqualDay,
isEqualMonth,
isEqualYear,
isToday,
getDayOfWeek,
now,
today,
getHoursInDay,
getLocalTimeZone,
startOfMonth,
startOfWeek,
startOfYear,
endOfMonth,
endOfWeek,
endOfYear,
getMinimumMonthInYear,
getMinimumDayInMonth,
getWeeksInMonth,
minDate,
maxDate,
isWeekend,
isWeekday
} from './queries';
export {
parseDate,
parseDateTime,
parseTime,
parseAbsolute,
parseAbsoluteToLocal,
parseZonedDateTime,
parseDuration
} from './string';
export {DateFormatter} from './DateFormatter';
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return resolveConfig;
}
});
const _resolveConfig = /*#__PURE__*/ _interop_require_default(require("../util/resolveConfig"));
const _getAllConfigs = /*#__PURE__*/ _interop_require_default(require("../util/getAllConfigs"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function resolveConfig(...configs) {
let [, ...defaultConfigs] = (0, _getAllConfigs.default)(configs[0]);
return (0, _resolveConfig.default)([
...configs,
...defaultConfigs
]);
}
@@ -0,0 +1,4 @@
export { default as FactoryFunction } from "./factory-function";
export { default as instanceCachingFactory } from "./instance-caching-factory";
export { default as instancePerContainerCachingFactory } from "./instance-per-container-caching-factory";
export { default as predicateAwareClassFactory } from "./predicate-aware-class-factory";
@@ -0,0 +1,204 @@
import { getEndpointDefinition } from '@internal/query/apiTypes'
import type { QueryDefinition } from '../../endpointDefinitions'
import type { ConfigState, QueryCacheKey, QuerySubState } from '../apiState'
import { isAnyOf } from '../rtkImports'
import type {
ApiMiddlewareInternalHandler,
InternalHandlerBuilder,
QueryStateMeta,
SubMiddlewareApi,
TimeoutId,
} from './types'
export type ReferenceCacheCollection = never
/**
* @example
* ```ts
* // codeblock-meta title="keepUnusedDataFor example"
* import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'
* interface Post {
* id: number
* name: string
* }
* type PostsResponse = Post[]
*
* const api = createApi({
* baseQuery: fetchBaseQuery({ baseUrl: '/' }),
* endpoints: (build) => ({
* getPosts: build.query<PostsResponse, void>({
* query: () => 'posts',
* // highlight-start
* keepUnusedDataFor: 5
* // highlight-end
* })
* })
* })
* ```
*/
export type CacheCollectionQueryExtraOptions = {
/**
* Overrides the api-wide definition of `keepUnusedDataFor` for this endpoint only. _(This value is in seconds.)_
*
* This is how long RTK Query will keep your data cached for **after** the last component unsubscribes. For example, if you query an endpoint, then unmount the component, then mount another component that makes the same request within the given time frame, the most recent value will be served from the cache.
*/
keepUnusedDataFor?: number
}
// Per https://developer.mozilla.org/en-US/docs/Web/API/setTimeout#maximum_delay_value , browsers store
// `setTimeout()` timer values in a 32-bit int. If we pass a value in that's larger than that,
// it wraps and ends up executing immediately.
// Our `keepUnusedDataFor` values are in seconds, so adjust the numbers here accordingly.
export const THIRTY_TWO_BIT_MAX_INT = 2_147_483_647
export const THIRTY_TWO_BIT_MAX_TIMER_SECONDS = 2_147_483_647 / 1_000 - 1
export const buildCacheCollectionHandler: InternalHandlerBuilder = ({
reducerPath,
api,
queryThunk,
context,
internalState,
selectors: { selectQueryEntry, selectConfig },
getRunningQueryThunk,
mwApi,
}) => {
const { removeQueryResult, unsubscribeQueryResult, cacheEntriesUpserted } =
api.internalActions
const canTriggerUnsubscribe = isAnyOf(
unsubscribeQueryResult.match,
queryThunk.fulfilled,
queryThunk.rejected,
cacheEntriesUpserted.match,
)
function anySubscriptionsRemainingForKey(queryCacheKey: string) {
const subscriptions = internalState.currentSubscriptions.get(queryCacheKey)
if (!subscriptions) {
return false
}
const hasSubscriptions = subscriptions.size > 0
return hasSubscriptions
}
const currentRemovalTimeouts: QueryStateMeta<TimeoutId> = {}
function abortAllPromises<T extends { abort?: () => void }>(
promiseMap: Map<string, T | undefined>,
): void {
for (const promise of promiseMap.values()) {
promise?.abort?.()
}
}
const handler: ApiMiddlewareInternalHandler = (action, mwApi) => {
const state = mwApi.getState()
const config = selectConfig(state)
if (canTriggerUnsubscribe(action)) {
let queryCacheKeys: QueryCacheKey[]
if (cacheEntriesUpserted.match(action)) {
queryCacheKeys = action.payload.map(
(entry) => entry.queryDescription.queryCacheKey,
)
} else {
const { queryCacheKey } = unsubscribeQueryResult.match(action)
? action.payload
: action.meta.arg
queryCacheKeys = [queryCacheKey]
}
handleUnsubscribeMany(queryCacheKeys, mwApi, config)
}
if (api.util.resetApiState.match(action)) {
for (const [key, timeout] of Object.entries(currentRemovalTimeouts)) {
if (timeout) clearTimeout(timeout)
delete currentRemovalTimeouts[key]
}
abortAllPromises(internalState.runningQueries)
abortAllPromises(internalState.runningMutations)
}
if (context.hasRehydrationInfo(action)) {
const { queries } = context.extractRehydrationInfo(action)!
// Gotcha:
// If rehydrating before the endpoint has been injected,the global `keepUnusedDataFor`
// will be used instead of the endpoint-specific one.
handleUnsubscribeMany(
Object.keys(queries) as QueryCacheKey[],
mwApi,
config,
)
}
}
function handleUnsubscribeMany(
cacheKeys: QueryCacheKey[],
api: SubMiddlewareApi,
config: ConfigState<string>,
) {
const state = api.getState()
for (const queryCacheKey of cacheKeys) {
const entry = selectQueryEntry(state, queryCacheKey)
if (entry?.endpointName) {
handleUnsubscribe(queryCacheKey, entry.endpointName, api, config)
}
}
}
function handleUnsubscribe(
queryCacheKey: QueryCacheKey,
endpointName: string,
api: SubMiddlewareApi,
config: ConfigState<string>,
) {
const endpointDefinition = getEndpointDefinition(
context,
endpointName,
) as QueryDefinition<any, any, any, any>
const keepUnusedDataFor =
endpointDefinition?.keepUnusedDataFor ?? config.keepUnusedDataFor
if (keepUnusedDataFor === Infinity) {
// Hey, user said keep this forever!
return
}
// Prevent `setTimeout` timers from overflowing a 32-bit internal int, by
// clamping the max value to be at most 1000ms less than the 32-bit max.
// Look, a 24.8-day keepalive ought to be enough for anybody, right? :)
// Also avoid negative values too.
const finalKeepUnusedDataFor = Math.max(
0,
Math.min(keepUnusedDataFor, THIRTY_TWO_BIT_MAX_TIMER_SECONDS),
)
if (!anySubscriptionsRemainingForKey(queryCacheKey)) {
const currentTimeout = currentRemovalTimeouts[queryCacheKey]
if (currentTimeout) {
clearTimeout(currentTimeout)
}
currentRemovalTimeouts[queryCacheKey] = setTimeout(() => {
if (!anySubscriptionsRemainingForKey(queryCacheKey)) {
// Try to abort any running query for this cache key
const entry = selectQueryEntry(api.getState(), queryCacheKey)
if (entry?.endpointName) {
const runningQuery = api.dispatch(
getRunningQueryThunk(entry.endpointName, entry.originalArgs),
)
runningQuery?.abort()
}
api.dispatch(removeQueryResult({ queryCacheKey }))
}
delete currentRemovalTimeouts![queryCacheKey]
}, finalKeepUnusedDataFor * 1000)
}
}
return handler
}
@@ -0,0 +1,117 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
function isCalleeOfNewExpression(node) {
const maybeCallee = node.parent?.type === "ChainExpression" ? node.parent : node;
return maybeCallee.parent?.type === "NewExpression" && maybeCallee.parent.callee === maybeCallee;
}
var wrapIife = utils.createRule({
name: "wrap-iife",
package: "js",
meta: {
type: "layout",
docs: {
description: "Require parentheses around immediate `function` invocations"
},
schema: [
{
type: "string",
enum: ["outside", "inside", "any"]
},
{
type: "object",
properties: {
functionPrototypeMethods: {
type: "boolean",
default: false
}
},
additionalProperties: false
}
],
fixable: "code",
messages: {
wrapInvocation: "Wrap an immediate function invocation in parentheses.",
wrapExpression: "Wrap only the function expression in parens.",
moveInvocation: "Move the invocation into the parens that contain the function."
}
},
create(context) {
const style = context.options[0] || "outside";
const includeFunctionPrototypeMethods = context.options[1] && context.options[1].functionPrototypeMethods;
const sourceCode = context.sourceCode;
function isWrappedInAnyParens(node) {
return utils.isParenthesised(sourceCode, node);
}
function isWrappedInGroupingParens(node) {
return utils.isParenthesized(node, sourceCode, 1);
}
function getFunctionNodeFromIIFE(node) {
const callee = utils.skipChainExpression(node.callee);
if (callee.type === "FunctionExpression")
return callee;
if (includeFunctionPrototypeMethods && callee.type === "MemberExpression" && callee.object.type === "FunctionExpression" && (utils.getStaticPropertyName(callee) === "call" || utils.getStaticPropertyName(callee) === "apply")) {
return callee.object;
}
return null;
}
return {
CallExpression(node) {
const innerNode = getFunctionNodeFromIIFE(node);
if (!innerNode)
return;
const isCallExpressionWrapped = isWrappedInAnyParens(node);
const isFunctionExpressionWrapped = isWrappedInAnyParens(innerNode);
if (!isCallExpressionWrapped && !isFunctionExpressionWrapped) {
context.report({
node,
messageId: "wrapInvocation",
fix(fixer) {
const nodeToSurround = style === "inside" ? innerNode : node;
return fixer.replaceText(nodeToSurround, `(${sourceCode.getText(nodeToSurround)})`);
}
});
} else if (style === "inside" && !isFunctionExpressionWrapped) {
context.report({
node,
messageId: "wrapExpression",
fix(fixer) {
if (isWrappedInGroupingParens(node) && !isCalleeOfNewExpression(node)) {
const parenAfter = sourceCode.getTokenAfter(node);
return fixer.replaceTextRange(
[
innerNode.range[1],
parenAfter.range[1]
],
`)${sourceCode.getText().slice(innerNode.range[1], parenAfter.range[0])}`
);
}
return fixer.replaceText(innerNode, `(${sourceCode.getText(innerNode)})`);
}
});
} else if (style === "outside" && !isCallExpressionWrapped) {
context.report({
node,
messageId: "moveInvocation",
fix(fixer) {
const parenAfter = sourceCode.getTokenAfter(innerNode);
return fixer.replaceTextRange(
[
parenAfter.range[0],
node.range[1]
],
`${sourceCode.getText().slice(parenAfter.range[1], node.range[1])})`
);
}
});
}
}
};
}
});
module.exports = wrapIife;
@@ -0,0 +1 @@
{"version":3,"names":["hooks","exports","self","parent","removeParent","key","isWhile","isSwitchCase","isExportDeclaration","isLabeledStatement","listKey","isVariableDeclaration","node","declarations","length","isExpressionStatement","remove","isSequenceExpression","expressions","replaceWith","isBinary","right","left","isIfStatement","isLoop","isArrowFunctionExpression","type","directives","body"],"sources":["../../../src/path/lib/removal-hooks.ts"],"sourcesContent":["// this file contains hooks that handle ancestry cleanup of parent nodes when removing children\n\nimport type NodePath from \"../index.ts\";\nimport type * as t from \"@babel/types\";\n/**\n * Pre hooks should be used for either rejecting removal or delegating removal\n */\n\nexport const hooks = [\n function (self: NodePath, parent: NodePath) {\n const removeParent =\n // while (NODE);\n // removing the test of a while/switch, we can either just remove it entirely *or* turn the\n // `test` into `true` unlikely that the latter will ever be what's wanted so we just remove\n // the loop to avoid infinite recursion\n (self.key === \"test\" && (parent.isWhile() || parent.isSwitchCase())) ||\n // export NODE;\n // just remove a declaration for an export as this is no longer valid\n (self.key === \"declaration\" && parent.isExportDeclaration()) ||\n // label: NODE\n // stray labeled statement with no body\n (self.key === \"body\" && parent.isLabeledStatement()) ||\n // let NODE;\n // remove an entire declaration if there are no declarators left\n (self.listKey === \"declarations\" &&\n parent.isVariableDeclaration() &&\n parent.node.declarations.length === 1) ||\n // NODE;\n // remove the entire expression statement if there's no expression\n (self.key === \"expression\" && parent.isExpressionStatement());\n\n if (removeParent) {\n parent.remove();\n return true;\n }\n },\n\n function (self: NodePath, parent: NodePath) {\n if (parent.isSequenceExpression() && parent.node.expressions.length === 1) {\n // (node, NODE);\n // we've just removed the second element of a sequence expression so let's turn that sequence\n // expression into a regular expression\n parent.replaceWith(parent.node.expressions[0]);\n return true;\n }\n },\n\n function (self: NodePath, parent: NodePath) {\n if (parent.isBinary()) {\n // left + NODE;\n // NODE + right;\n // we're in a binary expression, better remove it and replace it with the last expression\n if (self.key === \"left\") {\n parent.replaceWith(parent.node.right);\n } else {\n // key === \"right\"\n parent.replaceWith(parent.node.left);\n }\n return true;\n }\n },\n\n function (self: NodePath, parent: NodePath) {\n if (\n (parent.isIfStatement() && self.key === \"consequent\") ||\n (self.key === \"body\" &&\n (parent.isLoop() || parent.isArrowFunctionExpression()))\n ) {\n self.replaceWith({\n type: \"BlockStatement\",\n directives: [],\n body: [],\n } satisfies t.BlockStatement);\n return true;\n }\n },\n];\n"],"mappings":";;;;;;AAQO,MAAMA,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAG,CACnB,UAAUE,IAAc,EAAEC,MAAgB,EAAE;EAC1C,MAAMC,YAAY,GAKfF,IAAI,CAACG,GAAG,KAAK,MAAM,KAAKF,MAAM,CAACG,OAAO,CAAC,CAAC,IAAIH,MAAM,CAACI,YAAY,CAAC,CAAC,CAAC,IAGlEL,IAAI,CAACG,GAAG,KAAK,aAAa,IAAIF,MAAM,CAACK,mBAAmB,CAAC,CAAE,IAG3DN,IAAI,CAACG,GAAG,KAAK,MAAM,IAAIF,MAAM,CAACM,kBAAkB,CAAC,CAAE,IAGnDP,IAAI,CAACQ,OAAO,KAAK,cAAc,IAC9BP,MAAM,CAACQ,qBAAqB,CAAC,CAAC,IAC9BR,MAAM,CAACS,IAAI,CAACC,YAAY,CAACC,MAAM,KAAK,CAAE,IAGvCZ,IAAI,CAACG,GAAG,KAAK,YAAY,IAAIF,MAAM,CAACY,qBAAqB,CAAC,CAAE;EAE/D,IAAIX,YAAY,EAAE;IAChBD,MAAM,CAACa,MAAM,CAAC,CAAC;IACf,OAAO,IAAI;EACb;AACF,CAAC,EAED,UAAUd,IAAc,EAAEC,MAAgB,EAAE;EAC1C,IAAIA,MAAM,CAACc,oBAAoB,CAAC,CAAC,IAAId,MAAM,CAACS,IAAI,CAACM,WAAW,CAACJ,MAAM,KAAK,CAAC,EAAE;IAIzEX,MAAM,CAACgB,WAAW,CAAChB,MAAM,CAACS,IAAI,CAACM,WAAW,CAAC,CAAC,CAAC,CAAC;IAC9C,OAAO,IAAI;EACb;AACF,CAAC,EAED,UAAUhB,IAAc,EAAEC,MAAgB,EAAE;EAC1C,IAAIA,MAAM,CAACiB,QAAQ,CAAC,CAAC,EAAE;IAIrB,IAAIlB,IAAI,CAACG,GAAG,KAAK,MAAM,EAAE;MACvBF,MAAM,CAACgB,WAAW,CAAChB,MAAM,CAACS,IAAI,CAACS,KAAK,CAAC;IACvC,CAAC,MAAM;MAELlB,MAAM,CAACgB,WAAW,CAAChB,MAAM,CAACS,IAAI,CAACU,IAAI,CAAC;IACtC;IACA,OAAO,IAAI;EACb;AACF,CAAC,EAED,UAAUpB,IAAc,EAAEC,MAAgB,EAAE;EAC1C,IACGA,MAAM,CAACoB,aAAa,CAAC,CAAC,IAAIrB,IAAI,CAACG,GAAG,KAAK,YAAY,IACnDH,IAAI,CAACG,GAAG,KAAK,MAAM,KACjBF,MAAM,CAACqB,MAAM,CAAC,CAAC,IAAIrB,MAAM,CAACsB,yBAAyB,CAAC,CAAC,CAAE,EAC1D;IACAvB,IAAI,CAACiB,WAAW,CAAC;MACfO,IAAI,EAAE,gBAAgB;MACtBC,UAAU,EAAE,EAAE;MACdC,IAAI,EAAE;IACR,CAA4B,CAAC;IAC7B,OAAO,IAAI;EACb;AACF,CAAC,CACF","ignoreList":[]}
@@ -0,0 +1,13 @@
import { Config } from './types';
export type ConfigUtils = ReturnType<typeof createConfigUtils>;
export declare function createConfigUtils(config: Config): {
getClassGroupId: (className: string) => string | undefined;
getConflictingClassGroupIds: (classGroupId: string, hasPostfixModifier: boolean) => readonly string[];
cache: import("./lru-cache").LruCache<string, string>;
splitModifiers: (className: string) => {
modifiers: string[];
hasImportantModifier: boolean;
baseClassName: string;
maybePostfixModifierPosition: number | undefined;
};
};
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,WAAW,CAAC,KAAK,CAAC;AACtC","sources":["packages/@react-aria/overlays/intl/tr-TR.json"],"sourcesContent":["{\n \"dismiss\": \"Kapat\"\n}\n"],"names":[],"version":3,"file":"tr-TR.main.js.map"}
@@ -0,0 +1,20 @@
{
"root": true,
"extends": "airbnb-base",
"parser": "@babel/eslint-parser",
"rules": {
"no-use-before-define": ["error", { "functions": false }],
},
"overrides": [
{
"files": "src/index.js",
"rules": {
"import/no-import-module-exports": 0,
},
},
],
}
@@ -0,0 +1,6 @@
module.exports = {
"breadcrumbs": `Naviga\u{10D}n\xe9 prvky Breadcrumbs`
};
//# sourceMappingURL=sk-SK.main.js.map
@@ -0,0 +1,27 @@
var createFlow = require('./_createFlow');
/**
* Creates a function that returns the result of invoking the given functions
* with the `this` binding of the created function, where each successive
* invocation is supplied the return value of the previous.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {...(Function|Function[])} [funcs] The functions to invoke.
* @returns {Function} Returns the new composite function.
* @see _.flowRight
* @example
*
* function square(n) {
* return n * n;
* }
*
* var addSquare = _.flow([_.add, square]);
* addSquare(1, 2);
* // => 9
*/
var flow = createFlow();
module.exports = flow;
@@ -0,0 +1 @@
{"name":"extend","version":"3.0.2","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532127056,"integrity":"sha512-0Q2lYOY7unW5x70IS6Eqwjr++6BFvBlwk1OC7XQPoMP0Q6c9wqDw1SyvcWM0/wiHI0R8+ILI7pGlowbk7zOmgA==","mode":420,"size":987},".editorconfig":{"checkedAt":1794532096675,"integrity":"sha512-gD3iQtgC7ZgFS97pyZqR0FPjMNyRAfat8dipbSL28iiJ6B1MP5dDeDYeEnP5sYMTz8whQIk3E5vltk2kcyJJEQ==","mode":420,"size":286},".eslintrc":{"checkedAt":1794532127057,"integrity":"sha512-Wx0DQjEEvb+kX794v+tljf0sDDZb/Tmn5pppYK6sslNL3AFk8Skt4VwYhTwpSohzXTc5ekkqxYwdL7CtiUljgg==","mode":420,"size":397},".jscs.json":{"checkedAt":1794532127057,"integrity":"sha512-UU0f7yRzEncJOxFL8/hQhiLrNi7BYvWpSQ+G/DnVX6CBeCel31tushxQZp0iJH8qhdU8qZvS68ozs7+gFWOMfg==","mode":420,"size":4096},".travis.yml":{"checkedAt":1794532127057,"integrity":"sha512-3Mvk6kidr4d0o5EzuzkLi+5tCksLBotRdaNDW3x0fRnpcE0J+1SBboQNGnqiueDHOMZoOXi2ZdSm3yz8HVtQxg==","mode":420,"size":6899},"CHANGELOG.md":{"checkedAt":1794532127057,"integrity":"sha512-bL08/g3s+npHGt0NSej82io1LvpvTbIF347KymMPWmXOt1D5IY4cQloJsd4YzyJKWZ8I/UxJX3uprY7UC7Cy/w==","mode":420,"size":2779},"component.json":{"checkedAt":1794532127057,"integrity":"sha512-TK8xK2XUv3srcL8whtZKKcBrOFr2DbHXxQ8ge4i5yW6TYvUxB9uiauUPxAF4wAe/cDk6OmmE2qWoOnY+bcfOkw==","mode":420,"size":581},"index.js":{"checkedAt":1794532127057,"integrity":"sha512-qoA0HbnZ323EtBdQ9C2FrBxi3i3AEvwZ0PBlJyJlrn/bPjeeoeUE5euDl/Xn0wyI95o+WNn0M9gZ4CEMzvOTug==","mode":420,"size":3321},"LICENSE":{"checkedAt":1794532127058,"integrity":"sha512-xArDUU0YzWMOTLf/NSNcke+appEQOZb+QL0714DjdywNiXM+c9dHHEZOAC9+MVqKTV27Xy17rjNOrQWfUpqnDQ==","mode":420,"size":1081},"README.md":{"checkedAt":1794532127058,"integrity":"sha512-ZGVbHcgH3vPwPw0+VeEPEiwc+x+apRBLRQ24R2EIjDKFbkomRUzG/w8vIQtzPvsxpxRaLvU11hZHixT+7AocLw==","mode":420,"size":3034}}}
@@ -0,0 +1,8 @@
var Stream = require("stream")
var Writable = require("./lib/_stream_writable.js")
if (process.env.READABLE_STREAM === 'disable') {
module.exports = Stream && Stream.Writable || Writable
} else {
module.exports = Writable
}
@@ -0,0 +1 @@
{"version":3,"file":"curryBuildPlanServiceNode.spec.d.ts","sourceRoot":"","sources":["../../../../src/planning/actions/curryBuildPlanServiceNode.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveServiceRedirectionBindingNode = resolveServiceRedirectionBindingNode;
const isPlanServiceRedirectionBindingNode_1 = require("../../planning/calculations/isPlanServiceRedirectionBindingNode");
function resolveServiceRedirectionBindingNode(resolveBindingNode) {
function innerResolveServiceRedirectionBindingNode(params, node) {
const resolvedValues = [];
for (const redirection of node.redirections) {
if ((0, isPlanServiceRedirectionBindingNode_1.isPlanServiceRedirectionBindingNode)(redirection)) {
resolvedValues.push(...innerResolveServiceRedirectionBindingNode(params, redirection));
}
else {
resolvedValues.push(resolveBindingNode(params, redirection));
}
}
return resolvedValues;
}
return innerResolveServiceRedirectionBindingNode;
}
//# sourceMappingURL=resolveServiceRedirectionBindingNode.js.map
@@ -0,0 +1,10 @@
function _classApplyDescriptorDestructureSet(e, t) {
if (t.set) return "__destrObj" in t || (t.__destrObj = {
set value(r) {
t.set.call(e, r);
}
}), t.__destrObj;
if (!t.writable) throw new TypeError("attempted to set read only private field");
return t;
}
export { _classApplyDescriptorDestructureSet as default };
@@ -0,0 +1,408 @@
/*!
Copyright 2013 Lovell Fuller and others.
SPDX-License-Identifier: Apache-2.0
*/
#ifndef SRC_PIPELINE_H_
#define SRC_PIPELINE_H_
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include <napi.h>
#include <vips/vips8>
#include "./common.h"
Napi::Value pipeline(const Napi::CallbackInfo& info);
struct Composite {
sharp::InputDescriptor *input;
VipsBlendMode mode;
int gravity;
int left;
int top;
bool hasOffset;
bool tile;
bool premultiplied;
Composite():
input(nullptr),
mode(VIPS_BLEND_MODE_OVER),
gravity(0),
left(0),
top(0),
hasOffset(false),
tile(false),
premultiplied(false) {}
};
struct PipelineBaton {
sharp::InputDescriptor *input;
std::vector<sharp::InputDescriptor *> join;
std::string formatOut;
std::string fileOut;
void *bufferOut;
size_t bufferOutLength;
int pageHeightOut;
int pagesOut;
std::vector<Composite *> composite;
std::vector<sharp::InputDescriptor *> joinChannelIn;
int topOffsetPre;
int leftOffsetPre;
int widthPre;
int heightPre;
int topOffsetPost;
int leftOffsetPost;
int widthPost;
int heightPost;
int width;
int height;
int channels;
VipsKernel kernel;
sharp::Canvas canvas;
int position;
std::vector<double> resizeBackground;
bool hasCropOffset;
int cropOffsetLeft;
int cropOffsetTop;
bool hasAttentionCenter;
int attentionX;
int attentionY;
bool premultiplied;
bool tileCentre;
bool fastShrinkOnLoad;
std::vector<double> tint;
bool flatten;
std::vector<double> flattenBackground;
bool unflatten;
bool negate;
bool negateAlpha;
double blurSigma;
VipsPrecision precision;
double minAmpl;
double brightness;
double saturation;
int hue;
double lightness;
int medianSize;
double sharpenSigma;
double sharpenM1;
double sharpenM2;
double sharpenX1;
double sharpenY2;
double sharpenY3;
int threshold;
bool thresholdGrayscale;
std::vector<double> trimBackground;
double trimThreshold;
bool trimLineArt;
int trimOffsetLeft;
int trimOffsetTop;
std::vector<double> linearA;
std::vector<double> linearB;
int dilateWidth;
int erodeWidth;
double gamma;
double gammaOut;
bool greyscale;
bool normalise;
int normaliseLower;
int normaliseUpper;
int claheWidth;
int claheHeight;
int claheMaxSlope;
int angle;
double rotationAngle;
std::vector<double> rotationBackground;
bool rotateBefore;
bool orientBefore;
bool flip;
bool flop;
int extendTop;
int extendBottom;
int extendLeft;
int extendRight;
std::vector<double> extendBackground;
VipsExtend extendWith;
bool withoutEnlargement;
bool withoutReduction;
std::vector<double> affineMatrix;
std::vector<double> affineBackground;
double affineIdx;
double affineIdy;
double affineOdx;
double affineOdy;
std::string affineInterpolator;
int jpegQuality;
bool jpegProgressive;
std::string jpegChromaSubsampling;
bool jpegTrellisQuantisation;
int jpegQuantisationTable;
bool jpegOvershootDeringing;
bool jpegOptimiseScans;
bool jpegOptimiseCoding;
bool pngProgressive;
int pngCompressionLevel;
bool pngAdaptiveFiltering;
bool pngPalette;
int pngQuality;
int pngEffort;
int pngBitdepth;
double pngDither;
int jp2Quality;
bool jp2Lossless;
int jp2TileHeight;
int jp2TileWidth;
std::string jp2ChromaSubsampling;
int webpQuality;
int webpAlphaQuality;
bool webpNearLossless;
bool webpLossless;
bool webpSmartSubsample;
bool webpSmartDeblock;
VipsForeignWebpPreset webpPreset;
int webpEffort;
bool webpMinSize;
bool webpMixed;
int gifBitdepth;
int gifEffort;
double gifDither;
double gifInterFrameMaxError;
double gifInterPaletteMaxError;
bool gifKeepDuplicateFrames;
bool gifReuse;
bool gifProgressive;
int tiffQuality;
VipsForeignTiffCompression tiffCompression;
bool tiffBigtiff;
VipsForeignTiffPredictor tiffPredictor;
bool tiffPyramid;
int tiffBitdepth;
bool tiffMiniswhite;
bool tiffTile;
int tiffTileHeight;
int tiffTileWidth;
double tiffXres;
double tiffYres;
VipsForeignTiffResunit tiffResolutionUnit;
int heifQuality;
VipsForeignHeifCompression heifCompression;
int heifEffort;
std::string heifChromaSubsampling;
bool heifLossless;
int heifBitdepth;
double jxlDistance;
int jxlDecodingTier;
int jxlEffort;
bool jxlLossless;
VipsBandFormat rawDepth;
std::string err;
bool errUseWarning;
int keepMetadata;
int withMetadataOrientation;
double withMetadataDensity;
std::string withIccProfile;
std::unordered_map<std::string, std::string> withExif;
bool withExifMerge;
std::string withXmp;
int timeoutSeconds;
std::vector<double> convKernel;
int convKernelWidth;
int convKernelHeight;
double convKernelScale;
double convKernelOffset;
sharp::InputDescriptor *boolean;
VipsOperationBoolean booleanOp;
VipsOperationBoolean bandBoolOp;
int extractChannel;
bool removeAlpha;
double ensureAlpha;
VipsInterpretation colourspacePipeline;
VipsInterpretation colourspace;
std::vector<int> delay;
int loop;
int tileSize;
int tileOverlap;
VipsForeignDzContainer tileContainer;
VipsForeignDzLayout tileLayout;
std::string tileFormat;
int tileAngle;
std::vector<double> tileBackground;
int tileSkipBlanks;
VipsForeignDzDepth tileDepth;
std::string tileId;
std::string tileBasename;
std::vector<double> recombMatrix;
PipelineBaton():
input(nullptr),
bufferOutLength(0),
pageHeightOut(0),
pagesOut(0),
topOffsetPre(-1),
topOffsetPost(-1),
channels(0),
kernel(VIPS_KERNEL_LANCZOS3),
canvas(sharp::Canvas::CROP),
position(0),
resizeBackground{ 0.0, 0.0, 0.0, 255.0 },
hasCropOffset(false),
cropOffsetLeft(0),
cropOffsetTop(0),
hasAttentionCenter(false),
attentionX(0),
attentionY(0),
premultiplied(false),
tint{ -1.0, 0.0, 0.0, 0.0 },
flatten(false),
flattenBackground{ 0.0, 0.0, 0.0 },
unflatten(false),
negate(false),
negateAlpha(true),
blurSigma(0.0),
brightness(1.0),
saturation(1.0),
hue(0),
lightness(0),
medianSize(0),
sharpenSigma(0.0),
sharpenM1(1.0),
sharpenM2(2.0),
sharpenX1(2.0),
sharpenY2(10.0),
sharpenY3(20.0),
threshold(0),
thresholdGrayscale(true),
trimBackground{},
trimThreshold(-1.0),
trimLineArt(false),
trimOffsetLeft(0),
trimOffsetTop(0),
linearA{},
linearB{},
dilateWidth(0),
erodeWidth(0),
gamma(0.0),
greyscale(false),
normalise(false),
normaliseLower(1),
normaliseUpper(99),
claheWidth(0),
claheHeight(0),
claheMaxSlope(3),
angle(0),
rotationAngle(0.0),
rotationBackground{ 0.0, 0.0, 0.0, 255.0 },
flip(false),
flop(false),
extendTop(0),
extendBottom(0),
extendLeft(0),
extendRight(0),
extendBackground{ 0.0, 0.0, 0.0, 255.0 },
extendWith(VIPS_EXTEND_BACKGROUND),
withoutEnlargement(false),
withoutReduction(false),
affineMatrix{ 1.0, 0.0, 0.0, 1.0 },
affineBackground{ 0.0, 0.0, 0.0, 255.0 },
affineIdx(0),
affineIdy(0),
affineOdx(0),
affineOdy(0),
affineInterpolator("bicubic"),
jpegQuality(80),
jpegProgressive(false),
jpegChromaSubsampling("4:2:0"),
jpegTrellisQuantisation(false),
jpegQuantisationTable(0),
jpegOvershootDeringing(false),
jpegOptimiseScans(false),
jpegOptimiseCoding(true),
pngProgressive(false),
pngCompressionLevel(6),
pngAdaptiveFiltering(false),
pngPalette(false),
pngQuality(100),
pngEffort(7),
pngBitdepth(8),
pngDither(1.0),
jp2Quality(80),
jp2Lossless(false),
jp2TileHeight(512),
jp2TileWidth(512),
jp2ChromaSubsampling("4:4:4"),
webpQuality(80),
webpAlphaQuality(100),
webpNearLossless(false),
webpLossless(false),
webpSmartSubsample(false),
webpSmartDeblock(false),
webpPreset(VIPS_FOREIGN_WEBP_PRESET_DEFAULT),
webpEffort(4),
webpMinSize(false),
webpMixed(false),
gifBitdepth(8),
gifEffort(7),
gifDither(1.0),
gifInterFrameMaxError(0.0),
gifInterPaletteMaxError(3.0),
gifKeepDuplicateFrames(false),
gifReuse(true),
gifProgressive(false),
tiffQuality(80),
tiffCompression(VIPS_FOREIGN_TIFF_COMPRESSION_JPEG),
tiffBigtiff(false),
tiffPredictor(VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL),
tiffPyramid(false),
tiffBitdepth(8),
tiffMiniswhite(false),
tiffTile(false),
tiffTileHeight(256),
tiffTileWidth(256),
tiffXres(1.0),
tiffYres(1.0),
tiffResolutionUnit(VIPS_FOREIGN_TIFF_RESUNIT_INCH),
heifQuality(50),
heifCompression(VIPS_FOREIGN_HEIF_COMPRESSION_AV1),
heifEffort(4),
heifChromaSubsampling("4:4:4"),
heifLossless(false),
heifBitdepth(8),
jxlDistance(1.0),
jxlDecodingTier(0),
jxlEffort(7),
jxlLossless(false),
rawDepth(VIPS_FORMAT_UCHAR),
errUseWarning(false),
keepMetadata(0),
withMetadataOrientation(-1),
withMetadataDensity(0.0),
withExifMerge(true),
timeoutSeconds(0),
convKernelWidth(0),
convKernelHeight(0),
convKernelScale(0.0),
convKernelOffset(0.0),
boolean(nullptr),
booleanOp(VIPS_OPERATION_BOOLEAN_LAST),
bandBoolOp(VIPS_OPERATION_BOOLEAN_LAST),
extractChannel(-1),
removeAlpha(false),
ensureAlpha(-1.0),
colourspacePipeline(VIPS_INTERPRETATION_LAST),
colourspace(VIPS_INTERPRETATION_LAST),
loop(-1),
tileSize(256),
tileOverlap(0),
tileContainer(VIPS_FOREIGN_DZ_CONTAINER_FS),
tileLayout(VIPS_FOREIGN_DZ_LAYOUT_DZ),
tileAngle(0),
tileBackground{ 255.0, 255.0, 255.0, 255.0 },
tileSkipBlanks(-1),
tileDepth(VIPS_FOREIGN_DZ_DEPTH_LAST) {}
};
#endif // SRC_PIPELINE_H_
@@ -0,0 +1,34 @@
import {useButton as $701a24aa0da5b062$export$ea18c227d4417cc3} from "./useButton.module.js";
import {chain as $h7Tql$chain, mergeProps as $h7Tql$mergeProps} from "@react-aria/utils";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $55f54f7887471b58$export$51e84d46ca0bc451(props, state, ref) {
const { isSelected: isSelected } = state;
const { isPressed: isPressed, buttonProps: buttonProps } = (0, $701a24aa0da5b062$export$ea18c227d4417cc3)({
...props,
onPress: (0, $h7Tql$chain)(state.toggle, props.onPress)
}, ref);
return {
isPressed: isPressed,
isSelected: isSelected,
isDisabled: props.isDisabled || false,
buttonProps: (0, $h7Tql$mergeProps)(buttonProps, {
'aria-pressed': isSelected
})
};
}
export {$55f54f7887471b58$export$51e84d46ca0bc451 as useToggleButton};
//# sourceMappingURL=useToggleButton.module.js.map
@@ -0,0 +1,57 @@
import {getFocusableTreeWalker as $9bf71ea28793e738$export$2d6ec8fc375ceafa} from "./FocusScope.module.js";
import {useLayoutEffect as $hGAaG$useLayoutEffect} from "@react-aria/utils";
import {useState as $hGAaG$useState} from "react";
/*
* Copyright 2022 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $83013635b024ae3d$export$eac1895992b9f3d6(ref, options) {
let isDisabled = options === null || options === void 0 ? void 0 : options.isDisabled;
let [hasTabbableChild, setHasTabbableChild] = (0, $hGAaG$useState)(false);
(0, $hGAaG$useLayoutEffect)(()=>{
if ((ref === null || ref === void 0 ? void 0 : ref.current) && !isDisabled) {
let update = ()=>{
if (ref.current) {
let walker = (0, $9bf71ea28793e738$export$2d6ec8fc375ceafa)(ref.current, {
tabbable: true
});
setHasTabbableChild(!!walker.nextNode());
}
};
update();
// Update when new elements are inserted, or the tabIndex/disabled attribute updates.
let observer = new MutationObserver(update);
observer.observe(ref.current, {
subtree: true,
childList: true,
attributes: true,
attributeFilter: [
'tabIndex',
'disabled'
]
});
return ()=>{
// Disconnect mutation observer when a React update occurs on the top-level component
// so we update synchronously after re-rendering. Otherwise React will emit act warnings
// in tests since mutation observers fire asynchronously. The mutation observer is necessary
// so we also update if a child component re-renders and adds/removes something tabbable.
observer.disconnect();
};
}
});
return isDisabled ? false : hasTabbableChild;
}
export {$83013635b024ae3d$export$eac1895992b9f3d6 as useHasTabbableChild};
//# sourceMappingURL=useHasTabbableChild.module.js.map
@@ -0,0 +1,60 @@
/**
Convert a union type to an intersection type using [distributive conditional types](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
Inspired by [this Stack Overflow answer](https://stackoverflow.com/a/50375286/2172153).
@example
```
import {UnionToIntersection} from 'type-fest';
type Union = {the(): void} | {great(arg: string): void} | {escape: boolean};
type Intersection = UnionToIntersection<Union>;
//=> {the(): void; great(arg: string): void; escape: boolean};
```
A more applicable example which could make its way into your library code follows.
@example
```
import {UnionToIntersection} from 'type-fest';
class CommandOne {
commands: {
a1: () => undefined,
b1: () => undefined,
}
}
class CommandTwo {
commands: {
a2: (argA: string) => undefined,
b2: (argB: string) => undefined,
}
}
const union = [new CommandOne(), new CommandTwo()].map(instance => instance.commands);
type Union = typeof union;
//=> {a1(): void; b1(): void} | {a2(argA: string): void; b2(argB: string): void}
type Intersection = UnionToIntersection<Union>;
//=> {a1(): void; b1(): void; a2(argA: string): void; b2(argB: string): void}
```
@category Utilities
*/
export type UnionToIntersection<Union> = (
// `extends unknown` is always going to be the case and is used to convert the
// `Union` into a [distributive conditional
// type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
Union extends unknown
// The union type is used as the only argument to a function since the union
// of function arguments is an intersection.
? (distributedUnion: Union) => void
// This won't happen.
: never
// Infer the `Intersection` type since TypeScript represents the positional
// arguments of unions of functions as an intersection of the union.
) extends ((mergedIntersection: infer Intersection) => void)
? Intersection
: never;
@@ -0,0 +1,90 @@
Introduction
============
The only specification I could find describing mouse input escape sequences
was the /usr/share/doc/xterm/ctlseqs.txt.gz file installed on my Ubuntu
machine.
Here are the relevant escape sequences:
* [ON] CSI '?' M 'h' Enable mouse input mode M
* [OFF] CSI '?' M 'l' Disable mouse input mode M
* [EVT] CSI 'M' F X Y Mouse event (default or mode 1005)
* [EVT6] CSI '<' F ';' X ';' Y 'M' Mouse event with mode 1006
* [EVT6] CSI '<' F ';' X ';' Y 'm' Mouse event with mode 1006 (up)
* [EVT15] CSI F ';' X ';' Y 'M' Mouse event with mode 1015
The first batch of modes affect what events are reported:
* 9: Presses only (not as well-supported as the other modes)
* 1000: Presses and releases
* 1002: Presses, releases, and moves-while-pressed
* 1003: Presses, releases, and all moves
The next batch of modes affect the encoding of the mouse events:
* 1005: The X and Y coordinates are UTF-8 codepoints rather than bytes.
* 1006: Use the EVT6 sequences instead of EVT
* 1015: Use the EVT15 sequence instead of EVT (aka URVXT-mode)
Support for modes in existing terminals
=======================================
| 9 1000 1002 1003 | 1004 | overflow | defhi | 1005 1006 1015
---------------------------------+---------------------+------+--------------+-------+----------------
Eclipse TM Terminal (Neon) | _ _ _ _ | _ | n/a | n/a | _ _ _
gnome-terminal 3.6.2 | X X X X | _ | suppressed*b | 0x07 | _ X X
iTerm2 2.1.4 | _ X X X | OI | wrap*z | n/a | X X X
jediterm/IntelliJ | _ X X X | _ | ch='?' | 0xff | X X X
Konsole 2.13.2 | _ X X *a | _ | suppressed | 0xff | X X X
mintty 2.2.2 | X X X X | OI | ch='\0' | 0xff | X X X
putty 0.66 | _ X X _ | _ | suppressed | 0xff | _ X X
rxvt 2.7.10 | X X _ _ | _ | wrap*z | n/a | _ _ _
screen(under xterm) | X X X X | _ | suppressed | 0xff | _ _ _
urxvt 9.21 | X X X X | _ | wrap*z | n/a | X _ X
xfce4-terminal 0.6.3 (GTK2 VTE) | X X X X | _ | wrap | n/a | _ _ _
xterm | X X X X | OI | ch='\0' | 0xff | X X X
*a: Mode 1003 is handled the same way as 1002.
*b: The coordinate wraps from 0xff to 0x00, then maxs out at 0x07. I'm
guessing this behavior is a bug? I'm using the Xubuntu 14.04
gnome-terminal.
*z: These terminals have a bug where column 224 (and row 224, presumably)
yields a truncated escape sequence. 224 + 32 is 0, so it would normally
yield `CSI 'M' F '\0' Y`, but the '\0' is interpreted as a NUL-terminator.
Problem 1: How do these flags work?
===================================
Terminals accept the OFF sequence with any of the input modes. This makes
little sense--there are two multi-value settings, not seven independent flags!
All the terminals handle Granularity the same way. ON-Granularity sets
Granularity to the specified value, and OFF-Granularity sets Granularity to
OFF.
Terminals vary in how they handle the Encoding modes. For example:
* xterm. ON-Encoding sets Encoding. OFF-Encoding with a non-active Encoding
has no effect. OFF-Encoding otherwise resets Encoding to Default.
* mintty (tested 2.2.2), iTerm2 2.1.4, and jediterm. ON-Encoding sets
Encoding. OFF-Encoding resets Encoding to Default.
* Konsole (tested 2.13.2) seems to configure each encoding method
independently. The effective Encoding is the first enabled encoding in this
list:
- Mode 1006
- Mode 1015
- Mode 1005
- Default
* gnome-terminal (tested 3.6.2) also configures each encoding method
independently. The effective Encoding is the first enabled encoding in
this list:
- Mode 1006
- Mode 1015
- Default
Mode 1005 is not supported.
* xfce4 terminal 0.6.3 (GTK2 VTE) always outputs the default encoding method.
@@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,148 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
/// <reference lib="es2015.iterable" />
// NOTE: This is specified as what is essentially an unreachable module. All actual global declarations can be found
// in the `declare global` section, below. This is necessary as there is currently no way to declare an `abstract`
// member without declaring a `class`, but declaring `class Iterator<T>` globally would conflict with TypeScript's
// general purpose `Iterator<T>` interface.
export {};
// Abstract type that allows us to mark `next` as `abstract`
declare abstract class Iterator<T, TResult = undefined, TNext = unknown> { // eslint-disable-line @typescript-eslint/no-unsafe-declaration-merging
abstract next(value?: TNext): IteratorResult<T, TResult>;
}
// Merge all members of `IteratorObject<T>` into `Iterator<T>`
interface Iterator<T, TResult, TNext> extends globalThis.IteratorObject<T, TResult, TNext> {}
// Capture the `Iterator` constructor in a type we can use in the `extends` clause of `IteratorConstructor`.
type IteratorObjectConstructor = typeof Iterator;
declare global {
// Global `IteratorObject<T, TReturn, TNext>` interface that can be augmented by polyfills
interface IteratorObject<T, TReturn, TNext> {
/**
* Returns this iterator.
*/
[Symbol.iterator](): IteratorObject<T, TReturn, TNext>;
/**
* Creates an iterator whose values are the result of applying the callback to the values from this iterator.
* @param callbackfn A function that accepts up to two arguments to be used to transform values from the underlying iterator.
*/
map<U>(callbackfn: (value: T, index: number) => U): IteratorObject<U, undefined, unknown>;
/**
* Creates an iterator whose values are those from this iterator for which the provided predicate returns true.
* @param predicate A function that accepts up to two arguments to be used to test values from the underlying iterator.
*/
filter<S extends T>(predicate: (value: T, index: number) => value is S): IteratorObject<S, undefined, unknown>;
/**
* Creates an iterator whose values are those from this iterator for which the provided predicate returns true.
* @param predicate A function that accepts up to two arguments to be used to test values from the underlying iterator.
*/
filter(predicate: (value: T, index: number) => unknown): IteratorObject<T, undefined, unknown>;
/**
* Creates an iterator whose values are the values from this iterator, stopping once the provided limit is reached.
* @param limit The maximum number of values to yield.
*/
take(limit: number): IteratorObject<T, undefined, unknown>;
/**
* Creates an iterator whose values are the values from this iterator after skipping the provided count.
* @param count The number of values to drop.
*/
drop(count: number): IteratorObject<T, undefined, unknown>;
/**
* Creates an iterator whose values are the result of applying the callback to the values from this iterator and then flattening the resulting iterators or iterables.
* @param callback A function that accepts up to two arguments to be used to transform values from the underlying iterator into new iterators or iterables to be flattened into the result.
*/
flatMap<U>(callback: (value: T, index: number) => Iterator<U, unknown, undefined> | Iterable<U, unknown, undefined>): IteratorObject<U, undefined, unknown>;
/**
* Calls the specified callback function for all the elements in this iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
* @param callbackfn A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the iterator.
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of a value from the iterator.
*/
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T): T;
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T, initialValue: T): T;
/**
* Calls the specified callback function for all the elements in this iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
* @param callbackfn A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the iterator.
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of a value from the iterator.
*/
reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U, initialValue: U): U;
/**
* Creates a new array from the values yielded by this iterator.
*/
toArray(): T[];
/**
* Performs the specified action for each element in the iterator.
* @param callbackfn A function that accepts up to two arguments. forEach calls the callbackfn function one time for each element in the iterator.
*/
forEach(callbackfn: (value: T, index: number) => void): void;
/**
* Determines whether the specified callback function returns true for any element of this iterator.
* @param predicate A function that accepts up to two arguments. The some method calls
* the predicate function for each element in this iterator until the predicate returns a value
* true, or until the end of the iterator.
*/
some(predicate: (value: T, index: number) => unknown): boolean;
/**
* Determines whether all the members of this iterator satisfy the specified test.
* @param predicate A function that accepts up to two arguments. The every method calls
* the predicate function for each element in this iterator until the predicate returns
* false, or until the end of this iterator.
*/
every(predicate: (value: T, index: number) => unknown): boolean;
/**
* Returns the value of the first element in this iterator where predicate is true, and undefined
* otherwise.
* @param predicate find calls predicate once for each element of this iterator, in
* order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
*/
find<S extends T>(predicate: (value: T, index: number) => value is S): S | undefined;
find(predicate: (value: T, index: number) => unknown): T | undefined;
readonly [Symbol.toStringTag]: string;
}
// Global `IteratorConstructor` interface that can be augmented by polyfills
interface IteratorConstructor extends IteratorObjectConstructor {
/**
* Creates a native iterator from an iterator or iterable object.
* Returns its input if the input already inherits from the built-in Iterator class.
* @param value An iterator or iterable object to convert a native iterator.
*/
from<T>(value: Iterator<T, unknown, undefined> | Iterable<T, unknown, undefined>): IteratorObject<T, undefined, unknown>;
}
var Iterator: IteratorConstructor;
}
@@ -0,0 +1,139 @@
# quick-lru [![Build Status](https://travis-ci.org/sindresorhus/quick-lru.svg?branch=master)](https://travis-ci.org/sindresorhus/quick-lru) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/quick-lru/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/quick-lru?branch=master)
> Simple [“Least Recently Used” (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29)
Useful when you need to cache something and limit memory usage.
Inspired by the [`hashlru` algorithm](https://github.com/dominictarr/hashlru#algorithm), but instead uses [`Map`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map) to support keys of any type, not just strings, and values can be `undefined`.
## Install
```
$ npm install quick-lru
```
## Usage
```js
const QuickLRU = require('quick-lru');
const lru = new QuickLRU({maxSize: 1000});
lru.set('🦄', '🌈');
lru.has('🦄');
//=> true
lru.get('🦄');
//=> '🌈'
```
## API
### new QuickLRU(options?)
Returns a new instance.
### options
Type: `object`
#### maxSize
*Required*\
Type: `number`
The maximum number of items before evicting the least recently used items.
#### maxAge
Type: `number`\
Default: `Infinity`
The maximum number of milliseconds an item should remain in cache.
By default maxAge will be Infinity, which means that items will never expire.
Lazy expiration happens upon the next `write` or `read` call.
Individual expiration of an item can be specified by the `set(key, value, options)` method.
#### onEviction
*Optional*\
Type: `(key, value) => void`
Called right before an item is evicted from the cache.
Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`).
### Instance
The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop.
Both `key` and `value` can be of any type.
#### .set(key, value, options?)
Set an item. Returns the instance.
Individual expiration of an item can be specified with the `maxAge` option. If not specified, the global `maxAge` value will be used in case it is specified on the constructor, otherwise the item will never expire.
#### .get(key)
Get an item.
#### .has(key)
Check if an item exists.
#### .peek(key)
Get an item without marking it as recently used.
#### .delete(key)
Delete an item.
Returns `true` if the item is removed or `false` if the item doesn't exist.
#### .clear()
Delete all items.
#### .resize(maxSize)
Update the `maxSize`, discarding items as necessary. Insertion order is mostly preserved, though this is not a strong guarantee.
Useful for on-the-fly tuning of cache sizes in live systems.
#### .keys()
Iterable for all the keys.
#### .values()
Iterable for all the values.
#### .entriesAscending()
Iterable for all entries, starting with the oldest (ascending in recency).
#### .entriesDescending()
Iterable for all entries, starting with the newest (descending in recency).
#### .size
The stored item count.
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-quick-lru?utm_source=npm-quick-lru&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m"},C:{"1":"0 1 2 3 4 5 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 0C 1C"},D:{"1":"0 1 2 3 4 5 n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m"},E:{"1":"gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC"},F:{"1":"0 1 2 3 4 5 a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z FD GD HD ID NC uC JD OC"},G:{"1":"gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"2":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB","2":"J oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"2":"zD"},R:{"2":"0D"},S:{"1":"2D","2":"1D"}},B:4,C:"Media Queries: Range Syntax",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"no-empty-named-blocks.js","sourceRoot":"","sources":["../../src/rules/no-empty-named-blocks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE9C,SAAS,kBAAkB,CAAC,MAAwB,EAAE,KAAa;IACjE,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IAC3B,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;IACnC,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;IACnC,IAAI,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IAC1B,MAAM,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IAG9B,IACE,SAAS,CAAC,KAAK,KAAK,GAAG;QACvB,SAAS,CAAC,KAAK,KAAK,MAAM;QAC1B,SAAS,CAAC,KAAK,KAAK,QAAQ,EAC5B,CAAC;QACD,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IAC5B,CAAC;IAED,OAAO,CAAC,KAAK,EAAE,GAAG,CAAU,CAAA;AAC9B,CAAC;AAED,eAAe,UAAU,CAAC;IACxB,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,QAAQ,EAAE,kBAAkB;YAC5B,WAAW,EAAE,mCAAmC;SACjD;QACD,OAAO,EAAE,MAAM;QACf,cAAc,EAAE,IAAI;QACpB,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,UAAU,EAAE,qCAAqC;YACjD,MAAM,EAAE,sBAAsB;YAC9B,WAAW,EAAE,2BAA2B;SACzC;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,oBAAoB,GAAiC,EAAE,CAAA;QAE7D,OAAO;YACL,iBAAiB,CAAC,IAAI;gBACpB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,iBAAiB,CAAC,EAAE,CAAC;oBAC7D,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBACjC,CAAC;YACH,CAAC;YAED,cAAc,CAAC,OAAyB;gBACtC,MAAM,aAAa,GAAG,oBAAoB,CAAC,GAAG,CAC5C,IAAI,CAAC,EAAE,CACL;oBACE,IAAI;oBACJ,OAAO,CAAC,MAAO,CAAC,MAAM,CACpB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAChE;iBACO,CACb,CAAA;gBAED,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,IAAI,EAAE,CAAA;gBAEpC,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,aAAa,EAAE,CAAC;oBAC3C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;wBAC3B,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;wBAClC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,CAAA;wBAElC,IAAI,SAAS,IAAI,KAAK,CAAC,KAAK,KAAK,GAAG,IAAI,SAAS,CAAC,KAAK,KAAK,GAAG,EAAE,CAAC;4BAChE,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CACrC,KAAK,CAAC,EAAE,CACN,KAAK,CAAC,IAAI,KAAK,YAAY;gCAC3B,KAAK,CAAC,KAAK,KAAK,MAAM;gCACtB,KAAK,CAAC,KAAK,KAAK,MAAM;gCACtB,KAAK,CAAC,KAAK,KAAK,QAAQ,CAC3B,CAAA;4BAID,IAAI,mBAAmB,EAAE,CAAC;gCACxB,OAAO,CAAC,MAAM,CAAC;oCACb,IAAI;oCACJ,SAAS,EAAE,YAAY;oCACvB,GAAG,CAAC,KAAK;wCACP,OAAO,KAAK,CAAC,WAAW,CAAC,kBAAkB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAA;oCAC5D,CAAC;iCACF,CAAC,CAAA;4BACJ,CAAC;iCAAM,CAAC;gCACN,OAAO,CAAC,MAAM,CAAC;oCACb,IAAI;oCACJ,SAAS,EAAE,YAAY;oCACvB,OAAO,EAAE;wCACP;4CACE,SAAS,EAAE,QAAQ;4CACnB,GAAG,CAAC,KAAK;gDAEP,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;4CAC3B,CAAC;yCACF;wCACD;4CACE,SAAS,EAAE,aAAa;4CACxB,GAAG,CAAC,KAAK;gDAGP,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAA;gDAC9B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,MAAM,CAAE,CAAA;gDACxD,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAC9B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,QAAQ,CACzB,CAAA;gDACF,MAAM,iBAAiB,GAAG,UAAU,CAAC,cAAe,CAClD,SAAS,EACT,UAAU,CAAC,aAAa,CAAC,SAAS,CAAE,CACrC,CAAA;gDACD,MAAM,mBAAmB,GAAG,UAAU,CAAC,cAAe,CACpD,WAAW,EACX,UAAU,CAAC,aAAa,CAAC,SAAS,CAAE,CACrC,CAAA;gDAED,MAAM,CAAC,KAAK,CAAC,GAAG,kBAAkB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;gDAChD,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC,KAAK,CAAA;gDAC/B,MAAM,KAAK,GAAG;oDACZ,KAAK;oDACL,iBAAiB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG;iDACzB,CAAA;gDAEV,OAAO,KAAK,CAAC,gBAAgB,CAC3B,KAAK,EACL,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAC/B,CAAA;4CACH,CAAC;yCACF;qCACF;iCACF,CAAC,CAAA;4BACJ,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAA;IACH,CAAC;CACF,CAAC,CAAA"}
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAaA;;;;;;;GAOG;AACH,8CALW,aAAa,CAAC,SAAS,CAAC,GAEtB,mBAAmB,CAa/B;AA+DD;;;;;;;GAOG;AACH,sDALW,aAAa,CAAC,aAAa,CAAC,GAE1B,aAAa,CAazB;+BA1GS,sBAAsB;yCAAtB,sBAAsB;mCAAtB,sBAAsB"}
@@ -0,0 +1,104 @@
"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/scroll-shadow.ts
var scroll_shadow_exports = {};
__export(scroll_shadow_exports, {
scrollShadow: () => scrollShadow
});
module.exports = __toCommonJS(scroll_shadow_exports);
// src/utils/tv.ts
var import_tailwind_variants = require("tailwind-variants");
// src/utils/tw-merge-config.ts
var COMMON_UNITS = ["small", "medium", "large"];
var twMergeConfig = {
theme: {
opacity: ["disabled"],
spacing: ["divider"],
borderWidth: COMMON_UNITS,
borderRadius: COMMON_UNITS
},
classGroups: {
shadow: [{ shadow: COMMON_UNITS }],
"font-size": [{ text: ["tiny", ...COMMON_UNITS] }],
"bg-image": [
"bg-stripe-gradient-default",
"bg-stripe-gradient-primary",
"bg-stripe-gradient-secondary",
"bg-stripe-gradient-success",
"bg-stripe-gradient-warning",
"bg-stripe-gradient-danger"
]
}
};
// src/utils/tv.ts
var tv = (options, config) => {
var _a, _b, _c;
return (0, import_tailwind_variants.tv)(options, {
...config,
twMerge: (_a = config == null ? void 0 : config.twMerge) != null ? _a : true,
twMergeConfig: {
...config == null ? void 0 : config.twMergeConfig,
theme: {
...(_b = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _b.theme,
...twMergeConfig.theme
},
classGroups: {
...(_c = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _c.classGroups,
...twMergeConfig.classGroups
}
}
});
};
// src/components/scroll-shadow.ts
var verticalShadow = [
"data-[top-scroll=true]:[mask-image:linear-gradient(0deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]",
"data-[bottom-scroll=true]:[mask-image:linear-gradient(180deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]",
"data-[top-bottom-scroll=true]:[mask-image:linear-gradient(#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"
];
var horizontalShadow = [
"data-[left-scroll=true]:[mask-image:linear-gradient(270deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]",
"data-[right-scroll=true]:[mask-image:linear-gradient(90deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]",
"data-[left-right-scroll=true]:[mask-image:linear-gradient(to_right,#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"
];
var scrollShadow = tv({
base: [],
variants: {
orientation: {
vertical: ["overflow-y-auto", ...verticalShadow],
horizontal: ["overflow-x-auto", ...horizontalShadow]
},
hideScrollBar: {
true: "scrollbar-hide",
false: ""
}
},
defaultVariants: {
orientation: "vertical",
hideScrollBar: false
}
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
scrollShadow
});
@@ -0,0 +1 @@
var a=Object.defineProperty;var o=(e,n)=>a(e,"name",{value:n,configurable:!0});import p from"node:net";import{g}from"./get-pipe-path-BHW2eJdv.mjs";const m=o(()=>new Promise(e=>{const n=g(process.ppid),t=p.createConnection(n,()=>{e(o(i=>{const r=Buffer.from(JSON.stringify(i)),s=Buffer.alloc(4);s.writeInt32BE(r.length,0),t.write(Buffer.concat([s,r]))},"sendToParent"))});t.on("error",()=>{e()}),t.unref()}),"connectToServer"),c={send:void 0},f=m();f.then(e=>{c.send=e},()=>{});export{f as c,c as p};
@@ -0,0 +1 @@
{"version":3,"file":"create-tokenizer.d.ts","sourceRoot":"","sources":["create-tokenizer.js"],"names":[],"mappings":"AAgDA;;;;;;;;;;;;;;;;;GAiBG;AACH,wCATW,YAAY,cAEZ,gBAAgB,SAEhB,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,QAAQ,CAAC,GAAG,SAAS,GAEhD,eAAe,CAwhB3B;;;;4BApkBY,SAAS;;;;;;;;aAKR,OAAO;;;;UAEP,MAAM;;;;;uCAKT,SAAS,QAET,IAAI,KAEF,SAAS;kCAtBZ,sBAAsB;sCAAtB,sBAAsB;2BAAtB,sBAAsB;qCAAtB,sBAAsB;+BAAtB,sBAAsB"}
@@ -0,0 +1,108 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = groupBy;
var _groupByLimit = require('./groupByLimit.js');
var _groupByLimit2 = _interopRequireDefault(_groupByLimit);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Returns a new object, where each value corresponds to an array of items, from
* `coll`, that returned the corresponding key. That is, the keys of the object
* correspond to the values passed to the `iteratee` callback.
*
* Note: Since this function applies the `iteratee` to each item in parallel,
* there is no guarantee that the `iteratee` functions will complete in order.
* However, the values for each key in the `result` will be in the same order as
* the original `coll`. For Objects, the values will roughly be in the order of
* the original Objects' keys (but this can vary across JavaScript engines).
*
* @name groupBy
* @static
* @memberOf module:Collections
* @method
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
* The iteratee should complete with a `key` to group the value under.
* Invoked with (value, callback).
* @param {Function} [callback] - A callback which is called when all `iteratee`
* functions have finished, or an error occurs. Result is an `Object` whoses
* properties are arrays of values which returned the corresponding key.
* @returns {Promise} a promise, if no callback is passed
* @example
*
* // dir1 is a directory that contains file1.txt, file2.txt
* // dir2 is a directory that contains file3.txt, file4.txt
* // dir3 is a directory that contains file5.txt
* // dir4 does not exist
*
* const files = ['dir1/file1.txt','dir2','dir4']
*
* // asynchronous function that detects file type as none, file, or directory
* function detectFile(file, callback) {
* fs.stat(file, function(err, stat) {
* if (err) {
* return callback(null, 'none');
* }
* callback(null, stat.isDirectory() ? 'directory' : 'file');
* });
* }
*
* //Using callbacks
* async.groupBy(files, detectFile, function(err, result) {
* if(err) {
* console.log(err);
* } else {
* console.log(result);
* // {
* // file: [ 'dir1/file1.txt' ],
* // none: [ 'dir4' ],
* // directory: [ 'dir2']
* // }
* // result is object containing the files grouped by type
* }
* });
*
* // Using Promises
* async.groupBy(files, detectFile)
* .then( result => {
* console.log(result);
* // {
* // file: [ 'dir1/file1.txt' ],
* // none: [ 'dir4' ],
* // directory: [ 'dir2']
* // }
* // result is object containing the files grouped by type
* }).catch( err => {
* console.log(err);
* });
*
* // Using async/await
* async () => {
* try {
* let result = await async.groupBy(files, detectFile);
* console.log(result);
* // {
* // file: [ 'dir1/file1.txt' ],
* // none: [ 'dir4' ],
* // directory: [ 'dir2']
* // }
* // result is object containing the files grouped by type
* }
* catch (err) {
* console.log(err);
* }
* }
*
*/
function groupBy(coll, iteratee, callback) {
return (0, _groupByLimit2.default)(coll, Infinity, iteratee, callback);
}
module.exports = exports.default;
@@ -0,0 +1,27 @@
import baseIsTypedArray from './_baseIsTypedArray.js';
import baseUnary from './_baseUnary.js';
import nodeUtil from './_nodeUtil.js';
/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
/**
* Checks if `value` is classified as a typed array.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
* @example
*
* _.isTypedArray(new Uint8Array);
* // => true
*
* _.isTypedArray([]);
* // => false
*/
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
export default isTypedArray;
@@ -0,0 +1,129 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Rest = exports.Required = exports.RegExp = exports.Ref = exports.Recursive = exports.Record = exports.ReadonlyOptional = exports.Readonly = exports.Promise = exports.Pick = exports.Partial = exports.Parameters = exports.Optional = exports.Omit = exports.Object = exports.Number = exports.Null = exports.Not = exports.Never = exports.Module = exports.Mapped = exports.Literal = exports.KeyOf = exports.Iterator = exports.Uppercase = exports.Lowercase = exports.Uncapitalize = exports.Capitalize = exports.Intersect = exports.Integer = exports.Instantiate = exports.InstanceType = exports.Index = exports.Function = exports.Extract = exports.Extends = exports.Exclude = exports.Enum = exports.Date = exports.ConstructorParameters = exports.Constructor = exports.Const = exports.Composite = exports.Boolean = exports.BigInt = exports.Awaited = exports.AsyncIterator = exports.Array = exports.Argument = exports.Any = void 0;
exports.Void = exports.Unsafe = exports.Unknown = exports.Union = exports.Undefined = exports.Uint8Array = exports.Tuple = exports.Transform = exports.TemplateLiteral = exports.Symbol = exports.String = exports.ReturnType = void 0;
// ------------------------------------------------------------------
// Type: Module
// ------------------------------------------------------------------
var index_1 = require("../any/index");
Object.defineProperty(exports, "Any", { enumerable: true, get: function () { return index_1.Any; } });
var index_2 = require("../argument/index");
Object.defineProperty(exports, "Argument", { enumerable: true, get: function () { return index_2.Argument; } });
var index_3 = require("../array/index");
Object.defineProperty(exports, "Array", { enumerable: true, get: function () { return index_3.Array; } });
var index_4 = require("../async-iterator/index");
Object.defineProperty(exports, "AsyncIterator", { enumerable: true, get: function () { return index_4.AsyncIterator; } });
var index_5 = require("../awaited/index");
Object.defineProperty(exports, "Awaited", { enumerable: true, get: function () { return index_5.Awaited; } });
var index_6 = require("../bigint/index");
Object.defineProperty(exports, "BigInt", { enumerable: true, get: function () { return index_6.BigInt; } });
var index_7 = require("../boolean/index");
Object.defineProperty(exports, "Boolean", { enumerable: true, get: function () { return index_7.Boolean; } });
var index_8 = require("../composite/index");
Object.defineProperty(exports, "Composite", { enumerable: true, get: function () { return index_8.Composite; } });
var index_9 = require("../const/index");
Object.defineProperty(exports, "Const", { enumerable: true, get: function () { return index_9.Const; } });
var index_10 = require("../constructor/index");
Object.defineProperty(exports, "Constructor", { enumerable: true, get: function () { return index_10.Constructor; } });
var index_11 = require("../constructor-parameters/index");
Object.defineProperty(exports, "ConstructorParameters", { enumerable: true, get: function () { return index_11.ConstructorParameters; } });
var index_12 = require("../date/index");
Object.defineProperty(exports, "Date", { enumerable: true, get: function () { return index_12.Date; } });
var index_13 = require("../enum/index");
Object.defineProperty(exports, "Enum", { enumerable: true, get: function () { return index_13.Enum; } });
var index_14 = require("../exclude/index");
Object.defineProperty(exports, "Exclude", { enumerable: true, get: function () { return index_14.Exclude; } });
var index_15 = require("../extends/index");
Object.defineProperty(exports, "Extends", { enumerable: true, get: function () { return index_15.Extends; } });
var index_16 = require("../extract/index");
Object.defineProperty(exports, "Extract", { enumerable: true, get: function () { return index_16.Extract; } });
var index_17 = require("../function/index");
Object.defineProperty(exports, "Function", { enumerable: true, get: function () { return index_17.Function; } });
var index_18 = require("../indexed/index");
Object.defineProperty(exports, "Index", { enumerable: true, get: function () { return index_18.Index; } });
var index_19 = require("../instance-type/index");
Object.defineProperty(exports, "InstanceType", { enumerable: true, get: function () { return index_19.InstanceType; } });
var index_20 = require("../instantiate/index");
Object.defineProperty(exports, "Instantiate", { enumerable: true, get: function () { return index_20.Instantiate; } });
var index_21 = require("../integer/index");
Object.defineProperty(exports, "Integer", { enumerable: true, get: function () { return index_21.Integer; } });
var index_22 = require("../intersect/index");
Object.defineProperty(exports, "Intersect", { enumerable: true, get: function () { return index_22.Intersect; } });
var index_23 = require("../intrinsic/index");
Object.defineProperty(exports, "Capitalize", { enumerable: true, get: function () { return index_23.Capitalize; } });
Object.defineProperty(exports, "Uncapitalize", { enumerable: true, get: function () { return index_23.Uncapitalize; } });
Object.defineProperty(exports, "Lowercase", { enumerable: true, get: function () { return index_23.Lowercase; } });
Object.defineProperty(exports, "Uppercase", { enumerable: true, get: function () { return index_23.Uppercase; } });
var index_24 = require("../iterator/index");
Object.defineProperty(exports, "Iterator", { enumerable: true, get: function () { return index_24.Iterator; } });
var index_25 = require("../keyof/index");
Object.defineProperty(exports, "KeyOf", { enumerable: true, get: function () { return index_25.KeyOf; } });
var index_26 = require("../literal/index");
Object.defineProperty(exports, "Literal", { enumerable: true, get: function () { return index_26.Literal; } });
var index_27 = require("../mapped/index");
Object.defineProperty(exports, "Mapped", { enumerable: true, get: function () { return index_27.Mapped; } });
var index_28 = require("../module/index");
Object.defineProperty(exports, "Module", { enumerable: true, get: function () { return index_28.Module; } });
var index_29 = require("../never/index");
Object.defineProperty(exports, "Never", { enumerable: true, get: function () { return index_29.Never; } });
var index_30 = require("../not/index");
Object.defineProperty(exports, "Not", { enumerable: true, get: function () { return index_30.Not; } });
var index_31 = require("../null/index");
Object.defineProperty(exports, "Null", { enumerable: true, get: function () { return index_31.Null; } });
var index_32 = require("../number/index");
Object.defineProperty(exports, "Number", { enumerable: true, get: function () { return index_32.Number; } });
var index_33 = require("../object/index");
Object.defineProperty(exports, "Object", { enumerable: true, get: function () { return index_33.Object; } });
var index_34 = require("../omit/index");
Object.defineProperty(exports, "Omit", { enumerable: true, get: function () { return index_34.Omit; } });
var index_35 = require("../optional/index");
Object.defineProperty(exports, "Optional", { enumerable: true, get: function () { return index_35.Optional; } });
var index_36 = require("../parameters/index");
Object.defineProperty(exports, "Parameters", { enumerable: true, get: function () { return index_36.Parameters; } });
var index_37 = require("../partial/index");
Object.defineProperty(exports, "Partial", { enumerable: true, get: function () { return index_37.Partial; } });
var index_38 = require("../pick/index");
Object.defineProperty(exports, "Pick", { enumerable: true, get: function () { return index_38.Pick; } });
var index_39 = require("../promise/index");
Object.defineProperty(exports, "Promise", { enumerable: true, get: function () { return index_39.Promise; } });
var index_40 = require("../readonly/index");
Object.defineProperty(exports, "Readonly", { enumerable: true, get: function () { return index_40.Readonly; } });
var index_41 = require("../readonly-optional/index");
Object.defineProperty(exports, "ReadonlyOptional", { enumerable: true, get: function () { return index_41.ReadonlyOptional; } });
var index_42 = require("../record/index");
Object.defineProperty(exports, "Record", { enumerable: true, get: function () { return index_42.Record; } });
var index_43 = require("../recursive/index");
Object.defineProperty(exports, "Recursive", { enumerable: true, get: function () { return index_43.Recursive; } });
var index_44 = require("../ref/index");
Object.defineProperty(exports, "Ref", { enumerable: true, get: function () { return index_44.Ref; } });
var index_45 = require("../regexp/index");
Object.defineProperty(exports, "RegExp", { enumerable: true, get: function () { return index_45.RegExp; } });
var index_46 = require("../required/index");
Object.defineProperty(exports, "Required", { enumerable: true, get: function () { return index_46.Required; } });
var index_47 = require("../rest/index");
Object.defineProperty(exports, "Rest", { enumerable: true, get: function () { return index_47.Rest; } });
var index_48 = require("../return-type/index");
Object.defineProperty(exports, "ReturnType", { enumerable: true, get: function () { return index_48.ReturnType; } });
var index_49 = require("../string/index");
Object.defineProperty(exports, "String", { enumerable: true, get: function () { return index_49.String; } });
var index_50 = require("../symbol/index");
Object.defineProperty(exports, "Symbol", { enumerable: true, get: function () { return index_50.Symbol; } });
var index_51 = require("../template-literal/index");
Object.defineProperty(exports, "TemplateLiteral", { enumerable: true, get: function () { return index_51.TemplateLiteral; } });
var index_52 = require("../transform/index");
Object.defineProperty(exports, "Transform", { enumerable: true, get: function () { return index_52.Transform; } });
var index_53 = require("../tuple/index");
Object.defineProperty(exports, "Tuple", { enumerable: true, get: function () { return index_53.Tuple; } });
var index_54 = require("../uint8array/index");
Object.defineProperty(exports, "Uint8Array", { enumerable: true, get: function () { return index_54.Uint8Array; } });
var index_55 = require("../undefined/index");
Object.defineProperty(exports, "Undefined", { enumerable: true, get: function () { return index_55.Undefined; } });
var index_56 = require("../union/index");
Object.defineProperty(exports, "Union", { enumerable: true, get: function () { return index_56.Union; } });
var index_57 = require("../unknown/index");
Object.defineProperty(exports, "Unknown", { enumerable: true, get: function () { return index_57.Unknown; } });
var index_58 = require("../unsafe/index");
Object.defineProperty(exports, "Unsafe", { enumerable: true, get: function () { return index_58.Unsafe; } });
var index_59 = require("../void/index");
Object.defineProperty(exports, "Void", { enumerable: true, get: function () { return index_59.Void; } });
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAkBM,MAAM,4CAA+E,IAAI","sources":["packages/@react-aria/grid/src/utils.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {GridCollection} from '@react-types/grid';\nimport type {GridState} from '@react-stately/grid';\nimport type {Key, KeyboardDelegate} from '@react-types/shared';\n\ninterface GridMapShared {\n keyboardDelegate: KeyboardDelegate,\n actions: {\n onRowAction?: (key: Key) => void,\n onCellAction?: (key: Key) => void\n },\n shouldSelectOnPressUp?: boolean\n}\n\n// Used to share:\n// keyboard delegate between useGrid and useGridCell\n// onRowAction/onCellAction across hooks\nexport const gridMap: WeakMap<GridState<unknown, GridCollection<unknown>>, GridMapShared> = new WeakMap<GridState<unknown, GridCollection<unknown>>, GridMapShared>();\n"],"names":[],"version":3,"file":"utils.module.js.map"}
@@ -0,0 +1,12 @@
var a = require.resolve('buffer/').replace(process.cwd(), '$CWD');
var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD');
var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD');
console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false'));
console.log(b, ': preserveSymlinks true');
console.log(c, ': preserveSymlinks false');
if (a !== b && a !== c) {
throw 'sync: no match';
}
console.log('sync: success! a matched either b or c\n');
@@ -0,0 +1,171 @@
import {snapValueToStep as $BT4Uh$snapValueToStep, useControlledState as $BT4Uh$useControlledState, clamp as $BT4Uh$clamp} from "@react-stately/utils";
import {useMemo as $BT4Uh$useMemo, useCallback as $BT4Uh$useCallback, useState as $BT4Uh$useState, useRef as $BT4Uh$useRef} 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.
*/
const $28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE = 0;
const $28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE = 100;
const $28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE = 1;
function $28f99e3e86e6ec45$export$e5fda3247f5d67f9(props) {
const { isDisabled: isDisabled = false, minValue: minValue = $28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE, maxValue: maxValue = $28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE, numberFormatter: formatter, step: step = $28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE, orientation: orientation = 'horizontal' } = props;
// Page step should be at least equal to step and always a multiple of the step.
let pageSize = (0, $BT4Uh$useMemo)(()=>{
let calcPageSize = (maxValue - minValue) / 10;
calcPageSize = (0, $BT4Uh$snapValueToStep)(calcPageSize, 0, calcPageSize + step, step);
return Math.max(calcPageSize, step);
}, [
step,
maxValue,
minValue
]);
let restrictValues = (0, $BT4Uh$useCallback)((values)=>values === null || values === void 0 ? void 0 : values.map((val, idx)=>{
let min = idx === 0 ? minValue : values[idx - 1];
let max = idx === values.length - 1 ? maxValue : values[idx + 1];
return (0, $BT4Uh$snapValueToStep)(val, min, max, step);
}), [
minValue,
maxValue,
step
]);
let value = (0, $BT4Uh$useMemo)(()=>restrictValues($28f99e3e86e6ec45$var$convertValue(props.value)), [
props.value
]);
let defaultValue = (0, $BT4Uh$useMemo)(()=>{
var _convertValue;
return restrictValues((_convertValue = $28f99e3e86e6ec45$var$convertValue(props.defaultValue)) !== null && _convertValue !== void 0 ? _convertValue : [
minValue
]);
}, [
props.defaultValue,
minValue
]);
let onChange = $28f99e3e86e6ec45$var$createOnChange(props.value, props.defaultValue, props.onChange);
let onChangeEnd = $28f99e3e86e6ec45$var$createOnChange(props.value, props.defaultValue, props.onChangeEnd);
const [values, setValuesState] = (0, $BT4Uh$useControlledState)(value, defaultValue, onChange);
const [isDraggings, setDraggingsState] = (0, $BT4Uh$useState)(new Array(values.length).fill(false));
const isEditablesRef = (0, $BT4Uh$useRef)(new Array(values.length).fill(true));
const [focusedIndex, setFocusedIndex] = (0, $BT4Uh$useState)(undefined);
const valuesRef = (0, $BT4Uh$useRef)(values);
const isDraggingsRef = (0, $BT4Uh$useRef)(isDraggings);
let setValues = (values)=>{
valuesRef.current = values;
setValuesState(values);
};
let setDraggings = (draggings)=>{
isDraggingsRef.current = draggings;
setDraggingsState(draggings);
};
function getValuePercent(value) {
return (value - minValue) / (maxValue - minValue);
}
function getThumbMinValue(index) {
return index === 0 ? minValue : values[index - 1];
}
function getThumbMaxValue(index) {
return index === values.length - 1 ? maxValue : values[index + 1];
}
function isThumbEditable(index) {
return isEditablesRef.current[index];
}
function setThumbEditable(index, editable) {
isEditablesRef.current[index] = editable;
}
function updateValue(index, value) {
if (isDisabled || !isThumbEditable(index)) return;
const thisMin = getThumbMinValue(index);
const thisMax = getThumbMaxValue(index);
// Round value to multiple of step, clamp value between min and max
value = (0, $BT4Uh$snapValueToStep)(value, thisMin, thisMax, step);
let newValues = $28f99e3e86e6ec45$var$replaceIndex(valuesRef.current, index, value);
setValues(newValues);
}
function updateDragging(index, dragging) {
if (isDisabled || !isThumbEditable(index)) return;
if (dragging) valuesRef.current = values;
const wasDragging = isDraggingsRef.current[index];
isDraggingsRef.current = $28f99e3e86e6ec45$var$replaceIndex(isDraggingsRef.current, index, dragging);
setDraggings(isDraggingsRef.current);
// Call onChangeEnd if no handles are dragging.
if (onChangeEnd && wasDragging && !isDraggingsRef.current.some(Boolean)) onChangeEnd(valuesRef.current);
}
function getFormattedValue(value) {
return formatter.format(value);
}
function setThumbPercent(index, percent) {
updateValue(index, getPercentValue(percent));
}
function getRoundedValue(value) {
return Math.round((value - minValue) / step) * step + minValue;
}
function getPercentValue(percent) {
const val = percent * (maxValue - minValue) + minValue;
return (0, $BT4Uh$clamp)(getRoundedValue(val), minValue, maxValue);
}
function incrementThumb(index, stepSize = 1) {
let s = Math.max(stepSize, step);
updateValue(index, (0, $BT4Uh$snapValueToStep)(values[index] + s, minValue, maxValue, step));
}
function decrementThumb(index, stepSize = 1) {
let s = Math.max(stepSize, step);
updateValue(index, (0, $BT4Uh$snapValueToStep)(values[index] - s, minValue, maxValue, step));
}
return {
values: values,
getThumbValue: (index)=>values[index],
setThumbValue: updateValue,
setThumbPercent: setThumbPercent,
isThumbDragging: (index)=>isDraggings[index],
setThumbDragging: updateDragging,
focusedThumb: focusedIndex,
setFocusedThumb: setFocusedIndex,
getThumbPercent: (index)=>getValuePercent(values[index]),
getValuePercent: getValuePercent,
getThumbValueLabel: (index)=>getFormattedValue(values[index]),
getFormattedValue: getFormattedValue,
getThumbMinValue: getThumbMinValue,
getThumbMaxValue: getThumbMaxValue,
getPercentValue: getPercentValue,
isThumbEditable: isThumbEditable,
setThumbEditable: setThumbEditable,
incrementThumb: incrementThumb,
decrementThumb: decrementThumb,
step: step,
pageSize: pageSize,
orientation: orientation,
isDisabled: isDisabled
};
}
function $28f99e3e86e6ec45$var$replaceIndex(array, index, value) {
if (array[index] === value) return array;
return [
...array.slice(0, index),
value,
...array.slice(index + 1)
];
}
function $28f99e3e86e6ec45$var$convertValue(value) {
if (value == null) return undefined;
return Array.isArray(value) ? value : [
value
];
}
function $28f99e3e86e6ec45$var$createOnChange(value, defaultValue, onChange) {
return (newValue)=>{
if (typeof value === 'number' || typeof defaultValue === 'number') onChange === null || onChange === void 0 ? void 0 : onChange(newValue[0]);
else onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
};
}
export {$28f99e3e86e6ec45$export$e5fda3247f5d67f9 as useSliderState};
//# sourceMappingURL=useSliderState.module.js.map
@@ -0,0 +1,117 @@
'use strict';
var forEach = require('for-each');
var availableTypedArrays = require('available-typed-arrays');
var callBind = require('call-bind');
var callBound = require('call-bound');
var gOPD = require('gopd');
var getProto = require('get-proto');
var $toString = callBound('Object.prototype.toString');
var hasToStringTag = require('has-tostringtag/shams')();
var g = typeof globalThis === 'undefined' ? global : globalThis;
var typedArrays = availableTypedArrays();
var $slice = callBound('String.prototype.slice');
/** @type {<T = unknown>(array: readonly T[], value: unknown) => number} */
var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {
for (var i = 0; i < array.length; i += 1) {
if (array[i] === value) {
return i;
}
}
return -1;
};
/** @typedef {import('./types').Getter} Getter */
/** @type {import('./types').Cache} */
var cache = { __proto__: null };
if (hasToStringTag && gOPD && getProto) {
forEach(typedArrays, function (typedArray) {
var arr = new g[typedArray]();
if (Symbol.toStringTag in arr && getProto) {
var proto = getProto(arr);
// @ts-expect-error TS won't narrow inside a closure
var descriptor = gOPD(proto, Symbol.toStringTag);
if (!descriptor && proto) {
var superProto = getProto(proto);
// @ts-expect-error TS won't narrow inside a closure
descriptor = gOPD(superProto, Symbol.toStringTag);
}
// @ts-expect-error TODO: fix
cache['$' + typedArray] = callBind(descriptor.get);
}
});
} else {
forEach(typedArrays, function (typedArray) {
var arr = new g[typedArray]();
var fn = arr.slice || arr.set;
if (fn) {
cache[
/** @type {`$${import('.').TypedArrayName}`} */ ('$' + typedArray)
] = /** @type {import('./types').BoundSlice | import('./types').BoundSet} */ (
// @ts-expect-error TODO FIXME
callBind(fn)
);
}
});
}
/** @type {(value: object) => false | import('.').TypedArrayName} */
var tryTypedArrays = function tryAllTypedArrays(value) {
/** @type {ReturnType<typeof tryAllTypedArrays>} */ var found = false;
forEach(
/** @type {Record<`\$${import('.').TypedArrayName}`, Getter>} */ (cache),
/** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
function (getter, typedArray) {
if (!found) {
try {
// @ts-expect-error a throw is fine here
if ('$' + getter(value) === typedArray) {
found = /** @type {import('.').TypedArrayName} */ ($slice(typedArray, 1));
}
} catch (e) { /**/ }
}
}
);
return found;
};
/** @type {(value: object) => false | import('.').TypedArrayName} */
var trySlices = function tryAllSlices(value) {
/** @type {ReturnType<typeof tryAllSlices>} */ var found = false;
forEach(
/** @type {Record<`\$${import('.').TypedArrayName}`, Getter>} */(cache),
/** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */ function (getter, name) {
if (!found) {
try {
// @ts-expect-error a throw is fine here
getter(value);
found = /** @type {import('.').TypedArrayName} */ ($slice(name, 1));
} catch (e) { /**/ }
}
}
);
return found;
};
/** @type {import('.')} */
module.exports = function whichTypedArray(value) {
if (!value || typeof value !== 'object') { return false; }
if (!hasToStringTag) {
/** @type {string} */
var tag = $slice($toString(value), 8, -1);
if ($indexOf(typedArrays, tag) > -1) {
return tag;
}
if (tag !== 'Object') {
return false;
}
// node < 0.6 hits here on real Typed Arrays
return trySlices(value);
}
if (!gOPD) { return null; } // unknown engine
return tryTypedArrays(value);
};
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=function-component-definition.d.ts.map
@@ -0,0 +1,23 @@
"use client";
// src/navbar-menu-transitions.ts
var menuVariants = {
enter: {
height: "calc(100vh - var(--navbar-height))",
transition: {
duration: 0.3,
easings: "easeOut"
}
},
exit: {
height: 0,
transition: {
duration: 0.25,
easings: "easeIn"
}
}
};
export {
menuVariants
};
@@ -0,0 +1,122 @@
import { defaultSerializeQueryArgs } from '@internal/query/defaultSerializeQueryArgs'
const endpointDefinition: any = {}
const endpointName = 'test'
test('string arg', () => {
expect(
defaultSerializeQueryArgs({
endpointDefinition,
endpointName,
queryArgs: 'arg',
}),
).toMatchInlineSnapshot(`"test("arg")"`)
})
test('number arg', () => {
expect(
defaultSerializeQueryArgs({
endpointDefinition,
endpointName,
queryArgs: 5,
}),
).toMatchInlineSnapshot(`"test(5)"`)
})
test('bigint arg has non-default serialization (intead of throwing)', () => {
expect(
defaultSerializeQueryArgs({
endpointDefinition,
endpointName,
queryArgs: BigInt(10),
}),
).toMatchInlineSnapshot(`"test({"$bigint":"10"})"`)
})
test('simple object arg is sorted', () => {
expect(
defaultSerializeQueryArgs({
endpointDefinition,
endpointName,
queryArgs: { name: 'arg', age: 5 },
}),
).toMatchInlineSnapshot(`"test({"age":5,"name":"arg"})"`)
})
test('nested object arg is sorted recursively', () => {
expect(
defaultSerializeQueryArgs({
endpointDefinition,
endpointName,
queryArgs: { name: { last: 'Split', first: 'Banana' }, age: 5 },
}),
).toMatchInlineSnapshot(
`"test({"age":5,"name":{"first":"Banana","last":"Split"}})"`,
)
})
test('Fully serializes a deeply nested object', () => {
const nestedObj = {
a: {
a1: {
a11: {
a111: 1,
},
},
},
b: {
b2: {
b21: 3,
},
b1: {
b11: 2,
},
},
}
const res = defaultSerializeQueryArgs({
endpointDefinition,
endpointName,
queryArgs: nestedObj,
})
expect(res).toMatchInlineSnapshot(
`"test({"a":{"a1":{"a11":{"a111":1}}},"b":{"b1":{"b11":2},"b2":{"b21":3}}})"`,
)
})
test('Caches results for plain objects', () => {
const testData = Array.from({ length: 10000 }).map((_, i) => {
return {
albumId: i,
id: i,
title: 'accusamus beatae ad facilis cum similique qui sunt',
url: 'https://via.placeholder.com/600/92c952',
thumbnailUrl: 'https://via.placeholder.com/150/92c952',
}
})
const data = {
testData,
}
const runWithTimer = (data: any) => {
const start = Date.now()
const res = defaultSerializeQueryArgs({
endpointDefinition,
endpointName,
queryArgs: data,
})
const end = Date.now()
const duration = end - start
return [res, duration] as const
}
const [res1, time1] = runWithTimer(data)
const [res2, time2] = runWithTimer(data)
expect(res1).toBe(res2)
expect(time2).toBeLessThanOrEqual(time1)
// Locally, stringifying 10K items takes 25-30ms.
// Assuming the WeakMap cache hit, this _should_ be 0
expect(time2).toBeLessThan(2)
})
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F wC","164":"A B"},B:{"66":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","164":"C L M G N O P"},C:{"2":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C"},D:{"2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB","66":"0 1 2 3 4 5 FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB FD GD HD ID NC uC JD OC","66":"0 1 2 3 4 5 lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"292":"hD"},I:{"2":"TC J I iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A H","292":"B C NC uC OC"},L:{"2":"I"},M:{"2":"MC"},N:{"164":"A B"},O:{"2":"PC"},P:{"2":"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:{"66":"zD"},R:{"2":"0D"},S:{"2":"1D 2D"}},B:5,C:"CSS Device Adaptation",D:true};
@@ -0,0 +1,87 @@
# Simple Integer
42
==>
JsonText(Number)
# Zero By Itself Is Ok
0
==>
JsonText(Number)
# Leading Zeros Aren't Ok
[0123]
==>
JsonText(Array(Number, ⚠(Number)))
# Optional Minus Sign
-53
==>
JsonText(Number)
# Decimal Digits
123.4
==>
JsonText(Number)
# Must Have Digits After Decimal
123.
==>
JsonText(Number, ⚠)
# Exponent: Lowercase e
1e5
==>
JsonText(Number)
# Exponent: Uppercase E
1E5
==>
JsonText(Number)
# Exponent: Optional Plus Sign
1e+5
==>
JsonText(Number)
# Exponent: Optional Minus Sign
1E-5
==>
JsonText(Number)
# Exponent Without Digit Is Not Ok
42e
==>
JsonText(Number, ⚠)
@@ -0,0 +1,32 @@
var copyObject = require('./_copyObject'),
keysIn = require('./keysIn');
/**
* Converts `value` to a plain object flattening inherited enumerable string
* keyed properties of `value` to own properties of the plain object.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {Object} Returns the converted plain object.
* @example
*
* function Foo() {
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.assign({ 'a': 1 }, new Foo);
* // => { 'a': 1, 'b': 2 }
*
* _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
* // => { 'a': 1, 'b': 2, 'c': 3 }
*/
function toPlainObject(value) {
return copyObject(value, keysIn(value));
}
module.exports = toPlainObject;
@@ -0,0 +1,3 @@
import type { TSESLint } from '@typescript-eslint/utils';
declare const _default: TSESLint.RuleModule<"preferIncludes" | "preferStringIncludes", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>;
export default _default;
@@ -0,0 +1,40 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const getESLintCoreRule_1 = require("../util/getESLintCoreRule");
const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-dupe-class-members');
exports.default = (0, util_1.createRule)({
name: 'no-dupe-class-members',
meta: {
type: 'problem',
// defaultOptions, -- base rule does not use defaultOptions
docs: {
description: 'Disallow duplicate class members',
extendsBaseRule: true,
},
hasSuggestions: baseRule.meta.hasSuggestions,
messages: baseRule.meta.messages,
schema: baseRule.meta.schema,
},
defaultOptions: [],
create(context) {
const rules = baseRule.create(context);
function wrapMemberDefinitionListener(coreListener) {
return (node) => {
if (node.computed) {
return;
}
if (node.value &&
node.value.type === utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression) {
return;
}
return coreListener(node);
};
}
return {
...rules,
'MethodDefinition, PropertyDefinition': wrapMemberDefinitionListener(rules['MethodDefinition, PropertyDefinition']),
};
},
});
@@ -0,0 +1,39 @@
// Yoruba Nigeria [yo]
import dayjs from '../index';
var locale = {
name: 'yo',
weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'),
weekStart: 1,
weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
ordinal: function ordinal(n) {
return n;
},
formats: {
LT: 'h:mm A',
LTS: 'h:mm:ss A',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY h:mm A',
LLLL: 'dddd, D MMMM YYYY h:mm A'
},
relativeTime: {
future: 'ní %s',
past: '%s kọjá',
s: 'ìsẹjú aayá die',
m: 'ìsẹjú kan',
mm: 'ìsẹjú %d',
h: 'wákati kan',
hh: 'wákati %d',
d: 'ọjọ́ kan',
dd: 'ọjọ́ %d',
M: 'osù kan',
MM: 'osù %d',
y: 'ọdún kan',
yy: 'ọdún %d'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"3 4 5 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N","164":"0 1 2 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","3138":"O","12292":"P"},C:{"1":"0 1 2 3 4 5 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 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 0C 1C"},D:{"1":"3 4 5 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","164":"0 1 2 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z 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"},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","2":"2C ZC","164":"J ZB K D E F A B C L M G 3C 4C 5C 6C aC NC OC 7C 8C 9C bC"},F:{"1":"0 1 2 3 4 5 p q r s t u v w x y z","2":"F B C FD GD HD ID NC uC JD OC","164":"6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o"},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","164":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC"},H:{"2":"hD"},I:{"1":"I","164":"mD nD","676":"TC J iD jD kD lD vC"},J:{"164":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"164":"PC"},P:{"1":"BB CB DB EB FB","164":"6 7 8 9 J AB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"164":"zD"},R:{"164":"0D"},S:{"1":"2D","260":"1D"}},B:4,C:"CSS Masks",D:true};
@@ -0,0 +1,49 @@
# jsx-a11y/autocomplete-valid
💼 This rule is enabled in the following configs: ☑️ `recommended`, 🔒 `strict`.
<!-- end auto-generated rule header -->
Ensure the autocomplete attribute is correct and suitable for the form field it is used with.
## Rule options
This rule takes one optional object argument of type object:
```
{
"rules": {
"jsx-a11y/autocomplete-valid": [ 2, {
"inputComponents": ["Input", "FormField"]
}],
}
}
```
### Succeed
```jsx
<!-- Good: the autocomplete attribute is used according to the HTML specification -->
<input type="text" autocomplete="name" />
<!-- Good: MyInput is not listed in inputComponents -->
<MyInput autocomplete="incorrect" />
```
### Fail
```jsx
<!-- Bad: the autocomplete attribute has an invalid value -->
<input type="text" autocomplete="incorrect" />
<!-- Bad: the autocomplete attribute is on an inappropriate input element -->
<input type="email" autocomplete="url" />
<!-- Bad: MyInput is listed in inputComponents -->
<MyInput autocomplete="incorrect" />
```
## Accessibility guidelines
- [WCAG 1.3.5](https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose)
### Resources
- [axe-core, autocomplete-valid](https://dequeuniversity.com/rules/axe/3.2/autocomplete-valid)
- [HTML 5.2, Autocomplete requirements](https://www.w3.org/TR/html52/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute)
@@ -0,0 +1,62 @@
#include <windows.h>
#include "TestUtil.cc"
const int SC_CONSOLE_MARK = 0xFFF2;
const int SC_CONSOLE_SELECT_ALL = 0xFFF5;
int main(int argc, char *argv[0]) {
if (argc != 2) {
printf("Usage: %s (mark|selectall|read)\n", argv[0]);
return 1;
}
enum class Test { Mark, SelectAll, Read } test;
if (!strcmp(argv[1], "mark")) {
test = Test::Mark;
} else if (!strcmp(argv[1], "selectall")) {
test = Test::SelectAll;
} else if (!strcmp(argv[1], "read")) {
test = Test::Read;
} else {
printf("Invalid test: %s\n", argv[1]);
return 1;
}
HANDLE conout = GetStdHandle(STD_OUTPUT_HANDLE);
TimeMeasurement tm;
HWND hwnd = GetConsoleWindow();
setWindowPos(0, 0, 1, 1);
setBufferSize(100, 3000);
system("cls");
setWindowPos(0, 2975, 100, 25);
setCursorPos(0, 2999);
ShowWindow(hwnd, SW_HIDE);
for (int i = 0; i < 1000; ++i) {
// CONSOLE_SCREEN_BUFFER_INFO info = {};
// GetConsoleScreenBufferInfo(conout, &info);
if (test == Test::Mark) {
SendMessage(hwnd, WM_SYSCOMMAND, SC_CONSOLE_MARK, 0);
SendMessage(hwnd, WM_CHAR, 27, 0x00010001);
} else if (test == Test::SelectAll) {
SendMessage(hwnd, WM_SYSCOMMAND, SC_CONSOLE_SELECT_ALL, 0);
SendMessage(hwnd, WM_CHAR, 27, 0x00010001);
} else if (test == Test::Read) {
static CHAR_INFO buffer[100 * 3000];
const SMALL_RECT readRegion = {0, 0, 99, 2999};
SMALL_RECT tmp = readRegion;
BOOL ret = ReadConsoleOutput(conout, buffer, {100, 3000}, {0, 0}, &tmp);
ASSERT(ret && !memcmp(&tmp, &readRegion, sizeof(tmp)));
}
}
ShowWindow(hwnd, SW_SHOW);
printf("elapsed: %f\n", tm.elapsed());
return 0;
}
@@ -0,0 +1,10 @@
import { PluginFunc } from 'dayjs'
declare const plugin: PluginFunc
export = plugin
declare module 'dayjs' {
interface Dayjs {
isYesterday(): boolean
}
}
@@ -0,0 +1,28 @@
var baseUniq = require('./_baseUniq');
/**
* This method is like `_.uniq` except that it accepts `comparator` which
* is invoked to compare elements of `array`. The order of result values is
* determined by the order they occur in the array.The comparator is invoked
* with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.uniqWith(objects, _.isEqual);
* // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
*/
function uniqWith(array, comparator) {
comparator = typeof comparator == 'function' ? comparator : undefined;
return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
}
module.exports = uniqWith;
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"A B","2":"K D E F 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 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","2":"xC TC J ZB 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 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","2":"J ZB K D"},E:{"1":"K D E F A B C L M G 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","2":"J ZB 2C ZC 3C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z NC uC JD OC","2":"F FD GD HD ID"},G:{"1":"E 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","2":"ZC KD vC LD MD","132":"ND"},H:{"1":"hD"},I:{"1":"I mD nD","2":"TC J iD jD kD lD vC"},J:{"1":"D A"},K:{"1":"B C H NC uC OC","2":"A"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"progress element",D:true};
@@ -0,0 +1,19 @@
/**
* Turn an mdast `tableRow` node into hast.
*
* @param {State} state
* Info passed around.
* @param {TableRow} node
* mdast node.
* @param {Parents | undefined} parent
* Parent of `node`.
* @returns {Element}
* hast node.
*/
export function tableRow(state: State, node: TableRow, parent: Parents | undefined): Element;
export type Element = import("hast").Element;
export type ElementContent = import("hast").ElementContent;
export type Properties = import("hast").Properties;
export type Parents = import("mdast").Parents;
export type TableRow = import("mdast").TableRow;
export type State = import("../state.js").State;
@@ -0,0 +1,14 @@
import * as _heroui_system from '@heroui/system';
import { UseNavbarProps } from './use-navbar.js';
import 'react';
import 'tailwind-variants';
import '@heroui/theme';
import '@heroui/react-utils';
import 'framer-motion';
interface NavbarProps extends Omit<UseNavbarProps, "hideOnScroll"> {
children?: React.ReactNode | React.ReactNode[];
}
declare const Navbar: _heroui_system.InternalForwardRefRenderFunction<"div", NavbarProps, never>;
export { NavbarProps, Navbar as default };
@@ -0,0 +1,7 @@
import classApplyDescriptorSet from "./classApplyDescriptorSet.js";
import classPrivateFieldGet2 from "./classPrivateFieldGet2.js";
function _classPrivateFieldSet(e, t, r) {
var s = classPrivateFieldGet2(t, e);
return classApplyDescriptorSet(e, s, r), r;
}
export { _classPrivateFieldSet as default };
@@ -0,0 +1,12 @@
How to install gyp-mode for emacs:
Add the following to your ~/.emacs (replace ... with the path to your gyp
checkout).
(setq load-path (cons ".../tools/emacs" load-path))
(require 'gyp)
Restart emacs (or eval-region the added lines) and you should be all set.
Please note that ert is required for running the tests, which is included in
Emacs 24, or available separately from https://github.com/ohler/ert
@@ -0,0 +1,497 @@
{
"typesMap": {
"jquery": {
"match": "jquery(-(\\.?\\d+)+)?(\\.intellisense)?(\\.min)?\\.js$",
"types": ["jquery"]
},
"WinJS": {
"match": "^(.*\\/winjs-[.\\d]+)\\/js\\/base\\.js$",
"exclude": [["^", 1, "/.*"]],
"types": ["winjs"]
},
"Kendo": {
"match": "^(.*\\/kendo(-ui)?)\\/kendo\\.all(\\.min)?\\.js$",
"exclude": [["^", 1, "/.*"]],
"types": ["kendo-ui"]
},
"Office Nuget": {
"match": "^(.*\\/office\\/1)\\/excel-\\d+\\.debug\\.js$",
"exclude": [["^", 1, "/.*"]],
"types": ["office"]
},
"References": {
"match": "^(.*\\/_references\\.js)$",
"exclude": [["^", 1, "$"]]
},
"Datatables.net": {
"match": "^.*\\/(jquery\\.)?dataTables(\\.all)?(\\.min)?\\.js$",
"types": ["datatables.net"]
},
"Ace": {
"match": "^(.*)\\/ace.js",
"exclude": [["^", 1, "/.*"]],
"types": ["ace"]
}
},
"simpleMap": {
"accounting": "accounting",
"ace.js": "ace",
"ag-grid": "ag-grid",
"alertify": "alertify",
"alt": "alt",
"amcharts.js": "amcharts",
"amplify": "amplifyjs",
"angular": "angular",
"angular-bootstrap-lightbox": "angular-bootstrap-lightbox",
"angular-cookie": "angular-cookie",
"angular-file-upload": "angular-file-upload",
"angularfire": "angularfire",
"angular-gettext": "angular-gettext",
"angular-google-analytics": "angular-google-analytics",
"angular-local-storage": "angular-local-storage",
"angularLocalStorage": "angularLocalStorage",
"angular-scroll": "angular-scroll",
"angular-spinner": "angular-spinner",
"angular-strap": "angular-strap",
"angulartics": "angulartics",
"angular-toastr": "angular-toastr",
"angular-translate": "angular-translate",
"angular-ui-router": "angular-ui-router",
"angular-ui-tree": "angular-ui-tree",
"angular-wizard": "angular-wizard",
"async": "async",
"atmosphere": "atmosphere",
"aws-sdk": "aws-sdk",
"aws-sdk-js": "aws-sdk",
"axios": "axios",
"backbone": "backbone",
"backbone.layoutmanager": "backbone.layoutmanager",
"backbone.paginator": "backbone.paginator",
"backbone.radio": "backbone.radio",
"backbone-associations": "backbone-associations",
"backbone-relational": "backbone-relational",
"backgrid": "backgrid",
"Bacon": "baconjs",
"benchmark": "benchmark",
"blazy": "blazy",
"bliss": "blissfuljs",
"bluebird": "bluebird",
"body-parser": "body-parser",
"bootbox": "bootbox",
"bootstrap": "bootstrap",
"bootstrap-editable": "x-editable",
"bootstrap-maxlength": "bootstrap-maxlength",
"bootstrap-notify": "bootstrap-notify",
"bootstrap-slider": "bootstrap-slider",
"bootstrap-switch": "bootstrap-switch",
"bowser": "bowser",
"breeze": "breeze",
"browserify": "browserify",
"bson": "bson",
"c3": "c3",
"canvasjs": "canvasjs",
"chai": "chai",
"chalk": "chalk",
"chance": "chance",
"chartist": "chartist",
"cheerio": "cheerio",
"chokidar": "chokidar",
"chosen.jquery": "chosen",
"chroma": "chroma-js",
"ckeditor.js": "ckeditor",
"cli-color": "cli-color",
"clipboard": "clipboard",
"codemirror": "codemirror",
"colors": "colors",
"commander": "commander",
"commonmark": "commonmark",
"compression": "compression",
"confidence": "confidence",
"connect": "connect",
"Control.FullScreen": "leaflet.fullscreen",
"cookie": "cookie",
"cookie-parser": "cookie-parser",
"cookies": "cookies",
"core": "core-js",
"core-js": "core-js",
"crossfilter": "crossfilter",
"crossroads": "crossroads",
"css": "css",
"ct-ui-router-extras": "ui-router-extras",
"d3": "d3",
"dagre-d3": "dagre-d3",
"dat.gui": "dat-gui",
"debug": "debug",
"deep-diff": "deep-diff",
"Dexie": "dexie",
"dialogs": "angular-dialog-service",
"dojo.js": "dojo",
"doT": "dot",
"dragula": "dragula",
"drop": "drop",
"dropbox": "dropboxjs",
"dropzone": "dropzone",
"Dts Name": "Dts Name",
"dust-core": "dustjs-linkedin",
"easeljs": "easeljs",
"ejs": "ejs",
"ember": "ember",
"envify": "envify",
"epiceditor": "epiceditor",
"es6-promise": "es6-promise",
"ES6-Promise": "es6-promise",
"es6-shim": "es6-shim",
"expect": "expect",
"express": "express",
"express-session": "express-session",
"ext-all.js": "extjs",
"extend": "extend",
"fabric": "fabricjs",
"faker": "faker",
"fastclick": "fastclick",
"favico": "favico.js",
"featherlight": "featherlight",
"FileSaver": "FileSaver",
"fingerprint": "fingerprintjs",
"fixed-data-table": "fixed-data-table",
"flickity.pkgd": "flickity",
"flight": "flight",
"flow": "flowjs",
"Flux": "flux",
"formly": "angular-formly",
"foundation": "foundation",
"fpsmeter": "fpsmeter",
"fuse": "fuse",
"generator": "yeoman-generator",
"gl-matrix": "gl-matrix",
"globalize": "globalize",
"graceful-fs": "graceful-fs",
"gridstack": "gridstack",
"gulp": "gulp",
"gulp-rename": "gulp-rename",
"gulp-uglify": "gulp-uglify",
"gulp-util": "gulp-util",
"hammer": "hammerjs",
"handlebars": "handlebars",
"hasher": "hasher",
"he": "he",
"hello.all": "hellojs",
"highcharts.js": "highcharts",
"highlight": "highlightjs",
"history": "history",
"History": "history",
"hopscotch": "hopscotch",
"hotkeys": "angular-hotkeys",
"html2canvas": "html2canvas",
"humane": "humane",
"i18next": "i18next",
"icheck": "icheck",
"impress": "impress",
"incremental-dom": "incremental-dom",
"Inquirer": "inquirer",
"insight": "insight",
"interact": "interactjs",
"intercom": "intercomjs",
"intro": "intro.js",
"ion.rangeSlider": "ion.rangeSlider",
"ionic": "ionic",
"is": "is_js",
"iscroll": "iscroll",
"jade": "jade",
"jasmine": "jasmine",
"joint": "jointjs",
"jquery": "jquery",
"jquery.address": "jquery.address",
"jquery.are-you-sure": "jquery.are-you-sure",
"jquery.blockUI": "jquery.blockUI",
"jquery.bootstrap.wizard": "jquery.bootstrap.wizard",
"jquery.bootstrap-touchspin": "bootstrap-touchspin",
"jquery.color": "jquery.color",
"jquery.colorbox": "jquery.colorbox",
"jquery.contextMenu": "jquery.contextMenu",
"jquery.cookie": "jquery.cookie",
"jquery.customSelect": "jquery.customSelect",
"jquery.cycle.all": "jquery.cycle",
"jquery.cycle2": "jquery.cycle2",
"jquery.dataTables": "jquery.dataTables",
"jquery.dropotron": "jquery.dropotron",
"jquery.fancybox.pack.js": "fancybox",
"jquery.fancytree-all": "jquery.fancytree",
"jquery.fileupload": "jquery.fileupload",
"jquery.flot": "flot",
"jquery.form": "jquery.form",
"jquery.gridster": "jquery.gridster",
"jquery.handsontable.full": "jquery-handsontable",
"jquery.joyride": "jquery.joyride",
"jquery.jqGrid": "jqgrid",
"jquery.mmenu": "jquery.mmenu",
"jquery.mockjax": "jquery-mockjax",
"jquery.noty": "jquery.noty",
"jquery.payment": "jquery.payment",
"jquery.pjax": "jquery.pjax",
"jquery.placeholder": "jquery.placeholder",
"jquery.qrcode": "jquery.qrcode",
"jquery.qtip": "qtip2",
"jquery.raty": "raty",
"jquery.scrollTo": "jquery.scrollTo",
"jquery.signalR": "signalr",
"jquery.simplemodal": "jquery.simplemodal",
"jquery.timeago": "jquery.timeago",
"jquery.tinyscrollbar": "jquery.tinyscrollbar",
"jquery.tipsy": "jquery.tipsy",
"jquery.tooltipster": "tooltipster",
"jquery.transit": "jquery.transit",
"jquery.uniform": "jquery.uniform",
"jquery.watch": "watch",
"jquery-sortable": "jquery-sortable",
"jquery-ui": "jqueryui",
"js.cookie": "js-cookie",
"js-data": "js-data",
"js-data-angular": "js-data-angular",
"js-data-http": "js-data-http",
"jsdom": "jsdom",
"jsnlog": "jsnlog",
"json5": "json5",
"jspdf": "jspdf",
"jsrender": "jsrender",
"js-signals": "js-signals",
"jstorage": "jstorage",
"jstree": "jstree",
"js-yaml": "js-yaml",
"jszip": "jszip",
"katex": "katex",
"kefir": "kefir",
"keymaster": "keymaster",
"keypress": "keypress",
"kinetic": "kineticjs",
"knockback": "knockback",
"knockout": "knockout",
"knockout.mapping": "knockout.mapping",
"knockout.validation": "knockout.validation",
"knockout-paging": "knockout-paging",
"knockout-pre-rendered": "knockout-pre-rendered",
"ladda": "ladda",
"later": "later",
"lazy": "lazy.js",
"Leaflet.Editable": "leaflet-editable",
"leaflet.js": "leaflet",
"less": "less",
"linq": "linq",
"loading-bar": "angular-loading-bar",
"lodash": "lodash",
"log4javascript": "log4javascript",
"loglevel": "loglevel",
"lokijs": "lokijs",
"lovefield": "lovefield",
"lunr": "lunr",
"lz-string": "lz-string",
"mailcheck": "mailcheck",
"maquette": "maquette",
"marked": "marked",
"math": "mathjs",
"MathJax.js": "mathjax",
"matter": "matter-js",
"md5": "blueimp-md5",
"md5.js": "crypto-js",
"messenger": "messenger",
"method-override": "method-override",
"minimatch": "minimatch",
"minimist": "minimist",
"mithril": "mithril",
"mobile-detect": "mobile-detect",
"mocha": "mocha",
"mock-ajax": "jasmine-ajax",
"modernizr": "modernizr",
"Modernizr": "Modernizr",
"moment": "moment",
"moment-range": "moment-range",
"moment-timezone": "moment-timezone",
"mongoose": "mongoose",
"morgan": "morgan",
"mousetrap": "mousetrap",
"ms": "ms",
"mustache": "mustache",
"native.history": "history",
"nconf": "nconf",
"ncp": "ncp",
"nedb": "nedb",
"ng-cordova": "ng-cordova",
"ngDialog": "ng-dialog",
"ng-flow-standalone": "ng-flow",
"ng-grid": "ng-grid",
"ng-i18next": "ng-i18next",
"ng-table": "ng-table",
"node_redis": "redis",
"node-clone": "clone",
"node-fs-extra": "fs-extra",
"node-glob": "glob",
"Nodemailer": "nodemailer",
"node-mime": "mime",
"node-mkdirp": "mkdirp",
"node-mongodb-native": "mongodb",
"node-mysql": "mysql",
"node-open": "open",
"node-optimist": "optimist",
"node-progress": "progress",
"node-semver": "semver",
"node-tar": "tar",
"node-uuid": "node-uuid",
"node-xml2js": "xml2js",
"nopt": "nopt",
"notify": "notify",
"nouislider": "nouislider",
"npm": "npm",
"nprogress": "nprogress",
"numbro": "numbro",
"numeral": "numeraljs",
"nunjucks": "nunjucks",
"nv.d3": "nvd3",
"object-assign": "object-assign",
"oboe-browser": "oboe",
"office": "office-js",
"offline": "offline-js",
"onsenui": "onsenui",
"OpenLayers.js": "openlayers",
"openpgp": "openpgp",
"p2": "p2",
"packery.pkgd": "packery",
"page": "page",
"pako": "pako",
"papaparse": "papaparse",
"passport": "passport",
"passport-local": "passport-local",
"path": "pathjs",
"pdfkit": "pdfkit",
"peer": "peerjs",
"peg": "pegjs",
"photoswipe": "photoswipe",
"picker.js": "pickadate",
"pikaday": "pikaday",
"pixi": "pixi.js",
"platform": "platform",
"Please": "pleasejs",
"plottable": "plottable",
"polymer": "polymer",
"postal": "postal",
"preloadjs": "preloadjs",
"progress": "progress",
"purify": "dompurify",
"purl": "purl",
"q": "q",
"qs": "qs",
"qunit": "qunit",
"ractive": "ractive",
"rangy-core": "rangy",
"raphael": "raphael",
"raven": "ravenjs",
"react": "react",
"react-bootstrap": "react-bootstrap",
"react-intl": "react-intl",
"react-redux": "react-redux",
"ReactRouter": "react-router",
"ready": "domready",
"redux": "redux",
"request": "request",
"require": "require",
"restangular": "restangular",
"reveal": "reveal",
"rickshaw": "rickshaw",
"rimraf": "rimraf",
"rivets": "rivets",
"rx": "rx",
"rx.angular": "rx-angular",
"sammy": "sammyjs",
"SAT": "sat",
"sax-js": "sax",
"screenfull": "screenfull",
"seedrandom": "seedrandom",
"select2": "select2",
"selectize": "selectize",
"serve-favicon": "serve-favicon",
"serve-static": "serve-static",
"shelljs": "shelljs",
"should": "should",
"showdown": "showdown",
"sigma": "sigmajs",
"signature_pad": "signature_pad",
"sinon": "sinon",
"sjcl": "sjcl",
"slick": "slick-carousel",
"smoothie": "smoothie",
"socket.io": "socket.io",
"socket.io-client": "socket.io-client",
"sockjs": "sockjs-client",
"sortable": "angular-ui-sortable",
"soundjs": "soundjs",
"source-map": "source-map",
"spectrum": "spectrum",
"spin": "spin",
"sprintf": "sprintf",
"stampit": "stampit",
"state-machine": "state-machine",
"Stats": "stats",
"store": "storejs",
"string": "string",
"string_score": "string_score",
"strophe": "strophe",
"stylus": "stylus",
"sugar": "sugar",
"superagent": "superagent",
"svg": "svgjs",
"svg-injector": "svg-injector",
"swfobject": "swfobject",
"swig": "swig",
"swipe": "swipe",
"swiper": "swiper",
"system.js": "systemjs",
"tether": "tether",
"three": "threejs",
"through": "through",
"through2": "through2",
"timeline": "timelinejs",
"tinycolor": "tinycolor",
"tmhDynamicLocale": "angular-dynamic-locale",
"toaster": "angularjs-toaster",
"toastr": "toastr",
"tracking": "tracking",
"trunk8": "trunk8",
"turf": "turf",
"tweenjs": "tweenjs",
"TweenMax": "gsap",
"twig": "twig",
"twix": "twix",
"typeahead.bundle": "typeahead",
"typescript": "typescript",
"ui": "winjs",
"ui-bootstrap-tpls": "angular-ui-bootstrap",
"ui-grid": "ui-grid",
"uikit": "uikit",
"underscore": "underscore",
"underscore.string": "underscore.string",
"update-notifier": "update-notifier",
"url": "jsurl",
"UUID": "uuid",
"validator": "validator",
"vega": "vega",
"vex": "vex-js",
"video": "videojs",
"vue": "vue",
"vue-router": "vue-router",
"webtorrent": "webtorrent",
"when": "when",
"winston": "winston",
"wrench-js": "wrench",
"ws": "ws",
"xlsx": "xlsx",
"xml2json": "x2js",
"xmlbuilder-js": "xmlbuilder",
"xregexp": "xregexp",
"yargs": "yargs",
"yosay": "yosay",
"yui": "yui",
"yui3": "yui",
"zepto": "zepto",
"ZeroClipboard": "zeroclipboard",
"ZSchema-browser": "z-schema"
}
}
@@ -0,0 +1,186 @@
export class Buffer extends Uint8Array {
length: number
write(string: string, offset?: number, length?: number, encoding?: string): number;
toString(encoding?: string, start?: number, end?: number): string;
toJSON(): { type: 'Buffer', data: any[] };
equals(otherBuffer: Buffer): boolean;
compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
slice(start?: number, end?: number): Buffer;
writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
readUInt8(offset: number, noAssert?: boolean): number;
readUInt16LE(offset: number, noAssert?: boolean): number;
readUInt16BE(offset: number, noAssert?: boolean): number;
readUInt32LE(offset: number, noAssert?: boolean): number;
readUInt32BE(offset: number, noAssert?: boolean): number;
readInt8(offset: number, noAssert?: boolean): number;
readInt16LE(offset: number, noAssert?: boolean): number;
readInt16BE(offset: number, noAssert?: boolean): number;
readInt32LE(offset: number, noAssert?: boolean): number;
readInt32BE(offset: number, noAssert?: boolean): number;
readFloatLE(offset: number, noAssert?: boolean): number;
readFloatBE(offset: number, noAssert?: boolean): number;
readDoubleLE(offset: number, noAssert?: boolean): number;
readDoubleBE(offset: number, noAssert?: boolean): number;
reverse(): this;
swap16(): Buffer;
swap32(): Buffer;
swap64(): Buffer;
writeUInt8(value: number, offset: number, noAssert?: boolean): number;
writeUInt16LE(value: number, offset: number, noAssert?: boolean): number;
writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
writeInt8(value: number, offset: number, noAssert?: boolean): number;
writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
writeFloatLE(value: number, offset: number, noAssert?: boolean): number;
writeFloatBE(value: number, offset: number, noAssert?: boolean): number;
writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
fill(value: any, offset?: number, end?: number): this;
indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean;
/**
* Allocates a new buffer containing the given {str}.
*
* @param str String to store in buffer.
* @param encoding encoding to use, optional. Default is 'utf8'
*/
constructor (str: string, encoding?: string);
/**
* Allocates a new buffer of {size} octets.
*
* @param size count of octets to allocate.
*/
constructor (size: number);
/**
* Allocates a new buffer containing the given {array} of octets.
*
* @param array The octets to store.
*/
constructor (array: Uint8Array);
/**
* Produces a Buffer backed by the same allocated memory as
* the given {ArrayBuffer}.
*
*
* @param arrayBuffer The ArrayBuffer with which to share memory.
*/
constructor (arrayBuffer: ArrayBuffer);
/**
* Allocates a new buffer containing the given {array} of octets.
*
* @param array The octets to store.
*/
constructor (array: any[]);
/**
* Copies the passed {buffer} data onto a new {Buffer} instance.
*
* @param buffer The buffer to copy.
*/
constructor (buffer: Buffer);
prototype: Buffer;
/**
* Allocates a new Buffer using an {array} of octets.
*
* @param array
*/
static from(array: any[]): Buffer;
/**
* When passed a reference to the .buffer property of a TypedArray instance,
* the newly created Buffer will share the same allocated memory as the TypedArray.
* The optional {byteOffset} and {length} arguments specify a memory range
* within the {arrayBuffer} that will be shared by the Buffer.
*
* @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer()
* @param byteOffset
* @param length
*/
static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
/**
* Copies the passed {buffer} data onto a new Buffer instance.
*
* @param buffer
*/
static from(buffer: Buffer | Uint8Array): Buffer;
/**
* Creates a new Buffer containing the given JavaScript string {str}.
* If provided, the {encoding} parameter identifies the character encoding.
* If not provided, {encoding} defaults to 'utf8'.
*
* @param str
*/
static from(str: string, encoding?: string): Buffer;
/**
* Returns true if {obj} is a Buffer
*
* @param obj object to test.
*/
static isBuffer(obj: any): obj is Buffer;
/**
* Returns true if {encoding} is a valid encoding argument.
* Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
*
* @param encoding string to test.
*/
static isEncoding(encoding: string): boolean;
/**
* Gives the actual byte length of a string. encoding defaults to 'utf8'.
* This is not the same as String.prototype.length since that returns the number of characters in a string.
*
* @param string string to test.
* @param encoding encoding used to evaluate (defaults to 'utf8')
*/
static byteLength(string: string, encoding?: string): number;
/**
* Returns a buffer which is the result of concatenating all the buffers in the list together.
*
* If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
* If the list has exactly one item, then the first item of the list is returned.
* If the list has more than one item, then a new Buffer is created.
*
* @param list An array of Buffer objects to concatenate
* @param totalLength Total length of the buffers when concatenated.
* If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
*/
static concat(list: Buffer[], totalLength?: number): Buffer;
/**
* The same as buf1.compare(buf2).
*/
static compare(buf1: Buffer, buf2: Buffer): number;
/**
* Allocates a new buffer of {size} octets.
*
* @param size count of octets to allocate.
* @param fill if specified, buffer will be initialized by calling buf.fill(fill).
* If parameter is omitted, buffer will be filled with zeros.
* @param encoding encoding used for call to buf.fill while initializing
*/
static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer;
/**
* Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
* of the newly created Buffer are unknown and may contain sensitive data.
*
* @param size count of octets to allocate
*/
static allocUnsafe(size: number): Buffer;
/**
* Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
* of the newly created Buffer are unknown and may contain sensitive data.
*
* @param size count of octets to allocate
*/
static allocUnsafeSlow(size: number): Buffer;
}
@@ -0,0 +1 @@
{"version":3,"names":["_index","require","_index2","prependToMemberExpression","member","prepend","isSuper","object","Error","memberExpression"],"sources":["../../src/modifications/prependToMemberExpression.ts"],"sourcesContent":["import { memberExpression } from \"../builders/generated/index.ts\";\nimport { isSuper } from \"../index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Prepend a node to a member expression.\n */\nexport default function prependToMemberExpression<\n T extends Pick<t.MemberExpression, \"object\" | \"property\">,\n>(member: T, prepend: t.MemberExpression[\"object\"]): T {\n if (isSuper(member.object)) {\n throw new Error(\n \"Cannot prepend node to super property access (`super.foo`).\",\n );\n }\n member.object = memberExpression(prepend, member.object);\n\n return member;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAMe,SAASE,yBAAyBA,CAE/CC,MAAS,EAAEC,OAAqC,EAAK;EACrD,IAAI,IAAAC,eAAO,EAACF,MAAM,CAACG,MAAM,CAAC,EAAE;IAC1B,MAAM,IAAIC,KAAK,CACb,6DACF,CAAC;EACH;EACAJ,MAAM,CAACG,MAAM,GAAG,IAAAE,uBAAgB,EAACJ,OAAO,EAAED,MAAM,CAACG,MAAM,CAAC;EAExD,OAAOH,MAAM;AACf","ignoreList":[]}
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports._decodeAttestationObjectInternals = void 0;
exports.decodeAttestationObject = decodeAttestationObject;
const index_js_1 = require("./iso/index.js");
/**
* Convert an AttestationObject buffer to a proper object
*
* @param base64AttestationObject Attestation Object buffer
*/
function decodeAttestationObject(attestationObject) {
return exports._decodeAttestationObjectInternals.stubThis(index_js_1.isoCBOR.decodeFirst(attestationObject));
}
/**
* Make it possible to stub the return value during testing
* @ignore Don't include this in docs output
*/
exports._decodeAttestationObjectInternals = {
stubThis: (value) => value,
};
@@ -0,0 +1,18 @@
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Get = require('./Get');
var ToLength = require('./ToLength');
// https://262.ecma-international.org/11.0/#sec-lengthofarraylike
module.exports = function LengthOfArrayLike(obj) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: `obj` must be an Object');
}
return ToLength(Get(obj, 'length'));
};
// TODO: use this all over
@@ -0,0 +1,27 @@
/**
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { CHAR_DATA_CODE_INDEX, NULL_CELL_CODE, WHITESPACE_CELL_CODE } from 'common/buffer/Constants';
import { IBufferService } from 'common/services/Services';
export function updateWindowsModeWrappedState(bufferService: IBufferService): void {
// Winpty does not support wraparound mode which means that lines will never
// be marked as wrapped. This causes issues for things like copying a line
// retaining the wrapped new line characters or if consumers are listening
// in on the data stream.
//
// The workaround for this is to listen to every incoming line feed and mark
// the line as wrapped if the last character in the previous line is not a
// space. This is certainly not without its problems, but generally on
// Windows when text reaches the end of the terminal it's likely going to be
// wrapped.
const line = bufferService.buffer.lines.get(bufferService.buffer.ybase + bufferService.buffer.y - 1);
const lastChar = line?.get(bufferService.cols - 1);
const nextLine = bufferService.buffer.lines.get(bufferService.buffer.ybase + bufferService.buffer.y);
if (nextLine && lastChar) {
nextLine.isWrapped = (lastChar[CHAR_DATA_CODE_INDEX] !== NULL_CELL_CODE && lastChar[CHAR_DATA_CODE_INDEX] !== WHITESPACE_CELL_CODE);
}
}
@@ -0,0 +1,11 @@
import * as _heroui_system from '@heroui/system';
import { UseInputProps } from './use-input.js';
import 'react';
import '@heroui/theme';
import '@react-types/textfield';
interface InputProps extends Omit<UseInputProps, "isMultiline"> {
}
declare const Input: _heroui_system.InternalForwardRefRenderFunction<"input", InputProps, never>;
export { InputProps, Input as default };
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_type_of.cjs",
"module": "../../esm/_type_of.js"
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 0C 1C","322":"3B","578":"UC 4B VC 5B"},D:{"1":"0 1 2 3 4 5 yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB"},E:{"1":"A B C L M G aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F 2C ZC 3C 4C 5C 6C"},F:{"1":"0 1 2 3 4 5 lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 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 FD GD HD ID NC uC JD OC"},G:{"1":"TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD","132":"RD SD"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB pD qD rD sD aC tD uD vD wD xD QC RC SC yD","2":"J","4":"oD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","2":"1D"}},B:5,C:"Shadow DOM (V1)",D:true};
@@ -0,0 +1,9 @@
import { Binding } from '../../binding/models/Binding';
import { InternalBindingConstraints } from '../../binding/models/BindingConstraintsImplementation';
import { SingleImmutableLinkedList } from '../../common/models/SingleImmutableLinkedList';
import { BasePlanParams } from '../models/BasePlanParams';
import { BindingNodeParent } from '../models/BindingNodeParent';
import { PlanBindingNode } from '../models/PlanBindingNode';
import { SubplanParams } from '../models/SubplanParams';
export declare function curryBuildServiceNodeBindings(subplan: (params: SubplanParams, bindingConstraintsList: SingleImmutableLinkedList<InternalBindingConstraints>) => PlanBindingNode): (params: BasePlanParams, bindingConstraintsList: SingleImmutableLinkedList<InternalBindingConstraints>, serviceBindings: Binding<unknown>[], parentNode: BindingNodeParent, chainedBindings: boolean) => PlanBindingNode[];
//# sourceMappingURL=curryBuildServiceNodeBindings.d.ts.map
@@ -0,0 +1,71 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _mapLimit = require('./mapLimit.js');
var _mapLimit2 = _interopRequireDefault(_mapLimit);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time.
*
* @name groupByLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.groupBy]{@link module:Collections.groupBy}
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
* The iteratee should complete with a `key` to group the value under.
* Invoked with (value, callback).
* @param {Function} [callback] - A callback which is called when all `iteratee`
* functions have finished, or an error occurs. Result is an `Object` whoses
* properties are arrays of values which returned the corresponding key.
* @returns {Promise} a promise, if no callback is passed
*/
function groupByLimit(coll, limit, iteratee, callback) {
var _iteratee = (0, _wrapAsync2.default)(iteratee);
return (0, _mapLimit2.default)(coll, limit, (val, iterCb) => {
_iteratee(val, (err, key) => {
if (err) return iterCb(err);
return iterCb(err, { key, val });
});
}, (err, mapResults) => {
var result = {};
// from MDN, handle object having an `hasOwnProperty` prop
var { hasOwnProperty } = Object.prototype;
for (var i = 0; i < mapResults.length; i++) {
if (mapResults[i]) {
var { key } = mapResults[i];
var { val } = mapResults[i];
if (hasOwnProperty.call(result, key)) {
result[key].push(val);
} else {
result[key] = [val];
}
}
}
return callback(err, result);
});
}
exports.default = (0, _awaitify2.default)(groupByLimit, 4);
module.exports = exports.default;
@@ -0,0 +1,485 @@
/*! *****************************************************************************
Copyright (C) Microsoft. 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.
***************************************************************************** */
declare namespace Reflect {
/**
* Applies a set of decorators to a target object.
* @param decorators An array of decorators.
* @param target The target object.
* @returns The result of applying the provided decorators.
* @remarks Decorators are applied in reverse order of their positions in the array.
* @example
*
* class Example { }
*
* // constructor
* Example = Reflect.decorate(decoratorsArray, Example);
*
*/
function decorate(decorators: ClassDecorator[], target: Function): Function;
/**
* Applies a set of decorators to a property of a target object.
* @param decorators An array of decorators.
* @param target The target object.
* @param propertyKey The property key to decorate.
* @param attributes A property descriptor.
* @remarks Decorators are applied in reverse order.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod() { }
* method() { }
* }
*
* // property (on constructor)
* Reflect.decorate(decoratorsArray, Example, "staticProperty");
*
* // property (on prototype)
* Reflect.decorate(decoratorsArray, Example.prototype, "property");
*
* // method (on constructor)
* Object.defineProperty(Example, "staticMethod",
* Reflect.decorate(decoratorsArray, Example, "staticMethod",
* Object.getOwnPropertyDescriptor(Example, "staticMethod")));
*
* // method (on prototype)
* Object.defineProperty(Example.prototype, "method",
* Reflect.decorate(decoratorsArray, Example.prototype, "method",
* Object.getOwnPropertyDescriptor(Example.prototype, "method")));
*
*/
function decorate(decorators: (PropertyDecorator | MethodDecorator)[], target: Object, propertyKey: string | symbol, attributes?: PropertyDescriptor): PropertyDescriptor;
/**
* A default metadata decorator factory that can be used on a class, class member, or parameter.
* @param metadataKey The key for the metadata entry.
* @param metadataValue The value for the metadata entry.
* @returns A decorator function.
* @remarks
* If `metadataKey` is already defined for the target and target key, the
* metadataValue for that key will be overwritten.
* @example
*
* // constructor
* @Reflect.metadata(key, value)
* class Example {
* }
*
* // property (on constructor, TypeScript only)
* class Example {
* @Reflect.metadata(key, value)
* static staticProperty;
* }
*
* // property (on prototype, TypeScript only)
* class Example {
* @Reflect.metadata(key, value)
* property;
* }
*
* // method (on constructor)
* class Example {
* @Reflect.metadata(key, value)
* static staticMethod() { }
* }
*
* // method (on prototype)
* class Example {
* @Reflect.metadata(key, value)
* method() { }
* }
*
*/
function metadata(metadataKey: any, metadataValue: any): {
(target: Function): void;
(target: Object, propertyKey: string | symbol): void;
};
/**
* Define a unique metadata entry on the target.
* @param metadataKey A key used to store and retrieve metadata.
* @param metadataValue A value that contains attached metadata.
* @param target The target object on which to define metadata.
* @example
*
* class Example {
* }
*
* // constructor
* Reflect.defineMetadata("custom:annotation", options, Example);
*
* // decorator factory as metadata-producing annotation.
* function MyAnnotation(options): ClassDecorator {
* return target => Reflect.defineMetadata("custom:annotation", options, target);
* }
*
*/
function defineMetadata(metadataKey: any, metadataValue: any, target: Object): void;
/**
* Define a unique metadata entry on the target.
* @param metadataKey A key used to store and retrieve metadata.
* @param metadataValue A value that contains attached metadata.
* @param target The target object on which to define metadata.
* @param propertyKey The property key for the target.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* Reflect.defineMetadata("custom:annotation", Number, Example, "staticProperty");
*
* // property (on prototype)
* Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "property");
*
* // method (on constructor)
* Reflect.defineMetadata("custom:annotation", Number, Example, "staticMethod");
*
* // method (on prototype)
* Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "method");
*
* // decorator factory as metadata-producing annotation.
* function MyAnnotation(options): PropertyDecorator {
* return (target, key) => Reflect.defineMetadata("custom:annotation", options, target, key);
* }
*
*/
function defineMetadata(metadataKey: any, metadataValue: any, target: Object, propertyKey: string | symbol): void;
/**
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.hasMetadata("custom:annotation", Example);
*
*/
function hasMetadata(metadataKey: any, target: Object): boolean;
/**
* Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method");
*
*/
function hasMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
/**
* Gets a value indicating whether the target object has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.hasOwnMetadata("custom:annotation", Example);
*
*/
function hasOwnMetadata(metadataKey: any, target: Object): boolean;
/**
* Gets a value indicating whether the target object has the provided metadata key defined.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method");
*
*/
function hasOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
/**
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getMetadata("custom:annotation", Example);
*
*/
function getMetadata(metadataKey: any, target: Object): any;
/**
* Gets the metadata value for the provided metadata key on the target object or its prototype chain.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getMetadata("custom:annotation", Example.prototype, "method");
*
*/
function getMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any;
/**
* Gets the metadata value for the provided metadata key on the target object.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getOwnMetadata("custom:annotation", Example);
*
*/
function getOwnMetadata(metadataKey: any, target: Object): any;
/**
* Gets the metadata value for the provided metadata key on the target object.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns The metadata value for the metadata key if found; otherwise, `undefined`.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method");
*
*/
function getOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any;
/**
* Gets the metadata keys defined on the target object or its prototype chain.
* @param target The target object on which the metadata is defined.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getMetadataKeys(Example);
*
*/
function getMetadataKeys(target: Object): any[];
/**
* Gets the metadata keys defined on the target object or its prototype chain.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getMetadataKeys(Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getMetadataKeys(Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getMetadataKeys(Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getMetadataKeys(Example.prototype, "method");
*
*/
function getMetadataKeys(target: Object, propertyKey: string | symbol): any[];
/**
* Gets the unique metadata keys defined on the target object.
* @param target The target object on which the metadata is defined.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.getOwnMetadataKeys(Example);
*
*/
function getOwnMetadataKeys(target: Object): any[];
/**
* Gets the unique metadata keys defined on the target object.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns An array of unique metadata keys.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.getOwnMetadataKeys(Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.getOwnMetadataKeys(Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.getOwnMetadataKeys(Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.getOwnMetadataKeys(Example.prototype, "method");
*
*/
function getOwnMetadataKeys(target: Object, propertyKey: string | symbol): any[];
/**
* Deletes the metadata entry from the target object with the provided key.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @returns `true` if the metadata entry was found and deleted; otherwise, false.
* @example
*
* class Example {
* }
*
* // constructor
* result = Reflect.deleteMetadata("custom:annotation", Example);
*
*/
function deleteMetadata(metadataKey: any, target: Object): boolean;
/**
* Deletes the metadata entry from the target object with the provided key.
* @param metadataKey A key used to store and retrieve metadata.
* @param target The target object on which the metadata is defined.
* @param propertyKey The property key for the target.
* @returns `true` if the metadata entry was found and deleted; otherwise, false.
* @example
*
* class Example {
* // property declarations are not part of ES6, though they are valid in TypeScript:
* // static staticProperty;
* // property;
*
* static staticMethod(p) { }
* method(p) { }
* }
*
* // property (on constructor)
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty");
*
* // property (on prototype)
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property");
*
* // method (on constructor)
* result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod");
*
* // method (on prototype)
* result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method");
*
*/
function deleteMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean;
}
@@ -0,0 +1,57 @@
# is-boolean-object <sup>[![Version Badge][2]][1]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][5]][6]
[![dev dependency status][7]][8]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][11]][1]
Is this value a JS Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
## Example
```js
var isBoolean = require('is-boolean-object');
var assert = require('assert');
assert.notOk(isBoolean(undefined));
assert.notOk(isBoolean(null));
assert.notOk(isBoolean('foo'));
assert.notOk(isBoolean(function () {}));
assert.notOk(isBoolean([]));
assert.notOk(isBoolean({}));
assert.notOk(isBoolean(/a/g));
assert.notOk(isBoolean(new RegExp('a', 'g')));
assert.notOk(isBoolean(new Date()));
assert.notOk(isBoolean(42));
assert.notOk(isBoolean(NaN));
assert.notOk(isBoolean(Infinity));
assert.ok(isBoolean(new Boolean(42)));
assert.ok(isBoolean(false));
assert.ok(isBoolean(Object(false)));
assert.ok(isBoolean(true));
assert.ok(isBoolean(Object(true)));
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[1]: https://npmjs.org/package/is-boolean-object
[2]: https://versionbadg.es/inspect-js/is-boolean-object.svg
[5]: https://david-dm.org/inspect-js/is-boolean-object.svg
[6]: https://david-dm.org/inspect-js/is-boolean-object
[7]: https://david-dm.org/inspect-js/is-boolean-object/dev-status.svg
[8]: https://david-dm.org/inspect-js/is-boolean-object#info=devDependencies
[11]: https://nodei.co/npm/is-boolean-object.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/is-boolean-object.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/is-boolean-object.svg
[downloads-url]: https://npm-stat.com/charts.html?package=is-boolean-object
[codecov-image]: https://codecov.io/gh/inspect-js/is-boolean-object/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/is-boolean-object/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-boolean-object
[actions-url]: https://github.com/inspect-js/is-boolean-object/actions
@@ -0,0 +1,34 @@
"use strict";
var OtherPrimeInfos_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OtherPrimeInfos = exports.OtherPrimeInfo = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
class OtherPrimeInfo {
constructor(params = {}) {
this.prime = new ArrayBuffer(0);
this.exponent = new ArrayBuffer(0);
this.coefficient = new ArrayBuffer(0);
Object.assign(this, params);
}
}
exports.OtherPrimeInfo = OtherPrimeInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, converter: asn1_schema_1.AsnIntegerArrayBufferConverter })
], OtherPrimeInfo.prototype, "prime", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, converter: asn1_schema_1.AsnIntegerArrayBufferConverter })
], OtherPrimeInfo.prototype, "exponent", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, converter: asn1_schema_1.AsnIntegerArrayBufferConverter })
], OtherPrimeInfo.prototype, "coefficient", void 0);
let OtherPrimeInfos = OtherPrimeInfos_1 = class OtherPrimeInfos extends asn1_schema_1.AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, OtherPrimeInfos_1.prototype);
}
};
exports.OtherPrimeInfos = OtherPrimeInfos;
exports.OtherPrimeInfos = OtherPrimeInfos = OtherPrimeInfos_1 = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Sequence, itemType: OtherPrimeInfo })
], OtherPrimeInfos);
@@ -0,0 +1,144 @@
'use strict'
/*
* merge2
* https://github.com/teambition/merge2
*
* Copyright (c) 2014-2020 Teambition
* Licensed under the MIT license.
*/
const Stream = require('stream')
const PassThrough = Stream.PassThrough
const slice = Array.prototype.slice
module.exports = merge2
function merge2 () {
const streamsQueue = []
const args = slice.call(arguments)
let merging = false
let options = args[args.length - 1]
if (options && !Array.isArray(options) && options.pipe == null) {
args.pop()
} else {
options = {}
}
const doEnd = options.end !== false
const doPipeError = options.pipeError === true
if (options.objectMode == null) {
options.objectMode = true
}
if (options.highWaterMark == null) {
options.highWaterMark = 64 * 1024
}
const mergedStream = PassThrough(options)
function addStream () {
for (let i = 0, len = arguments.length; i < len; i++) {
streamsQueue.push(pauseStreams(arguments[i], options))
}
mergeStream()
return this
}
function mergeStream () {
if (merging) {
return
}
merging = true
let streams = streamsQueue.shift()
if (!streams) {
process.nextTick(endStream)
return
}
if (!Array.isArray(streams)) {
streams = [streams]
}
let pipesCount = streams.length + 1
function next () {
if (--pipesCount > 0) {
return
}
merging = false
mergeStream()
}
function pipe (stream) {
function onend () {
stream.removeListener('merge2UnpipeEnd', onend)
stream.removeListener('end', onend)
if (doPipeError) {
stream.removeListener('error', onerror)
}
next()
}
function onerror (err) {
mergedStream.emit('error', err)
}
// skip ended stream
if (stream._readableState.endEmitted) {
return next()
}
stream.on('merge2UnpipeEnd', onend)
stream.on('end', onend)
if (doPipeError) {
stream.on('error', onerror)
}
stream.pipe(mergedStream, { end: false })
// compatible for old stream
stream.resume()
}
for (let i = 0; i < streams.length; i++) {
pipe(streams[i])
}
next()
}
function endStream () {
merging = false
// emit 'queueDrain' when all streams merged.
mergedStream.emit('queueDrain')
if (doEnd) {
mergedStream.end()
}
}
mergedStream.setMaxListeners(0)
mergedStream.add = addStream
mergedStream.on('unpipe', function (stream) {
stream.emit('merge2UnpipeEnd')
})
if (args.length) {
addStream.apply(null, args)
}
return mergedStream
}
// check and pause streams for pipe.
function pauseStreams (streams, options) {
if (!Array.isArray(streams)) {
// Backwards-compat with old-style streams
if (!streams._readableState && streams.pipe) {
streams = streams.pipe(PassThrough(options))
}
if (!streams._readableState || !streams.pause || !streams.pipe) {
throw new Error('Only readable stream can be merged.')
}
streams.pause()
} else {
for (let i = 0, len = streams.length; i < len; i++) {
streams[i] = pauseStreams(streams[i], options)
}
}
return streams
}
@@ -0,0 +1,26 @@
export { JsonValue, JsonObject, typeofJsonValue, isJsonObject } from './json-typings';
export { base64decode, base64encode } from './base64';
export { utf8read } from './protobufjs-utf8';
export { WireType, BinaryReadOptions, BinaryWriteOptions, mergeBinaryOptions, IBinaryWriter, IBinaryReader, UnknownFieldHandler, } from './binary-format-contract';
export { BinaryReader, binaryReadOptions } from './binary-reader';
export { BinaryWriter, binaryWriteOptions } from './binary-writer';
export { PbLong, PbULong } from './pb-long';
export { JsonReadOptions, JsonWriteOptions, JsonWriteStringOptions, jsonReadOptions, jsonWriteOptions, mergeJsonOptions } from './json-format-contract';
export { IMessageType, PartialMessage, MESSAGE_TYPE } from './message-type-contract';
export { MessageType } from './message-type';
export { ScalarType, LongType, RepeatType, MessageInfo, EnumInfo, FieldInfo, PartialFieldInfo, normalizeFieldInfo, readFieldOptions, readFieldOption, readMessageOption } from './reflection-info';
export { UnknownEnum, UnknownMap, UnknownMessage, UnknownOneofGroup, UnknownScalar } from './unknown-types';
export { ReflectionTypeCheck } from './reflection-type-check';
export { reflectionCreate } from './reflection-create';
export { reflectionScalarDefault } from './reflection-scalar-default';
export { reflectionMergePartial } from './reflection-merge-partial';
export { reflectionEquals } from './reflection-equals';
export { ReflectionBinaryReader } from './reflection-binary-reader';
export { ReflectionBinaryWriter } from './reflection-binary-writer';
export { ReflectionJsonReader } from './reflection-json-reader';
export { ReflectionJsonWriter } from './reflection-json-writer';
export { containsMessageType, MessageTypeContainer } from './reflection-contains-message-type';
export { isOneofGroup, setOneofValue, getOneofValue, clearOneofValue, getSelectedOneofValue } from './oneof';
export { EnumObjectValue, listEnumValues, listEnumNames, listEnumNumbers, isEnumObject } from './enum-object';
export { lowerCamelCase } from './lower-camel-case';
export { assert, assertNever, assertInt32, assertUInt32, assertFloat32 } from './assert';
@@ -0,0 +1,243 @@
import { Minimatch } from 'minimatch';
import { fileURLToPath } from 'node:url';
import { PathScurry, PathScurryDarwin, PathScurryPosix, PathScurryWin32, } from 'path-scurry';
import { Pattern } from './pattern.js';
import { GlobStream, GlobWalker } from './walker.js';
// if no process global, just call it linux.
// so we default to case-sensitive, / separators
const defaultPlatform = (typeof process === 'object' &&
process &&
typeof process.platform === 'string') ?
process.platform
: 'linux';
/**
* An object that can perform glob pattern traversals.
*/
export class Glob {
absolute;
cwd;
root;
dot;
dotRelative;
follow;
ignore;
magicalBraces;
mark;
matchBase;
maxDepth;
nobrace;
nocase;
nodir;
noext;
noglobstar;
pattern;
platform;
realpath;
scurry;
stat;
signal;
windowsPathsNoEscape;
withFileTypes;
includeChildMatches;
/**
* The options provided to the constructor.
*/
opts;
/**
* An array of parsed immutable {@link Pattern} objects.
*/
patterns;
/**
* All options are stored as properties on the `Glob` object.
*
* See {@link GlobOptions} for full options descriptions.
*
* Note that a previous `Glob` object can be passed as the
* `GlobOptions` to another `Glob` instantiation to re-use settings
* and caches with a new pattern.
*
* Traversal functions can be called multiple times to run the walk
* again.
*/
constructor(pattern, opts) {
/* c8 ignore start */
if (!opts)
throw new TypeError('glob options required');
/* c8 ignore stop */
this.withFileTypes = !!opts.withFileTypes;
this.signal = opts.signal;
this.follow = !!opts.follow;
this.dot = !!opts.dot;
this.dotRelative = !!opts.dotRelative;
this.nodir = !!opts.nodir;
this.mark = !!opts.mark;
if (!opts.cwd) {
this.cwd = '';
}
else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {
opts.cwd = fileURLToPath(opts.cwd);
}
this.cwd = opts.cwd || '';
this.root = opts.root;
this.magicalBraces = !!opts.magicalBraces;
this.nobrace = !!opts.nobrace;
this.noext = !!opts.noext;
this.realpath = !!opts.realpath;
this.absolute = opts.absolute;
this.includeChildMatches = opts.includeChildMatches !== false;
this.noglobstar = !!opts.noglobstar;
this.matchBase = !!opts.matchBase;
this.maxDepth =
typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity;
this.stat = !!opts.stat;
this.ignore = opts.ignore;
if (this.withFileTypes && this.absolute !== undefined) {
throw new Error('cannot set absolute and withFileTypes:true');
}
if (typeof pattern === 'string') {
pattern = [pattern];
}
this.windowsPathsNoEscape =
!!opts.windowsPathsNoEscape ||
opts.allowWindowsEscape ===
false;
if (this.windowsPathsNoEscape) {
pattern = pattern.map(p => p.replace(/\\/g, '/'));
}
if (this.matchBase) {
if (opts.noglobstar) {
throw new TypeError('base matching requires globstar');
}
pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`));
}
this.pattern = pattern;
this.platform = opts.platform || defaultPlatform;
this.opts = { ...opts, platform: this.platform };
if (opts.scurry) {
this.scurry = opts.scurry;
if (opts.nocase !== undefined &&
opts.nocase !== opts.scurry.nocase) {
throw new Error('nocase option contradicts provided scurry option');
}
}
else {
const Scurry = opts.platform === 'win32' ? PathScurryWin32
: opts.platform === 'darwin' ? PathScurryDarwin
: opts.platform ? PathScurryPosix
: PathScurry;
this.scurry = new Scurry(this.cwd, {
nocase: opts.nocase,
fs: opts.fs,
});
}
this.nocase = this.scurry.nocase;
// If you do nocase:true on a case-sensitive file system, then
// we need to use regexps instead of strings for non-magic
// path portions, because statting `aBc` won't return results
// for the file `AbC` for example.
const nocaseMagicOnly = this.platform === 'darwin' || this.platform === 'win32';
const mmo = {
// default nocase based on platform
...opts,
dot: this.dot,
matchBase: this.matchBase,
nobrace: this.nobrace,
nocase: this.nocase,
nocaseMagicOnly,
nocomment: true,
noext: this.noext,
nonegate: true,
optimizationLevel: 2,
platform: this.platform,
windowsPathsNoEscape: this.windowsPathsNoEscape,
debug: !!this.opts.debug,
};
const mms = this.pattern.map(p => new Minimatch(p, mmo));
const [matchSet, globParts] = mms.reduce((set, m) => {
set[0].push(...m.set);
set[1].push(...m.globParts);
return set;
}, [[], []]);
this.patterns = matchSet.map((set, i) => {
const g = globParts[i];
/* c8 ignore start */
if (!g)
throw new Error('invalid pattern object');
/* c8 ignore stop */
return new Pattern(set, g, 0, this.platform);
});
}
async walk() {
// Walkers always return array of Path objects, so we just have to
// coerce them into the right shape. It will have already called
// realpath() if the option was set to do so, so we know that's cached.
// start out knowing the cwd, at least
return [
...(await new GlobWalker(this.patterns, this.scurry.cwd, {
...this.opts,
maxDepth: this.maxDepth !== Infinity ?
this.maxDepth + this.scurry.cwd.depth()
: Infinity,
platform: this.platform,
nocase: this.nocase,
includeChildMatches: this.includeChildMatches,
}).walk()),
];
}
walkSync() {
return [
...new GlobWalker(this.patterns, this.scurry.cwd, {
...this.opts,
maxDepth: this.maxDepth !== Infinity ?
this.maxDepth + this.scurry.cwd.depth()
: Infinity,
platform: this.platform,
nocase: this.nocase,
includeChildMatches: this.includeChildMatches,
}).walkSync(),
];
}
stream() {
return new GlobStream(this.patterns, this.scurry.cwd, {
...this.opts,
maxDepth: this.maxDepth !== Infinity ?
this.maxDepth + this.scurry.cwd.depth()
: Infinity,
platform: this.platform,
nocase: this.nocase,
includeChildMatches: this.includeChildMatches,
}).stream();
}
streamSync() {
return new GlobStream(this.patterns, this.scurry.cwd, {
...this.opts,
maxDepth: this.maxDepth !== Infinity ?
this.maxDepth + this.scurry.cwd.depth()
: Infinity,
platform: this.platform,
nocase: this.nocase,
includeChildMatches: this.includeChildMatches,
}).streamSync();
}
/**
* Default sync iteration function. Returns a Generator that
* iterates over the results.
*/
iterateSync() {
return this.streamSync()[Symbol.iterator]();
}
[Symbol.iterator]() {
return this.iterateSync();
}
/**
* Default async iteration function. Returns an AsyncGenerator that
* iterates over the results.
*/
iterate() {
return this.stream()[Symbol.asyncIterator]();
}
[Symbol.asyncIterator]() {
return this.iterate();
}
}
//# sourceMappingURL=glob.js.map
@@ -0,0 +1,62 @@
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var Call = require('./Call');
var CompletionRecord = require('./CompletionRecord');
var GetMethod = require('./GetMethod');
var IsCallable = require('./IsCallable');
var isIteratorRecord = require('../helpers/records/iterator-record-2023');
// https://262.ecma-international.org/14.0/#sec-iteratorclose
module.exports = function IteratorClose(iteratorRecord, completion) {
if (!isIteratorRecord(iteratorRecord)) {
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
}
if (!isObject(iteratorRecord['[[Iterator]]'])) {
throw new $TypeError('Assertion failed: iteratorRecord.[[Iterator]] must be an Object'); // step 1
}
if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { // step 2
throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance');
}
var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion;
var iterator = iteratorRecord['[[Iterator]]']; // step 3
var iteratorReturn;
try {
iteratorReturn = GetMethod(iterator, 'return'); // step 4
} catch (e) {
completionThunk(); // throws if `completion` is a throw completion // step 6
completionThunk = null; // ensure it's not called twice.
throw e; // step 7
}
if (typeof iteratorReturn === 'undefined') {
return completionThunk(); // step 5.a - 5.b
}
var innerResult;
try {
innerResult = Call(iteratorReturn, iterator, []);
} catch (e) {
// if we hit here, then "e" is the innerResult completion that needs re-throwing
completionThunk(); // throws if `completion` is a throw completion // step 6
completionThunk = null; // ensure it's not called twice.
// if not, then return the innerResult completion
throw e; // step 7
}
var completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does
completionThunk = null; // ensure it's not called twice.
if (!isObject(innerResult)) {
throw new $TypeError('iterator .return must return an object');
}
return completionRecord;
};
@@ -0,0 +1,24 @@
import { Line } from '../primitives.js';
/**
* Groups source lines in sections representing tags.
* First section is a block description if present. Last section captures lines starting with
* the last tag to the end of the block, including dangling closing marker.
* @param {Line[]} block souce lines making a single comment block
*/
export type Parser = (block: Line[]) => Line[][];
/**
* Predicate telling if string contains opening/closing escaping sequence
* @param {string} source raw source line
*/
export type Fencer = (source: string) => boolean;
/**
* `Parser` configuration options
*/
export interface Options {
fence: string | Fencer;
}
/**
* Creates configured `Parser`
* @param {Partial<Options>} options
*/
export default function getParser({ fence, }?: Partial<Options>): Parser;
@@ -0,0 +1,53 @@
import utils from './../utils.js';
import platform from '../platform/index.js';
export default platform.hasStandardBrowserEnv ?
// Standard browser envs support document.cookie
{
write(name, value, expires, path, domain, secure, sameSite) {
if (typeof document === 'undefined') return;
const cookie = [`${name}=${encodeURIComponent(value)}`];
if (utils.isNumber(expires)) {
cookie.push(`expires=${new Date(expires).toUTCString()}`);
}
if (utils.isString(path)) {
cookie.push(`path=${path}`);
}
if (utils.isString(domain)) {
cookie.push(`domain=${domain}`);
}
if (secure === true) {
cookie.push('secure');
}
if (utils.isString(sameSite)) {
cookie.push(`SameSite=${sameSite}`);
}
document.cookie = cookie.join('; ');
},
read(name) {
if (typeof document === 'undefined') return null;
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
return match ? decodeURIComponent(match[1]) : null;
},
remove(name) {
this.write(name, '', Date.now() - 86400000, '/');
}
}
:
// Non-standard browser env (web workers, react-native) lack needed support.
{
write() {},
read() {
return null;
},
remove() {}
};
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,sEAAU,CAAC;AAC3C","sources":["packages/@react-aria/overlays/intl/ru-RU.json"],"sourcesContent":["{\n \"dismiss\": \"Пропустить\"\n}\n"],"names":[],"version":3,"file":"ru-RU.module.js.map"}
@@ -0,0 +1,62 @@
{{# def.definitions }}
{{# def.errors }}
{{# def.setupKeyword }}
{{# def.$data }}
{{? ($schema || $isData) && it.opts.uniqueItems !== false }}
{{? $isData }}
var {{=$valid}};
if ({{=$schemaValue}} === false || {{=$schemaValue}} === undefined)
{{=$valid}} = true;
else if (typeof {{=$schemaValue}} != 'boolean')
{{=$valid}} = false;
else {
{{?}}
var i = {{=$data}}.length
, {{=$valid}} = true
, j;
if (i > 1) {
{{
var $itemType = it.schema.items && it.schema.items.type
, $typeIsArray = Array.isArray($itemType);
}}
{{? !$itemType || $itemType == 'object' || $itemType == 'array' ||
($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0)) }}
outer:
for (;i--;) {
for (j = i; j--;) {
if (equal({{=$data}}[i], {{=$data}}[j])) {
{{=$valid}} = false;
break outer;
}
}
}
{{??}}
var itemIndices = {}, item;
for (;i--;) {
var item = {{=$data}}[i];
{{ var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); }}
if ({{= it.util[$method]($itemType, 'item', it.opts.strictNumbers, true) }}) continue;
{{? $typeIsArray}}
if (typeof item == 'string') item = '"' + item;
{{?}}
if (typeof itemIndices[item] == 'number') {
{{=$valid}} = false;
j = itemIndices[item];
break;
}
itemIndices[item] = i;
}
{{?}}
}
{{? $isData }} } {{?}}
if (!{{=$valid}}) {
{{# def.error:'uniqueItems' }}
} {{? $breakOnError }} else { {{?}}
{{??}}
{{? $breakOnError }} if (true) { {{?}}
{{?}}
@@ -0,0 +1,845 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
Listbox: () => listbox_default,
ListboxItem: () => listbox_item_base_default,
ListboxSection: () => listbox_section_base_default,
useListbox: () => useListbox
});
module.exports = __toCommonJS(src_exports);
// src/listbox.tsx
var import_system5 = require("@heroui/system");
var import_utils4 = require("@react-aria/utils");
// src/use-listbox.ts
var import_listbox = require("@react-aria/listbox");
var import_system = require("@heroui/system");
var import_theme = require("@heroui/theme");
var import_list = require("@react-stately/list");
var import_react_utils = require("@heroui/react-utils");
var import_react = require("react");
var import_shared_utils = require("@heroui/shared-utils");
function useListbox(props) {
var _a;
const globalContext = (0, import_system.useProviderContext)();
const {
ref,
as,
state: propState,
variant,
color,
onAction,
children,
onSelectionChange,
disableAnimation = (_a = globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _a : false,
itemClasses,
className,
topContent,
bottomContent,
emptyContent = "No items.",
hideSelectedIcon = false,
hideEmptyContent = false,
shouldHighlightOnFocus = false,
classNames,
...otherProps
} = props;
const Component = as || "ul";
const shouldFilterDOMProps = typeof Component === "string";
const domRef = (0, import_react_utils.useDOMRef)(ref);
const innerState = (0, import_list.useListState)({ ...props, children, onSelectionChange });
const state = propState || innerState;
const { listBoxProps } = (0, import_listbox.useListBox)({ ...props, onAction }, state, domRef);
const slots = (0, import_react.useMemo)(() => (0, import_theme.listbox)({ className }), [className]);
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className);
const getBaseProps = (props2 = {}) => {
return {
ref: domRef,
"data-slot": "base",
className: slots.base({ class: baseStyles }),
...(0, import_react_utils.filterDOMProps)(otherProps, {
enabled: shouldFilterDOMProps
}),
...props2
};
};
const getListProps = (props2 = {}) => {
return {
"data-slot": "list",
className: slots.list({ class: classNames == null ? void 0 : classNames.list }),
...listBoxProps,
...props2
};
};
const getEmptyContentProps = (props2 = {}) => {
return {
"data-slot": "empty-content",
children: emptyContent,
className: slots.emptyContent({ class: classNames == null ? void 0 : classNames.emptyContent }),
...props2
};
};
return {
Component,
state,
variant,
color,
slots,
classNames,
topContent,
bottomContent,
emptyContent,
hideEmptyContent,
shouldHighlightOnFocus,
hideSelectedIcon,
disableAnimation,
className,
itemClasses,
getBaseProps,
getListProps,
getEmptyContentProps
};
}
// src/listbox-section.tsx
var import_theme3 = require("@heroui/theme");
var import_react4 = require("react");
var import_system3 = require("@heroui/system");
var import_utils2 = require("@react-aria/utils");
var import_shared_utils3 = require("@heroui/shared-utils");
var import_divider = require("@heroui/divider");
var import_listbox3 = require("@react-aria/listbox");
// src/listbox-item.tsx
var import_react3 = require("react");
// src/use-listbox-item.ts
var import_react2 = require("react");
var import_theme2 = require("@heroui/theme");
var import_system2 = require("@heroui/system");
var import_focus = require("@react-aria/focus");
var import_react_utils2 = require("@heroui/react-utils");
var import_shared_utils2 = require("@heroui/shared-utils");
var import_listbox2 = require("@react-aria/listbox");
var import_utils = require("@react-aria/utils");
var import_interactions = require("@react-aria/interactions");
var import_use_is_mobile = require("@heroui/use-is-mobile");
function useListboxItem(originalProps) {
var _a, _b;
const globalContext = (0, import_system2.useProviderContext)();
const [props, variantProps] = (0, import_system2.mapPropsVariants)(originalProps, import_theme2.listboxItem.variantKeys);
const {
as,
item,
state,
description,
startContent,
endContent,
isVirtualized,
selectedIcon,
className,
classNames,
autoFocus,
onPress,
onClick: deprecatedOnClick,
shouldHighlightOnFocus,
hideSelectedIcon = false,
isReadOnly = false,
...otherProps
} = props;
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const domRef = (0, import_react2.useRef)(null);
const Component = as || (originalProps.href ? "a" : "li");
const shouldFilterDOMProps = typeof Component === "string";
const { rendered, key } = item;
const isDisabled = state.disabledKeys.has(key) || originalProps.isDisabled;
const isSelectable = state.selectionManager.selectionMode !== "none";
const isMobile = (0, import_use_is_mobile.useIsMobile)();
if (deprecatedOnClick && typeof deprecatedOnClick === "function") {
(0, import_shared_utils2.warn)(
"onClick is deprecated, please use onPress instead. See: https://github.com/heroui-inc/heroui/issues/4292",
"ListboxItem"
);
}
const { pressProps, isPressed } = (0, import_interactions.usePress)({
ref: domRef,
isDisabled,
onPress
});
const { isHovered, hoverProps } = (0, import_interactions.useHover)({
isDisabled
});
const { isFocusVisible, focusProps } = (0, import_focus.useFocusRing)({
autoFocus
});
const { isFocused, isSelected, optionProps, labelProps, descriptionProps } = (0, import_listbox2.useOption)(
{
key,
isDisabled,
"aria-label": props["aria-label"],
isVirtualized
},
state,
domRef
);
let itemProps = optionProps;
const slots = (0, import_react2.useMemo)(
() => (0, import_theme2.listboxItem)({
...variantProps,
isDisabled,
disableAnimation,
hasTitleTextChild: typeof rendered === "string",
hasDescriptionTextChild: typeof description === "string"
}),
[(0, import_shared_utils2.objectToDeps)(variantProps), isDisabled, disableAnimation, rendered, description]
);
const baseStyles = (0, import_shared_utils2.clsx)(classNames == null ? void 0 : classNames.base, className);
if (isReadOnly) {
itemProps = (0, import_shared_utils2.removeEvents)(itemProps);
}
const isHighlighted = shouldHighlightOnFocus && isFocused || (isMobile ? isHovered || isPressed : isHovered || isFocused && !isFocusVisible);
const getItemProps = (props2 = {}) => ({
ref: domRef,
...(0, import_utils.mergeProps)(
{
onClick: deprecatedOnClick
},
itemProps,
isReadOnly ? {} : (0, import_utils.mergeProps)(focusProps, pressProps),
hoverProps,
(0, import_react_utils2.filterDOMProps)(otherProps, {
enabled: shouldFilterDOMProps
}),
props2
),
"data-selectable": (0, import_shared_utils2.dataAttr)(isSelectable),
"data-focus": (0, import_shared_utils2.dataAttr)(isFocused),
"data-hover": (0, import_shared_utils2.dataAttr)(isHighlighted),
"data-disabled": (0, import_shared_utils2.dataAttr)(isDisabled),
"data-selected": (0, import_shared_utils2.dataAttr)(isSelected),
"data-pressed": (0, import_shared_utils2.dataAttr)(isPressed),
"data-focus-visible": (0, import_shared_utils2.dataAttr)(isFocusVisible),
className: slots.base({ class: (0, import_shared_utils2.clsx)(baseStyles, props2.className) })
});
const getLabelProps = (props2 = {}) => ({
...(0, import_utils.mergeProps)(labelProps, props2),
"data-label": (0, import_shared_utils2.dataAttr)(true),
className: slots.title({ class: classNames == null ? void 0 : classNames.title })
});
const getDescriptionProps = (props2 = {}) => ({
...(0, import_utils.mergeProps)(descriptionProps, props2),
className: slots.description({ class: classNames == null ? void 0 : classNames.description })
});
const getWrapperProps = (props2 = {}) => ({
...(0, import_utils.mergeProps)(props2),
className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper })
});
const getSelectedIconProps = (0, import_react2.useCallback)(
(props2 = {}) => {
return {
"aria-hidden": (0, import_shared_utils2.dataAttr)(true),
"data-disabled": (0, import_shared_utils2.dataAttr)(isDisabled),
className: slots.selectedIcon({ class: classNames == null ? void 0 : classNames.selectedIcon }),
...props2
};
},
[isDisabled, slots, classNames]
);
return {
Component,
domRef,
slots,
classNames,
isSelectable,
isSelected,
isDisabled,
rendered,
description,
startContent,
endContent,
selectedIcon,
hideSelectedIcon,
disableAnimation,
getItemProps,
getLabelProps,
getWrapperProps,
getDescriptionProps,
getSelectedIconProps
};
}
// src/listbox-selected-icon.tsx
var import_jsx_runtime = require("react/jsx-runtime");
function ListboxSelectedIcon(props) {
const { isSelected, disableAnimation, ...otherProps } = props;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"svg",
{
"aria-hidden": "true",
"data-selected": isSelected,
role: "presentation",
viewBox: "0 0 17 18",
...otherProps,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"polyline",
{
fill: "none",
points: "1 9 7 14 15 4",
stroke: "currentColor",
strokeDasharray: 22,
strokeDashoffset: isSelected ? 44 : 66,
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5,
style: !disableAnimation ? {
transition: "stroke-dashoffset 200ms ease"
} : {}
}
)
}
);
}
// src/listbox-item.tsx
var import_jsx_runtime2 = require("react/jsx-runtime");
var ListboxItem = (props) => {
const {
Component,
rendered,
description,
isSelectable,
isSelected,
isDisabled,
selectedIcon,
startContent,
endContent,
hideSelectedIcon,
disableAnimation,
getItemProps,
getLabelProps,
getWrapperProps,
getDescriptionProps,
getSelectedIconProps
} = useListboxItem(props);
const selectedContent = (0, import_react3.useMemo)(() => {
const defaultIcon = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ListboxSelectedIcon, { disableAnimation, isSelected });
if (typeof selectedIcon === "function") {
return selectedIcon({ icon: defaultIcon, isSelected, isDisabled });
}
if (selectedIcon)
return selectedIcon;
return defaultIcon;
}, [selectedIcon, isSelected, isDisabled, disableAnimation]);
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Component, { ...getItemProps(), children: [
startContent,
description ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { ...getWrapperProps(), children: [
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getLabelProps(), children: rendered }),
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getDescriptionProps(), children: description })
] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getLabelProps(), children: rendered }),
isSelectable && !hideSelectedIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getSelectedIconProps(), children: selectedContent }),
endContent
] });
};
ListboxItem.displayName = "HeroUI.ListboxItem";
var listbox_item_default = ListboxItem;
// src/listbox-section.tsx
var import_jsx_runtime3 = require("react/jsx-runtime");
var ListboxSection = (0, import_system3.forwardRef)(
({
item,
state,
as,
variant,
color,
disableAnimation,
className,
classNames,
hideSelectedIcon,
showDivider = false,
dividerProps = {},
itemClasses,
title,
items,
...otherProps
}, _) => {
const Component = as || "li";
const slots = (0, import_react4.useMemo)(() => (0, import_theme3.listboxSection)(), []);
const baseStyles = (0, import_shared_utils3.clsx)(classNames == null ? void 0 : classNames.base, className);
const dividerStyles = (0, import_shared_utils3.clsx)(classNames == null ? void 0 : classNames.divider, dividerProps == null ? void 0 : dividerProps.className);
const { itemProps, headingProps, groupProps } = (0, import_listbox3.useListBoxSection)({
heading: item.rendered,
"aria-label": item["aria-label"]
});
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
Component,
{
"data-slot": "base",
...(0, import_utils2.mergeProps)(itemProps, otherProps),
className: slots.base({ class: baseStyles }),
children: [
item.rendered && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"span",
{
...headingProps,
className: slots.heading({ class: classNames == null ? void 0 : classNames.heading }),
"data-slot": "heading",
children: item.rendered
}
),
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
"ul",
{
...groupProps,
className: slots.group({ class: classNames == null ? void 0 : classNames.group }),
"data-has-title": !!item.rendered,
"data-slot": "group",
children: [
[...item.childNodes].map((node) => {
const { key: nodeKey, props: nodeProps } = node;
let listboxItem2 = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
listbox_item_default,
{
classNames: itemClasses,
color,
disableAnimation,
hideSelectedIcon,
item: node,
state,
variant,
...nodeProps
},
nodeKey
);
if (node.wrapper) {
listboxItem2 = node.wrapper(listboxItem2);
}
return listboxItem2;
}),
showDivider && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
import_divider.Divider,
{
as: "li",
className: slots.divider({
class: dividerStyles
}),
...dividerProps
}
)
]
}
)
]
},
item.key
);
}
);
ListboxSection.displayName = "HeroUI.ListboxSection";
var listbox_section_default = ListboxSection;
// src/virtualized-listbox.tsx
var import_react7 = require("react");
var import_utils3 = require("@react-aria/utils");
var import_react_virtual = require("@tanstack/react-virtual");
var import_shared_utils6 = require("@heroui/shared-utils");
// ../scroll-shadow/src/use-scroll-shadow.ts
var import_system4 = require("@heroui/system");
var import_theme4 = require("@heroui/theme");
var import_react_utils3 = require("@heroui/react-utils");
// ../../hooks/use-data-scroll-overflow/src/index.ts
var import_shared_utils4 = require("@heroui/shared-utils");
var import_react5 = require("react");
function useDataScrollOverflow(props = {}) {
const {
domRef,
isEnabled = true,
overflowCheck = "vertical",
visibility = "auto",
offset = 0,
onVisibilityChange,
updateDeps = []
} = props;
const visibleRef = (0, import_react5.useRef)(visibility);
(0, import_react5.useEffect)(() => {
const el = domRef == null ? void 0 : domRef.current;
if (!el || !isEnabled)
return;
const setAttributes = (direction, hasBefore, hasAfter, prefix, suffix) => {
if (visibility === "auto") {
const both = `${prefix}${(0, import_shared_utils4.capitalize)(suffix)}Scroll`;
if (hasBefore && hasAfter) {
el.dataset[both] = "true";
el.removeAttribute(`data-${prefix}-scroll`);
el.removeAttribute(`data-${suffix}-scroll`);
} else {
el.dataset[`${prefix}Scroll`] = hasBefore.toString();
el.dataset[`${suffix}Scroll`] = hasAfter.toString();
el.removeAttribute(`data-${prefix}-${suffix}-scroll`);
}
} else {
const next = hasBefore && hasAfter ? "both" : hasBefore ? prefix : hasAfter ? suffix : "none";
if (next !== visibleRef.current) {
onVisibilityChange == null ? void 0 : onVisibilityChange(next);
visibleRef.current = next;
}
}
};
const checkOverflow = () => {
const directions = [
{ type: "vertical", prefix: "top", suffix: "bottom" },
{ type: "horizontal", prefix: "left", suffix: "right" }
];
for (const { type, prefix, suffix } of directions) {
if (overflowCheck === type || overflowCheck === "both") {
const hasBefore = type === "vertical" ? el.scrollTop > offset : el.scrollLeft > offset;
const hasAfter = type === "vertical" ? el.scrollTop + el.clientHeight + offset < el.scrollHeight : el.scrollLeft + el.clientWidth + offset < el.scrollWidth;
setAttributes(type, hasBefore, hasAfter, prefix, suffix);
}
}
};
const clearOverflow = () => {
["top", "bottom", "top-bottom", "left", "right", "left-right"].forEach((attr) => {
el.removeAttribute(`data-${attr}-scroll`);
});
};
checkOverflow();
el.addEventListener("scroll", checkOverflow);
if (visibility !== "auto") {
clearOverflow();
if (visibility === "both") {
el.dataset.topBottomScroll = String(overflowCheck === "vertical");
el.dataset.leftRightScroll = String(overflowCheck === "horizontal");
} else {
el.dataset.topBottomScroll = "false";
el.dataset.leftRightScroll = "false";
["top", "bottom", "left", "right"].forEach((attr) => {
el.dataset[`${attr}Scroll`] = String(visibility === attr);
});
}
}
return () => {
el.removeEventListener("scroll", checkOverflow);
clearOverflow();
};
}, [...updateDeps, isEnabled, visibility, overflowCheck, onVisibilityChange, domRef]);
}
// ../scroll-shadow/src/use-scroll-shadow.ts
var import_react6 = require("react");
var import_shared_utils5 = require("@heroui/shared-utils");
function useScrollShadow(originalProps) {
var _a;
const [props, variantProps] = (0, import_system4.mapPropsVariants)(originalProps, import_theme4.scrollShadow.variantKeys);
const {
ref,
as,
children,
className,
style,
size = 40,
offset = 0,
visibility = "auto",
isEnabled = true,
onVisibilityChange,
...otherProps
} = props;
const Component = as || "div";
const domRef = (0, import_react_utils3.useDOMRef)(ref);
useDataScrollOverflow({
domRef,
offset,
visibility,
isEnabled,
onVisibilityChange,
updateDeps: [children],
overflowCheck: (_a = originalProps.orientation) != null ? _a : "vertical"
});
const styles = (0, import_react6.useMemo)(
() => (0, import_theme4.scrollShadow)({
...variantProps,
className
}),
[(0, import_shared_utils5.objectToDeps)(variantProps), className]
);
const getBaseProps = (props2 = {}) => {
var _a2;
return {
ref: domRef,
className: styles,
"data-orientation": (_a2 = originalProps.orientation) != null ? _a2 : "vertical",
style: {
"--scroll-shadow-size": `${size}px`,
...style,
...props2.style
},
...otherProps,
...props2
};
};
return { Component, styles, domRef, children, getBaseProps };
}
// src/virtualized-listbox.tsx
var import_react_utils4 = require("@heroui/react-utils");
var import_jsx_runtime4 = require("react/jsx-runtime");
var getItemSizesForCollection = (collection, itemHeight) => {
const sizes = [];
for (const item of collection) {
if (item.type === "section") {
sizes.push(([...item.childNodes].length + 1) * itemHeight);
} else {
sizes.push(itemHeight);
}
}
return sizes;
};
var getScrollState = (element) => {
if (!element || element.scrollTop === void 0 || element.clientHeight === void 0 || element.scrollHeight === void 0) {
return {
isTop: false,
isBottom: false,
isMiddle: false
};
}
const isAtTop = element.scrollTop === 0;
const isAtBottom = Math.ceil(element.scrollTop + element.clientHeight) >= element.scrollHeight;
const isInMiddle = !isAtTop && !isAtBottom;
return {
isTop: isAtTop,
isBottom: isAtBottom,
isMiddle: isInMiddle
};
};
var VirtualizedListbox = (props) => {
const {
Component,
state,
color,
variant,
itemClasses,
getBaseProps,
topContent,
bottomContent,
hideEmptyContent,
hideSelectedIcon,
shouldHighlightOnFocus,
disableAnimation,
getEmptyContentProps,
getListProps,
scrollShadowProps
} = props;
const { virtualization } = props;
if (!virtualization || !(0, import_shared_utils6.isEmpty)(virtualization) && !virtualization.maxListboxHeight && !virtualization.itemHeight) {
throw new Error(
"You are using a virtualized listbox. VirtualizedListbox requires 'virtualization' props with 'maxListboxHeight' and 'itemHeight' properties. This error might have originated from autocomplete components that use VirtualizedListbox. Please provide these props to use the virtualized listbox."
);
}
const { maxListboxHeight, itemHeight } = virtualization;
const listHeight = Math.min(maxListboxHeight, itemHeight * state.collection.size);
const parentRef = (0, import_react7.useRef)(null);
const itemSizes = (0, import_react7.useMemo)(
() => getItemSizesForCollection([...state.collection], itemHeight),
[state.collection, itemHeight]
);
const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
count: [...state.collection].length,
getScrollElement: () => parentRef.current,
estimateSize: (i) => itemSizes[i]
});
const virtualItems = rowVirtualizer.getVirtualItems();
const { getBaseProps: getBasePropsScrollShadow } = useScrollShadow({ ...scrollShadowProps });
const renderRow = (virtualItem) => {
var _a;
const item = [...state.collection][virtualItem.index];
if (!item) {
return null;
}
const itemProps = {
color,
item,
state,
variant,
disableAnimation,
hideSelectedIcon,
...item.props
};
const virtualizerStyle = {
position: "absolute",
top: 0,
left: 0,
width: "100%",
height: `${virtualItem.size}px`,
transform: `translateY(${virtualItem.start}px)`
};
if (item.type === "section") {
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
listbox_section_default,
{
...itemProps,
itemClasses,
style: { ...virtualizerStyle, ...itemProps.style }
},
item.key
);
}
let listboxItem2 = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
listbox_item_default,
{
...itemProps,
classNames: (0, import_utils3.mergeProps)(itemClasses, (_a = item.props) == null ? void 0 : _a.classNames),
shouldHighlightOnFocus,
style: { ...virtualizerStyle, ...itemProps.style }
},
item.key
);
if (item.wrapper) {
listboxItem2 = item.wrapper(listboxItem2);
}
return listboxItem2;
};
const [scrollState, setScrollState] = (0, import_react7.useState)({
isTop: false,
isBottom: true,
isMiddle: false
});
const content = /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Component, { ...getListProps(), children: [
!state.collection.size && !hideEmptyContent && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { ...getEmptyContentProps() }) }),
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
"div",
{
...(0, import_react_utils4.filterDOMProps)(getBasePropsScrollShadow()),
ref: parentRef,
"data-bottom-scroll": scrollState.isTop,
"data-top-bottom-scroll": scrollState.isMiddle,
"data-top-scroll": scrollState.isBottom,
style: {
height: maxListboxHeight,
overflow: "auto"
},
onScroll: (e) => {
setScrollState(getScrollState(e.target));
},
children: listHeight > 0 && itemHeight > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
"div",
{
style: {
height: `${rowVirtualizer.getTotalSize()}px`,
width: "100%",
position: "relative"
},
children: virtualItems.map((virtualItem) => renderRow(virtualItem))
}
)
}
)
] });
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { ...getBaseProps(), children: [
topContent,
content,
bottomContent
] });
};
var virtualized_listbox_default = VirtualizedListbox;
// src/listbox.tsx
var import_jsx_runtime5 = require("react/jsx-runtime");
var Listbox = (0, import_system5.forwardRef)(function Listbox2(props, ref) {
const { isVirtualized, ...restProps } = props;
const useListboxProps = useListbox({ ...restProps, ref });
const {
Component,
state,
color,
variant,
itemClasses,
getBaseProps,
topContent,
bottomContent,
hideEmptyContent,
hideSelectedIcon,
shouldHighlightOnFocus,
disableAnimation,
getEmptyContentProps,
getListProps
} = useListboxProps;
if (isVirtualized) {
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(virtualized_listbox_default, { ...props, ...useListboxProps });
}
const content = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Component, { ...getListProps(), children: [
!state.collection.size && !hideEmptyContent && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ...getEmptyContentProps() }) }),
[...state.collection].map((item) => {
var _a;
const itemProps = {
color,
item,
state,
variant,
disableAnimation,
hideSelectedIcon,
...item.props
};
if (item.type === "section") {
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(listbox_section_default, { ...itemProps, itemClasses }, item.key);
}
let listboxItem2 = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
listbox_item_default,
{
...itemProps,
classNames: (0, import_utils4.mergeProps)(itemClasses, (_a = item.props) == null ? void 0 : _a.classNames),
shouldHighlightOnFocus
},
item.key
);
if (item.wrapper) {
listboxItem2 = item.wrapper(listboxItem2);
}
return listboxItem2;
})
] });
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { ...getBaseProps(), children: [
topContent,
content,
bottomContent
] });
});
var listbox_default = Listbox;
// src/base/listbox-item-base.tsx
var import_aria_utils = require("@heroui/aria-utils");
var ListboxItemBase = import_aria_utils.BaseItem;
var listbox_item_base_default = ListboxItemBase;
// src/base/listbox-section-base.tsx
var import_aria_utils2 = require("@heroui/aria-utils");
var ListboxSectionBase = import_aria_utils2.BaseSection;
var listbox_section_base_default = ListboxSectionBase;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Listbox,
ListboxItem,
ListboxSection,
useListbox
});
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more