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

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

No files matched your search

@@ -0,0 +1,14 @@
/**
* Checks if `value` is in the array cache.
*
* @private
* @name has
* @memberOf SetCache
* @param {*} value The value to search for.
* @returns {number} Returns `true` if `value` is found, else `false`.
*/
function setCacheHas(value) {
return this.__data__.has(value);
}
module.exports = setCacheHas;
@@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>
@@ -0,0 +1,477 @@
import { Attributor, BlockBlot, ClassAttributor, EmbedBlot, Scope, StyleAttributor } from 'parchment';
import Delta from 'quill-delta';
import { BlockEmbed } from '../blots/block.js';
import logger from '../core/logger.js';
import Module from '../core/module.js';
import Quill from '../core/quill.js';
import { AlignAttribute, AlignStyle } from '../formats/align.js';
import { BackgroundStyle } from '../formats/background.js';
import CodeBlock from '../formats/code.js';
import { ColorStyle } from '../formats/color.js';
import { DirectionAttribute, DirectionStyle } from '../formats/direction.js';
import { FontStyle } from '../formats/font.js';
import { SizeStyle } from '../formats/size.js';
import { deleteRange } from './keyboard.js';
import normalizeExternalHTML from './normalizeExternalHTML/index.js';
const debug = logger('quill:clipboard');
const CLIPBOARD_CONFIG = [[Node.TEXT_NODE, matchText], [Node.TEXT_NODE, matchNewline], ['br', matchBreak], [Node.ELEMENT_NODE, matchNewline], [Node.ELEMENT_NODE, matchBlot], [Node.ELEMENT_NODE, matchAttributor], [Node.ELEMENT_NODE, matchStyles], ['li', matchIndent], ['ol, ul', matchList], ['pre', matchCodeBlock], ['tr', matchTable], ['b', createMatchAlias('bold')], ['i', createMatchAlias('italic')], ['strike', createMatchAlias('strike')], ['style', matchIgnore]];
const ATTRIBUTE_ATTRIBUTORS = [AlignAttribute, DirectionAttribute].reduce((memo, attr) => {
memo[attr.keyName] = attr;
return memo;
}, {});
const STYLE_ATTRIBUTORS = [AlignStyle, BackgroundStyle, ColorStyle, DirectionStyle, FontStyle, SizeStyle].reduce((memo, attr) => {
memo[attr.keyName] = attr;
return memo;
}, {});
class Clipboard extends Module {
static DEFAULTS = {
matchers: []
};
constructor(quill, options) {
super(quill, options);
this.quill.root.addEventListener('copy', e => this.onCaptureCopy(e, false));
this.quill.root.addEventListener('cut', e => this.onCaptureCopy(e, true));
this.quill.root.addEventListener('paste', this.onCapturePaste.bind(this));
this.matchers = [];
CLIPBOARD_CONFIG.concat(this.options.matchers ?? []).forEach(_ref => {
let [selector, matcher] = _ref;
this.addMatcher(selector, matcher);
});
}
addMatcher(selector, matcher) {
this.matchers.push([selector, matcher]);
}
convert(_ref2) {
let {
html,
text
} = _ref2;
let formats = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (formats[CodeBlock.blotName]) {
return new Delta().insert(text || '', {
[CodeBlock.blotName]: formats[CodeBlock.blotName]
});
}
if (!html) {
return new Delta().insert(text || '', formats);
}
const delta = this.convertHTML(html);
// Remove trailing newline
if (deltaEndsWith(delta, '\n') && (delta.ops[delta.ops.length - 1].attributes == null || formats.table)) {
return delta.compose(new Delta().retain(delta.length() - 1).delete(1));
}
return delta;
}
normalizeHTML(doc) {
normalizeExternalHTML(doc);
}
convertHTML(html) {
const doc = new DOMParser().parseFromString(html, 'text/html');
this.normalizeHTML(doc);
const container = doc.body;
const nodeMatches = new WeakMap();
const [elementMatchers, textMatchers] = this.prepareMatching(container, nodeMatches);
return traverse(this.quill.scroll, container, elementMatchers, textMatchers, nodeMatches);
}
dangerouslyPasteHTML(index, html) {
let source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Quill.sources.API;
if (typeof index === 'string') {
const delta = this.convert({
html: index,
text: ''
});
// @ts-expect-error
this.quill.setContents(delta, html);
this.quill.setSelection(0, Quill.sources.SILENT);
} else {
const paste = this.convert({
html,
text: ''
});
this.quill.updateContents(new Delta().retain(index).concat(paste), source);
this.quill.setSelection(index + paste.length(), Quill.sources.SILENT);
}
}
onCaptureCopy(e) {
let isCut = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (e.defaultPrevented) return;
e.preventDefault();
const [range] = this.quill.selection.getRange();
if (range == null) return;
const {
html,
text
} = this.onCopy(range, isCut);
e.clipboardData?.setData('text/plain', text);
e.clipboardData?.setData('text/html', html);
if (isCut) {
deleteRange({
range,
quill: this.quill
});
}
}
/*
* https://www.iana.org/assignments/media-types/text/uri-list
*/
normalizeURIList(urlList) {
return urlList.split(/\r?\n/)
// Ignore all comments
.filter(url => url[0] !== '#').join('\n');
}
onCapturePaste(e) {
if (e.defaultPrevented || !this.quill.isEnabled()) return;
e.preventDefault();
const range = this.quill.getSelection(true);
if (range == null) return;
const html = e.clipboardData?.getData('text/html');
let text = e.clipboardData?.getData('text/plain');
if (!html && !text) {
const urlList = e.clipboardData?.getData('text/uri-list');
if (urlList) {
text = this.normalizeURIList(urlList);
}
}
const files = Array.from(e.clipboardData?.files || []);
if (!html && files.length > 0) {
this.quill.uploader.upload(range, files);
return;
}
if (html && files.length > 0) {
const doc = new DOMParser().parseFromString(html, 'text/html');
if (doc.body.childElementCount === 1 && doc.body.firstElementChild?.tagName === 'IMG') {
this.quill.uploader.upload(range, files);
return;
}
}
this.onPaste(range, {
html,
text
});
}
onCopy(range) {
const text = this.quill.getText(range);
const html = this.quill.getSemanticHTML(range);
return {
html,
text
};
}
onPaste(range, _ref3) {
let {
text,
html
} = _ref3;
const formats = this.quill.getFormat(range.index);
const pastedDelta = this.convert({
text,
html
}, formats);
debug.log('onPaste', pastedDelta, {
text,
html
});
const delta = new Delta().retain(range.index).delete(range.length).concat(pastedDelta);
this.quill.updateContents(delta, Quill.sources.USER);
// range.length contributes to delta.length()
this.quill.setSelection(delta.length() - range.length, Quill.sources.SILENT);
this.quill.scrollSelectionIntoView();
}
prepareMatching(container, nodeMatches) {
const elementMatchers = [];
const textMatchers = [];
this.matchers.forEach(pair => {
const [selector, matcher] = pair;
switch (selector) {
case Node.TEXT_NODE:
textMatchers.push(matcher);
break;
case Node.ELEMENT_NODE:
elementMatchers.push(matcher);
break;
default:
Array.from(container.querySelectorAll(selector)).forEach(node => {
if (nodeMatches.has(node)) {
const matches = nodeMatches.get(node);
matches?.push(matcher);
} else {
nodeMatches.set(node, [matcher]);
}
});
break;
}
});
return [elementMatchers, textMatchers];
}
}
function applyFormat(delta, format, value, scroll) {
if (!scroll.query(format)) {
return delta;
}
return delta.reduce((newDelta, op) => {
if (!op.insert) return newDelta;
if (op.attributes && op.attributes[format]) {
return newDelta.push(op);
}
const formats = value ? {
[format]: value
} : {};
return newDelta.insert(op.insert, {
...formats,
...op.attributes
});
}, new Delta());
}
function deltaEndsWith(delta, text) {
let endText = '';
for (let i = delta.ops.length - 1; i >= 0 && endText.length < text.length; --i // eslint-disable-line no-plusplus
) {
const op = delta.ops[i];
if (typeof op.insert !== 'string') break;
endText = op.insert + endText;
}
return endText.slice(-1 * text.length) === text;
}
function isLine(node, scroll) {
if (!(node instanceof Element)) return false;
const match = scroll.query(node);
// @ts-expect-error
if (match && match.prototype instanceof EmbedBlot) return false;
return ['address', 'article', 'blockquote', 'canvas', 'dd', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'iframe', 'li', 'main', 'nav', 'ol', 'output', 'p', 'pre', 'section', 'table', 'td', 'tr', 'ul', 'video'].includes(node.tagName.toLowerCase());
}
function isBetweenInlineElements(node, scroll) {
return node.previousElementSibling && node.nextElementSibling && !isLine(node.previousElementSibling, scroll) && !isLine(node.nextElementSibling, scroll);
}
const preNodes = new WeakMap();
function isPre(node) {
if (node == null) return false;
if (!preNodes.has(node)) {
// @ts-expect-error
if (node.tagName === 'PRE') {
preNodes.set(node, true);
} else {
preNodes.set(node, isPre(node.parentNode));
}
}
return preNodes.get(node);
}
function traverse(scroll, node, elementMatchers, textMatchers, nodeMatches) {
// Post-order
if (node.nodeType === node.TEXT_NODE) {
return textMatchers.reduce((delta, matcher) => {
return matcher(node, delta, scroll);
}, new Delta());
}
if (node.nodeType === node.ELEMENT_NODE) {
return Array.from(node.childNodes || []).reduce((delta, childNode) => {
let childrenDelta = traverse(scroll, childNode, elementMatchers, textMatchers, nodeMatches);
if (childNode.nodeType === node.ELEMENT_NODE) {
childrenDelta = elementMatchers.reduce((reducedDelta, matcher) => {
return matcher(childNode, reducedDelta, scroll);
}, childrenDelta);
childrenDelta = (nodeMatches.get(childNode) || []).reduce((reducedDelta, matcher) => {
return matcher(childNode, reducedDelta, scroll);
}, childrenDelta);
}
return delta.concat(childrenDelta);
}, new Delta());
}
return new Delta();
}
function createMatchAlias(format) {
return (_node, delta, scroll) => {
return applyFormat(delta, format, true, scroll);
};
}
function matchAttributor(node, delta, scroll) {
const attributes = Attributor.keys(node);
const classes = ClassAttributor.keys(node);
const styles = StyleAttributor.keys(node);
const formats = {};
attributes.concat(classes).concat(styles).forEach(name => {
let attr = scroll.query(name, Scope.ATTRIBUTE);
if (attr != null) {
formats[attr.attrName] = attr.value(node);
if (formats[attr.attrName]) return;
}
attr = ATTRIBUTE_ATTRIBUTORS[name];
if (attr != null && (attr.attrName === name || attr.keyName === name)) {
formats[attr.attrName] = attr.value(node) || undefined;
}
attr = STYLE_ATTRIBUTORS[name];
if (attr != null && (attr.attrName === name || attr.keyName === name)) {
attr = STYLE_ATTRIBUTORS[name];
formats[attr.attrName] = attr.value(node) || undefined;
}
});
return Object.entries(formats).reduce((newDelta, _ref4) => {
let [name, value] = _ref4;
return applyFormat(newDelta, name, value, scroll);
}, delta);
}
function matchBlot(node, delta, scroll) {
const match = scroll.query(node);
if (match == null) return delta;
// @ts-expect-error
if (match.prototype instanceof EmbedBlot) {
const embed = {};
// @ts-expect-error
const value = match.value(node);
if (value != null) {
// @ts-expect-error
embed[match.blotName] = value;
// @ts-expect-error
return new Delta().insert(embed, match.formats(node, scroll));
}
} else {
// @ts-expect-error
if (match.prototype instanceof BlockBlot && !deltaEndsWith(delta, '\n')) {
delta.insert('\n');
}
if ('blotName' in match && 'formats' in match && typeof match.formats === 'function') {
return applyFormat(delta, match.blotName, match.formats(node, scroll), scroll);
}
}
return delta;
}
function matchBreak(node, delta) {
if (!deltaEndsWith(delta, '\n')) {
delta.insert('\n');
}
return delta;
}
function matchCodeBlock(node, delta, scroll) {
const match = scroll.query('code-block');
const language = match && 'formats' in match && typeof match.formats === 'function' ? match.formats(node, scroll) : true;
return applyFormat(delta, 'code-block', language, scroll);
}
function matchIgnore() {
return new Delta();
}
function matchIndent(node, delta, scroll) {
const match = scroll.query(node);
if (match == null ||
// @ts-expect-error
match.blotName !== 'list' || !deltaEndsWith(delta, '\n')) {
return delta;
}
let indent = -1;
let parent = node.parentNode;
while (parent != null) {
// @ts-expect-error
if (['OL', 'UL'].includes(parent.tagName)) {
indent += 1;
}
parent = parent.parentNode;
}
if (indent <= 0) return delta;
return delta.reduce((composed, op) => {
if (!op.insert) return composed;
if (op.attributes && typeof op.attributes.indent === 'number') {
return composed.push(op);
}
return composed.insert(op.insert, {
indent,
...(op.attributes || {})
});
}, new Delta());
}
function matchList(node, delta, scroll) {
const element = node;
let list = element.tagName === 'OL' ? 'ordered' : 'bullet';
const checkedAttr = element.getAttribute('data-checked');
if (checkedAttr) {
list = checkedAttr === 'true' ? 'checked' : 'unchecked';
}
return applyFormat(delta, 'list', list, scroll);
}
function matchNewline(node, delta, scroll) {
if (!deltaEndsWith(delta, '\n')) {
if (isLine(node, scroll) && (node.childNodes.length > 0 || node instanceof HTMLParagraphElement)) {
return delta.insert('\n');
}
if (delta.length() > 0 && node.nextSibling) {
let nextSibling = node.nextSibling;
while (nextSibling != null) {
if (isLine(nextSibling, scroll)) {
return delta.insert('\n');
}
const match = scroll.query(nextSibling);
// @ts-expect-error
if (match && match.prototype instanceof BlockEmbed) {
return delta.insert('\n');
}
nextSibling = nextSibling.firstChild;
}
}
}
return delta;
}
function matchStyles(node, delta, scroll) {
const formats = {};
const style = node.style || {};
if (style.fontStyle === 'italic') {
formats.italic = true;
}
if (style.textDecoration === 'underline') {
formats.underline = true;
}
if (style.textDecoration === 'line-through') {
formats.strike = true;
}
if (style.fontWeight?.startsWith('bold') ||
// @ts-expect-error Fix me later
parseInt(style.fontWeight, 10) >= 700) {
formats.bold = true;
}
delta = Object.entries(formats).reduce((newDelta, _ref5) => {
let [name, value] = _ref5;
return applyFormat(newDelta, name, value, scroll);
}, delta);
// @ts-expect-error
if (parseFloat(style.textIndent || 0) > 0) {
// Could be 0.5in
return new Delta().insert('\t').concat(delta);
}
return delta;
}
function matchTable(node, delta, scroll) {
const table = node.parentElement?.tagName === 'TABLE' ? node.parentElement : node.parentElement?.parentElement;
if (table != null) {
const rows = Array.from(table.querySelectorAll('tr'));
const row = rows.indexOf(node) + 1;
return applyFormat(delta, 'table', row, scroll);
}
return delta;
}
function matchText(node, delta, scroll) {
// @ts-expect-error
let text = node.data;
// Word represents empty line with <o:p>&nbsp;</o:p>
if (node.parentElement?.tagName === 'O:P') {
return delta.insert(text.trim());
}
if (!isPre(node)) {
if (text.trim().length === 0 && text.includes('\n') && !isBetweenInlineElements(node, scroll)) {
return delta;
}
// convert all non-nbsp whitespace into regular space
text = text.replace(/[^\S\u00a0]/g, ' ');
// collapse consecutive spaces into one
text = text.replace(/ {2,}/g, ' ');
if (node.previousSibling == null && node.parentElement != null && isLine(node.parentElement, scroll) || node.previousSibling instanceof Element && isLine(node.previousSibling, scroll)) {
// block structure means we don't need leading space
text = text.replace(/^ /, '');
}
if (node.nextSibling == null && node.parentElement != null && isLine(node.parentElement, scroll) || node.nextSibling instanceof Element && isLine(node.nextSibling, scroll)) {
// block structure means we don't need trailing space
text = text.replace(/ $/, '');
}
// done removing whitespace and can normalize all to regular space
text = text.replaceAll('\u00a0', ' ');
}
return delta.insert(text);
}
export { Clipboard as default, matchAttributor, matchBlot, matchNewline, matchText, traverse };
//# sourceMappingURL=clipboard.js.map
@@ -0,0 +1,92 @@
{
"name": "hasown",
"version": "2.0.2",
"description": "A robust, ES3 compatible, \"has own property\" predicate.",
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"types": "index.d.ts",
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "npm run tsc",
"pretest": "npm run lint",
"tsc": "tsc -p .",
"posttsc": "attw -P",
"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/hasOwn.git"
},
"keywords": [
"has",
"hasOwnProperty",
"hasOwn",
"has-own",
"own",
"has",
"property",
"in",
"javascript",
"ecmascript"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/inspect-js/hasOwn/issues"
},
"homepage": "https://github.com/inspect-js/hasOwn#readme",
"dependencies": {
"function-bind": "^1.1.2"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.1",
"@ljharb/eslint-config": "^21.1.0",
"@ljharb/tsconfig": "^0.2.0",
"@types/function-bind": "^1.1.10",
"@types/mock-property": "^1.0.2",
"@types/tape": "^5.6.4",
"aud": "^2.0.4",
"auto-changelog": "^2.4.0",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"in-publish": "^2.0.1",
"mock-property": "^1.0.3",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.7.5",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"testling": {
"files": "test/index.js"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows",
"test"
]
}
}
@@ -0,0 +1,59 @@
var $d796e7157ac96470$exports = require("./getScrollParent.main.js");
var $1254e5bb94ac8761$exports = require("./useEffectEvent.main.js");
var $78605a5d7424e31b$exports = require("./useLayoutEffect.main.js");
var $8Ncyo$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, "useLoadMoreSentinel", () => $f6a4874a7c582761$export$ccaea96c28e8b9e7);
/*
* Copyright 2024 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $f6a4874a7c582761$export$ccaea96c28e8b9e7(props, ref) {
let { collection: collection, onLoadMore: onLoadMore, scrollOffset: scrollOffset = 1 } = props;
let sentinelObserver = (0, $8Ncyo$react.useRef)(null);
let triggerLoadMore = (0, $1254e5bb94ac8761$exports.useEffectEvent)((entries)=>{
// Use "isIntersecting" over an equality check of 0 since it seems like there is cases where
// a intersection ratio of 0 can be reported when isIntersecting is actually true
for (let entry of entries)// Note that this will be called if the collection changes, even if onLoadMore was already called and is being processed.
// Up to user discretion as to how to handle these multiple onLoadMore calls
if (entry.isIntersecting && onLoadMore) onLoadMore();
});
(0, $78605a5d7424e31b$exports.useLayoutEffect)(()=>{
if (ref.current) {
// Tear down and set up a new IntersectionObserver when the collection changes so that we can properly trigger additional loadMores if there is room for more items
// Need to do this tear down and set up since using a large rootMargin will mean the observer's callback isn't called even when scrolling the item into view beause its visibility hasn't actually changed
// https://codesandbox.io/p/sandbox/magical-swanson-dhgp89?file=%2Fsrc%2FApp.js%3A21%2C21
sentinelObserver.current = new IntersectionObserver(triggerLoadMore, {
root: (0, $d796e7157ac96470$exports.getScrollParent)(ref === null || ref === void 0 ? void 0 : ref.current),
rootMargin: `0px ${100 * scrollOffset}% ${100 * scrollOffset}% ${100 * scrollOffset}%`
});
sentinelObserver.current.observe(ref.current);
}
return ()=>{
if (sentinelObserver.current) sentinelObserver.current.disconnect();
};
}, [
collection,
triggerLoadMore,
ref,
scrollOffset
]);
}
//# sourceMappingURL=useLoadMoreSentinel.main.js.map
@@ -0,0 +1,340 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/components/table.ts
var table_exports = {};
__export(table_exports, {
table: () => table
});
module.exports = __toCommonJS(table_exports);
// src/utils/classes.ts
var dataFocusVisibleClasses = [
"outline-none",
"data-[focus-visible=true]:z-10",
"data-[focus-visible=true]:outline-2",
"data-[focus-visible=true]:outline-focus",
"data-[focus-visible=true]:outline-offset-2"
];
// src/utils/tw-merge-config.ts
var COMMON_UNITS = ["small", "medium", "large"];
var twMergeConfig = {
theme: {
opacity: ["disabled"],
spacing: ["divider"],
borderWidth: COMMON_UNITS,
borderRadius: COMMON_UNITS
},
classGroups: {
shadow: [{ shadow: COMMON_UNITS }],
"font-size": [{ text: ["tiny", ...COMMON_UNITS] }],
"bg-image": [
"bg-stripe-gradient-default",
"bg-stripe-gradient-primary",
"bg-stripe-gradient-secondary",
"bg-stripe-gradient-success",
"bg-stripe-gradient-warning",
"bg-stripe-gradient-danger"
]
}
};
// src/utils/tv.ts
var import_tailwind_variants = require("tailwind-variants");
var tv = (options, config) => {
var _a, _b, _c;
return (0, import_tailwind_variants.tv)(options, {
...config,
twMerge: (_a = config == null ? void 0 : config.twMerge) != null ? _a : true,
twMergeConfig: {
...config == null ? void 0 : config.twMergeConfig,
theme: {
...(_b = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _b.theme,
...twMergeConfig.theme
},
classGroups: {
...(_c = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _c.classGroups,
...twMergeConfig.classGroups
}
}
});
};
// src/components/table.ts
var table = tv({
slots: {
base: "flex flex-col relative gap-4",
wrapper: [
"p-4",
"z-0",
"flex",
"flex-col",
"relative",
"justify-between",
"gap-4",
"shadow-small",
"bg-content1",
"overflow-auto"
],
table: "min-w-full h-auto",
thead: "[&>tr]:first:rounded-lg",
tbody: "",
tr: ["group/tr", "outline-none", ...dataFocusVisibleClasses],
th: [
"group/th",
"px-3",
"h-10",
"text-start",
"align-middle",
"bg-default-100",
"whitespace-nowrap",
"text-foreground-500",
"text-tiny",
"font-semibold",
"first:rounded-s-lg",
"last:rounded-e-lg",
"outline-none",
"data-[sortable=true]:cursor-pointer",
"data-[hover=true]:text-foreground-400",
...dataFocusVisibleClasses
],
td: [
"py-2",
"px-3",
"relative",
"align-middle",
"whitespace-normal",
"text-small",
"font-normal",
"outline-none",
"[&>*]:z-1",
"[&>*]:relative",
...dataFocusVisibleClasses,
"before:content-['']",
"before:absolute",
"before:z-0",
"before:inset-0",
"before:opacity-0",
"data-[selected=true]:before:opacity-100",
"group-data-[disabled=true]/tr:text-foreground-300",
"group-data-[disabled=true]/tr:cursor-not-allowed"
],
tfoot: "",
sortIcon: [
"ms-2",
"mb-px",
"opacity-0",
"text-inherit",
"inline-block",
"transition-transform-opacity",
"data-[visible=true]:opacity-100",
"group-data-[hover=true]/th:opacity-100",
"data-[direction=ascending]:rotate-180"
],
emptyWrapper: "text-foreground-400 align-middle text-center h-40",
loadingWrapper: "absolute inset-0 flex items-center justify-center"
},
variants: {
color: {
default: {
td: "before:bg-default/60 data-[selected=true]:text-default-foreground"
},
primary: {
td: "before:bg-primary/20 data-[selected=true]:text-primary"
},
secondary: {
td: "before:bg-secondary/20 data-[selected=true]:text-secondary"
},
success: {
td: "before:bg-success/20 data-[selected=true]:text-success-600 dark:data-[selected=true]:text-success"
},
warning: {
td: "before:bg-warning/20 data-[selected=true]:text-warning-600 dark:data-[selected=true]:text-warning"
},
danger: {
td: "before:bg-danger/20 data-[selected=true]:text-danger dark:data-[selected=true]:text-danger-500"
}
},
layout: {
auto: {
table: "table-auto"
},
fixed: {
table: "table-fixed"
}
},
radius: {
none: {
wrapper: "rounded-none"
},
sm: {
wrapper: "rounded-small"
},
md: {
wrapper: "rounded-medium"
},
lg: {
wrapper: "rounded-large"
}
},
shadow: {
none: {
wrapper: "shadow-none"
},
sm: {
wrapper: "shadow-small"
},
md: {
wrapper: "shadow-medium"
},
lg: {
wrapper: "shadow-large"
}
},
hideHeader: {
true: {
thead: "hidden"
}
},
isStriped: {
true: {
td: [
"group-data-[odd=true]/tr:before:bg-default-100",
"group-data-[odd=true]/tr:before:opacity-100",
"group-data-[odd=true]/tr:before:-z-10"
]
}
},
isCompact: {
true: {
td: "py-1"
},
false: {}
},
isHeaderSticky: {
true: {
thead: "sticky top-0 z-20 [&>tr]:first:shadow-small"
}
},
isSelectable: {
true: {
tr: "cursor-default",
td: [
"group-aria-[selected=false]/tr:group-data-[hover=true]/tr:before:bg-default-100",
"group-aria-[selected=false]/tr:group-data-[hover=true]/tr:before:opacity-70"
]
}
},
isMultiSelectable: {
true: {
td: [
"group-data-[first=true]/tr:first:before:rounded-ts-lg",
"group-data-[first=true]/tr:last:before:rounded-te-lg",
"group-data-[middle=true]/tr:before:rounded-none",
"group-data-[last=true]/tr:first:before:rounded-bs-lg",
"group-data-[last=true]/tr:last:before:rounded-be-lg"
]
},
false: {
td: ["first:before:rounded-s-lg", "last:before:rounded-e-lg"]
}
},
fullWidth: {
true: {
base: "w-full",
wrapper: "w-full",
table: "w-full"
}
},
align: {
start: {
th: "text-start",
td: "text-start"
},
center: {
th: "text-center",
td: "text-center"
},
end: {
th: "text-end",
td: "text-end"
}
}
},
defaultVariants: {
layout: "auto",
shadow: "sm",
radius: "lg",
color: "default",
isCompact: false,
hideHeader: false,
isStriped: false,
fullWidth: true,
align: "start"
},
compoundVariants: [
{
isStriped: true,
color: "default",
class: {
td: "group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-default/60"
}
},
{
isStriped: true,
color: "primary",
class: {
td: "group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-primary/20"
}
},
{
isStriped: true,
color: "secondary",
class: {
td: "group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-secondary/20"
}
},
{
isStriped: true,
color: "success",
class: {
td: "group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-success/20"
}
},
{
isStriped: true,
color: "warning",
class: {
td: "group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-warning/20"
}
},
{
isStriped: true,
color: "danger",
class: {
td: "group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-danger/20"
}
}
]
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
table
});
@@ -0,0 +1,4 @@
{
"main": "../../cjs/index.cjs",
"module": "../../esm/index.js"
}
@@ -0,0 +1,56 @@
{
"name": "@heroui/image",
"version": "2.2.6",
"description": "A simple image component",
"keywords": [
"image"
],
"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/components/image"
},
"bugs": {
"url": "https://github.com/heroui-inc/heroui/issues"
},
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@heroui/theme": ">=2.4.0",
"@heroui/system": ">=2.4.0"
},
"dependencies": {
"@heroui/shared-utils": "2.1.3",
"@heroui/react-utils": "2.1.4",
"@heroui/use-image": "2.1.3"
},
"clean-package": "../../../clean-package.config.json",
"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,49 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/** @typedef {import("./Resolver")} Resolver */
/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */
/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */
module.exports = class ModulesInRootPlugin {
/**
* @param {string | ResolveStepHook} source source
* @param {string} path path
* @param {string | ResolveStepHook} target target
*/
constructor(source, path, target) {
this.source = source;
this.path = path;
this.target = target;
}
/**
* @param {Resolver} resolver the resolver
* @returns {void}
*/
apply(resolver) {
const target = resolver.ensureHook(this.target);
resolver
.getHook(this.source)
.tapAsync("ModulesInRootPlugin", (request, resolveContext, callback) => {
/** @type {ResolveRequest} */
const obj = {
...request,
path: this.path,
request: `./${request.request}`,
module: false,
};
resolver.doResolve(
target,
obj,
`looking for modules in ${this.path}`,
resolveContext,
callback,
);
});
}
};
@@ -0,0 +1,41 @@
var baseToString = require('./_baseToString'),
castSlice = require('./_castSlice'),
charsEndIndex = require('./_charsEndIndex'),
stringToArray = require('./_stringToArray'),
toString = require('./toString'),
trimmedEndIndex = require('./_trimmedEndIndex');
/**
* Removes trailing whitespace or specified characters from `string`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to trim.
* @param {string} [chars=whitespace] The characters to trim.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {string} Returns the trimmed string.
* @example
*
* _.trimEnd(' abc ');
* // => ' abc'
*
* _.trimEnd('-_-abc-_-', '_-');
* // => '-_-abc'
*/
function trimEnd(string, chars, guard) {
string = toString(string);
if (string && (guard || chars === undefined)) {
return string.slice(0, trimmedEndIndex(string) + 1);
}
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string),
end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
return castSlice(strSymbols, 0, end).join('');
}
module.exports = trimEnd;
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var LinkRole = {
relatedConcepts: [{
module: 'ARIA',
concept: {
name: 'link'
}
}, {
module: 'HTML',
concept: {
name: 'a',
attributes: [{
name: 'href'
}]
}
}],
type: 'widget'
};
var _default = LinkRole;
exports.default = _default;
@@ -0,0 +1,29 @@
// Main entrypoint for ESM web browser environments. Avoids using Node.js
// specific libraries, such as "path".
//
// TODO: figure out reasonable web equivalents for "resolve", "normalize", etc.
import { camelCase, decamelize, looksLikeNumber } from './build/lib/string-utils.js'
import { YargsParser } from './build/lib/yargs-parser.js'
const parser = new YargsParser({
cwd: () => { return '' },
format: (str, arg) => { return str.replace('%s', arg) },
normalize: (str) => { return str },
resolve: (str) => { return str },
require: () => {
throw Error('loading config from files not currently supported in browser')
},
env: () => {}
})
const yargsParser = function Parser (args, opts) {
const result = parser.parse(args.slice(), opts)
return result.argv
}
yargsParser.detailed = function (args, opts) {
return parser.parse(args.slice(), opts)
}
yargsParser.camelCase = camelCase
yargsParser.decamelize = decamelize
yargsParser.looksLikeNumber = looksLikeNumber
export default yargsParser
@@ -0,0 +1,252 @@
/**
* @typedef {import('hast').Element} Element
* @typedef {import('hast').ElementContent} ElementContent
*
* @typedef {import('./state.js').State} State
*/
/**
* @callback FootnoteBackContentTemplate
* Generate content for the backreference dynamically.
*
* For the following markdown:
*
* ```markdown
* Alpha[^micromark], bravo[^micromark], and charlie[^remark].
*
* [^remark]: things about remark
* [^micromark]: things about micromark
* ```
*
* This function will be called with:
*
* * `0` and `0` for the backreference from `things about micromark` to
* `alpha`, as it is the first used definition, and the first call to it
* * `0` and `1` for the backreference from `things about micromark` to
* `bravo`, as it is the first used definition, and the second call to it
* * `1` and `0` for the backreference from `things about remark` to
* `charlie`, as it is the second used definition
* @param {number} referenceIndex
* Index of the definition in the order that they are first referenced,
* 0-indexed.
* @param {number} rereferenceIndex
* Index of calls to the same definition, 0-indexed.
* @returns {Array<ElementContent> | ElementContent | string}
* Content for the backreference when linking back from definitions to their
* reference.
*
* @callback FootnoteBackLabelTemplate
* Generate a back label dynamically.
*
* For the following markdown:
*
* ```markdown
* Alpha[^micromark], bravo[^micromark], and charlie[^remark].
*
* [^remark]: things about remark
* [^micromark]: things about micromark
* ```
*
* This function will be called with:
*
* * `0` and `0` for the backreference from `things about micromark` to
* `alpha`, as it is the first used definition, and the first call to it
* * `0` and `1` for the backreference from `things about micromark` to
* `bravo`, as it is the first used definition, and the second call to it
* * `1` and `0` for the backreference from `things about remark` to
* `charlie`, as it is the second used definition
* @param {number} referenceIndex
* Index of the definition in the order that they are first referenced,
* 0-indexed.
* @param {number} rereferenceIndex
* Index of calls to the same definition, 0-indexed.
* @returns {string}
* Back label to use when linking back from definitions to their reference.
*/
import structuredClone from '@ungap/structured-clone'
import {normalizeUri} from 'micromark-util-sanitize-uri'
/**
* Generate the default content that GitHub uses on backreferences.
*
* @param {number} _
* Index of the definition in the order that they are first referenced,
* 0-indexed.
* @param {number} rereferenceIndex
* Index of calls to the same definition, 0-indexed.
* @returns {Array<ElementContent>}
* Content.
*/
export function defaultFootnoteBackContent(_, rereferenceIndex) {
/** @type {Array<ElementContent>} */
const result = [{type: 'text', value: '↩'}]
if (rereferenceIndex > 1) {
result.push({
type: 'element',
tagName: 'sup',
properties: {},
children: [{type: 'text', value: String(rereferenceIndex)}]
})
}
return result
}
/**
* Generate the default label that GitHub uses on backreferences.
*
* @param {number} referenceIndex
* Index of the definition in the order that they are first referenced,
* 0-indexed.
* @param {number} rereferenceIndex
* Index of calls to the same definition, 0-indexed.
* @returns {string}
* Label.
*/
export function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {
return (
'Back to reference ' +
(referenceIndex + 1) +
(rereferenceIndex > 1 ? '-' + rereferenceIndex : '')
)
}
/**
* Generate a hast footer for called footnote definitions.
*
* @param {State} state
* Info passed around.
* @returns {Element | undefined}
* `section` element or `undefined`.
*/
// eslint-disable-next-line complexity
export function footer(state) {
const clobberPrefix =
typeof state.options.clobberPrefix === 'string'
? state.options.clobberPrefix
: 'user-content-'
const footnoteBackContent =
state.options.footnoteBackContent || defaultFootnoteBackContent
const footnoteBackLabel =
state.options.footnoteBackLabel || defaultFootnoteBackLabel
const footnoteLabel = state.options.footnoteLabel || 'Footnotes'
const footnoteLabelTagName = state.options.footnoteLabelTagName || 'h2'
const footnoteLabelProperties = state.options.footnoteLabelProperties || {
className: ['sr-only']
}
/** @type {Array<ElementContent>} */
const listItems = []
let referenceIndex = -1
while (++referenceIndex < state.footnoteOrder.length) {
const definition = state.footnoteById.get(
state.footnoteOrder[referenceIndex]
)
if (!definition) {
continue
}
const content = state.all(definition)
const id = String(definition.identifier).toUpperCase()
const safeId = normalizeUri(id.toLowerCase())
let rereferenceIndex = 0
/** @type {Array<ElementContent>} */
const backReferences = []
const counts = state.footnoteCounts.get(id)
// eslint-disable-next-line no-unmodified-loop-condition
while (counts !== undefined && ++rereferenceIndex <= counts) {
if (backReferences.length > 0) {
backReferences.push({type: 'text', value: ' '})
}
let children =
typeof footnoteBackContent === 'string'
? footnoteBackContent
: footnoteBackContent(referenceIndex, rereferenceIndex)
if (typeof children === 'string') {
children = {type: 'text', value: children}
}
backReferences.push({
type: 'element',
tagName: 'a',
properties: {
href:
'#' +
clobberPrefix +
'fnref-' +
safeId +
(rereferenceIndex > 1 ? '-' + rereferenceIndex : ''),
dataFootnoteBackref: '',
ariaLabel:
typeof footnoteBackLabel === 'string'
? footnoteBackLabel
: footnoteBackLabel(referenceIndex, rereferenceIndex),
className: ['data-footnote-backref']
},
children: Array.isArray(children) ? children : [children]
})
}
const tail = content[content.length - 1]
if (tail && tail.type === 'element' && tail.tagName === 'p') {
const tailTail = tail.children[tail.children.length - 1]
if (tailTail && tailTail.type === 'text') {
tailTail.value += ' '
} else {
tail.children.push({type: 'text', value: ' '})
}
tail.children.push(...backReferences)
} else {
content.push(...backReferences)
}
/** @type {Element} */
const listItem = {
type: 'element',
tagName: 'li',
properties: {id: clobberPrefix + 'fn-' + safeId},
children: state.wrap(content, true)
}
state.patch(definition, listItem)
listItems.push(listItem)
}
if (listItems.length === 0) {
return
}
return {
type: 'element',
tagName: 'section',
properties: {dataFootnotes: true, className: ['footnotes']},
children: [
{
type: 'element',
tagName: footnoteLabelTagName,
properties: {
...structuredClone(footnoteLabelProperties),
id: 'footnote-label'
},
children: [{type: 'text', value: footnoteLabel}]
},
{type: 'text', value: '\n'},
{
type: 'element',
tagName: 'ol',
properties: {},
children: state.wrap(listItems, true)
},
{type: 'text', value: '\n'}
]
}
}
@@ -0,0 +1,87 @@
var Stream = require("stream")
var writeMethods = ["write", "end", "destroy"]
var readMethods = ["resume", "pause"]
var readEvents = ["data", "close"]
var slice = Array.prototype.slice
module.exports = duplex
function forEach (arr, fn) {
if (arr.forEach) {
return arr.forEach(fn)
}
for (var i = 0; i < arr.length; i++) {
fn(arr[i], i)
}
}
function duplex(writer, reader) {
var stream = new Stream()
var ended = false
forEach(writeMethods, proxyWriter)
forEach(readMethods, proxyReader)
forEach(readEvents, proxyStream)
reader.on("end", handleEnd)
writer.on("drain", function() {
stream.emit("drain")
})
writer.on("error", reemit)
reader.on("error", reemit)
stream.writable = writer.writable
stream.readable = reader.readable
return stream
function proxyWriter(methodName) {
stream[methodName] = method
function method() {
return writer[methodName].apply(writer, arguments)
}
}
function proxyReader(methodName) {
stream[methodName] = method
function method() {
stream.emit(methodName)
var func = reader[methodName]
if (func) {
return func.apply(reader, arguments)
}
reader.emit(methodName)
}
}
function proxyStream(methodName) {
reader.on(methodName, reemit)
function reemit() {
var args = slice.call(arguments)
args.unshift(methodName)
stream.emit.apply(stream, args)
}
}
function handleEnd() {
if (ended) {
return
}
ended = true
var args = slice.call(arguments)
args.unshift("end")
stream.emit.apply(stream, args)
}
function reemit(err) {
stream.emit("error", err)
}
}
@@ -0,0 +1,18 @@
import { ClassAttributor, Scope, StyleAttributor } from 'parchment';
class ColorAttributor extends StyleAttributor {
value(domNode) {
let value = super.value(domNode);
if (!value.startsWith('rgb(')) return value;
value = value.replace(/^[^\d]+/, '').replace(/[^\d]+$/, '');
const hex = value.split(',').map(component => `00${parseInt(component, 10).toString(16)}`.slice(-2)).join('');
return `#${hex}`;
}
}
const ColorClass = new ClassAttributor('color', 'ql-color', {
scope: Scope.INLINE
});
const ColorStyle = new ColorAttributor('color', 'color', {
scope: Scope.INLINE
});
export { ColorAttributor, ColorClass, ColorStyle };
//# sourceMappingURL=color.js.map
@@ -0,0 +1,47 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const checkExistence = require("../util/check-existence")
const getAllowModules = require("../util/get-allow-modules")
const getResolvePaths = require("../util/get-resolve-paths")
const getTryExtensions = require("../util/get-try-extensions")
const visitRequire = require("../util/visit-require")
module.exports = {
meta: {
docs: {
description:
"disallow `require()` expressions which import non-existence modules",
category: "Possible Errors",
recommended: true,
url:
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-missing-require.md",
},
type: "problem",
fixable: null,
schema: [
{
type: "object",
properties: {
allowModules: getAllowModules.schema,
tryExtensions: getTryExtensions.schema,
resolvePaths: getResolvePaths.schema,
},
additionalProperties: false,
},
],
},
create(context) {
const filePath = context.getFilename()
if (filePath === "<input>") {
return {}
}
return visitRequire(context, {}, targets => {
checkExistence(context, targets)
})
},
}
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ModuleScope = void 0;
const ScopeBase_1 = require("./ScopeBase");
const ScopeType_1 = require("./ScopeType");
class ModuleScope extends ScopeBase_1.ScopeBase {
constructor(scopeManager, upperScope, block) {
super(scopeManager, ScopeType_1.ScopeType.module, upperScope, block, false);
}
}
exports.ModuleScope = ModuleScope;
@@ -0,0 +1,112 @@
import {useMemo as $50cCT$useMemo, useRef as $50cCT$useRef, useEffect as $50cCT$useEffect} from "react";
import {useOverlayTriggerState as $50cCT$useOverlayTriggerState} from "@react-stately/overlays";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $8796f90736e175cb$var$TOOLTIP_DELAY = 1500; // this seems to be a 1.5 second delay, check with design
const $8796f90736e175cb$var$TOOLTIP_COOLDOWN = 500;
let $8796f90736e175cb$var$tooltips = {};
let $8796f90736e175cb$var$tooltipId = 0;
let $8796f90736e175cb$var$globalWarmedUp = false;
let $8796f90736e175cb$var$globalWarmUpTimeout = null;
let $8796f90736e175cb$var$globalCooldownTimeout = null;
function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
let { delay: delay = $8796f90736e175cb$var$TOOLTIP_DELAY, closeDelay: closeDelay = $8796f90736e175cb$var$TOOLTIP_COOLDOWN } = props;
let { isOpen: isOpen, open: open, close: close } = (0, $50cCT$useOverlayTriggerState)(props);
let id = (0, $50cCT$useMemo)(()=>`${++$8796f90736e175cb$var$tooltipId}`, []);
let closeTimeout = (0, $50cCT$useRef)(null);
let closeCallback = (0, $50cCT$useRef)(close);
let ensureTooltipEntry = ()=>{
$8796f90736e175cb$var$tooltips[id] = hideTooltip;
};
let closeOpenTooltips = ()=>{
for(let hideTooltipId in $8796f90736e175cb$var$tooltips)if (hideTooltipId !== id) {
$8796f90736e175cb$var$tooltips[hideTooltipId](true);
delete $8796f90736e175cb$var$tooltips[hideTooltipId];
}
};
let showTooltip = ()=>{
if (closeTimeout.current) clearTimeout(closeTimeout.current);
closeTimeout.current = null;
closeOpenTooltips();
ensureTooltipEntry();
$8796f90736e175cb$var$globalWarmedUp = true;
open();
if ($8796f90736e175cb$var$globalWarmUpTimeout) {
clearTimeout($8796f90736e175cb$var$globalWarmUpTimeout);
$8796f90736e175cb$var$globalWarmUpTimeout = null;
}
if ($8796f90736e175cb$var$globalCooldownTimeout) {
clearTimeout($8796f90736e175cb$var$globalCooldownTimeout);
$8796f90736e175cb$var$globalCooldownTimeout = null;
}
};
let hideTooltip = (immediate)=>{
if (immediate || closeDelay <= 0) {
if (closeTimeout.current) clearTimeout(closeTimeout.current);
closeTimeout.current = null;
closeCallback.current();
} else if (!closeTimeout.current) closeTimeout.current = setTimeout(()=>{
closeTimeout.current = null;
closeCallback.current();
}, closeDelay);
if ($8796f90736e175cb$var$globalWarmUpTimeout) {
clearTimeout($8796f90736e175cb$var$globalWarmUpTimeout);
$8796f90736e175cb$var$globalWarmUpTimeout = null;
}
if ($8796f90736e175cb$var$globalWarmedUp) {
if ($8796f90736e175cb$var$globalCooldownTimeout) clearTimeout($8796f90736e175cb$var$globalCooldownTimeout);
$8796f90736e175cb$var$globalCooldownTimeout = setTimeout(()=>{
delete $8796f90736e175cb$var$tooltips[id];
$8796f90736e175cb$var$globalCooldownTimeout = null;
$8796f90736e175cb$var$globalWarmedUp = false;
}, Math.max($8796f90736e175cb$var$TOOLTIP_COOLDOWN, closeDelay));
}
};
let warmupTooltip = ()=>{
closeOpenTooltips();
ensureTooltipEntry();
if (!isOpen && !$8796f90736e175cb$var$globalWarmUpTimeout && !$8796f90736e175cb$var$globalWarmedUp) $8796f90736e175cb$var$globalWarmUpTimeout = setTimeout(()=>{
$8796f90736e175cb$var$globalWarmUpTimeout = null;
$8796f90736e175cb$var$globalWarmedUp = true;
showTooltip();
}, delay);
else if (!isOpen) showTooltip();
};
(0, $50cCT$useEffect)(()=>{
closeCallback.current = close;
}, [
close
]);
(0, $50cCT$useEffect)(()=>{
return ()=>{
if (closeTimeout.current) clearTimeout(closeTimeout.current);
let tooltip = $8796f90736e175cb$var$tooltips[id];
if (tooltip) delete $8796f90736e175cb$var$tooltips[id];
};
}, [
id
]);
return {
isOpen: isOpen,
open: (immediate)=>{
if (!immediate && delay > 0 && !closeTimeout.current) warmupTooltip();
else showTooltip();
},
close: hideTooltip
};
}
export {$8796f90736e175cb$export$4d40659c25ecb50b as useTooltipTriggerState};
//# sourceMappingURL=useTooltipTriggerState.module.js.map
@@ -0,0 +1,422 @@
'use strict'
const MiniPass = require('minipass')
const EE = require('events').EventEmitter
const fs = require('fs')
let writev = fs.writev
/* istanbul ignore next */
if (!writev) {
// This entire block can be removed if support for earlier than Node.js
// 12.9.0 is not needed.
const binding = process.binding('fs')
const FSReqWrap = binding.FSReqWrap || binding.FSReqCallback
writev = (fd, iovec, pos, cb) => {
const done = (er, bw) => cb(er, bw, iovec)
const req = new FSReqWrap()
req.oncomplete = done
binding.writeBuffers(fd, iovec, pos, req)
}
}
const _autoClose = Symbol('_autoClose')
const _close = Symbol('_close')
const _ended = Symbol('_ended')
const _fd = Symbol('_fd')
const _finished = Symbol('_finished')
const _flags = Symbol('_flags')
const _flush = Symbol('_flush')
const _handleChunk = Symbol('_handleChunk')
const _makeBuf = Symbol('_makeBuf')
const _mode = Symbol('_mode')
const _needDrain = Symbol('_needDrain')
const _onerror = Symbol('_onerror')
const _onopen = Symbol('_onopen')
const _onread = Symbol('_onread')
const _onwrite = Symbol('_onwrite')
const _open = Symbol('_open')
const _path = Symbol('_path')
const _pos = Symbol('_pos')
const _queue = Symbol('_queue')
const _read = Symbol('_read')
const _readSize = Symbol('_readSize')
const _reading = Symbol('_reading')
const _remain = Symbol('_remain')
const _size = Symbol('_size')
const _write = Symbol('_write')
const _writing = Symbol('_writing')
const _defaultFlag = Symbol('_defaultFlag')
const _errored = Symbol('_errored')
class ReadStream extends MiniPass {
constructor (path, opt) {
opt = opt || {}
super(opt)
this.readable = true
this.writable = false
if (typeof path !== 'string')
throw new TypeError('path must be a string')
this[_errored] = false
this[_fd] = typeof opt.fd === 'number' ? opt.fd : null
this[_path] = path
this[_readSize] = opt.readSize || 16*1024*1024
this[_reading] = false
this[_size] = typeof opt.size === 'number' ? opt.size : Infinity
this[_remain] = this[_size]
this[_autoClose] = typeof opt.autoClose === 'boolean' ?
opt.autoClose : true
if (typeof this[_fd] === 'number')
this[_read]()
else
this[_open]()
}
get fd () { return this[_fd] }
get path () { return this[_path] }
write () {
throw new TypeError('this is a readable stream')
}
end () {
throw new TypeError('this is a readable stream')
}
[_open] () {
fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd))
}
[_onopen] (er, fd) {
if (er)
this[_onerror](er)
else {
this[_fd] = fd
this.emit('open', fd)
this[_read]()
}
}
[_makeBuf] () {
return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain]))
}
[_read] () {
if (!this[_reading]) {
this[_reading] = true
const buf = this[_makeBuf]()
/* istanbul ignore if */
if (buf.length === 0)
return process.nextTick(() => this[_onread](null, 0, buf))
fs.read(this[_fd], buf, 0, buf.length, null, (er, br, buf) =>
this[_onread](er, br, buf))
}
}
[_onread] (er, br, buf) {
this[_reading] = false
if (er)
this[_onerror](er)
else if (this[_handleChunk](br, buf))
this[_read]()
}
[_close] () {
if (this[_autoClose] && typeof this[_fd] === 'number') {
const fd = this[_fd]
this[_fd] = null
fs.close(fd, er => er ? this.emit('error', er) : this.emit('close'))
}
}
[_onerror] (er) {
this[_reading] = true
this[_close]()
this.emit('error', er)
}
[_handleChunk] (br, buf) {
let ret = false
// no effect if infinite
this[_remain] -= br
if (br > 0)
ret = super.write(br < buf.length ? buf.slice(0, br) : buf)
if (br === 0 || this[_remain] <= 0) {
ret = false
this[_close]()
super.end()
}
return ret
}
emit (ev, data) {
switch (ev) {
case 'prefinish':
case 'finish':
break
case 'drain':
if (typeof this[_fd] === 'number')
this[_read]()
break
case 'error':
if (this[_errored])
return
this[_errored] = true
return super.emit(ev, data)
default:
return super.emit(ev, data)
}
}
}
class ReadStreamSync extends ReadStream {
[_open] () {
let threw = true
try {
this[_onopen](null, fs.openSync(this[_path], 'r'))
threw = false
} finally {
if (threw)
this[_close]()
}
}
[_read] () {
let threw = true
try {
if (!this[_reading]) {
this[_reading] = true
do {
const buf = this[_makeBuf]()
/* istanbul ignore next */
const br = buf.length === 0 ? 0
: fs.readSync(this[_fd], buf, 0, buf.length, null)
if (!this[_handleChunk](br, buf))
break
} while (true)
this[_reading] = false
}
threw = false
} finally {
if (threw)
this[_close]()
}
}
[_close] () {
if (this[_autoClose] && typeof this[_fd] === 'number') {
const fd = this[_fd]
this[_fd] = null
fs.closeSync(fd)
this.emit('close')
}
}
}
class WriteStream extends EE {
constructor (path, opt) {
opt = opt || {}
super(opt)
this.readable = false
this.writable = true
this[_errored] = false
this[_writing] = false
this[_ended] = false
this[_needDrain] = false
this[_queue] = []
this[_path] = path
this[_fd] = typeof opt.fd === 'number' ? opt.fd : null
this[_mode] = opt.mode === undefined ? 0o666 : opt.mode
this[_pos] = typeof opt.start === 'number' ? opt.start : null
this[_autoClose] = typeof opt.autoClose === 'boolean' ?
opt.autoClose : true
// truncating makes no sense when writing into the middle
const defaultFlag = this[_pos] !== null ? 'r+' : 'w'
this[_defaultFlag] = opt.flags === undefined
this[_flags] = this[_defaultFlag] ? defaultFlag : opt.flags
if (this[_fd] === null)
this[_open]()
}
emit (ev, data) {
if (ev === 'error') {
if (this[_errored])
return
this[_errored] = true
}
return super.emit(ev, data)
}
get fd () { return this[_fd] }
get path () { return this[_path] }
[_onerror] (er) {
this[_close]()
this[_writing] = true
this.emit('error', er)
}
[_open] () {
fs.open(this[_path], this[_flags], this[_mode],
(er, fd) => this[_onopen](er, fd))
}
[_onopen] (er, fd) {
if (this[_defaultFlag] &&
this[_flags] === 'r+' &&
er && er.code === 'ENOENT') {
this[_flags] = 'w'
this[_open]()
} else if (er)
this[_onerror](er)
else {
this[_fd] = fd
this.emit('open', fd)
this[_flush]()
}
}
end (buf, enc) {
if (buf)
this.write(buf, enc)
this[_ended] = true
// synthetic after-write logic, where drain/finish live
if (!this[_writing] && !this[_queue].length &&
typeof this[_fd] === 'number')
this[_onwrite](null, 0)
return this
}
write (buf, enc) {
if (typeof buf === 'string')
buf = Buffer.from(buf, enc)
if (this[_ended]) {
this.emit('error', new Error('write() after end()'))
return false
}
if (this[_fd] === null || this[_writing] || this[_queue].length) {
this[_queue].push(buf)
this[_needDrain] = true
return false
}
this[_writing] = true
this[_write](buf)
return true
}
[_write] (buf) {
fs.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) =>
this[_onwrite](er, bw))
}
[_onwrite] (er, bw) {
if (er)
this[_onerror](er)
else {
if (this[_pos] !== null)
this[_pos] += bw
if (this[_queue].length)
this[_flush]()
else {
this[_writing] = false
if (this[_ended] && !this[_finished]) {
this[_finished] = true
this[_close]()
this.emit('finish')
} else if (this[_needDrain]) {
this[_needDrain] = false
this.emit('drain')
}
}
}
}
[_flush] () {
if (this[_queue].length === 0) {
if (this[_ended])
this[_onwrite](null, 0)
} else if (this[_queue].length === 1)
this[_write](this[_queue].pop())
else {
const iovec = this[_queue]
this[_queue] = []
writev(this[_fd], iovec, this[_pos],
(er, bw) => this[_onwrite](er, bw))
}
}
[_close] () {
if (this[_autoClose] && typeof this[_fd] === 'number') {
const fd = this[_fd]
this[_fd] = null
fs.close(fd, er => er ? this.emit('error', er) : this.emit('close'))
}
}
}
class WriteStreamSync extends WriteStream {
[_open] () {
let fd
// only wrap in a try{} block if we know we'll retry, to avoid
// the rethrow obscuring the error's source frame in most cases.
if (this[_defaultFlag] && this[_flags] === 'r+') {
try {
fd = fs.openSync(this[_path], this[_flags], this[_mode])
} catch (er) {
if (er.code === 'ENOENT') {
this[_flags] = 'w'
return this[_open]()
} else
throw er
}
} else
fd = fs.openSync(this[_path], this[_flags], this[_mode])
this[_onopen](null, fd)
}
[_close] () {
if (this[_autoClose] && typeof this[_fd] === 'number') {
const fd = this[_fd]
this[_fd] = null
fs.closeSync(fd)
this.emit('close')
}
}
[_write] (buf) {
// throw the original, but try to close if it fails
let threw = true
try {
this[_onwrite](null,
fs.writeSync(this[_fd], buf, 0, buf.length, this[_pos]))
threw = false
} finally {
if (threw)
try { this[_close]() } catch (_) {}
}
}
}
exports.ReadStream = ReadStream
exports.ReadStreamSync = ReadStreamSync
exports.WriteStream = WriteStream
exports.WriteStreamSync = WriteStreamSync
@@ -0,0 +1,12 @@
"use strict";
function _set_prototype_of(o, p) {
exports._ = _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _set_prototype_of(o, p);
}
exports._ = _set_prototype_of;
@@ -0,0 +1,213 @@
/*
* 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 {AriaTextFieldProps} from '@react-types/textfield';
import {
ChangeEvent,
HTMLAttributes,
type JSX,
LabelHTMLAttributes,
RefObject,
useEffect
} from 'react';
import {DOMAttributes, ValidationResult} from '@react-types/shared';
import {filterDOMProps, getOwnerWindow, mergeProps, useFormReset} from '@react-aria/utils';
import {useControlledState} from '@react-stately/utils';
import {useField} from '@react-aria/label';
import {useFocusable} from '@react-aria/focus';
import {useFormValidation} from '@react-aria/form';
import {useFormValidationState} from '@react-stately/form';
/**
* A map of HTML element names and their interface types.
* For example `'a'` -> `HTMLAnchorElement`.
*/
type IntrinsicHTMLElements = {
[K in keyof IntrinsicHTMLAttributes]: IntrinsicHTMLAttributes[K] extends HTMLAttributes<infer T> ? T : never
};
/**
* A map of HTML element names and their attribute interface types.
* For example `'a'` -> `AnchorHTMLAttributes<HTMLAnchorElement>`.
*/
type IntrinsicHTMLAttributes = JSX.IntrinsicElements;
type DefaultElementType = 'input';
/**
* The intrinsic HTML element names that `useTextField` supports; e.g. `input`,
* `textarea`.
*/
type TextFieldIntrinsicElements = keyof Pick<IntrinsicHTMLElements, 'input' | 'textarea'>;
/**
* The HTML element interfaces that `useTextField` supports based on what is
* defined for `TextFieldIntrinsicElements`; e.g. `HTMLInputElement`,
* `HTMLTextAreaElement`.
*/
type TextFieldHTMLElementType = Pick<IntrinsicHTMLElements, TextFieldIntrinsicElements>;
/**
* The HTML attributes interfaces that `useTextField` supports based on what
* is defined for `TextFieldIntrinsicElements`; e.g. `InputHTMLAttributes`,
* `TextareaHTMLAttributes`.
*/
type TextFieldHTMLAttributesType = Pick<IntrinsicHTMLAttributes, TextFieldIntrinsicElements>;
/**
* The type of `inputProps` returned by `useTextField`; e.g. `InputHTMLAttributes`,
* `TextareaHTMLAttributes`.
*/
type TextFieldInputProps<T extends TextFieldIntrinsicElements> = TextFieldHTMLAttributesType[T];
export interface AriaTextFieldOptions<T extends TextFieldIntrinsicElements> extends AriaTextFieldProps<TextFieldHTMLElementType[T]> {
/**
* The HTML element used to render the input, e.g. 'input', or 'textarea'.
* It determines whether certain HTML attributes will be included in `inputProps`.
* For example, [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-type).
* @default 'input'
*/
inputElementType?: T,
/**
* Controls whether inputted text is automatically capitalized and, if so, in what manner.
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize).
*/
autoCapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters'
}
/**
* The type of `ref` object that can be passed to `useTextField` based on the given
* intrinsic HTML element name; e.g.`RefObject<HTMLInputElement>`,
* `RefObject<HTMLTextAreaElement>`.
*/
type TextFieldRefObject<T extends TextFieldIntrinsicElements> = RefObject<TextFieldHTMLElementType[T] | null>;
export interface TextFieldAria<T extends TextFieldIntrinsicElements = DefaultElementType> extends ValidationResult {
/** Props for the input element. */
inputProps: TextFieldInputProps<T>,
/** Props for the text field's visible label element, if any. */
labelProps: DOMAttributes | LabelHTMLAttributes<HTMLLabelElement>,
/** Props for the text field's description element, if any. */
descriptionProps: DOMAttributes,
/** Props for the text field's error message element, if any. */
errorMessageProps: DOMAttributes
}
/**
* Provides the behavior and accessibility implementation for a text field.
* @param props - Props for the text field.
* @param ref - Ref to the HTML input or textarea element.
*/
export function useTextField<T extends TextFieldIntrinsicElements = DefaultElementType>(
props: AriaTextFieldOptions<T>,
ref: TextFieldRefObject<T>
): TextFieldAria<T> {
let {
inputElementType = 'input',
isDisabled = false,
isRequired = false,
isReadOnly = false,
type = 'text',
validationBehavior = 'aria'
} = props;
let [value, setValue] = useControlledState<string>(props.value, props.defaultValue || '', props.onChange);
let {focusableProps} = useFocusable<TextFieldHTMLElementType[T]>(props, ref);
let validationState = useFormValidationState({
...props,
value
});
let {isInvalid, validationErrors, validationDetails} = validationState.displayValidation;
let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({
...props,
isInvalid,
errorMessage: props.errorMessage || validationErrors
});
let domProps = filterDOMProps(props, {labelable: true});
const inputOnlyProps = {
type,
pattern: props.pattern
};
useFormReset(ref, value, setValue);
useFormValidation(props, validationState, ref);
useEffect(() => {
// This works around a React/Chrome bug that prevents textarea elements from validating when controlled.
// We prevent React from updating defaultValue (i.e. children) of textarea when `value` changes,
// which causes Chrome to skip validation. Only updating `value` is ok in our case since our
// textareas are always controlled. React is planning on removing this synchronization in a
// future major version.
// https://github.com/facebook/react/issues/19474
// https://github.com/facebook/react/issues/11896
if (ref.current instanceof getOwnerWindow(ref.current).HTMLTextAreaElement) {
let input = ref.current;
Object.defineProperty(input, 'defaultValue', {
get: () => input.value,
set: () => {},
configurable: true
});
}
}, [ref]);
return {
labelProps,
inputProps: mergeProps(
domProps,
inputElementType === 'input' ? inputOnlyProps : undefined,
{
disabled: isDisabled,
readOnly: isReadOnly,
required: isRequired && validationBehavior === 'native',
'aria-required': (isRequired && validationBehavior === 'aria') || undefined,
'aria-invalid': isInvalid || undefined,
'aria-errormessage': props['aria-errormessage'],
'aria-activedescendant': props['aria-activedescendant'],
'aria-autocomplete': props['aria-autocomplete'],
'aria-haspopup': props['aria-haspopup'],
value,
onChange: (e: ChangeEvent<HTMLInputElement>) => setValue(e.target.value),
autoComplete: props.autoComplete,
autoCapitalize: props.autoCapitalize,
maxLength: props.maxLength,
minLength: props.minLength,
name: props.name,
placeholder: props.placeholder,
inputMode: props.inputMode,
// Clipboard events
onCopy: props.onCopy,
onCut: props.onCut,
onPaste: props.onPaste,
// Composition events
onCompositionEnd: props.onCompositionEnd,
onCompositionStart: props.onCompositionStart,
onCompositionUpdate: props.onCompositionUpdate,
// Selection events
onSelect: props.onSelect,
// Input events
onBeforeInput: props.onBeforeInput,
onInput: props.onInput,
...focusableProps,
...fieldProps
}
),
descriptionProps,
errorMessageProps,
isInvalid,
validationErrors,
validationDetails
};
}
@@ -0,0 +1,43 @@
# get-symbol-description <sup>[![Version Badge][2]][1]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][5]][6]
[![dev dependency status][7]][8]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][11]][1]
Gets the description of a Symbol. Handles `Symbol()` vs `Symbol('')` properly when possible.
## Example
```js
var getSymbolDescription = require('get-symbol-description');
var assert = require('assert');
assert(getSymbolDescription(Symbol()) === undefined);
assert(getSymbolDescription(Symbol('')) === ''); // or `undefined`, if in an engine that lacks name inference from concise method
assert(getSymbolDescription(Symbol('foo')) === 'foo');
assert(getSymbolDescription(Symbol.iterator) === 'Symbol.iterator');
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[1]: https://npmjs.org/package/get-symbol-description
[2]: https://versionbadg.es/inspect-js/get-symbol-description.svg
[5]: https://david-dm.org/inspect-js/get-symbol-description.svg
[6]: https://david-dm.org/inspect-js/get-symbol-description
[7]: https://david-dm.org/inspect-js/get-symbol-description/dev-status.svg
[8]: https://david-dm.org/inspect-js/get-symbol-description#info=devDependencies
[11]: https://nodei.co/npm/get-symbol-description.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/get-symbol-description.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/get-symbol-description.svg
[downloads-url]: https://npm-stat.com/charts.html?package=get-symbol-description
[codecov-image]: https://codecov.io/gh/inspect-js/get-symbol-description/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/get-symbol-description/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/get-symbol-description
[actions-url]: https://github.com/inspect-js/get-symbol-description/actions
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReadonlyOptional = ReadonlyOptional;
const index_1 = require("../readonly/index");
const index_2 = require("../optional/index");
/** `[Json]` Creates a Readonly and Optional property */
function ReadonlyOptional(schema) {
return (0, index_1.Readonly)((0, index_2.Optional)(schema));
}
@@ -0,0 +1,173 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = transform;
var _eachOf = require('./eachOf.js');
var _eachOf2 = _interopRequireDefault(_eachOf);
var _once = require('./internal/once.js');
var _once2 = _interopRequireDefault(_once);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _promiseCallback = require('./internal/promiseCallback.js');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* A relative of `reduce`. Takes an Object or Array, and iterates over each
* element in parallel, each step potentially mutating an `accumulator` value.
* The type of the accumulator defaults to the type of collection passed in.
*
* @name transform
* @static
* @memberOf module:Collections
* @method
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {*} [accumulator] - The initial state of the transform. If omitted,
* it will default to an empty Object or Array, depending on the type of `coll`
* @param {AsyncFunction} iteratee - A function applied to each item in the
* collection that potentially modifies the accumulator.
* Invoked with (accumulator, item, key, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result is the transformed accumulator.
* Invoked with (err, result).
* @returns {Promise} a promise, if no callback provided
* @example
*
* // file1.txt is a file that is 1000 bytes in size
* // file2.txt is a file that is 2000 bytes in size
* // file3.txt is a file that is 3000 bytes in size
*
* // helper function that returns human-readable size format from bytes
* function formatBytes(bytes, decimals = 2) {
* // implementation not included for brevity
* return humanReadbleFilesize;
* }
*
* const fileList = ['file1.txt','file2.txt','file3.txt'];
*
* // asynchronous function that returns the file size, transformed to human-readable format
* // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc.
* function transformFileSize(acc, value, key, callback) {
* fs.stat(value, function(err, stat) {
* if (err) {
* return callback(err);
* }
* acc[key] = formatBytes(stat.size);
* callback(null);
* });
* }
*
* // Using callbacks
* async.transform(fileList, transformFileSize, function(err, result) {
* if(err) {
* console.log(err);
* } else {
* console.log(result);
* // [ '1000 Bytes', '1.95 KB', '2.93 KB' ]
* }
* });
*
* // Using Promises
* async.transform(fileList, transformFileSize)
* .then(result => {
* console.log(result);
* // [ '1000 Bytes', '1.95 KB', '2.93 KB' ]
* }).catch(err => {
* console.log(err);
* });
*
* // Using async/await
* (async () => {
* try {
* let result = await async.transform(fileList, transformFileSize);
* console.log(result);
* // [ '1000 Bytes', '1.95 KB', '2.93 KB' ]
* }
* catch (err) {
* console.log(err);
* }
* })();
*
* @example
*
* // file1.txt is a file that is 1000 bytes in size
* // file2.txt is a file that is 2000 bytes in size
* // file3.txt is a file that is 3000 bytes in size
*
* // helper function that returns human-readable size format from bytes
* function formatBytes(bytes, decimals = 2) {
* // implementation not included for brevity
* return humanReadbleFilesize;
* }
*
* const fileMap = { f1: 'file1.txt', f2: 'file2.txt', f3: 'file3.txt' };
*
* // asynchronous function that returns the file size, transformed to human-readable format
* // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc.
* function transformFileSize(acc, value, key, callback) {
* fs.stat(value, function(err, stat) {
* if (err) {
* return callback(err);
* }
* acc[key] = formatBytes(stat.size);
* callback(null);
* });
* }
*
* // Using callbacks
* async.transform(fileMap, transformFileSize, function(err, result) {
* if(err) {
* console.log(err);
* } else {
* console.log(result);
* // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' }
* }
* });
*
* // Using Promises
* async.transform(fileMap, transformFileSize)
* .then(result => {
* console.log(result);
* // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' }
* }).catch(err => {
* console.log(err);
* });
*
* // Using async/await
* async () => {
* try {
* let result = await async.transform(fileMap, transformFileSize);
* console.log(result);
* // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' }
* }
* catch (err) {
* console.log(err);
* }
* }
*
*/
function transform(coll, accumulator, iteratee, callback) {
if (arguments.length <= 3 && typeof accumulator === 'function') {
callback = iteratee;
iteratee = accumulator;
accumulator = Array.isArray(coll) ? [] : {};
}
callback = (0, _once2.default)(callback || (0, _promiseCallback.promiseCallback)());
var _iteratee = (0, _wrapAsync2.default)(iteratee);
(0, _eachOf2.default)(coll, (v, k, cb) => {
_iteratee(accumulator, v, k, cb);
}, err => callback(err, accumulator));
return callback[_promiseCallback.PROMISE_SYMBOL];
}
module.exports = exports.default;
@@ -0,0 +1 @@
{"name":"@react-stately/virtualizer","version":"4.4.4","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105972,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/Layout.main.js":{"checkedAt":1794532110014,"integrity":"sha512-Km7fc1NAhPPBxb4WN8sy30ROmkTcBAkFpZN3jdyxrlOMzYknzzpzJ5b0IAH/Hg52vKrWg8M1rA+7Jcr+d4dxlA==","mode":420,"size":2597},"dist/Layout.module.js":{"checkedAt":1794532110014,"integrity":"sha512-5V/uC57xy1sw0y5KDQECmNIto5OGyitxZ02cJADaeSMMMT0R3AVU64898EBjr1Nhp99D3yz01qNLAl/waCCpQw==","mode":420,"size":2441},"dist/LayoutInfo.main.js":{"checkedAt":1794532110014,"integrity":"sha512-9QTmEMirU/TJqX/MXaFZJW18FKQ3Ii/ErqTo2wjK7iFqaNUwBFseohgtSDenAjlVmzD913uZpgebbSTKeAIvYA==","mode":420,"size":2148},"dist/LayoutInfo.module.js":{"checkedAt":1794532110014,"integrity":"sha512-/akfoAl5+1b4iaUdrBvRwHJvPLCjP0sAf+6larMXXsd7QUuPxzKlclV9sS3mfhfCQmd/eqR8L6laTUCgCDq5fQ==","mode":420,"size":1992},"dist/main.js":{"checkedAt":1794532110014,"integrity":"sha512-+gqr099m8WAo7wuN2d6nxM6yyXJA7DoS0jAYWnyuo5cczL5rNnZqzEXUmAGShO/4F5Tzz1VpgXEauoWXlrWdoQ==","mode":420,"size":1847},"dist/module.js":{"checkedAt":1794532110015,"integrity":"sha512-T9X0b4/kZbDrxm5BXXumo/yvDd/Cv/veXRKcwIcUNxCyDZouztmYz3GeKxIeT105CeOiiwIYvXIHbPHFV6rQUw==","mode":420,"size":1713},"dist/OverscanManager.main.js":{"checkedAt":1794532110015,"integrity":"sha512-di0ZwgniHoOnY0/1oM9Kz8yWERo0rFAbkubqd/QoGcMi+EK9ABJ07iulaUXbdKi4KfVLxscuVaQas3AaNGHBgQ==","mode":420,"size":2179},"dist/OverscanManager.module.js":{"checkedAt":1794532110015,"integrity":"sha512-dTTOhOPApaQVyRANMaUpoDzAh09AD++0Qp+i7u3isaG6M7m+9RzaIgmcrvh03KRuZWUESwRA0cfdn88dtg4QUg==","mode":420,"size":2095},"dist/Point.main.js":{"checkedAt":1794532110015,"integrity":"sha512-GJDVO6SeehyijoBalDxjKLzRBUfVzK8QadI3iFWlzh/Klwi9UV9FrzidoA/lnWHFps7NeySH7MH4SuJNaXa/tQ==","mode":420,"size":1406},"dist/Point.module.js":{"checkedAt":1794532110015,"integrity":"sha512-Zhi9i3c7YSkZG1Z8pDF46MhBCKgF4gmOnJDzprUrR/ApvwscinFhYyhSWN54onQgm2nwmj0r5okuuQ3juHpvZA==","mode":420,"size":1250},"dist/Rect.main.js":{"checkedAt":1794532110016,"integrity":"sha512-ZpzzgyqhWaPi2peDh2HTP0X/QpWt5P03s/e1TQoUenwjA9eWLvudkeGthzSKvv7AxsFWBo+rzxeEUPlFIWkyOA==","mode":420,"size":4917},"dist/Rect.module.js":{"checkedAt":1794532110016,"integrity":"sha512-eaWUzbyTHcd+DLexFXpCvEjAFr6rs7s24BmkA569Ahn9i/I/idwxqncSSrvblIRcqGX+m5jFXpEqZCkbz/yXug==","mode":420,"size":4827},"dist/ReusableView.main.js":{"checkedAt":1794532110016,"integrity":"sha512-UzflEPfipH9dXliopisL+NVEm7wTGSdvDYpOnsaDyjFwqBlADAujZ4kq1BZpx/+dvCbGiPFINOS02XnqgUAhvQ==","mode":420,"size":2971},"dist/ReusableView.module.js":{"checkedAt":1794532110016,"integrity":"sha512-FHlYrlVxumgBQp+Db45SeskM3gf1YmMq2zabaXD0njLjqdGY9UK6It3yebarqol8r4AVfidVk/vRx2SotN6T+w==","mode":420,"size":2833},"dist/Size.main.js":{"checkedAt":1794532110016,"integrity":"sha512-//Dv/UTVpCsH1qM41pI7nebmDs+9od4RhK8EoW4JuhzFlPR7zqLBW+KrTCpBm8dfVH4oE1pbFwZn48Xu1pknSA==","mode":420,"size":1484},"dist/Size.module.js":{"checkedAt":1794532110016,"integrity":"sha512-7rVIXiAk5+PUDdWrl+nOmBrWy9ELmKvo0AxEli75T697OtNFKdfbo35B4sygfCeOO0b1vK/XfgtBp9kEwbGEig==","mode":420,"size":1328},"dist/useVirtualizerState.main.js":{"checkedAt":1794532110017,"integrity":"sha512-HioiYP71pqzxRzNzxMjLPKI2Xsz4dVfvf/11tGylc5AK4dtyJsT5cFFrFjo+knjNQxnMph2jFNeyKIi7ye2zSA==","mode":420,"size":3980},"dist/useVirtualizerState.module.js":{"checkedAt":1794532110017,"integrity":"sha512-GNwxqVn3z/N8BZJqNGgmL3B+iX++hqBTLCU1pi+606+v2TKUj0gVceleeVPNRNmPyhcjIiMMuC2extnGK+nYQw==","mode":420,"size":3909},"dist/utils.main.js":{"checkedAt":1794532110017,"integrity":"sha512-holIokSJrpkpP7zFwKbVbb8q0pYpiNHxumxZuFesaVDAuTvCZz7RqbBsWTTXnz41IkubkTQMEpuWjp+DFSLlmQ==","mode":420,"size":1146},"dist/utils.module.js":{"checkedAt":1794532110017,"integrity":"sha512-ZHx4S++wueIzMaktmfnP19eYAfTxGX63+jDGfZEGQV4UCrdB3s6mp68Ow1fwlGQ1r/6PlomikrFD9XrLkDpcPA==","mode":420,"size":990},"dist/Virtualizer.main.js":{"checkedAt":1794532110017,"integrity":"sha512-lKoCVkZicw01vLIT4xPG3DHUeJdTPFnnVablZixOts9W4K7F6dzgyY7nQx/i+Xy93y616NYcJizjrJQy5bSfFA==","mode":420,"size":11942},"dist/Virtualizer.module.js":{"checkedAt":1794532110017,"integrity":"sha512-fNGxjh+mYCNeOqFBzVAixkmzeweOSXSabIUzEgBXrrafLeTwPmH9WtnsQlGDBWN6n/59cporKRzruUjqRtfFKA==","mode":420,"size":11999},"package.json":{"checkedAt":1794532110017,"integrity":"sha512-nCCB5e+SS9eITn8L4gcgU0Wmiz9waGpiUrTrFV5yFElj4ikkzeGuEqdG7S20Ao1pRHcSzuYtFPS6TQaFhA4dXA==","mode":420,"size":972},"dist/Layout.main.js.map":{"checkedAt":1794532110017,"integrity":"sha512-tfnKwLteqFZMhzktCL/baS5OYW7HDGOEPIGjSbE4SxkMenMbPAErN7usIdW9jqsjR+RXMu2XJe36Oxrypy/gIA==","mode":420,"size":4814},"dist/Layout.module.js.map":{"checkedAt":1794532110017,"integrity":"sha512-8sNksJ+ufQ4sqNi3bTEnUTbafsFvf679CJEweuYx8AyiOIDMwKhqseUj3x5pDZtjv/I7VNSsZp6HY1vSGzCgOw==","mode":420,"size":4810},"dist/LayoutInfo.main.js.map":{"checkedAt":1794532110018,"integrity":"sha512-998V04NV+o/kZUe/Line truncated
@@ -0,0 +1,38 @@
import {useId as $7Mibs$useId} from "@react-aria/utils";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $3e5eb2498db5b506$export$73f7a44322579622(props) {
let { heading: heading, 'aria-label': ariaLabel } = props;
let headingId = (0, $7Mibs$useId)();
return {
itemProps: {
role: 'presentation'
},
headingProps: heading ? {
// Techincally, menus cannot contain headings according to ARIA.
// We hide the heading from assistive technology, using role="presentation",
// and only use it as a label for the nested group.
id: headingId,
role: 'presentation'
} : {},
groupProps: {
role: 'group',
'aria-label': ariaLabel,
'aria-labelledby': heading ? headingId : undefined
}
};
}
export {$3e5eb2498db5b506$export$73f7a44322579622 as useMenuSection};
//# sourceMappingURL=useMenuSection.module.js.map
@@ -0,0 +1,27 @@
import { Validation, ValidationErrors, ValidationResult } from "@react-types/shared";
import { Context } from "react";
export const VALID_VALIDITY_STATE: ValidityState;
export const DEFAULT_VALIDATION_RESULT: ValidationResult;
export const FormValidationContext: Context<ValidationErrors>;
export const privateValidationStateProp: string;
interface FormValidationProps<T> extends Validation<T> {
builtinValidation?: ValidationResult;
name?: string | string[];
value: T | null;
}
export interface FormValidationState {
/** Realtime validation results, updated as the user edits the value. */
realtimeValidation: ValidationResult;
/** Currently displayed validation results, updated when the user commits their changes. */
displayValidation: ValidationResult;
/** Updates the current validation result. Not displayed to the user until `commitValidation` is called. */
updateValidation(result: ValidationResult): void;
/** Resets the displayed validation state to valid when the user resets the form. */
resetValidation(): void;
/** Commits the realtime validation so it is displayed to the user. */
commitValidation(): void;
}
export function useFormValidationState<T>(props: FormValidationProps<T>): FormValidationState;
export function mergeValidation(...results: ValidationResult[]): ValidationResult;
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,147 @@
import { Kind, Hint, TransformKind } from '../symbols/index';
import { TransformOptions } from '../transform/index';
import type { TAny } from '../any/index';
import type { TArgument } from '../argument/index';
import type { TArray } from '../array/index';
import type { TAsyncIterator } from '../async-iterator/index';
import type { TBoolean } from '../boolean/index';
import type { TComputed } from '../computed/index';
import type { TBigInt } from '../bigint/index';
import type { TConstructor } from '../constructor/index';
import type { TFunction } from '../function/index';
import type { TImport } from '../module/index';
import type { TInteger } from '../integer/index';
import type { TIntersect } from '../intersect/index';
import type { TIterator } from '../iterator/index';
import type { TLiteral, TLiteralValue } from '../literal/index';
import type { TMappedKey, TMappedResult } from '../mapped/index';
import type { TNever } from '../never/index';
import type { TNot } from '../not/index';
import type { TNull } from '../null/index';
import type { TNumber } from '../number/index';
import type { TObject, TProperties } from '../object/index';
import type { TOptional } from '../optional/index';
import type { TPromise } from '../promise/index';
import type { TReadonly } from '../readonly/index';
import type { TRecord } from '../record/index';
import type { TRef } from '../ref/index';
import type { TRegExp } from '../regexp/index';
import type { TSchema } from '../schema/index';
import type { TString } from '../string/index';
import type { TSymbol } from '../symbol/index';
import type { TTemplateLiteral } from '../template-literal/index';
import type { TTuple } from '../tuple/index';
import type { TUint8Array } from '../uint8array/index';
import type { TUndefined } from '../undefined/index';
import type { TUnknown } from '../unknown/index';
import type { TUnion } from '../union/index';
import type { TUnsafe } from '../unsafe/index';
import type { TVoid } from '../void/index';
import type { TDate } from '../date/index';
import type { TThis } from '../recursive/index';
/** `[Kind-Only]` Returns true if this value has a Readonly symbol */
export declare function IsReadonly<T extends TSchema>(value: T): value is TReadonly<T>;
/** `[Kind-Only]` Returns true if this value has a Optional symbol */
export declare function IsOptional<T extends TSchema>(value: T): value is TOptional<T>;
/** `[Kind-Only]` Returns true if the given value is TAny */
export declare function IsAny(value: unknown): value is TAny;
/** `[Kind-Only]` Returns true if the given value is TArgument */
export declare function IsArgument(value: unknown): value is TArgument;
/** `[Kind-Only]` Returns true if the given value is TArray */
export declare function IsArray(value: unknown): value is TArray;
/** `[Kind-Only]` Returns true if the given value is TAsyncIterator */
export declare function IsAsyncIterator(value: unknown): value is TAsyncIterator;
/** `[Kind-Only]` Returns true if the given value is TBigInt */
export declare function IsBigInt(value: unknown): value is TBigInt;
/** `[Kind-Only]` Returns true if the given value is TBoolean */
export declare function IsBoolean(value: unknown): value is TBoolean;
/** `[Kind-Only]` Returns true if the given value is TComputed */
export declare function IsComputed(value: unknown): value is TComputed;
/** `[Kind-Only]` Returns true if the given value is TConstructor */
export declare function IsConstructor(value: unknown): value is TConstructor;
/** `[Kind-Only]` Returns true if the given value is TDate */
export declare function IsDate(value: unknown): value is TDate;
/** `[Kind-Only]` Returns true if the given value is TFunction */
export declare function IsFunction(value: unknown): value is TFunction;
/** `[Kind-Only]` Returns true if the given value is TInteger */
export declare function IsImport(value: unknown): value is TImport;
/** `[Kind-Only]` Returns true if the given value is TInteger */
export declare function IsInteger(value: unknown): value is TInteger;
/** `[Kind-Only]` Returns true if the given schema is TProperties */
export declare function IsProperties(value: unknown): value is TProperties;
/** `[Kind-Only]` Returns true if the given value is TIntersect */
export declare function IsIntersect(value: unknown): value is TIntersect;
/** `[Kind-Only]` Returns true if the given value is TIterator */
export declare function IsIterator(value: unknown): value is TIterator;
/** `[Kind-Only]` Returns true if the given value is a TKind with the given name. */
export declare function IsKindOf<T extends string>(value: unknown, kind: T): value is Record<PropertyKey, unknown> & {
[Kind]: T;
};
/** `[Kind-Only]` Returns true if the given value is TLiteral<string> */
export declare function IsLiteralString(value: unknown): value is TLiteral<string>;
/** `[Kind-Only]` Returns true if the given value is TLiteral<number> */
export declare function IsLiteralNumber(value: unknown): value is TLiteral<number>;
/** `[Kind-Only]` Returns true if the given value is TLiteral<boolean> */
export declare function IsLiteralBoolean(value: unknown): value is TLiteral<boolean>;
/** `[Kind-Only]` Returns true if the given value is TLiteralValue */
export declare function IsLiteralValue(value: unknown): value is TLiteralValue;
/** `[Kind-Only]` Returns true if the given value is TLiteral */
export declare function IsLiteral(value: unknown): value is TLiteral;
/** `[Kind-Only]` Returns true if the given value is a TMappedKey */
export declare function IsMappedKey(value: unknown): value is TMappedKey;
/** `[Kind-Only]` Returns true if the given value is TMappedResult */
export declare function IsMappedResult(value: unknown): value is TMappedResult;
/** `[Kind-Only]` Returns true if the given value is TNever */
export declare function IsNever(value: unknown): value is TNever;
/** `[Kind-Only]` Returns true if the given value is TNot */
export declare function IsNot(value: unknown): value is TNot;
/** `[Kind-Only]` Returns true if the given value is TNull */
export declare function IsNull(value: unknown): value is TNull;
/** `[Kind-Only]` Returns true if the given value is TNumber */
export declare function IsNumber(value: unknown): value is TNumber;
/** `[Kind-Only]` Returns true if the given value is TObject */
export declare function IsObject(value: unknown): value is TObject;
/** `[Kind-Only]` Returns true if the given value is TPromise */
export declare function IsPromise(value: unknown): value is TPromise;
/** `[Kind-Only]` Returns true if the given value is TRecord */
export declare function IsRecord(value: unknown): value is TRecord;
/** `[Kind-Only]` Returns true if this value is TRecursive */
export declare function IsRecursive(value: unknown): value is {
[Hint]: 'Recursive';
};
/** `[Kind-Only]` Returns true if the given value is TRef */
export declare function IsRef(value: unknown): value is TRef;
/** `[Kind-Only]` Returns true if the given value is TRegExp */
export declare function IsRegExp(value: unknown): value is TRegExp;
/** `[Kind-Only]` Returns true if the given value is TString */
export declare function IsString(value: unknown): value is TString;
/** `[Kind-Only]` Returns true if the given value is TSymbol */
export declare function IsSymbol(value: unknown): value is TSymbol;
/** `[Kind-Only]` Returns true if the given value is TTemplateLiteral */
export declare function IsTemplateLiteral(value: unknown): value is TTemplateLiteral;
/** `[Kind-Only]` Returns true if the given value is TThis */
export declare function IsThis(value: unknown): value is TThis;
/** `[Kind-Only]` Returns true of this value is TTransform */
export declare function IsTransform(value: unknown): value is {
[TransformKind]: TransformOptions;
};
/** `[Kind-Only]` Returns true if the given value is TTuple */
export declare function IsTuple(value: unknown): value is TTuple;
/** `[Kind-Only]` Returns true if the given value is TUndefined */
export declare function IsUndefined(value: unknown): value is TUndefined;
/** `[Kind-Only]` Returns true if the given value is TUnion */
export declare function IsUnion(value: unknown): value is TUnion;
/** `[Kind-Only]` Returns true if the given value is TUint8Array */
export declare function IsUint8Array(value: unknown): value is TUint8Array;
/** `[Kind-Only]` Returns true if the given value is TUnknown */
export declare function IsUnknown(value: unknown): value is TUnknown;
/** `[Kind-Only]` Returns true if the given value is a raw TUnsafe */
export declare function IsUnsafe(value: unknown): value is TUnsafe<unknown>;
/** `[Kind-Only]` Returns true if the given value is TVoid */
export declare function IsVoid(value: unknown): value is TVoid;
/** `[Kind-Only]` Returns true if the given value is TKind */
export declare function IsKind(value: unknown): value is Record<PropertyKey, unknown> & {
[Kind]: string;
};
/** `[Kind-Only]` Returns true if the given value is TSchema */
export declare function IsSchema(value: unknown): value is TSchema;
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=jsx-props-no-spreading.d.ts.map
@@ -0,0 +1,28 @@
import { isDragging } from './is-active.mjs';
function setDragLock(axis) {
if (axis === "x" || axis === "y") {
if (isDragging[axis]) {
return null;
}
else {
isDragging[axis] = true;
return () => {
isDragging[axis] = false;
};
}
}
else {
if (isDragging.x || isDragging.y) {
return null;
}
else {
isDragging.x = isDragging.y = true;
return () => {
isDragging.x = isDragging.y = false;
};
}
}
}
export { setDragLock };
@@ -0,0 +1,9 @@
import type { TSchema, SchemaOptions } from '../schema/index.mjs';
import { Kind } from '../symbols/symbols.mjs';
export interface TComputed<Target extends string = string, Parameters extends TSchema[] = []> extends TSchema {
[Kind]: 'Computed';
target: Target;
parameters: Parameters;
}
/** `[Internal]` Creates a deferred computed type. This type is used exclusively in modules to defer resolution of computable types that contain interior references */
export declare function Computed<Target extends string, Parameters extends TSchema[]>(target: Target, parameters: [...Parameters], options?: SchemaOptions): TComputed<Target, Parameters>;
@@ -0,0 +1,23 @@
export type {Encoding, Token, Value} from 'micromark-util-types'
export type {
CompileContext,
CompileData,
Extension,
Handles,
Handle,
OnEnterError,
OnExitError,
Options,
Transform
} from './lib/types.js'
export {fromMarkdown} from './lib/index.js'
declare module 'micromark-util-types' {
interface TokenTypeMap {
listItem: 'listItem'
}
interface Token {
_spread?: boolean
}
}
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _deepArray = require("./helpers/deep-array.js");
class Plugin {
constructor(plugin, options, key, externalDependencies = (0, _deepArray.finalize)([])) {
this.key = void 0;
this.manipulateOptions = void 0;
this.post = void 0;
this.pre = void 0;
this.visitor = void 0;
this.parserOverride = void 0;
this.generatorOverride = void 0;
this.options = void 0;
this.externalDependencies = void 0;
this.key = plugin.name || key;
this.manipulateOptions = plugin.manipulateOptions;
this.post = plugin.post;
this.pre = plugin.pre;
this.visitor = plugin.visitor || {};
this.parserOverride = plugin.parserOverride;
this.generatorOverride = plugin.generatorOverride;
this.options = options;
this.externalDependencies = externalDependencies;
}
}
exports.default = Plugin;
0 && 0;
//# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAyBM,SAAS,0CAAe,QAA4B,CAAC,CAAC;IAC3D,IAAI,cAAC,UAAU,EAAC,GAAG;IAEnB,8EAA8E;IAC9E,+FAA+F;IAC/F,IAAI,CAAC,YAAY,YAAY,GAAG,CAAA,GAAA,2CAAiB,EAAE,MAAM,UAAU,EAAE,MAAM,eAAe,IAAI,OAAO,MAAM,QAAQ;IACnH,IAAI,CAAC,aAAa,GAAG,CAAA,GAAA,qBAAO,EAAE;IAE9B,SAAS,eAAe,KAAK;QAC3B,IAAI,CAAC,YACH,YAAY;IAEhB;IAEA,SAAS;QACP,IAAI,CAAC,YACH,YAAY,CAAC;IAEjB;QAImB;IAFnB,OAAO;oBACL;QACA,iBAAiB,CAAA,yBAAA,MAAM,eAAe,cAArB,oCAAA,yBAAyB;QAC1C,aAAa;QACb,QAAQ;IACV;AACF","sources":["packages/@react-stately/toggle/src/useToggleState.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ToggleStateOptions} from '@react-types/checkbox';\nimport {useControlledState} from '@react-stately/utils';\nimport {useState} from 'react';\n\nexport type {ToggleStateOptions};\n\nexport interface ToggleState {\n /** Whether the toggle is selected. */\n readonly isSelected: boolean,\n\n /** Whether the toggle is selected by default. */\n readonly defaultSelected: boolean,\n\n /** Updates selection state. */\n setSelected(isSelected: boolean): void,\n\n /** Toggle the selection state. */\n toggle(): void\n}\n\n/**\n * Provides state management for toggle components like checkboxes and switches.\n */\nexport function useToggleState(props: ToggleStateOptions = {}): ToggleState {\n let {isReadOnly} = props;\n\n // have to provide an empty function so useControlledState doesn't throw a fit\n // can't use useControlledState's prop calling because we need the event object from the change\n let [isSelected, setSelected] = useControlledState(props.isSelected, props.defaultSelected || false, props.onChange);\n let [initialValue] = useState(isSelected);\n\n function updateSelected(value) {\n if (!isReadOnly) {\n setSelected(value);\n }\n }\n\n function toggleState() {\n if (!isReadOnly) {\n setSelected(!isSelected);\n }\n }\n\n return {\n isSelected,\n defaultSelected: props.defaultSelected ?? initialValue,\n setSelected: updateSelected,\n toggle: toggleState\n };\n}\n"],"names":[],"version":3,"file":"useToggleState.main.js.map"}
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,WAAW,CAAC,YAAS,CAAC;AAC1C","sources":["packages/@react-aria/overlays/intl/de-DE.json"],"sourcesContent":["{\n \"dismiss\": \"Schließen\"\n}\n"],"names":[],"version":3,"file":"de-DE.main.js.map"}
@@ -0,0 +1,137 @@
https-proxy-agent
================
### An HTTP(s) proxy `http.Agent` implementation for HTTPS
[![Build Status](https://github.com/TooTallNate/node-https-proxy-agent/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-https-proxy-agent/actions?workflow=Node+CI)
This module provides an `http.Agent` implementation that connects to a specified
HTTP or HTTPS proxy server, and can be used with the built-in `https` module.
Specifically, this `Agent` implementation connects to an intermediary "proxy"
server and issues the [CONNECT HTTP method][CONNECT], which tells the proxy to
open a direct TCP connection to the destination server.
Since this agent implements the CONNECT HTTP method, it also works with other
protocols that use this method when connecting over proxies (i.e. WebSockets).
See the "Examples" section below for more.
Installation
------------
Install with `npm`:
``` bash
$ npm install https-proxy-agent
```
Examples
--------
#### `https` module example
``` js
var url = require('url');
var https = require('https');
var HttpsProxyAgent = require('https-proxy-agent');
// HTTP/HTTPS proxy to connect to
var proxy = process.env.http_proxy || 'http://168.63.76.32:3128';
console.log('using proxy server %j', proxy);
// HTTPS endpoint for the proxy to connect to
var endpoint = process.argv[2] || 'https://graph.facebook.com/tootallnate';
console.log('attempting to GET %j', endpoint);
var options = url.parse(endpoint);
// create an instance of the `HttpsProxyAgent` class with the proxy server information
var agent = new HttpsProxyAgent(proxy);
options.agent = agent;
https.get(options, function (res) {
console.log('"response" event!', res.headers);
res.pipe(process.stdout);
});
```
#### `ws` WebSocket connection example
``` js
var url = require('url');
var WebSocket = require('ws');
var HttpsProxyAgent = require('https-proxy-agent');
// HTTP/HTTPS proxy to connect to
var proxy = process.env.http_proxy || 'http://168.63.76.32:3128';
console.log('using proxy server %j', proxy);
// WebSocket endpoint for the proxy to connect to
var endpoint = process.argv[2] || 'ws://echo.websocket.org';
var parsed = url.parse(endpoint);
console.log('attempting to connect to WebSocket %j', endpoint);
// create an instance of the `HttpsProxyAgent` class with the proxy server information
var options = url.parse(proxy);
var agent = new HttpsProxyAgent(options);
// finally, initiate the WebSocket connection
var socket = new WebSocket(endpoint, { agent: agent });
socket.on('open', function () {
console.log('"open" event!');
socket.send('hello world');
});
socket.on('message', function (data, flags) {
console.log('"message" event! %j %j', data, flags);
socket.close();
});
```
API
---
### new HttpsProxyAgent(Object options)
The `HttpsProxyAgent` class implements an `http.Agent` subclass that connects
to the specified "HTTP(s) proxy server" in order to proxy HTTPS and/or WebSocket
requests. This is achieved by using the [HTTP `CONNECT` method][CONNECT].
The `options` argument may either be a string URI of the proxy server to use, or an
"options" object with more specific properties:
* `host` - String - Proxy host to connect to (may use `hostname` as well). Required.
* `port` - Number - Proxy port to connect to. Required.
* `protocol` - String - If `https:`, then use TLS to connect to the proxy.
* `headers` - Object - Additional HTTP headers to be sent on the HTTP CONNECT method.
* Any other options given are passed to the `net.connect()`/`tls.connect()` functions.
License
-------
(The MIT License)
Copyright (c) 2013 Nathan Rajlich &lt;nathan@tootallnate.net&gt;
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[CONNECT]: http://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_Tunneling
@@ -0,0 +1,22 @@
/**
* Checks if `value` is `undefined`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
* @example
*
* _.isUndefined(void 0);
* // => true
*
* _.isUndefined(null);
* // => false
*/
function isUndefined(value) {
return value === undefined;
}
export default isUndefined;
@@ -0,0 +1,46 @@
import baseClone from './_baseClone.js';
import baseMatches from './_baseMatches.js';
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG = 1;
/**
* Creates a function that performs a partial deep comparison between a given
* object and `source`, returning `true` if the given object has equivalent
* property values, else `false`.
*
* **Note:** The created function is equivalent to `_.isMatch` with `source`
* partially applied.
*
* Partial comparisons will match empty array and empty object `source`
* values against any array or object value, respectively. See `_.isEqual`
* for a list of supported value comparisons.
*
* **Note:** Multiple values can be checked by combining several matchers
* using `_.overSome`
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {Object} source The object of property values to match.
* @returns {Function} Returns the new spec function.
* @example
*
* var objects = [
* { 'a': 1, 'b': 2, 'c': 3 },
* { 'a': 4, 'b': 5, 'c': 6 }
* ];
*
* _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
* // => [{ 'a': 4, 'b': 5, 'c': 6 }]
*
* // Checking for several possible values
* _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
* // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
*/
function matches(source) {
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
}
export default matches;
@@ -0,0 +1,43 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
import { KeyAgreeRecipientInfo } from "./key_agree_recipient_info";
import { KeyTransRecipientInfo } from "./key_trans_recipient_info";
import { KEKRecipientInfo } from "./kek_recipient_info";
import { PasswordRecipientInfo } from "./password_recipient_info";
export class OtherRecipientInfo {
constructor(params = {}) {
this.oriType = "";
this.oriValue = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], OtherRecipientInfo.prototype, "oriType", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Any })
], OtherRecipientInfo.prototype, "oriValue", void 0);
let RecipientInfo = class RecipientInfo {
constructor(params = {}) {
Object.assign(this, params);
}
};
__decorate([
AsnProp({ type: KeyTransRecipientInfo, optional: true })
], RecipientInfo.prototype, "ktri", void 0);
__decorate([
AsnProp({ type: KeyAgreeRecipientInfo, context: 1, implicit: true, optional: true })
], RecipientInfo.prototype, "kari", void 0);
__decorate([
AsnProp({ type: KEKRecipientInfo, context: 2, implicit: true, optional: true })
], RecipientInfo.prototype, "kekri", void 0);
__decorate([
AsnProp({ type: PasswordRecipientInfo, context: 3, implicit: true, optional: true })
], RecipientInfo.prototype, "pwri", void 0);
__decorate([
AsnProp({ type: OtherRecipientInfo, context: 4, implicit: true, optional: true })
], RecipientInfo.prototype, "ori", void 0);
RecipientInfo = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], RecipientInfo);
export { RecipientInfo };
@@ -0,0 +1,3 @@
import { DateAddingObject, Unit } from './types';
export default function add(date: Date, input: number | DateAddingObject): Date;
export default function add(date: Date, num: number, unit: Unit): Date;
@@ -0,0 +1,20 @@
"use strict";
/**
* Copyright (c) 2019, Microsoft Corporation (MIT License).
*
* This module fetches the console process list for a particular PID. It must be
* called from a different process (child_process.fork) as there can only be a
* single console attached to a process.
*/
var getConsoleProcessList;
try {
getConsoleProcessList = require('../build/Release/conpty_console_list.node').getConsoleProcessList;
}
catch (err) {
getConsoleProcessList = require('../build/Debug/conpty_console_list.node').getConsoleProcessList;
}
var shellPid = parseInt(process.argv[2], 10);
var consoleProcessList = getConsoleProcessList(shellPid);
process.send({ consoleProcessList: consoleProcessList });
process.exit(0);
//# sourceMappingURL=conpty_console_list_agent.js.map
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=addServiceNodeBindingIfContextFree.spec.d.ts.map
@@ -0,0 +1,2 @@
var convert = require('./convert');
module.exports = convert(require('../seq'));
@@ -0,0 +1,202 @@
# 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.2.10](https://github.com/es-shims/String.prototype.trim/compare/v1.2.9...v1.2.10) - 2024-12-11
### Commits
- [actions] split out node 10-20, and 20+ [`335d99a`](https://github.com/es-shims/String.prototype.trim/commit/335d99a408ee623eb60ca53af13da1813d3ee1b8)
- [Refactor] use `define-data-property` and `has-property-descriptors` directly [`2e0c2e9`](https://github.com/es-shims/String.prototype.trim/commit/2e0c2e9979c9368b13a90a31ae79ca8b1f2fa01a)
- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `auto-changelog`, `tape` [`138d3db`](https://github.com/es-shims/String.prototype.trim/commit/138d3db824e6fed5a0f9c81ae06534ef4e20b969)
- [Deps] update `call-bind`, `es-abstract` [`3a06731`](https://github.com/es-shims/String.prototype.trim/commit/3a0673152cc347f42feed04a6936d824ffb2bb57)
- [Refactor] use `call-bound` directly [`9499206`](https://github.com/es-shims/String.prototype.trim/commit/9499206837e054fac9b48db0f63c09dd1e955e11)
- [Tests] replace `aud` with `npm audit` [`c88a935`](https://github.com/es-shims/String.prototype.trim/commit/c88a935c098d8a9809812af68c1fc51ab65854cb)
- [Dev Deps] add missing dev dep [`9667c7d`](https://github.com/es-shims/String.prototype.trim/commit/9667c7d04de2dff034cde13f41aca9e203947d43)
- [Dev Deps] add missing peer dep [`6417c72`](https://github.com/es-shims/String.prototype.trim/commit/6417c727c94acb568ad4f5b4674996401f5ee531)
## [v1.2.9](https://github.com/es-shims/String.prototype.trim/compare/v1.2.8...v1.2.9) - 2024-03-16
### Commits
- [Refactor] use `es-object-atoms`; update `call-bind`, `define-properties`, `es-abstract` [`f6fe1af`](https://github.com/es-shims/String.prototype.trim/commit/f6fe1af4cb9381757971b294afc845e3b2e7c1e9)
- [Dev Deps] update `aud`, `npmignore`, `tape` [`d4e2b81`](https://github.com/es-shims/String.prototype.trim/commit/d4e2b81878478d7090826b73d52bc42f117a2189)
## [v1.2.8](https://github.com/es-shims/String.prototype.trim/compare/v1.2.7...v1.2.8) - 2023-09-07
### Commits
- [Tests] add passing test cases [`2ab172c`](https://github.com/es-shims/String.prototype.trim/commit/2ab172c3ddeec62fb4f6ead3c7e10d24e340ecad)
- [Deps] update `es-abstract` [`8c16598`](https://github.com/es-shims/String.prototype.trim/commit/8c16598aba57e30c5e8446f91fb998a5790c1f81)
- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `tape` [`2b99fad`](https://github.com/es-shims/String.prototype.trim/commit/2b99fad6f32386b5bf1b304acb0fdd2a73c77a95)
- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/eslint-config`, `aud`, `tape` [`97be2b5`](https://github.com/es-shims/String.prototype.trim/commit/97be2b55a3902753f50fadc2e9df6b7ff0f0f669)
- [Deps] update `define-properties`, `es-abstract` [`1fdc65f`](https://github.com/es-shims/String.prototype.trim/commit/1fdc65ff4b9c73cc9d132832943a89a57f1f93a5)
## [v1.2.7](https://github.com/es-shims/String.prototype.trim/compare/v1.2.6...v1.2.7) - 2022-11-07
### Commits
- [meta] use `npmignore` to autogenerate an npmignore file [`3e6de84`](https://github.com/es-shims/String.prototype.trim/commit/3e6de84f959c1ecc44e894aa1a64a8eb5007f3f5)
- [actions] update rebase action to use reusable workflow [`b725a04`](https://github.com/es-shims/String.prototype.trim/commit/b725a0499b832e69dfe5121bb643464a659ba8ff)
- [Deps] update `es-abstract` [`b707a17`](https://github.com/es-shims/String.prototype.trim/commit/b707a1747363f361665c50eda5eb952a86755e8c)
- [Dev Deps] update `aud`, `tape` [`5295419`](https://github.com/es-shims/String.prototype.trim/commit/5295419b0bbaf8035696ef3a24a8625ee743ec7f)
## [v1.2.6](https://github.com/es-shims/String.prototype.trim/compare/v1.2.5...v1.2.6) - 2022-04-24
### Commits
- [actions] reuse common workflows [`dbfc093`](https://github.com/es-shims/String.prototype.trim/commit/dbfc0932e7b2fad166245599310a1d84a1be0882)
- [Fix] as of unicode v6, the mongolian vowel separator is no longer whitespace [`56bbb86`](https://github.com/es-shims/String.prototype.trim/commit/56bbb86b8e514a16fc47e095b8c1014e12a2e92a)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`7fa437e`](https://github.com/es-shims/String.prototype.trim/commit/7fa437e4c3d25798d979294a121f93cb4346ba04)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `functions-have-names`, `tape` [`716a060`](https://github.com/es-shims/String.prototype.trim/commit/716a06080dbca68ec8e3b2e0e18c0a333ed28594)
- [actions] update codecov uploader [`9a39958`](https://github.com/es-shims/String.prototype.trim/commit/9a39958a13e20d6b9f01f9fce71dd37cc03da52e)
- [Fix] ensure main entry point properly checks the receiver in ES3 engines [`24220c4`](https://github.com/es-shims/String.prototype.trim/commit/24220c49dcb7055b5b94eb52c4d610428e19d3e4)
- [Deps] update `define-properties`, `es-abstract` [`c6008ea`](https://github.com/es-shims/String.prototype.trim/commit/c6008ea9007741755710b70ae05003cb71a7d1bd)
## [v1.2.5](https://github.com/es-shims/String.prototype.trim/compare/v1.2.4...v1.2.5) - 2021-10-03
### Commits
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`37d5a61`](https://github.com/es-shims/String.prototype.trim/commit/37d5a61c95a26c079b30e2d9d2ffdb70f36ca9cf)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `tape` [`4c4a85e`](https://github.com/es-shims/String.prototype.trim/commit/4c4a85e5f521ae9811ac1205af933e3845b5a24e)
- [readme] add github actions/codecov badges [`9980eee`](https://github.com/es-shims/String.prototype.trim/commit/9980eee58866b08218ff3257a3af2aa9e29774fc)
- [Deps] update `es-abstract` [`6c1da80`](https://github.com/es-shims/String.prototype.trim/commit/6c1da806270fd909a76fc43e3dfe91be46058382)
- [readme] remove defunct testling badge [`8d282d1`](https://github.com/es-shims/String.prototype.trim/commit/8d282d1becd5f8d3ffe0e6e1dbfa2ddf29071670)
- [Dev Deps] update `eslint`, `tape` [`8856c26`](https://github.com/es-shims/String.prototype.trim/commit/8856c2663b5495cafb930e009f68e2d22958cac0)
- [actions] update workflows [`62cd341`](https://github.com/es-shims/String.prototype.trim/commit/62cd3412aaeee13c0d2cfe7f9bd33297e7279989)
- [meta] use `prepublishOnly` script for npm 7+ [`abd99c4`](https://github.com/es-shims/String.prototype.trim/commit/abd99c4a9838847efb3db7ddf579fb4bda8f6030)
- [Deps] update `es-abstract` [`802cb7b`](https://github.com/es-shims/String.prototype.trim/commit/802cb7b69b3a0c9a9b9642d641f0af490bd9dde7)
## [v1.2.4](https://github.com/es-shims/String.prototype.trim/compare/v1.2.3...v1.2.4) - 2021-02-21
### Commits
- [meta] do not publish github action workflow files [`936161b`](https://github.com/es-shims/String.prototype.trim/commit/936161bf43c83e09bc39c4d472d313c8f64e3fe3)
- [readme] remove travis badge [`9a28c39`](https://github.com/es-shims/String.prototype.trim/commit/9a28c3943b51a2cc87694c954205249122256d92)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `functions-have-names`, `has-strict-mode`, `tape` [`7b4be8d`](https://github.com/es-shims/String.prototype.trim/commit/7b4be8d12365feb5b42658902cf18316508a0c62)
- [Tests] increase coverage [`31b8735`](https://github.com/es-shims/String.prototype.trim/commit/31b87354f55f24501ca8b2f02477cb692a70457c)
- [actions] update workflows [`eda6ab7`](https://github.com/es-shims/String.prototype.trim/commit/eda6ab73fea52b49b74653e96ac81d5372599dc8)
- [Deps] update `call-bind`, `es-abstract` [`083f88f`](https://github.com/es-shims/String.prototype.trim/commit/083f88f5342144f337f1f82874cb8cd6f27f2262)
## [v1.2.3](https://github.com/es-shims/String.prototype.trim/compare/v1.2.2...v1.2.3) - 2020-11-21
### Commits
- [Tests] migrate tests to Github Actions [`6768c8d`](https://github.com/es-shims/String.prototype.trim/commit/6768c8d5569a6fcc841436b98a19ddf6b63c7de4)
- [Tests] run `nyc` on all tests [`2fd5baa`](https://github.com/es-shims/String.prototype.trim/commit/2fd5baa7239a4d449338e0333e2dc4573597962e)
- [Deps] update `es-abstract`; use `call-bind` where applicable [`e4e8c6e`](https://github.com/es-shims/String.prototype.trim/commit/e4e8c6ede423ee8c384564092f624f980097bb28)
- [Dev Deps] update `eslint`, `aud`, `auto-changelog` [`a21c1d5`](https://github.com/es-shims/String.prototype.trim/commit/a21c1d5c87ec9b1b5107b0a1faf138993951081c)
## [v1.2.2](https://github.com/es-shims/String.prototype.trim/compare/v1.2.1...v1.2.2) - 2020-09-15
### Commits
- [Tests] use `nyc` for coverage` [`0884270`](https://github.com/es-shims/String.prototype.trim/commit/0884270b26f7e6f7602d9f355dc3b4d5cd12d97e)
- [Tests] add implementation tests [`475c480`](https://github.com/es-shims/String.prototype.trim/commit/475c4804224a11bb6fba6d1407b59f7aab2c5d4e)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`d70d913`](https://github.com/es-shims/String.prototype.trim/commit/d70d9136bc76499ecee1997068b7f3d1ba0f94e8)
- [actions] add "Allow Edits" workflow [`6e6be23`](https://github.com/es-shims/String.prototype.trim/commit/6e6be23aa679e02836e1f3e65bd09dd30c3fd2ae)
- [Refactor] use `RequireObjectCoercible` instead of `CheckObjectCoercible` [`5bfaf17`](https://github.com/es-shims/String.prototype.trim/commit/5bfaf1731edd5fcd01ec07f75717eebdf4992e4c)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `functions-have-names`; add `safe-publish-latest` [`65be600`](https://github.com/es-shims/String.prototype.trim/commit/65be600028222127c1faaeacea810bc042f35f70)
- [Deps] update `es-abstract`, remove `function-bind` [`5f4d1ec`](https://github.com/es-shims/String.prototype.trim/commit/5f4d1ec8f2c13a4b4fde171ca2029e1ec4057b2b)
- [Refactor] switch from 2019 to 2020 AOs [`4c2d5d2`](https://github.com/es-shims/String.prototype.trim/commit/4c2d5d23f63731958007d856767f5a2f9c779c15)
- [Dev Deps] update `auto-changelog`, `tape` [`c7fc9e2`](https://github.com/es-shims/String.prototype.trim/commit/c7fc9e22b09d24a9aa9e68358d4a5ba10e25ff04)
- [Dev Deps] update `auto-changelog`; add `aud` [`e1dec36`](https://github.com/es-shims/String.prototype.trim/commit/e1dec364391ea5d7dc8339d2da279fdc511cdbe9)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`35826c2`](https://github.com/es-shims/String.prototype.trim/commit/35826c21b140a3c1431bd20c3443da23888b92bc)
- [Deps] update `es-abstract` [`54095ef`](https://github.com/es-shims/String.prototype.trim/commit/54095ef76d193c8595516977e98343f8db754e2d)
- [Deps] update `es-abstract` [`486dd9c`](https://github.com/es-shims/String.prototype.trim/commit/486dd9c68c5843a9f50cde55749d34edb9702616)
## [v1.2.1](https://github.com/es-shims/String.prototype.trim/compare/v1.2.0...v1.2.1) - 2019-12-16
### Commits
- [Tests] use shared travis-ci configs [`52f7e64`](https://github.com/es-shims/String.prototype.trim/commit/52f7e643f128e04ed0139c1cb3da7b7907ea639f)
- [meta] add `auto-changelog` [`6284c06`](https://github.com/es-shims/String.prototype.trim/commit/6284c061c8f4de4314a43e8600ff879164ab162c)
- [meta] remove unused Makefile and associated utilities [`8c781cd`](https://github.com/es-shims/String.prototype.trim/commit/8c781cd4bad87f7bf31dae256ef0f1c19cec2113)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `functions-have-names` [`c54b481`](https://github.com/es-shims/String.prototype.trim/commit/c54b481743611e736315c10885cfc861d306e64a)
- [Refactor] use split-up `es-abstract` (57% bundle size decrease) [`b0378c9`](https://github.com/es-shims/String.prototype.trim/commit/b0378c99988846b0a8edf3fcfd08f30dd632f5a9)
- [actions] add automatic rebasing / merge commit blocking [`bffe893`](https://github.com/es-shims/String.prototype.trim/commit/bffe893990837250f8a3c4714bd52675251af5c7)
- [meta] add `funding` field [`0559449`](https://github.com/es-shims/String.prototype.trim/commit/05594490366fad2d8e4bd435937fbd81169d965a)
- [Deps] update `es-abstract` [`c44d307`](https://github.com/es-shims/String.prototype.trim/commit/c44d307a50bb1fc53811b49d9203cd794ed1bae4)
## [v1.2.0](https://github.com/es-shims/String.prototype.trim/compare/v1.1.2...v1.2.0) - 2019-07-24
### Commits
- [Tests] up to `node` `v12.6`, `v11.15`, `v10.16`, `v9.11`, `v8.16`, `v7.10`, `v6.17`, `4.9`; use `nvm install-latest-npm` [`b857148`](https://github.com/es-shims/String.prototype.trim/commit/b857148644d305f720b2dd9bf691b7dc2930f91d)
- [Tests] remove `jscs` [`ad1dea7`](https://github.com/es-shims/String.prototype.trim/commit/ad1dea7f6114de79d637e82cdfaf1aa5499bd358)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `replace`, `semver`, `tape` [`fcbc11d`](https://github.com/es-shims/String.prototype.trim/commit/fcbc11d4af9be65f4f7eb4aec20498c7a33a004f)
- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`06a4ffa`](https://github.com/es-shims/String.prototype.trim/commit/06a4ffa3078d4ab65418e878d3ef7b03277e8a1f)
- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@es-shims/api` [`3554fb1`](https://github.com/es-shims/String.prototype.trim/commit/3554fb1fe722004080000b0767f7f89676a3d73a)
- [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` [`804b2f2`](https://github.com/es-shims/String.prototype.trim/commit/804b2f244c257b32cb2473eb1a829ce97dc6a0a5)
- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `semver`, `@ljharb/eslint-config` [`6a69408`](https://github.com/es-shims/String.prototype.trim/commit/6a694081cdd9aa9296ea181e4d2b4c6fe656bb16)
- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`e89adee`](https://github.com/es-shims/String.prototype.trim/commit/e89adeefcbd6fb59563e62d230b8036d65a8bf69)
- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`1280e56`](https://github.com/es-shims/String.prototype.trim/commit/1280e5629deb4554c7077d0e452399c03c06f7b1)
- [New] add `auto` entry point [`bb00b15`](https://github.com/es-shims/String.prototype.trim/commit/bb00b1551d2774e216b5d316b552d08a7f0619d4)
- [Tests] fix tests for the mongolian vowel separator [`a35f627`](https://github.com/es-shims/String.prototype.trim/commit/a35f6275ec7b4d6b47136a007fd07566e037cac8)
- [Tests] up to `node` `v5.9`, `v4.4` [`b541b9b`](https://github.com/es-shims/String.prototype.trim/commit/b541b9b46873be859aea6c5b1e7f6f54323ea139)
- [Dev Deps] update `jscs`, `nsp`, `eslint` [`b52022d`](https://github.com/es-shims/String.prototype.trim/commit/b52022d809922914827c34bcf2c1f81b68bde092)
- [Tests] use pretest/posttest for linting/security [`39f5684`](https://github.com/es-shims/String.prototype.trim/commit/39f56844f30f630ab5497f38153b8f0646ed1d96)
- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`8c358c2`](https://github.com/es-shims/String.prototype.trim/commit/8c358c22ee57bd5e7b437fb707230399ea7c42aa)
- [Tests] up to `node` `v6.2` [`2ac7e1f`](https://github.com/es-shims/String.prototype.trim/commit/2ac7e1f90088bb0c96986006539ffebb6b2a6eda)
- Only apps should have lockfiles [`cb15ed5`](https://github.com/es-shims/String.prototype.trim/commit/cb15ed57fbf3ba3f2d7f24af957e8ff41421dd81)
- [Deps] update `define-properties`, `es-abstract`, `function-bind` [`5e0371a`](https://github.com/es-shims/String.prototype.trim/commit/5e0371af5c7b8fee49a0e7d1bcc26fcf41743779)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api` [`37bae7f`](https://github.com/es-shims/String.prototype.trim/commit/37bae7f8f4952b376036d924673b9e885da022f8)
- [Tests] on `node` `v5.6`, `v4.3` [`33017cf`](https://github.com/es-shims/String.prototype.trim/commit/33017cf0d3aade480c357ee8aedaca7bc5a75092)
- [Tests] allow coverage to fail [`0d7b1e3`](https://github.com/es-shims/String.prototype.trim/commit/0d7b1e365484f8c33247b60e2a07748dc2183d40)
- [Tests] use `functions-have-names` [`3e68777`](https://github.com/es-shims/String.prototype.trim/commit/3e687776f6a45e3a6d129705aad3bb4863758114)
- [Tests] on `node` `v5.12` [`32ea49d`](https://github.com/es-shims/String.prototype.trim/commit/32ea49d7572b3f981d036ea060e3ed3559ad78ef)
- [Deps] update `es-abstract` [`15f7f24`](https://github.com/es-shims/String.prototype.trim/commit/15f7f249619b7aab941c6c8156cb81ed57c39b7e)
- [Tests] on `node` `v5.10` [`080c50f`](https://github.com/es-shims/String.prototype.trim/commit/080c50fc617de7ac024d443d4a9b76ba295bd744)
- [Deps] update `function-bind` [`532480e`](https://github.com/es-shims/String.prototype.trim/commit/532480e07ad7bf22da64d401ede35928d21ff558)
## [v1.1.2](https://github.com/es-shims/String.prototype.trim/compare/v1.1.1...v1.1.2) - 2016-02-06
### Commits
- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `semver`, `@ljharb/eslint-config` [`df94d07`](https://github.com/es-shims/String.prototype.trim/commit/df94d07e12ca1e52739353f534a3d89e0a860a70)
- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`ef78d89`](https://github.com/es-shims/String.prototype.trim/commit/ef78d89148efe8d371fb828923dd149163e2c5c6)
- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`b746516`](https://github.com/es-shims/String.prototype.trim/commit/b7465166a48828367bedaa2d42a30a5e148dcaae)
- package.json: use object form of "authors", add "contributors" [`a799df1`](https://github.com/es-shims/String.prototype.trim/commit/a799df17322ae526d5c8732c75bd5bcc3d1f649f)
- [Tests] up to `node` `v5.5`, don’t allow `0.8` to fail [`7fea308`](https://github.com/es-shims/String.prototype.trim/commit/7fea3082424fbeb25f2cb88884a999326ca428f2)
- [Dev Deps] update `jscs`, `nsp`, `eslint`, `semver`, `@ljharb/eslint-config` [`d14c7c1`](https://github.com/es-shims/String.prototype.trim/commit/d14c7c1850fb8e3a9f1d153bd818ed3beacdbadc)
- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`2903359`](https://github.com/es-shims/String.prototype.trim/commit/29033591ca3e65977e2746537c94b7e2e8b65ecc)
- [Tests] fix npm upgrades for older nodes [`0a6cbfa`](https://github.com/es-shims/String.prototype.trim/commit/0a6cbfa0ac506703ed554f6dc8bbde7ac1977cd4)
- [Deps] update `define-properties`, `es-abstract` [`39ccb08`](https://github.com/es-shims/String.prototype.trim/commit/39ccb0881762d762934ef2cb3c0459c65b3abf72)
- [Deps] update `es-abstract` [`c40e4fb`](https://github.com/es-shims/String.prototype.trim/commit/c40e4fb229e1a6a3e3c6818fc680ca380f2d866c)
- Use the polyfill, not the implementation, as the default export. [`0fe847e`](https://github.com/es-shims/String.prototype.trim/commit/0fe847e901871f1a8f33a66be2cd518bf8dcd0e1)
- [Tests] on `node` `v4.2` [`589743c`](https://github.com/es-shims/String.prototype.trim/commit/589743c0f8b1432a79cfed4b29187e6a9760a87b)
- [Deps] update `es-abstract` [`85bad8e`](https://github.com/es-shims/String.prototype.trim/commit/85bad8e217969a6e1eb7679a1bb06d6f075bd557)
- added assert [`aa81ac5`](https://github.com/es-shims/String.prototype.trim/commit/aa81ac55540a9e53a58ce0d1f5266ff36d403b3a)
## [v1.1.1](https://github.com/es-shims/String.prototype.trim/compare/v1.1.0...v1.1.1) - 2015-08-16
### Commits
- [Docs] remove "if" around `.shim` call in example [`b9ce088`](https://github.com/es-shims/String.prototype.trim/commit/b9ce08875f7252a85928e426db9b533cc5ee007a)
## [v1.1.0](https://github.com/es-shims/String.prototype.trim/compare/v1.0.0...v1.1.0) - 2015-08-16
### Commits
- Implement the [es-shim API](es-shims/api). [`5812703`](https://github.com/es-shims/String.prototype.trim/commit/581270337926462f9babf83772bcab71bc48bf8f)
- Move implementation to `implementation.js` [`e455b2a`](https://github.com/es-shims/String.prototype.trim/commit/e455b2af0e360358f02e54b556e698a971fc31f4)
- Fix `make release` [`efd2071`](https://github.com/es-shims/String.prototype.trim/commit/efd20711e9a226ad25e2b1e5ad7bbe85ef832d69)
- [Dev Deps] update `jscs` [`6c2fa95`](https://github.com/es-shims/String.prototype.trim/commit/6c2fa957538f139767de540693910cf1f49c8d3a)
- [Deps] update `es-abstract` [`de4cd87`](https://github.com/es-shims/String.prototype.trim/commit/de4cd876239d550f3c35e1db55a973cbb03c9b77)
- [Dev Deps] update `tape` [`2d07fe1`](https://github.com/es-shims/String.prototype.trim/commit/2d07fe19ff136467e1edbca91cfea6caac1b06d8)
- [Dev Deps] update `tape` [`e697efe`](https://github.com/es-shims/String.prototype.trim/commit/e697efe943cab07639d62649424c72e4f44f2469)
- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`6065103`](https://github.com/es-shims/String.prototype.trim/commit/6065103baa10f56b904f44693d5ba6b23ee6ba57)
## v1.0.0 - 2015-08-08
### Commits
- Dotfiles / Makefile [`b7f0e52`](https://github.com/es-shims/String.prototype.trim/commit/b7f0e526ea73136e00595d768faaba83a41da7ee)
- Tests [`4d61441`](https://github.com/es-shims/String.prototype.trim/commit/4d61441de9dcf2278dcd118077d4541843a47534)
- package.json [`2a2e0f2`](https://github.com/es-shims/String.prototype.trim/commit/2a2e0f2949dd30095eda20e1796483ea21dd7b38)
- Initial commit [`51aa18f`](https://github.com/es-shims/String.prototype.trim/commit/51aa18f299f8d340034670af0311c5981c89f713)
- Read me [`5681192`](https://github.com/es-shims/String.prototype.trim/commit/56811925aed1dd06a2cfa654b3f246b6a897a33c)
- Implementation [`87f08c5`](https://github.com/es-shims/String.prototype.trim/commit/87f08c565f7be56c2826386aa4a4e683a00d8871)
@@ -0,0 +1,58 @@
import { PacketContext } from '../../packet/context/packetContext';
import { PacketMsg } from '../../packet/message/message';
import { PacketMsgPicElement } from '../../packet/message/element';
import { RawMessage } from '../../index';
import { MiniAppRawData, MiniAppReqParams } from '../../packet/entities/miniApp';
import { AIVoiceChatType } from '../../packet/entities/aiChat';
import { IndexNode, MsgInfo, PushMsgBody } from '../../packet/transformer/proto';
import { OidbPacket } from '../../packet/transformer/base';
import { ImageOcrResult } from '../../packet/entities/ocrResult';
import { UploadForwardMsgParams } from '../../packet/transformer/message/UploadForwardMsgV2';
export declare class PacketOperationContext {
private readonly context;
constructor(context: PacketContext);
sendPacket<T extends boolean = false>(pkt: OidbPacket, rsp?: T): Promise<T extends true ? Buffer : void>;
SendPoke(is_group: boolean, peer: number, target?: number): Promise<void>;
SetGroupTodo(groupUin: number, msgSeq: string): Promise<void>;
FetchRkey(timeout?: number): Promise<NonNullable<{
rkey: string;
ttl: bigint;
time: number;
type: number;
} & {}>[]>;
GroupSign(groupUin: number): Promise<void>;
GetStrangerStatus(uin: number): Promise<{
status: number;
ext_status: number;
} | undefined>;
SetGroupSpecialTitle(groupUin: number, uid: string, title: string): Promise<void>;
UploadResources(msg: PacketMsg[], groupUin?: number): Promise<void>;
UploadImage(img: PacketMsgPicElement): Promise<string>;
GetImageUrl(selfUid: string, node: any): Promise<string>;
GetPttUrl(selfUid: string, node: any, timeout?: number): Promise<string>;
GetVideoUrl(selfUid: string, node: any, timeout?: number): Promise<string>;
GetGroupImageUrl(groupUin: number, node: any, timeout?: number): Promise<string>;
GetGroupPttUrl(groupUin: number, node: any, timeout?: number): Promise<string>;
GetGroupVideoUrl(groupUin: number, node: any, timeout?: number): Promise<string>;
ImageOCR(imgUrl: string): Promise<ImageOcrResult>;
private SendPreprocess;
FetchGroupMessage(groupUin: number, startSeq: number, endSeq: number): Promise<any[]>;
FetchC2CMessage(targetUid: string, startSeq: number, endSeq: number): Promise<any[]>;
UploadForwardMsg(msg: PacketMsg[], groupUin?: number): Promise<string>;
UploadForwardMsgV2(msg: UploadForwardMsgParams[], groupUin?: number): Promise<string>;
MoveGroupFile(groupUin: number, fileUUID: string, currentParentDirectory: string, targetParentDirectory: string): Promise<number>;
RenameGroupFile(groupUin: number, fileUUID: string, currentParentDirectory: string, newName: string): Promise<number>;
GetGroupFileUrl(groupUin: number, fileUUID: string, timeout?: number): Promise<string>;
GetPrivateFileUrl(self_id: string, fileUUID: string, md5: string, timeout?: number): Promise<string>;
GetMiniAppAdaptShareInfo(param: MiniAppReqParams): Promise<MiniAppRawData>;
FetchAiVoiceList(groupUin: number, chatType: AIVoiceChatType): Promise<{
category: string;
voices: NonNullable<{
voiceId: string;
voiceDisplayName: string;
voiceExampleUrl: string;
} & {}>[];
}[] | null>;
GetAiVoice(groupUin: number, voiceId: string, text: string, chatType: AIVoiceChatType): Promise<any>;
FetchForwardMsg(res_id: string): Promise<RawMessage[]>;
}
@@ -0,0 +1,27 @@
/**
* @file 对路径进行四舍五入
* @author mengke01(kekee000@gmail.com)
*/
/**
* 对path坐标进行调整
*
* @param {Array} contour 轮廓点数组
* @param {number} point 四舍五入的点数
* @return {Object} contour 坐标点
*/
export default function pathCeil(contour, point) {
let p;
for (let i = 0, l = contour.length; i < l; i++) {
p = contour[i];
if (!point) {
p.x = Math.round(p.x);
p.y = Math.round(p.y);
}
else {
p.x = Number(p.x.toFixed(point));
p.y = Number(p.y.toFixed(point));
}
}
return contour;
}
@@ -0,0 +1,33 @@
import isFunction from './isFunction.js';
import isLength from './isLength.js';
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
export default isArrayLike;
@@ -0,0 +1,78 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { isOpeningBracketToken, isClosingBracketToken } = require("eslint-utils")
module.exports = {
meta: {
docs: {
description: "disallow property shorthands.",
category: "ES2015",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-property-shorthands.html",
},
fixable: "code",
messages: {
forbidden: "ES2015 property shorthands are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
const sourceCode = context.getSourceCode()
/**
* Fixes a FunctionExpression node by making it into a longform property.
* @param {SourceCodeFixer} fixer The fixer object
* @param {ASTNode} node A `Property` node that has a `FunctionExpression` as its value
* @returns {object} A fix for this node
*/
function makeFunctionLongform(fixer, node) {
const firstKeyToken = node.computed
? sourceCode.getTokenBefore(node.key, isOpeningBracketToken)
: sourceCode.getFirstToken(node.key)
const lastKeyToken = node.computed
? sourceCode.getTokenAfter(node.key, isClosingBracketToken)
: sourceCode.getLastToken(node.key)
const keyText = sourceCode.text.slice(
firstKeyToken.range[0],
lastKeyToken.range[1]
)
let functionHeader = "function"
if (node.value.async) {
functionHeader = `async ${functionHeader}`
}
if (node.value.generator) {
functionHeader = `${functionHeader}*`
}
return fixer.replaceTextRange(
[node.range[0], lastKeyToken.range[1]],
`${keyText}: ${functionHeader}`
)
}
return {
"ObjectExpression > :matches(Property[method=true], Property[shorthand=true])"(
node
) {
context.report({
node,
messageId: "forbidden",
fix: node.method
? fixer => makeFunctionLongform(fixer, node)
: fixer =>
fixer.insertTextAfter(
node.key,
`: ${node.key.name}`
),
})
},
}
},
}
@@ -0,0 +1 @@
{"version":3,"file":"setReflectMetadata.spec.d.ts","sourceRoot":"","sources":["../../../../src/reflectMetadata/utils/setReflectMetadata.spec.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,CAAC"}
@@ -0,0 +1,95 @@
'use strict';
import utils from '../utils.js';
/**
* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
*
* @param {string} name - The name of the property to get.
*
* @returns An array of strings.
*/
function parsePropPath(name) {
// foo[x][y][z]
// foo.x.y.z
// foo-x-y-z
// foo x y z
return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
return match[0] === '[]' ? '' : match[1] || match[0];
});
}
/**
* Convert an array to an object.
*
* @param {Array<any>} arr - The array to convert to an object.
*
* @returns An object with the same keys and values as the array.
*/
function arrayToObject(arr) {
const obj = {};
const keys = Object.keys(arr);
let i;
const len = keys.length;
let key;
for (i = 0; i < len; i++) {
key = keys[i];
obj[key] = arr[key];
}
return obj;
}
/**
* It takes a FormData object and returns a JavaScript object
*
* @param {string} formData The FormData object to convert to JSON.
*
* @returns {Object<string, any> | null} The converted object.
*/
function formDataToJSON(formData) {
function buildPath(path, value, target, index) {
let name = path[index++];
if (name === '__proto__') return true;
const isNumericKey = Number.isFinite(+name);
const isLast = index >= path.length;
name = !name && utils.isArray(target) ? target.length : name;
if (isLast) {
if (utils.hasOwnProp(target, name)) {
target[name] = [target[name], value];
} else {
target[name] = value;
}
return !isNumericKey;
}
if (!target[name] || !utils.isObject(target[name])) {
target[name] = [];
}
const result = buildPath(path, value, target[name], index);
if (result && utils.isArray(target[name])) {
target[name] = arrayToObject(target[name]);
}
return !isNumericKey;
}
if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
const obj = {};
utils.forEachEntry(formData, (name, value) => {
buildPath(parsePropPath(name), value, obj, 0);
});
return obj;
}
return null;
}
export default formDataToJSON;
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Number = Number;
const type_1 = require("../create/type");
const index_1 = require("../symbols/index");
/** `[Json]` Creates a Number type */
function Number(options) {
return (0, type_1.CreateType)({ [index_1.Kind]: 'Number', type: 'number' }, options);
}
@@ -0,0 +1,93 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createConfigItem = createConfigItem;
exports.createConfigItemAsync = createConfigItemAsync;
exports.createConfigItemSync = createConfigItemSync;
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _full.default;
}
});
exports.loadOptions = loadOptions;
exports.loadOptionsAsync = loadOptionsAsync;
exports.loadOptionsSync = loadOptionsSync;
exports.loadPartialConfig = loadPartialConfig;
exports.loadPartialConfigAsync = loadPartialConfigAsync;
exports.loadPartialConfigSync = loadPartialConfigSync;
function _gensync() {
const data = require("gensync");
_gensync = function () {
return data;
};
return data;
}
var _full = require("./full.js");
var _partial = require("./partial.js");
var _item = require("./item.js");
var _rewriteStackTrace = require("../errors/rewrite-stack-trace.js");
const loadPartialConfigRunner = _gensync()(_partial.loadPartialConfig);
function loadPartialConfigAsync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.async)(...args);
}
function loadPartialConfigSync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.sync)(...args);
}
function loadPartialConfig(opts, callback) {
if (callback !== undefined) {
(0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.errback)(opts, callback);
} else if (typeof opts === "function") {
(0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.errback)(undefined, opts);
} else {
{
return loadPartialConfigSync(opts);
}
}
}
function* loadOptionsImpl(opts) {
var _config$options;
const config = yield* (0, _full.default)(opts);
return (_config$options = config == null ? void 0 : config.options) != null ? _config$options : null;
}
const loadOptionsRunner = _gensync()(loadOptionsImpl);
function loadOptionsAsync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.async)(...args);
}
function loadOptionsSync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.sync)(...args);
}
function loadOptions(opts, callback) {
if (callback !== undefined) {
(0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.errback)(opts, callback);
} else if (typeof opts === "function") {
(0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.errback)(undefined, opts);
} else {
{
return loadOptionsSync(opts);
}
}
}
const createConfigItemRunner = _gensync()(_item.createConfigItem);
function createConfigItemAsync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.async)(...args);
}
function createConfigItemSync(...args) {
return (0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.sync)(...args);
}
function createConfigItem(target, options, callback) {
if (callback !== undefined) {
(0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.errback)(target, options, callback);
} else if (typeof options === "function") {
(0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.errback)(target, undefined, callback);
} else {
{
return createConfigItemSync(target, options);
}
}
}
0 && 0;
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"2":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"2":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C"},D:{"1":"hB iB jB kB lB mB nB oB pB qB rB sB tB uB","2":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"1":"9 AB BB CB DB EB FB bB cB dB eB fB gB hB","2":"0 1 2 3 4 5 6 7 8 F B C G N O P aB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z FD GD HD ID NC uC JD OC"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"2":"TC J I iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C H NC uC OC"},L:{"2":"I"},M:{"2":"MC"},N:{"2":"A B"},O:{"2":"PC"},P:{"1":"J","2":"6 7 8 9 AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"2":"zD"},R:{"2":"0D"},S:{"2":"1D 2D"}},B:7,C:"Object.observe data binding",D:true};
@@ -0,0 +1 @@
module.exports={C:{"48":0.00337,"115":0.02022,"121":0.00674,"125":0.01348,"128":0.00674,"132":0.00674,"134":0.00674,"140":0.01011,"142":0.01011,"143":0.25612,"144":0.24264,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 122 123 124 126 127 129 130 131 133 135 136 137 138 139 141 145 146 147 3.5 3.6"},D:{"39":0.00337,"40":0.00337,"41":0.00674,"42":0.00337,"43":0.00337,"44":0.00337,"45":0.00337,"46":0.00337,"47":0.00674,"48":0.00337,"49":0.00337,"50":0.00337,"51":0.00337,"52":0.00337,"53":0.00337,"54":0.00337,"55":0.00337,"56":0.00674,"57":0.00337,"58":0.00674,"59":0.00337,"60":0.00337,"66":0.00337,"68":0.00337,"70":0.00674,"74":0.00337,"78":0.00337,"79":0.00337,"87":0.01011,"88":0.00337,"89":0.00337,"91":0.01685,"93":0.00337,"96":0.00337,"98":0.00674,"99":0.00337,"101":0.00337,"103":0.06403,"109":0.27971,"110":0.00337,"111":0.01011,"112":3.2689,"113":0.00337,"114":0.02696,"116":0.01685,"117":0.01685,"119":0.01348,"120":0.01011,"121":0.01011,"122":0.02359,"123":0.00337,"124":0.00337,"125":3.28575,"126":0.24938,"127":0.00674,"128":0.04381,"129":0.01011,"130":0.00674,"131":0.02696,"132":0.01011,"133":0.08088,"134":0.01348,"135":0.07077,"136":0.05055,"137":0.07077,"138":0.16513,"139":0.28645,"140":4.06759,"141":8.64068,"142":0.08425,"143":0.00337,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 65 67 69 71 72 73 75 76 77 80 81 83 84 85 86 90 92 94 95 97 100 102 104 105 106 107 108 115 118 144 145"},F:{"46":0.00674,"85":0.00674,"90":0.00674,"91":0.04044,"92":0.09099,"95":0.00337,"114":0.00337,"120":0.05729,"121":0.0674,"122":0.82902,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 86 87 88 89 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 115 116 117 118 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.00337,"92":0.00674,"109":0.00674,"114":0.02022,"131":0.00337,"132":0.00337,"134":0.01685,"135":0.00674,"136":0.00337,"137":0.01011,"138":0.02696,"139":0.02022,"140":0.46169,"141":1.88383,"142":0.01011,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 133"},E:{"7":0.00337,"14":0.00674,_:"0 4 5 6 8 9 10 11 12 13 15 3.1 3.2 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.4 16.0 26.2","5.1":0.00337,"13.1":0.01348,"14.1":0.00674,"15.5":0.00337,"15.6":0.02696,"16.1":0.01685,"16.2":0.00337,"16.3":0.01011,"16.4":0.00337,"16.5":0.00674,"16.6":0.05729,"17.0":0.00337,"17.1":0.02022,"17.2":0.00337,"17.3":0.00674,"17.4":0.01348,"17.5":0.02359,"17.6":0.07077,"18.0":0.01348,"18.1":0.01348,"18.2":0.01685,"18.3":0.0337,"18.4":0.02022,"18.5-18.6":0.11458,"26.0":0.33026,"26.1":0.01011},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00196,"5.0-5.1":0,"6.0-6.1":0.00785,"7.0-7.1":0.00589,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.01766,"10.0-10.2":0.00196,"10.3":0.03337,"11.0-11.2":0.49462,"11.3-11.4":0.01178,"12.0-12.1":0.00393,"12.2-12.5":0.09618,"13.0-13.1":0,"13.2":0.00981,"13.3":0.00393,"13.4-13.7":0.0157,"14.0-14.4":0.03337,"14.5-14.8":0.03533,"15.0-15.1":0.03337,"15.2-15.3":0.02552,"15.4":0.02944,"15.5":0.03337,"15.6-15.8":0.43574,"16.0":0.05888,"16.1":0.10992,"16.2":0.05692,"16.3":0.10206,"16.4":0.02552,"16.5":0.04514,"16.6-16.7":0.58294,"17.0":0.04122,"17.1":0.06281,"17.2":0.04514,"17.3":0.06673,"17.4":0.11777,"17.5":0.20217,"17.6-17.7":0.51032,"18.0":0.1158,"18.1":0.23946,"18.2":0.12954,"18.3":0.41611,"18.4":0.21394,"18.5-18.6":10.90911,"26.0":1.34843,"26.1":0.04907},P:{"4":0.03057,"21":0.02038,"22":0.04076,"23":0.05096,"24":0.03057,"25":0.06115,"26":0.06115,"27":0.23439,"28":2.68023,"29":0.15287,_:"20 5.0-5.4 6.2-6.4 8.2 9.2 10.1 12.0 13.0 14.0 16.0 17.0","7.2-7.4":0.01019,"11.1-11.2":0.02038,"15.0":0.03057,"18.0":0.01019,"19.0":0.02038},I:{"0":0.02649,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":1.08085,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.00337,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.11936},Q:{_:"14.9"},O:{"0":0.93497},H:{"0":0},L:{"0":47.3165}};
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 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","2":"C L M G N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C","2":"xC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"1":"ZB K D E F A B C L M G 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J 2C ZC"},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","2":"F B C FD GD HD ID NC uC JD OC"},G:{"1":"E vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","16":"ZC KD"},H:{"2":"hD"},I:{"1":"I mD nD","2":"iD jD kD","132":"TC J lD vC"},J:{"1":"A","2":"D"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 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:7,C:"High-quality kerning pairs & ligatures",D:true};
@@ -0,0 +1,48 @@
# jsx-a11y/media-has-caption
💼 This rule is enabled in the following configs: ☑️ `recommended`, 🔒 `strict`.
<!-- end auto-generated rule header -->
Providing captions for media is essential for deaf users to follow along. Captions should be a transcription or translation of the dialogue, sound effects, relevant musical cues, and other relevant audio information. Not only is this important for accessibility, but can also be useful for all users in the case that the media is unavailable (similar to `alt` text on an image when an image is unable to load).
The captions should contain all important and relevant information to understand the corresponding media. This may mean that the captions are not a 1:1 mapping of the dialogue in the media content. However, captions are *not* necessary for video components with the `muted` attribute.
## Rule options
This rule takes one optional object argument of type object:
```json
{
"rules": {
"jsx-a11y/media-has-caption": [ 2, {
"audio": [ "Audio" ],
"video": [ "Video" ],
"track": [ "Track" ],
}],
}
}
```
For the `audio`, `video`, and `track` options, these strings determine which JSX elements (**always including** their corresponding DOM element) should be used for this rule. This is a good use case when you have a wrapper component that simply renders an `audio`, `video`, or `track` element (like in React):
### Succeed
```jsx
<audio><track kind="captions" {...props} /></audio>
<video><track kind="captions" {...props} /></video>
<video muted {...props} ></video>
```
### Fail
```jsx
<audio {...props} />
<video {...props} />
```
## Accessibility guidelines
- [WCAG 1.2.2](https://www.w3.org/WAI/WCAG21/Understanding/captions-prerecorded.html)
- [WCAG 1.2.3](https://www.w3.org/WAI/WCAG21/Understanding/audio-description-or-media-alternative-prerecorded.html)
### Resources
- [axe-core, audio-caption](https://dequeuniversity.com/rules/axe/2.1/audio-caption)
- [axe-core, video-caption](https://dequeuniversity.com/rules/axe/2.1/video-caption)
@@ -0,0 +1 @@
{"version":3,"file":"PlanResultCacheManager.d.ts","sourceRoot":"","sources":["../../../../src/container/services/PlanResultCacheManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,qBAAa,sBAAsB;;gBAK/B,2BAA2B,EAAE,2BAA2B,EACxD,uBAAuB,EAAE,uBAAuB;IAM3C,iBAAiB,CAAC,YAAY,EAAE,wBAAwB,GAAG,IAAI;CAQvE"}
@@ -0,0 +1,120 @@
/**
* @fileoverview Restrict file extensions that may contain JSX
* @author Joe Lencioni
*/
'use strict';
const path = require('path');
const docsUrl = require('../util/docsUrl');
const report = require('../util/report');
// ------------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------------
const DEFAULTS = {
allow: 'always',
extensions: ['.jsx'],
ignoreFilesWithoutCode: false,
};
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const messages = {
noJSXWithExtension: 'JSX not allowed in files with extension \'{{ext}}\'',
extensionOnlyForJSX: 'Only files containing JSX may use the extension \'{{ext}}\'',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Disallow file extensions that may contain JSX',
category: 'Stylistic Issues',
recommended: false,
url: docsUrl('jsx-filename-extension'),
},
messages,
schema: [{
type: 'object',
properties: {
allow: {
enum: ['always', 'as-needed'],
},
extensions: {
type: 'array',
items: {
type: 'string',
},
},
ignoreFilesWithoutCode: {
type: 'boolean',
},
},
additionalProperties: false,
}],
},
create(context) {
const filename = context.getFilename();
let jsxNode;
if (filename === '<text>') {
// No need to traverse any nodes.
return {};
}
const allow = (context.options[0] && context.options[0].allow) || DEFAULTS.allow;
const allowedExtensions = (context.options[0] && context.options[0].extensions) || DEFAULTS.extensions;
const ignoreFilesWithoutCode = (context.options[0] && context.options[0].ignoreFilesWithoutCode)
|| DEFAULTS.ignoreFilesWithoutCode;
const isAllowedExtension = allowedExtensions.some((extension) => filename.slice(-extension.length) === extension);
function handleJSX(node) {
if (!jsxNode) {
jsxNode = node;
}
}
// --------------------------------------------------------------------------
// Public
// --------------------------------------------------------------------------
return {
JSXElement: handleJSX,
JSXFragment: handleJSX,
'Program:exit'(node) {
if (jsxNode) {
if (!isAllowedExtension) {
report(context, messages.noJSXWithExtension, 'noJSXWithExtension', {
node: jsxNode,
data: {
ext: path.extname(filename),
},
});
}
return;
}
if (isAllowedExtension && allow === 'as-needed') {
if (ignoreFilesWithoutCode && node.body.length === 0) {
return;
}
report(context, messages.extensionOnlyForJSX, 'extensionOnlyForJSX', {
node,
data: {
ext: path.extname(filename),
},
});
}
},
};
},
};
@@ -0,0 +1,29 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
test("object augmentation", () => {
const Animal = z
.object({
species: z.string(),
})
.augment({
population: z.number(),
});
// overwrites `species`
const ModifiedAnimal = Animal.augment({
species: z.array(z.string()),
});
ModifiedAnimal.parse({
species: ["asd"],
population: 1324,
});
const bad = () =>
ModifiedAnimal.parse({
species: "asdf",
population: 1324,
} as any);
expect(bad).toThrow();
});
@@ -0,0 +1,139 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.parse = parse;
exports.parseForESLint = parseForESLint;
const scope_manager_1 = require("@typescript-eslint/scope-manager");
const typescript_estree_1 = require("@typescript-eslint/typescript-estree");
const visitor_keys_1 = require("@typescript-eslint/visitor-keys");
const debug_1 = __importDefault(require("debug"));
const typescript_1 = require("typescript");
const log = (0, debug_1.default)('typescript-eslint:parser:parser');
function validateBoolean(value, fallback = false) {
if (typeof value !== 'boolean') {
return fallback;
}
return value;
}
const LIB_FILENAME_REGEX = /lib\.(.+)\.d\.[cm]?ts$/;
function getLib(compilerOptions) {
if (compilerOptions.lib) {
return compilerOptions.lib
.map(lib => LIB_FILENAME_REGEX.exec(lib.toLowerCase())?.[1])
.filter((lib) => !!lib);
}
const target = compilerOptions.target ?? typescript_1.ScriptTarget.ES5;
// https://github.com/microsoft/TypeScript/blob/ae582a22ee1bb052e19b7c1bc4cac60509b574e0/src/compiler/utilitiesPublic.ts#L13-L36
switch (target) {
case typescript_1.ScriptTarget.ES2015:
return ['es6'];
case typescript_1.ScriptTarget.ES2016:
return ['es2016.full'];
case typescript_1.ScriptTarget.ES2017:
return ['es2017.full'];
case typescript_1.ScriptTarget.ES2018:
return ['es2018.full'];
case typescript_1.ScriptTarget.ES2019:
return ['es2019.full'];
case typescript_1.ScriptTarget.ES2020:
return ['es2020.full'];
case typescript_1.ScriptTarget.ES2021:
return ['es2021.full'];
case typescript_1.ScriptTarget.ES2022:
return ['es2022.full'];
case typescript_1.ScriptTarget.ES2023:
return ['es2023.full'];
case typescript_1.ScriptTarget.ES2024:
return ['es2024.full'];
case typescript_1.ScriptTarget.ESNext:
return ['esnext.full'];
default:
return ['lib'];
}
}
function parse(code, options) {
return parseForESLint(code, options).ast;
}
function parseForESLint(code, parserOptions) {
if (!parserOptions || typeof parserOptions !== 'object') {
parserOptions = {};
}
else {
parserOptions = { ...parserOptions };
}
// https://eslint.org/docs/user-guide/configuring#specifying-parser-options
// if sourceType is not provided by default eslint expect that it will be set to "script"
if (parserOptions.sourceType !== 'module' &&
parserOptions.sourceType !== 'script') {
parserOptions.sourceType = 'script';
}
if (typeof parserOptions.ecmaFeatures !== 'object') {
parserOptions.ecmaFeatures = {};
}
/**
* Allow the user to suppress the warning from typescript-estree if they are using an unsupported
* version of TypeScript
*/
const warnOnUnsupportedTypeScriptVersion = validateBoolean(parserOptions.warnOnUnsupportedTypeScriptVersion, true);
const tsestreeOptions = {
jsx: validateBoolean(parserOptions.ecmaFeatures.jsx),
...(!warnOnUnsupportedTypeScriptVersion && { loggerFn: false }),
...parserOptions,
// Override errorOnTypeScriptSyntacticAndSemanticIssues and set it to false to prevent use from user config
// https://github.com/typescript-eslint/typescript-eslint/issues/8681#issuecomment-2000411834
errorOnTypeScriptSyntacticAndSemanticIssues: false,
// comment, loc, range, and tokens should always be set for ESLint usage
// https://github.com/typescript-eslint/typescript-eslint/issues/8347
comment: true,
loc: true,
range: true,
tokens: true,
};
const analyzeOptions = {
globalReturn: parserOptions.ecmaFeatures.globalReturn,
jsxFragmentName: parserOptions.jsxFragmentName,
jsxPragma: parserOptions.jsxPragma,
lib: parserOptions.lib,
sourceType: parserOptions.sourceType,
};
const { ast, services } = (0, typescript_estree_1.parseAndGenerateServices)(code, tsestreeOptions);
ast.sourceType = parserOptions.sourceType;
if (services.program) {
// automatically apply the options configured for the program
const compilerOptions = services.program.getCompilerOptions();
if (analyzeOptions.lib == null) {
analyzeOptions.lib = getLib(compilerOptions);
log('Resolved libs from program: %o', analyzeOptions.lib);
}
if (
// eslint-disable-next-line @typescript-eslint/internal/eqeq-nullish
analyzeOptions.jsxPragma === undefined &&
compilerOptions.jsxFactory != null) {
// in case the user has specified something like "preact.h"
const factory = compilerOptions.jsxFactory.split('.')[0].trim();
analyzeOptions.jsxPragma = factory;
log('Resolved jsxPragma from program: %s', analyzeOptions.jsxPragma);
}
if (
// eslint-disable-next-line @typescript-eslint/internal/eqeq-nullish
analyzeOptions.jsxFragmentName === undefined &&
compilerOptions.jsxFragmentFactory != null) {
// in case the user has specified something like "preact.Fragment"
const fragFactory = compilerOptions.jsxFragmentFactory
.split('.')[0]
.trim();
analyzeOptions.jsxFragmentName = fragFactory;
log('Resolved jsxFragmentName from program: %s', analyzeOptions.jsxFragmentName);
}
}
const scopeManager = (0, scope_manager_1.analyze)(ast, analyzeOptions);
// if not defined - override from the parserOptions
services.emitDecoratorMetadata ??=
parserOptions.emitDecoratorMetadata === true;
services.experimentalDecorators ??=
parserOptions.experimentalDecorators === true;
services.isolatedDeclarations ??= parserOptions.isolatedDeclarations === true;
return { ast, scopeManager, services, visitorKeys: visitor_keys_1.visitorKeys };
}
@@ -0,0 +1,23 @@
import { CreateType } from '../create/type.mjs';
import { Union } from '../union/index.mjs';
import { ExtendsCheck, ExtendsResult } from './extends-check.mjs';
import { ExtendsFromMappedKey } from './extends-from-mapped-key.mjs';
import { ExtendsFromMappedResult } from './extends-from-mapped-result.mjs';
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
import { IsMappedKey, IsMappedResult } from '../guard/kind.mjs';
// prettier-ignore
function ExtendsResolve(left, right, trueType, falseType) {
const R = ExtendsCheck(left, right);
return (R === ExtendsResult.Union ? Union([trueType, falseType]) :
R === ExtendsResult.True ? trueType :
falseType);
}
/** `[Json]` Creates a Conditional type */
export function Extends(L, R, T, F, options) {
// prettier-ignore
return (IsMappedResult(L) ? ExtendsFromMappedResult(L, R, T, F, options) :
IsMappedKey(L) ? CreateType(ExtendsFromMappedKey(L, R, T, F, options)) :
CreateType(ExtendsResolve(L, R, T, F), options));
}
@@ -0,0 +1 @@
{"version":3,"file":"semi.d.ts","sourceRoot":"","sources":["semi.js"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateMaybeClassMetadataConstructorArgument = updateMaybeClassMetadataConstructorArgument;
function updateMaybeClassMetadataConstructorArgument(updateMetadata, index) {
return (classMetadata) => {
const propertyMetadata = classMetadata.constructorArguments[index];
classMetadata.constructorArguments[index] =
updateMetadata(propertyMetadata);
return classMetadata;
};
}
//# sourceMappingURL=updateMaybeClassMetadataConstructorArgument.js.map
@@ -0,0 +1,50 @@
import {getRowLabelledBy as $2140fb2337097f2d$export$85069b70317f543} from "./utils.module.js";
import $iIuaM$intlStringsmodulejs from "./intlStrings.module.js";
import {useGridSelectionCheckbox as $iIuaM$useGridSelectionCheckbox} from "@react-aria/grid";
import {useLocalizedStringFormatter as $iIuaM$useLocalizedStringFormatter} from "@react-aria/i18n";
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
/*
* 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 $2a795c53a101c542$export$16ea7f650bd7c1bb(props, state) {
let { key: key } = props;
const { checkboxProps: checkboxProps } = (0, $iIuaM$useGridSelectionCheckbox)(props, state);
return {
checkboxProps: {
...checkboxProps,
'aria-labelledby': `${checkboxProps.id} ${(0, $2140fb2337097f2d$export$85069b70317f543)(state, key)}`
}
};
}
function $2a795c53a101c542$export$1003db6a7e384b99(state) {
let { isEmpty: isEmpty, isSelectAll: isSelectAll, selectionMode: selectionMode } = state.selectionManager;
const stringFormatter = (0, $iIuaM$useLocalizedStringFormatter)((0, ($parcel$interopDefault($iIuaM$intlStringsmodulejs))), '@react-aria/table');
return {
checkboxProps: {
'aria-label': stringFormatter.format(selectionMode === 'single' ? 'select' : 'selectAll'),
isSelected: isSelectAll,
isDisabled: selectionMode !== 'multiple' || state.collection.size === 0 || state.collection.rows.length === 1 && state.collection.rows[0].type === 'loader',
isIndeterminate: !isEmpty && !isSelectAll,
onChange: ()=>state.selectionManager.toggleSelectAll()
}
};
}
export {$2a795c53a101c542$export$16ea7f650bd7c1bb as useTableSelectionCheckbox, $2a795c53a101c542$export$1003db6a7e384b99 as useTableSelectAllCheckbox};
//# sourceMappingURL=useTableSelectionCheckbox.module.js.map
@@ -0,0 +1,13 @@
'use strict';
exports.__esModule = true;
const { getScope } = require('./contextCompat');
/** @type {import('./declaredScope').default} */
exports.default = function declaredScope(context, name, node) {
const references = (node ? getScope(context, node) : context.getScope()).references;
const reference = references.find((x) => x.identifier.name === name);
if (!reference || !reference.resolved) { return undefined; }
return reference.resolved.scope.type;
};
@@ -0,0 +1 @@
module.exports = require('./lib').hasEveryProp; // eslint-disable-line import/no-unresolved
@@ -0,0 +1,35 @@
// src/lock-filled.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var LockFilledIcon = (props) => /* @__PURE__ */ jsxs(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ jsx(
"path",
{
d: "M12.0011 17.3498C12.9013 17.3498 13.6311 16.6201 13.6311 15.7198C13.6311 14.8196 12.9013 14.0898 12.0011 14.0898C11.1009 14.0898 10.3711 14.8196 10.3711 15.7198C10.3711 16.6201 11.1009 17.3498 12.0011 17.3498Z",
fill: "currentColor"
}
),
/* @__PURE__ */ jsx(
"path",
{
d: "M18.28 9.53V8.28C18.28 5.58 17.63 2 12 2C6.37 2 5.72 5.58 5.72 8.28V9.53C2.92 9.88 2 11.3 2 14.79V16.65C2 20.75 3.25 22 7.35 22H16.65C20.75 22 22 20.75 22 16.65V14.79C22 11.3 21.08 9.88 18.28 9.53ZM12 18.74C10.33 18.74 8.98 17.38 8.98 15.72C8.98 14.05 10.34 12.7 12 12.7C13.66 12.7 15.02 14.06 15.02 15.72C15.02 17.39 13.67 18.74 12 18.74ZM7.35 9.44C7.27 9.44 7.2 9.44 7.12 9.44V8.28C7.12 5.35 7.95 3.4 12 3.4C16.05 3.4 16.88 5.35 16.88 8.28V9.45C16.8 9.45 16.73 9.45 16.65 9.45H7.35V9.44Z",
fill: "currentColor"
}
)
]
}
);
export {
LockFilledIcon
};
@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = extractValueFromIdentifier;
var JS_RESERVED = {
Array: Array,
Date: Date,
Infinity: Infinity,
Math: Math,
Number: Number,
Object: Object,
String: String,
undefined: undefined
};
/**
* Extractor function for a Identifier type value node.
* An Identifier is usually a reference to a variable.
* Just return variable name to determine its existence.
*
* @param - value - AST Value object with type `Identifier`
* @returns - The extracted value converted to correct type.
*/
function extractValueFromIdentifier(value) {
var name = value.name;
if (Object.hasOwnProperty.call(JS_RESERVED, name)) {
return JS_RESERVED[name];
}
return name;
}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.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,52 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/forward.tsx
var forward_exports = {};
__export(forward_exports, {
ForwardIcon: () => ForwardIcon
});
module.exports = __toCommonJS(forward_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var ForwardIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
shapeRendering: "geometricPrecision",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "1.5",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M13 17l5-5-5-5" }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M6 17l5-5-5-5" })
]
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ForwardIcon
});
@@ -0,0 +1,416 @@
import type { SerializedError } from '@internal/createAsyncThunk'
import { createAsyncThunk } from '@internal/createAsyncThunk'
import { executeReducerBuilderCallback } from '@internal/mapBuilders'
import type { UnknownAction } from '@reduxjs/toolkit'
import { createAction } from '@reduxjs/toolkit'
describe('type tests', () => {
test('builder callback for actionMap', () => {
const increment = createAction<number, 'increment'>('increment')
const decrement = createAction<number, 'decrement'>('decrement')
executeReducerBuilderCallback<number>((builder) => {
builder.addCase(increment, (state, action) => {
expectTypeOf(state).toBeNumber()
expectTypeOf(action).toEqualTypeOf<{
type: 'increment'
payload: number
}>()
expectTypeOf(state).not.toBeString()
expectTypeOf(action).not.toMatchTypeOf<{
type: 'increment'
payload: string
}>()
expectTypeOf(action).not.toMatchTypeOf<{
type: 'decrement'
payload: number
}>()
})
builder.addCase('increment', (state, action) => {
expectTypeOf(state).toBeNumber()
expectTypeOf(action).toEqualTypeOf<{ type: 'increment' }>()
expectTypeOf(state).not.toBeString()
expectTypeOf(action).not.toMatchTypeOf<{ type: 'decrement' }>()
// this cannot be inferred and has to be manually specified
expectTypeOf(action).not.toMatchTypeOf<{
type: 'increment'
payload: number
}>()
})
builder.addCase(
increment,
(state, action: ReturnType<typeof increment>) => state,
)
// @ts-expect-error
builder.addCase(
increment,
(state, action: ReturnType<typeof decrement>) => state,
)
builder.addCase(
'increment',
(state, action: ReturnType<typeof increment>) => state,
)
// @ts-expect-error
builder.addCase(
'decrement',
(state, action: ReturnType<typeof increment>) => state,
)
// action type is inferred
builder.addMatcher(increment.match, (state, action) => {
expectTypeOf(action).toEqualTypeOf<ReturnType<typeof increment>>()
})
test('action type is inferred when type predicate lacks `type` property', () => {
type PredicateWithoutTypeProperty = {
payload: number
}
builder.addMatcher(
(action): action is PredicateWithoutTypeProperty => true,
(state, action) => {
expectTypeOf(action).toMatchTypeOf<PredicateWithoutTypeProperty>()
expectTypeOf(action).toMatchTypeOf<UnknownAction>()
},
)
})
// action type defaults to UnknownAction if no type predicate matcher is passed
builder.addMatcher(
() => true,
(state, action) => {
expectTypeOf(action).toMatchTypeOf<UnknownAction>()
},
)
// with a boolean checker, action can also be typed by type argument
builder.addMatcher<{ foo: boolean }>(
() => true,
(state, action) => {
expectTypeOf(action).toMatchTypeOf<{ foo: boolean }>()
expectTypeOf(action).toMatchTypeOf<UnknownAction>()
},
)
// addCase().addMatcher() is possible, action type inferred correctly
builder
.addCase(
'increment',
(state, action: ReturnType<typeof increment>) => state,
)
.addMatcher(decrement.match, (state, action) => {
expectTypeOf(action).toEqualTypeOf<ReturnType<typeof decrement>>()
})
// addCase().addDefaultCase() is possible, action type is UnknownAction
builder
.addCase(
'increment',
(state, action: ReturnType<typeof increment>) => state,
)
.addDefaultCase((state, action) => {
expectTypeOf(action).toMatchTypeOf<UnknownAction>()
})
test('addAsyncThunk() should prevent further calls to addCase() ', () => {
const asyncThunk = createAsyncThunk('test', () => {})
const b = builder.addAsyncThunk(asyncThunk, {
pending: () => {},
rejected: () => {},
fulfilled: () => {},
settled: () => {},
})
expectTypeOf(b).not.toHaveProperty('addCase')
expectTypeOf(b.addAsyncThunk).toBeFunction()
expectTypeOf(b.addMatcher).toBeCallableWith(increment.match, () => {})
expectTypeOf(b.addDefaultCase).toBeCallableWith(() => {})
})
test('addMatcher() should prevent further calls to addCase() and addAsyncThunk()', () => {
const b = builder.addMatcher(increment.match, () => {})
expectTypeOf(b).not.toHaveProperty('addCase')
expectTypeOf(b).not.toHaveProperty('addAsyncThunk')
expectTypeOf(b.addMatcher).toBeCallableWith(increment.match, () => {})
expectTypeOf(b.addDefaultCase).toBeCallableWith(() => {})
})
test('addDefaultCase() should prevent further calls to addCase(), addAsyncThunk(), addMatcher() and addDefaultCase', () => {
const b = builder.addDefaultCase(() => {})
expectTypeOf(b).not.toHaveProperty('addCase')
expectTypeOf(b).not.toHaveProperty('addAsyncThunk')
expectTypeOf(b).not.toHaveProperty('addMatcher')
expectTypeOf(b).not.toHaveProperty('addDefaultCase')
})
describe('`createAsyncThunk` actions work with `mapBuilder`', () => {
test('case 1: normal `createAsyncThunk`', () => {
const thunk = createAsyncThunk('test', () => {
return 'ret' as const
})
builder.addCase(thunk.pending, (_, action) => {
expectTypeOf(action).toMatchTypeOf<{
payload: undefined
meta: {
arg: void
requestId: string
requestStatus: 'pending'
}
}>()
})
builder.addCase(thunk.rejected, (_, action) => {
expectTypeOf(action).toMatchTypeOf<{
payload: unknown
error: SerializedError
meta: {
arg: void
requestId: string
requestStatus: 'rejected'
aborted: boolean
condition: boolean
rejectedWithValue: boolean
}
}>()
})
builder.addCase(thunk.fulfilled, (_, action) => {
expectTypeOf(action).toMatchTypeOf<{
payload: 'ret'
meta: {
arg: void
requestId: string
requestStatus: 'fulfilled'
}
}>()
})
builder.addAsyncThunk(thunk, {
pending(_, action) {
expectTypeOf(action).toMatchTypeOf<{
payload: undefined
meta: {
arg: void
requestId: string
requestStatus: 'pending'
}
}>()
},
rejected(_, action) {
expectTypeOf(action).toMatchTypeOf<{
payload: unknown
error: SerializedError
meta: {
arg: void
requestId: string
requestStatus: 'rejected'
aborted: boolean
condition: boolean
rejectedWithValue: boolean
}
}>()
},
fulfilled(_, action) {
expectTypeOf(action).toMatchTypeOf<{
payload: 'ret'
meta: {
arg: void
requestId: string
requestStatus: 'fulfilled'
}
}>()
},
settled(_, action) {
expectTypeOf(action).toMatchTypeOf<
| {
payload: 'ret'
meta: {
arg: void
requestId: string
requestStatus: 'fulfilled'
}
}
| {
payload: unknown
error: SerializedError
meta: {
arg: void
requestId: string
requestStatus: 'rejected'
aborted: boolean
condition: boolean
rejectedWithValue: boolean
}
}
>()
},
})
})
test('case 2: `createAsyncThunk` with `meta`', () => {
const thunk = createAsyncThunk<
'ret',
void,
{
pendingMeta: { startedTimeStamp: number }
fulfilledMeta: {
fulfilledTimeStamp: number
baseQueryMeta: 'meta!'
}
rejectedMeta: {
baseQueryMeta: 'meta!'
}
}
>(
'test',
(_, api) => {
return api.fulfillWithValue('ret' as const, {
fulfilledTimeStamp: 5,
baseQueryMeta: 'meta!',
})
},
{
getPendingMeta() {
return { startedTimeStamp: 0 }
},
},
)
builder.addCase(thunk.pending, (_, action) => {
expectTypeOf(action).toMatchTypeOf<{
payload: undefined
meta: {
arg: void
requestId: string
requestStatus: 'pending'
startedTimeStamp: number
}
}>()
})
builder.addCase(thunk.rejected, (_, action) => {
expectTypeOf(action).toMatchTypeOf<{
payload: unknown
error: SerializedError
meta: {
arg: void
requestId: string
requestStatus: 'rejected'
aborted: boolean
condition: boolean
rejectedWithValue: boolean
baseQueryMeta?: 'meta!'
}
}>()
if (action.meta.rejectedWithValue) {
expectTypeOf(action.meta.baseQueryMeta).toEqualTypeOf<'meta!'>()
}
})
builder.addCase(thunk.fulfilled, (_, action) => {
expectTypeOf(action).toMatchTypeOf<{
payload: 'ret'
meta: {
arg: void
requestId: string
requestStatus: 'fulfilled'
baseQueryMeta: 'meta!'
}
}>()
})
builder.addAsyncThunk(thunk, {
pending(_, action) {
expectTypeOf(action).toMatchTypeOf<{
payload: undefined
meta: {
arg: void
requestId: string
requestStatus: 'pending'
startedTimeStamp: number
}
}>()
},
rejected(_, action) {
expectTypeOf(action).toMatchTypeOf<{
payload: unknown
error: SerializedError
meta: {
arg: void
requestId: string
requestStatus: 'rejected'
aborted: boolean
condition: boolean
rejectedWithValue: boolean
baseQueryMeta?: 'meta!'
}
}>()
},
fulfilled(_, action) {
expectTypeOf(action).toMatchTypeOf<{
payload: 'ret'
meta: {
arg: void
requestId: string
requestStatus: 'fulfilled'
baseQueryMeta: 'meta!'
}
}>()
},
settled(_, action) {
expectTypeOf(action).toMatchTypeOf<
| {
payload: 'ret'
meta: {
arg: void
requestId: string
requestStatus: 'fulfilled'
baseQueryMeta: 'meta!'
}
}
| {
payload: unknown
error: SerializedError
meta: {
arg: void
requestId: string
requestStatus: 'rejected'
aborted: boolean
condition: boolean
rejectedWithValue: boolean
baseQueryMeta?: 'meta!'
}
}
>()
},
})
})
})
})
})
})
@@ -0,0 +1,56 @@
{
"name": "@heroui/use-clipboard",
"version": "2.1.3",
"description": "Wrapper around navigator.clipboard with feedback timeout",
"keywords": [
"use-clipboard"
],
"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-clipboard"
},
"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",
"dev": "pnpm build:fast --watch",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit",
"build:fast": "tsup src"
}
}
@@ -0,0 +1,38 @@
import { appearAnimationStore } from './store.mjs';
import { appearStoreId } from './store-id.mjs';
function handoffOptimizedAppearAnimation(elementId, valueName, frame) {
const storeId = appearStoreId(elementId, valueName);
const optimisedAnimation = appearAnimationStore.get(storeId);
if (!optimisedAnimation) {
return null;
}
const { animation, startTime } = optimisedAnimation;
function cancelAnimation() {
window.MotionCancelOptimisedAnimation?.(elementId, valueName, frame);
}
/**
* We can cancel the animation once it's finished now that we've synced
* with Motion.
*
* Prefer onfinish over finished as onfinish is backwards compatible with
* older browsers.
*/
animation.onfinish = cancelAnimation;
if (startTime === null || window.MotionHandoffIsComplete?.(elementId)) {
/**
* If the startTime is null, this animation is the Paint Ready detection animation
* and we can cancel it immediately without handoff.
*
* Or if we've already handed off the animation then we're now interrupting it.
* In which case we need to cancel it.
*/
cancelAnimation();
return null;
}
else {
return startTime;
}
}
export { handoffOptimizedAppearAnimation };
@@ -0,0 +1,3 @@
import CryptoJS = require("./index");
export = CryptoJS.SHA256;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P Q H R S T U V W X Y Z","132":"a b c d e f g h i j k l m n o p q r s t"},C:{"1":"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":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0C 1C"},D:{"1":"0 1 2 3 4 5 u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T","66":"U V W X Y","132":"Z a b c d e f g h i j k l m n o p q r s t"},E:{"1":"gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC"},F:{"1":"0 1 2 3 4 5 g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC FD GD HD ID NC uC JD OC","132":"KC LC Q H R WC S T U V W X Y Z a b c d e f"},G:{"1":"gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"8 9 AB BB CB DB EB FB","2":"J oD pD qD rD sD aC tD uD vD wD","16":"xD","132":"6 7 QC RC SC yD"},Q:{"2":"zD"},R:{"1":"0D"},S:{"2":"1D 2D"}},B:1,C:"Declarative Shadow DOM",D:true};
@@ -0,0 +1,68 @@
{
"name": "@heroui/system",
"version": "2.4.7",
"description": "HeroUI system primitives",
"keywords": [
"system"
],
"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/core/system"
},
"bugs": {
"url": "https://github.com/heroui-inc/heroui/issues"
},
"peerDependencies": {
"framer-motion": ">=11.5.6 || >=12.0.0-alpha.1",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0"
},
"clean-package": "../../../clean-package.config.json",
"tsup": {
"clean": true,
"target": "es2019",
"format": [
"cjs",
"esm"
]
},
"dependencies": {
"@internationalized/date": "3.6.0",
"@react-aria/i18n": "3.12.4",
"@react-aria/overlays": "3.24.0",
"@react-aria/utils": "3.26.0",
"@react-stately/utils": "3.10.5",
"@react-types/datepicker": "3.9.0",
"@heroui/react-utils": "2.1.4",
"@heroui/system-rsc": "2.3.6"
},
"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 !src/extend-variants.d.ts --dts",
"dev": "pnpm build:fast --watch",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit",
"build:fast": "tsup src !src/extend-variants.d.ts"
}
}
@@ -0,0 +1,9 @@
export declare const balanced: (a: string | RegExp, b: string | RegExp, str: string) => false | {
start: number;
end: number;
pre: string;
body: string;
post: string;
} | undefined;
export declare const range: (a: string, b: string, str: string) => undefined | [number, number];
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,30 @@
'use strict';
var test = require('tape');
if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
test('has native Symbol support', function (t) {
t.equal(typeof Symbol, 'function');
t.equal(typeof Symbol(), 'symbol');
t.end();
});
// @ts-expect-error CJS has top-level return
return;
}
var hasSymbolToStringTag = require('../../shams');
test('polyfilled Symbols', function (t) {
/* eslint-disable global-require */
t.equal(hasSymbolToStringTag(), false, 'hasSymbolToStringTag is false before polyfilling');
// @ts-expect-error no types defined
require('get-own-property-symbols');
require('../tests')(t);
var hasToStringTagAfter = hasSymbolToStringTag();
t.equal(hasToStringTagAfter, true, 'hasSymbolToStringTag is true after polyfilling');
/* eslint-enable global-require */
t.end();
});
@@ -0,0 +1 @@
{"version":3,"file":"issue_1297.test.d.ts","sourceRoot":"","sources":["../../../../src/test/bugs/issue_1297.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
declare enum Lifecycle {
Transient = 0,
Singleton = 1,
ResolutionScoped = 2,
ContainerScoped = 3
}
export default Lifecycle;
@@ -0,0 +1,718 @@
flf2a$ 7 6 20 15 3
Stop by David Walton <walton@cs.ucdavis.edu>
Derived from Rounded by Nick Miners N.M.Miners@durham.ac.uk
21 August 1994
$$#
$$#
$$#
$$#
$$#
$$#
$$##
_ #
| |#
| |#
|_|#
_ #
|_|#
##
_ _ #
( )( )#
|/ |/ #
#
#
#
##
__ _ #
_| || |_ #
(_ || _)#
_| || |_ #
(_ || _)#
|__||_| #
##
_ #
_| |_ #
| ___)#
|___ |#
(_ _|#
|_| #
##
_ _ #
(_) | |#
/ / #
/ / #
/ / _ #
|_| (_)#
##
___ #
/ _ \ #
( (_) ) #
) _ ( #
( (/ \ #
\__/\_)#
##
_ #
( )#
|/ #
#
#
#
##
__ #
/ _)#
/ / #
( ( #
\ \_ #
\__)#
##
__ #
(_ \ #
\ \ #
) )#
_/ / #
(__/ #
##
_ _ _ #
( \| |/ )#
\ _ / #
(_ (_) _)#
/ \ #
(_/|_|\_)#
##
#
_ #
_| |_ #
(_ _)#
|_| #
#
##
#
#
#
#
_ #
( )#
|/ ##
#
#
___ #
(___)#
#
#
##
#
#
#
#
_ #
(_)#
##
_ #
| |#
/ / #
/ / #
/ / #
|_| #
##
______ #
/ __ |#
| | //| |#
| |// | |#
| /__| |#
\_____/ #
##
__ #
/ |#
/_/ |#
| |#
| |#
|_|#
##
______ #
(_____ \ #
____) )#
/_____/ #
_______ #
(_______)#
##
________#
(_______/#
____ #
(___ \ #
_____) )#
(______/ #
##
__ #
/ / #
/ /____ #
|___ _)#
| | #
|_| #
##
_______ #
(_______)#
______ #
(_____ \ #
_____) )#
(______/ #
##
__ #
/ / #
/ /_ #
/ __ \ #
( (__) )#
\____/ #
##
_______ #
(_______)#
_ #
/ ) #
/ / #
(_/ #
##
_____ #
/ ___ \ #
( ( ) )#
> > < < #
( (___) )#
\_____/ #
##
____ #
/ __ \ #
( (__) )#
\__ / #
/ / #
/_/ #
##
#
#
_ #
(_)#
_ #
(_)#
##
#
#
_ #
(_)#
_ #
( )#
|/ ##
#
_ _ #
/ )/ )#
( (( ( #
\_)\_)#
#
##
#
___ #
(___)#
___ #
(___)#
#
##
#
_ _ #
( \( \ #
) )) )#
(_/(_/ #
#
##
____ #
(___ \ #
) )#
/_/ #
_ #
(_) #
##
$ $ #
$ $ #
$ $ #
$ _|_$ #
$__ | $ #
$(_/|_/|_/$#
$ $ ##
#
/\ #
/ \ #
/ /\ \ #
| |__| |#
|______|#
##
______ #
(____ \ #
____) )#
| __ ( #
| |__) )#
|______/ #
##
______ #
/ _____)#
| / #
| | #
| \_____ #
\______)#
##
_____ #
(____ \ #
_ \ \ #
| | | |#
| |__/ / #
|_____/ #
##
_______ #
(_______)#
_____ #
| ___) #
| |_____ #
|_______)#
##
_______ #
(_______)#
_____ #
| ___) #
| | #
|_| #
##
______ #
/ _____)#
| / ___ #
| | (___)#
| \____/|#
\_____/ #
##
_ _ #
| | | |#
| |__ | |#
| __)| |#
| | | |#
|_| |_|#
##
_____ #
(_____)#
_ #
| | #
_| |_ #
(_____)#
##
_____ #
(_____)#
_ #
| | #
___| | #
(____/ #
##
_ _ #
| | / )#
| | / / #
| |< < #
| | \ \ #
|_| \_)#
##
_ #
| | #
| | #
| | #
| |_____ #
|_______)#
##
______ #
| ___ \ #
| | _ | |#
| || || |#
| || || |#
|_||_||_|#
##
______ #
| ___ \ #
| | | |#
| | | |#
| | | |#
|_| |_|#
##
_____ #
/ ___ \ #
| | | |#
| | | |#
| |___| |#
\_____/ #
##
______ #
(_____ \ #
_____) )#
| ____/ #
| | #
|_| #
##
_____ #
/ ___ \ #
| | | |#
| | |_|#
\ \____ #
\_____)#
##
______ #
(_____ \ #
_____) )#
(_____ ( #
| |#
|_|#
##
_ #
| | #
\ \ #
\ \ #
_____) )#
(______/ #
##
_______ #
(_______)#
_ #
| | #
| |_____ #
\______)#
##
_ _ #
| | | |#
| | | |#
| | | |#
| |___| |#
\______|#
##
_ _ #
| | | |#
| | | |#
\ \/ / #
\ / #
\/ #
##
_ _ _ #
| || || |#
| || || |#
| ||_|| |#
| |___| |#
\______|#
##
_ _ #
\ \ / /#
\ \/ / #
) ( #
/ /\ \ #
/_/ \_\#
##
_ _ #
| | | |#
| |___| |#
\_____/ #
___ #
(___) #
##
_______ #
(_______)#
__ #
/ / #
/ /____ #
(_______)#
##
___ #
| _)#
| | #
| | #
| |_ #
|___)#
##
_ #
| | #
\ \ #
\ \ #
\ \ #
|_|#
##
___ #
(_ |#
| |#
| |#
_| |#
(___|#
##
/\ #
//\\ #
(____)#
#
#
#
##
#
#
#
#
_______ #
(_______)#
##
_ #
( )#
\|#
#
#
#
##
#
#
____ #
/ _ |#
( ( | |#
\_||_|#
##
_ #
| | #
| | _ #
| || \ #
| |_) )#
|____/ #
##
#
#
____ #
/ ___)#
( (___ #
\____)#
##
_ #
| |#
_ | |#
/ || |#
( (_| |#
\____|#
##
#
#
____ #
/ _ )#
( (/ / #
\____)#
##
___ #
/ __)#
| |__ #
| __)#
| | #
|_| #
##
#
#
____ #
/ _ |#
( ( | |#
\_|| |#
(_____|##
_ #
| | #
| | _ #
| || \ #
| | | |#
|_| |_|#
##
_ #
(_)#
_ #
| |#
| |#
|_|#
##
_ #
(_)#
_ #
| |#
| |#
_| |#
(__/ ##
_ #
| | #
| | _ #
| | / )#
| |< ( #
|_| \_)#
##
_ #
| |#
| |#
| |#
| |#
|_|#
##
#
#
____ #
| \ #
| | | |#
|_|_|_|#
##
#
#
____ #
| _ \ #
| | | |#
|_| |_|#
##
#
#
___ #
/ _ \ #
| |_| |#
\___/ #
##
#
#
____ #
| _ \ #
| | | |#
| ||_/ #
|_| ##
#
#
____ #
/ _ |#
| | | |#
\_|| |#
|_|##
#
#
____ #
/ ___)#
| | #
|_| #
##
#
#
___ #
/___)#
|___ |#
(___/ #
##
#
_ #
| |_ #
| _) #
| |__ #
\___)#
##
#
#
_ _ #
| | | |#
| |_| |#
\____|#
##
#
#
_ _ #
| | | |#
\ V / #
\_/ #
##
#
#
_ _ _ #
| | | |#
| | | |#
\____|#
##
#
#
_ _ #
( \ / )#
) X ( #
(_/ \_)#
##
#
#
_ _ #
| | | |#
| |_| |#
\__ |#
(____/ ##
#
#
_____ #
(___ )#
/ __/ #
(_____)#
##
__ #
/ _)#
| | #
( ( #
| |_ #
\__)#
##
_ #
| |#
|_|#
_ #
| |#
|_|#
##
__ #
(_ \ #
| | #
) )#
_| | #
(__/ #
##
__ _ #
/ \/ )#
(_/\__/ #
#
#
#
##
_ _ #
(_) _ (_)#
/ \ #
/ _ \ #
/ /_\ \ #
|_______|#
##
_ _ #
(_)___(_)#
/ ___ \ #
| | | |#
| |___| |#
\_____/ #
##
_ _ #
(_) (_)#
_ _ #
| | | |#
| |___| |#
\______|#
##
_ _ #
(_) (_)#
____ #
/ _ |#
( ( | |#
\_||_|#
##
_ _ #
(_) (_)#
___ #
/ _ \ #
| |_| |#
\___/ #
##
_ _ #
(_) (_)#
_ _ #
| | | |#
| |_| |#
\____|#
##
___ #
/ _ \ #
| | ) )#
| |< ( #
| | ) )#
|_|(_/ #
##
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"F A B wC","8":"K D E"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 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","8":"6 7 8 9 TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB 0C 1C","194":"sB tB"},D:{"1":"0 1 2 3 4 5 hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R 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","8":"J ZB K D E F A B","257":"6 7 8 9 aB AB BB CB DB EB FB bB cB dB eB fB gB","769":"C L M G N O P"},E:{"1":"C L M G OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","8":"J ZB 2C ZC 3C","257":"K D E F A 4C 5C 6C","1025":"B aC NC"},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","2":"C NC uC JD OC","8":"F B FD GD HD ID"},G:{"1":"E MD ND OD PD QD 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","8":"ZC KD vC LD","1025":"RD SD TD"},H:{"8":"hD"},I:{"1":"J I lD vC mD nD","8":"TC iD jD kD"},J:{"1":"A","8":"D"},K:{"1":"H","8":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"Details & Summary elements",D:true};
@@ -0,0 +1 @@
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n="undefined"!=typeof globalThis?globalThis:n||self).MotionUtils={})}(this,function(n){"use strict";function t(n,t){-1===n.indexOf(t)&&n.push(t)}function e(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}const i=(n,t,e)=>e>t?t:e<n?n:e;let s=()=>{};const o=n=>n,r=(n,t)=>e=>t(n(e));const c=new Set;const u=(n,t,e)=>{const i=t-n;return((e-n)%i+i)%i+n},a=(n,t,e)=>(((1-3*e+3*t)*n+(3*e-6*t))*n+3*t)*n;function f(n,t,e,i){if(n===t&&e===i)return o;const s=t=>function(n,t,e,i,s){let o,r,c=0;do{r=t+(e-t)/2,o=a(r,i,s)-n,o>0?e=r:t=r}while(Math.abs(o)>1e-7&&++c<12);return r}(t,0,1,n,e);return n=>0===n||1===n?n:a(s(n),t,i)}const l=n=>t=>t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2,p=n=>t=>1-n(1-t),d=f(.33,1.53,.69,.99),h=p(d),g=l(h),b=n=>(n*=2)<1?.5*h(n):.5*(2-Math.pow(2,-10*(n-1))),m=n=>1-Math.sin(Math.acos(n)),O=p(m),y=l(m),I=f(.42,0,1,1),M=f(0,0,.58,1),v=f(.42,0,.58,1);const S=n=>Array.isArray(n)&&"number"!=typeof n[0];const w=n=>Array.isArray(n)&&"number"==typeof n[0],k={linear:o,easeIn:I,easeInOut:v,easeOut:M,circIn:m,circInOut:y,circOut:O,backIn:h,backInOut:g,backOut:d,anticipate:b};n.MotionGlobalConfig={},n.SubscriptionManager=class{constructor(){this.subscriptions=[]}add(n){return t(this.subscriptions,n),()=>e(this.subscriptions,n)}notify(n,t,e){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](n,t,e);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(n,t,e)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},n.addUniqueItem=t,n.anticipate=b,n.backIn=h,n.backInOut=g,n.backOut=d,n.circIn=m,n.circInOut=y,n.circOut=O,n.clamp=i,n.cubicBezier=f,n.easeIn=I,n.easeInOut=v,n.easeOut=M,n.easingDefinitionToFunction=n=>{if(w(n)){n.length;const[t,e,i,s]=n;return f(t,e,i,s)}return"string"==typeof n?k[n]:n},n.getEasingForSegment=function(n,t){return S(n)?n[u(0,n.length,t)]:n},n.hasWarned=function(n){return c.has(n)},n.invariant=s,n.isBezierDefinition=w,n.isEasingArray=S,n.isNumericalString=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),n.isObject=function(n){return"object"==typeof n&&null!==n},n.isZeroValueString=n=>/^0[^.\s]+$/u.test(n),n.memo=function(n){let t;return()=>(void 0===t&&(t=n()),t)},n.millisecondsToSeconds=n=>n/1e3,n.mirrorEasing=l,n.moveItem=function([...n],t,e){const i=t<0?n.length+t:t;if(i>=0&&i<n.length){const i=e<0?n.length+e:e,[s]=n.splice(t,1);n.splice(i,0,s)}return n},n.noop=o,n.pipe=(...n)=>n.reduce(r),n.progress=(n,t,e)=>{const i=t-n;return 0===i?1:(e-n)/i},n.removeItem=e,n.reverseEasing=p,n.secondsToMilliseconds=n=>1e3*n,n.steps=function(n,t="end"){return e=>{const s=(e="end"===t?Math.min(e,.999):Math.max(e,.001))*n,o="end"===t?Math.floor(s):Math.ceil(s);return i(0,1,o/n)}},n.velocityPerSecond=function(n,t){return t?n*(1e3/t):0},n.warnOnce=function(n,t,e){n||c.has(t)||(console.warn(function(n,t){return t?`${n}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:n}(t,e)),c.add(t))},n.warning=()=>{},n.wrap=u});
@@ -0,0 +1,7 @@
import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
/**
* Contains all of `recommended` along with additional recommended rules that require type information.
* @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked}
*/
declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
export default _default;
@@ -0,0 +1 @@
{"version":3,"names":["_t","require","_index","isIdentifier","_params","node","idNode","parentNode","print","typeParameters","nameInfo","_getFuncIdName","call","sourceIdentifierName","name","pos","token","_parameters","params","noLineTerminator","type","returnType","_noLineTerminator","parameters","endToken","exit","enterDelimited","trailingComma","shouldPrintTrailingComma","paramLength","length","i","_param","undefined","space","parameter","printJoin","decorators","optional","typeAnnotation","_methodHead","kind","key","word","async","generator","computed","_predicate","noLineTerminatorAfter","predicate","_functionHead","parent","format","preserveFormat","_endsWithInnerRaw","id","FunctionExpression","body","ArrowFunctionExpression","_shouldPrintArrowParamsParens","printInnerComments","tokenContext","TokenContext","arrowBody","_firstParam$leadingCo","_firstParam$trailingC","firstParam","leadingComments","trailingComments","tokenMap","loc","findMatching","arrowToken","start","line","retainLines","parentType","left","_id$loc","_id$loc2","identifierName","_id$loc3","_id$loc4","value"],"sources":["../../src/generators/methods.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport type * as t from \"@babel/types\";\nimport { isIdentifier, type ParentMaps } from \"@babel/types\";\nimport { TokenContext } from \"../node/index.ts\";\n\ntype ParentsOf<T extends t.Node> = ParentMaps[T[\"type\"]];\n\nexport function _params(\n this: Printer,\n node: t.Function | t.TSDeclareMethod | t.TSDeclareFunction,\n idNode: t.Expression | t.PrivateName | null | undefined,\n parentNode?: ParentsOf<typeof node>,\n) {\n this.print(node.typeParameters);\n\n const nameInfo = _getFuncIdName.call(this, idNode, parentNode);\n if (nameInfo) {\n this.sourceIdentifierName(nameInfo.name, nameInfo.pos);\n }\n\n this.token(\"(\");\n this._parameters(node.params, \")\");\n\n const noLineTerminator = node.type === \"ArrowFunctionExpression\";\n this.print(node.returnType, noLineTerminator);\n\n this._noLineTerminator = noLineTerminator;\n}\n\nexport function _parameters(\n this: Printer,\n parameters: t.Function[\"params\"],\n endToken: string,\n) {\n const exit = this.enterDelimited();\n\n const trailingComma = this.shouldPrintTrailingComma(endToken);\n\n const paramLength = parameters.length;\n for (let i = 0; i < paramLength; i++) {\n this._param(parameters[i]);\n\n if (trailingComma || i < paramLength - 1) {\n this.token(\",\", undefined, i);\n this.space();\n }\n }\n\n this.token(endToken);\n exit();\n}\n\nexport function _param(\n this: Printer,\n parameter: t.Identifier | t.RestElement | t.Pattern | t.TSParameterProperty,\n) {\n // @ts-expect-error decorators is not in VoidPattern\n this.printJoin(parameter.decorators);\n this.print(parameter);\n if (\n // @ts-expect-error optional is not in TSParameterProperty\n parameter.optional\n ) {\n this.token(\"?\"); // TS / flow\n }\n\n this.print(\n // @ts-expect-error typeAnnotation is not in TSParameterProperty\n parameter.typeAnnotation,\n ); // TS / flow\n}\n\nexport function _methodHead(this: Printer, node: t.Method | t.TSDeclareMethod) {\n const kind = node.kind;\n const key = node.key;\n\n if (kind === \"get\" || kind === \"set\") {\n this.word(kind);\n this.space();\n }\n\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n\n if (\n kind === \"method\" ||\n // @ts-expect-error Fixme: kind: \"init\" is not defined\n kind === \"init\"\n ) {\n if (node.generator) {\n this.token(\"*\");\n }\n }\n\n if (node.computed) {\n this.token(\"[\");\n this.print(key);\n this.token(\"]\");\n } else {\n this.print(key);\n }\n\n if (\n // @ts-expect-error optional is not in ObjectMethod\n node.optional\n ) {\n // TS\n this.token(\"?\");\n }\n\n this._params(\n node,\n node.computed && node.key.type !== \"StringLiteral\" ? undefined : node.key,\n );\n}\n\nexport function _predicate(\n this: Printer,\n node:\n | t.FunctionDeclaration\n | t.FunctionExpression\n | t.ArrowFunctionExpression,\n noLineTerminatorAfter?: boolean,\n) {\n if (node.predicate) {\n if (!node.returnType) {\n this.token(\":\");\n }\n this.space();\n this.print(node.predicate, noLineTerminatorAfter);\n }\n}\n\nexport function _functionHead(\n this: Printer,\n node: t.FunctionDeclaration | t.FunctionExpression | t.TSDeclareFunction,\n parent: ParentsOf<typeof node>,\n) {\n if (node.async) {\n this.word(\"async\");\n if (!this.format.preserveFormat) {\n // We prevent inner comments from being printed here,\n // so that they are always consistently printed in the\n // same place regardless of the function type.\n this._endsWithInnerRaw = false;\n }\n this.space();\n }\n this.word(\"function\");\n if (node.generator) {\n if (!this.format.preserveFormat) {\n // We prevent inner coLine truncated
@@ -0,0 +1 @@
{"version":3,"names":["_matchesPattern","require","buildMatchMemberExpression","match","allowPartial","parts","split","member","matchesPattern"],"sources":["../../src/validators/buildMatchMemberExpression.ts"],"sourcesContent":["import matchesPattern from \"./matchesPattern.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Build a function that when called will return whether or not the\n * input `node` `MemberExpression` matches the input `match`.\n *\n * For example, given the match `React.createClass` it would match the\n * parsed nodes of `React.createClass` and `React[\"createClass\"]`.\n */\nexport default function buildMatchMemberExpression(\n match: string,\n allowPartial?: boolean,\n) {\n const parts = match.split(\".\");\n\n return (member: t.Node) => matchesPattern(member, parts, allowPartial);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAUe,SAASC,0BAA0BA,CAChDC,KAAa,EACbC,YAAsB,EACtB;EACA,MAAMC,KAAK,GAAGF,KAAK,CAACG,KAAK,CAAC,GAAG,CAAC;EAE9B,OAAQC,MAAc,IAAK,IAAAC,uBAAc,EAACD,MAAM,EAAEF,KAAK,EAAED,YAAY,CAAC;AACxE","ignoreList":[]}
@@ -0,0 +1 @@
{"name":"safe-buffer","version":"5.2.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532089521,"integrity":"sha512-7yM/jbYJtwJeLgJzVe4LXntltTdQZBLKGk2V508r4v4oTDo/o2y52F29GjX+ZQ/hTeW02TqwcfICTB/Iz0BzDg==","mode":420,"size":1081},"index.js":{"checkedAt":1794532089522,"integrity":"sha512-srPvlBqNdkgPUZtozQXs8KrOYXosQU8+fTdaWXGLBvbnv4jvOE8+QAZCQxwpa/QA+ABI5K2O+5OGDkHWl/M3sQ==","mode":420,"size":1670},"package.json":{"checkedAt":1794532089522,"integrity":"sha512-SWlFOE7ukgmYxsPXSZ/MvGezT5AN83CCACsQiwUyg3AK61b5xvLZjaZiLsTP11sScU0JNMCbT0ep5QMwC5pHfQ==","mode":420,"size":1057},"README.md":{"checkedAt":1794532089522,"integrity":"sha512-QYUyeTTLQuhJXaRRxvwaPLX9Tj5ckaRrDAfAxKScA++GIjMuDEQdANy17N6dKT52ogvcap+mqm5xPG8q4Rpo/Q==","mode":420,"size":19555},"index.d.ts":{"checkedAt":1794532089522,"integrity":"sha512-5CDG8qFWBd6Tj3eghUU+bA6EtiqudkCqe/DldlNPawf9787qFMsnc+mn+wQohbW9EI75jpAlijfT6QcwfJ/GdA==","mode":420,"size":8738}}}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=isNotParentBindingConstraintsWithTag.spec.d.ts.map
@@ -0,0 +1,47 @@
{
"name": "redent",
"version": "4.0.0",
"description": "Strip redundant indentation and indent the string",
"license": "MIT",
"repository": "sindresorhus/redent",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"engines": {
"node": ">=12"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"string",
"strip",
"trim",
"indent",
"indentation",
"add",
"reindent",
"normalize",
"remove",
"whitespace",
"space"
],
"dependencies": {
"indent-string": "^5.0.0",
"strip-indent": "^4.0.0"
},
"devDependencies": {
"ava": "^3.15.0",
"tsd": "^0.14.0",
"xo": "^0.39.1"
}
}
@@ -0,0 +1,29 @@
/*
Fraction.js v5.0.0 10/1/2024
https://raw.org/article/rational-numbers-in-javascript/
Copyright (c) 2024, Robert Eisele (https://raw.org/)
Licensed under the MIT license.
*/
const Fraction = require('fraction.js');
// Calculates (a/b)^(c/d) if result is rational
// Derivation: https://raw.org/book/analysis/rational-numbers/
function root(a, b, c, d) {
// Initial estimate
let x = Fraction(100 * (Math.floor(Math.pow(a / b, c / d)) || 1), 100);
const abc = Fraction(a, b).pow(c);
for (let i = 0; i < 30; i++) {
const n = abc.mul(x.pow(1 - d)).sub(x).div(d).add(x)
if (x.n === n.n && x.d === n.d) {
return n;
}
x = n;
}
return null;
}
root(18, 2, 1, 2); // 3/1
@@ -0,0 +1,148 @@
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var regexTester = require('safe-regex-test');
var Get = require('./Get');
var IsArray = require('./IsArray');
var min = require('./min');
var StringIndexOf = require('./StringIndexOf');
var StringToNumber = require('./StringToNumber');
var substring = require('./substring');
var ToString = require('./ToString');
var every = require('../helpers/every');
var isPrefixOf = require('../helpers/isPrefixOf');
var isStringOrUndefined = require('../helpers/isStringOrUndefined');
var startsWithDollarDigit = regexTester(/^\$[0-9]/);
var startsWithDollarTwoDigit = regexTester(/^\$[0-9][0-9]/);
// http://www.ecma-international.org/ecma-262/15.0/#sec-getsubstitution
// eslint-disable-next-line max-statements, max-params, max-lines-per-function
module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacementTemplate) {
if (typeof matched !== 'string') {
throw new $TypeError('Assertion failed: `matched` must be a String');
}
if (typeof str !== 'string') {
throw new $TypeError('Assertion failed: `str` must be a String');
}
if (!isInteger(position) || position < 0) {
throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, got ' + inspect(position));
}
if (!IsArray(captures) || !every(captures, isStringOrUndefined)) {
throw new $TypeError('Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got ' + inspect(captures));
}
if (typeof namedCaptures !== 'undefined' && !isObject(namedCaptures)) {
throw new $TypeError('Assertion failed: `namedCaptures` must be `undefined` or an Object');
}
if (typeof replacementTemplate !== 'string') {
throw new $TypeError('Assertion failed: `replacementTemplate` must be a String');
}
var stringLength = str.length; // step 1
if (position > stringLength) {
throw new $TypeError('Assertion failed: position > stringLength, got ' + inspect(position)); // step 2
}
var templateRemainder = replacementTemplate; // step 3
var result = ''; // step 4
while (templateRemainder !== '') { // step 5
// 5.a NOTE: The following steps isolate ref (a prefix of templateRemainder), determine refReplacement (its replacement), and then append that replacement to result.
var ref, refReplacement, capture;
if (isPrefixOf('$$', templateRemainder)) { // step 5.b
ref = '$$'; // step 5.b.i
refReplacement = '$'; // step 5.b.ii
} else if (isPrefixOf('$`', templateRemainder)) { // step 5.c
ref = '$`'; // step 5.c.i
refReplacement = substring(str, 0, position); // step 5.c.ii
} else if (isPrefixOf('$&', templateRemainder)) { // step 5.d
ref = '$&'; // step 5.d.i
refReplacement = matched; // step 5.d.ii
} else if (isPrefixOf('$\'', templateRemainder)) { // step 5.e
ref = '$\''; // step 5.e.i
var matchLength = matched.length; // step 5.e.ii
var tailPos = position + matchLength; // step 5.e.iii
refReplacement = substring(str, min(tailPos, stringLength)); // step 5.e.iv
// 5.e.v NOTE: tailPos can exceed stringLength only if this abstract operation was invoked by a call to the intrinsic @@replace method of %RegExp.prototype% on an object whose "exec" property is not the intrinsic %RegExp.prototype.exec%.
} else if (startsWithDollarDigit(templateRemainder)) { // step 5.f
var digitCount = startsWithDollarTwoDigit(templateRemainder) ? 2 : 1; // step 5.f.i
var digits = substring(templateRemainder, 1, 1 + digitCount); // step 5.f.ii
var index = StringToNumber(digits); // step 5.f.iii
if (index < 0 || index > 99) {
throw new $TypeError('Assertion failed: `index` must be >= 0 and <= 99'); // step 5.f.iv
}
var captureLen = captures.length; // step 5.f.v
if (index > captureLen && digitCount === 2) { // step 5.f.vi
// 1. NOTE: When a two-digit replacement pattern specifies an index exceeding the count of capturing groups, it is treated as a one-digit replacement pattern followed by a literal digit.
digitCount = 1; // step 5.f.vi.2
digits = substring(digits, 0, 1); // step 5.f.vi.3
index = StringToNumber(digits); // step 5.f.vi.4
}
ref = substring(templateRemainder, 0, 1 + digitCount); // step 5.f.vii
if (1 <= index && index <= captureLen) { // step 5.f.viii
capture = captures[index - 1]; // step 5.f.viii.1
if (typeof capture === 'undefined') { // step 5.f.viii.2
refReplacement = ''; // step 5.f.viii.2.a
} else { // step 5.f.viii.3
refReplacement = capture; // step 5.f.viii.3.a
}
} else { // step 5.f.ix
refReplacement = ref; // step 5.f.ix.1
}
} else if (isPrefixOf('$<', templateRemainder)) { // step 5.g
var gtPos = StringIndexOf(templateRemainder, '>', 0); // step 5.g.i
if (!(gtPos > -1) || typeof namedCaptures === 'undefined') { // step 5.g.ii
ref = '$<'; // step 5.g.ii.1
refReplacement = ref; // step 5.g.ii.2
} else { // step 5.g.iii
ref = substring(templateRemainder, 0, gtPos + 1); // step 5.g.iii.1
var groupName = substring(templateRemainder, 2, gtPos); // step 5.g.iii.2
if (!isObject(namedCaptures)) {
throw new $TypeError('Assertion failed: Type(namedCaptures) is not Object'); // step 5.g.iii.3
}
capture = Get(namedCaptures, groupName); // step 5.g.iii.4
if (typeof capture === 'undefined') { // step 5.g.iii.5
refReplacement = ''; // step 5.g.iii.5.a
} else { // step 5.g.iii.6
refReplacement = ToString(capture); // step 5.g.iii.6.a
}
}
} else { // step 5.h
ref = substring(templateRemainder, 0, 1); // step 5.h.i
refReplacement = ref; // step 5.h.ii
}
var refLength = ref.length; // step 5.i
templateRemainder = substring(templateRemainder, refLength); // step 5.j
result += refReplacement; // step 5.k
}
return result; // step 6
};
@@ -0,0 +1,79 @@
import type { Formattable } from '../blot/abstract/blot.js';
import Registry from '../registry.js';
import Scope from '../scope.js';
import Attributor from './attributor.js';
import ClassAttributor from './class.js';
import StyleAttributor from './style.js';
class AttributorStore {
private attributes: { [key: string]: Attributor } = {};
private domNode: HTMLElement;
constructor(domNode: HTMLElement) {
this.domNode = domNode;
this.build();
}
public attribute(attribute: Attributor, value: any): void {
// verb
if (value) {
if (attribute.add(this.domNode, value)) {
if (attribute.value(this.domNode) != null) {
this.attributes[attribute.attrName] = attribute;
} else {
delete this.attributes[attribute.attrName];
}
}
} else {
attribute.remove(this.domNode);
delete this.attributes[attribute.attrName];
}
}
public build(): void {
this.attributes = {};
const blot = Registry.find(this.domNode);
if (blot == null) {
return;
}
const attributes = Attributor.keys(this.domNode);
const classes = ClassAttributor.keys(this.domNode);
const styles = StyleAttributor.keys(this.domNode);
attributes
.concat(classes)
.concat(styles)
.forEach((name) => {
const attr = blot.scroll.query(name, Scope.ATTRIBUTE);
if (attr instanceof Attributor) {
this.attributes[attr.attrName] = attr;
}
});
}
public copy(target: Formattable): void {
Object.keys(this.attributes).forEach((key) => {
const value = this.attributes[key].value(this.domNode);
target.format(key, value);
});
}
public move(target: Formattable): void {
this.copy(target);
Object.keys(this.attributes).forEach((key) => {
this.attributes[key].remove(this.domNode);
});
this.attributes = {};
}
public values(): { [key: string]: any } {
return Object.keys(this.attributes).reduce(
(attributes: { [key: string]: any }, name: string) => {
attributes[name] = this.attributes[name].value(this.domNode);
return attributes;
},
{},
);
}
}
export default AttributorStore;
@@ -0,0 +1,64 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _createForOfIteratorHelper;
var _unsupportedIterableToArray = require("./unsupportedIterableToArray.js");
function _createForOfIteratorHelper(o, allowArrayLike) {
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
if (!it) {
if (Array.isArray(o) || (it = (0, _unsupportedIterableToArray.default)(o)) || allowArrayLike && o && typeof o.length === "number") {
if (it) o = it;
var i = 0;
var F = function () {};
return {
s: F,
n: function () {
if (i >= o.length) {
return {
done: true
};
}
return {
done: false,
value: o[i++]
};
},
e: function (e) {
throw e;
},
f: F
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
var normalCompletion = true,
didErr = false,
err;
return {
s: function () {
it = it.call(o);
},
n: function () {
var step = it.next();
normalCompletion = step.done;
return step;
},
e: function (e) {
didErr = true;
err = e;
},
f: function () {
try {
if (!normalCompletion && it["return"] != null) {
it["return"]();
}
} finally {
if (didErr) throw err;
}
}
};
}
//# sourceMappingURL=createForOfIteratorHelper.js.map
@@ -0,0 +1,20 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function curry(fn) {
return function curried() {
var _this = this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return args.length >= fn.length ? fn.apply(this, args) : function () {
for (var _len2 = arguments.length, nextArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
nextArgs[_key2] = arguments[_key2];
}
return curried.apply(_this, [].concat(args, nextArgs));
};
};
}
exports.default = curry;
@@ -0,0 +1,16 @@
import { __decorate } from "tslib";
import { AlgorithmIdentifier } from "@peculiar/asn1-x509";
import { AsnProp, OctetString } from "@peculiar/asn1-schema";
export class DigestInfo {
constructor(params = {}) {
this.digestAlgorithm = new AlgorithmIdentifier();
this.digest = new OctetString();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AlgorithmIdentifier })
], DigestInfo.prototype, "digestAlgorithm", void 0);
__decorate([
AsnProp({ type: OctetString })
], DigestInfo.prototype, "digest", void 0);
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=PlanServiceNode.js.map
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more