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,37 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const Hook = require("./Hook");
const HookCodeFactory = require("./HookCodeFactory");
class AsyncSeriesLoopHookCodeFactory extends HookCodeFactory {
content({ onError, onDone }) {
return this.callTapsLooping({
onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true),
onDone
});
}
}
const factory = new AsyncSeriesLoopHookCodeFactory();
function COMPILE(options) {
factory.setup(this, options);
return factory.create(options);
}
function AsyncSeriesLoopHook(args = [], name = undefined) {
const hook = new Hook(args, name);
hook.constructor = AsyncSeriesLoopHook;
hook.compile = COMPILE;
hook._call = undefined;
hook.call = undefined;
return hook;
}
AsyncSeriesLoopHook.prototype = null;
module.exports = AsyncSeriesLoopHook;
@@ -0,0 +1,202 @@
var $kFCAu$react = require("react");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "VALID_VALIDITY_STATE", () => $5d10129a174740d4$export$aca958c65c314e6c);
$parcel$export(module.exports, "DEFAULT_VALIDATION_RESULT", () => $5d10129a174740d4$export$dad6ae84456c676a);
$parcel$export(module.exports, "FormValidationContext", () => $5d10129a174740d4$export$571b5131b7e65c11);
$parcel$export(module.exports, "privateValidationStateProp", () => $5d10129a174740d4$export$a763b9476acd3eb);
$parcel$export(module.exports, "useFormValidationState", () => $5d10129a174740d4$export$fc1a364ae1f3ff10);
$parcel$export(module.exports, "mergeValidation", () => $5d10129a174740d4$export$75ee7c75d68f5b0e);
/*
* Copyright 2023 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 $5d10129a174740d4$export$aca958c65c314e6c = {
badInput: false,
customError: false,
patternMismatch: false,
rangeOverflow: false,
rangeUnderflow: false,
stepMismatch: false,
tooLong: false,
tooShort: false,
typeMismatch: false,
valueMissing: false,
valid: true
};
const $5d10129a174740d4$var$CUSTOM_VALIDITY_STATE = {
...$5d10129a174740d4$export$aca958c65c314e6c,
customError: true,
valid: false
};
const $5d10129a174740d4$export$dad6ae84456c676a = {
isInvalid: false,
validationDetails: $5d10129a174740d4$export$aca958c65c314e6c,
validationErrors: []
};
const $5d10129a174740d4$export$571b5131b7e65c11 = (0, $kFCAu$react.createContext)({});
const $5d10129a174740d4$export$a763b9476acd3eb = '__formValidationState' + Date.now();
function $5d10129a174740d4$export$fc1a364ae1f3ff10(props) {
// Private prop for parent components to pass state to children.
if (props[$5d10129a174740d4$export$a763b9476acd3eb]) {
let { realtimeValidation: realtimeValidation, displayValidation: displayValidation, updateValidation: updateValidation, resetValidation: resetValidation, commitValidation: commitValidation } = props[$5d10129a174740d4$export$a763b9476acd3eb];
return {
realtimeValidation: realtimeValidation,
displayValidation: displayValidation,
updateValidation: updateValidation,
resetValidation: resetValidation,
commitValidation: commitValidation
};
}
// eslint-disable-next-line react-hooks/rules-of-hooks
return $5d10129a174740d4$var$useFormValidationStateImpl(props);
}
function $5d10129a174740d4$var$useFormValidationStateImpl(props) {
let { isInvalid: isInvalid, validationState: validationState, name: name, value: value, builtinValidation: builtinValidation, validate: validate, validationBehavior: validationBehavior = 'aria' } = props;
// backward compatibility.
if (validationState) isInvalid || (isInvalid = validationState === 'invalid');
// If the isInvalid prop is controlled, update validation result in realtime.
let controlledError = isInvalid !== undefined ? {
isInvalid: isInvalid,
validationErrors: [],
validationDetails: $5d10129a174740d4$var$CUSTOM_VALIDITY_STATE
} : null;
// Perform custom client side validation.
let clientError = (0, $kFCAu$react.useMemo)(()=>{
if (!validate || value == null) return null;
let validateErrors = $5d10129a174740d4$var$runValidate(validate, value);
return $5d10129a174740d4$var$getValidationResult(validateErrors);
}, [
validate,
value
]);
if (builtinValidation === null || builtinValidation === void 0 ? void 0 : builtinValidation.validationDetails.valid) builtinValidation = undefined;
// Get relevant server errors from the form.
let serverErrors = (0, $kFCAu$react.useContext)($5d10129a174740d4$export$571b5131b7e65c11);
let serverErrorMessages = (0, $kFCAu$react.useMemo)(()=>{
if (name) return Array.isArray(name) ? name.flatMap((name)=>$5d10129a174740d4$var$asArray(serverErrors[name])) : $5d10129a174740d4$var$asArray(serverErrors[name]);
return [];
}, [
serverErrors,
name
]);
// Show server errors when the form gets a new value, and clear when the user changes the value.
let [lastServerErrors, setLastServerErrors] = (0, $kFCAu$react.useState)(serverErrors);
let [isServerErrorCleared, setServerErrorCleared] = (0, $kFCAu$react.useState)(false);
if (serverErrors !== lastServerErrors) {
setLastServerErrors(serverErrors);
setServerErrorCleared(false);
}
let serverError = (0, $kFCAu$react.useMemo)(()=>$5d10129a174740d4$var$getValidationResult(isServerErrorCleared ? [] : serverErrorMessages), [
isServerErrorCleared,
serverErrorMessages
]);
// Track the next validation state in a ref until commitValidation is called.
let nextValidation = (0, $kFCAu$react.useRef)($5d10129a174740d4$export$dad6ae84456c676a);
let [currentValidity, setCurrentValidity] = (0, $kFCAu$react.useState)($5d10129a174740d4$export$dad6ae84456c676a);
let lastError = (0, $kFCAu$react.useRef)($5d10129a174740d4$export$dad6ae84456c676a);
let commitValidation = ()=>{
if (!commitQueued) return;
setCommitQueued(false);
let error = clientError || builtinValidation || nextValidation.current;
if (!$5d10129a174740d4$var$isEqualValidation(error, lastError.current)) {
lastError.current = error;
setCurrentValidity(error);
}
};
let [commitQueued, setCommitQueued] = (0, $kFCAu$react.useState)(false);
(0, $kFCAu$react.useEffect)(commitValidation);
// realtimeValidation is used to update the native input element's state based on custom validation logic.
// displayValidation is the currently displayed validation state that the user sees (e.g. on input change/form submit).
// With validationBehavior="aria", all errors are displayed in realtime rather than on submit.
let realtimeValidation = controlledError || serverError || clientError || builtinValidation || $5d10129a174740d4$export$dad6ae84456c676a;
let displayValidation = validationBehavior === 'native' ? controlledError || serverError || currentValidity : controlledError || serverError || clientError || builtinValidation || currentValidity;
return {
realtimeValidation: realtimeValidation,
displayValidation: displayValidation,
updateValidation (value) {
// If validationBehavior is 'aria', update in realtime. Otherwise, store in a ref until commit.
if (validationBehavior === 'aria' && !$5d10129a174740d4$var$isEqualValidation(currentValidity, value)) setCurrentValidity(value);
else nextValidation.current = value;
},
resetValidation () {
// Update the currently displayed validation state to valid on form reset,
// even if the native validity says it isn't. It'll show again on the next form submit.
let error = $5d10129a174740d4$export$dad6ae84456c676a;
if (!$5d10129a174740d4$var$isEqualValidation(error, lastError.current)) {
lastError.current = error;
setCurrentValidity(error);
}
// Do not commit validation after the next render. This avoids a condition where
// useSelect calls commitValidation inside an onReset handler.
if (validationBehavior === 'native') setCommitQueued(false);
setServerErrorCleared(true);
},
commitValidation () {
// Commit validation state so the user sees it on blur/change/submit. Also clear any server errors.
// Wait until after the next render to commit so that the latest value has been validated.
if (validationBehavior === 'native') setCommitQueued(true);
setServerErrorCleared(true);
}
};
}
function $5d10129a174740d4$var$asArray(v) {
if (!v) return [];
return Array.isArray(v) ? v : [
v
];
}
function $5d10129a174740d4$var$runValidate(validate, value) {
if (typeof validate === 'function') {
let e = validate(value);
if (e && typeof e !== 'boolean') return $5d10129a174740d4$var$asArray(e);
}
return [];
}
function $5d10129a174740d4$var$getValidationResult(errors) {
return errors.length ? {
isInvalid: true,
validationErrors: errors,
validationDetails: $5d10129a174740d4$var$CUSTOM_VALIDITY_STATE
} : null;
}
function $5d10129a174740d4$var$isEqualValidation(a, b) {
if (a === b) return true;
return !!a && !!b && a.isInvalid === b.isInvalid && a.validationErrors.length === b.validationErrors.length && a.validationErrors.every((a, i)=>a === b.validationErrors[i]) && Object.entries(a.validationDetails).every(([k, v])=>b.validationDetails[k] === v);
}
function $5d10129a174740d4$export$75ee7c75d68f5b0e(...results) {
let errors = new Set();
let isInvalid = false;
let validationDetails = {
...$5d10129a174740d4$export$aca958c65c314e6c
};
for (let v of results){
var _validationDetails, _key;
for (let e of v.validationErrors)errors.add(e);
// Only these properties apply for checkboxes.
isInvalid || (isInvalid = v.isInvalid);
for(let key in validationDetails)(_validationDetails = validationDetails)[_key = key] || (_validationDetails[_key] = v.validationDetails[key]);
}
validationDetails.valid = !isInvalid;
return {
isInvalid: isInvalid,
validationErrors: [
...errors
],
validationDetails: validationDetails
};
}
//# sourceMappingURL=useFormValidationState.main.js.map
@@ -0,0 +1,2 @@
import 'reflect-metadata';
//# sourceMappingURL=multiInject.int.spec.d.ts.map
@@ -0,0 +1,727 @@
flf2a$ 7 5 16 -1 12
Fender by Scooter 8/94 (jkratten@law.georgetown.edu)
Explanation of first line:
flf2 - "magic number" for file identification
a - should always be `a', for now
$ - the "hardblank" -- prints as a blank, but can't be smushed
7 - height of a character
5 - height of a character, not including descenders
10 - max line length (excluding comment lines) + a fudge factor
-1 - default smushmode for this font (like "-m 15" on command line)
12 - number of comment lines
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@@
|| @
|| @
|| @
@
|| @
@
@@
'' '' @
@
@
@
@
@
@@
| | @
''''' @
| | @
''''' @
| | @
@
@@
| | @
.'|'|' @
| | | @
`|'|, @
| | | @
'|'|' @
| | @@
` || @
|| @
|| @
|| @
|| , @
@
@@
.'', @
| | @
.`', ,@
| | | @
`,,|' @
@
@@
'' @
@
@
@
@
@
@@
|' @
|' @
| @
|, @
|. @
@
@@
`| @
`| @
| @
,| @
.| @
@
@@
@
, | , @
,|, @
--|-- @
'|' @
' | ' @
@@
@
| @
-|- @
| @
@
@
@@
@
@
@
@
,, @
, @
@@
@
@
--- @
@
@
@
@@
@
@
@
@
.. @
@
@@
''@
'' @
'' @
'' @
'' @
@
@@
.''', @
| | @
| | @
| | @
`,,,' @
@
@@
|| @
'|| @
|| @
|| @
.||. @
@
@@
''|, @
' || @
.|' @
// @
((... @
@
@@
,'''|, @
|| @
'''|| @
|| @
'...|' @
@
@@
/|| @
// || @
//..||.. @
|| @
|| @
@
@@
||'''' @
|| @
`'''|| @
|| @
....|' @
@
@@
,,,, @
|| ' @
||''|, @
|| || @
`|..|' @
@
@@
'''''/ @
// @
// @
// @
// @
@
@@
.|'''|, @
|| || @
))-(( @
|| || @
`|...|' @
@
@@
.|'''|, @
|| || @
`|...|| @
'' @
'' @
'' @
@@
@
|| @
@
|| @
@
@
@@
@
|| @
@
|| @
' @
@
@@
,, @
,, @
,, @
,, @
,, @
@
@@
@
,,, @
@
''' @
@
@
@@
,, @
,, @
,, @
,, @
,, @
@
@@
.|'''|, @
|| || @
//' @
|| @
.. @
@
@@
.''', @
| . | @
| |,' @
| @
`... @
@
@@
/.\ @
// \\ @
//...\\ @
// \\ @
.// \\. @
@
@@
'||'''|, @
|| || @
||;;;; @
|| || @
.||...|' @
@
@@
.|'''', @
|| @
|| @
|| @
`|....' @
@
@@
'||'''|. @
|| || @
|| || @
|| || @
.||...|' @
@
@@
'||''''| @
|| . @
||'''| @
|| @
.||....| @
@
@@
'||''''| @
|| . @
||''| @
|| @
.||. @
@
@@
.|'''''| @
|| . @
|| |''|| @
|| || @
`|....|' @
@
@@
'|| ||` @
|| || @
||''|| @
|| || @
.|| ||. @
@
@@
|''||''| @
|| @
|| @
|| @
|..||..| @
@
@@
|''||''| @
|| @
|| @
|| @
'..|' @
@
@@
'|| //' @
|| // @
||<< @
|| \\ @
.|| \\. @
@
@@
'|| @
|| @
|| @
|| @
.||...| @
@
@@
'||\ /||` @
||\\.//|| @
|| || @
|| || @
.|| ||. @
@
@@
'||\ ||` @
||\\ || @
|| \\ || @
|| \\|| @
.|| \||. @
@
@@
.|''''|, @
|| || @
|| || @
|| || @
`|....|' @
@
@@
'||'''|, @
|| || @
||...|' @
|| @
.|| @
@
@@
.|''''|, @
|| || @
|| || @
|| \\|| @
`|....|\\ @
@
@@
'||'''|, @
|| || @
||...|' @
|| \\ @
.|| \\. @
@
@@
.|'''| @
|| @
`|'''|, @
. || @
|...|' @
@
@@
|''||''| @
|| @
|| @
|| @
.||. @
@
@@
'|| ||` @
|| || @
|| || @
|| || @
`|...|' @
@
@@
\\ // @
\\ // @
\\ // @
\\// @
\/ @
@
@@
'|| ||` @
|| || @
|| /\ || @
\\//\\// @
\/ \/ @
@
@@
'\\ //` @
\\// @
>< @
//\\ @
.// \\. @
@
@@
'\\ //` @
\\// @
|| @
|| @
.||. @
@
@@
|'''''/ @
// @
// @
// @
/.....| @
@
@@
||''' @
|| @
|| @
|| @
||... @
@
@@
\\ @
\\ @
\\ @
\\ @
\\ @
@
@@
'''|| @
|| @
|| @
|| @
...|| @
@
@@
. @
.| |, @
| | @
@
@
@
@@
@
@
@
@
@
....@
@@
`` @
@
@
@
@
@
@@
@
@
'''|. @
.|''|| @
`|..||. @
@
@@
'|| @
|| @
||''|, @
|| || @
.||..|' @
@
@@
@
@
.|'', @
|| @
`|..' @
@
@@
||` @
|| @
.|''|| @
|| || @
`|..||. @
@
@@
@
@
.|''|, @
||..|| @
`|... @
@
@@
.|'; @
|| @
'||' @
|| @
.||. @
@
@@
@
@
.|''|, @
|| || @
`|..|| @
|| @
`..|' @@
'|| @
|| @
||''|, @
|| || @
.|| || @
@
@@
@
'' @
|| @
|| @
.||. @
@
@@
@
'' @
|| @
|| @
|| @
|| @
`..|' @@
'|| @
|| @
|| //` @
||<< @
.|| \\. @
@
@@
'||` @
|| @
|| @
|| @
.||. @
@
@@
@
@
'||),,(|, @
|| || || @
.|| ||. @
@
@@
@
@
`||''|, @
|| || @
.|| ||. @
@
@@
@
@
.|''|, @
|| || @
`|..|' @
@
@@
@
@
'||''|, @
|| || @
||..|' @
|| @
.|| @@
@
@
.|''||` @
|| || @
`|..|| @
|| , @
||` @@
@
@
'||''| @
|| @
.||. @
@
@@
@
@
('''' @
`'') @
`...' @
@
@@
|| @
|| @
''||'' @
|| @
`|..' @
@
@@
@
@
'|| ||` @
|| || @
`|..'|. @
@
@@
@
@
\\ // @
\\// @
\/ @
@
@@
@
@
'\\ //` @
\\/\// @
\/\/ @
@
@@
@
@
\\ // @
>< @
// \\ @
@
@@
@
@
'|| ||` @
`|..|| @
|| @
, |' @
'' @@
@
@
'''/ @
// @
/... @
@
@@
{{ @
{{ @
{{ @
{{ @
{{ @
@
@@
||@
||@
||@
||@
||@
||@
@@
}} @
}} @
}} @
}} @
}} @
@
@@
@
% % @
% % @
@
@
@
@@
,, ,, @
/.\ @
// \\ @
//...\\ @
.// \\. @
@
@@
'' '' @
.|'''|, @
|| || @
|| || @
`|...|' @
@
@@
'' '' @
|| || @
|| || @
|| || @
`|...|' @
@
@@
,, ,, @
@
'''|. @
.|''|| @
`|..||. @
@
@@
,, ,, @
@
.|''|, @
|| || @
`|..|' @
@
@@
,, ,, @
@
|| || @
|| || @
`|..||. @
@
@@
.|'''|, @
|| || @
||;;;; @
|| || @
||...|' @
|| @
@@
@@ -0,0 +1,156 @@
# space-separated-tokens
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
Parse and stringify space-separated tokens.
## Contents
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`parse(value)`](#parsevalue)
* [`stringify(values)`](#stringifyvalues)
* [Types](#types)
* [Compatibility](#compatibility)
* [Related](#related)
* [Contribute](#contribute)
* [Security](#security)
* [License](#license)
## What is this?
This is a tiny package that can parse and stringify space-separated tokens, as
used for example in the HTML `class` attribute, according to the
[WHATWG spec][spec].
## When should I use this?
This package is rather niche, it’s low-level and particularly useful when
working with [hast][].
## Install
This package is [ESM only][esm].
In Node.js (version 14.14+, 16.0+), install with [npm][]:
```sh
npm install space-separated-tokens
```
In Deno with [`esm.sh`][esmsh]:
```js
import {parse, stringify} from 'https://esm.sh/space-separated-tokens@2'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import {parse, stringify} from 'https://esm.sh/space-separated-tokens@2?bundle'
</script>
```
## Use
```js
import {parse, stringify} from 'space-separated-tokens'
parse(' foo\tbar\nbaz ')
//=> ['foo', 'bar', 'baz']
stringify(['foo', 'bar', 'baz'])
//=> 'foo bar baz'
```
## API
This package exports the identifiers `parse` and `stringify`.
There is no default export.
### `parse(value)`
Parse space-separated tokens (`string`) to an array of strings
(`Array<string>`), according to the [WHATWG spec][spec].
### `stringify(values)`
Serialize an array of strings or numbers (`Array<string|number>`) to
space-separated tokens (`string`).
> 👉 **Note**: it’s not possible to specify empty or whitespace only values.
## Types
This package is fully typed with [TypeScript][].
It exports no additional types.
## Compatibility
This package is at least compatible with all maintained versions of Node.js.
As of now, that is Node.js 14.14+ and 16.0+.
It also works in Deno and modern browsers.
## Related
* [`comma-separated-tokens`](https://github.com/wooorm/comma-separated-tokens)
— parse/stringify comma-separated tokens
* [`collapse-white-space`](https://github.com/wooorm/collapse-white-space)
— replace multiple white-space characters with a single space
* [`property-information`](https://github.com/wooorm/property-information)
— info on HTML properties
## Contribute
Yes please!
See [How to Contribute to Open Source][contribute].
## Security
This package is safe.
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definition -->
[build-badge]: https://github.com/wooorm/space-separated-tokens/workflows/main/badge.svg
[build]: https://github.com/wooorm/space-separated-tokens/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/space-separated-tokens.svg
[coverage]: https://codecov.io/github/wooorm/space-separated-tokens
[downloads-badge]: https://img.shields.io/npm/dm/space-separated-tokens.svg
[downloads]: https://www.npmjs.com/package/space-separated-tokens
[size-badge]: https://img.shields.io/bundlephobia/minzip/space-separated-tokens.svg
[size]: https://bundlephobia.com/result?p=space-separated-tokens
[npm]: https://docs.npmjs.com/cli/install
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[esmsh]: https://esm.sh
[typescript]: https://www.typescriptlang.org
[contribute]: https://opensource.guide/how-to-contribute/
[license]: license
[author]: https://wooorm.com
[spec]: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#space-separated-tokens
[hast]: https://github.com/syntax-tree/hast
@@ -0,0 +1,21 @@
var Hash = require('./_Hash'),
ListCache = require('./_ListCache'),
Map = require('./_Map');
/**
* Removes all key-value entries from the map.
*
* @private
* @name clear
* @memberOf MapCache
*/
function mapCacheClear() {
this.size = 0;
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
'string': new Hash
};
}
module.exports = mapCacheClear;
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('findIndex', require('../findIndex'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,59 @@
{
"predef": [ ]
, "bitwise": false
, "camelcase": false
, "curly": false
, "eqeqeq": false
, "forin": false
, "immed": false
, "latedef": false
, "noarg": true
, "noempty": true
, "nonew": true
, "plusplus": false
, "quotmark": true
, "regexp": false
, "undef": true
, "unused": true
, "strict": false
, "trailing": true
, "maxlen": 120
, "asi": true
, "boss": true
, "debug": true
, "eqnull": true
, "esnext": true
, "evil": true
, "expr": true
, "funcscope": false
, "globalstrict": false
, "iterator": false
, "lastsemic": true
, "laxbreak": true
, "laxcomma": true
, "loopfunc": true
, "multistr": false
, "onecase": false
, "proto": false
, "regexdash": false
, "scripturl": true
, "smarttabs": false
, "shadow": false
, "sub": true
, "supernew": false
, "validthis": true
, "browser": true
, "couch": false
, "devel": false
, "dojo": false
, "mootools": false
, "node": true
, "nonstandard": true
, "prototypejs": false
, "rhino": false
, "worker": true
, "wsh": false
, "nomen": false
, "onevar": false
, "passfail": false
}
@@ -0,0 +1,56 @@
{
"name": "@heroui/use-scroll-position",
"version": "2.1.2",
"description": "Provides the logic to control the scroll over an element",
"keywords": [
"use-scroll-position"
],
"author": "Junior Garcia <jrgarciadev@gmail.com>",
"homepage": "https://heroui.com",
"license": "MIT",
"main": "dist/index.js",
"sideEffects": false,
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/heroui-inc/heroui.git",
"directory": "packages/hooks/use-scroll-position"
},
"bugs": {
"url": "https://github.com/heroui-inc/heroui/issues"
},
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0"
},
"clean-package": "../../../clean-package.config.json",
"tsup": {
"clean": true,
"target": "es2019",
"format": [
"cjs",
"esm"
]
},
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "tsup src --dts",
"build:fast": "tsup src",
"dev": "pnpm build:fast --watch",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit"
}
}
@@ -0,0 +1,28 @@
<svg viewbox="0 0 18 18">
<g class="ql-fill ql-transparent">
<rect height="2" transform="translate(-12 18) rotate(-90)" width="2" x="2" y="14"></rect>
<rect height="2" transform="translate(-9 15) rotate(-90)" width="2" x="2" y="11"></rect>
<rect height="2" transform="translate(-6 12) rotate(-90)" width="2" x="2" y="8"></rect>
<rect height="2" transform="translate(0 6) rotate(-90)" width="2" x="2" y="2"></rect>
<rect height="2" transform="translate(-3 9) rotate(-90)" width="2" x="2" y="5"></rect>
<rect height="2" transform="translate(0 30) rotate(-90)" width="2" x="14" y="14"></rect>
<rect height="2" transform="translate(3 27) rotate(-90)" width="2" x="14" y="11"></rect>
<rect height="2" transform="translate(6 24) rotate(-90)" width="2" x="14" y="8"></rect>
<rect height="2" transform="translate(12 18) rotate(-90)" width="2" x="14" y="2"></rect>
<rect height="2" transform="translate(9 21) rotate(-90)" width="2" x="14" y="5"></rect>
</g>
<line class="ql-stroke-miter" x1="16" x2="2" y1="3" y2="3"></line>
<g class="ql-fill ql-transparent">
<rect height="2" transform="translate(24 30) rotate(-180)" width="2" x="11" y="14"></rect>
<rect height="2" transform="translate(18 30) rotate(-180)" width="2" x="8" y="14"></rect>
<rect height="2" transform="translate(12 30) rotate(-180)" width="2" x="5" y="14"></rect>
<rect height="2" transform="translate(24 6) rotate(-180)" width="2" x="11" y="2"></rect>
<rect height="2" transform="translate(18 6) rotate(-180)" width="2" x="8" y="2"></rect>
<rect height="2" transform="translate(18 12) rotate(-180)" width="2" x="8" y="5"></rect>
<rect height="2" transform="translate(18 18) rotate(-180)" width="2" x="8" y="8"></rect>
<rect height="2" transform="translate(18 24) rotate(-180)" width="2" x="8" y="11"></rect>
<rect height="2" transform="translate(3 21) rotate(-90)" width="2" x="11" y="8"></rect>
<rect height="2" transform="translate(-3 15) rotate(-90)" width="2" x="5" y="8"></rect>
<rect height="2" transform="translate(12 6) rotate(-180)" width="2" x="5" y="2"></rect>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@@ -0,0 +1,12 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Array = GetIntrinsic('%Array%');
// eslint-disable-next-line global-require
var toStr = !$Array.isArray && require('call-bound')('Object.prototype.toString');
module.exports = $Array.isArray || function IsArray(argument) {
return toStr(argument) === '[object Array]';
};
@@ -0,0 +1,53 @@
'use strict';
// do not edit .js files directly - edit src/index.jst
module.exports = function equal(a, b) {
if (a === b) return true;
if (a && b && typeof a == 'object' && typeof b == 'object') {
if (a.constructor !== b.constructor) return false;
var length, i, keys;
if (Array.isArray(a)) {
length = a.length;
if (length != b.length) return false;
for (i = length; i-- !== 0;)
if (!equal(a[i], b[i])) return false;
return true;
}
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
keys = Object.keys(a);
length = keys.length;
if (length !== Object.keys(b).length) return false;
for (i = length; i-- !== 0;)
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
for (i = length; i-- !== 0;) {
var key = keys[i];
if (key === '_owner' && a.$$typeof) {
// React-specific: avoid traversing React elements' _owner.
// _owner contains circular references
// and is not needed when comparing the actual elements (and not their owners)
continue;
}
if (!equal(a[key], b[key])) return false;
}
return true;
}
// true if both NaN, false otherwise
return a!==a && b!==b;
};
@@ -0,0 +1,49 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"complexity": [2, 12],
"func-name-matching": 0,
"id-length": 0,
"max-nested-callbacks": [2, 3],
"max-params": [2, 4],
"max-statements-per-line": [2, { "max": 2 }],
"max-statements": [2, 24],
"new-cap": [2, {
"capIsNewExceptions": [
"AdvanceStringIndex",
"Call",
"Construct",
"CreateIterResultObject",
"CreateRegExpStringIterator",
"Get",
"GetIntrinsic",
"GetMethod",
"Invoke",
"IsRegExp",
"OrdinaryObjectCreate",
"RegExpExec",
"RequireObjectCoercible",
"Set",
"SpeciesConstructor",
"ToBoolean",
"ToLength",
"ToString",
"Type",
],
}],
"no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"],
},
"overrides": [
{
"files": "test/**",
"extends": "@ljharb/eslint-config/tests",
"rules": {
"max-lines-per-function": 0,
},
},
],
}
@@ -0,0 +1,42 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RegExp = GetIntrinsic('%RegExp%');
var $TypeError = require('es-errors/type');
var $parseInteger = GetIntrinsic('%parseInt%');
var callBound = require('call-bound');
var regexTester = require('safe-regex-test');
var $strSlice = callBound('String.prototype.slice');
var isBinary = regexTester(/^0b[01]+$/i);
var isOctal = regexTester(/^0o[0-7]+$/i);
var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
var hasNonWS = regexTester(nonWSregex);
var $trim = require('string.prototype.trim');
// https://262.ecma-international.org/13.0/#sec-stringtonumber
module.exports = function StringToNumber(argument) {
if (typeof argument !== 'string') {
throw new $TypeError('Assertion failed: `argument` is not a String');
}
if (isBinary(argument)) {
return +$parseInteger($strSlice(argument, 2), 2);
}
if (isOctal(argument)) {
return +$parseInteger($strSlice(argument, 2), 8);
}
if (hasNonWS(argument) || isInvalidHexLiteral(argument)) {
return NaN;
}
var trimmed = $trim(argument);
if (trimmed !== argument) {
return StringToNumber(trimmed);
}
return +argument;
};
@@ -0,0 +1,42 @@
'use strict';
var test = require('tape');
var getProto = require('get-proto');
var semver = require('semver');
var getGeneratorFunction = require('generator-function');
test('getGeneratorFunction', function (t) {
var result = getGeneratorFunction();
/* eslint-env browser */
if (typeof window === 'undefined' && typeof process !== 'undefined') {
t.equal(
!!result,
semver.satisfies(process.version, '>= 1'),
'result is present or absent as expected for node ' + process.version
);
}
t.test('exists', { skip: !result }, function (st) {
if (result && getProto) { // TS can't infer `skip`, or that getProto definitely exists if GeneratorFunction exists
st.equal(typeof result, 'function', 'is a function');
st.equal(getProto(result), Function, 'extends Function');
var iterator = result('a', 'return a')(42);
st.deepEqual(iterator.next(), { value: 42, done: true }, 'returns a generator function which returns an iterator');
} else {
st.fail('should never get here');
}
st.end();
});
t.test('does not exist', { skip: !!result }, function (st) {
st.equal(result, false, 'is false');
st.end();
});
t.end();
});
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('keysIn', require('../keysIn'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,53 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
/**
* Merge two visitors.
* This function modifies `visitor1` directly to merge.
* @param {import('eslint').Rule.RuleListener} visitor1 The visitor which is assigned.
* @param {import('eslint').Rule.RuleListener} visitor2 The visitor which is assigning.
* @returns {import('eslint').Rule.RuleListener} `visitor1`.
*/
module.exports = function mergeVisitorsInPlace(visitor1, visitor2) {
for (const key of Object.keys(visitor2)) {
const handler1 = visitor1[key]
const handler2 = visitor2[key]
if (typeof handler1 !== "function") {
visitor1[key] = handler2
continue
}
if (typeof handler2 !== "function") {
continue
}
if ("_handlers" in handler1 && Array.isArray(handler1._handlers)) {
handler1._handlers.push(handler2)
continue
}
const handlers = [handler1, handler2]
visitor1[key] = Object.assign(dispatch.bind(null, handlers), {
_handlers: handlers,
})
}
return visitor1
}
/**
* Dispatch all given functions with a node.
* @param {function[]} handlers The function list to call.
* @param {import('estree').Node} node The AST node to be handled.
* @returns {void}
*/
function dispatch(handlers, node) {
for (const h of handlers) {
h(node)
}
}
@@ -0,0 +1 @@
{"version":3,"file":"stringifyDecoratorInfo.d.ts","sourceRoot":"","sources":["../../../../src/decorator/calculations/stringifyDecoratorInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD,wBAAgB,sBAAsB,CACpC,mBAAmB,EAAE,aAAa,GACjC,MAAM,CASR"}
@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/data-view-buffer
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with a single custom sponsorship URL
@@ -0,0 +1,148 @@
# @dnd-kit/utilities
## 3.2.2
### Patch Changes
- [#1239](https://github.com/clauderic/dnd-kit/pull/1239) [`f342d5e`](https://github.com/clauderic/dnd-kit/commit/f342d5efd98507f173b6a170b35bee1545d40311) Thanks [@petdud](https://github.com/petdud)! - Fix: getOwnerDocument should get correct document for SVG Elements
## 3.2.1
### Patch Changes
- [#948](https://github.com/clauderic/dnd-kit/pull/948) [`da7c60d`](https://github.com/clauderic/dnd-kit/commit/da7c60dcbb76d89cf1fcb421e69a4abcea2eeebe) Thanks [@Ayc0](https://github.com/Ayc0)! - Upgrade to TypeScript to 4.8
## 3.2.0
### Minor Changes
- [#748](https://github.com/clauderic/dnd-kit/pull/748) [`59ca82b`](https://github.com/clauderic/dnd-kit/commit/59ca82b9f228f34c7731ece87aef5d9633608b57) Thanks [@clauderic](https://github.com/clauderic)! - Introduced the `findFirstFocusableNode` utility function that returns the first focusable node within a given HTMLElement, or the element itself if it is focusable.
- [#733](https://github.com/clauderic/dnd-kit/pull/733) [`035021a`](https://github.com/clauderic/dnd-kit/commit/035021aac51161e2bf9715f087a6dd1b46647bfc) Thanks [@clauderic](https://github.com/clauderic)! - Introduced the `useEvent` hook based on [implementation breakdown in the RFC](https://github.com/reactjs/rfcs/blob/useevent/text/0000-useevent.md#internal-implementation). In the future, this hook will be used as a polyfill if the native React hook is unavailble.
## 3.1.0
### Minor Changes
- [#518](https://github.com/clauderic/dnd-kit/pull/518) [`6310227`](https://github.com/clauderic/dnd-kit/commit/63102272d0d63dae349e2e9f638277e16a7d5970) Thanks [@clauderic](https://github.com/clauderic)! - Major internal refactor of measuring and collision detection.
### Summary of changes
Previously, all collision detection algorithms were relative to the top and left points of the document. While this approach worked in most situations, it broke down in a number of different use-cases, such as fixed position droppable containers and trying to drag between containers that had different scroll positions.
This new approach changes the frame of comparison to be relative to the viewport. This is a major breaking change, and will need to be released under a new major version bump.
### Breaking changes:
- By default, `@dnd-kit` now ignores only the transforms applied to the draggable / droppable node itself, but considers all the transforms applied to its ancestors. This should provide the right balance of flexibility for most consumers.
- Transforms applied to the droppable and draggable nodes are ignored by default, because the recommended approach for moving items on the screen is to use the transform property, which can interfere with the calculation of collisions.
- Consumers can choose an alternate approach that does consider transforms for specific use-cases if needed by configuring the measuring prop of <DndContext>. Refer to the <Switch> example.
- Reduced the number of concepts related to measuring from `ViewRect`, `LayoutRect` to just a single concept of `ClientRect`.
- The `ClientRect` interface no longer holds the `offsetTop` and `offsetLeft` properties. For most use-cases, you can replace `offsetTop` with `top` and `offsetLeft` with `left`.
- Replaced the following exports from the `@dnd-kit/core` package with `getClientRect`:
- `getBoundingClientRect`
- `getViewRect`
- `getLayoutRect`
- `getViewportLayoutRect`
- Removed `translatedRect` from the `SensorContext` interface. Replace usage with `collisionRect`.
- Removed `activeNodeClientRect` on the `DndContext` interface. Replace with `activeNodeRect`.
- [`528c67e`](https://github.com/clauderic/dnd-kit/commit/528c67e4c617dfc0ce5221496aa8b222ffc82ddb) Thanks [@clauderic](https://github.com/clauderic)! - Introduced the `useLatestValue` hook, which returns a ref that holds the latest value of a given argument. Optionally, the second argument can be used to customize the dependencies passed to the effect.
### Patch Changes
- [#561](https://github.com/clauderic/dnd-kit/pull/561) [`02edd26`](https://github.com/clauderic/dnd-kit/commit/02edd2691b24bb49f2e7c9f9a3f282031bf658b7) Thanks [@clauderic](https://github.com/clauderic)! - - The `useNodeRef` hook's `onChange` argument now receives both the current node and the previous node that were attached to the ref.
- The `onChange` argument is only called if the previous node differs from the current node
## 3.0.2
### Patch Changes
- [#532](https://github.com/clauderic/dnd-kit/pull/532) [`dfa8d69`](https://github.com/clauderic/dnd-kit/commit/dfa8d69d98e8f271b29fa516cc13b8cd0c01d371) Thanks [@Nauss](https://github.com/Nauss)! - fix: `isWindow` has been updated to support checking wether an element is a window object in Electron applications.
## 3.0.1
### Patch Changes
- [#509](https://github.com/clauderic/dnd-kit/pull/509) [`1c6369e`](https://github.com/clauderic/dnd-kit/commit/1c6369e24ff338760adfb806c3017c72f3194726) Thanks [@clauderic](https://github.com/clauderic)! - Helpers have been updated to support rendering in foreign `window` contexts (via `ReactDOM.render` or `ReactDOM.createPortal`).
For example, checking if an element is an instance of an `HTMLElement` is normally done like so:
```ts
if (element instanceof HTMLElement)
```
However, when rendering in a different window, this can return false even if the element is indeed an HTMLElement, because this code is equivalent to:
```ts
if (element instanceof window.HTMLElement)
```
And in this case, the `window` of the `element` is different from the main execution context `window`, because we are rendering via a portal into another window.
This can be solved by finding the local window of the element:
```ts
const elementWindow = element.ownerDocument.defaultView;
if (element instanceof elementWindow.HTMLElement)
```
## 3.0.0
### Major Changes
- [#373](https://github.com/clauderic/dnd-kit/pull/373) [`1f5ca27`](https://github.com/clauderic/dnd-kit/commit/1f5ca27b17879861c2c545160c2046a747544846) Thanks [@clauderic](https://github.com/clauderic)! - Added react to peerDependencies of @dnd-kit/utilities
### Minor Changes
- [#334](https://github.com/clauderic/dnd-kit/pull/334) [`13be602`](https://github.com/clauderic/dnd-kit/commit/13be602229c6d5723b3ae98bca7b8f45f0773366) Thanks [@trentmwillis](https://github.com/trentmwillis)! - Move `Coordinates` interface along with `getEventCoordinates`, `isMouseEvent` and `isTouchEvent` helpers to @dnd-kit/utilities
### Patch Changes
- [#437](https://github.com/clauderic/dnd-kit/pull/437) [`0e628bc`](https://github.com/clauderic/dnd-kit/commit/0e628bce53fb1a7223cdedd203cb07b6e62e5ec1) Thanks [@chestozo](https://github.com/chestozo)! - Added PointerEvent support to the `getEventCoordinates` method. This fixes testing the PointerSensor with Cypress (#436)
## 2.0.0
### Major Changes
- [`a9d92cf`](https://github.com/clauderic/dnd-kit/commit/a9d92cf1fa35dd957e6c5915a13dfd2af134c103) [#174](https://github.com/clauderic/dnd-kit/pull/174) Thanks [@clauderic](https://github.com/clauderic)! - Distributed assets now only target modern browsers. [Browserlist](https://github.com/browserslist/browserslist) config:
```
defaults
last 2 version
not IE 11
not dead
```
If you need to support older browsers, include the appropriate polyfills in your project's build process.
## 1.0.3
### Patch Changes
- [`6a5c8a1`](https://github.com/clauderic/dnd-kit/commit/6a5c8a13bf19742efa65b20f16666f00ffaae1b1) [#154](https://github.com/clauderic/dnd-kit/pull/154) Thanks [@clauderic](https://github.com/clauderic)! - Update implementation of FirstArgument
## 1.0.2
### Patch Changes
- [`423610c`](https://github.com/clauderic/dnd-kit/commit/423610ca48c5e5ca95545fdb5c5cfcfbd3d233ba) [#56](https://github.com/clauderic/dnd-kit/pull/56) Thanks [@clauderic](https://github.com/clauderic)! - Add MIT license to package.json and distributed files
## 1.0.1
### Patch Changes
- [`0b343c7`](https://github.com/clauderic/dnd-kit/commit/0b343c7e88a68351f8a39f643e9f26b8e046ef48) [#52](https://github.com/clauderic/dnd-kit/pull/52) Thanks [@clauderic](https://github.com/clauderic)! - Add repository entry to package.json files
## 1.0.0
### Major Changes
- [`2912350`](https://github.com/clauderic/dnd-kit/commit/2912350c5008c2b0edda3bae30b5075a852dea63) Thanks [@clauderic](https://github.com/clauderic)! - Initial public release.
## 0.1.0
### Minor Changes
- [`7bd4568`](https://github.com/clauderic/dnd-kit/commit/7bd4568e9f339552fd73a9a4c888460b11195a5e) [#30](https://github.com/clauderic/dnd-kit/pull/30) - Initial beta release, authored by [@clauderic](https://github.com/clauderic).
@@ -0,0 +1,286 @@
import { createApi } from '@reduxjs/toolkit/query'
import type { QueryActionCreatorResult } from '@reduxjs/toolkit/query'
import { delay } from 'msw'
import { setupApiStore } from '../../tests/utils/helpers'
import type { SubscriptionSelectors } from '../core/buildMiddleware/types'
const mockBaseQuery = vi
.fn()
.mockImplementation((args: any) => ({ data: args }))
const api = createApi({
baseQuery: mockBaseQuery,
tagTypes: ['Posts'],
endpoints: (build) => ({
getPosts: build.query<unknown, number>({
query(pageNumber) {
return { url: 'posts', params: pageNumber }
},
providesTags: ['Posts'],
}),
}),
})
const { getPosts } = api.endpoints
const storeRef = setupApiStore(api)
let getSubscriptions: SubscriptionSelectors['getSubscriptions']
beforeEach(() => {
;({ getSubscriptions } = storeRef.store.dispatch(
api.internalActions.internal_getRTKQSubscriptions(),
) as unknown as SubscriptionSelectors)
const currentPolls = storeRef.store.dispatch({
type: `${api.reducerPath}/getPolling`,
}) as any
;(currentPolls as any).pollUpdateCounters = {}
})
const getSubscribersForQueryCacheKey = (queryCacheKey: string) =>
getSubscriptions().get(queryCacheKey) ?? new Map()
const createSubscriptionGetter = (queryCacheKey: string) => () =>
getSubscribersForQueryCacheKey(queryCacheKey)
describe('polling tests', () => {
it('clears intervals when seeing a resetApiState action', async () => {
await storeRef.store.dispatch(
getPosts.initiate(1, {
subscriptionOptions: { pollingInterval: 10 },
subscribe: true,
}),
)
expect(mockBaseQuery).toHaveBeenCalledOnce()
storeRef.store.dispatch(api.util.resetApiState())
await delay(30)
expect(mockBaseQuery).toHaveBeenCalledOnce()
})
it('replaces polling interval when the subscription options are updated', async () => {
const { requestId, queryCacheKey, ...subscription } =
storeRef.store.dispatch(
getPosts.initiate(1, {
subscriptionOptions: { pollingInterval: 10 },
subscribe: true,
}),
)
const getSubs = createSubscriptionGetter(queryCacheKey)
await delay(1)
expect(getSubs().size).toBe(1)
expect(getSubs()?.get(requestId)?.pollingInterval).toBe(10)
subscription.updateSubscriptionOptions({ pollingInterval: 20 })
await delay(1)
expect(getSubs().size).toBe(1)
expect(getSubs()?.get(requestId)?.pollingInterval).toBe(20)
})
it(`doesn't replace the interval when removing a shared query instance with a poll `, async () => {
const subscriptionOne = storeRef.store.dispatch(
getPosts.initiate(1, {
subscriptionOptions: { pollingInterval: 10 },
subscribe: true,
}),
)
storeRef.store.dispatch(
getPosts.initiate(1, {
subscriptionOptions: { pollingInterval: 10 },
subscribe: true,
}),
)
await delay(10)
const getSubs = createSubscriptionGetter(subscriptionOne.queryCacheKey)
expect(getSubs().size).toBe(2)
subscriptionOne.unsubscribe()
await delay(1)
expect(getSubs().size).toBe(1)
})
it('uses lowest specified interval when two components are mounted', async () => {
storeRef.store.dispatch(
getPosts.initiate(1, {
subscriptionOptions: { pollingInterval: 30000 },
subscribe: true,
}),
)
storeRef.store.dispatch(
getPosts.initiate(1, {
subscriptionOptions: { pollingInterval: 10 },
subscribe: true,
}),
)
await delay(20)
expect(mockBaseQuery.mock.calls.length).toBeGreaterThanOrEqual(2)
})
it('respects skipPollingIfUnfocused', async () => {
mockBaseQuery.mockClear()
storeRef.store.dispatch(
getPosts.initiate(2, {
subscriptionOptions: {
pollingInterval: 10,
skipPollingIfUnfocused: true,
},
subscribe: true,
}),
)
storeRef.store.dispatch(api.internalActions?.onFocusLost())
await delay(50)
const callsWithSkip = mockBaseQuery.mock.calls.length
storeRef.store.dispatch(
getPosts.initiate(2, {
subscriptionOptions: {
pollingInterval: 10,
skipPollingIfUnfocused: false,
},
subscribe: true,
}),
)
storeRef.store.dispatch(api.internalActions?.onFocus())
await delay(50)
const callsWithoutSkip = mockBaseQuery.mock.calls.length
expect(callsWithSkip).toBe(1)
expect(callsWithoutSkip).toBeGreaterThanOrEqual(2)
storeRef.store.dispatch(api.util.resetApiState())
})
it('respects skipPollingIfUnfocused if at least one subscription has it', async () => {
storeRef.store.dispatch(
getPosts.initiate(3, {
subscriptionOptions: {
pollingInterval: 10,
skipPollingIfUnfocused: false,
},
subscribe: true,
}),
)
await delay(50)
const callsWithoutSkip = mockBaseQuery.mock.calls.length
storeRef.store.dispatch(
getPosts.initiate(3, {
subscriptionOptions: {
pollingInterval: 15,
skipPollingIfUnfocused: true,
},
subscribe: true,
}),
)
storeRef.store.dispatch(
getPosts.initiate(3, {
subscriptionOptions: {
pollingInterval: 20,
skipPollingIfUnfocused: false,
},
subscribe: true,
}),
)
storeRef.store.dispatch(api.internalActions?.onFocusLost())
await delay(50)
const callsWithSkip = mockBaseQuery.mock.calls.length
expect(callsWithoutSkip).toBeGreaterThan(2)
expect(callsWithSkip).toBe(callsWithoutSkip + 1)
})
it('replaces skipPollingIfUnfocused when the subscription options are updated', async () => {
const { requestId, queryCacheKey, ...subscription } =
storeRef.store.dispatch(
getPosts.initiate(1, {
subscriptionOptions: {
pollingInterval: 10,
skipPollingIfUnfocused: false,
},
subscribe: true,
}),
)
const getSubs = createSubscriptionGetter(queryCacheKey)
await delay(1)
expect(getSubs().size).toBe(1)
expect(getSubs().get(requestId)?.skipPollingIfUnfocused).toBe(false)
subscription.updateSubscriptionOptions({
pollingInterval: 20,
skipPollingIfUnfocused: true,
})
await delay(1)
expect(getSubs().size).toBe(1)
expect(getSubs().get(requestId)?.skipPollingIfUnfocused).toBe(true)
})
it('should minimize polling recalculations when adding multiple subscribers', async () => {
// Reset any existing state
const storeRef = setupApiStore(api, undefined, {
withoutTestLifecycles: true,
})
const SUBSCRIBER_COUNT = 10
const subscriptions: QueryActionCreatorResult<any>[] = []
// Add 10 subscribers to the same endpoint with polling enabled
for (let i = 0; i < SUBSCRIBER_COUNT; i++) {
const subscription = storeRef.store.dispatch(
getPosts.initiate(1, {
subscriptionOptions: { pollingInterval: 1000 },
subscribe: true,
}),
)
subscriptions.push(subscription)
}
// Wait a bit for all subscriptions to be processed
await Promise.all(subscriptions)
// Wait for the poll update timer
await delay(25)
// Get the polling state using the secret "getPolling" action
const currentPolls = storeRef.store.dispatch({
type: `${api.reducerPath}/getPolling`,
}) as any
// Get the query cache key for our endpoint
const queryCacheKey = subscriptions[0].queryCacheKey
// Check the poll update counters
const pollUpdateCounters = currentPolls.pollUpdateCounters || {}
const updateCount = pollUpdateCounters[queryCacheKey] || 0
// With batching optimization, this should be much lower than SUBSCRIBER_COUNT
// Ideally 1, but could be slightly higher due to timing
expect(updateCount).toBeGreaterThanOrEqual(1)
expect(updateCount).toBeLessThanOrEqual(2)
// Clean up subscriptions
subscriptions.forEach((sub) => sub.unsubscribe())
})
})
@@ -0,0 +1,8 @@
import type Quill from './quill.js';
declare abstract class Module<T extends {} = {}> {
quill: Quill;
protected options: Partial<T>;
static DEFAULTS: {};
constructor(quill: Quill, options?: Partial<T>);
}
export default Module;
@@ -0,0 +1,58 @@
export interface Config {
/**
* Integer indicating size of LRU cache used for memoizing results.
* - Cache might be up to twice as big as `cacheSize`
* - No cache is used for values <= 0
*/
cacheSize: number;
/**
* Prefix added to Tailwind-generated classes
* @see https://tailwindcss.com/docs/configuration#prefix
*/
prefix?: string;
/**
* Custom separator for modifiers in Tailwind classes
* @see https://tailwindcss.com/docs/configuration#separator
*/
separator?: string;
/**
* Theme scales used in classGroups.
* The keys are the same as in the Tailwind config but the values are sometimes defined more broadly.
*/
theme: ThemeObject;
/**
* Object with groups of classes.
* @example
* {
* // Creates group of classes `group`, `of` and `classes`
* 'group-id': ['group', 'of', 'classes'],
* // Creates group of classes `look-at-me-other` and `look-at-me-group`.
* 'other-group': [{ 'look-at-me': ['other', 'group']}]
* }
*/
classGroups: Record<ClassGroupId, ClassGroup>;
/**
* Conflicting classes across groups.
* The key is ID of class group which creates conflict, values are IDs of class groups which receive a conflict.
* A class group ID is the key of a class group in classGroups object.
* @example { gap: ['gap-x', 'gap-y'] }
*/
conflictingClassGroups: Record<ClassGroupId, readonly ClassGroupId[]>;
/**
* Postfix modifiers conflicting with other class groups.
* A class group ID is the key of a class group in classGroups object.
* @example { 'font-size': ['leading'] }
*/
conflictingClassGroupModifiers?: Record<ClassGroupId, readonly ClassGroupId[]>;
}
export type ThemeObject = Record<string, ClassGroup>;
export type ClassGroupId = string;
export type ClassGroup = readonly ClassDefinition[];
type ClassDefinition = string | ClassValidator | ThemeGetter | ClassObject;
export type ClassValidator = (classPart: string) => boolean;
export interface ThemeGetter {
(theme: ThemeObject): ClassGroup;
isThemeGetter: true;
}
type ClassObject = Record<string, readonly ClassDefinition[]>;
export {};
@@ -0,0 +1,9 @@
import { createMotionComponent } from '../../../motion/index.mjs';
import { createDomVisualElement } from '../../dom/create-visual-element.mjs';
import { featureBundle } from './feature-bundle.mjs';
function createMotionComponentWithFeatures(Component, options) {
return createMotionComponent(Component, options, featureBundle, createDomVisualElement);
}
export { createMotionComponentWithFeatures };
@@ -0,0 +1,16 @@
import flatten from './flatten.js';
import overRest from './_overRest.js';
import setToString from './_setToString.js';
/**
* A specialized version of `baseRest` which flattens the rest array.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @returns {Function} Returns the new function.
*/
function flatRest(func) {
return setToString(overRest(func, undefined, flatten), func + '');
}
export default flatRest;
@@ -0,0 +1,78 @@
{
"name": "es-set-tostringtag",
"version": "2.1.0",
"description": "A helper to optimistically set Symbol.toStringTag, when possible.",
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p . && attw -P",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@\">= 10.2\" audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/es-shims/es-set-tostringtag.git"
},
"author": "Jordan Harband <ljharb@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/es-shims/es-set-tostringtag/issues"
},
"homepage": "https://github.com/es-shims/es-set-tostringtag#readme",
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.2",
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.2.3",
"@types/get-intrinsic": "^1.2.3",
"@types/has-symbols": "^1.0.2",
"@types/tape": "^5.8.0",
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"dependencies": {
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.6",
"has-tostringtag": "^1.0.2",
"hasown": "^2.0.2"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"testling": {
"files": "./test/index.js"
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}
@@ -0,0 +1,74 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.1.0](https://github.com/inspect-js/has-bigints/compare/v1.0.2...v1.1.0) - 2024-12-18
### Commits
- [meta] use `npmignore` to autogenerate an npmignore file [`a411cea`](https://github.com/inspect-js/has-bigints/commit/a411ceaf68bc297944c1627ec914455843195398)
- [actions] split out node 10-20, and 20+ [`4515878`](https://github.com/inspect-js/has-bigints/commit/45158780f412a6362d7a6116c552f75e23b4be38)
- [New] add types [`c888241`](https://github.com/inspect-js/has-bigints/commit/c888241a4fda933a270369419d11ce7f19ea50ce)
- [actions] update rebase action to use reusable workflow [`6f44338`](https://github.com/inspect-js/has-bigints/commit/6f44338ebca614230de3c87dc82719cf067335a2)
- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `npmignore`, `tape` [`ffa1e4d`](https://github.com/inspect-js/has-bigints/commit/ffa1e4daad689075fec091c86d6b53d4432b99ff)
- [Dev Deps] update `aud`, `tape` [`0f5d096`](https://github.com/inspect-js/has-bigints/commit/0f5d09697b37c182587313e4a9218353f8d3d22b)
- [meta] add missing `engines.node` [`3f73c71`](https://github.com/inspect-js/has-bigints/commit/3f73c71d7f4f13dfcec5520a51a97fb91645d9db)
- [Tests] replace `aud` with `npm audit` [`b007efd`](https://github.com/inspect-js/has-bigints/commit/b007efdd11608912a5dcae216748840a746d3517)
- [Dev Deps] add missing peer dep [`459c612`](https://github.com/inspect-js/has-bigints/commit/459c6126ecff63021664dbb48d19c6b1ddc2db14)
## [v1.0.2](https://github.com/inspect-js/has-bigints/compare/v1.0.1...v1.0.2) - 2022-04-19
### Commits
- [actions] reuse common workflows [`a655b7f`](https://github.com/inspect-js/has-bigints/commit/a655b7f7733ba2de078b3a59a704c2795440d08c)
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`730a2e5`](https://github.com/inspect-js/has-bigints/commit/730a2e53d3f5f82ac43a11cb9753b11445d06d58)
- [readme] add github actions/codecov badges; update URLs [`9a83788`](https://github.com/inspect-js/has-bigints/commit/9a8378861917b41ebb360a9d8ab3d39aa33acf7b)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`b1edc52`](https://github.com/inspect-js/has-bigints/commit/b1edc522ef6c23556e55b9c81b65fe884d1e2cc4)
- [actions] update codecov uploader [`cbb1bd0`](https://github.com/inspect-js/has-bigints/commit/cbb1bd0eff486070a19283238da6afd33ca73b4b)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`8717e6d`](https://github.com/inspect-js/has-bigints/commit/8717e6d6ae6b5010aea1fac5e48dfdfaf35d8c72)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `safe-publish-latest`, `tape` [`5f70eab`](https://github.com/inspect-js/has-bigints/commit/5f70eab763118d40415f13e47446ea5c011fbe18)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`a1446bc`](https://github.com/inspect-js/has-bigints/commit/a1446bc3e806ce3911c73d6fbdd981f461c41019)
- [meta] use `prepublishOnly` script for npm 7+ [`f2dd197`](https://github.com/inspect-js/has-bigints/commit/f2dd19716a06ca7a971644761e864f0435db278e)
- [actions] use checkout v3 [`1ba72f1`](https://github.com/inspect-js/has-bigints/commit/1ba72f19ada076791ff193aca9d8537388d67ddb)
- [Refactor] use a global variable to get the original BigInt instead of a global property [`a7ccfac`](https://github.com/inspect-js/has-bigints/commit/a7ccfac0414e56dadd263fd07c0b5141388df502)
- [actions] skip `npm ls` on older nodes [`62d31e7`](https://github.com/inspect-js/has-bigints/commit/62d31e79658b16391458d0728e0dacbee8694ebb)
## [v1.0.1](https://github.com/inspect-js/has-bigints/compare/v1.0.0...v1.0.1) - 2020-12-13
### Commits
- [Tests] use shared travis-ci configs [`46a0d6b`](https://github.com/inspect-js/has-bigints/commit/46a0d6be7ed83bd7f5ead11e4eab7fc91570a448)
- [Tests] migrate tests to Github Actions [`91a38fa`](https://github.com/inspect-js/has-bigints/commit/91a38fa4b85a420b8cf4926b3799e6ceb60d8690)
- [meta] do not publish github action workflow files [`69aacba`](https://github.com/inspect-js/has-bigints/commit/69aacba320c1221e7fee1c71bde600bce063f24b)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`64e2c08`](https://github.com/inspect-js/has-bigints/commit/64e2c0895b21ac91a137452fd2455932f62a2fc1)
- [Tests] run `nyc` on all tests; use `tape` runner [`8009375`](https://github.com/inspect-js/has-bigints/commit/8009375e5ec9faca6bbc09441002af5c5e59ff20)
- [actions] add automatic rebasing / merge commit blocking [`e599917`](https://github.com/inspect-js/has-bigints/commit/e599917fd1f751c9a6c0daac70acb243f8c3a01d)
- [actions] add "Allow Edits" workflow [`bd0126e`](https://github.com/inspect-js/has-bigints/commit/bd0126eba2d67e9b9d588bced34413f507698154)
- [readme] remove travis badge [`8e02a73`](https://github.com/inspect-js/has-bigints/commit/8e02a73db34827d24d2945f2db822973a0b49925)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `safe-publish-latest` [`95859f2`](https://github.com/inspect-js/has-bigints/commit/95859f28f23f5733481c52a501063802cf64f75b)
- [Dev Deps] update `auto-changelog`, `in-publish`, `tape` [`0588f41`](https://github.com/inspect-js/has-bigints/commit/0588f415c6cc01d6b34668680044e03b2998e03f)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`5b024a6`](https://github.com/inspect-js/has-bigints/commit/5b024a664a8b7d2d2f750a4c11ce20c395b6f12a)
- [meta] add `version` scripts [`4788d61`](https://github.com/inspect-js/has-bigints/commit/4788d61101c009e4e2c1b4d944c263de06192c6a)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`be0e0de`](https://github.com/inspect-js/has-bigints/commit/be0e0de08298dfe483c5d7a2675e5133abeabc53)
- [Dev Deps] update `auto-changelog`; add `aud` [`13a8d1b`](https://github.com/inspect-js/has-bigints/commit/13a8d1bf1f661871d890bfa174de9514f016cdd9)
- [actions] fix action name [`f873d9a`](https://github.com/inspect-js/has-bigints/commit/f873d9a2f10718662528a755b12c61202f4e4afa)
- [meta] add `funding` field [`1b51f49`](https://github.com/inspect-js/has-bigints/commit/1b51f4921df1faf85d2679a0e4ba97ef015a73b7)
- [Dev Deps] update `auto-changelog` [`2322461`](https://github.com/inspect-js/has-bigints/commit/2322461789810434c447439f155eb3ca23eb29fb)
- [Tests] only audit prod deps [`aabdade`](https://github.com/inspect-js/has-bigints/commit/aabdadeaa1e126b91a2fbd82263cc49651ff5e7b)
## v1.0.0 - 2019-08-10
### Commits
- [Tests] add `.travis.yml` [`9730412`](https://github.com/inspect-js/has-bigints/commit/973041241dc172474bb9457aad41790fe54fec88)
- Initial commit [`65f7c38`](https://github.com/inspect-js/has-bigints/commit/65f7c3889d9a98e214e26d650723cbfc49338463)
- [Tests] add tests [`e374a78`](https://github.com/inspect-js/has-bigints/commit/e374a78033d457badcd47e06752fdec7f62e6c39)
- readme [`5d39092`](https://github.com/inspect-js/has-bigints/commit/5d3909249da442867180fb747eef27543627d250)
- npm init [`1be2e3d`](https://github.com/inspect-js/has-bigints/commit/1be2e3d69db6718901e6845cfc38a07cc46dfd96)
- implementation [`b7bc812`](https://github.com/inspect-js/has-bigints/commit/b7bc8121db1fb1a827625c4cb0608935e3dcbe31)
- [Tests] add linting [`04533be`](https://github.com/inspect-js/has-bigints/commit/04533bef57f60e322238f71f32ee3ae0c988bac4)
- [meta] create FUNDING.yml [`cf824a7`](https://github.com/inspect-js/has-bigints/commit/cf824a7d02e867957d8db17ee0a4c70c8ee5ff23)
- Only apps should have lockfiles [`64e8242`](https://github.com/inspect-js/has-bigints/commit/64e82429f1dca99f624dc971ff13516dee28d353)
@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/internal-slot
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with a single custom sponsorship URL
@@ -0,0 +1 @@
{"name":"micromark-core-commonmark","version":"2.0.3","requiresBuild":false,"files":{"license":{"checkedAt":1794532112631,"integrity":"sha512-ic4iF2Ap25Sn5T9MMw7nJ9C20WL6V01rybBBQi2Qx8cQC9/ERFEqGnove1HT65tK2TIKM30PZoOV3Qbz2FE//A==","mode":420,"size":1094},"dev/lib/attention.js":{"checkedAt":1794532112981,"integrity":"sha512-VOdohkH+0ayWwZyQY12bCcEcsRR7ztmwTCLtS9tGtFP5KIvFJQDHw6YIk4B1TzwSi/EbkilDjPqvrji38ngt2g==","mode":420,"size":8038},"lib/attention.js":{"checkedAt":1794532112981,"integrity":"sha512-SxKz2X9CQxFvmxwb5JbJVZi/UTjVqizdVaH0V7bcQND/QU62FF6o4USfpBvP1shYxJWImuVGaZfMe/Nb+qU7JA==","mode":420,"size":7172},"dev/lib/autolink.js":{"checkedAt":1794532112981,"integrity":"sha512-+yYyKlyOIalMRX8S3mu00Cg9ns6ULmPKBWTUcrbTtDuZxMkY8+Yne/qgv/2S65lu84X2ohQI/SFapHE+yiA0Bg==","mode":420,"size":5321},"lib/autolink.js":{"checkedAt":1794532112981,"integrity":"sha512-uyxn/l06/dM6EIBa493//v1K6Yoc6J+a6G11+NYAo/1Cpt+qAIHLdgMaeHLr5VdQdBUN1tQ8u7lZ+GYFghJCMw==","mode":420,"size":4817},"dev/lib/blank-line.js":{"checkedAt":1794532112981,"integrity":"sha512-lj+oMlMbUtVd7Uk9jFcFjYcIjLpaIkn0TBmaud/RILpCfSPcLk/IMSsS3NcV5sVRXxZbHenMx4YARFUEA/PVmg==","mode":420,"size":1223},"lib/blank-line.js":{"checkedAt":1794532112982,"integrity":"sha512-a9701YduxTh4CeTyeZnT5+Z0J6FspJtAg9mtPl0G6fJDQMzANi0iwIftELsWZ1lGo0kBuSrx3otcNNBtUSsv2A==","mode":420,"size":1165},"dev/lib/block-quote.js":{"checkedAt":1794532112982,"integrity":"sha512-He3UOUKA8WCcsDzJ8i1G8qOKIZkVQcYY2/JnOrQNGrsHSPzJDvWUXrd/6YxinOzPg5DqP1eCSFbvPxYjIFn+FQ==","mode":420,"size":3104},"lib/block-quote.js":{"checkedAt":1794532112982,"integrity":"sha512-uz5gMiL2+QjwKNWl7hWIjRThUJovC0unexuZerWUiTtwDC1lqcX9QoY7L3LcqBFgwOpGACDH3qf54D0bsFFJYA==","mode":420,"size":2731},"dev/lib/character-escape.js":{"checkedAt":1794532112982,"integrity":"sha512-rzbfEjEhXgpXmFnSVOenOyfWztSCfI/igJW7W38Tz+gdBZUKkinsGDO2JZTINRpgLpeKh9gJyJ0AAT3CoMPSZw==","mode":420,"size":1325},"lib/character-escape.js":{"checkedAt":1794532112982,"integrity":"sha512-fG0hcQTYRYYgoxR4kUiqvw4eIaL/nDah6FWkMIqGlyM+4T0g/vBeEfVmcT8eag3KCBnGpndU4dXEYvkj6mj1gg==","mode":420,"size":1173},"dev/lib/character-reference.js":{"checkedAt":1794532112982,"integrity":"sha512-LrRsGh24LJufX9JjfPUoksx5nEFICOsuTELsM+x6Jw5N3LCg7LpXfHKrQNJaNkkYjcvUGMhDd0lWcAQTjBS/7w==","mode":420,"size":3679},"lib/character-reference.js":{"checkedAt":1794532112982,"integrity":"sha512-wvyxVQa6lOs62U0500oCjftsJK4PZrMpzjM3DYhsnil4lW0tn97UIOAysIKxjDdmWTkXKUGf47YehL31pgsfcg==","mode":420,"size":3300},"dev/lib/code-fenced.js":{"checkedAt":1794532112983,"integrity":"sha512-0t/O3KRDkAXIv/WEcNxv9O4Cv3yta097jnoOKFvkxjwm5LXDwUBc1/SI+6cDm/u3u8CQhMmz4WCCRLsj7zPHZg==","mode":420,"size":10240},"lib/code-fenced.js":{"checkedAt":1794532112983,"integrity":"sha512-uAdVR06MCZfzc3nc1kJageep8ViCHxTL1btBdO4cigiAw8u2OHSGAemCvc3mOpYXwBqr/91OX81uIz6MpeK6CQ==","mode":420,"size":9281},"dev/lib/code-indented.js":{"checkedAt":1794532112983,"integrity":"sha512-08xsBp2uU/RiegLrziXbL3G8dUGPw47o8OKiSLRBFAkYgCG+qGATt7a6SMqVuGc010Qzg5VAoxFkdx7/Q3nLGg==","mode":420,"size":4372},"lib/code-indented.js":{"checkedAt":1794532112983,"integrity":"sha512-qLo9O6WUYYpNFq0AJTWfy4T+RY7qnvnMzcbcFJwLtByiEqJgDqd3D+Ht8uImlL0GKalBqzYNVGVoa/66mihlEQ==","mode":420,"size":4038},"dev/lib/code-text.js":{"checkedAt":1794532112983,"integrity":"sha512-RoJ1GPBGUPlH6csXBS8YLcEE3oHh3q2UY4OQ5qaEvncd/THwPOzKB/KwWwW7L50vdePzEIJylFGFq02ZDLxwVQ==","mode":420,"size":5301},"lib/code-text.js":{"checkedAt":1794532112983,"integrity":"sha512-DqFfEvSPvMnDYCRrxE7WcUIMdqKKoSJCKYNrzoCYb1ecSoX9ivRaIk5LbQVkTkHRp0tvUjMJWDjA1TDpTKfHyQ==","mode":420,"size":4840},"dev/lib/content.js":{"checkedAt":1794532112983,"integrity":"sha512-P+7QbDqDmoqiYsZXsv6PiyJHWAo/CqQ3CPQIBfVNkOcg9wXJ/exxqonLCMRJ9qPRC87zskpIbrV+5Drj/vnMGg==","mode":420,"size":3889},"lib/content.js":{"checkedAt":1794532112983,"integrity":"sha512-8XH79QhWGHK3ds/HWx21P6Y5Uek8amv11kglRCsqtLSJU9ett9PAn5waXBkmA7t7cR5v3o8ANzTallaDsnDA9Q==","mode":420,"size":3290},"dev/lib/definition.js":{"checkedAt":1794532112984,"integrity":"sha512-B5xAVoW/LDo85KOvTTo0EVAPM0GICyweDVdYem9RLlHYgtVRDobfkuFCEPBk0sAQYO4Cpn/5vTFSRY7GQFlXHw==","mode":420,"size":6081},"lib/definition.js":{"checkedAt":1794532112984,"integrity":"sha512-x85S7wadeMzaibp0WPTHjTuC3jCVmS3qXq+QdBPdD0dg6U7pFsjaYhdyiIFkIuwx/6XTWozlhhoDWLg/T8cBZw==","mode":420,"size":5653},"dev/lib/hard-break-escape.js":{"checkedAt":1794532112984,"integrity":"sha512-BsF9EJFPo7CHp4zadQPQOngkaqJCM4lILSgOM64JOiU7dDt5z6W/CBvSu5s1CVOVAXuSeuWSA98BK2YGJmHpDQ==","mode":420,"size":1125},"lib/hard-break-escape.js":{"checkedAt":1794532112984,"integrity":"sha512-e69QktmFShaXkIeSVKJjl9ZCr1XPbJCQ3wynjtjD0Z02mDgvvdAgmNLHREAdtIdh05XU5LYRIGg56V6uW4GvWg==","mode":420,"size":984},"dev/lib/heading-atx.js":{"checkedAt":1794532112984,"integrity":"sha512-SqH7ulDMOxA7rmgS2+BybZyLC5xX0pT9vi8WMNVIcOXpD6yTRZPLuQxfmdRsIc9wu0PxPCoD3h1gWhy9QSQN8g==","mode":420,"size":4811},"lib/heading-atx.js":{"checkedAt":1794532112984,"integrity":"sha512-NpCu6CK4yIAnP/G2YIxgMue7erucpgURto+p31Vwyc4Rz169hrx651of1Line truncated
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from '../types.mjs';
import 'react';
declare const AlignLeftBoldIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { AlignLeftBoldIcon };
@@ -0,0 +1,26 @@
import useLatest from '../useLatest';
import { getTargetElement } from '../utils/domTarget';
import getDocumentOrShadow from '../utils/getDocumentOrShadow';
import useEffectWithTarget from '../utils/useEffectWithTarget';
export default function useClickAway(onClickAway, target, eventName) {
if (eventName === void 0) { eventName = 'click'; }
var onClickAwayRef = useLatest(onClickAway);
useEffectWithTarget(function () {
var handler = function (event) {
var targets = Array.isArray(target) ? target : [target];
if (targets.some(function (item) {
var targetElement = getTargetElement(item);
return !targetElement || targetElement.contains(event.target);
})) {
return;
}
onClickAwayRef.current(event);
};
var documentOrShadow = getDocumentOrShadow(target);
var eventNames = Array.isArray(eventName) ? eventName : [eventName];
eventNames.forEach(function (event) { return documentOrShadow.addEventListener(event, handler); });
return function () {
eventNames.forEach(function (event) { return documentOrShadow.removeEventListener(event, handler); });
};
}, Array.isArray(eventName) ? eventName : [eventName], target);
}
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFirstIterableResult = getFirstIterableResult;
const getFirstIteratorResult_1 = require("../actions/getFirstIteratorResult");
function getFirstIterableResult(iterable) {
return (0, getFirstIteratorResult_1.getFirstIteratorResult)(iterable?.[Symbol.iterator]());
}
//# sourceMappingURL=getFirstIterableResult.js.map
@@ -0,0 +1,24 @@
var arrayReduce = require('./_arrayReduce'),
deburr = require('./deburr'),
words = require('./words');
/** Used to compose unicode capture groups. */
var rsApos = "['\u2019]";
/** Used to match apostrophes. */
var reApos = RegExp(rsApos, 'g');
/**
* Creates a function like `_.camelCase`.
*
* @private
* @param {Function} callback The function to combine each word.
* @returns {Function} Returns the new compounder function.
*/
function createCompounder(callback) {
return function(string) {
return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
};
}
module.exports = createCompounder;
@@ -0,0 +1,171 @@
# react-window
> React components for efficiently rendering large lists and tabular data
### If you like this project, 🎉 [become a sponsor](https://github.com/sponsors/bvaughn/) or ☕ [buy me a coffee](http://givebrian.coffee/)
---
React window works by only rendering *part* of a large data set (just enough to fill the viewport). This helps address some common performance bottlenecks:
1. It reduces the amount of work (and time) required to render the initial view and to process updates.
2. It reduces the memory footprint by avoiding over-allocation of DOM nodes.
### Sponsors
The following wonderful companies have sponsored react-window:
<a href="https://opencollective.com/react-window/sponsor/0/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/1/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/2/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/3/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/4/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/5/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/6/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/7/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/8/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/9/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/9/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/10/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/10/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/11/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/11/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/12/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/12/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/13/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/13/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/14/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/14/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/15/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/15/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/16/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/16/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/17/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/17/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/18/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/18/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/19/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/19/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/20/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/20/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/21/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/21/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/22/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/22/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/23/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/23/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/24/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/24/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/25/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/25/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/26/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/26/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/27/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/27/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/28/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/28/avatar.svg"></a>
<a href="https://opencollective.com/react-window/sponsor/29/website" target="_blank"><img src="https://opencollective.com/react-window/sponsor/29/avatar.svg"></a>
[Learn more about becoming a sponsor!](https://opencollective.com/react-window#sponsor)
<a href="https://opencollective.com/react-window/backer/0/website" target="_blank"><img src="https://opencollective.com/react-window/backer/0/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/1/website" target="_blank"><img src="https://opencollective.com/react-window/backer/1/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/2/website" target="_blank"><img src="https://opencollective.com/react-window/backer/2/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/3/website" target="_blank"><img src="https://opencollective.com/react-window/backer/3/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/4/website" target="_blank"><img src="https://opencollective.com/react-window/backer/4/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/5/website" target="_blank"><img src="https://opencollective.com/react-window/backer/5/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/6/website" target="_blank"><img src="https://opencollective.com/react-window/backer/6/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/7/website" target="_blank"><img src="https://opencollective.com/react-window/backer/7/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/8/website" target="_blank"><img src="https://opencollective.com/react-window/backer/8/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/9/website" target="_blank"><img src="https://opencollective.com/react-window/backer/9/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/10/website" target="_blank"><img src="https://opencollective.com/react-window/backer/10/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/11/website" target="_blank"><img src="https://opencollective.com/react-window/backer/11/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/12/website" target="_blank"><img src="https://opencollective.com/react-window/backer/12/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/13/website" target="_blank"><img src="https://opencollective.com/react-window/backer/13/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/14/website" target="_blank"><img src="https://opencollective.com/react-window/backer/14/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/15/website" target="_blank"><img src="https://opencollective.com/react-window/backer/15/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/16/website" target="_blank"><img src="https://opencollective.com/react-window/backer/16/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/17/website" target="_blank"><img src="https://opencollective.com/react-window/backer/17/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/18/website" target="_blank"><img src="https://opencollective.com/react-window/backer/18/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/19/website" target="_blank"><img src="https://opencollective.com/react-window/backer/19/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/20/website" target="_blank"><img src="https://opencollective.com/react-window/backer/20/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/21/website" target="_blank"><img src="https://opencollective.com/react-window/backer/21/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/22/website" target="_blank"><img src="https://opencollective.com/react-window/backer/22/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/23/website" target="_blank"><img src="https://opencollective.com/react-window/backer/23/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/24/website" target="_blank"><img src="https://opencollective.com/react-window/backer/24/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/25/website" target="_blank"><img src="https://opencollective.com/react-window/backer/25/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/26/website" target="_blank"><img src="https://opencollective.com/react-window/backer/26/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/27/website" target="_blank"><img src="https://opencollective.com/react-window/backer/27/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/28/website" target="_blank"><img src="https://opencollective.com/react-window/backer/28/avatar.svg"></a>
<a href="https://opencollective.com/react-window/backer/29/website" target="_blank"><img src="https://opencollective.com/react-window/backer/29/avatar.svg"></a>
## Install
```bash
# Yarn
yarn add react-window
# NPM
npm install --save react-window
```
## Usage
Learn more at [react-window.now.sh](https://react-window.now.sh/):
## Related libraries
* [`react-virtualized-auto-sizer`](https://npmjs.com/package/react-virtualized-auto-sizer): HOC that grows to fit all of the available space and passes the width and height values to its child.
* [`react-window-infinite-loader`](https://npmjs.com/package/react-window-infinite-loader): Helps break large data sets down into chunks that can be just-in-time loaded as they are scrolled into view. It can also be used to create infinite loading lists (e.g. Facebook or Twitter).
* [`react-vtree`](https://www.npmjs.com/package/react-vtree): Lightweight and flexible solution to render large tree structures (e.g., file system).
## Frequently asked questions
### How is `react-window` different from `react-virtualized`?
I wrote `react-virtualized` several years ago. At the time, I was new to both React and the concept of windowing. Because of this, I made a few API decisions that I later came to regret. One of these was adding too many non-essential features and components. Once you add something to an open source project, removing it is pretty painful for users.
`react-window` is a complete rewrite of `react-virtualized`. I didn't try to solve as many problems or support as many use cases. Instead I focused on making the package **smaller**<sup>1</sup> and **faster**. I also put a lot of thought into making the API (and documentation) as beginner-friendly as possible (with the caveat that windowing is still kind of an advanced use case).
If `react-window` provides the functionality your project needs, I would strongly recommend using it instead of `react-virtualized`. However if you need features that only `react-virtualized` provides, you have two options:
1. Use `react-virtualized`. (It's still widely used by a lot of successful projects!)
2. Create a component that decorates one of the `react-window` primitives and adds the functionality you need. You may even want to release this component to NPM (as its own, standalone package)! 🙂
<sup>1 - Adding a `react-virtualized` list to a CRA project increases the (gzipped) build size by ~33.5 KB. Adding a `react-window` list to a CRA project increases the (gzipped) build size by &lt;2 KB.</sup>
### Can a list or a grid fill 100% the width or height of a page?
Yes. I recommend using the [`react-virtualized-auto-sizer` package](https://npmjs.com/package/react-virtualized-auto-sizer):
<img width="336" alt="screen shot 2019-03-07 at 7 29 08 pm" src="https://user-images.githubusercontent.com/29597/54005716-50f41880-410f-11e9-864f-a65bbdf49e07.png">
Here's a [Code Sandbox demo](https://codesandbox.io/s/3vnx878jk5).
### Why is my list blank when I scroll?
If your list looks something like this...
<img src="https://user-images.githubusercontent.com/29597/54005352-eb535c80-410d-11e9-80b2-d3d02db1f599.gif" width="302" height="152">
...then you probably forgot to use the `style` parameter! Libraries like react-window work by absolutely positioning the list items (via an inline style), so don't forget to attach it to the DOM element you render!
<img width="257" alt="screen shot 2019-03-07 at 7 21 48 pm" src="https://user-images.githubusercontent.com/29597/54005433-45ecb880-410e-11e9-8721-420ff1a153da.png">
### Can I lazy load data for my list?
Yes. I recommend using the [`react-window-infinite-loader` package](https://npmjs.com/package/react-window-infinite-loader):
<img width="368" alt="screen shot 2019-03-07 at 7 32 32 pm" src="https://user-images.githubusercontent.com/29597/54006733-653a1480-4113-11e9-907b-08ca5e27b3f9.png">
Here's a [Code Sandbox demo](https://codesandbox.io/s/5wqo7z2np4).
### Can I attach custom properties or event handlers?
Yes, using the `outerElementType` prop.
<img width="412" alt="Screen Shot 2019-03-12 at 8 58 09 AM" src="https://user-images.githubusercontent.com/29597/54215333-f9ee9a80-44a4-11e9-9142-34c67026d950.png">
Here's a [Code Sandbox demo](https://codesandbox.io/s/4zqx79nww0).
### Can I add padding to the top and bottom of a list?
Yes, although it requires a bit of inline styling.
<img width="418" alt="Screen Shot 2019-06-02 at 8 38 18 PM" src="https://user-images.githubusercontent.com/29597/58774454-65ad4480-8576-11e9-8889-07044fd41393.png">
Here's a [Code Sandbox demo](https://codesandbox.io/s/react-window-list-padding-dg0pq).
### Can I add gutter or padding between items?
Yes, although it requires a bit of inline styling.
<img width="416" alt="Screen Shot 2019-03-26 at 6 33 56 PM" src="https://user-images.githubusercontent.com/29597/55043972-c14ad700-4ff5-11e9-9caa-2e9f4d85f96c.png">
Here's a [Code Sandbox demo](https://codesandbox.io/s/2w8wmlm89p).
### Does this library support "sticky" items?
Yes, although it requires a small amount of user code. Here's a [Code Sandbox demo](https://codesandbox.io/s/0mk3qwpl4l).
## License
MIT © [bvaughn](https://github.com/bvaughn)
@@ -0,0 +1,9 @@
import type { TSESLint } from '@typescript-eslint/utils';
export type Options = [
{
fixMixedExportsWithInlineTypeSpecifier: boolean;
}
];
export type MessageIds = 'multipleExportsAreTypes' | 'singleExportIsType' | 'typeOverValue';
declare const _default: TSESLint.RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>;
export default _default;
@@ -0,0 +1 @@
{"version":3,"file":"BindingFluentSyntax.d.ts","sourceRoot":"","sources":["../../../../src/binding/models/BindingFluentSyntax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,OAAO,EACP,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAEpF,MAAM,WAAW,kBAAkB;IACjC,aAAa,IAAI,iBAAiB,CAAC;CACpC;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;IAClD,MAAM,IAAI,wBAAwB,CAAC,CAAC,CAAC,CAAC;IACtC,eAAe,CAAC,KAAK,EAAE,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC;IACrD,cAAc,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;IAC7E,SAAS,CAEP,OAAO,EAAE,CAAC,SAAS,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,GACpC,CAAC,OAAO,EAAE,iBAAiB,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAC9C,KAAK,GACR,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAC7B;;;;OAIG;IACH,UAAU,CAER,QAAQ,EAAE,CAAC,SAAS,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,GACtC,CAAC,OAAO,EAAE,iBAAiB,KAAK,CAAC,GACjC,KAAK,GACR,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAC7B,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;IAE5E,eAAe,CAAC,KAAK,SAAS,OAAO,EAAE,GAAG,GAAG,EAAE,EAC7C,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAC3C,aAAa,EAAE,+BAA+B,CAAC,KAAK,CAAC,GACpD,wBAAwB,CAAC,CAAC,CAAC,CAAC;IAC/B,SAAS,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAChD;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC,CAAE,SAAQ,kBAAkB;IAC/D,gBAAgB,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAC9C,gBAAgB,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAC9C,cAAc,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,wBAAwB,CAAC,CAAC,CACzC,SAAQ,kBAAkB,CAAC,CAAC,CAAC,EAC3B,sBAAsB,CAAC,CAAC,CAAC;CAAG;AAEhC,MAAM,WAAW,kBAAkB,CAAC,CAAC,CAAE,SAAQ,kBAAkB;IAC/D,YAAY,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;IACxE,cAAc,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;CAC/E;AAED,MAAM,WAAW,sBAAsB,CAAC,CAAC,CACvC,SAAQ,oBAAoB,CAAC,CAAC,CAAC,EAC7B,kBAAkB,CAAC,CAAC,CAAC;CAAG;AAE5B,MAAM,WAAW,oBAAoB,CAAC,CAAC,CAAE,SAAQ,kBAAkB;IACjE,IAAI,CACF,UAAU,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,OAAO,GACpD,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACzB,eAAe,CACb,UAAU,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,OAAO,GACpD,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACzB,iBAAiB,CACf,iBAAiB,EAAE,iBAAiB,GACnC,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACzB,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAChE,qBAAqB,CACnB,GAAG,EAAE,WAAW,EAChB,QAAQ,EAAE,OAAO,GAChB,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACzB,WAAW,IAAI,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACrC,SAAS,CAAC,IAAI,EAAE,YAAY,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACrD,cAAc,CACZ,UAAU,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,OAAO,GACpD,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACzB,gBAAgB,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAC9E,mBAAmB,CAAC,IAAI,EAAE,YAAY,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAC/D,oBAAoB,CAClB,GAAG,EAAE,WAAW,EAChB,QAAQ,EAAE,OAAO,GAChB,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACzB,YAAY,CACV,UAAU,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,OAAO,GACpD,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACzB,cAAc,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAC5E,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAC7D,kBAAkB,CAChB,GAAG,EAAE,WAAW,EAChB,QAAQ,EAAE,OAAO,GAChB,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACzB,UAAU,CACR,UAAU,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,OAAO,GACpD,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACzB,YAAY,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAC1E,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAC3D,gBAAgB,CAAC,GAAG,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAC7E,UAAU,CAAC,GAAG,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;CACxE"}
@@ -0,0 +1,333 @@
// @ts-check
/** @typedef { import('estree').BaseNode} BaseNode */
/** @typedef {{
skip: () => void;
remove: () => void;
replace: (node: BaseNode) => void;
}} WalkerContext */
class WalkerBase {
constructor() {
/** @type {boolean} */
this.should_skip = false;
/** @type {boolean} */
this.should_remove = false;
/** @type {BaseNode | null} */
this.replacement = null;
/** @type {WalkerContext} */
this.context = {
skip: () => (this.should_skip = true),
remove: () => (this.should_remove = true),
replace: (node) => (this.replacement = node)
};
}
/**
*
* @param {any} parent
* @param {string} prop
* @param {number} index
* @param {BaseNode} node
*/
replace(parent, prop, index, node) {
if (parent) {
if (index !== null) {
parent[prop][index] = node;
} else {
parent[prop] = node;
}
}
}
/**
*
* @param {any} parent
* @param {string} prop
* @param {number} index
*/
remove(parent, prop, index) {
if (parent) {
if (index !== null) {
parent[prop].splice(index, 1);
} else {
delete parent[prop];
}
}
}
}
// @ts-check
/** @typedef { import('estree').BaseNode} BaseNode */
/** @typedef { import('./walker.js').WalkerContext} WalkerContext */
/** @typedef {(
* this: WalkerContext,
* node: BaseNode,
* parent: BaseNode,
* key: string,
* index: number
* ) => void} SyncHandler */
class SyncWalker extends WalkerBase {
/**
*
* @param {SyncHandler} enter
* @param {SyncHandler} leave
*/
constructor(enter, leave) {
super();
/** @type {SyncHandler} */
this.enter = enter;
/** @type {SyncHandler} */
this.leave = leave;
}
/**
*
* @param {BaseNode} node
* @param {BaseNode} parent
* @param {string} [prop]
* @param {number} [index]
* @returns {BaseNode}
*/
visit(node, parent, prop, index) {
if (node) {
if (this.enter) {
const _should_skip = this.should_skip;
const _should_remove = this.should_remove;
const _replacement = this.replacement;
this.should_skip = false;
this.should_remove = false;
this.replacement = null;
this.enter.call(this.context, node, parent, prop, index);
if (this.replacement) {
node = this.replacement;
this.replace(parent, prop, index, node);
}
if (this.should_remove) {
this.remove(parent, prop, index);
}
const skipped = this.should_skip;
const removed = this.should_remove;
this.should_skip = _should_skip;
this.should_remove = _should_remove;
this.replacement = _replacement;
if (skipped) return node;
if (removed) return null;
}
for (const key in node) {
const value = node[key];
if (typeof value !== "object") {
continue;
} else if (Array.isArray(value)) {
for (let i = 0; i < value.length; i += 1) {
if (value[i] !== null && typeof value[i].type === 'string') {
if (!this.visit(value[i], node, key, i)) {
// removed
i--;
}
}
}
} else if (value !== null && typeof value.type === "string") {
this.visit(value, node, key, null);
}
}
if (this.leave) {
const _replacement = this.replacement;
const _should_remove = this.should_remove;
this.replacement = null;
this.should_remove = false;
this.leave.call(this.context, node, parent, prop, index);
if (this.replacement) {
node = this.replacement;
this.replace(parent, prop, index, node);
}
if (this.should_remove) {
this.remove(parent, prop, index);
}
const removed = this.should_remove;
this.replacement = _replacement;
this.should_remove = _should_remove;
if (removed) return null;
}
}
return node;
}
}
// @ts-check
/** @typedef { import('estree').BaseNode} BaseNode */
/** @typedef { import('./walker').WalkerContext} WalkerContext */
/** @typedef {(
* this: WalkerContext,
* node: BaseNode,
* parent: BaseNode,
* key: string,
* index: number
* ) => Promise<void>} AsyncHandler */
class AsyncWalker extends WalkerBase {
/**
*
* @param {AsyncHandler} enter
* @param {AsyncHandler} leave
*/
constructor(enter, leave) {
super();
/** @type {AsyncHandler} */
this.enter = enter;
/** @type {AsyncHandler} */
this.leave = leave;
}
/**
*
* @param {BaseNode} node
* @param {BaseNode} parent
* @param {string} [prop]
* @param {number} [index]
* @returns {Promise<BaseNode>}
*/
async visit(node, parent, prop, index) {
if (node) {
if (this.enter) {
const _should_skip = this.should_skip;
const _should_remove = this.should_remove;
const _replacement = this.replacement;
this.should_skip = false;
this.should_remove = false;
this.replacement = null;
await this.enter.call(this.context, node, parent, prop, index);
if (this.replacement) {
node = this.replacement;
this.replace(parent, prop, index, node);
}
if (this.should_remove) {
this.remove(parent, prop, index);
}
const skipped = this.should_skip;
const removed = this.should_remove;
this.should_skip = _should_skip;
this.should_remove = _should_remove;
this.replacement = _replacement;
if (skipped) return node;
if (removed) return null;
}
for (const key in node) {
const value = node[key];
if (typeof value !== "object") {
continue;
} else if (Array.isArray(value)) {
for (let i = 0; i < value.length; i += 1) {
if (value[i] !== null && typeof value[i].type === 'string') {
if (!(await this.visit(value[i], node, key, i))) {
// removed
i--;
}
}
}
} else if (value !== null && typeof value.type === "string") {
await this.visit(value, node, key, null);
}
}
if (this.leave) {
const _replacement = this.replacement;
const _should_remove = this.should_remove;
this.replacement = null;
this.should_remove = false;
await this.leave.call(this.context, node, parent, prop, index);
if (this.replacement) {
node = this.replacement;
this.replace(parent, prop, index, node);
}
if (this.should_remove) {
this.remove(parent, prop, index);
}
const removed = this.should_remove;
this.replacement = _replacement;
this.should_remove = _should_remove;
if (removed) return null;
}
}
return node;
}
}
// @ts-check
/** @typedef { import('estree').BaseNode} BaseNode */
/** @typedef { import('./sync.js').SyncHandler} SyncHandler */
/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */
/**
*
* @param {BaseNode} ast
* @param {{
* enter?: SyncHandler
* leave?: SyncHandler
* }} walker
* @returns {BaseNode}
*/
function walk(ast, { enter, leave }) {
const instance = new SyncWalker(enter, leave);
return instance.visit(ast, null);
}
/**
*
* @param {BaseNode} ast
* @param {{
* enter?: AsyncHandler
* leave?: AsyncHandler
* }} walker
* @returns {Promise<BaseNode>}
*/
async function asyncWalk(ast, { enter, leave }) {
const instance = new AsyncWalker(enter, leave);
return await instance.visit(ast, null);
}
export { asyncWalk, walk };
@@ -0,0 +1,91 @@
{
"name": "has-proto",
"version": "1.2.0",
"description": "Does this environment have the ability to get the [[Prototype]] of an object on creation with `__proto__`?",
"main": "index.js",
"exports": {
".": "./index.js",
"./accessor": "./accessor.js",
"./mutator": "./mutator.js",
"./package.json": "./package.json"
},
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p . && attw -P",
"pretest": "npm run lint",
"tests-only": "tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>=10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/inspect-js/has-proto.git"
},
"keywords": [
"prototype",
"proto",
"set",
"get",
"__proto__",
"getPrototypeOf",
"setPrototypeOf",
"has"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/inspect-js/has-proto/issues"
},
"homepage": "https://github.com/inspect-js/has-proto#readme",
"testling": {
"files": "test/index.js"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.0",
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.2.2",
"@types/gopd": "^1.0.3",
"@types/tape": "^5.6.5",
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"gopd": "^1.2.0",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"reflect.getprototypeof": "^1.0.7",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows",
"types"
]
},
"dependencies": {
"dunder-proto": "^1.0.0"
}
}
@@ -0,0 +1,46 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
const { getSourceCode } = require("eslint-compat-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `Object.seal` method.",
category: "ES5",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-object-seal.html",
},
fixable: null,
messages: {
forbidden: "ES5 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"(program) {
const sourceCode = getSourceCode(context)
const tracker = new ReferenceTracker(
sourceCode.getScope(program),
)
for (const { node, path } of tracker.iterateGlobalReferences({
Object: {
seal: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildUnmanagedMetadataFromMaybeClassElementMetadata = void 0;
const buildClassElementMetadataFromMaybeClassElementMetadata_1 = require("./buildClassElementMetadataFromMaybeClassElementMetadata");
const buildDefaultUnmanagedMetadata_1 = require("./buildDefaultUnmanagedMetadata");
const buildUnmanagedMetadataFromMaybeManagedMetadata_1 = require("./buildUnmanagedMetadataFromMaybeManagedMetadata");
exports.buildUnmanagedMetadataFromMaybeClassElementMetadata = (0, buildClassElementMetadataFromMaybeClassElementMetadata_1.buildClassElementMetadataFromMaybeClassElementMetadata)(buildDefaultUnmanagedMetadata_1.buildDefaultUnmanagedMetadata, buildUnmanagedMetadataFromMaybeManagedMetadata_1.buildUnmanagedMetadataFromMaybeManagedMetadata);
//# sourceMappingURL=buildUnmanagedMetadataFromMaybeClassElementMetadata.js.map
@@ -0,0 +1,3 @@
export { ActiveDraggableContext, DndContext } from './DndContext';
export type { CancelDrop, Props as DndContextProps } from './DndContext';
export type { DraggableMeasuring, MeasuringConfiguration } from './types';
@@ -0,0 +1,7 @@
export function getAncestors(context: any, node: any): any;
export function getFirstTokens(context: any, node: any, count: any): any;
export function getScope(context: any, node: any): any;
export function getSourceCode(context: any): any;
export function getText(context: any, ...args: any[]): any;
export function markVariableAsUsed(name: any, node: any, context: any): any;
//# sourceMappingURL=eslint.d.ts.map
@@ -0,0 +1,70 @@
{
"name": "supports-preserve-symlinks-flag",
"version": "1.0.0",
"description": "Determine if the current node version supports the `--preserve-symlinks` flag.",
"main": "./index.js",
"browser": "./browser.js",
"exports": {
".": [
{
"browser": "./browser.js",
"default": "./index.js"
},
"./index.js"
],
"./package.json": "./package.json"
},
"sideEffects": false,
"scripts": {
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"lint": "eslint --ext=js,mjs .",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "aud --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/inspect-js/node-supports-preserve-symlinks-flag.git"
},
"keywords": [
"node",
"flag",
"symlink",
"symlinks",
"preserve-symlinks"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag/issues"
},
"homepage": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag#readme",
"devDependencies": {
"@ljharb/eslint-config": "^20.1.0",
"aud": "^1.1.5",
"auto-changelog": "^2.3.0",
"eslint": "^8.6.0",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"semver": "^6.3.0",
"tape": "^5.4.0"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
}
}
@@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_sl=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(e);function r(e){return e%100==2}function a(e){return e%100==3||e%100==4}function s(e,n,t,s){var m=e+" ";switch(t){case"s":return n||s?"nekaj sekund":"nekaj sekundami";case"m":return n?"ena minuta":"eno minuto";case"mm":return r(e)?m+(n||s?"minuti":"minutama"):a(e)?m+(n||s?"minute":"minutami"):m+(n||s?"minut":"minutami");case"h":return n?"ena ura":"eno uro";case"hh":return r(e)?m+(n||s?"uri":"urama"):a(e)?m+(n||s?"ure":"urami"):m+(n||s?"ur":"urami");case"d":return n||s?"en dan":"enim dnem";case"dd":return r(e)?m+(n||s?"dneva":"dnevoma"):m+(n||s?"dni":"dnevi");case"M":return n||s?"en mesec":"enim mesecem";case"MM":return r(e)?m+(n||s?"meseca":"mesecema"):a(e)?m+(n||s?"mesece":"meseci"):m+(n||s?"mesecev":"meseci");case"y":return n||s?"eno leto":"enim letom";case"yy":return r(e)?m+(n||s?"leti":"letoma"):a(e)?m+(n||s?"leta":"leti"):m+(n||s?"let":"leti")}}var m={name:"sl",weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),weekStart:1,weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm",l:"D. M. YYYY"},relativeTime:{future:"čez %s",past:"pred %s",s:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s}};return t.default.locale(m,null,!0),m}));
@@ -0,0 +1,142 @@
# content-disposition
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][github-actions-ci-image]][github-actions-ci-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Create and parse HTTP `Content-Disposition` header
## Installation
```sh
$ npm install content-disposition
```
## API
```js
var contentDisposition = require('content-disposition')
```
### contentDisposition(filename, options)
Create an attachment `Content-Disposition` header value using the given file name,
if supplied. The `filename` is optional and if no file name is desired, but you
want to specify `options`, set `filename` to `undefined`.
```js
res.setHeader('Content-Disposition', contentDisposition('∫ maths.pdf'))
```
**note** HTTP headers are of the ISO-8859-1 character set. If you are writing this
header through a means different from `setHeader` in Node.js, you'll want to specify
the `'binary'` encoding in Node.js.
#### Options
`contentDisposition` accepts these properties in the options object.
##### fallback
If the `filename` option is outside ISO-8859-1, then the file name is actually
stored in a supplemental field for clients that support Unicode file names and
a ISO-8859-1 version of the file name is automatically generated.
This specifies the ISO-8859-1 file name to override the automatic generation or
disables the generation all together, defaults to `true`.
- A string will specify the ISO-8859-1 file name to use in place of automatic
generation.
- `false` will disable including a ISO-8859-1 file name and only include the
Unicode version (unless the file name is already ISO-8859-1).
- `true` will enable automatic generation if the file name is outside ISO-8859-1.
If the `filename` option is ISO-8859-1 and this option is specified and has a
different value, then the `filename` option is encoded in the extended field
and this set as the fallback field, even though they are both ISO-8859-1.
##### type
Specifies the disposition type, defaults to `"attachment"`. This can also be
`"inline"`, or any other value (all values except inline are treated like
`attachment`, but can convey additional information if both parties agree to
it). The type is normalized to lower-case.
### contentDisposition.parse(string)
```js
var disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt')
```
Parse a `Content-Disposition` header string. This automatically handles extended
("Unicode") parameters by decoding them and providing them under the standard
parameter name. This will return an object with the following properties (examples
are shown for the string `'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt'`):
- `type`: The disposition type (always lower case). Example: `'attachment'`
- `parameters`: An object of the parameters in the disposition (name of parameter
always lower case and extended versions replace non-extended versions). Example:
`{filename: "€ rates.txt"}`
## Examples
### Send a file for download
```js
var contentDisposition = require('content-disposition')
var destroy = require('destroy')
var fs = require('fs')
var http = require('http')
var onFinished = require('on-finished')
var filePath = '/path/to/public/plans.pdf'
http.createServer(function onRequest (req, res) {
// set headers
res.setHeader('Content-Type', 'application/pdf')
res.setHeader('Content-Disposition', contentDisposition(filePath))
// send file
var stream = fs.createReadStream(filePath)
stream.pipe(res)
onFinished(res, function () {
destroy(stream)
})
})
```
## Testing
```sh
$ npm test
```
## References
- [RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1][rfc-2616]
- [RFC 5987: Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters][rfc-5987]
- [RFC 6266: Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)][rfc-6266]
- [Test Cases for HTTP Content-Disposition header field (RFC 6266) and the Encodings defined in RFCs 2047, 2231 and 5987][tc-2231]
[rfc-2616]: https://tools.ietf.org/html/rfc2616
[rfc-5987]: https://tools.ietf.org/html/rfc5987
[rfc-6266]: https://tools.ietf.org/html/rfc6266
[tc-2231]: http://greenbytes.de/tech/tc2231/
## License
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/content-disposition.svg
[npm-url]: https://npmjs.org/package/content-disposition
[node-version-image]: https://img.shields.io/node/v/content-disposition.svg
[node-version-url]: https://nodejs.org/en/download
[coveralls-image]: https://img.shields.io/coveralls/jshttp/content-disposition.svg
[coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master
[downloads-image]: https://img.shields.io/npm/dm/content-disposition.svg
[downloads-url]: https://npmjs.org/package/content-disposition
[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/content-disposition/ci/master?label=ci
[github-actions-ci-url]: https://github.com/jshttp/content-disposition?query=workflow%3Aci
@@ -0,0 +1,41 @@
{
"name": "goober-should-forward-prop",
"amdName": "gooberForwardProp",
"version": "0.0.1",
"description": "The shouldForwardProp addon function for goober",
"sideEffects": false,
"main": "./dist/goober-should-forward-prop.cjs",
"module": "./dist/goober-should-forward-prop.esm.js",
"umd:main": "./dist/goober-should-forward-prop.umd.js",
"source": "./src/index.js",
"unpkg": "./dist/goober-should-forward-prop.umd.js",
"types": "./should-forward-prop.d.ts",
"type": "module",
"scripts": {
"build": "rm -rf dist && microbundle --entry src/index.js --name gooberForwardProp --no-sourcemap --generateTypes false",
"test": "jest --setupFiles ./jest.setup.js"
},
"repository": {
"type": "git",
"url": "https://github.com/cristianbote/goober.git",
"directory": "should-forward-prop"
},
"author": "Jonas De Vrient <devrient.jonas@gmail.com>",
"keywords": [
"goober",
"styled",
"should-forward-prop"
],
"license": "MIT",
"peerDependencies": {
"goober": "^2.0.18"
},
"devDependencies": {
"microbundle": "^0.14.2",
"jest": "^24.1.0",
"preact": "^10.5.6",
"@babel/plugin-transform-react-jsx": "^7.7.0",
"@babel/preset-env": "^7.3.1",
"babel-jest": "^24.1.0"
}
}
@@ -0,0 +1,77 @@
var OverloadYield = require("./OverloadYield.js");
var regenerator = require("./regenerator.js");
var regeneratorAsync = require("./regeneratorAsync.js");
var regeneratorAsyncGen = require("./regeneratorAsyncGen.js");
var regeneratorAsyncIterator = require("./regeneratorAsyncIterator.js");
var regeneratorKeys = require("./regeneratorKeys.js");
var regeneratorValues = require("./regeneratorValues.js");
function _regeneratorRuntime() {
"use strict";
var r = regenerator(),
e = r.m(_regeneratorRuntime),
t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
function n(r) {
var e = "function" == typeof r && r.constructor;
return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
}
var o = {
"throw": 1,
"return": 2,
"break": 3,
"continue": 3
};
function a(r) {
var e, t;
return function (n) {
e || (e = {
stop: function stop() {
return t(n.a, 2);
},
"catch": function _catch() {
return n.v;
},
abrupt: function abrupt(r, e) {
return t(n.a, o[r], e);
},
delegateYield: function delegateYield(r, o, a) {
return e.resultName = o, t(n.d, regeneratorValues(r), a);
},
finish: function finish(r) {
return t(n.f, r);
}
}, t = function t(r, _t, o) {
n.p = e.prev, n.n = e.next;
try {
return r(_t, o);
} finally {
e.next = n.n;
}
}), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
try {
return r.call(this, e);
} finally {
n.p = e.prev, n.n = e.next;
}
};
}
return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
return {
wrap: function wrap(e, t, n, o) {
return r.w(a(e), t, n, o && o.reverse());
},
isGeneratorFunction: n,
mark: r.m,
awrap: function awrap(r, e) {
return new OverloadYield(r, e);
},
AsyncIterator: regeneratorAsyncIterator,
async: function async(r, e, t, o, u) {
return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);
},
keys: regeneratorKeys,
values: regeneratorValues
};
}, module.exports.__esModule = true, module.exports["default"] = module.exports)();
}
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,46 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isInSubnet = isInSubnet;
exports.isCorrect = isCorrect;
exports.numberToPaddedHex = numberToPaddedHex;
exports.stringToPaddedHex = stringToPaddedHex;
exports.testBit = testBit;
function isInSubnet(address) {
if (this.subnetMask < address.subnetMask) {
return false;
}
if (this.mask(address.subnetMask) === address.mask()) {
return true;
}
return false;
}
function isCorrect(defaultBits) {
return function () {
if (this.addressMinusSuffix !== this.correctForm()) {
return false;
}
if (this.subnetMask === defaultBits && !this.parsedSubnet) {
return true;
}
return this.parsedSubnet === String(this.subnetMask);
};
}
function numberToPaddedHex(number) {
return number.toString(16).padStart(2, '0');
}
function stringToPaddedHex(numberString) {
return numberToPaddedHex(parseInt(numberString, 10));
}
/**
* @param binaryValue Binary representation of a value (e.g. `10`)
* @param position Byte position, where 0 is the least significant bit
*/
function testBit(binaryValue, position) {
const { length } = binaryValue;
if (position > length) {
return false;
}
const positionInString = length - position;
return binaryValue.substring(positionInString, positionInString + 1) === '1';
}
//# sourceMappingURL=common.js.map
@@ -0,0 +1,104 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/use-pagination-item.ts
var use_pagination_item_exports = {};
__export(use_pagination_item_exports, {
usePaginationItem: () => usePaginationItem
});
module.exports = __toCommonJS(use_pagination_item_exports);
var import_react = require("react");
var import_utils = require("@react-aria/utils");
var import_shared_utils = require("@heroui/shared-utils");
var import_react_utils = require("@heroui/react-utils");
var import_interactions = require("@react-aria/interactions");
var import_focus = require("@react-aria/focus");
function usePaginationItem(props) {
const {
as,
ref,
value,
children,
isActive,
isDisabled,
onPress,
onClick,
getAriaLabel,
className,
...otherProps
} = props;
const isLink = !!(props == null ? void 0 : props.href);
const Component = as || isLink ? "a" : "li";
const shouldFilterDOMProps = typeof Component === "string";
const domRef = (0, import_react_utils.useDOMRef)(ref);
const router = (0, import_utils.useRouter)();
const ariaLabel = (0, import_react.useMemo)(
() => isActive ? `${getAriaLabel == null ? void 0 : getAriaLabel(value)} active` : getAriaLabel == null ? void 0 : getAriaLabel(value),
[value, isActive]
);
const { isPressed, pressProps } = (0, import_interactions.usePress)({
isDisabled,
onPress
});
const { focusProps, isFocused, isFocusVisible } = (0, import_focus.useFocusRing)({});
const { isHovered, hoverProps } = (0, import_interactions.useHover)({ isDisabled });
const getItemProps = (props2 = {}) => {
return {
ref: domRef,
role: "button",
tabIndex: isDisabled ? -1 : 0,
"aria-label": ariaLabel,
"aria-current": (0, import_shared_utils.dataAttr)(isActive),
"aria-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
"data-active": (0, import_shared_utils.dataAttr)(isActive),
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
"data-hover": (0, import_shared_utils.dataAttr)(isHovered),
"data-pressed": (0, import_shared_utils.dataAttr)(isPressed),
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
...(0, import_shared_utils.mergeProps)(
props2,
pressProps,
focusProps,
hoverProps,
(0, import_react_utils.filterDOMProps)(otherProps, {
enabled: shouldFilterDOMProps
})
),
className: (0, import_shared_utils.clsx)(className, props2.className),
onClick: (e) => {
(0, import_shared_utils.chain)(pressProps == null ? void 0 : pressProps.onClick, onClick)(e);
(0, import_utils.handleLinkClick)(e, router, props2.href, props2.routerOptions);
}
};
};
return {
Component,
children,
ariaLabel,
isFocused,
isFocusVisible,
getItemProps
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
usePaginationItem
});
@@ -0,0 +1,605 @@
/*! *****************************************************************************
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.symbol" />
interface SymbolConstructor {
/**
* A method that returns the default iterator for an object. Called by the semantics of the
* for-of statement.
*/
readonly iterator: unique symbol;
}
interface IteratorYieldResult<TYield> {
done?: false;
value: TYield;
}
interface IteratorReturnResult<TReturn> {
done: true;
value: TReturn;
}
type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
interface Iterator<T, TReturn = any, TNext = any> {
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
next(...[value]: [] | [TNext]): IteratorResult<T, TReturn>;
return?(value?: TReturn): IteratorResult<T, TReturn>;
throw?(e?: any): IteratorResult<T, TReturn>;
}
interface Iterable<T, TReturn = any, TNext = any> {
[Symbol.iterator](): Iterator<T, TReturn, TNext>;
}
/**
* Describes a user-defined {@link Iterator} that is also iterable.
*/
interface IterableIterator<T, TReturn = any, TNext = any> extends Iterator<T, TReturn, TNext> {
[Symbol.iterator](): IterableIterator<T, TReturn, TNext>;
}
/**
* Describes an {@link Iterator} produced by the runtime that inherits from the intrinsic `Iterator.prototype`.
*/
interface IteratorObject<T, TReturn = unknown, TNext = unknown> extends Iterator<T, TReturn, TNext> {
[Symbol.iterator](): IteratorObject<T, TReturn, TNext>;
}
/**
* Defines the `TReturn` type used for built-in iterators produced by `Array`, `Map`, `Set`, and others.
* This is `undefined` when `strictBuiltInIteratorReturn` is `true`; otherwise, this is `any`.
*/
type BuiltinIteratorReturn = intrinsic;
interface ArrayIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): ArrayIterator<T>;
}
interface Array<T> {
/** Iterator */
[Symbol.iterator](): ArrayIterator<T>;
/**
* Returns an iterable of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, T]>;
/**
* Returns an iterable of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an iterable of values in the array
*/
values(): ArrayIterator<T>;
}
interface ArrayConstructor {
/**
* Creates an array from an iterable object.
* @param iterable An iterable object to convert to an array.
*/
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
/**
* Creates an array from an iterable object.
* @param iterable An iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
}
interface ReadonlyArray<T> {
/** Iterator of values in the array. */
[Symbol.iterator](): ArrayIterator<T>;
/**
* Returns an iterable of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, T]>;
/**
* Returns an iterable of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an iterable of values in the array
*/
values(): ArrayIterator<T>;
}
interface IArguments {
/** Iterator */
[Symbol.iterator](): ArrayIterator<any>;
}
interface MapIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): MapIterator<T>;
}
interface Map<K, V> {
/** Returns an iterable of entries in the map. */
[Symbol.iterator](): MapIterator<[K, V]>;
/**
* Returns an iterable of key, value pairs for every entry in the map.
*/
entries(): MapIterator<[K, V]>;
/**
* Returns an iterable of keys in the map
*/
keys(): MapIterator<K>;
/**
* Returns an iterable of values in the map
*/
values(): MapIterator<V>;
}
interface ReadonlyMap<K, V> {
/** Returns an iterable of entries in the map. */
[Symbol.iterator](): MapIterator<[K, V]>;
/**
* Returns an iterable of key, value pairs for every entry in the map.
*/
entries(): MapIterator<[K, V]>;
/**
* Returns an iterable of keys in the map
*/
keys(): MapIterator<K>;
/**
* Returns an iterable of values in the map
*/
values(): MapIterator<V>;
}
interface MapConstructor {
new (): Map<any, any>;
new <K, V>(iterable?: Iterable<readonly [K, V]> | null): Map<K, V>;
}
interface WeakMap<K extends WeakKey, V> {}
interface WeakMapConstructor {
new <K extends WeakKey, V>(iterable: Iterable<readonly [K, V]>): WeakMap<K, V>;
}
interface SetIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): SetIterator<T>;
}
interface Set<T> {
/** Iterates over values in the set. */
[Symbol.iterator](): SetIterator<T>;
/**
* Returns an iterable of [v,v] pairs for every value `v` in the set.
*/
entries(): SetIterator<[T, T]>;
/**
* Despite its name, returns an iterable of the values in the set.
*/
keys(): SetIterator<T>;
/**
* Returns an iterable of values in the set.
*/
values(): SetIterator<T>;
}
interface ReadonlySet<T> {
/** Iterates over values in the set. */
[Symbol.iterator](): SetIterator<T>;
/**
* Returns an iterable of [v,v] pairs for every value `v` in the set.
*/
entries(): SetIterator<[T, T]>;
/**
* Despite its name, returns an iterable of the values in the set.
*/
keys(): SetIterator<T>;
/**
* Returns an iterable of values in the set.
*/
values(): SetIterator<T>;
}
interface SetConstructor {
new <T>(iterable?: Iterable<T> | null): Set<T>;
}
interface WeakSet<T extends WeakKey> {}
interface WeakSetConstructor {
new <T extends WeakKey = WeakKey>(iterable: Iterable<T>): WeakSet<T>;
}
interface Promise<T> {}
interface PromiseConstructor {
/**
* Creates a Promise that is resolved with an array of results when all of the provided Promises
* resolve, or rejected when any Promise is rejected.
* @param values An iterable of Promises.
* @returns A new Promise.
*/
all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
/**
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
* or rejected.
* @param values An iterable of Promises.
* @returns A new Promise.
*/
race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
}
interface StringIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): StringIterator<T>;
}
interface String {
/** Iterator */
[Symbol.iterator](): StringIterator<string>;
}
interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Int8ArrayConstructor {
new (elements: Iterable<number>): Int8Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
*/
from(elements: Iterable<number>): Int8Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array<ArrayBuffer>;
}
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Uint8ArrayConstructor {
new (elements: Iterable<number>): Uint8Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
*/
from(elements: Iterable<number>): Uint8Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array<ArrayBuffer>;
}
interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Uint8ClampedArrayConstructor {
new (elements: Iterable<number>): Uint8ClampedArray<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
*/
from(elements: Iterable<number>): Uint8ClampedArray<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray<ArrayBuffer>;
}
interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Int16ArrayConstructor {
new (elements: Iterable<number>): Int16Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
*/
from(elements: Iterable<number>): Int16Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array<ArrayBuffer>;
}
interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Uint16ArrayConstructor {
new (elements: Iterable<number>): Uint16Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
*/
from(elements: Iterable<number>): Uint16Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array<ArrayBuffer>;
}
interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Int32ArrayConstructor {
new (elements: Iterable<number>): Int32Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
*/
from(elements: Iterable<number>): Int32Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array<ArrayBuffer>;
}
interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Uint32ArrayConstructor {
new (elements: Iterable<number>): Uint32Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
*/
from(elements: Iterable<number>): Uint32Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array<ArrayBuffer>;
}
interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Float32ArrayConstructor {
new (elements: Iterable<number>): Float32Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
*/
from(elements: Iterable<number>): Float32Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array<ArrayBuffer>;
}
interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
[Symbol.iterator](): ArrayIterator<number>;
/**
* Returns an array of key, value pairs for every entry in the array
*/
entries(): ArrayIterator<[number, number]>;
/**
* Returns an list of keys in the array
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the array
*/
values(): ArrayIterator<number>;
}
interface Float64ArrayConstructor {
new (elements: Iterable<number>): Float64Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
*/
from(elements: Iterable<number>): Float64Array<ArrayBuffer>;
/**
* Creates an array from an array-like or iterable object.
* @param elements An iterable object to convert to an array.
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array<ArrayBuffer>;
}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('mergeWith', require('../mergeWith'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,406 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {add, addTime, addZoned, constrain, constrainTime, cycleDate, cycleTime, cycleZoned, set, setTime, setZoned, subtract, subtractTime, subtractZoned} from './manipulation';
import {AnyCalendarDate, AnyTime, Calendar, CycleOptions, CycleTimeOptions, DateDuration, DateField, DateFields, DateTimeDuration, Disambiguation, TimeDuration, TimeField, TimeFields} from './types';
import {compareDate, compareTime} from './queries';
import {dateTimeToString, dateToString, timeToString, zonedDateTimeToString} from './string';
import {GregorianCalendar} from './calendars/GregorianCalendar';
import {toCalendarDateTime, toDate, toZoned, zonedToDate} from './conversion';
function shiftArgs(args: any[]) {
let calendar: Calendar = typeof args[0] === 'object'
? args.shift()
: new GregorianCalendar();
let era: string;
if (typeof args[0] === 'string') {
era = args.shift();
} else {
let eras = calendar.getEras();
era = eras[eras.length - 1];
}
let year = args.shift();
let month = args.shift();
let day = args.shift();
return [calendar, era, year, month, day];
}
/** A CalendarDate represents a date without any time components in a specific calendar system. */
export class CalendarDate {
// This prevents TypeScript from allowing other types with the same fields to match.
// i.e. a ZonedDateTime should not be be passable to a parameter that expects CalendarDate.
// If that behavior is desired, use the AnyCalendarDate interface instead.
// @ts-ignore
#type;
/** The calendar system associated with this date, e.g. Gregorian. */
public readonly calendar: Calendar;
/** The calendar era for this date, e.g. "BC" or "AD". */
public readonly era: string;
/** The year of this date within the era. */
public readonly year: number;
/**
* The month number within the year. Note that some calendar systems such as Hebrew
* may have a variable number of months per year. Therefore, month numbers may not
* always correspond to the same month names in different years.
*/
public readonly month: number;
/** The day number within the month. */
public readonly day: number;
constructor(year: number, month: number, day: number);
constructor(era: string, year: number, month: number, day: number);
constructor(calendar: Calendar, year: number, month: number, day: number);
constructor(calendar: Calendar, era: string, year: number, month: number, day: number);
constructor(...args: any[]) {
let [calendar, era, year, month, day] = shiftArgs(args);
this.calendar = calendar;
this.era = era;
this.year = year;
this.month = month;
this.day = day;
constrain(this);
}
/** Returns a copy of this date. */
copy(): CalendarDate {
if (this.era) {
return new CalendarDate(this.calendar, this.era, this.year, this.month, this.day);
} else {
return new CalendarDate(this.calendar, this.year, this.month, this.day);
}
}
/** Returns a new `CalendarDate` with the given duration added to it. */
add(duration: DateDuration): CalendarDate {
return add(this, duration);
}
/** Returns a new `CalendarDate` with the given duration subtracted from it. */
subtract(duration: DateDuration): CalendarDate {
return subtract(this, duration);
}
/** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
set(fields: DateFields): CalendarDate {
return set(this, fields);
}
/**
* Returns a new `CalendarDate` with the given field adjusted by a specified amount.
* When the resulting value reaches the limits of the field, it wraps around.
*/
cycle(field: DateField, amount: number, options?: CycleOptions): CalendarDate {
return cycleDate(this, field, amount, options);
}
/** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
toDate(timeZone: string): Date {
return toDate(this, timeZone);
}
/** Converts the date to an ISO 8601 formatted string. */
toString(): string {
return dateToString(this);
}
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
compare(b: AnyCalendarDate): number {
return compareDate(this, b);
}
}
/** A Time represents a clock time without any date components. */
export class Time {
// This prevents TypeScript from allowing other types with the same fields to match.
// @ts-ignore
#type;
/** The hour, numbered from 0 to 23. */
public readonly hour: number;
/** The minute in the hour. */
public readonly minute: number;
/** The second in the minute. */
public readonly second: number;
/** The millisecond in the second. */
public readonly millisecond: number;
constructor(
hour: number = 0,
minute: number = 0,
second: number = 0,
millisecond: number = 0
) {
this.hour = hour;
this.minute = minute;
this.second = second;
this.millisecond = millisecond;
constrainTime(this);
}
/** Returns a copy of this time. */
copy(): Time {
return new Time(this.hour, this.minute, this.second, this.millisecond);
}
/** Returns a new `Time` with the given duration added to it. */
add(duration: TimeDuration): Time {
return addTime(this, duration);
}
/** Returns a new `Time` with the given duration subtracted from it. */
subtract(duration: TimeDuration): Time {
return subtractTime(this, duration);
}
/** Returns a new `Time` with the given fields set to the provided values. Other fields will be constrained accordingly. */
set(fields: TimeFields): Time {
return setTime(this, fields);
}
/**
* Returns a new `Time` with the given field adjusted by a specified amount.
* When the resulting value reaches the limits of the field, it wraps around.
*/
cycle(field: TimeField, amount: number, options?: CycleTimeOptions): Time {
return cycleTime(this, field, amount, options);
}
/** Converts the time to an ISO 8601 formatted string. */
toString(): string {
return timeToString(this);
}
/** Compares this time with another. A negative result indicates that this time is before the given one, and a positive time indicates that it is after. */
compare(b: AnyTime): number {
return compareTime(this, b);
}
}
/** A CalendarDateTime represents a date and time without a time zone, in a specific calendar system. */
export class CalendarDateTime {
// This prevents TypeScript from allowing other types with the same fields to match.
// @ts-ignore
#type;
/** The calendar system associated with this date, e.g. Gregorian. */
public readonly calendar: Calendar;
/** The calendar era for this date, e.g. "BC" or "AD". */
public readonly era: string;
/** The year of this date within the era. */
public readonly year: number;
/**
* The month number within the year. Note that some calendar systems such as Hebrew
* may have a variable number of months per year. Therefore, month numbers may not
* always correspond to the same month names in different years.
*/
public readonly month: number;
/** The day number within the month. */
public readonly day: number;
/** The hour in the day, numbered from 0 to 23. */
public readonly hour: number;
/** The minute in the hour. */
public readonly minute: number;
/** The second in the minute. */
public readonly second: number;
/** The millisecond in the second. */
public readonly millisecond: number;
constructor(year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(era: string, year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(calendar: Calendar, year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(calendar: Calendar, era: string, year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(...args: any[]) {
let [calendar, era, year, month, day] = shiftArgs(args);
this.calendar = calendar;
this.era = era;
this.year = year;
this.month = month;
this.day = day;
this.hour = args.shift() || 0;
this.minute = args.shift() || 0;
this.second = args.shift() || 0;
this.millisecond = args.shift() || 0;
constrain(this);
}
/** Returns a copy of this date. */
copy(): CalendarDateTime {
if (this.era) {
return new CalendarDateTime(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
} else {
return new CalendarDateTime(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
}
}
/** Returns a new `CalendarDateTime` with the given duration added to it. */
add(duration: DateTimeDuration): CalendarDateTime {
return add(this, duration);
}
/** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
subtract(duration: DateTimeDuration): CalendarDateTime {
return subtract(this, duration);
}
/** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
set(fields: DateFields & TimeFields): CalendarDateTime {
return set(setTime(this, fields), fields);
}
/**
* Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
* When the resulting value reaches the limits of the field, it wraps around.
*/
cycle(field: DateField | TimeField, amount: number, options?: CycleTimeOptions): CalendarDateTime {
switch (field) {
case 'era':
case 'year':
case 'month':
case 'day':
return cycleDate(this, field, amount, options);
default:
return cycleTime(this, field, amount, options);
}
}
/** Converts the date to a native JavaScript Date object in the given time zone. */
toDate(timeZone: string, disambiguation?: Disambiguation): Date {
return toDate(this, timeZone, disambiguation);
}
/** Converts the date to an ISO 8601 formatted string. */
toString(): string {
return dateTimeToString(this);
}
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
compare(b: CalendarDate | CalendarDateTime | ZonedDateTime): number {
let res = compareDate(this, b);
if (res === 0) {
return compareTime(this, toCalendarDateTime(b));
}
return res;
}
}
/** A ZonedDateTime represents a date and time in a specific time zone and calendar system. */
export class ZonedDateTime {
// This prevents TypeScript from allowing other types with the same fields to match.
// @ts-ignore
#type;
/** The calendar system associated with this date, e.g. Gregorian. */
public readonly calendar: Calendar;
/** The calendar era for this date, e.g. "BC" or "AD". */
public readonly era: string;
/** The year of this date within the era. */
public readonly year: number;
/**
* The month number within the year. Note that some calendar systems such as Hebrew
* may have a variable number of months per year. Therefore, month numbers may not
* always correspond to the same month names in different years.
*/
public readonly month: number;
/** The day number within the month. */
public readonly day: number;
/** The hour in the day, numbered from 0 to 23. */
public readonly hour: number;
/** The minute in the hour. */
public readonly minute: number;
/** The second in the minute. */
public readonly second: number;
/** The millisecond in the second. */
public readonly millisecond: number;
/** The IANA time zone identifier that this date and time is represented in. */
public readonly timeZone: string;
/** The UTC offset for this time, in milliseconds. */
public readonly offset: number;
constructor(year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(era: string, year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(calendar: Calendar, year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(calendar: Calendar, era: string, year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);
constructor(...args: any[]) {
let [calendar, era, year, month, day] = shiftArgs(args);
let timeZone = args.shift();
let offset = args.shift();
this.calendar = calendar;
this.era = era;
this.year = year;
this.month = month;
this.day = day;
this.timeZone = timeZone;
this.offset = offset;
this.hour = args.shift() || 0;
this.minute = args.shift() || 0;
this.second = args.shift() || 0;
this.millisecond = args.shift() || 0;
constrain(this);
}
/** Returns a copy of this date. */
copy(): ZonedDateTime {
if (this.era) {
return new ZonedDateTime(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
} else {
return new ZonedDateTime(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
}
}
/** Returns a new `ZonedDateTime` with the given duration added to it. */
add(duration: DateTimeDuration): ZonedDateTime {
return addZoned(this, duration);
}
/** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
subtract(duration: DateTimeDuration): ZonedDateTime {
return subtractZoned(this, duration);
}
/** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
set(fields: DateFields & TimeFields, disambiguation?: Disambiguation): ZonedDateTime {
return setZoned(this, fields, disambiguation);
}
/**
* Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
* When the resulting value reaches the limits of the field, it wraps around.
*/
cycle(field: DateField | TimeField, amount: number, options?: CycleTimeOptions): ZonedDateTime {
return cycleZoned(this, field, amount, options);
}
/** Converts the date to a native JavaScript Date object. */
toDate(): Date {
return zonedToDate(this);
}
/** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
toString(): string {
return zonedDateTimeToString(this);
}
/** Converts the date to an ISO 8601 formatted string in UTC. */
toAbsoluteString(): string {
return this.toDate().toISOString();
}
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
compare(b: CalendarDate | CalendarDateTime | ZonedDateTime): number {
// TODO: Is this a bad idea??
return this.toDate().getTime() - toZoned(b, this.timeZone).toDate().getTime();
}
}
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from '../types.mjs';
import 'react';
declare const PlusFilledIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { PlusFilledIcon };
@@ -0,0 +1 @@
{"name":"@react-types/select","version":"3.9.8","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105972,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"package.json":{"checkedAt":1794532108988,"integrity":"sha512-ap044jgyp+GtW6Qmz664wPFx6g+zVrV92OaPkfH2DwU54uzp6B6n6Z1j9bkpiEBEdUuBON0jIE6bqv4f/noJng==","mode":420,"size":524},"README.md":{"checkedAt":1794532108988,"integrity":"sha512-BRo5vG5AHv8tP8yYaEcE8qSraTP6tm08wRfOXAThJJVIojaetGmSAD2dCWChvg394us1mIchUieuSlMlhx+lVg==","mode":420,"size":136},"src/index.d.ts":{"checkedAt":1794532108988,"integrity":"sha512-dvYIG06kEnPlPGMtm2CGNTMzpSwApnNuSk9Io57jFCpGTA1QcNZNG0r5GwwcQIwoOvK/brl/ZGCpg1FRzJymOQ==","mode":420,"size":2696}}}
@@ -0,0 +1,27 @@
var ListCache = require('./_ListCache'),
stackClear = require('./_stackClear'),
stackDelete = require('./_stackDelete'),
stackGet = require('./_stackGet'),
stackHas = require('./_stackHas'),
stackSet = require('./_stackSet');
/**
* Creates a stack cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
var data = this.__data__ = new ListCache(entries);
this.size = data.size;
}
// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
module.exports = Stack;
@@ -0,0 +1 @@
{"name":"debug","version":"4.4.3","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532088687,"integrity":"sha512-NInsN4NAPaqJnsW9idjSOnOGqyzqYkPMzLI9LNemnHNfKFLWamw1cdIqe/ckgjFzyMEVxOSbkSAzFjgUXj3AWA==","mode":420,"size":1139},"src/browser.js":{"checkedAt":1794532088688,"integrity":"sha512-bm1Xl+u+Y9cSrVLWJoBOTrRzutCNPB9ZCOaKb5gyEo6vPaIn/2SempPdTTAYsEHFhMTXuVs771F36XbbeYkOtA==","mode":420,"size":6103},"src/common.js":{"checkedAt":1794532088688,"integrity":"sha512-IgOWSs1NCRq+RTlwWUKxDMbGgvD+qivPrrFFG01TisTu2FF+uKpQApaOMv3zU8nfm2ztyz7WOkIZ2h9Wxn47BQ==","mode":420,"size":6915},"src/index.js":{"checkedAt":1794532088688,"integrity":"sha512-T6qHTZ2GL/ySFSh0LE8f6KmyKjWHYPbpP87xOFI1dTKagBzpZZ7Y6WsCtz5YGz6Z2Rlz4imBs1j/teQxA6U2wg==","mode":420,"size":314},"src/node.js":{"checkedAt":1794532088688,"integrity":"sha512-gBfnMMuNnwz0xfXDzpB04A775Z8EHtltM27MPP31oiiS1t1PniIjl/APnFRqn+7I9I0x9pcvngMkwuJw18qPPw==","mode":420,"size":4728},"package.json":{"checkedAt":1794532088689,"integrity":"sha512-XlT/K+GEGYDZGPnx7G5lm+LLJejNvopVTnNkxRub968MyuF+6gRCfIZD92ovegwXRoL+UjrpuQeI4zLNzxmDHg==","mode":420,"size":1479},"README.md":{"checkedAt":1794532088689,"integrity":"sha512-K3k3SQMGVqegO33lVRs/9PLMMqDKH0YwzyOV9i5ZapahMn6wIuLBzN4Y/WwWAIahFqNtjkX18SoJIvFI8jQ1Og==","mode":420,"size":22115}}}
@@ -0,0 +1,8 @@
import type { COSEALG } from './cose.js';
import type { Uint8Array_ } from '../types/index.js';
/**
* Returns hash digest of the given data, using the given algorithm when provided. Defaults to using
* SHA-256.
*/
export declare function toHash(data: Uint8Array_ | string, algorithm?: COSEALG): Promise<Uint8Array_>;
//# sourceMappingURL=toHash.d.ts.map
@@ -0,0 +1,12 @@
Copyright (c) 2014, Hugh Kennedy
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,38 @@
import {
useKbd
} from "./chunk-33JVVCIB.mjs";
import {
kbdKeysLabelMap,
kbdKeysMap
} from "./chunk-7BVYOJX6.mjs";
// src/kbd.tsx
import { useMemo } from "react";
import { forwardRef } from "@heroui/system-rsc";
import { jsx, jsxs } from "react/jsx-runtime";
var Kbd = forwardRef((props, ref) => {
const { Component, children, slots, classNames, keysToRender, getKbdProps } = useKbd({
...props
});
const keysContent = useMemo(() => {
return keysToRender.map((key) => /* @__PURE__ */ jsx(
"abbr",
{
className: slots.abbr({ class: classNames == null ? void 0 : classNames.abbr }),
title: kbdKeysLabelMap[key],
children: kbdKeysMap[key]
},
key
));
}, [keysToRender]);
return /* @__PURE__ */ jsxs(Component, { ref, ...getKbdProps(), children: [
keysContent,
children && /* @__PURE__ */ jsx("span", { className: slots.content({ class: classNames == null ? void 0 : classNames.content }), children })
] });
});
Kbd.displayName = "HeroUI.Kbd";
var kbd_default = Kbd;
export {
kbd_default
};
@@ -0,0 +1,83 @@
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core", "./x64-core", "./sha512"], factory);
}
else {
// Global (browser)
factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
(function () {
// Shortcuts
var C = CryptoJS;
var C_x64 = C.x64;
var X64Word = C_x64.Word;
var X64WordArray = C_x64.WordArray;
var C_algo = C.algo;
var SHA512 = C_algo.SHA512;
/**
* SHA-384 hash algorithm.
*/
var SHA384 = C_algo.SHA384 = SHA512.extend({
_doReset: function () {
this._hash = new X64WordArray.init([
new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),
new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),
new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),
new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)
]);
},
_doFinalize: function () {
var hash = SHA512._doFinalize.call(this);
hash.sigBytes -= 16;
return hash;
}
});
/**
* Shortcut function to the hasher's object interface.
*
* @param {WordArray|string} message The message to hash.
*
* @return {WordArray} The hash.
*
* @static
*
* @example
*
* var hash = CryptoJS.SHA384('message');
* var hash = CryptoJS.SHA384(wordArray);
*/
C.SHA384 = SHA512._createHelper(SHA384);
/**
* Shortcut function to the HMAC's object interface.
*
* @param {WordArray|string} message The message to hash.
* @param {WordArray|string} key The secret key.
*
* @return {WordArray} The HMAC.
*
* @static
*
* @example
*
* var hmac = CryptoJS.HmacSHA384(message, key);
*/
C.HmacSHA384 = SHA512._createHmacHelper(SHA384);
}());
return CryptoJS.SHA384;
}));
@@ -0,0 +1,39 @@
{
"name": "fast-levenshtein",
"version": "2.0.6",
"description": "Efficient implementation of Levenshtein algorithm with locale-specific collator support.",
"main": "levenshtein.js",
"files": [
"levenshtein.js"
],
"scripts": {
"build": "grunt build",
"prepublish": "npm run build",
"benchmark": "grunt benchmark",
"test": "mocha"
},
"devDependencies": {
"chai": "~1.5.0",
"grunt": "~0.4.1",
"grunt-benchmark": "~0.2.0",
"grunt-cli": "^1.2.0",
"grunt-contrib-jshint": "~0.4.3",
"grunt-contrib-uglify": "~0.2.0",
"grunt-mocha-test": "~0.2.2",
"grunt-npm-install": "~0.1.0",
"load-grunt-tasks": "~0.6.0",
"lodash": "^4.0.1",
"mocha": "~1.9.0"
},
"repository": {
"type": "git",
"url": "https://github.com/hiddentao/fast-levenshtein.git"
},
"keywords": [
"levenshtein",
"distance",
"string"
],
"author": "Ramesh Nair <ram@hiddentao.com> (http://www.hiddentao.com/)",
"license": "MIT"
}
@@ -0,0 +1,23 @@
The MIT License (Expat)
Copyright (c) 2014 Andrew Kelley
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,20 @@
import { MappedResult } from '../mapped/index.mjs';
import { IndexPropertyKeys } from './indexed-property-keys.mjs';
import { Index } from './index.mjs';
// prettier-ignore
function FromProperties(type, properties, options) {
const result = {};
for (const K2 of Object.getOwnPropertyNames(properties)) {
result[K2] = Index(type, IndexPropertyKeys(properties[K2]), options);
}
return result;
}
// prettier-ignore
function FromMappedResult(type, mappedResult, options) {
return FromProperties(type, mappedResult.properties, options);
}
// prettier-ignore
export function IndexFromMappedResult(type, mappedResult, options) {
const properties = FromMappedResult(type, mappedResult, options);
return MappedResult(properties);
}
@@ -0,0 +1,12 @@
import type Quill from '../core.js';
import type { Bounds } from '../core/selection.js';
declare class Tooltip {
quill: Quill;
boundsContainer: HTMLElement;
root: HTMLDivElement;
constructor(quill: Quill, boundsContainer?: HTMLElement);
hide(): void;
position(reference: Bounds): number;
show(): void;
}
export default Tooltip;
@@ -0,0 +1 @@
{"name":"isexe","version":"2.0.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532094097,"integrity":"sha512-RLgxDEcWHzAApGq5qcTqlQGJT/aZODLkrqT/EFdia4/1aUIET3L669j3YDzwXiw8T9GU/4OmDZzr4lTx3+WCpw==","mode":420,"size":786},".npmignore":{"checkedAt":1794532094097,"integrity":"sha512-SEouI7JHh5Shi3XxY4b0OF6EiWcsI/tXVosxil5ZB/U5C9LHyrMvjcZ1hqx0HLdDIyIsW7LRkXlEbgQl2hFZAQ==","mode":420,"size":23},"README.md":{"checkedAt":1794532094097,"integrity":"sha512-DJwm6tmkYCGZ0orwFZ65yjJHju3B00E/DTTRk3SUWItLj/TnEbN2A+57SP++UOFOD3idMToVRx3aZqh/DwYwmA==","mode":420,"size":1395},"LICENSE":{"checkedAt":1794532089714,"integrity":"sha512-P6dI5Z+zrwxSk1MIRPqpYG2ScYNkidLIATQXd50QzBgBh/XmcEd/nsd9NB4O9k6rfc+4dsY5DwJ7xvhpoS0PRg==","mode":420,"size":765},"windows.js":{"checkedAt":1794532094097,"integrity":"sha512-5E6xcwFq7CTHcmP89dYkaK7mYDVnX9TcRWM3XtrEA+8P+iDGBH/qT0a1Ij9AIPVUR1hl4u1n1RFY4xr+oJf/BQ==","mode":420,"size":890},"index.js":{"checkedAt":1794532094097,"integrity":"sha512-iOrLyK6qYjFi5E34Sa7N0eNQQ7cm2lZ+Spfia/A1whE1fVXCDgy/iQBYO3zrFnfBgtl/qY2yi4bfLQyG2aJRew==","mode":420,"size":1192},"mode.js":{"checkedAt":1794532094097,"integrity":"sha512-/WVikdv8FbAnjlMfN/NhLqwQusbn9RbhRrlpT9FJ9H46fq2MGjo81B2rrX0NLdotl/bvlVnw+jXV3oPvh+QWjw==","mode":420,"size":909},"test/basic.js":{"checkedAt":1794532094097,"integrity":"sha512-elrA+uh57y6cfPrLNvcorbpYDuOA3sI2R+cTGIH1Jk+nq6Y8e4XBd75qLOZwJzbvljTkUrc49SlY58JUcWzZcA==","mode":420,"size":4996}}}
@@ -0,0 +1,9 @@
/**
* @param {Array<Event>} events
* Events.
* @returns {Array<Event>}
* Events.
*/
export function postprocess(events: Array<Event>): Array<Event>;
import type { Event } from 'micromark-util-types';
//# sourceMappingURL=postprocess.d.ts.map
@@ -0,0 +1,158 @@
/**
* @fileoverview Rule to flag use of comma operator
* @author Brandon Mills
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow comma operators",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-sequences",
},
schema: [
{
type: "object",
properties: {
allowInParentheses: {
type: "boolean",
},
},
additionalProperties: false,
},
],
defaultOptions: [
{
allowInParentheses: true,
},
],
messages: {
unexpectedCommaExpression: "Unexpected use of comma operator.",
},
},
create(context) {
const [{ allowInParentheses }] = context.options;
const sourceCode = context.sourceCode;
/**
* Parts of the grammar that are required to have parens.
*/
const parenthesized = {
DoWhileStatement: "test",
IfStatement: "test",
SwitchStatement: "discriminant",
WhileStatement: "test",
WithStatement: "object",
ArrowFunctionExpression: "body",
/*
* Omitting CallExpression - commas are parsed as argument separators
* Omitting NewExpression - commas are parsed as argument separators
* Omitting ForInStatement - parts aren't individually parenthesised
* Omitting ForStatement - parts aren't individually parenthesised
*/
};
/**
* Determines whether a node is required by the grammar to be wrapped in
* parens, e.g. the test of an if statement.
* @param {ASTNode} node The AST node
* @returns {boolean} True if parens around node belong to parent node.
*/
function requiresExtraParens(node) {
return (
node.parent &&
parenthesized[node.parent.type] &&
node === node.parent[parenthesized[node.parent.type]]
);
}
/**
* Check if a node is wrapped in parens.
* @param {ASTNode} node The AST node
* @returns {boolean} True if the node has a paren on each side.
*/
function isParenthesised(node) {
return astUtils.isParenthesised(sourceCode, node);
}
/**
* Check if a node is wrapped in two levels of parens.
* @param {ASTNode} node The AST node
* @returns {boolean} True if two parens surround the node on each side.
*/
function isParenthesisedTwice(node) {
const previousToken = sourceCode.getTokenBefore(node, 1),
nextToken = sourceCode.getTokenAfter(node, 1);
return (
isParenthesised(node) &&
previousToken &&
nextToken &&
astUtils.isOpeningParenToken(previousToken) &&
previousToken.range[1] <= node.range[0] &&
astUtils.isClosingParenToken(nextToken) &&
nextToken.range[0] >= node.range[1]
);
}
return {
SequenceExpression(node) {
// Always allow sequences in for statement update
if (
node.parent.type === "ForStatement" &&
(node === node.parent.init || node === node.parent.update)
) {
return;
}
// Wrapping a sequence in extra parens indicates intent
if (allowInParentheses) {
if (requiresExtraParens(node)) {
if (isParenthesisedTwice(node)) {
return;
}
} else {
if (isParenthesised(node)) {
return;
}
}
}
const firstCommaToken = sourceCode.getTokenAfter(
node.expressions[0],
astUtils.isCommaToken,
);
context.report({
node,
loc: firstCommaToken.loc,
messageId: "unexpectedCommaExpression",
});
},
};
},
};
@@ -0,0 +1,596 @@
'use strict';
function parseContentType(str) {
if (str.length === 0)
return;
const params = Object.create(null);
let i = 0;
// Parse type
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (TOKEN[code] !== 1) {
if (code !== 47/* '/' */ || i === 0)
return;
break;
}
}
// Check for type without subtype
if (i === str.length)
return;
const type = str.slice(0, i).toLowerCase();
// Parse subtype
const subtypeStart = ++i;
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (TOKEN[code] !== 1) {
// Make sure we have a subtype
if (i === subtypeStart)
return;
if (parseContentTypeParams(str, i, params) === undefined)
return;
break;
}
}
// Make sure we have a subtype
if (i === subtypeStart)
return;
const subtype = str.slice(subtypeStart, i).toLowerCase();
return { type, subtype, params };
}
function parseContentTypeParams(str, i, params) {
while (i < str.length) {
// Consume whitespace
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (code !== 32/* ' ' */ && code !== 9/* '\t' */)
break;
}
// Ended on whitespace
if (i === str.length)
break;
// Check for malformed parameter
if (str.charCodeAt(i++) !== 59/* ';' */)
return;
// Consume whitespace
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (code !== 32/* ' ' */ && code !== 9/* '\t' */)
break;
}
// Ended on whitespace (malformed)
if (i === str.length)
return;
let name;
const nameStart = i;
// Parse parameter name
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (TOKEN[code] !== 1) {
if (code !== 61/* '=' */)
return;
break;
}
}
// No value (malformed)
if (i === str.length)
return;
name = str.slice(nameStart, i);
++i; // Skip over '='
// No value (malformed)
if (i === str.length)
return;
let value = '';
let valueStart;
if (str.charCodeAt(i) === 34/* '"' */) {
valueStart = ++i;
let escaping = false;
// Parse quoted value
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (code === 92/* '\\' */) {
if (escaping) {
valueStart = i;
escaping = false;
} else {
value += str.slice(valueStart, i);
escaping = true;
}
continue;
}
if (code === 34/* '"' */) {
if (escaping) {
valueStart = i;
escaping = false;
continue;
}
value += str.slice(valueStart, i);
break;
}
if (escaping) {
valueStart = i - 1;
escaping = false;
}
// Invalid unescaped quoted character (malformed)
if (QDTEXT[code] !== 1)
return;
}
// No end quote (malformed)
if (i === str.length)
return;
++i; // Skip over double quote
} else {
valueStart = i;
// Parse unquoted value
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (TOKEN[code] !== 1) {
// No value (malformed)
if (i === valueStart)
return;
break;
}
}
value = str.slice(valueStart, i);
}
name = name.toLowerCase();
if (params[name] === undefined)
params[name] = value;
}
return params;
}
function parseDisposition(str, defDecoder) {
if (str.length === 0)
return;
const params = Object.create(null);
let i = 0;
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (TOKEN[code] !== 1) {
if (parseDispositionParams(str, i, params, defDecoder) === undefined)
return;
break;
}
}
const type = str.slice(0, i).toLowerCase();
return { type, params };
}
function parseDispositionParams(str, i, params, defDecoder) {
while (i < str.length) {
// Consume whitespace
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (code !== 32/* ' ' */ && code !== 9/* '\t' */)
break;
}
// Ended on whitespace
if (i === str.length)
break;
// Check for malformed parameter
if (str.charCodeAt(i++) !== 59/* ';' */)
return;
// Consume whitespace
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (code !== 32/* ' ' */ && code !== 9/* '\t' */)
break;
}
// Ended on whitespace (malformed)
if (i === str.length)
return;
let name;
const nameStart = i;
// Parse parameter name
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (TOKEN[code] !== 1) {
if (code === 61/* '=' */)
break;
return;
}
}
// No value (malformed)
if (i === str.length)
return;
let value = '';
let valueStart;
let charset;
//~ let lang;
name = str.slice(nameStart, i);
if (name.charCodeAt(name.length - 1) === 42/* '*' */) {
// Extended value
const charsetStart = ++i;
// Parse charset name
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (CHARSET[code] !== 1) {
if (code !== 39/* '\'' */)
return;
break;
}
}
// Incomplete charset (malformed)
if (i === str.length)
return;
charset = str.slice(charsetStart, i);
++i; // Skip over the '\''
//~ const langStart = ++i;
// Parse language name
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (code === 39/* '\'' */)
break;
}
// Incomplete language (malformed)
if (i === str.length)
return;
//~ lang = str.slice(langStart, i);
++i; // Skip over the '\''
// No value (malformed)
if (i === str.length)
return;
valueStart = i;
let encode = 0;
// Parse value
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (EXTENDED_VALUE[code] !== 1) {
if (code === 37/* '%' */) {
let hexUpper;
let hexLower;
if (i + 2 < str.length
&& (hexUpper = HEX_VALUES[str.charCodeAt(i + 1)]) !== -1
&& (hexLower = HEX_VALUES[str.charCodeAt(i + 2)]) !== -1) {
const byteVal = (hexUpper << 4) + hexLower;
value += str.slice(valueStart, i);
value += String.fromCharCode(byteVal);
i += 2;
valueStart = i + 1;
if (byteVal >= 128)
encode = 2;
else if (encode === 0)
encode = 1;
continue;
}
// '%' disallowed in non-percent encoded contexts (malformed)
return;
}
break;
}
}
value += str.slice(valueStart, i);
value = convertToUTF8(value, charset, encode);
if (value === undefined)
return;
} else {
// Non-extended value
++i; // Skip over '='
// No value (malformed)
if (i === str.length)
return;
if (str.charCodeAt(i) === 34/* '"' */) {
valueStart = ++i;
let escaping = false;
// Parse quoted value
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (code === 92/* '\\' */) {
if (escaping) {
valueStart = i;
escaping = false;
} else {
value += str.slice(valueStart, i);
escaping = true;
}
continue;
}
if (code === 34/* '"' */) {
if (escaping) {
valueStart = i;
escaping = false;
continue;
}
value += str.slice(valueStart, i);
break;
}
if (escaping) {
valueStart = i - 1;
escaping = false;
}
// Invalid unescaped quoted character (malformed)
if (QDTEXT[code] !== 1)
return;
}
// No end quote (malformed)
if (i === str.length)
return;
++i; // Skip over double quote
} else {
valueStart = i;
// Parse unquoted value
for (; i < str.length; ++i) {
const code = str.charCodeAt(i);
if (TOKEN[code] !== 1) {
// No value (malformed)
if (i === valueStart)
return;
break;
}
}
value = str.slice(valueStart, i);
}
value = defDecoder(value, 2);
if (value === undefined)
return;
}
name = name.toLowerCase();
if (params[name] === undefined)
params[name] = value;
}
return params;
}
function getDecoder(charset) {
let lc;
while (true) {
switch (charset) {
case 'utf-8':
case 'utf8':
return decoders.utf8;
case 'latin1':
case 'ascii': // TODO: Make these a separate, strict decoder?
case 'us-ascii':
case 'iso-8859-1':
case 'iso8859-1':
case 'iso88591':
case 'iso_8859-1':
case 'windows-1252':
case 'iso_8859-1:1987':
case 'cp1252':
case 'x-cp1252':
return decoders.latin1;
case 'utf16le':
case 'utf-16le':
case 'ucs2':
case 'ucs-2':
return decoders.utf16le;
case 'base64':
return decoders.base64;
default:
if (lc === undefined) {
lc = true;
charset = charset.toLowerCase();
continue;
}
return decoders.other.bind(charset);
}
}
}
const decoders = {
utf8: (data, hint) => {
if (data.length === 0)
return '';
if (typeof data === 'string') {
// If `data` never had any percent-encoded bytes or never had any that
// were outside of the ASCII range, then we can safely just return the
// input since UTF-8 is ASCII compatible
if (hint < 2)
return data;
data = Buffer.from(data, 'latin1');
}
return data.utf8Slice(0, data.length);
},
latin1: (data, hint) => {
if (data.length === 0)
return '';
if (typeof data === 'string')
return data;
return data.latin1Slice(0, data.length);
},
utf16le: (data, hint) => {
if (data.length === 0)
return '';
if (typeof data === 'string')
data = Buffer.from(data, 'latin1');
return data.ucs2Slice(0, data.length);
},
base64: (data, hint) => {
if (data.length === 0)
return '';
if (typeof data === 'string')
data = Buffer.from(data, 'latin1');
return data.base64Slice(0, data.length);
},
other: (data, hint) => {
if (data.length === 0)
return '';
if (typeof data === 'string')
data = Buffer.from(data, 'latin1');
try {
const decoder = new TextDecoder(this);
return decoder.decode(data);
} catch {}
},
};
function convertToUTF8(data, charset, hint) {
const decode = getDecoder(charset);
if (decode)
return decode(data, hint);
}
function basename(path) {
if (typeof path !== 'string')
return '';
for (let i = path.length - 1; i >= 0; --i) {
switch (path.charCodeAt(i)) {
case 0x2F: // '/'
case 0x5C: // '\'
path = path.slice(i + 1);
return (path === '..' || path === '.' ? '' : path);
}
}
return (path === '..' || path === '.' ? '' : path);
}
const TOKEN = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
];
const QDTEXT = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
];
const CHARSET = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
];
const EXTENDED_VALUE = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
];
/* eslint-disable no-multi-spaces */
const HEX_VALUES = [
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
-1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
];
/* eslint-enable no-multi-spaces */
module.exports = {
basename,
convertToUTF8,
getDecoder,
parseContentType,
parseDisposition,
};
@@ -0,0 +1,719 @@
export default `flf2a$ 7 7 20 -1 3
banner4 by Merlin Greywolf merlin@brahms.udel.edu
August 9, 1994
...@
...@
...@
...@
...@
...@
...@@
.####@
.####@
.####@
..##.@
.....@
.####@
.####@@
.####.####@
.####.####@
..##...##.@
..........@
..........@
..........@
..........@@
...##.##..@
...##.##..@
.#########@
...##.##..@
.#########@
...##.##..@
...##.##..@@
..########.@
.##..##..##@
.##..##....@
..########.@
.....##..##@
.##..##..##@
..########.@@
.#####...##..@
.##.##..##...@
.#####.##....@
......##.....@
.....##.#####@
....##..##.##@
...##...#####@@
...####...@
..##..##..@
...####...@
..####....@
.##..##.##@
.##...##..@
..####..##@@
.####@
.####@
..##.@
.##..@
.....@
.....@
.....@@
...###@
..##..@
.##...@
.##...@
.##...@
..##..@
...###@@
.###..@
...##.@
....##@
....##@
....##@
...##.@
.###..@@
..........@
..##...##.@
...##.##..@
.#########@
...##.##..@
..##...##.@
..........@@
.......@
...##..@
...##..@
.######@
...##..@
...##..@
.......@@
.....@
.....@
.....@
.####@
.####@
..##.@
.##..@@
........@
........@
........@
.#######@
........@
........@
........@@
....@
....@
....@
....@
....@
.###@
.###@@
.......##@
......##.@
.....##..@
....##...@
...##....@
..##.....@
.##......@@
...#####..@
..##...##.@
.##.....##@
.##.....##@
.##.....##@
..##...##.@
...#####..@@
....##..@
..####..@
....##..@
....##..@
....##..@
....##..@
..######@@
..#######.@
.##.....##@
........##@
..#######.@
.##.......@
.##.......@
.#########@@
..#######.@
.##.....##@
........##@
..#######.@
........##@
.##.....##@
..#######.@@
.##.......@
.##....##.@
.##....##.@
.##....##.@
.#########@
.......##.@
.......##.@@
.########@
.##......@
.##......@
.#######.@
.......##@
.##....##@
..######.@@
..#######.@
.##.....##@
.##.......@
.########.@
.##.....##@
.##.....##@
..#######.@@
.########@
.##....##@
.....##..@
....##...@
...##....@
...##....@
...##....@@
..#######.@
.##.....##@
.##.....##@
..#######.@
.##.....##@
.##.....##@
..#######.@@
..#######.@
.##.....##@
.##.....##@
..########@
........##@
.##.....##@
..#######.@@
..##.@
.####@
..##.@
.....@
..##.@
.####@
..##.@@
.####@
.####@
.....@
.####@
.####@
..##.@
.##..@@
....##@
...##.@
..##..@
.##...@
..##..@
...##.@
....##@@
......@
......@
.#####@
......@
.#####@
......@
......@@
.##...@
..##..@
...##.@
....##@
...##.@
..##..@
.##...@@
..#######.@
.##.....##@
.......##.@
.....###..@
....##....@
..........@
....##....@@
..#######.@
.##.....##@
.##.###.##@
.##.###.##@
.##.#####.@
.##.......@
..#######.@@
....###...@
...##.##..@
..##...##.@
.##.....##@
.#########@
.##.....##@
.##.....##@@
.########.@
.##.....##@
.##.....##@
.########.@
.##.....##@
.##.....##@
.########.@@
..######.@
.##....##@
.##......@
.##......@
.##......@
.##....##@
..######.@@
.########.@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
.########.@@
.########@
.##......@
.##......@
.######..@
.##......@
.##......@
.########@@
.########@
.##......@
.##......@
.######..@
.##......@
.##......@
.##......@@
..######..@
.##....##.@
.##.......@
.##...####@
.##....##.@
.##....##.@
..######..@@
.##.....##@
.##.....##@
.##.....##@
.#########@
.##.....##@
.##.....##@
.##.....##@@
.####@
..##.@
..##.@
..##.@
..##.@
..##.@
.####@@
.......##@
.......##@
.......##@
.......##@
.##....##@
.##....##@
..######.@@
.##....##@
.##...##.@
.##..##..@
.#####...@
.##..##..@
.##...##.@
.##....##@@
.##......@
.##......@
.##......@
.##......@
.##......@
.##......@
.########@@
.##.....##@
.###...###@
.####.####@
.##.###.##@
.##.....##@
.##.....##@
.##.....##@@
.##....##@
.###...##@
.####..##@
.##.##.##@
.##..####@
.##...###@
.##....##@@
..#######.@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
..#######.@@
.########.@
.##.....##@
.##.....##@
.########.@
.##.......@
.##.......@
.##.......@@
..#######.@
.##.....##@
.##.....##@
.##.....##@
.##..##.##@
.##....##.@
..#####.##@@
.########.@
.##.....##@
.##.....##@
.########.@
.##...##..@
.##....##.@
.##.....##@@
..######.@
.##....##@
.##......@
..######.@
.......##@
.##....##@
..######.@@
.########@
....##...@
....##...@
....##...@
....##...@
....##...@
....##...@@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
..#######.@@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
..##...##.@
...##.##..@
....###...@@
.##......##@
.##..##..##@
.##..##..##@
.##..##..##@
.##..##..##@
.##..##..##@
..###..###.@@
.##.....##@
..##...##.@
...##.##..@
....###...@
...##.##..@
..##...##.@
.##.....##@@
.##....##@
..##..##.@
...####..@
....##...@
....##...@
....##...@
....##...@@
.########@
......##.@
.....##..@
....##...@
...##....@
..##.....@
.########@@
.######@
.##....@
.##....@
.##....@
.##....@
.##....@
.######@@
.##......@
..##.....@
...##....@
....##...@
.....##..@
......##.@
.......##@@
.######@
.....##@
.....##@
.....##@
.....##@
.....##@
.######@@
...###..@
..##.##.@
.##...##@
........@
........@
........@
........@@
........@
........@
........@
........@
........@
........@
.#######@@
.####@
.####@
..##.@
...##@
.....@
.....@
.....@@
....###...@
...##.##..@
..##...##.@
.##.....##@
.#########@
.##.....##@
.##.....##@@
.########.@
.##.....##@
.##.....##@
.########.@
.##.....##@
.##.....##@
.########.@@
..######.@
.##....##@
.##......@
.##......@
.##......@
.##....##@
..######.@@
.########.@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
.########.@@
.########@
.##......@
.##......@
.######..@
.##......@
.##......@
.########@@
.########@
.##......@
.##......@
.######..@
.##......@
.##......@
.##......@@
..######..@
.##....##.@
.##.......@
.##...####@
.##....##.@
.##....##.@
..######..@@
.##.....##@
.##.....##@
.##.....##@
.#########@
.##.....##@
.##.....##@
.##.....##@@
.####@
..##.@
..##.@
..##.@
..##.@
..##.@
.####@@
.......##@
.......##@
.......##@
.......##@
.##....##@
.##....##@
..######.@@
.##....##@
.##...##.@
.##..##..@
.#####...@
.##..##..@
.##...##.@
.##....##@@
.##......@
.##......@
.##......@
.##......@
.##......@
.##......@
.########@@
.##.....##@
.###...###@
.####.####@
.##.###.##@
.##.....##@
.##.....##@
.##.....##@@
.##....##@
.###...##@
.####..##@
.##.##.##@
.##..####@
.##...###@
.##....##@@
..#######.@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
..#######.@@
.########.@
.##.....##@
.##.....##@
.########.@
.##.......@
.##.......@
.##.......@@
..#######.@
.##.....##@
.##.....##@
.##.....##@
.##..##.##@
.##....##.@
..#####.##@@
.########.@
.##.....##@
.##.....##@
.########.@
.##...##..@
.##....##.@
.##.....##@@
..######.@
.##....##@
.##......@
..######.@
.......##@
.##....##@
..######.@@
.########@
....##...@
....##...@
....##...@
....##...@
....##...@
....##...@@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
..#######.@@
.##.....##@
.##.....##@
.##.....##@
.##.....##@
..##...##.@
...##.##..@
....###...@@
.##......##@
.##..##..##@
.##..##..##@
.##..##..##@
.##..##..##@
.##..##..##@
..###..###.@@
.##.....##@
..##...##.@
...##.##..@
....###...@
...##.##..@
..##...##.@
.##.....##@@
.##....##@
..##..##.@
...####..@
....##...@
....##...@
....##...@
....##...@@
.########@
......##.@
.....##..@
....##...@
...##....@
..##.....@
.########@@
...####@
..##...@
..##...@
.###...@
..##...@
..##...@
...####@@
.##@
.##@
.##@
...@
.##@
.##@
.##@@
.####..@
....##.@
....##.@
....###@
....##.@
....##.@
.####..@@
..####.....@
.##..##..##@
......####.@
...........@
...........@
...........@
...........@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
`
@@ -0,0 +1 @@
{"version":3,"file":"buildPlanBindingConstraintsList.d.ts","sourceRoot":"","sources":["../../../../src/planning/calculations/buildPlanBindingConstraintsList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,uDAAuD,CAAC;AACnG,OAAO,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAE1F,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,UAAU,GACjB,yBAAyB,CAAC,0BAA0B,CAAC,CAgBvD"}
@@ -0,0 +1,14 @@
'use strict';
var getPolyfill = require('./polyfill');
var define = require('define-properties');
module.exports = function shimEntries() {
var polyfill = getPolyfill();
define(Object, { fromEntries: polyfill }, {
fromEntries: function testEntries() {
return Object.fromEntries !== polyfill;
}
});
return polyfill;
};
@@ -0,0 +1,15 @@
export { VitestModuleEvaluator } from './module-evaluator.js';
export { a as VITEST_VM_CONTEXT_SYMBOL, V as VitestModuleRunner, s as startVitestModuleRunner } from './chunks/startModuleRunner.DLjmA_wU.js';
export { g as getWorkerState } from './chunks/utils.DvEY5TfP.js';
import 'node:module';
import 'node:url';
import 'node:vm';
import 'pathe';
import 'vite/module-runner';
import 'node:fs';
import '@vitest/utils/helpers';
import './path.js';
import 'node:path';
import '@vitest/utils/serialize';
import '@vitest/mocker';
import '@vitest/utils/timers';
@@ -0,0 +1 @@
{"name":"set-proto","version":"1.0.0","requiresBuild":false,"files":{".eslintrc":{"checkedAt":1794532097349,"integrity":"sha512-BWZQrsWtO4RiVbuBrG1qRc+oDqqc24AlGCnwDkILxT+LuLm/eaPbzve/FjBoSYVfD7PGTpKKMEPX0Te0l97jVg==","mode":420,"size":104},".nycrc":{"checkedAt":1794532097350,"integrity":"sha512-2vm1RFz8Ajl/OYrfoCWPJIm3Bpnf7Gyn5bha/lZx/cq+We3uMy9xj15XeP6x4wF3jf/pO7KMHAkU9mllm605xg==","mode":420,"size":139},"LICENSE":{"checkedAt":1794532097350,"integrity":"sha512-is07hPOvqMb/nBpYq3dOozrsdwHAIrqPTTYhio0cA+gO8u4daS29Q9v1iDFTE3xeAA8RO5jaI9hw36tvcbeK+g==","mode":420,"size":1071},"index.js":{"checkedAt":1794532097350,"integrity":"sha512-VuiAgxj4lRBIFV4qFG5CEKR0cOBt/zGGha8WVFqSBIsnBVg0IusEe5ILMu2mMrtz7vEhe/zXWIdwypOnPtKNqQ==","mode":420,"size":733},"test/index.js":{"checkedAt":1794532097350,"integrity":"sha512-Y++woqWzqvfn0X2afynTHgERwiDN2rWGxQPtNeBW3oPhCvgxg8pJQbGtMk+vlKjng6zV9GwmwMK66yMvbQ/PVw==","mode":420,"size":1172},"Object.setPrototypeOf.js":{"checkedAt":1794532097350,"integrity":"sha512-2s4QxDQOPjIJqfhSBE46ZshCaGzeFEJMOJr6krQ3X9JM7RxT0spNDRKazTdxMie8LVCkZcSS6At+IMIFZBKMiQ==","mode":420,"size":156},"Reflect.setPrototypeOf.js":{"checkedAt":1794532097350,"integrity":"sha512-9K8Glng8jAmZeL3ipuSHMOVWfixJqf9Xz3EhaCKbu3IgWy3iT/n/cUuhJCwXymJjcMlYfhjAAxpcVIug3nfgrw==","mode":420,"size":150},"package.json":{"checkedAt":1794532097350,"integrity":"sha512-E/uhlPQO4oSnkkr6Vc9Wm2rph7W7c1EO8yaGJb38HUIr493oFiB+tlR+De7YQPIsdDjwx/vlws/wtOValGNv4w==","mode":420,"size":2201},"tsconfig.json":{"checkedAt":1794532097351,"integrity":"sha512-7JUI6f+Uo7d5m7hRnFHTwvIq4b3fu8OVANjUmh2Vgklh8YVT+z+8++cBMFqiaB6XR0NsioNs+wCDn7qKiSAmww==","mode":420,"size":118},"CHANGELOG.md":{"checkedAt":1794532097351,"integrity":"sha512-alimFWkxuzTrLKKuSiWuWVqiRf91PaaZ7AbhO6NrbPZQInfb5kTcQs1zFPqUwjq8kR9YIUUBNyCm3Tkq8wVyrQ==","mode":420,"size":786},"README.md":{"checkedAt":1794532097351,"integrity":"sha512-871n8qZlAZqw+fKTMz5yxdVPzGnGelAp9fMeEOLek3dXGBgKvQfqE80v9tFcg7MdOYxIpFLYrcywQqNRxvdxqg==","mode":420,"size":1717},"index.d.ts":{"checkedAt":1794532097351,"integrity":"sha512-rerTpmBQf40hSl7Dl5akRD7ChqACEcsnbl6qWVcpJ+0Mkk5Z9irxvvnc9fbrST0RdHCezefm7/9JLEMwjFK8FQ==","mode":420,"size":154},"Object.setPrototypeOf.d.ts":{"checkedAt":1794532097351,"integrity":"sha512-1cT6VQ8ynljZDHs423uubngJTVjBzBI6eZGkydAUlVWs0y6WusqNYLSIEf+Z72y5b17YAGhtlaBt4JMckN8eJQ==","mode":420,"size":153},"Reflect.setPrototypeOf.d.ts":{"checkedAt":1794532097351,"integrity":"sha512-kBuK/TMsUBKm2Y4Qfmv+U3CY3q2lUguROHKcfLg80t4SQKwTKYXT9j0wugDjf25IY/j+YiShbHgEJjzd8TymPw==","mode":420,"size":67},".github/FUNDING.yml":{"checkedAt":1794532097351,"integrity":"sha512-BTaKt9qq5Q9Dh+bo9y3DDte9SQyN6W8KUE4cLw4c99IUAhCiygu8hl88FISHRkoSBROeMVBgrkhNX7vUvatYQg==","mode":420,"size":580}}}
@@ -0,0 +1 @@
{"version":3,"file":"unescape.d.ts","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,QAAQ,MAChB,MAAM,6CAIN,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,eAAe,CAAC,WAcpE,CAAA"}
@@ -0,0 +1,83 @@
var $HoXek$reactariautils = require("@react-aria/utils");
var $HoXek$reactariafocus = require("@react-aria/focus");
var $HoXek$react = require("react");
var $HoXek$reactariaoverlays = require("@react-aria/overlays");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useDialog", () => $e7b76b4fae4e4c55$export$d55e7ee900f34e93);
/*
* 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 $e7b76b4fae4e4c55$export$d55e7ee900f34e93(props, ref) {
let { role: role = 'dialog' } = props;
let titleId = (0, $HoXek$reactariautils.useSlotId)();
titleId = props['aria-label'] ? undefined : titleId;
let isRefocusing = (0, $HoXek$react.useRef)(false);
// Focus the dialog itself on mount, unless a child element is already focused.
(0, $HoXek$react.useEffect)(()=>{
if (ref.current && !ref.current.contains(document.activeElement)) {
(0, $HoXek$reactariafocus.focusSafely)(ref.current);
// Safari on iOS does not move the VoiceOver cursor to the dialog
// or announce that it has opened until it has rendered. A workaround
// is to wait for half a second, then blur and re-focus the dialog.
let timeout = setTimeout(()=>{
if (document.activeElement === ref.current) {
isRefocusing.current = true;
if (ref.current) {
ref.current.blur();
(0, $HoXek$reactariafocus.focusSafely)(ref.current);
}
isRefocusing.current = false;
}
}, 500);
return ()=>{
clearTimeout(timeout);
};
}
}, [
ref
]);
(0, $HoXek$reactariaoverlays.useOverlayFocusContain)();
// We do not use aria-modal due to a Safari bug which forces the first focusable element to be focused
// on mount when inside an iframe, no matter which element we programmatically focus.
// See https://bugs.webkit.org/show_bug.cgi?id=211934.
// useModal sets aria-hidden on all elements outside the dialog, so the dialog will behave as a modal
// even without aria-modal on the dialog itself.
return {
dialogProps: {
...(0, $HoXek$reactariautils.filterDOMProps)(props, {
labelable: true
}),
role: role,
tabIndex: -1,
'aria-labelledby': props['aria-labelledby'] || titleId,
// Prevent blur events from reaching useOverlay, which may cause
// popovers to close. Since focus is contained within the dialog,
// we don't want this to occur due to the above useEffect.
onBlur: (e)=>{
if (isRefocusing.current) e.stopPropagation();
}
},
titleProps: {
id: titleId
}
};
}
//# sourceMappingURL=useDialog.main.js.map
@@ -0,0 +1,22 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./applyDefault"), exports);
__exportStar(require("./deepMerge"), exports);
__exportStar(require("./getParserServices"), exports);
__exportStar(require("./InferTypesFromRule"), exports);
__exportStar(require("./nullThrows"), exports);
__exportStar(require("./RuleCreator"), exports);
@@ -0,0 +1,83 @@
import { createApi } from '@reduxjs/toolkit/query'
const baseQuery = (args?: any) => ({ data: args })
const api = createApi({
baseQuery,
tagTypes: ['Banana', 'Bread'],
endpoints: (build) => ({
getBanana: build.query<unknown, number>({
query(id) {
return { url: `banana/${id}` }
},
providesTags: ['Banana'],
}),
getBananas: build.query<unknown, void>({
query() {
return { url: 'bananas' }
},
providesTags: ['Banana'],
}),
getBread: build.query<unknown, number>({
query(id) {
return { url: `bread/${id}` }
},
providesTags: ['Bread'],
}),
}),
})
describe('type tests', () => {
it('should allow for an array of string TagTypes', () => {
api.util.invalidateTags(['Banana', 'Bread'])
})
it('should allow for an array of full TagTypes descriptions', () => {
api.util.invalidateTags([{ type: 'Banana' }, { type: 'Bread', id: 1 }])
})
it('should allow for a mix of full descriptions as well as plain strings', () => {
api.util.invalidateTags(['Banana', { type: 'Bread', id: 1 }])
})
it('should error when using non-existing TagTypes', () => {
// @ts-expect-error
api.util.invalidateTags(['Missing Tag'])
})
it('should error when using non-existing TagTypes in the full format', () => {
// @ts-expect-error
api.util.invalidateTags([{ type: 'Missing' }])
})
it('should allow pre-fetching for an endpoint that takes an arg', () => {
api.util.prefetch('getBanana', 5, { force: true })
api.util.prefetch('getBanana', 5, { force: false })
api.util.prefetch('getBanana', 5, { ifOlderThan: false })
api.util.prefetch('getBanana', 5, { ifOlderThan: 30 })
api.util.prefetch('getBanana', 5, {})
})
it('should error when pre-fetching with the incorrect arg type', () => {
// @ts-expect-error arg should be number, not string
api.util.prefetch('getBanana', '5', { force: true })
})
it('should allow pre-fetching for an endpoint with a void arg', () => {
api.util.prefetch('getBananas', undefined, { force: true })
api.util.prefetch('getBananas', undefined, { force: false })
api.util.prefetch('getBananas', undefined, { ifOlderThan: false })
api.util.prefetch('getBananas', undefined, { ifOlderThan: 30 })
api.util.prefetch('getBananas', undefined, {})
})
it('should error when pre-fetching with a defined arg when expecting void', () => {
// @ts-expect-error arg should be void, not number
api.util.prefetch('getBananas', 5, { force: true })
})
it('should error when pre-fetching for an incorrect endpoint name', () => {
// @ts-expect-error endpoint name does not exist
api.util.prefetch('getPomegranates', undefined, { force: true })
})
})
@@ -0,0 +1,2 @@
export * as FormatRegistry from './format.mjs';
export * as TypeRegistry from './type.mjs';
@@ -0,0 +1,9 @@
export {
current,
isDraft,
applyPatches,
original,
isDraftable,
produceWithPatches,
enablePatches,
} from 'immer'
@@ -0,0 +1 @@
{"version":3,"file":"usedPropTypes.d.ts","sourceRoot":"","sources":["usedPropTypes.js"],"names":[],"mappings":"AAiTiB;;gCA2JJ,OAAO;oCAAP,OAAO;+BAAP,OAAO;;;;;;;;EA2HnB"}
@@ -0,0 +1,10 @@
"use client";
import {
slider_default
} from "./chunk-4OMVCB5N.mjs";
import "./chunk-B5EDLGDE.mjs";
import "./chunk-DARTHXYH.mjs";
import "./chunk-PN6OXKRL.mjs";
export {
slider_default as default
};
@@ -0,0 +1,21 @@
Copyright (c) 2011-2016 Heather Arthur <fayearthur@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,70 @@
import nodeResolve from '@rollup/plugin-node-resolve';
import { terser } from 'rollup-plugin-terser';
import replace from '@rollup/plugin-replace';
import commonjs from '@rollup/plugin-commonjs';
import babel from '@rollup/plugin-babel';
const defaultNodeResolveConfig = {};
const nodeResolvePlugin = nodeResolve(defaultNodeResolveConfig);
const commonPlugins = [
nodeResolvePlugin,
babel.default({
presets: ['@babel/preset-env'],
babelHelpers: 'bundled',
}),
commonjs(),
];
const developmentPlugins = [
...commonPlugins,
replace({
'process.env.NODE_ENV': JSON.stringify('development'),
}),
];
const productionPlugins = [
...commonPlugins,
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
}),
terser({ mangle: false }),
];
export default [
{
input: 'src/index.js',
output: {
file: 'lib/cjs/state-local.js',
format: 'cjs',
exports: 'default',
},
plugins: commonPlugins,
},
{
input: 'src/index.js',
output: {
file: 'lib/es/state-local.js',
format: 'es',
},
plugins: commonPlugins,
},
{
input: 'src/index.js',
output: {
file: 'lib/umd/state-local.js',
format: 'umd',
name: 'state',
},
plugins: developmentPlugins,
},
{
input: 'src/index.js',
output: {
file: 'lib/umd/state-local.min.js',
format: 'umd',
name: 'state',
},
plugins: productionPlugins,
},
];
@@ -0,0 +1 @@
{"version":3,"file":"no-internal-modules.js","sourceRoot":"","sources":["../../src/rules/no-internal-modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAElC,OAAO,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACb,OAAO,GACR,MAAM,mBAAmB,CAAA;AAI1B,SAAS,YAAY,CAAC,QAAgB;IACpC,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACvC,CAAC;AAED,SAAS,OAAO,CAAC,QAAgB;IAC/B,OAAO,YAAY,CAAC,QAAQ,CAAC;SAC1B,KAAK,CAAC,GAAG,CAAC;SACV,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC;SACpC,MAAM,CAAW,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;QAC9B,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAClB,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QACzB,CAAC;QACD,OAAO,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;IACvB,CAAC,EAAE,EAAE,CAAC,CAAA;AACV,CAAC;AAED,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC;IACtC,QAAQ;IACR,OAAO;IACP,SAAS;IACT,UAAU;IACV,UAAU;CACX,CAAC,CAAA;AASF,eAAe,UAAU,CAAwB;IAC/C,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,QAAQ,EAAE,iBAAiB;YAC3B,WAAW,EAAE,mDAAmD;SACjE;QACD,MAAM,EAAE;YACN;gBACE,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,KAAK,EAAE;gCACL,IAAI,EAAE,OAAO;gCACb,KAAK,EAAE;oCACL,IAAI,EAAE,QAAQ;iCACf;6BACF;yBACF;wBACD,oBAAoB,EAAE,KAAK;qBAC5B;oBACD;wBACE,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,MAAM,EAAE;gCACN,IAAI,EAAE,OAAO;gCACb,KAAK,EAAE;oCACL,IAAI,EAAE,QAAQ;iCACf;6BACF;yBACF;wBACD,oBAAoB,EAAE,KAAK;qBAC5B;iBACF;aACF;SACF;QACD,QAAQ,EAAE;YACR,SAAS,EAAE,8CAA8C;SAC1D;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;QACxC,MAAM,YAAY,GAAG,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;aACvC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;aACnB,MAAM,CAAC,OAAO,CAAC,CAAA;QAClB,MAAM,aAAa,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC;aACzC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;aACnB,MAAM,CAAC,OAAO,CAAC,CAAA;QAGlB,SAAS,eAAe,CAAC,UAAkB;YACzC,OAAO,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAA;QACrD,CAAC;QAGD,SAAS,iBAAiB,CAAC,UAAkB;YAC3C,OAAO,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAA;QACtD,CAAC;QAED,SAAS,gBAAgB,CAAC,UAAkB;YAC1C,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;YAEjC,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAA;YACnE,IAAI,aAAa,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;gBAC9B,OAAO,KAAK,CAAA;YACd,CAAC;YAID,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YACjC,IAAI,eAAe,CAAC,SAAS,CAAC,IAAI,eAAe,CAAC,IAAI,SAAS,EAAE,CAAC,EAAE,CAAC;gBACnE,OAAO,KAAK,CAAA;YACd,CAAC;YAID,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;YAC7C,IAAI,CAAC,QAAQ,IAAI,eAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;gBACzD,OAAO,KAAK,CAAA;YACd,CAAC;YAID,OAAO,IAAI,CAAA;QACb,CAAC;QAED,SAAS,iBAAiB,CAAC,UAAkB;YAC3C,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;YAIjC,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YAEjC,IAAI,iBAAiB,CAAC,SAAS,CAAC,IAAI,iBAAiB,CAAC,IAAI,SAAS,EAAE,CAAC,EAAE,CAAC;gBACvE,OAAO,IAAI,CAAA;YACb,CAAC;YAID,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;YAC7C,IAAI,QAAQ,IAAI,iBAAiB,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;gBAC1D,OAAO,IAAI,CAAA;YACb,CAAC;YAGD,OAAO,KAAK,CAAA;QACd,CAAC;QAGD,MAAM,gBAAgB,GAAG,OAAO,CAAC,MAAM;YACrC,CAAC,CAAC,iBAAiB;YACnB,CAAC,CAAC,gBAAgB,CAAA;QAEpB,OAAO,aAAa,CAClB,MAAM,CAAC,EAAE;YACP,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAA;YAC/B,IACE,uBAAuB,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;gBAC5D,gBAAgB,CAAC,UAAU,CAAC,EAC5B,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC;oBACb,IAAI,EAAE,MAAM;oBACZ,SAAS,EAAE,WAAW;oBACtB,IAAI,EAAE;wBACJ,UAAU;qBACX;iBACF,CAAC,CAAA;YACJ,CAAC;QACH,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,EAAE,CACnB,CAAA;IACH,CAAC;CACF,CAAC,CAAA"}
@@ -0,0 +1 @@
{"name":"fast-xml-parser","version":"4.5.3","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532101528,"integrity":"sha512-PuvH5PS/6C6p0yJU7uDTLIHQcbzrXmGVohd7ZwkMhXeTfoIESnSLYpgTMaKijKayKtQ1vbETrxvRl2sSGc1evg==","mode":420,"size":1073},"src/v5/OutputBuilders/BaseOutputBuilder.js":{"checkedAt":1794532101528,"integrity":"sha512-AiGi57PvG1gdP6SfOv4MckY6IEh1Z46CqOneyMtGifJtdy/kfeJ6l2MhxyCYOosLVtZcUITfZKj18qjyI+gh7Q==","mode":420,"size":1731},"src/v6/OutputBuilders/BaseOutputBuilder.js":{"checkedAt":1794532101528,"integrity":"sha512-GAW1jrLY8UClICphDArtMbZSAcolrXp+yeqZw8XFQcE4WtN6Yk4PeIE/I33TmLKOMYWIT9lUlpxkBFjpV7rDaw==","mode":420,"size":1710},"src/v5/valueParsers/booleanParser.js":{"checkedAt":1794532101529,"integrity":"sha512-A6QQwVtW2mOxj9mQSqiGXixNugSqKmT3nLOuP3f5niUlCmki7JMeHJEdT6ARHwm2SBpHgpdennCaJT7gqOtmkQ==","mode":420,"size":644},"src/v6/valueParsers/booleanParser.js":{"checkedAt":1794532101529,"integrity":"sha512-iAeaxHaj3VVpLHphTpXqhfrxfOMDJrhyLRZEBIt1Ahish5HL+dRBmbfdgF82/EnJEaKBH1AyK+pJepzH9Imo2Q==","mode":420,"size":631},"src/v5/valueParsers/booleanParserExt.js":{"checkedAt":1794532101529,"integrity":"sha512-OsiOV9fYgnCPyGDzTREBZum9pj361nDGHBqRZFd5F3FEq+gDjhAdSkitle0joqw72mp3Ew4PiIaTV3UWC/f4YQ==","mode":420,"size":505},"src/v6/valueParsers/booleanParserExt.js":{"checkedAt":1794532101529,"integrity":"sha512-yqNrXGidjoohytJKqN9LhDWMoAKdfIGBbHPTxU6lzkuPWdH+8itL2/OZO/0Pp1ZRYHplY+ZX7z9LRvckcls75w==","mode":420,"size":489},"src/v5/inputSource/BufferSource.js":{"checkedAt":1794532101529,"integrity":"sha512-5y/Wq2wcy0qyQQJ5plZ60Xx3zxEIqTyTuYe3l340toBGVB42h8nrNnRZWigisWylPl7OzEERvcMNdnzQioCU4w==","mode":420,"size":3123},"src/v6/inputSource/BufferSource.js":{"checkedAt":1794532101529,"integrity":"sha512-z1VvUk7l3gd2zcpnU1vxhooQ5gJ6ovmmjdjWn9rk4Q9w7lXUn5SDEndCFZmxfhtyM/YIVloJToJWKevQWuuHRg==","mode":420,"size":3107},"src/v5/CharsSymbol.js":{"checkedAt":1794532101529,"integrity":"sha512-LzggJJRlEseiIO8CY0ACQIWPw16J2NjaiE0/f8x7BEUQbZBLm809g1N+YjmPXeq6RZsuLz/f54EzfdYA16E6ig==","mode":420,"size":347},"src/v6/CharsSymbol.js":{"checkedAt":1794532101530,"integrity":"sha512-DFJU81lM3a9A7w/i8ifvr6TEHBNFUoabZLYaVnphR0/xAVpaGGdEQVeksj0xV/JQXzKR2RIMda+ywUjwZAzdqA==","mode":420,"size":345},"src/cli/cli.js":{"checkedAt":1794532101530,"integrity":"sha512-WIrAJzWyccEO7v3RT9g1nlITsAaVmQhRXli4PmHFnmyzX2yO4JjMjPyAtAbuKsvSeI/cQ9A2SoOsyiAfYd6xIw==","mode":493,"size":2517},"src/v5/valueParsers/currency.js":{"checkedAt":1794532101530,"integrity":"sha512-hgmjVT5RlZ5LEUAMlBn0dy2ijWCBl/Vm3wssRI91IADWz2bihuV4six1pOo43u55+MxVkm8AqTXA75nYBZ7ZJg==","mode":420,"size":1267},"src/v6/valueParsers/currency.js":{"checkedAt":1794532101530,"integrity":"sha512-6jN8ijKswYriOZA6eoILg/SdVMexoVR+5K1lUCP7Go9S7Mz4sOm7pACzKib837nYICaf6yrqVlyDB4H5mea7Yg==","mode":420,"size":1249},"src/xmlparser/DocTypeReader.js":{"checkedAt":1794532101530,"integrity":"sha512-KbJUF0usm5OUH2BRHlGNSazIXUAGHFHsfrxMqH1q86bvhzm9OUySOzYv9cDUanX1hTUzB3YzQGEMqbMDSIsJGw==","mode":420,"size":4742},"src/v5/EntitiesParser.js":{"checkedAt":1794532101530,"integrity":"sha512-a3NbHfuv+aZA+UYKe2lXEyEaJHD+nvIZ5bBAuIneLyVGYsCHRd3HbH6IKwSLYuyEU2QLmXEzA33tKEPH7hP+Og==","mode":420,"size":3831},"src/v5/valueParsers/EntitiesParser.js":{"checkedAt":1794532101530,"integrity":"sha512-a3NbHfuv+aZA+UYKe2lXEyEaJHD+nvIZ5bBAuIneLyVGYsCHRd3HbH6IKwSLYuyEU2QLmXEzA33tKEPH7hP+Og==","mode":420,"size":3831},"src/v6/EntitiesParser.js":{"checkedAt":1794532101531,"integrity":"sha512-Lj+s/bRgStqf7CGOKdBmL7+NjH9kr0757JzS3n3n1rTteClC/j8fCxlUgfMquolWCy+yw32ffujsKohoqNryVg==","mode":420,"size":3812},"src/v6/valueParsers/EntitiesParser.js":{"checkedAt":1794532101531,"integrity":"sha512-c/RKyELLzGsi5eP6L+7wvtx7XfqVRYTfM3ryqBBYRNBU1o/AxcgXbqmG++gjy7fgcMHda7elD+8wHlW9zn9oqA==","mode":420,"size":3813},"src/fxp.js":{"checkedAt":1794532101531,"integrity":"sha512-VHyb/6JExc+RqIzH6UV+3YwAHX2Xmkc5U9qJSXbDqlr3TO2WKymgQa2XBeNzLUSDLrPZ9A0yE9LzYiOdLoAF0g==","mode":420,"size":259},"src/ignoreAttributes.js":{"checkedAt":1794532101531,"integrity":"sha512-XZsGAPGoFc8T1PUAnn5dgs3jM2akLfx2J8xLs7Ibp8nU5a4iJj0bbBIrXYndKhCFeE8UZ4PSX3dp8ochxkTtNg==","mode":420,"size":611},"src/v5/valueParsers/join.js":{"checkedAt":1794532101531,"integrity":"sha512-/VIDkQge6ktywiFDBd4u7Z4VpOnOj9B0i/dGx3cgkSFgUcSHEE1AMta68Gbw0bZ0aX44mgWuAu0Dvj/X8ejNLg==","mode":420,"size":189},"src/v6/valueParsers/join.js":{"checkedAt":1794532101531,"integrity":"sha512-NHJ6/3+ehwk3Dwc3HRNQHd90izUR7J+riwtD0hIwh/31sYiD9fM9Zl6jiZQTOkTxhhvVFoIImjgh+vR5PN2mBg==","mode":420,"size":182},"src/v5/OutputBuilders/JsArrBuilder.js":{"checkedAt":1794532101532,"integrity":"sha512-SQqLdgIsimIwUUlC77qRuMLtG8YpN0qcjcj+YQg7ndDApXF4DdP+m4pm3CaVxdK9uRGVbo/FN0Nt3g52fhzIBQ==","mode":420,"size":2862},"src/v6/OutputBuilders/JsArrBuilder.js":{"checkedAt":1794532101532,"integrity":"sha512-dfeM3w48u8liag2hO/xSadrn9I1tsEYfuC9EQvPj3tvbvUdiYMbEVz9UHSm//nqs2u+PMEhuzuI0/ragI7ZYMA==","mode":420,"size":2873},"src/v5/OutputBuilders/JsMinArrBuilder.js":{"checkedAt":1794532101532,"integrity":"sha512-bhAbLine truncated
@@ -0,0 +1,26 @@
// src/children.ts
import { Children, isValidElement } from "react";
function getValidChildren(children) {
return Children.toArray(children).filter(
(child) => isValidElement(child)
);
}
var pickChildren = (children, targetChild) => {
var _a;
let target = [];
const withoutTargetChildren = (_a = Children.map(children, (item) => {
if (!isValidElement(item)) return item;
if (item.type === targetChild) {
target.push(item);
return null;
}
return item;
})) == null ? void 0 : _a.filter(Boolean);
const targetChildren = target.length >= 0 ? target : void 0;
return [withoutTargetChildren, targetChildren];
};
export {
getValidChildren,
pickChildren
};
@@ -0,0 +1,12 @@
import type { TSESTree } from '@typescript-eslint/utils';
import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util';
declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpected", [], unknown, {
'ClassBody:exit'(): void;
'MethodDefinition, PropertyDefinition'(node: TSESTree.MethodDefinition | TSESTree.PropertyDefinition): void;
ClassBody(): void;
Program(): void;
}>;
export type Options = InferOptionsTypeFromRule<typeof baseRule>;
export type MessageIds = InferMessageIdsTypeFromRule<typeof baseRule>;
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpected", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1 @@
{"name":"is-data-view","version":"1.0.2","requiresBuild":false,"files":{".editorconfig":{"checkedAt":1794532096675,"integrity":"sha512-gD3iQtgC7ZgFS97pyZqR0FPjMNyRAfat8dipbSL28iiJ6B1MP5dDeDYeEnP5sYMTz8whQIk3E5vltk2kcyJJEQ==","mode":420,"size":286},".eslintrc":{"checkedAt":1794532096726,"integrity":"sha512-EB5RRUxUfQTChN4o2m/+gDI9H7jTGmQB+jzTB9zx0FpFh+ya2hqdAcmKpm8QzHMwAneMCyK59hk9aauS/A4DeQ==","mode":420,"size":183},".nycrc":{"checkedAt":1794532096726,"integrity":"sha512-2vm1RFz8Ajl/OYrfoCWPJIm3Bpnf7Gyn5bha/lZx/cq+We3uMy9xj15XeP6x4wF3jf/pO7KMHAkU9mllm605xg==","mode":420,"size":139},"LICENSE":{"checkedAt":1794532096726,"integrity":"sha512-GI85l19csf+EjnKuHaLLLffUQ+NFZkyLu3T9M1IIMOrrv4dJ7+pUGaCE7osx0pOdVTEnzMslv0SSpPks/WMBMw==","mode":420,"size":1067},"index.js":{"checkedAt":1794532096726,"integrity":"sha512-Tye+RRR22WTqMRDWOcSC++gJrYRcJWiQeLqQBwUhnLkxkXV6huzc3n5nL0jGcAfhOecU39kOajn8ldyrj26+iQ==","mode":420,"size":847},"test/index.js":{"checkedAt":1794532096726,"integrity":"sha512-tHszTYRo9GebWy+p3GxQ43PuJ4h40cx5hbPEDXizXXS299CmdlZb+xUTBHQNHiaeZXzZUKD8ZQlINteO5TeZPw==","mode":420,"size":1542},"package.json":{"checkedAt":1794532096726,"integrity":"sha512-+rIAqwQSwRTWj50AtDbHmbY5V3vlcBo9m5kK+ARvdJt2/1XtCaCwMo2BWWerxEuYYGqmQQWvd2Qt9n61n4ok1w==","mode":420,"size":2797},"tsconfig.json":{"checkedAt":1794532096727,"integrity":"sha512-ge3s9esL2UvnaUP5GatsK01MUXZAktUuj05hVGGH1diPfWkd2GcgGQIukaTYa3e3y73LqDfVarkijQUuzgTx0w==","mode":420,"size":116},"CHANGELOG.md":{"checkedAt":1794532096727,"integrity":"sha512-nT+w9fe0xETTG/ZLZUZ2S6bCIuRyj7MzIQ/6u4GBMeFCCJozkjnmwlEA764iYG61G/7ECJeAN0E90S51yS7KGQ==","mode":420,"size":2683},"README.md":{"checkedAt":1794532096727,"integrity":"sha512-FNGVOAH9diSOlZIJj+6MlMhGGozQodFyoUeua+myxao2qJQAlnyFF+9ziruIkKeYNOy5VMnNq6I5rFYFUU7CzQ==","mode":420,"size":3129},"index.d.ts":{"checkedAt":1794532096727,"integrity":"sha512-G45ZOqZ2U/vSx1H5Adqknu4TKLuq0Ab/Im6Qplq5bq84FrjO02S0ha7dbfeeBGLEynd/pqAcK0M+LcAfnW+MEw==","mode":420,"size":85},".github/FUNDING.yml":{"checkedAt":1794532096677,"integrity":"sha512-LNX9j+IdPy0LysKTJb0vUM5ZJKsvlL8Ng6Y+a1OQSmHCXAMCKAEFyxCw6/ucNvQadXte7n1ygzhvXO85q3su0g==","mode":420,"size":585}}}
@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/get-proto
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,497 @@
# mdast-util-gfm
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
[![Sponsors][sponsors-badge]][collective]
[![Backers][backers-badge]][collective]
[![Chat][chat-badge]][chat]
[mdast][] extensions to parse and serialize [GFM][] (autolink literals,
footnotes, strikethrough, tables, tasklists).
## Contents
* [What is this?](#what-is-this)
* [When to use this](#when-to-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`gfmFromMarkdown()`](#gfmfrommarkdown)
* [`gfmToMarkdown(options?)`](#gfmtomarkdownoptions)
* [`Options`](#options)
* [HTML](#html)
* [Syntax](#syntax)
* [Syntax tree](#syntax-tree)
* [Types](#types)
* [Compatibility](#compatibility)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This package contains two extensions that add support for GFM syntax in
markdown to [mdast][]: autolink literals (`www.x.com`), footnotes (`[^1]`),
strikethrough (`~~stuff~~`), tables (`| cell |…`), and tasklists (`* [x]`).
These extensions plug into
[`mdast-util-from-markdown`][mdast-util-from-markdown] (to support parsing
GFM in markdown into a syntax tree) and
[`mdast-util-to-markdown`][mdast-util-to-markdown] (to support serializing
GFM in syntax trees to markdown).
## When to use this
This project is useful when you want to support the same features that GitHub
does in files in a repo, Gists, and several other places.
Users frequently believe that some of these extensions, specifically autolink
literals and tables, are part of normal markdown, so using `mdast-util-gfm` will
help match your implementation to their understanding of markdown.
There are several edge cases where GitHub’s implementation works in unexpected
ways or even different than described in their spec, so *writing* in GFM is not
always the best choice.
You can use these extensions when you are working with
`mdast-util-from-markdown` and `mdast-util-to-markdown` already.
When working with `mdast-util-from-markdown`, you must combine this package
with [`micromark-extension-gfm`][extension].
Instead of this package, you can also use the extensions separately:
* [`mdast-util-gfm-autolink-literal`](https://github.com/syntax-tree/mdast-util-gfm-autolink-literal)
— support GFM autolink literals
* [`mdast-util-gfm-footnote`](https://github.com/syntax-tree/mdast-util-gfm-footnote)
— support GFM footnotes
* [`mdast-util-gfm-strikethrough`](https://github.com/syntax-tree/mdast-util-gfm-strikethrough)
— support GFM strikethrough
* [`mdast-util-gfm-table`](https://github.com/syntax-tree/mdast-util-gfm-table)
— support GFM tables
* [`mdast-util-gfm-task-list-item`](https://github.com/syntax-tree/mdast-util-gfm-task-list-item)
— support GFM tasklists
A different utility, [`mdast-util-frontmatter`][mdast-util-frontmatter], adds
support for frontmatter.
GitHub supports YAML frontmatter for files in repos and Gists but they don’t
treat it as part of GFM.
All these packages are used in [`remark-gfm`][remark-gfm], which
focusses on making it easier to transform content by abstracting these
internals away.
This utility does not handle how markdown is turned to HTML.
That’s done by [`mdast-util-to-hast`][mdast-util-to-hast].
If your content is not in English, you should configure that utility.
## Install
This package is [ESM only][esm].
In Node.js (version 16+), install with [npm][]:
```sh
npm install mdast-util-gfm
```
In Deno with [`esm.sh`][esmsh]:
```js
import {gfmFromMarkdown, gfmToMarkdown} from 'https://esm.sh/mdast-util-gfm@3'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import {gfmFromMarkdown, gfmToMarkdown} from 'https://esm.sh/mdast-util-gfm@3?bundle'
</script>
```
## Use
Say our document `example.md` contains:
```markdown
# GFM
## Autolink literals
www.example.com, https://example.com, and contact@example.com.
## Footnote
A note[^1]
[^1]: Big note.
## Strikethrough
~one~ or ~~two~~ tildes.
## Table
| a | b | c | d |
| - | :- | -: | :-: |
## Tasklist
* [ ] to do
* [x] done
```
…and our module `example.js` looks as follows:
```js
import fs from 'node:fs/promises'
import {fromMarkdown} from 'mdast-util-from-markdown'
import {gfmFromMarkdown, gfmToMarkdown} from 'mdast-util-gfm'
import {toMarkdown} from 'mdast-util-to-markdown'
import {gfm} from 'micromark-extension-gfm'
const value = await fs.readFile('example.md', 'utf8')
const tree = fromMarkdown(value, {
extensions: [gfm()],
mdastExtensions: [gfmFromMarkdown()]
})
console.log(tree)
const result = toMarkdown(tree, {extensions: [gfmToMarkdown()]})
console.log(result)
```
…now running `node example.js` yields (positional info removed for brevity):
```js
{
type: 'root',
children: [
{type: 'heading', depth: 1, children: [{type: 'text', value: 'GFM'}]},
{
type: 'heading',
depth: 2,
children: [{type: 'text', value: 'Autolink literals'}]
},
{
type: 'paragraph',
children: [
{
type: 'link',
title: null,
url: 'http://www.example.com',
children: [{type: 'text', value: 'www.example.com'}]
},
{type: 'text', value: ', '},
{
type: 'link',
title: null,
url: 'https://example.com',
children: [{type: 'text', value: 'https://example.com'}]
},
{type: 'text', value: ', and '},
{
type: 'link',
title: null,
url: 'mailto:contact@example.com',
children: [{type: 'text', value: 'contact@example.com'}]
},
{type: 'text', value: '.'}
]
},
{type: 'heading', depth: 2, children: [{type: 'text', value: 'Footnote'}]},
{
type: 'paragraph',
children: [
{type: 'text', value: 'A note'},
{type: 'footnoteReference', identifier: '1', label: '1'}
]
},
{
type: 'footnoteDefinition',
identifier: '1',
label: '1',
children: [
{type: 'paragraph', children: [{type: 'text', value: 'Big note.'}]}
]
},
{
type: 'heading',
depth: 2,
children: [{type: 'text', value: 'Strikethrough'}]
},
{
type: 'paragraph',
children: [
{
type: 'delete',
children: [{type: 'text', value: 'one'}]
},
{type: 'text', value: ' or '},
{
type: 'delete',
children: [{type: 'text', value: 'two'}]
},
{type: 'text', value: ' tildes.'}
]
},
{type: 'heading', depth: 2, children: [{type: 'text', value: 'Table'}]},
{
type: 'table',
align: [null, 'left', 'right', 'center'],
children: [
{
type: 'tableRow',
children: [
{type: 'tableCell', children: [{type: 'text', value: 'a'}]},
{type: 'tableCell', children: [{type: 'text', value: 'b'}]},
{type: 'tableCell', children: [{type: 'text', value: 'c'}]},
{type: 'tableCell', children: [{type: 'text', value: 'd'}]}
]
}
]
},
{type: 'heading', depth: 2, children: [{type: 'text', value: 'Tasklist'}]},
{
type: 'list',
ordered: false,
start: null,
spread: false,
children: [
{
type: 'listItem',
spread: false,
checked: false,
children: [
{type: 'paragraph', children: [{type: 'text', value: 'to do'}]}
]
},
{
type: 'listItem',
spread: false,
checked: true,
children: [
{type: 'paragraph', children: [{type: 'text', value: 'done'}]}
]
}
]
}
]
}
```
```markdown
# GFM
## Autolink literals
[www.example.com](http://www.example.com), <https://example.com>, and <contact@example.com>.
## Footnote
A note[^1]
[^1]: Big note.
## Strikethrough
~~one~~ or ~~two~~ tildes.
## Table
| a | b | c | d |
| - | :- | -: | :-: |
## Tasklist
* [ ] to do
* [x] done
```
## API
This package exports the identifiers [`gfmFromMarkdown`][api-gfm-from-markdown]
and [`gfmToMarkdown`][api-gfm-to-markdown].
There is no default export.
### `gfmFromMarkdown()`
Create an extension for [`mdast-util-from-markdown`][mdast-util-from-markdown]
to enable GFM (autolink literals, footnotes, strikethrough, tables, tasklists).
###### Returns
Extension for `mdast-util-from-markdown` to enable GFM
([`Array<FromMarkdownExtension>`][from-markdown-extension]).
### `gfmToMarkdown(options?)`
Create an extension for [`mdast-util-to-markdown`][mdast-util-to-markdown]
to enable GFM (autolink literals, footnotes, strikethrough, tables, tasklists).
###### Parameters
* `options` ([`Options`][api-options])
— configuration
###### Returns
Extension for `mdast-util-to-markdown` to enable GFM
([`Array<ToMarkdownExtension>`][to-markdown-extension]).
### `Options`
Configuration (TypeScript type).
###### Fields
* `firstLineBlank` (`boolean`, default: `false`)
— use a blank line for the first line of footnote definitions
* `stringLength` (`((value: string) => number)`, default: `s => s.length`)
— function to detect the length of table cell content, used when aligning
the delimiters between cells
* `tableCellPadding` (`boolean`, default: `true`)
— whether to add a space of padding between delimiters and cells
* `tablePipeAlign` (`boolean`, default: `true`)
— whether to align the delimiters
## HTML
This utility does not handle how markdown is turned to HTML.
That’s done by [`mdast-util-to-hast`][mdast-util-to-hast].
## Syntax
See [Syntax in `micromark-extension-gfm`][syntax].
## Syntax tree
This utility combines several mdast utilities.
See their readmes for the node types supported in the tree:
* [`mdast-util-gfm-autolink-literal`](https://github.com/syntax-tree/mdast-util-gfm-autolink-literal#syntax-tree)
— GFM autolink literals
* [`mdast-util-gfm-footnote`](https://github.com/syntax-tree/mdast-util-gfm-footnote#syntax-tree)
— GFM footnotes
* [`mdast-util-gfm-strikethrough`](https://github.com/syntax-tree/mdast-util-gfm-strikethrough#syntax-tree)
— GFM strikethrough
* [`mdast-util-gfm-table`](https://github.com/syntax-tree/mdast-util-gfm-table#syntax-tree)
— GFM tables
* [`mdast-util-gfm-task-list-item`](https://github.com/syntax-tree/mdast-util-gfm-task-list-item#syntax-tree)
— GFM tasklists
## Types
This package is fully typed with [TypeScript][].
It exports the additional type [`Options`][api-options].
The `Delete`, `FootnoteDefinition`, `FootnoteReference`, `Table`, `TableRow`,
and `TableCell` types of the mdast nodes are exposed from `@types/mdast`.
## Compatibility
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line, `mdast-util-gfm@^3`,
compatible with Node.js 16.
## Related
* [`remark-gfm`][remark-gfm]
— remark plugin to support GFM
* [`micromark-extension-gfm`][extension]
— micromark extension to parse GFM
## Contribute
See [`contributing.md`][contributing] in [`syntax-tree/.github`][health] for
ways to get started.
See [`support.md`][support] for ways to get help.
This project has a [code of conduct][coc].
By interacting with this repository, organization, or community you agree to
abide by its terms.
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[api-gfm-from-markdown]: #gfmfrommarkdown
[api-gfm-to-markdown]: #gfmtomarkdownoptions
[api-options]: #options
[author]: https://wooorm.com
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[build]: https://github.com/syntax-tree/mdast-util-gfm/actions
[build-badge]: https://github.com/syntax-tree/mdast-util-gfm/workflows/main/badge.svg
[chat]: https://github.com/syntax-tree/unist/discussions
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md
[collective]: https://opencollective.com/unified
[contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md
[coverage]: https://codecov.io/github/syntax-tree/mdast-util-gfm
[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/mdast-util-gfm.svg
[downloads]: https://www.npmjs.com/package/mdast-util-gfm
[downloads-badge]: https://img.shields.io/npm/dm/mdast-util-gfm.svg
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[esmsh]: https://esm.sh
[extension]: https://github.com/micromark/micromark-extension-gfm
[from-markdown-extension]: https://github.com/syntax-tree/mdast-util-from-markdown#extension
[gfm]: https://github.github.com/gfm/
[health]: https://github.com/syntax-tree/.github
[license]: license
[mdast]: https://github.com/syntax-tree/mdast
[mdast-util-from-markdown]: https://github.com/syntax-tree/mdast-util-from-markdown
[mdast-util-frontmatter]: https://github.com/syntax-tree/mdast-util-frontmatter
[mdast-util-to-hast]: https://github.com/syntax-tree/mdast-util-to-hast
[mdast-util-to-markdown]: https://github.com/syntax-tree/mdast-util-to-markdown
[npm]: https://docs.npmjs.com/cli/install
[remark-gfm]: https://github.com/remarkjs/remark-gfm
[size]: https://bundlejs.com/?q=mdast-util-gfm
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=mdast-util-gfm
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[support]: https://github.com/syntax-tree/.github/blob/main/support.md
[syntax]: https://github.com/micromark/micromark-extension-gfm#syntax
[to-markdown-extension]: https://github.com/syntax-tree/mdast-util-to-markdown#options
[typescript]: https://www.typescriptlang.org
@@ -0,0 +1,37 @@
import {isShadowRoot as $431fbd86ca7dc216$export$af51f0f06c0f328a} from "./domHelpers.module.js";
import {shadowDOM as $lcSu5$shadowDOM} from "@react-stately/flags";
// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16
function $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) {
if (!(0, $lcSu5$shadowDOM)()) return otherNode && node ? node.contains(otherNode) : false;
if (!node || !otherNode) return false;
let currentNode = otherNode;
while(currentNode !== null){
if (currentNode === node) return true;
if (currentNode.tagName === 'SLOT' && currentNode.assignedSlot) // Element is slotted
currentNode = currentNode.assignedSlot.parentNode;
else if ((0, $431fbd86ca7dc216$export$af51f0f06c0f328a)(currentNode)) // Element is in shadow root
currentNode = currentNode.host;
else currentNode = currentNode.parentNode;
}
return false;
}
const $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document)=>{
var _activeElement_shadowRoot;
if (!(0, $lcSu5$shadowDOM)()) return doc.activeElement;
let activeElement = doc.activeElement;
while(activeElement && 'shadowRoot' in activeElement && ((_activeElement_shadowRoot = activeElement.shadowRoot) === null || _activeElement_shadowRoot === void 0 ? void 0 : _activeElement_shadowRoot.activeElement))activeElement = activeElement.shadowRoot.activeElement;
return activeElement;
};
function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
if ((0, $lcSu5$shadowDOM)() && event.target.shadowRoot) {
if (event.composedPath) return event.composedPath()[0];
}
return event.target;
}
export {$d4ee10de306f2510$export$4282f70798064fe0 as nodeContains, $d4ee10de306f2510$export$cd4e5573fbe2b576 as getActiveElement, $d4ee10de306f2510$export$e58f029f0fbfdb29 as getEventTarget};
//# sourceMappingURL=DOMFunctions.module.js.map
@@ -0,0 +1,266 @@
import { createApi } from '@reduxjs/toolkit/query'
import { delay } from 'msw'
import { actionsReducer, setupApiStore } from '../../tests/utils/helpers'
import { vi } from 'vitest'
const baseQuery = (args?: any) => ({ data: args })
const api = createApi({
baseQuery,
tagTypes: ['Banana', 'Bread'],
endpoints: (build) => ({
getBanana: build.query<unknown, number>({
query(id) {
return { url: `banana/${id}` }
},
providesTags: ['Banana'],
}),
getBananas: build.query<unknown, void>({
query() {
return { url: 'bananas' }
},
providesTags: ['Banana'],
}),
getBread: build.query<unknown, number>({
query(id) {
return { url: `bread/${id}` }
},
providesTags: ['Bread'],
}),
invalidateFruit: build.mutation({
query: (fruit?: 'Banana' | 'Bread' | null) => ({
url: `invalidate/fruit/${fruit || ''}`,
}),
invalidatesTags(result, error, arg) {
return [arg]
},
}),
}),
})
const { getBanana, getBread, invalidateFruit } = api.endpoints
const storeRef = setupApiStore(api, {
...actionsReducer,
})
it('invalidates the specified tags', async () => {
await storeRef.store.dispatch(getBanana.initiate(1))
expect(storeRef.store.getState().actions).toMatchSequence(
api.internalActions.middlewareRegistered.match,
getBanana.matchPending,
getBanana.matchFulfilled,
)
await storeRef.store.dispatch(api.util.invalidateTags(['Banana', 'Bread']))
// Slight pause to let the middleware run and such
await delay(20)
const firstSequence = [
api.internalActions.middlewareRegistered.match,
getBanana.matchPending,
getBanana.matchFulfilled,
api.util.invalidateTags.match,
getBanana.matchPending,
getBanana.matchFulfilled,
]
expect(storeRef.store.getState().actions).toMatchSequence(...firstSequence)
await storeRef.store.dispatch(getBread.initiate(1))
await storeRef.store.dispatch(api.util.invalidateTags([{ type: 'Bread' }]))
await delay(20)
expect(storeRef.store.getState().actions).toMatchSequence(
...firstSequence,
getBread.matchPending,
getBread.matchFulfilled,
api.util.invalidateTags.match,
getBread.matchPending,
getBread.matchFulfilled,
)
})
it('invalidates tags correctly when null or undefined are provided as tags', async () => {
await storeRef.store.dispatch(getBanana.initiate(1))
await storeRef.store.dispatch(
api.util.invalidateTags([undefined, null, 'Banana']),
)
// Slight pause to let the middleware run and such
await delay(20)
const apiActions = [
api.internalActions.middlewareRegistered.match,
getBanana.matchPending,
getBanana.matchFulfilled,
api.util.invalidateTags.match,
getBanana.matchPending,
getBanana.matchFulfilled,
]
expect(storeRef.store.getState().actions).toMatchSequence(...apiActions)
})
it.each([
{
tags: [undefined, null, 'Bread'] as Parameters<
typeof api.util.invalidateTags
>['0'],
},
{ tags: [undefined, null] },
{ tags: [] },
])(
'does not invalidate with tags=$tags if no query matches',
async ({ tags }) => {
await storeRef.store.dispatch(getBanana.initiate(1))
await storeRef.store.dispatch(api.util.invalidateTags(tags))
// Slight pause to let the middleware run and such
await delay(20)
const apiActions = [
api.internalActions.middlewareRegistered.match,
getBanana.matchPending,
getBanana.matchFulfilled,
api.util.invalidateTags.match,
]
expect(storeRef.store.getState().actions).toMatchSequence(...apiActions)
},
)
it.each([
{ mutationArg: 'Bread' as 'Bread' | null | undefined },
{ mutationArg: undefined },
{ mutationArg: null },
])(
'does not invalidate queries when a mutation with tags=[$mutationArg] runs and does not match anything',
async ({ mutationArg }) => {
await storeRef.store.dispatch(getBanana.initiate(1))
await storeRef.store.dispatch(invalidateFruit.initiate(mutationArg))
// Slight pause to let the middleware run and such
await delay(20)
const apiActions = [
api.internalActions.middlewareRegistered.match,
getBanana.matchPending,
getBanana.matchFulfilled,
invalidateFruit.matchPending,
invalidateFruit.matchFulfilled,
]
expect(storeRef.store.getState().actions).toMatchSequence(...apiActions)
},
)
it('correctly stringifies subscription state and dispatches subscriptionsUpdated', async () => {
// Create a fresh store for this test to avoid interference
const testStoreRef = setupApiStore(
api,
{
...actionsReducer,
},
{ withoutListeners: true },
)
// Start multiple subscriptions
const subscription1 = testStoreRef.store.dispatch(
getBanana.initiate(1, {
subscriptionOptions: { pollingInterval: 1000 },
}),
)
const subscription2 = testStoreRef.store.dispatch(
getBanana.initiate(2, {
subscriptionOptions: { refetchOnFocus: true },
}),
)
const subscription3 = testStoreRef.store.dispatch(
api.endpoints.getBananas.initiate(),
)
// Wait for the subscriptions to be established
await Promise.all([subscription1, subscription2, subscription3])
// Wait for the subscription sync timer (500ms + buffer)
await delay(600)
// Check the final subscription state in the store
const finalState = testStoreRef.store.getState()
const subscriptionState = finalState[api.reducerPath].subscriptions
// Should have subscriptions for getBanana(1), getBanana(2), and getBananas()
expect(subscriptionState).toMatchObject({
'getBanana(1)': {
[subscription1.requestId]: { pollingInterval: 1000 },
},
'getBanana(2)': {
[subscription2.requestId]: { refetchOnFocus: true },
},
'getBananas(undefined)': {
[subscription3.requestId]: {},
},
})
// Verify the subscription entries have the expected structure
expect(Object.keys(subscriptionState)).toHaveLength(3)
expect(subscriptionState['getBanana(1)']?.[subscription1.requestId]).toEqual({
pollingInterval: 1000,
})
expect(subscriptionState['getBanana(2)']?.[subscription2.requestId]).toEqual({
refetchOnFocus: true,
})
expect(
subscriptionState['getBananas(undefined)']?.[subscription3.requestId],
).toEqual({})
})
it('does not leak subscription state between multiple stores using the same API instance (SSR scenario)', async () => {
vi.useFakeTimers()
// Simulate SSR: create API once at module level
const sharedApi = createApi({
baseQuery: (args?: any) => ({ data: args }),
tagTypes: ['Test'],
endpoints: (build) => ({
getTest: build.query<unknown, number>({
query(id) {
return { url: `test/${id}` }
},
}),
}),
})
// Create first store (simulating first SSR request)
const store1Ref = setupApiStore(sharedApi, {}, { withoutListeners: true })
// Add subscription in store1
const sub1 = store1Ref.store.dispatch(
sharedApi.endpoints.getTest.initiate(1, {
subscriptionOptions: { pollingInterval: 1000 },
}),
)
vi.advanceTimersByTime(10)
await sub1
// Wait for subscription sync (500ms + buffer)
vi.advanceTimersByTime(600)
// Verify store1 has the subscription
const store1SubscriptionSelectors = store1Ref.store.dispatch(
sharedApi.internalActions.internal_getRTKQSubscriptions(),
) as any
const store1InternalSubs = store1SubscriptionSelectors.getSubscriptions()
expect(store1InternalSubs.size).toBe(1)
// Create second store (simulating second SSR request)
const store2Ref = setupApiStore(sharedApi, {}, { withoutListeners: true })
// Check subscriptions via internal action
const store2SubscriptionSelectors = store2Ref.store.dispatch(
sharedApi.internalActions.internal_getRTKQSubscriptions(),
) as any
const store2InternalSubs = store2SubscriptionSelectors.getSubscriptions()
expect(store2InternalSubs.size).toBe(0)
})
@@ -0,0 +1,82 @@
{
"name": "@babel/core",
"version": "7.28.5",
"description": "Babel compiler core.",
"main": "./lib/index.js",
"author": "The Babel Team (https://babel.dev/team)",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-core"
},
"homepage": "https://babel.dev/docs/en/next/babel-core",
"bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen",
"keywords": [
"6to5",
"babel",
"classes",
"const",
"es6",
"harmony",
"let",
"modules",
"transpile",
"transpiler",
"var",
"babel-core",
"compiler"
],
"engines": {
"node": ">=6.9.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/babel"
},
"browser": {
"./lib/config/files/index.js": "./lib/config/files/index-browser.js",
"./lib/config/resolve-targets.js": "./lib/config/resolve-targets-browser.js",
"./lib/transform-file.js": "./lib/transform-file-browser.js",
"./src/config/files/index.ts": "./src/config/files/index-browser.ts",
"./src/config/resolve-targets.ts": "./src/config/resolve-targets-browser.ts",
"./src/transform-file.ts": "./src/transform-file-browser.ts"
},
"dependencies": {
"@babel/code-frame": "^7.27.1",
"@babel/generator": "^7.28.5",
"@babel/helper-compilation-targets": "^7.27.2",
"@babel/helper-module-transforms": "^7.28.3",
"@babel/helpers": "^7.28.4",
"@babel/parser": "^7.28.5",
"@babel/template": "^7.27.2",
"@babel/traverse": "^7.28.5",
"@babel/types": "^7.28.5",
"@jridgewell/remapping": "^2.3.5",
"convert-source-map": "^2.0.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
"json5": "^2.2.3",
"semver": "^6.3.1"
},
"devDependencies": {
"@babel/helper-transform-fixture-test-runner": "^7.28.5",
"@babel/plugin-syntax-flow": "^7.27.1",
"@babel/plugin-transform-flow-strip-types": "^7.27.1",
"@babel/plugin-transform-modules-commonjs": "^7.27.1",
"@babel/preset-env": "^7.28.5",
"@babel/preset-typescript": "^7.28.5",
"@jridgewell/trace-mapping": "^0.3.28",
"@types/convert-source-map": "^2.0.0",
"@types/debug": "^4.1.0",
"@types/resolve": "^1.3.2",
"@types/semver": "^5.4.0",
"rimraf": "^3.0.0",
"ts-node": "^11.0.0-beta.1",
"tsx": "^4.20.3"
},
"type": "commonjs"
}
@@ -0,0 +1,42 @@
{
"name": "set-blocking",
"version": "2.0.0",
"description": "set blocking stdio and stderr ensuring that terminal output does not truncate",
"main": "index.js",
"scripts": {
"pretest": "standard",
"test": "nyc mocha ./test/*.js",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"version": "standard-version"
},
"repository": {
"type": "git",
"url": "git+https://github.com/yargs/set-blocking.git"
},
"keywords": [
"flush",
"terminal",
"blocking",
"shim",
"stdio",
"stderr"
],
"author": "Ben Coe <ben@npmjs.com>",
"license": "ISC",
"bugs": {
"url": "https://github.com/yargs/set-blocking/issues"
},
"homepage": "https://github.com/yargs/set-blocking#readme",
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^2.11.9",
"mocha": "^2.4.5",
"nyc": "^6.4.4",
"standard": "^7.0.1",
"standard-version": "^2.2.1"
},
"files": [
"index.js",
"LICENSE.txt"
]
}
@@ -0,0 +1,31 @@
{
"name": "isexe",
"version": "2.0.0",
"description": "Minimal module to check if a file is executable.",
"main": "index.js",
"directories": {
"test": "test"
},
"devDependencies": {
"mkdirp": "^0.5.1",
"rimraf": "^2.5.0",
"tap": "^10.3.0"
},
"scripts": {
"test": "tap test/*.js --100",
"preversion": "npm test",
"postversion": "npm publish",
"postpublish": "git push origin --all; git push origin --tags"
},
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"license": "ISC",
"repository": {
"type": "git",
"url": "git+https://github.com/isaacs/isexe.git"
},
"keywords": [],
"bugs": {
"url": "https://github.com/isaacs/isexe/issues"
},
"homepage": "https://github.com/isaacs/isexe#readme"
}
@@ -0,0 +1 @@
{"name":"file-type","version":"3.9.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532118525,"integrity":"sha512-8ezmvhd7YMLuFZk/Eak821LT5bPAY9IpTvm8oJZfG4KQWIoh+X5OQCTXsIVWCyJ05Bty08lkm5T5nqdITW9TLA==","mode":420,"size":1384},"index.js":{"checkedAt":1794532118525,"integrity":"sha512-0G3qBsBtFzgkSVCOz7I0Y7WBpc9aPy9OyjsEApq4vzo7u0sz5UEjv8rKOlkQXeNzwFyEPGzmnj5KMJPeDFw2hg==","mode":420,"size":13129},"license":{"checkedAt":1794532098170,"integrity":"sha512-rnnnpCCaRRrva3j3sLiBcOeiIzUSasNFUiv06v4IGNpYZarhUHxdwCJO+FRUjHId+ahDcYIvNtUMvNl/qUbu6Q==","mode":420,"size":1119},"readme.md":{"checkedAt":1794532118526,"integrity":"sha512-oK08pcIhSkNCL/hukc9592XOiC+TO3caXO6thm1d3+trHyolaSZg5WxL+nbVE+/N7IijHW860ZLroZZfqFdxCw==","mode":420,"size":5066}}}
@@ -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 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 0C","33":"J ZB K D E F A B C L M G 1C"},D:{"1":"0 1 2 3 4 5 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 F","33":"6 7 8 9 A B C L M G N O P aB AB BB"},E:{"1":"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","33":"K 3C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z OC","2":"F B FD GD HD ID","33":"C JD","36":"NC uC"},G:{"1":"E 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","2":"ZC KD vC","33":"LD MD"},H:{"2":"hD"},I:{"1":"I mD nD","2":"TC iD jD kD","33":"J lD vC"},J:{"1":"A","2":"D"},K:{"1":"H OC","2":"A B","33":"C","36":"NC uC"},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:4,C:"CSS Repeating Gradients",D:true};
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more