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,5 @@
import { CreateType } from '../create/type.mjs';
import { Kind } from '../symbols/index.mjs';
export function UnionCreate(T, options) {
return CreateType({ [Kind]: 'Union', anyOf: T }, options);
}
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../../src/plugin/models/Plugin.ts"],"sourcesContent":[null],"names":["isPlugin","Symbol","for","Plugin","_container","_context","constructor","container","context","this"],"mappings":"AAGa,MAAAA,EAA0BC,OAAOC,IAC5C,sCAGoBC,EACJH,CAACA,IAAkB,EAEhBI,WACAC,SAEnB,WAAAC,CAAYC,EAAuBC,GACjCC,KAAKL,WAAaG,EAClBE,KAAKJ,SAAWG"}
@@ -0,0 +1,83 @@
import type * as TSESLint from '../../ts-eslint';
import type { TSESTree } from '../../ts-estree';
/**
* Get the proper location of a given function node to report.
*
* @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getfunctionheadlocation}
*/
export declare const getFunctionHeadLocation: (node: TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression, sourceCode: TSESLint.SourceCode) => TSESTree.SourceLocation;
/**
* Get the name and kind of a given function node.
*
* @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getfunctionnamewithkind}
*/
export declare const getFunctionNameWithKind: (node: TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclaration | TSESTree.FunctionExpression, sourceCode?: TSESLint.SourceCode) => string;
/**
* Get the property name of a given property node.
* If the node is a computed property, this tries to compute the property name by the getStringIfConstant function.
*
* @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getpropertyname}
* @returns The property name of the node. If the property name is not constant then it returns `null`.
*/
export declare const getPropertyName: (node: TSESTree.MemberExpression | TSESTree.MethodDefinition | TSESTree.Property | TSESTree.PropertyDefinition, initialScope?: TSESLint.Scope.Scope) => string | null;
/**
* Get the value of a given node if it can decide the value statically.
* If the 2nd parameter `initialScope` was given, this function tries to resolve identifier references which are in the
* given node as much as possible. In the resolving way, it does on the assumption that built-in global objects have
* not been modified.
* For example, it considers `Symbol.iterator`, `Symbol.for('k')`, ` String.raw``hello`` `, and `Object.freeze({a: 1}).a` as static, but `Symbol('k')` is not static.
*
* @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstaticvalue}
* @returns The `{ value: any }` shaped object. The `value` property is the static value. If it couldn't compute the
* static value of the node, it returns `null`.
*/
export declare const getStaticValue: (node: TSESTree.Node, initialScope?: TSESLint.Scope.Scope) => {
value: unknown;
} | null;
/**
* Get the string value of a given node.
* This function is a tiny wrapper of the getStaticValue function.
*
* @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstringifconstant}
*/
export declare const getStringIfConstant: (node: TSESTree.Node, initialScope?: TSESLint.Scope.Scope) => string | null;
/**
* Check whether a given node has any side effect or not.
* The side effect means that it may modify a certain variable or object member. This function considers the node which
* contains the following types as the node which has side effects:
* - `AssignmentExpression`
* - `AwaitExpression`
* - `CallExpression`
* - `ImportExpression`
* - `NewExpression`
* - `UnaryExpression([operator = "delete"])`
* - `UpdateExpression`
* - `YieldExpression`
* - When `options.considerGetters` is `true`:
* - `MemberExpression`
* - When `options.considerImplicitTypeConversion` is `true`:
* - `BinaryExpression([operator = "==" | "!=" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in"])`
* - `MemberExpression([computed = true])`
* - `MethodDefinition([computed = true])`
* - `Property([computed = true])`
* - `UnaryExpression([operator = "-" | "+" | "!" | "~"])`
*
* @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#hassideeffect}
*/
export declare const hasSideEffect: (node: TSESTree.Node, sourceCode: TSESLint.SourceCode, options?: {
considerGetters?: boolean;
considerImplicitTypeConversion?: boolean;
}) => boolean;
export declare const isParenthesized: {
(times: number, node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean;
/**
* Check whether a given node is parenthesized or not.
* This function detects it correctly even if it's parenthesized by specific syntax.
*
* @see {@link https://eslint-community.github.io/eslint-utils/api/ast-utils.html#isparenthesized}
* @returns `true` if the node is parenthesized.
* If `times` was given, it returns `true` only if the node is parenthesized the `times` times.
* For example, `isParenthesized(2, node, sourceCode)` returns true for `((foo))`, but not for `(foo)`.
*/
(node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean;
};
@@ -0,0 +1,526 @@
'use strict';
const fs = require('fs');
const sysPath = require('path');
const { promisify } = require('util');
let fsevents;
try {
fsevents = require('fsevents');
} catch (error) {
if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error);
}
if (fsevents) {
// TODO: real check
const mtch = process.version.match(/v(\d+)\.(\d+)/);
if (mtch && mtch[1] && mtch[2]) {
const maj = Number.parseInt(mtch[1], 10);
const min = Number.parseInt(mtch[2], 10);
if (maj === 8 && min < 16) {
fsevents = undefined;
}
}
}
const {
EV_ADD,
EV_CHANGE,
EV_ADD_DIR,
EV_UNLINK,
EV_ERROR,
STR_DATA,
STR_END,
FSEVENT_CREATED,
FSEVENT_MODIFIED,
FSEVENT_DELETED,
FSEVENT_MOVED,
// FSEVENT_CLONED,
FSEVENT_UNKNOWN,
FSEVENT_FLAG_MUST_SCAN_SUBDIRS,
FSEVENT_TYPE_FILE,
FSEVENT_TYPE_DIRECTORY,
FSEVENT_TYPE_SYMLINK,
ROOT_GLOBSTAR,
DIR_SUFFIX,
DOT_SLASH,
FUNCTION_TYPE,
EMPTY_FN,
IDENTITY_FN
} = require('./constants');
const Depth = (value) => isNaN(value) ? {} : {depth: value};
const stat = promisify(fs.stat);
const lstat = promisify(fs.lstat);
const realpath = promisify(fs.realpath);
const statMethods = { stat, lstat };
/**
* @typedef {String} Path
*/
/**
* @typedef {Object} FsEventsWatchContainer
* @property {Set<Function>} listeners
* @property {Function} rawEmitter
* @property {{stop: Function}} watcher
*/
// fsevents instance helper functions
/**
* Object to hold per-process fsevents instances (may be shared across chokidar FSWatcher instances)
* @type {Map<Path,FsEventsWatchContainer>}
*/
const FSEventsWatchers = new Map();
// Threshold of duplicate path prefixes at which to start
// consolidating going forward
const consolidateThreshhold = 10;
const wrongEventFlags = new Set([
69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912
]);
/**
* Instantiates the fsevents interface
* @param {Path} path path to be watched
* @param {Function} callback called when fsevents is bound and ready
* @returns {{stop: Function}} new fsevents instance
*/
const createFSEventsInstance = (path, callback) => {
const stop = fsevents.watch(path, callback);
return {stop};
};
/**
* Instantiates the fsevents interface or binds listeners to an existing one covering
* the same file tree.
* @param {Path} path - to be watched
* @param {Path} realPath - real path for symlinks
* @param {Function} listener - called when fsevents emits events
* @param {Function} rawEmitter - passes data to listeners of the 'raw' event
* @returns {Function} closer
*/
function setFSEventsListener(path, realPath, listener, rawEmitter) {
let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath;
const parentPath = sysPath.dirname(watchPath);
let cont = FSEventsWatchers.get(watchPath);
// If we've accumulated a substantial number of paths that
// could have been consolidated by watching one directory
// above the current one, create a watcher on the parent
// path instead, so that we do consolidate going forward.
if (couldConsolidate(parentPath)) {
watchPath = parentPath;
}
const resolvedPath = sysPath.resolve(path);
const hasSymlink = resolvedPath !== realPath;
const filteredListener = (fullPath, flags, info) => {
if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath);
if (
fullPath === resolvedPath ||
!fullPath.indexOf(resolvedPath + sysPath.sep)
) listener(fullPath, flags, info);
};
// check if there is already a watcher on a parent path
// modifies `watchPath` to the parent path when it finds a match
let watchedParent = false;
for (const watchedPath of FSEventsWatchers.keys()) {
if (realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep) === 0) {
watchPath = watchedPath;
cont = FSEventsWatchers.get(watchPath);
watchedParent = true;
break;
}
}
if (cont || watchedParent) {
cont.listeners.add(filteredListener);
} else {
cont = {
listeners: new Set([filteredListener]),
rawEmitter,
watcher: createFSEventsInstance(watchPath, (fullPath, flags) => {
if (!cont.listeners.size) return;
if (flags & FSEVENT_FLAG_MUST_SCAN_SUBDIRS) return;
const info = fsevents.getInfo(fullPath, flags);
cont.listeners.forEach(list => {
list(fullPath, flags, info);
});
cont.rawEmitter(info.event, fullPath, info);
})
};
FSEventsWatchers.set(watchPath, cont);
}
// removes this instance's listeners and closes the underlying fsevents
// instance if there are no more listeners left
return () => {
const lst = cont.listeners;
lst.delete(filteredListener);
if (!lst.size) {
FSEventsWatchers.delete(watchPath);
if (cont.watcher) return cont.watcher.stop().then(() => {
cont.rawEmitter = cont.watcher = undefined;
Object.freeze(cont);
});
}
};
}
// Decide whether or not we should start a new higher-level
// parent watcher
const couldConsolidate = (path) => {
let count = 0;
for (const watchPath of FSEventsWatchers.keys()) {
if (watchPath.indexOf(path) === 0) {
count++;
if (count >= consolidateThreshhold) {
return true;
}
}
}
return false;
};
// returns boolean indicating whether fsevents can be used
const canUse = () => fsevents && FSEventsWatchers.size < 128;
// determines subdirectory traversal levels from root to path
const calcDepth = (path, root) => {
let i = 0;
while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++;
return i;
};
// returns boolean indicating whether the fsevents' event info has the same type
// as the one returned by fs.stat
const sameTypes = (info, stats) => (
info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() ||
info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() ||
info.type === FSEVENT_TYPE_FILE && stats.isFile()
)
/**
* @mixin
*/
class FsEventsHandler {
/**
* @param {import('../index').FSWatcher} fsw
*/
constructor(fsw) {
this.fsw = fsw;
}
checkIgnored(path, stats) {
const ipaths = this.fsw._ignoredPaths;
if (this.fsw._isIgnored(path, stats)) {
ipaths.add(path);
if (stats && stats.isDirectory()) {
ipaths.add(path + ROOT_GLOBSTAR);
}
return true;
}
ipaths.delete(path);
ipaths.delete(path + ROOT_GLOBSTAR);
}
addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD;
this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts);
}
async checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
try {
const stats = await stat(path)
if (this.fsw.closed) return;
if (sameTypes(info, stats)) {
this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
} else {
this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
}
} catch (error) {
if (error.code === 'EACCES') {
this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
} else {
this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
}
}
}
handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts) {
if (this.fsw.closed || this.checkIgnored(path)) return;
if (event === EV_UNLINK) {
const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY
// suppress unlink events on never before seen files
if (isDirectory || watchedDir.has(item)) {
this.fsw._remove(parent, item, isDirectory);
}
} else {
if (event === EV_ADD) {
// track new directories
if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path);
if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) {
// push symlinks back to the top of the stack to get handled
const curDepth = opts.depth === undefined ?
undefined : calcDepth(fullPath, realPath) + 1;
return this._addToFsEvents(path, false, true, curDepth);
}
// track new paths
// (other than symlinks being followed, which will be tracked soon)
this.fsw._getWatchedDir(parent).add(item);
}
/**
* @type {'add'|'addDir'|'unlink'|'unlinkDir'}
*/
const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event;
this.fsw._emit(eventName, path);
if (eventName === EV_ADD_DIR) this._addToFsEvents(path, false, true);
}
}
/**
* Handle symlinks encountered during directory scan
* @param {String} watchPath - file/dir path to be watched with fsevents
* @param {String} realPath - real path (in case of symlinks)
* @param {Function} transform - path transformer
* @param {Function} globFilter - path filter in case a glob pattern was provided
* @returns {Function} closer for the watcher instance
*/
_watchWithFsEvents(watchPath, realPath, transform, globFilter) {
if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return;
const opts = this.fsw.options;
const watchCallback = async (fullPath, flags, info) => {
if (this.fsw.closed) return;
if (
opts.depth !== undefined &&
calcDepth(fullPath, realPath) > opts.depth
) return;
const path = transform(sysPath.join(
watchPath, sysPath.relative(watchPath, fullPath)
));
if (globFilter && !globFilter(path)) return;
// ensure directories are tracked
const parent = sysPath.dirname(path);
const item = sysPath.basename(path);
const watchedDir = this.fsw._getWatchedDir(
info.type === FSEVENT_TYPE_DIRECTORY ? path : parent
);
// correct for wrong events emitted
if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) {
if (typeof opts.ignored === FUNCTION_TYPE) {
let stats;
try {
stats = await stat(path);
} catch (error) {}
if (this.fsw.closed) return;
if (this.checkIgnored(path, stats)) return;
if (sameTypes(info, stats)) {
this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
} else {
this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
}
} else {
this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
}
} else {
switch (info.event) {
case FSEVENT_CREATED:
case FSEVENT_MODIFIED:
return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
case FSEVENT_DELETED:
case FSEVENT_MOVED:
return this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
}
}
};
const closer = setFSEventsListener(
watchPath,
realPath,
watchCallback,
this.fsw._emitRaw
);
this.fsw._emitReady();
return closer;
}
/**
* Handle symlinks encountered during directory scan
* @param {String} linkPath path to symlink
* @param {String} fullPath absolute path to the symlink
* @param {Function} transform pre-existing path transformer
* @param {Number} curDepth level of subdirectories traversed to where symlink is
* @returns {Promise<void>}
*/
async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) {
// don't follow the same symlink more than once
if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath)) return;
this.fsw._symlinkPaths.set(fullPath, true);
this.fsw._incrReadyCount();
try {
const linkTarget = await realpath(linkPath);
if (this.fsw.closed) return;
if (this.fsw._isIgnored(linkTarget)) {
return this.fsw._emitReady();
}
this.fsw._incrReadyCount();
// add the linkTarget for watching with a wrapper for transform
// that causes emitted paths to incorporate the link's path
this._addToFsEvents(linkTarget || linkPath, (path) => {
let aliasedPath = linkPath;
if (linkTarget && linkTarget !== DOT_SLASH) {
aliasedPath = path.replace(linkTarget, linkPath);
} else if (path !== DOT_SLASH) {
aliasedPath = sysPath.join(linkPath, path);
}
return transform(aliasedPath);
}, false, curDepth);
} catch(error) {
if (this.fsw._handleError(error)) {
return this.fsw._emitReady();
}
}
}
/**
*
* @param {Path} newPath
* @param {fs.Stats} stats
*/
emitAdd(newPath, stats, processPath, opts, forceAdd) {
const pp = processPath(newPath);
const isDir = stats.isDirectory();
const dirObj = this.fsw._getWatchedDir(sysPath.dirname(pp));
const base = sysPath.basename(pp);
// ensure empty dirs get tracked
if (isDir) this.fsw._getWatchedDir(pp);
if (dirObj.has(base)) return;
dirObj.add(base);
if (!opts.ignoreInitial || forceAdd === true) {
this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats);
}
}
initWatch(realPath, path, wh, processPath) {
if (this.fsw.closed) return;
const closer = this._watchWithFsEvents(
wh.watchPath,
sysPath.resolve(realPath || wh.watchPath),
processPath,
wh.globFilter
);
this.fsw._addPathCloser(path, closer);
}
/**
* Handle added path with fsevents
* @param {String} path file/dir path or glob pattern
* @param {Function|Boolean=} transform converts working path to what the user expects
* @param {Boolean=} forceAdd ensure add is emitted
* @param {Number=} priorDepth Level of subdirectories already traversed.
* @returns {Promise<void>}
*/
async _addToFsEvents(path, transform, forceAdd, priorDepth) {
if (this.fsw.closed) {
return;
}
const opts = this.fsw.options;
const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN;
const wh = this.fsw._getWatchHelpers(path);
// evaluate what is at the path we're being asked to watch
try {
const stats = await statMethods[wh.statMethod](wh.watchPath);
if (this.fsw.closed) return;
if (this.fsw._isIgnored(wh.watchPath, stats)) {
throw null;
}
if (stats.isDirectory()) {
// emit addDir unless this is a glob parent
if (!wh.globFilter) this.emitAdd(processPath(path), stats, processPath, opts, forceAdd);
// don't recurse further if it would exceed depth setting
if (priorDepth && priorDepth > opts.depth) return;
// scan the contents of the dir
this.fsw._readdirp(wh.watchPath, {
fileFilter: entry => wh.filterPath(entry),
directoryFilter: entry => wh.filterDir(entry),
...Depth(opts.depth - (priorDepth || 0))
}).on(STR_DATA, (entry) => {
// need to check filterPath on dirs b/c filterDir is less restrictive
if (this.fsw.closed) {
return;
}
if (entry.stats.isDirectory() && !wh.filterPath(entry)) return;
const joinedPath = sysPath.join(wh.watchPath, entry.path);
const {fullPath} = entry;
if (wh.followSymlinks && entry.stats.isSymbolicLink()) {
// preserve the current depth here since it can't be derived from
// real paths past the symlink
const curDepth = opts.depth === undefined ?
undefined : calcDepth(joinedPath, sysPath.resolve(wh.watchPath)) + 1;
this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth);
} else {
this.emitAdd(joinedPath, entry.stats, processPath, opts, forceAdd);
}
}).on(EV_ERROR, EMPTY_FN).on(STR_END, () => {
this.fsw._emitReady();
});
} else {
this.emitAdd(wh.watchPath, stats, processPath, opts, forceAdd);
this.fsw._emitReady();
}
} catch (error) {
if (!error || this.fsw._handleError(error)) {
// TODO: Strange thing: "should not choke on an ignored watch path" will be failed without 2 ready calls -__-
this.fsw._emitReady();
this.fsw._emitReady();
}
}
if (opts.persistent && forceAdd !== true) {
if (typeof transform === FUNCTION_TYPE) {
// realpath has already been resolved
this.initWatch(undefined, path, wh, processPath);
} else {
let realPath;
try {
realPath = await realpath(wh.watchPath);
} catch (e) {}
this.initWatch(realPath, path, wh, processPath);
}
}
}
}
module.exports = FsEventsHandler;
module.exports.canUse = canUse;
@@ -0,0 +1,38 @@
import {TokenType as tt} from "../parser/tokenizer/types";
/**
* Common method sharing code between CJS and ESM cases, since they're the same here.
*/
export default function shouldElideDefaultExport(
isTypeScriptTransformEnabled,
keepUnusedImports,
tokens,
declarationInfo,
) {
if (!isTypeScriptTransformEnabled || keepUnusedImports) {
return false;
}
const exportToken = tokens.currentToken();
if (exportToken.rhsEndIndex == null) {
throw new Error("Expected non-null rhsEndIndex on export token.");
}
// The export must be of the form `export default a` or `export default a;`.
const numTokens = exportToken.rhsEndIndex - tokens.currentIndex();
if (
numTokens !== 3 &&
!(numTokens === 4 && tokens.matches1AtIndex(exportToken.rhsEndIndex - 1, tt.semi))
) {
return false;
}
const identifierToken = tokens.tokenAtRelativeIndex(2);
if (identifierToken.type !== tt.name) {
return false;
}
const exportedName = tokens.identifierNameForToken(identifierToken);
return (
declarationInfo.typeDeclarations.has(exportedName) &&
!declarationInfo.valueDeclarations.has(exportedName)
);
}
@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Uppercase = Uppercase;
const intrinsic_1 = require("./intrinsic");
/** `[Json]` Intrinsic function to Uppercase LiteralString types */
function Uppercase(T, options = {}) {
return (0, intrinsic_1.Intrinsic)(T, 'Uppercase', options);
}
@@ -0,0 +1,3 @@
import CryptoJS = require("./index");
export = CryptoJS.SHA384;
@@ -0,0 +1,53 @@
import { createRequire } from 'node:module';
import { pathToFileURL } from 'node:url';
const __require = createRequire(import.meta.url);
let inspector;
let session;
/**
* Enables debugging inside `worker_threads` and `child_process`.
* Should be called as early as possible when worker/process has been set up.
*/
function setupInspect(ctx) {
const config = ctx.config;
const isEnabled = config.inspector.enabled;
if (isEnabled) {
inspector = __require("node:inspector");
if (!(inspector.url() !== void 0)) {
inspector.open(config.inspector.port, config.inspector.host, config.inspector.waitForDebugger);
if (config.inspectBrk) {
const firstTestFile = typeof ctx.files[0] === "string" ? ctx.files[0] : ctx.files[0].filepath;
// Stop at first test file
if (firstTestFile) {
session = new inspector.Session();
session.connect();
session.post("Debugger.enable");
session.post("Debugger.setBreakpointByUrl", {
lineNumber: 0,
url: pathToFileURL(firstTestFile)
});
}
}
}
}
const keepOpen = shouldKeepOpen(config);
return function cleanup() {
if (isEnabled && !keepOpen && inspector) {
inspector.close();
session?.disconnect();
}
};
}
function closeInspector(config) {
const keepOpen = shouldKeepOpen(config);
if (inspector && !keepOpen) {
inspector.close();
session?.disconnect();
}
}
function shouldKeepOpen(config) {
// In watch mode the inspector can persist re-runs if isolation is disabled and a single worker is used
return config.watch && config.isolate === false && config.maxWorkers === 1;
}
export { closeInspector as c, setupInspect as s };
@@ -0,0 +1 @@
{"name":"is-date-object","version":"1.1.0","requiresBuild":false,"files":{".editorconfig":{"checkedAt":1794532096675,"integrity":"sha512-gD3iQtgC7ZgFS97pyZqR0FPjMNyRAfat8dipbSL28iiJ6B1MP5dDeDYeEnP5sYMTz8whQIk3E5vltk2kcyJJEQ==","mode":420,"size":286},".eslintrc":{"checkedAt":1794532096783,"integrity":"sha512-B4XMV+N9XaqZZ1qFwZwm90ESTp1/R4d/AMZxuRDM96BDNNu6GB4Nz8OgKDCBkn/4wwY/I36ueAgV+2vzHXrkdg==","mode":420,"size":89},".nycrc":{"checkedAt":1794532096783,"integrity":"sha512-aLxN7EM7vuJGE3vcz8CsQow+RuaR3thZWTHupkykz/8WOXUd8ayX5goRxPe3MCnZ0VVDkuEk8UBkk3NodRfMOg==","mode":420,"size":159},"LICENSE":{"checkedAt":1794532096676,"integrity":"sha512-CWRd82wre8E2D9wfNTwrOCxhLsdU7obtQTc4poEGt1uTk93MEI2QW01sXILetqMRgoYp4EIKQZNHNCQrALOFjw==","mode":420,"size":1082},"index.js":{"checkedAt":1794532096783,"integrity":"sha512-p4cwYgkvRYsitsV0yYIrLGKvggt3eAWgZk+dRrXfYvBHjPjWFu2XwQsKlF60blwQfC9sO4032dK14qoAd81cIg==","mode":420,"size":674},"test/index.js":{"checkedAt":1794532096783,"integrity":"sha512-+BBXT3ZI3T62BCXp2HrFi7Pyr4YfI5fGxkckN3Sn5LbOT6Rycz8nzgyTWJVHGt9K0iGgxu7m3qL4lIo88dG0kg==","mode":420,"size":1275},"package.json":{"checkedAt":1794532096783,"integrity":"sha512-6mCerV2dPTgFes8KFLjbtBjdD/GBycfWCvs0u1yj7OzDTk61ZeoJ7M70gIrB/2xeBsmelpxozUTaSZsZnEbybg==","mode":420,"size":2543},"tsconfig.json":{"checkedAt":1794532096783,"integrity":"sha512-/clyDIiYh9OZxmuhYWf3j372mgFfCsaptDPYauHppddgWQQsCA7lgx9wjaSw6+Mpccc/s1EucOko8jQ2gzB15w==","mode":420,"size":72},"CHANGELOG.md":{"checkedAt":1794532096784,"integrity":"sha512-jr2a0tesh/N5xpRsGfX+02rL20YKeS6YA1cQDs8DmTh5d9K/eG/2rAdXdPCDJouqXAmBGM/8nUB10b8TIYDMaA==","mode":420,"size":15357},"README.md":{"checkedAt":1794532096784,"integrity":"sha512-+pB3ly3RoXwfNWmW4zoZ5k3t2z6YOCv/tkCMM8qQUq5N5Tfj+SZAeT64cIFK5f0ncLst2kW2secx20YI361Llg==","mode":420,"size":1964},"index.d.ts":{"checkedAt":1794532096784,"integrity":"sha512-Pb+BCxf0YIPGTpjpBMnxl+c4E/tHGZoT2onq2CERDCPSOpU4yuEocwLoZpV2Td+YFpgOA0K8+hb8rZbMuGSDVQ==","mode":420,"size":86},".github/FUNDING.yml":{"checkedAt":1794532096784,"integrity":"sha512-jQFs0r5WIaXzAuRV5xkQ5j4U9EhRHiVPUktzsesEnvnUM6zLcYtFIacXZpvyA4lW54cd35G4IpS8ZdkFWXjqvA==","mode":420,"size":585}}}
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _withoutIndex;
function _withoutIndex(iteratee) {
return (value, index, callback) => iteratee(value, callback);
}
module.exports = exports.default;
@@ -0,0 +1,136 @@
# object.assign <sup>[![Version Badge][npm-version-svg]][npm-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][npm-url]
An Object.assign shim. Invoke its "shim" method to shim Object.assign if it is unavailable.
This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s.
Takes a minimum of 2 arguments: `target` and `source`.
Takes a variable sized list of source arguments - at least 1, as many as you want.
Throws a TypeError if the `target` argument is `null` or `undefined`.
Most common usage:
```js
var assign = require('object.assign').getPolyfill(); // returns native method if compliant
/* or */
var assign = require('object.assign/polyfill')(); // returns native method if compliant
```
## Example
```js
var assert = require('assert');
// Multiple sources!
var target = { a: true };
var source1 = { b: true };
var source2 = { c: true };
var sourceN = { n: true };
var expected = {
a: true,
b: true,
c: true,
n: true
};
assign(target, source1, source2, sourceN);
assert.deepEqual(target, expected); // AWESOME!
```
```js
var target = {
a: true,
b: true,
c: true
};
var source1 = {
c: false,
d: false
};
var sourceN = {
e: false
};
var assigned = assign(target, source1, sourceN);
assert.equal(target, assigned); // returns the target object
assert.deepEqual(assigned, {
a: true,
b: true,
c: false,
d: false,
e: false
});
```
```js
/* when Object.assign is not present */
delete Object.assign;
var shimmedAssign = require('object.assign').shim();
/* or */
var shimmedAssign = require('object.assign/shim')();
assert.equal(shimmedAssign, assign);
var target = {
a: true,
b: true,
c: true
};
var source = {
c: false,
d: false,
e: false
};
var assigned = assign(target, source);
assert.deepEqual(Object.assign(target, source), assign(target, source));
```
```js
/* when Object.assign is present */
var shimmedAssign = require('object.assign').shim();
assert.equal(shimmedAssign, Object.assign);
var target = {
a: true,
b: true,
c: true
};
var source = {
c: false,
d: false,
e: false
};
assert.deepEqual(Object.assign(target, source), assign(target, source));
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[npm-url]: https://npmjs.org/package/object.assign
[npm-version-svg]: http://versionbadg.es/ljharb/object.assign.svg
[travis-svg]: https://travis-ci.org/ljharb/object.assign.svg
[travis-url]: https://travis-ci.org/ljharb/object.assign
[deps-svg]: https://david-dm.org/ljharb/object.assign.svg?theme=shields.io
[deps-url]: https://david-dm.org/ljharb/object.assign
[dev-deps-svg]: https://david-dm.org/ljharb/object.assign/dev-status.svg?theme=shields.io
[dev-deps-url]: https://david-dm.org/ljharb/object.assign#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/object.assign.png?downloads=true&stars=true
[license-image]: http://img.shields.io/npm/l/object.assign.svg
[license-url]: LICENSE
[downloads-image]: http://img.shields.io/npm/dm/object.assign.svg
[downloads-url]: http://npm-stat.com/charts.html?package=object.assign
[codecov-image]: https://codecov.io/gh/ljharb/object.assign/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/object.assign/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/object.assign
[actions-url]: https://github.com/ljharb/object.assign/actions
@@ -0,0 +1,123 @@
/*
* 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 {announce} from '@react-aria/live-announcer';
import {GridAria, GridProps, useGrid} from '@react-aria/grid';
import {gridIds} from './utils';
// @ts-ignore
import intlMessages from '../intl/*.json';
import {Key, LayoutDelegate, Rect, RefObject, Size} from '@react-types/shared';
import {mergeProps, useDescription, useId, useUpdateEffect} from '@react-aria/utils';
import {TableKeyboardDelegate} from './TableKeyboardDelegate';
import {tableNestedRows} from '@react-stately/flags';
import {TableState, TreeGridState} from '@react-stately/table';
import {useCollator, useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';
import {useMemo} from 'react';
export interface AriaTableProps extends GridProps {
/** The layout object for the table. Computes what content is visible and how to position and style them. */
layoutDelegate?: LayoutDelegate,
/** @deprecated - Use layoutDelegate instead. */
layout?: DeprecatedLayout
}
interface DeprecatedLayout {
getLayoutInfo(key: Key): DeprecatedLayoutInfo,
getContentSize(): Size,
virtualizer: DeprecatedVirtualizer
}
interface DeprecatedLayoutInfo {
rect: Rect
}
interface DeprecatedVirtualizer {
visibleRect: Rect
}
/**
* Provides the behavior and accessibility implementation for a table component.
* A table displays data in rows and columns and enables a user to navigate its contents via directional navigation keys,
* and optionally supports row selection and sorting.
* @param props - Props for the table.
* @param state - State for the table, as returned by `useTableState`.
* @param ref - The ref attached to the table element.
*/
export function useTable<T>(props: AriaTableProps, state: TableState<T> | TreeGridState<T>, ref: RefObject<HTMLElement | null>): GridAria {
let {
keyboardDelegate,
isVirtualized,
layoutDelegate,
layout
} = props;
// By default, a KeyboardDelegate is provided which uses the DOM to query layout information (e.g. for page up/page down).
// When virtualized, the layout object will be passed in as a prop and override this.
let collator = useCollator({usage: 'search', sensitivity: 'base'});
let {direction} = useLocale();
let disabledBehavior = state.selectionManager.disabledBehavior;
let delegate = useMemo(() => keyboardDelegate || new TableKeyboardDelegate({
collection: state.collection,
disabledKeys: state.disabledKeys,
disabledBehavior,
ref,
direction,
collator,
layoutDelegate,
layout
}), [keyboardDelegate, state.collection, state.disabledKeys, disabledBehavior, ref, direction, collator, layoutDelegate, layout]);
let id = useId(props.id);
gridIds.set(state, id);
let {gridProps} = useGrid({
...props,
id,
keyboardDelegate: delegate
}, state, ref);
// Override to include header rows
if (isVirtualized) {
gridProps['aria-rowcount'] = state.collection.size + state.collection.headerRows.length;
}
if (tableNestedRows() && 'expandedKeys' in state) {
gridProps.role = 'treegrid';
}
let {column, direction: sortDirection} = state.sortDescriptor || {};
let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/table');
let sortDescription = useMemo(() => {
let columnName = state.collection.columns.find(c => c.key === column)?.textValue ?? '';
return sortDirection && column ? stringFormatter.format(`${sortDirection}Sort`, {columnName}) : undefined;
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [sortDirection, column, state.collection.columns]);
let descriptionProps = useDescription(sortDescription);
// Only announce after initial render, tabbing to the table will tell you the initial sort info already
useUpdateEffect(() => {
if (sortDescription) {
announce(sortDescription, 'assertive', 500);
}
}, [sortDescription]);
return {
gridProps: mergeProps(
gridProps,
descriptionProps,
{
// merge sort description with long press information
'aria-describedby': [descriptionProps['aria-describedby'], gridProps['aria-describedby']].filter(Boolean).join(' ')
}
)
};
}
@@ -0,0 +1,152 @@
# jsx-a11y/label-has-associated-control
💼 This rule is enabled in the following configs: ☑️ `recommended`, 🔒 `strict`.
<!-- end auto-generated rule header -->
Enforce that a label tag has a text label and an associated control.
There are two supported ways to associate a label with a control:
- Wrapping a control in a label tag.
- Adding `htmlFor` to a label and assigning it a DOM ID string that indicates an input on the page.
This rule checks that any `label` tag (or an indicated custom component that will output a `label` tag) either (1) wraps an `input` element (or an indicated custom component that will output an `input` tag) or (2) has an `htmlFor` attribute and that the `label` tag has text content.
## How do I resolve this error?
### Case: I just want a text label associated with an input.
The simplest way to achieve an association between a label and an input is to wrap the input in the label.
```jsx
<label>
Surname
<input type="text" />
</label>
```
All modern browsers and assistive technology will associate the label with the control.
### Case: The label is a sibling of the control.
In this case, use `htmlFor` and an ID to associate the controls.
```jsx
<label htmlFor={domId}>Surname</label>
<input type="text" id={domId} />
```
### Case: My label and input components are custom components.
You can configure the rule to be aware of your custom components.
```jsx
<CustomInputLabel label="Surname">
<CustomInput type="text" value={value} />
</CustomInputLabel>
```
And the configuration:
```json
{
"rules": {
"jsx-a11y/label-has-associated-control": [ 2, {
"labelComponents": ["CustomInputLabel"],
"labelAttributes": ["label"],
"controlComponents": ["CustomInput"],
"depth": 3,
}],
}
}
```
### Case: I have two labels for the same input
If the second `label` is in a different part of the HTML, then the second one can only contain `htmlFor` but not nesting. You will probably need eslint override comment on the second label.
```jsx
{/* eslint jsx-a11y/label-has-associated-control: ["error", { assert: "either" } ] */}
<label htmlFor="a">
Username:
</label>
...
<label htmlFor="a">
<input id="a" />
</label>
```
## How to manage IDs of `input`
A common way to think of `id` with libraries like React is, `id`s should be avoided since it must be unique on the page, and components need to be reusable. Hence it is tempted to generate `id` during render-time if `id` is required. *However:*
IDs shouldn't be generated in the browser, so that server and client rendering are deterministic. Render-time uuids aren't just a hack, they're actually broken and should never be used.
To restate, **every ID needs to be deterministic**, on the server and the client, and guaranteed to be unique on the page. EG: For each input, a required ID prop can be passed down from as far up the tree as possible to guarantee uniqueness.
## Rule options
This rule takes one optional object argument of type object:
```json
{
"rules": {
"jsx-a11y/label-has-associated-control": [ 2, {
"labelComponents": ["CustomLabel"],
"labelAttributes": ["inputLabel"],
"controlComponents": ["CustomInput"],
"assert": "both",
"depth": 3,
}],
}
}
```
`labelComponents` is a list of custom React Component names that should be checked for an associated control.
`labelAttributes` is a list of attributes to check on the label component and its children for a label. Use this if you have a custom component that uses a string passed on a prop to render an HTML `label`, for example.
`controlComponents` is a list of custom React Components names that will output an input element. [Glob format](https://linuxhint.com/bash_globbing_tutorial/) is also supported for specifying names (e.g., `Label*` matches `LabelComponent` but not `CustomLabel`, `????Label` matches `LinkLabel` but not `CustomLabel`).
`assert` asserts that the label has htmlFor, a nested label, both or either. Available options: `'htmlFor', 'nesting', 'both', 'either'`.
`depth` (default 2, max 25) is an integer that determines how deep within a `JSXElement` label the rule should look for text content or an element with a label to determine if the `label` element will have an accessible label.
### Fail
```jsx
function Foo(props) {
return <label {...props} />
}
```
### Succeed
```jsx
function Foo(props) {
const {
htmlFor,
...otherProps
} = props;
return <label htmlFor={htmlFor} {...otherProps} />
}
```
### Fail
```jsx
<input type="text" />
<label>Surname</label>
```
### Succeed
```jsx
<label>
<input type="text" />
Surname
</label>
```
## Accessibility guidelines
- [WCAG 1.3.1](https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships)
- [WCAG 3.3.2](https://www.w3.org/WAI/WCAG21/Understanding/labels-or-instructions)
- [WCAG 4.1.2](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value)
@@ -0,0 +1,27 @@
import {createFocusManager as $9bf71ea28793e738$export$c5251b9e124bf29, FocusScope as $9bf71ea28793e738$export$20e40289641fbbb6, getFocusableTreeWalker as $9bf71ea28793e738$export$2d6ec8fc375ceafa, isElementInChildOfActiveScope as $9bf71ea28793e738$export$1258395f99bf9cbf, isFocusable as $9bf71ea28793e738$export$4c063cf1350e6fed, useFocusManager as $9bf71ea28793e738$export$10c5169755ce7bd7} from "./FocusScope.mjs";
import {FocusRing as $907718708eab68af$export$1a38b4ad7f578e1d} from "./FocusRing.mjs";
import {FocusableProvider as $e6afbd83fe6ebbd2$export$13f3202a3e5ddd5, useFocusable as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c} from "./useFocusable.mjs";
import {useFocusRing as $f7dceffc5ad7768b$export$4e328f61c538687f} from "./useFocusRing.mjs";
import {focusSafely as $6a99195332edec8b$export$80f3e147d781571c} from "./focusSafely.mjs";
import {useHasTabbableChild as $83013635b024ae3d$export$eac1895992b9f3d6} from "./useHasTabbableChild.mjs";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export {$9bf71ea28793e738$export$20e40289641fbbb6 as FocusScope, $9bf71ea28793e738$export$10c5169755ce7bd7 as useFocusManager, $9bf71ea28793e738$export$2d6ec8fc375ceafa as getFocusableTreeWalker, $9bf71ea28793e738$export$c5251b9e124bf29 as createFocusManager, $9bf71ea28793e738$export$1258395f99bf9cbf as isElementInChildOfActiveScope, $9bf71ea28793e738$export$4c063cf1350e6fed as isFocusable, $907718708eab68af$export$1a38b4ad7f578e1d as FocusRing, $e6afbd83fe6ebbd2$export$13f3202a3e5ddd5 as FocusableProvider, $e6afbd83fe6ebbd2$export$4c014de7c8940b4c as useFocusable, $f7dceffc5ad7768b$export$4e328f61c538687f as useFocusRing, $6a99195332edec8b$export$80f3e147d781571c as focusSafely, $83013635b024ae3d$export$eac1895992b9f3d6 as useHasTabbableChild};
//# sourceMappingURL=module.js.map
@@ -0,0 +1,277 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.BreakStatement = BreakStatement;
exports.CatchClause = CatchClause;
exports.ContinueStatement = ContinueStatement;
exports.DebuggerStatement = DebuggerStatement;
exports.DoWhileStatement = DoWhileStatement;
exports.ForOfStatement = exports.ForInStatement = void 0;
exports.ForStatement = ForStatement;
exports.IfStatement = IfStatement;
exports.LabeledStatement = LabeledStatement;
exports.ReturnStatement = ReturnStatement;
exports.SwitchCase = SwitchCase;
exports.SwitchStatement = SwitchStatement;
exports.ThrowStatement = ThrowStatement;
exports.TryStatement = TryStatement;
exports.VariableDeclaration = VariableDeclaration;
exports.VariableDeclarator = VariableDeclarator;
exports.WhileStatement = WhileStatement;
exports.WithStatement = WithStatement;
var _t = require("@babel/types");
const {
isFor,
isForStatement,
isIfStatement,
isStatement
} = _t;
function WithStatement(node) {
this.word("with");
this.space();
this.tokenChar(40);
this.print(node.object);
this.tokenChar(41);
this.printBlock(node);
}
function IfStatement(node) {
this.word("if");
this.space();
this.tokenChar(40);
this.print(node.test);
this.tokenChar(41);
this.space();
const needsBlock = node.alternate && isIfStatement(getLastStatement(node.consequent));
if (needsBlock) {
this.tokenChar(123);
this.newline();
this.indent();
}
this.printAndIndentOnComments(node.consequent);
if (needsBlock) {
this.dedent();
this.newline();
this.tokenChar(125);
}
if (node.alternate) {
if (this.endsWith(125)) this.space();
this.word("else");
this.space();
this.printAndIndentOnComments(node.alternate);
}
}
function getLastStatement(statement) {
const {
body
} = statement;
if (isStatement(body) === false) {
return statement;
}
return getLastStatement(body);
}
function ForStatement(node) {
this.word("for");
this.space();
this.tokenChar(40);
{
const exit = this.enterForStatementInit();
this.print(node.init);
exit();
}
this.tokenChar(59);
if (node.test) {
this.space();
this.print(node.test);
}
this.token(";", false, 1);
if (node.update) {
this.space();
this.print(node.update);
}
this.tokenChar(41);
this.printBlock(node);
}
function WhileStatement(node) {
this.word("while");
this.space();
this.tokenChar(40);
this.print(node.test);
this.tokenChar(41);
this.printBlock(node);
}
function ForXStatement(node) {
this.word("for");
this.space();
const isForOf = node.type === "ForOfStatement";
if (isForOf && node.await) {
this.word("await");
this.space();
}
this.noIndentInnerCommentsHere();
this.tokenChar(40);
{
const exit = this.enterForXStatementInit(isForOf);
this.print(node.left);
exit == null || exit();
}
this.space();
this.word(isForOf ? "of" : "in");
this.space();
this.print(node.right);
this.tokenChar(41);
this.printBlock(node);
}
const ForInStatement = exports.ForInStatement = ForXStatement;
const ForOfStatement = exports.ForOfStatement = ForXStatement;
function DoWhileStatement(node) {
this.word("do");
this.space();
this.print(node.body);
this.space();
this.word("while");
this.space();
this.tokenChar(40);
this.print(node.test);
this.tokenChar(41);
this.semicolon();
}
function printStatementAfterKeyword(printer, node) {
if (node) {
printer.space();
printer.printTerminatorless(node);
}
printer.semicolon();
}
function BreakStatement(node) {
this.word("break");
printStatementAfterKeyword(this, node.label);
}
function ContinueStatement(node) {
this.word("continue");
printStatementAfterKeyword(this, node.label);
}
function ReturnStatement(node) {
this.word("return");
printStatementAfterKeyword(this, node.argument);
}
function ThrowStatement(node) {
this.word("throw");
printStatementAfterKeyword(this, node.argument);
}
function LabeledStatement(node) {
this.print(node.label);
this.tokenChar(58);
this.space();
this.print(node.body);
}
function TryStatement(node) {
this.word("try");
this.space();
this.print(node.block);
this.space();
if (node.handlers) {
this.print(node.handlers[0]);
} else {
this.print(node.handler);
}
if (node.finalizer) {
this.space();
this.word("finally");
this.space();
this.print(node.finalizer);
}
}
function CatchClause(node) {
this.word("catch");
this.space();
if (node.param) {
this.tokenChar(40);
this.print(node.param);
this.print(node.param.typeAnnotation);
this.tokenChar(41);
this.space();
}
this.print(node.body);
}
function SwitchStatement(node) {
this.word("switch");
this.space();
this.tokenChar(40);
this.print(node.discriminant);
this.tokenChar(41);
this.space();
this.tokenChar(123);
this.printSequence(node.cases, true);
this.rightBrace(node);
}
function SwitchCase(node) {
if (node.test) {
this.word("case");
this.space();
this.print(node.test);
this.tokenChar(58);
} else {
this.word("default");
this.tokenChar(58);
}
if (node.consequent.length) {
this.newline();
this.printSequence(node.consequent, true);
}
}
function DebuggerStatement() {
this.word("debugger");
this.semicolon();
}
function VariableDeclaration(node, parent) {
if (node.declare) {
this.word("declare");
this.space();
}
const {
kind
} = node;
if (kind === "await using") {
this.word("await");
this.space();
this.word("using", true);
} else {
this.word(kind, kind === "using");
}
this.space();
let hasInits = false;
if (!isFor(parent)) {
for (const declar of node.declarations) {
if (declar.init) {
hasInits = true;
}
}
}
this.printList(node.declarations, undefined, undefined, node.declarations.length > 1, hasInits ? function (occurrenceCount) {
this.token(",", false, occurrenceCount);
this.newline();
} : undefined);
if (isFor(parent)) {
if (isForStatement(parent)) {
if (parent.init === node) return;
} else {
if (parent.left === node) return;
}
}
this.semicolon();
}
function VariableDeclarator(node) {
this.print(node.id);
if (node.definite) this.tokenChar(33);
this.print(node.id.typeAnnotation);
if (node.init) {
this.space();
this.tokenChar(61);
this.space();
this.print(node.init);
}
}
//# sourceMappingURL=statements.js.map
@@ -0,0 +1,97 @@
import test from 'tape';
import { elementType } from 'jsx-ast-utils';
import isNonInteractiveElement from '../../../src/util/isNonInteractiveElement';
import {
genElementSymbol,
genIndeterminantInteractiveElements,
genInteractiveElements,
genInteractiveRoleElements,
genNonInteractiveElements,
genNonInteractiveRoleElements,
} from '../../../__mocks__/genInteractives';
test('isNonInteractiveElement', (t) => {
t.equal(
isNonInteractiveElement(undefined, []),
false,
'identifies JSX Components (no tagName) as non-interactive elements',
);
t.test('non-interactive elements', (st) => {
genNonInteractiveElements().forEach(({ openingElement }) => {
st.equal(
isNonInteractiveElement(
elementType(openingElement),
openingElement.attributes,
),
true,
`identifies \`${genElementSymbol(openingElement)}\` as a non-interactive element`,
);
});
st.end();
});
t.test('non-interactive role elements', (st) => {
genNonInteractiveRoleElements().forEach(({ openingElement }) => {
st.equal(
isNonInteractiveElement(
elementType(openingElement),
openingElement.attributes,
),
false,
`identifies \`${genElementSymbol(openingElement)}\` as a non-interactive element`,
);
});
st.end();
});
t.test('interactive elements', (st) => {
genInteractiveElements().forEach(({ openingElement }) => {
st.equal(
isNonInteractiveElement(
elementType(openingElement),
openingElement.attributes,
),
false,
`identifies \`${genElementSymbol(openingElement)}\` as a non-interactive element`,
);
});
st.end();
});
t.test('interactive role elements', (st) => {
genInteractiveRoleElements().forEach(({ openingElement }) => {
st.equal(
isNonInteractiveElement(
elementType(openingElement),
openingElement.attributes,
),
false,
`identifies \`${genElementSymbol(openingElement)}\` as a non-interactive element`,
);
});
st.end();
});
t.test('indeterminate elements', (st) => {
genIndeterminantInteractiveElements().forEach(({ openingElement }) => {
st.equal(
isNonInteractiveElement(
elementType(openingElement),
openingElement.attributes,
),
false,
`identifies \`${genElementSymbol(openingElement)}\` as a non-interactive element`,
);
});
st.end();
});
t.end();
});
@@ -0,0 +1,54 @@
import {getScrollParent as $62d8ded9296f3872$export$cfa2225e87938781} from "./getScrollParent.module.js";
import {useEffectEvent as $8ae05eaa5c114e9c$export$7f54fc3180508a52} from "./useEffectEvent.module.js";
import {useLayoutEffect as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c} from "./useLayoutEffect.module.js";
import {useRef as $7FoZl$useRef} from "react";
/*
* 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 $a5fa973c1850dd36$export$ccaea96c28e8b9e7(props, ref) {
let { collection: collection, onLoadMore: onLoadMore, scrollOffset: scrollOffset = 1 } = props;
let sentinelObserver = (0, $7FoZl$useRef)(null);
let triggerLoadMore = (0, $8ae05eaa5c114e9c$export$7f54fc3180508a52)((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, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
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, $62d8ded9296f3872$export$cfa2225e87938781)(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
]);
}
export {$a5fa973c1850dd36$export$ccaea96c28e8b9e7 as useLoadMoreSentinel};
//# sourceMappingURL=useLoadMoreSentinel.module.js.map
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,kBAAkB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,iBAAiB,CAAC;IAC7E,qBAAqB,CAAC,oDAAiD,CAAC;IACxE,UAAU,CAAC,WAAW,CAAC;IACvB,eAAe,CAAC,kCAAkC,CAAC;IACnD,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,+BAA4B,CAAC;YAAE,KAAK,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,sBAAsB,CAAC;YAAE,OAAO,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,wBAAwB,CAAC;QAAA,GAAG,CAAC,CAAC;IAC5P,gBAAgB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,cAAc,CAAC;AACxD","sources":["packages/@react-aria/grid/intl/es-ES.json"],"sourcesContent":["{\n \"deselectedItem\": \"{item} no seleccionado.\",\n \"longPressToSelect\": \"Mantenga pulsado para abrir el modo de selección.\",\n \"select\": \"Seleccionar\",\n \"selectedAll\": \"Todos los elementos seleccionados.\",\n \"selectedCount\": \"{count, plural, =0 {Ningún elemento seleccionado} one {# elemento seleccionado} other {# elementos seleccionados}}.\",\n \"selectedItem\": \"{item} seleccionado.\"\n}\n"],"names":[],"version":3,"file":"es-ES.main.js.map"}
@@ -0,0 +1,36 @@
import baseIsArguments from './_baseIsArguments.js';
import isObjectLike from './isObjectLike.js';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
* Checks if `value` is likely an `arguments` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
* else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
!propertyIsEnumerable.call(value, 'callee');
};
export default isArguments;
@@ -0,0 +1 @@
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_mi=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(e),t={name:"mi",weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),weekStart:1,weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"}};return i.default.locale(t,null,!0),t}));
@@ -0,0 +1,51 @@
{
"name": "node-gyp",
"description": "Node.js native addon build tool",
"license": "MIT",
"keywords": [
"native",
"addon",
"module",
"c",
"c++",
"bindings",
"gyp"
],
"version": "9.4.1",
"installVersion": 11,
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)",
"repository": {
"type": "git",
"url": "git://github.com/nodejs/node-gyp.git"
},
"preferGlobal": true,
"bin": "./bin/node-gyp.js",
"main": "./lib/node-gyp.js",
"dependencies": {
"env-paths": "^2.2.0",
"exponential-backoff": "^3.1.1",
"glob": "^7.1.4",
"graceful-fs": "^4.2.6",
"make-fetch-happen": "^10.0.3",
"nopt": "^6.0.0",
"npmlog": "^6.0.0",
"rimraf": "^3.0.2",
"semver": "^7.3.5",
"tar": "^6.1.2",
"which": "^2.0.2"
},
"engines": {
"node": "^12.13 || ^14.13 || >=16"
},
"devDependencies": {
"bindings": "^1.5.0",
"mocha": "^10.2.0",
"nan": "^2.14.2",
"require-inject": "^1.4.4",
"standard": "^14.3.4"
},
"scripts": {
"lint": "standard */*.js test/**/*.js",
"test": "npm run lint && mocha --reporter=test/reporter.js test/test-download.js test/test-*"
}
}
@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Exclude = Exclude;
const type_1 = require("../create/type");
const index_1 = require("../union/index");
const index_2 = require("../never/index");
const index_3 = require("../extends/index");
const exclude_from_mapped_result_1 = require("./exclude-from-mapped-result");
const exclude_from_template_literal_1 = require("./exclude-from-template-literal");
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
const kind_1 = require("../guard/kind");
function ExcludeRest(L, R) {
const excluded = L.filter((inner) => (0, index_3.ExtendsCheck)(inner, R) === index_3.ExtendsResult.False);
return excluded.length === 1 ? excluded[0] : (0, index_1.Union)(excluded);
}
/** `[Json]` Constructs a type by excluding from unionType all union members that are assignable to excludedMembers */
function Exclude(L, R, options = {}) {
// overloads
if ((0, kind_1.IsTemplateLiteral)(L))
return (0, type_1.CreateType)((0, exclude_from_template_literal_1.ExcludeFromTemplateLiteral)(L, R), options);
if ((0, kind_1.IsMappedResult)(L))
return (0, type_1.CreateType)((0, exclude_from_mapped_result_1.ExcludeFromMappedResult)(L, R), options);
// prettier-ignore
return (0, type_1.CreateType)((0, kind_1.IsUnion)(L) ? ExcludeRest(L.anyOf, R) :
(0, index_3.ExtendsCheck)(L, R) !== index_3.ExtendsResult.False ? (0, index_2.Never)() : L, options);
}
@@ -0,0 +1,33 @@
{
"name": "unique-stream",
"version": "2.4.0",
"description": "node.js through stream that emits a unique stream of objects based on criteria",
"repository": "eugeneware/unique-stream",
"author": "Eugene Ware <eugene@noblesamurai.com>",
"license": "MIT",
"files": [
"index.js",
"LICENSE"
],
"scripts": {
"test": "mocha",
"coverage": "nyc npm run test"
},
"keywords": [
"unique",
"stream",
"unique-stream",
"streaming",
"streams"
],
"dependencies": {
"json-stable-stringify-without-jsonify": "^1.0.1",
"through2-filter": "3.0.0"
},
"devDependencies": {
"after": "~0.8.1",
"chai": "^4.2.0",
"mocha": "^5.2.0",
"nyc": "^17.1.0"
}
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_ts_dispose_resources.cjs",
"module": "../../esm/_ts_dispose_resources.js"
}
@@ -0,0 +1,2 @@
var R=Symbol.for("immer-nothing"),N=Symbol.for("immer-draftable"),u=Symbol.for("immer-state");function h(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var z=Object.getPrototypeOf;function M(e){return!!e&&!!e[u]}function A(e){return e?le(e)||Array.isArray(e)||!!e[N]||!!e.constructor?.[N]||j(e)||k(e):!1}var Pe=Object.prototype.constructor.toString(),ye=new WeakMap;function le(e){if(!e||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=ye.get(r);return n===void 0&&(n=Function.toString.call(r),ye.set(r,n)),n===Pe}function xe(e){return M(e)||h(15,e),e[u].t}function _(e,t,r=!0){C(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function C(e){let t=e[u];return t?t.o:Array.isArray(e)?1:j(e)?2:k(e)?3:0}function v(e,t){return C(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function X(e,t){return C(e)===2?e.get(t):e[t]}function Q(e,t,r){let n=C(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function pe(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function j(e){return e instanceof Map}function k(e){return e instanceof Set}function I(e){return e.e||e.t}function G(e,t){if(j(e))return new Map(e);if(k(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=le(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[u];let i=Reflect.ownKeys(n);for(let c=0;c<i.length;c++){let y=i[c],s=n[y];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[y]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[y]})}return Object.create(z(e),n)}else{let n=z(e);if(n!==null&&r)return{...e};let i=Object.create(n);return Object.assign(i,e)}}function B(e,t=!1){return H(e)||M(e)||!A(e)||(C(e)>1&&Object.defineProperties(e,{set:J,add:J,clear:J,delete:J}),Object.freeze(e),t&&Object.values(e).forEach(r=>B(r,!0))),e}function be(){h(2)}var J={value:be};function H(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var ne={};function w(e){let t=ne[e];return t||h(0,e),t}function Y(e,t){ne[e]||(ne[e]=t)}var L;function K(){return L}function ge(e,t){return{a:[],i:e,f:t,P:!0,d:0}}function ae(e,t){t&&(w("Patches"),e.u=[],e.h=[],e.I=t)}function q(e){Z(e),e.a.forEach(Ie),e.a=null}function Z(e){e===L&&(L=e.i)}function oe(e){return L=ge(L,e)}function Ie(e){let t=e[u];t.o===0||t.o===1?t.x():t.m=!0}function ie(e,t){t.d=t.a.length;let r=t.a[0];return e!==void 0&&e!==r?(r[u].s&&(q(t),h(4)),A(e)&&(e=ee(t,e),t.i||te(t,e)),t.u&&w("Patches").T(r[u].t,e,t.u,t.h)):e=ee(t,r,[]),q(t),t.u&&t.I(t.u,t.h),e!==R?e:void 0}function ee(e,t,r){if(H(t))return t;let n=e.f.shouldUseStrictIteration(),i=t[u];if(!i)return _(t,(c,y)=>de(e,i,t,c,y,r),n),t;if(i.n!==e)return t;if(!i.s)return te(e,i.t,!0),i.t;if(!i.c){i.c=!0,i.n.d--;let c=i.e,y=c,s=!1;i.o===3&&(y=new Set(c),c.clear(),s=!0),_(y,(g,a)=>de(e,i,c,g,a,r,s),n),te(e,c,!1),r&&e.u&&w("Patches").g(i,r,e.u,e.h)}return i.e}function de(e,t,r,n,i,c,y){if(i==null||typeof i!="object"&&!y)return;let s=H(i);if(!(s&&!y)){if(M(i)){let g=c&&t&&t.o!==3&&!v(t.r,n)?c.concat(n):void 0,a=ee(e,i,g);if(Q(r,n,a),M(a))e.P=!1;else return}else y&&r.add(i);if(A(i)&&!s){if(!e.f.y&&e.d<1||t&&t.t&&t.t[n]===i&&s)return;ee(e,i),(!t||!t.n.i)&&typeof n!="symbol"&&(j(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&te(e,i)}}}function te(e,t,r=!1){!e.i&&e.f.y&&e.P&&B(t,r)}function he(e,t){let r=Array.isArray(e),n={o:r?1:0,n:t?t.n:K(),s:!1,c:!1,r:{},i:t,t:e,p:null,e:null,x:null,l:!1},i=n,c=fe;r&&(i=[n],c=V);let{revoke:y,proxy:s}=Proxy.revocable(i,c);return n.p=s,n.x=y,s}var fe={get(e,t){if(t===u)return e;let r=I(e);if(!v(r,t))return Te(e,r,t);let n=r[t];return e.c||!A(n)?n:n===se(e.t,t)?(ce(e),e.e[t]=U(n,e)):n},has(e,t){return t in I(e)},ownKeys(e){return Reflect.ownKeys(I(e))},set(e,t,r){let n=me(I(e),t);if(n?.set)return n.set.call(e.p,r),!0;if(!e.s){let i=se(I(e),t),c=i?.[u];if(c&&c.t===r)return e.e[t]=r,e.r[t]=!1,!0;if(pe(r,i)&&(r!==void 0||v(e.t,t)))return!0;ce(e),E(e)}return e.e[t]===r&&(r!==void 0||t in e.e)||Number.isNaN(r)&&Number.isNaN(e.e[t])||(e.e[t]=r,e.r[t]=!0),!0},deleteProperty(e,t){return se(e.t,t)!==void 0||t in e.t?(e.r[t]=!1,ce(e),E(e)):delete e.r[t],e.e&&delete e.e[t],!0},getOwnPropertyDescriptor(e,t){let r=I(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.o!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){h(11)},getPrototypeOf(e){return z(e.t)},setPrototypeOf(){h(12)}},V={};_(fe,(e,t)=>{V[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});V.deleteProperty=function(e,t){return V.set.call(this,e,t,void 0)};V.set=function(e,t,r){return fe.set.call(this,e[0],t,r,e[0])};function se(e,t){let r=e[u];return(r?I(r):e)[t]}function Te(e,t,r){let n=me(t,r);return n?"value"in n?n.value:n.get?Line truncated
//# sourceMappingURL=immer.production.mjs.map
@@ -0,0 +1,17 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_decorators = void 0;
const base_config_1 = require("./base-config");
const decorators_1 = require("./decorators");
const es2015_symbol_1 = require("./es2015.symbol");
exports.esnext_decorators = {
libs: [es2015_symbol_1.es2015_symbol, decorators_1.decorators],
variables: [
['SymbolConstructor', base_config_1.TYPE],
['Function', base_config_1.TYPE],
],
};
@@ -0,0 +1 @@
{"version":3,"file":"xterm.js","mappings":"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 truncated
@@ -0,0 +1 @@
{"version":3,"file":"escape.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAyB,CAAC;AAWlD,eAAO,MAAM,YAAY,QAGT,MAAM,SAAS,MAAM,KAAG,MAQD,CAAC;AAExC;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA0B7C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,kBAAY,CAAC;AAqChC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,SA7Bb,MAAM,KAAK,MA6BuC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SArClB,MAAM,KAAK,MA4CpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,SApDb,MAAM,KAAK,MA4DpB,CAAC"}
@@ -0,0 +1,122 @@
// Copyright (c) 2011-2016 Ryan Prichard
//
// 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.
#include "BackgroundDesktop.h"
#include <memory>
#include "DebugClient.h"
#include "StringUtil.h"
#include "WinptyException.h"
namespace {
static std::wstring getObjectName(HANDLE object) {
BOOL success;
DWORD lengthNeeded = 0;
GetUserObjectInformationW(object, UOI_NAME,
nullptr, 0,
&lengthNeeded);
ASSERT(lengthNeeded % sizeof(wchar_t) == 0);
std::unique_ptr<wchar_t[]> tmp(
new wchar_t[lengthNeeded / sizeof(wchar_t)]);
success = GetUserObjectInformationW(object, UOI_NAME,
tmp.get(), lengthNeeded,
nullptr);
if (!success) {
throwWindowsError(L"GetUserObjectInformationW failed");
}
return std::wstring(tmp.get());
}
static std::wstring getDesktopName(HWINSTA winsta, HDESK desk) {
return getObjectName(winsta) + L"\\" + getObjectName(desk);
}
} // anonymous namespace
// Get a non-interactive window station for the agent.
// TODO: review security w.r.t. windowstation and desktop.
BackgroundDesktop::BackgroundDesktop() {
try {
m_originalStation = GetProcessWindowStation();
if (m_originalStation == nullptr) {
throwWindowsError(
L"BackgroundDesktop ctor: "
L"GetProcessWindowStation returned NULL");
}
m_newStation =
CreateWindowStationW(nullptr, 0, WINSTA_ALL_ACCESS, nullptr);
if (m_newStation == nullptr) {
throwWindowsError(
L"BackgroundDesktop ctor: CreateWindowStationW returned NULL");
}
if (!SetProcessWindowStation(m_newStation)) {
throwWindowsError(
L"BackgroundDesktop ctor: SetProcessWindowStation failed");
}
m_newDesktop = CreateDesktopW(
L"Default", nullptr, nullptr, 0, GENERIC_ALL, nullptr);
if (m_newDesktop == nullptr) {
throwWindowsError(
L"BackgroundDesktop ctor: CreateDesktopW failed");
}
m_newDesktopName = getDesktopName(m_newStation, m_newDesktop);
TRACE("Created background desktop: %s",
utf8FromWide(m_newDesktopName).c_str());
} catch (...) {
dispose();
throw;
}
}
void BackgroundDesktop::dispose() WINPTY_NOEXCEPT {
if (m_originalStation != nullptr) {
SetProcessWindowStation(m_originalStation);
m_originalStation = nullptr;
}
if (m_newDesktop != nullptr) {
CloseDesktop(m_newDesktop);
m_newDesktop = nullptr;
}
if (m_newStation != nullptr) {
CloseWindowStation(m_newStation);
m_newStation = nullptr;
}
}
std::wstring getCurrentDesktopName() {
// MSDN says that the handles returned by GetProcessWindowStation and
// GetThreadDesktop do not need to be passed to CloseWindowStation and
// CloseDesktop, respectively.
const HWINSTA winsta = GetProcessWindowStation();
if (winsta == nullptr) {
throwWindowsError(
L"getCurrentDesktopName: "
L"GetProcessWindowStation returned NULL");
}
const HDESK desk = GetThreadDesktop(GetCurrentThreadId());
if (desk == nullptr) {
throwWindowsError(
L"getCurrentDesktopName: "
L"GetThreadDesktop returned NULL");
}
return getDesktopName(winsta, desk);
}
@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = require("react");
var _createUpdateEffect = require("../createUpdateEffect");
var _default = exports["default"] = (0, _createUpdateEffect.createUpdateEffect)(_react.useEffect);
@@ -0,0 +1,71 @@
/**
* @fileoverview Comments inside children section of tag should be placed inside braces.
* @author Ben Vinegar
*/
'use strict';
const docsUrl = require('../util/docsUrl');
const getText = require('../util/eslint').getText;
const report = require('../util/report');
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const messages = {
putCommentInBraces: 'Comments inside children section of tag should be placed inside braces',
};
/**
* @param {Context} context
* @param {ASTNode} node
* @returns {void}
*/
function checkText(context, node) {
// since babel-eslint has the wrong node.raw, we'll get the source text
const rawValue = getText(context, node);
if (/^\s*\/(\/|\*)/m.test(rawValue)) {
// inside component, e.g. <div>literal</div>
if (
node.parent.type !== 'JSXAttribute'
&& node.parent.type !== 'JSXExpressionContainer'
&& node.parent.type.indexOf('JSX') !== -1
) {
report(context, messages.putCommentInBraces, 'putCommentInBraces', {
node,
});
}
}
}
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Disallow comments from being inserted as text nodes',
category: 'Possible Errors',
recommended: true,
url: docsUrl('jsx-no-comment-textnodes'),
},
messages,
schema: [],
},
create(context) {
// --------------------------------------------------------------------------
// Public
// --------------------------------------------------------------------------
return {
Literal(node) {
checkText(context, node);
},
JSXText(node) {
checkText(context, node);
},
};
},
};
@@ -0,0 +1,88 @@
{
"name": "object-keys",
"version": "1.1.1",
"author": {
"name": "Jordan Harband",
"email": "ljharb@gmail.com",
"url": "http://ljharb.codes"
},
"contributors": [
{
"name": "Jordan Harband",
"email": "ljharb@gmail.com",
"url": "http://ljharb.codes"
},
{
"name": "Raynos",
"email": "raynos2@gmail.com"
},
{
"name": "Nathan Rajlich",
"email": "nathan@tootallnate.net"
},
{
"name": "Ivan Starkov",
"email": "istarkov@gmail.com"
},
{
"name": "Gary Katsevman",
"email": "git@gkatsev.com"
}
],
"description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/es-shims/es5-shim",
"license": "MIT",
"main": "index.js",
"scripts": {
"pretest": "npm run --silent lint",
"test": "npm run --silent tests-only",
"posttest": "npm run --silent audit",
"tests-only": "node test/index.js",
"coverage": "covert test/*.js",
"coverage-quiet": "covert test/*.js --quiet",
"lint": "eslint .",
"preaudit": "npm install --package-lock --package-lock-only",
"audit": "npm audit",
"postaudit": "rm package-lock.json"
},
"repository": {
"type": "git",
"url": "git://github.com/ljharb/object-keys.git"
},
"keywords": [
"Object.keys",
"keys",
"ES5",
"shim"
],
"dependencies": {},
"devDependencies": {
"@ljharb/eslint-config": "^13.1.1",
"covert": "^1.1.1",
"eslint": "^5.13.0",
"foreach": "^2.0.5",
"indexof": "^0.0.1",
"is": "^3.3.0",
"tape": "^4.9.2"
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
}
}
@@ -0,0 +1,110 @@
import type { CopyOptions } from 'fs-extra';
import type { GlobOptions } from 'tinyglobby';
import type { LogLevel } from 'vp-runtime-helper';
export type TransformFile = (buf: Buffer, matchedPath: string) => string | Buffer | Promise<string | Buffer>;
export interface Target {
/**
* Path or glob of what to copy.
*
* 要复制的目录、文件或者 `globby` 匹配规则。
*/
src: string | string[];
/**
* One or more destinations where to copy.
*
* 复制到目标目录。
*/
dest: string;
/**
* Rename the file after copying.
*
* 复制后重命名文件。
*/
rename?: string | ((name: string) => string);
/**
* Remove the directory structure of copied files, if `src` is a directory.
*
* 是否删除复制的文件目录结构,`src` 为目录时有效。
*/
flatten?: boolean;
/**
* Options for tinyglobby. See more at https://github.com/sindresorhus/globby#options
*
* tinyglobby 的选项,设置 `src` 的匹配参数
*/
globOptions?: GlobOptions;
/**
* Options for fs-extra.copy See more at https://github.com/jprichardson/node-fs-extra/blob/HEAD/docs/copy.md
*
* fs-extra.copy 的选项,设置 `src` 的复制参数
*/
copyOptions?: CopyOptions;
/**
* Transform the file before copying.
*
* 复制前转换文件内容。
*/
transform?: TransformFile;
}
export interface Options {
/**
* Default `'closeBundle'`, vite hook the plugin should use.
*
* 默认 `'closeBundle'`,调用指定钩子函数时开始复制。
*
* @default 'closeBundle'
*/
hook?: string;
/**
* The value of enforce can be either `"pre"` or `"post"`, see more at https://vitejs.dev/guide/api-plugin.html#plugin-ordering.
*
* 强制执行顺序,`pre` 前,`post` 后,参考 https://cn.vitejs.dev/guide/api-plugin.html#plugin-ordering
*/
enforce?: 'pre' | 'post';
/**
* Options for tinyglobby. See more at https://github.com/SuperchupuDev/tinyglobby?tab=readme-ov-file#options
*
* tinyglobby 的选项,设置 `src` 的匹配参数。
*/
globOptions?: GlobOptions;
/**
* Options for fs-extra.copy See more at https://github.com/jprichardson/node-fs-extra/blob/HEAD/docs/copy.md
*
* fs-extra.copy 的选项,设置 `src` 的复制参数
*/
copyOptions?: CopyOptions;
/**
* Default `process.cwd()`, The current working directory in which to search.
*
* 默认 `process.cwd()`,用于拼接 `src` 的路径。
*
* @default `process.cwd()`
*/
cwd?: string;
/**
* Array of targets to copy.
*
* 复制文件的规则配置。
*/
targets: Target[];
/**
* Default `'warn'`, The log level to use.
*
* 默认 `'warn'`,日志等级。
*
* @default 'WARN'
*/
logLevel?: LogLevel;
/**
* Delay in milliseconds before copying.
*
* 复制前的延迟时间。
*/
delay?: number;
/**
* Whether to output the banner
*
* 是否输出 banner
*/
enableBanner?: boolean;
}
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var docAbstractRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'abstract [EPUB-SSV]'
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section']]
};
var _default = exports.default = docAbstractRole;
@@ -0,0 +1,161 @@
"use strict";
// adapted from https://github.com/eslint/eslint/blob/5bdaae205c3a0089ea338b382df59e21d5b06436/lib/rules/utils/ast-utils.js#L1668-L1787
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFunctionHeadLoc = getFunctionHeadLoc;
const utils_1 = require("@typescript-eslint/utils");
const astUtils_1 = require("./astUtils");
/**
* Gets the `(` token of the given function node.
* @param node The function node to get.
* @param sourceCode The source code object to get tokens.
* @returns `(` token.
*/
function getOpeningParenOfParams(node, sourceCode) {
// If the node is an arrow function and doesn't have parens, this returns the identifier of the first param.
if (node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression &&
node.params.length === 1) {
const argToken = utils_1.ESLintUtils.nullThrows(sourceCode.getFirstToken(node.params[0]), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('parameter', 'arrow function'));
const maybeParenToken = sourceCode.getTokenBefore(argToken);
return maybeParenToken && (0, astUtils_1.isOpeningParenToken)(maybeParenToken)
? maybeParenToken
: argToken;
}
// Otherwise, returns paren.
return node.id != null
? utils_1.ESLintUtils.nullThrows(sourceCode.getTokenAfter(node.id, astUtils_1.isOpeningParenToken), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('id', 'function'))
: utils_1.ESLintUtils.nullThrows(sourceCode.getFirstToken(node, astUtils_1.isOpeningParenToken), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('opening parenthesis', 'function'));
}
/**
* Gets the location of the given function node for reporting.
*
* - `function foo() {}`
* ^^^^^^^^^^^^
* - `(function foo() {})`
* ^^^^^^^^^^^^
* - `(function() {})`
* ^^^^^^^^
* - `function* foo() {}`
* ^^^^^^^^^^^^^
* - `(function* foo() {})`
* ^^^^^^^^^^^^^
* - `(function*() {})`
* ^^^^^^^^^
* - `() => {}`
* ^^
* - `async () => {}`
* ^^
* - `({ foo: function foo() {} })`
* ^^^^^^^^^^^^^^^^^
* - `({ foo: function() {} })`
* ^^^^^^^^^^^^^
* - `({ ['foo']: function() {} })`
* ^^^^^^^^^^^^^^^^^
* - `({ [foo]: function() {} })`
* ^^^^^^^^^^^^^^^
* - `({ foo() {} })`
* ^^^
* - `({ foo: function* foo() {} })`
* ^^^^^^^^^^^^^^^^^^
* - `({ foo: function*() {} })`
* ^^^^^^^^^^^^^^
* - `({ ['foo']: function*() {} })`
* ^^^^^^^^^^^^^^^^^^
* - `({ [foo]: function*() {} })`
* ^^^^^^^^^^^^^^^^
* - `({ *foo() {} })`
* ^^^^
* - `({ foo: async function foo() {} })`
* ^^^^^^^^^^^^^^^^^^^^^^^
* - `({ foo: async function() {} })`
* ^^^^^^^^^^^^^^^^^^^
* - `({ ['foo']: async function() {} })`
* ^^^^^^^^^^^^^^^^^^^^^^^
* - `({ [foo]: async function() {} })`
* ^^^^^^^^^^^^^^^^^^^^^
* - `({ async foo() {} })`
* ^^^^^^^^^
* - `({ get foo() {} })`
* ^^^^^^^
* - `({ set foo(a) {} })`
* ^^^^^^^
* - `class A { constructor() {} }`
* ^^^^^^^^^^^
* - `class A { foo() {} }`
* ^^^
* - `class A { *foo() {} }`
* ^^^^
* - `class A { async foo() {} }`
* ^^^^^^^^^
* - `class A { ['foo']() {} }`
* ^^^^^^^
* - `class A { *['foo']() {} }`
* ^^^^^^^^
* - `class A { async ['foo']() {} }`
* ^^^^^^^^^^^^^
* - `class A { [foo]() {} }`
* ^^^^^
* - `class A { *[foo]() {} }`
* ^^^^^^
* - `class A { async [foo]() {} }`
* ^^^^^^^^^^^
* - `class A { get foo() {} }`
* ^^^^^^^
* - `class A { set foo(a) {} }`
* ^^^^^^^
* - `class A { static foo() {} }`
* ^^^^^^^^^^
* - `class A { static *foo() {} }`
* ^^^^^^^^^^^
* - `class A { static async foo() {} }`
* ^^^^^^^^^^^^^^^^
* - `class A { static get foo() {} }`
* ^^^^^^^^^^^^^^
* - `class A { static set foo(a) {} }`
* ^^^^^^^^^^^^^^
* - `class A { foo = function() {} }`
* ^^^^^^^^^^^^^^
* - `class A { static foo = function() {} }`
* ^^^^^^^^^^^^^^^^^^^^^
* - `class A { foo = (a, b) => {} }`
* ^^^^^^
* @param node The function node to get.
* @param sourceCode The source code object to get tokens.
* @returns The location of the function node for reporting.
*/
function getFunctionHeadLoc(node, sourceCode) {
const parent = node.parent;
let start;
let end;
if (parent.type === utils_1.AST_NODE_TYPES.MethodDefinition ||
parent.type === utils_1.AST_NODE_TYPES.PropertyDefinition) {
// the decorator's range is included within the member
// however it's usually irrelevant to the member itself - so we don't want
// to highlight it ever.
if (parent.decorators.length > 0) {
const lastDecorator = parent.decorators[parent.decorators.length - 1];
const firstTokenAfterDecorator = utils_1.ESLintUtils.nullThrows(sourceCode.getTokenAfter(lastDecorator), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('modifier or member name', 'class member'));
start = firstTokenAfterDecorator.loc.start;
}
else {
start = parent.loc.start;
}
end = getOpeningParenOfParams(node, sourceCode).loc.start;
}
else if (parent.type === utils_1.AST_NODE_TYPES.Property) {
start = parent.loc.start;
end = getOpeningParenOfParams(node, sourceCode).loc.start;
}
else if (node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression) {
const arrowToken = utils_1.ESLintUtils.nullThrows(sourceCode.getTokenBefore(node.body, astUtils_1.isArrowToken), utils_1.ESLintUtils.NullThrowsReasons.MissingToken('arrow token', 'arrow function'));
start = arrowToken.loc.start;
end = arrowToken.loc.end;
}
else {
start = node.loc.start;
end = getOpeningParenOfParams(node, sourceCode).loc.start;
}
return {
end: { ...end },
start: { ...start },
};
}
@@ -0,0 +1,12 @@
var _typeof = require("./typeof.js")["default"];
function setFunctionName(e, t, n) {
"symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : "");
try {
Object.defineProperty(e, "name", {
configurable: !0,
value: n ? n + " " + t : t
});
} catch (e) {}
return e;
}
module.exports = setFunctionName, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,64 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/modal-header.tsx
var modal_header_exports = {};
__export(modal_header_exports, {
default: () => modal_header_default
});
module.exports = __toCommonJS(modal_header_exports);
var import_react = require("react");
var import_system = require("@heroui/system");
var import_react_utils2 = require("@heroui/react-utils");
var import_shared_utils = require("@heroui/shared-utils");
// src/modal-context.ts
var import_react_utils = require("@heroui/react-utils");
var [ModalProvider, useModalContext] = (0, import_react_utils.createContext)({
name: "ModalContext",
errorMessage: "useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Modal />`"
});
// src/modal-header.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var ModalHeader = (0, import_system.forwardRef)((props, ref) => {
const { as, children, className, ...otherProps } = props;
const { slots, classNames, headerId, setHeaderMounted } = useModalContext();
const domRef = (0, import_react_utils2.useDOMRef)(ref);
const Component = as || "header";
(0, import_react.useEffect)(() => {
setHeaderMounted(true);
return () => setHeaderMounted(false);
}, [setHeaderMounted]);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
Component,
{
ref: domRef,
className: slots.header({ class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.header, className) }),
id: headerId,
...otherProps,
children
}
);
});
ModalHeader.displayName = "HeroUI.ModalHeader";
var modal_header_default = ModalHeader;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
@@ -0,0 +1,79 @@
'use strict';
var tape = require('tape');
var path = require('../');
tape('path.basename', function (t) {
t.strictEqual(path.basename(__filename), 'test-path-basename.js');
t.strictEqual(path.basename(__filename, '.js'), 'test-path-basename');
t.strictEqual(path.basename('.js', '.js'), '');
t.strictEqual(path.basename(''), '');
t.strictEqual(path.basename('/dir/basename.ext'), 'basename.ext');
t.strictEqual(path.basename('/basename.ext'), 'basename.ext');
t.strictEqual(path.basename('basename.ext'), 'basename.ext');
t.strictEqual(path.basename('basename.ext/'), 'basename.ext');
t.strictEqual(path.basename('basename.ext//'), 'basename.ext');
t.strictEqual(path.basename('aaa/bbb', '/bbb'), 'bbb');
t.strictEqual(path.basename('aaa/bbb', 'a/bbb'), 'bbb');
t.strictEqual(path.basename('aaa/bbb', 'bbb'), 'bbb');
t.strictEqual(path.basename('aaa/bbb//', 'bbb'), 'bbb');
t.strictEqual(path.basename('aaa/bbb', 'bb'), 'b');
t.strictEqual(path.basename('aaa/bbb', 'b'), 'bb');
t.strictEqual(path.basename('/aaa/bbb', '/bbb'), 'bbb');
t.strictEqual(path.basename('/aaa/bbb', 'a/bbb'), 'bbb');
t.strictEqual(path.basename('/aaa/bbb', 'bbb'), 'bbb');
t.strictEqual(path.basename('/aaa/bbb//', 'bbb'), 'bbb');
t.strictEqual(path.basename('/aaa/bbb', 'bb'), 'b');
t.strictEqual(path.basename('/aaa/bbb', 'b'), 'bb');
t.strictEqual(path.basename('/aaa/bbb'), 'bbb');
t.strictEqual(path.basename('/aaa/'), 'aaa');
t.strictEqual(path.basename('/aaa/b'), 'b');
t.strictEqual(path.basename('/a/b'), 'b');
t.strictEqual(path.basename('//a'), 'a');
t.end();
})
tape('path.win32.basename', { skip: true }, function (t) {
// On Windows a backslash acts as a path separator.
t.strictEqual(path.win32.basename('\\dir\\basename.ext'), 'basename.ext');
t.strictEqual(path.win32.basename('\\basename.ext'), 'basename.ext');
t.strictEqual(path.win32.basename('basename.ext'), 'basename.ext');
t.strictEqual(path.win32.basename('basename.ext\\'), 'basename.ext');
t.strictEqual(path.win32.basename('basename.ext\\\\'), 'basename.ext');
t.strictEqual(path.win32.basename('foo'), 'foo');
t.strictEqual(path.win32.basename('aaa\\bbb', '\\bbb'), 'bbb');
t.strictEqual(path.win32.basename('aaa\\bbb', 'a\\bbb'), 'bbb');
t.strictEqual(path.win32.basename('aaa\\bbb', 'bbb'), 'bbb');
t.strictEqual(path.win32.basename('aaa\\bbb\\\\\\\\', 'bbb'), 'bbb');
t.strictEqual(path.win32.basename('aaa\\bbb', 'bb'), 'b');
t.strictEqual(path.win32.basename('aaa\\bbb', 'b'), 'bb');
t.strictEqual(path.win32.basename('C:'), '');
t.strictEqual(path.win32.basename('C:.'), '.');
t.strictEqual(path.win32.basename('C:\\'), '');
t.strictEqual(path.win32.basename('C:\\dir\\base.ext'), 'base.ext');
t.strictEqual(path.win32.basename('C:\\basename.ext'), 'basename.ext');
t.strictEqual(path.win32.basename('C:basename.ext'), 'basename.ext');
t.strictEqual(path.win32.basename('C:basename.ext\\'), 'basename.ext');
t.strictEqual(path.win32.basename('C:basename.ext\\\\'), 'basename.ext');
t.strictEqual(path.win32.basename('C:foo'), 'foo');
t.strictEqual(path.win32.basename('file:stream'), 'file:stream');
t.end();
});
tape('On unix a backslash is just treated as any other character.', function (t) {
t.strictEqual(path.posix.basename('\\dir\\basename.ext'),
'\\dir\\basename.ext');
t.strictEqual(path.posix.basename('\\basename.ext'), '\\basename.ext');
t.strictEqual(path.posix.basename('basename.ext'), 'basename.ext');
t.strictEqual(path.posix.basename('basename.ext\\'), 'basename.ext\\');
t.strictEqual(path.posix.basename('basename.ext\\\\'), 'basename.ext\\\\');
t.strictEqual(path.posix.basename('foo'), 'foo');
t.end();
});
tape('POSIX filenames may include control characters', function (t) {
// c.f. http://www.dwheeler.com/essays/fixing-unix-linux-filenames.html
var controlCharFilename = "Icon" + (String.fromCharCode(13));
t.strictEqual(path.posix.basename(("/a/b/" + controlCharFilename)),
controlCharFilename);
t.end();
});
@@ -0,0 +1,12 @@
// Copyright (c) 2013 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file is used to generate an empty .pdb -- with a 4KB pagesize -- that is
// then used during the final link for modules that have large PDBs. Otherwise,
// the linker will generate a pdb with a page size of 1KB, which imposes a limit
// of 1GB on the .pdb. By generating an initial empty .pdb with the compiler
// (rather than the linker), this limit is avoided. With this in place PDBs may
// grow to 2GB.
//
// This file is referenced by the msvs_large_pdb mechanism in MSVSUtil.py.
@@ -0,0 +1,18 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./record"), exports);
@@ -0,0 +1,18 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./ref"), exports);
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015, Jon Schlinkert.
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,15 @@
import CodePath = require("./code-path");
declare const debug: any;
export declare let enabled: boolean;
export { debug as dump };
export declare let dumpState: any;
export declare let dumpDot: any;
/**
* Makes a DOT code of a given code path.
* The DOT code can be visualized with Graphvis.
* @param {CodePath} codePath A code path to make DOT.
* @param {Object} traceMap Optional. A map to check whether or not segments had been done.
* @returns {string} A DOT code of the code path.
*/
export declare function makeDotArrows(codePath: CodePath, traceMap: any): string;
@@ -0,0 +1 @@
{"version":3,"file":"stringifyDecoratorInfo.js","sourceRoot":"","sources":["../../../../src/decorator/calculations/stringifyDecoratorInfo.ts"],"names":[],"mappings":";;AAGA,wDAWC;AAbD,mEAAgE;AAEhE,SAAgB,sBAAsB,CACpC,mBAAkC;IAElC,QAAQ,mBAAmB,CAAC,IAAI,EAAE,CAAC;QACjC,KAAK,qCAAiB,CAAC,MAAM;YAC3B,OAAO,YAAY,mBAAmB,CAAC,WAAW,CAAC,IAAI,eAAe,mBAAmB,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC;QAClH,KAAK,qCAAiB,CAAC,SAAS;YAC9B,OAAO,YAAY,mBAAmB,CAAC,WAAW,CAAC,IAAI,cAAc,mBAAmB,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC;QAChH,KAAK,qCAAiB,CAAC,QAAQ;YAC7B,OAAO,YAAY,mBAAmB,CAAC,WAAW,CAAC,IAAI,iBAAiB,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxH,CAAC;AACH,CAAC"}
@@ -0,0 +1,61 @@
"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/bold/calendar-bold.tsx
var calendar_bold_exports = {};
__export(calendar_bold_exports, {
CalendarBoldIcon: () => CalendarBoldIcon
});
module.exports = __toCommonJS(calendar_bold_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var CalendarBoldIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M7.75 2.5a.75.75 0 0 0-1.5 0v1.58c-1.44.115-2.384.397-3.078 1.092c-.695.694-.977 1.639-1.093 3.078h19.842c-.116-1.44-.398-2.384-1.093-3.078c-.694-.695-1.639-.977-3.078-1.093V2.5a.75.75 0 0 0-1.5 0v1.513C15.585 4 14.839 4 14 4h-4c-.839 0-1.585 0-2.25.013z",
fill: "currentColor"
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
clipRule: "evenodd",
d: "M2 12c0-.839 0-1.585.013-2.25h19.974C22 10.415 22 11.161 22 12v2c0 3.771 0 5.657-1.172 6.828C19.657 22 17.771 22 14 22h-4c-3.771 0-5.657 0-6.828-1.172C2 19.657 2 17.771 2 14zm15 2a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 4a1 1 0 1 0 0-2a1 1 0 0 0 0 2m-4-5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-6-3a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 4a1 1 0 1 0 0-2a1 1 0 0 0 0 2",
fill: "currentColor",
fillRule: "evenodd"
}
)
]
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
CalendarBoldIcon
});
@@ -0,0 +1,176 @@
/**
* ```asn1
* pkcs-1 OBJECT IDENTIFIER ::= {
iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1
* ```
*/
export declare const id_pkcs_1 = "1.2.840.113549.1.1";
/**
* ```asn1
* rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 }
* ```
*/
export declare const id_rsaEncryption = "1.2.840.113549.1.1.1";
/**
* ```asn1
* id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 }
* ```
*/
export declare const id_RSAES_OAEP = "1.2.840.113549.1.1.7";
/**
* ```asn1
* id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 }
* ```
*/
export declare const id_pSpecified = "1.2.840.113549.1.1.9";
/**
* ```asn1
* id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 }
* ```
*/
export declare const id_RSASSA_PSS = "1.2.840.113549.1.1.10";
/**
* ```asn1
* md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 }
* ```
*/
export declare const id_md2WithRSAEncryption = "1.2.840.113549.1.1.2";
/**
* ```asn1
* md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 }
* ```
*/
export declare const id_md5WithRSAEncryption = "1.2.840.113549.1.1.4";
/**
* ```asn1
* sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 }
* ```
*/
export declare const id_sha1WithRSAEncryption = "1.2.840.113549.1.1.5";
/**
* ```asn1
* sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 }
* ```
*/
export declare const id_sha224WithRSAEncryption = "1.2.840.113549.1.1.14";
/**
* ```asn1
* sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 }
* ```
* @deprecated Should be removed later
*/
export declare const id_ssha224WithRSAEncryption = "1.2.840.113549.1.1.14";
/**
* ```asn1
* sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 }
* ```
*/
export declare const id_sha256WithRSAEncryption = "1.2.840.113549.1.1.11";
/**
* ```asn1
* sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 }
* ```
*/
export declare const id_sha384WithRSAEncryption = "1.2.840.113549.1.1.12";
/**
* ```asn1
* sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 }
* ```
*/
export declare const id_sha512WithRSAEncryption = "1.2.840.113549.1.1.13";
/**
* ```asn1
* sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 }
* ```
*/
export declare const id_sha512_224WithRSAEncryption = "1.2.840.113549.1.1.15";
/**
* ```asn1
* sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 }
* ```
*/
export declare const id_sha512_256WithRSAEncryption = "1.2.840.113549.1.1.16";
/**
* ```asn1
* id-sha1 OBJECT IDENTIFIER ::= {
* iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2)
* 26
* ```
*/
export declare const id_sha1 = "1.3.14.3.2.26";
/**
* ```asn1
* id-sha224 OBJECT IDENTIFIER ::= {
* joint-iso-itu-t (2) country (16) us (840) organization (1)
* gov (101) csor (3) nistalgorithm (4) hashalgs (2) 4
* }
* ```
*/
export declare const id_sha224 = "2.16.840.1.101.3.4.2.4";
/**
* ```asn1
* id-sha256 OBJECT IDENTIFIER ::= {
* joint-iso-itu-t (2) country (16) us (840) organization (1)
* gov (101) csor (3) nistalgorithm (4) hashalgs (2) 1
* }
* ```
*/
export declare const id_sha256 = "2.16.840.1.101.3.4.2.1";
/**
* ```asn1
* id-sha384 OBJECT IDENTIFIER ::= {
* joint-iso-itu-t (2) country (16) us (840) organization (1)
* gov (101) csor (3) nistalgorithm (4) hashalgs (2) 2
* }
* ```
*/
export declare const id_sha384 = "2.16.840.1.101.3.4.2.2";
/**
* ```asn1
* id-sha512 OBJECT IDENTIFIER ::= {
* joint-iso-itu-t (2) country (16) us (840) organization (1)
* gov (101) csor (3) nistalgorithm (4) hashalgs (2) 3
* }
* ```
*/
export declare const id_sha512 = "2.16.840.1.101.3.4.2.3";
/**
* ```asn1
* id-sha512-224 OBJECT IDENTIFIER ::= {
* joint-iso-itu-t (2) country (16) us (840) organization (1)
* gov (101) csor (3) nistalgorithm (4) hashalgs (2) 5
* }
* ```
*/
export declare const id_sha512_224 = "2.16.840.1.101.3.4.2.5";
/**
* ```asn1
* id-sha512-256 OBJECT IDENTIFIER ::= {
* joint-iso-itu-t (2) country (16) us (840) organization (1)
* gov (101) csor (3) nistalgorithm (4) hashalgs (2) 6
* }
* ```
*/
export declare const id_sha512_256 = "2.16.840.1.101.3.4.2.6";
/**
* ```asn1
* id-md2 OBJECT IDENTIFIER ::= {
* iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2
* }
* ```
*/
export declare const id_md2 = "1.2.840.113549.2.2";
/**
* ```asn1
* id-md5 OBJECT IDENTIFIER ::= {
* iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5
* }
* ```
*/
export declare const id_md5 = "1.2.840.113549.2.5";
/**
* ```asn1
* id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 }
* ```
*/
export declare const id_mgf1 = "1.2.840.113549.1.1.8";
@@ -0,0 +1,35 @@
# 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.0.2](https://github.com/inspect-js/has-property-descriptors/compare/v1.0.1...v1.0.2) - 2024-02-12
### Commits
- [Refactor] use `es-define-property` [`f93a8c8`](https://github.com/inspect-js/has-property-descriptors/commit/f93a8c85eba70cbceab500f2619fb5cce73a1805)
- [Dev Deps] update `aud`, `npmignore`, `tape` [`42b0c9d`](https://github.com/inspect-js/has-property-descriptors/commit/42b0c9d1c23e747755f0f2924923c418ea34a9ee)
- [Deps] update `get-intrinsic` [`35e9b46`](https://github.com/inspect-js/has-property-descriptors/commit/35e9b46a7f14331bf0de98b644dd803676746037)
## [v1.0.1](https://github.com/inspect-js/has-property-descriptors/compare/v1.0.0...v1.0.1) - 2023-10-20
### Commits
- [meta] use `npmignore` to autogenerate an npmignore file [`5bbf4da`](https://github.com/inspect-js/has-property-descriptors/commit/5bbf4dae1b58950d87bb3af508bee7513e640868)
- [actions] update rebase action to use reusable workflow [`3a5585b`](https://github.com/inspect-js/has-property-descriptors/commit/3a5585bf74988f71a8f59e67a07d594e62c51fd8)
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`e5c1212`](https://github.com/inspect-js/has-property-descriptors/commit/e5c1212048a8fda549794c47863724ca60b89cae)
- [Dev Deps] update `aud`, `tape` [`e942917`](https://github.com/inspect-js/has-property-descriptors/commit/e942917b6c2f7c090d5623048989cf20d0834ebf)
- [Deps] update `get-intrinsic` [`f4a44ec`](https://github.com/inspect-js/has-property-descriptors/commit/f4a44ec6d94146fa6c550d3c15c31a2062c83ef4)
- [Deps] update `get-intrinsic` [`eeb275b`](https://github.com/inspect-js/has-property-descriptors/commit/eeb275b473e5d72ca843b61ca25cfcb06a5d4300)
## v1.0.0 - 2022-04-14
### Commits
- Initial implementation, tests [`303559f`](https://github.com/inspect-js/has-property-descriptors/commit/303559f2a72dfe7111573a1aec475ed4a184c35a)
- Initial commit [`3a7ca2d`](https://github.com/inspect-js/has-property-descriptors/commit/3a7ca2dc49f1fff0279a28bb16265e7615e14749)
- read me [`dd73dce`](https://github.com/inspect-js/has-property-descriptors/commit/dd73dce09d89d0f7a4a6e3b1e562a506f979a767)
- npm init [`c1e6557`](https://github.com/inspect-js/has-property-descriptors/commit/c1e655779de632d68cb944c50da6b71bcb7b8c85)
- Only apps should have lockfiles [`e72f7c6`](https://github.com/inspect-js/has-property-descriptors/commit/e72f7c68de534b2d273ee665f8b18d4ecc7f70b0)
@@ -0,0 +1,26 @@
import { Scalar } from '../../nodes/Scalar.js';
function boolStringify({ value, source }, ctx) {
const boolObj = value ? trueTag : falseTag;
if (source && boolObj.test.test(source))
return source;
return value ? ctx.options.trueStr : ctx.options.falseStr;
}
const trueTag = {
identify: value => value === true,
default: true,
tag: 'tag:yaml.org,2002:bool',
test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
resolve: () => new Scalar(true),
stringify: boolStringify
};
const falseTag = {
identify: value => value === false,
default: true,
tag: 'tag:yaml.org,2002:bool',
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
resolve: () => new Scalar(false),
stringify: boolStringify
};
export { falseTag, trueTag };
@@ -0,0 +1,6 @@
/**
* The default argument placeholder value for methods.
*
* @type {Object}
*/
module.exports = {};
@@ -0,0 +1,184 @@
/**
* @fileoverview Rule to disallow async functions which have no `await` expression.
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Capitalize the 1st letter of the given text.
* @param {string} text The text to capitalize.
* @returns {string} The text that the 1st letter was capitalized.
*/
function capitalizeFirstLetter(text) {
return text[0].toUpperCase() + text.slice(1);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description:
"Disallow async functions which have no `await` expression",
recommended: false,
url: "https://eslint.org/docs/latest/rules/require-await",
},
schema: [],
messages: {
missingAwait: "{{name}} has no 'await' expression.",
removeAsync: "Remove 'async'.",
},
hasSuggestions: true,
},
create(context) {
const sourceCode = context.sourceCode;
let scopeInfo = null;
/**
* Push the scope info object to the stack.
* @returns {void}
*/
function enterFunction() {
scopeInfo = {
upper: scopeInfo,
hasAwait: false,
};
}
/**
* Pop the top scope info object from the stack.
* Also, it reports the function if needed.
* @param {ASTNode} node The node to report.
* @returns {void}
*/
function exitFunction(node) {
if (
!node.generator &&
node.async &&
!scopeInfo.hasAwait &&
!astUtils.isEmptyFunction(node)
) {
/*
* If the function belongs to a method definition or
* property, then the function's range may not include the
* `async` keyword and we should look at the parent instead.
*/
const nodeWithAsyncKeyword =
(node.parent.type === "MethodDefinition" &&
node.parent.value === node) ||
(node.parent.type === "Property" &&
node.parent.method &&
node.parent.value === node)
? node.parent
: node;
const asyncToken = sourceCode.getFirstToken(
nodeWithAsyncKeyword,
token => token.value === "async",
);
const asyncRange = [
asyncToken.range[0],
sourceCode.getTokenAfter(asyncToken, {
includeComments: true,
}).range[0],
];
/*
* Removing the `async` keyword can cause parsing errors if the current
* statement is relying on automatic semicolon insertion. If ASI is currently
* being used, then we should replace the `async` keyword with a semicolon.
*/
const nextToken = sourceCode.getTokenAfter(asyncToken);
const addSemiColon =
nextToken.type === "Punctuator" &&
(nextToken.value === "[" || nextToken.value === "(") &&
(nodeWithAsyncKeyword.type === "MethodDefinition" ||
astUtils.isStartOfExpressionStatement(
nodeWithAsyncKeyword,
)) &&
astUtils.needsPrecedingSemicolon(
sourceCode,
nodeWithAsyncKeyword,
);
context.report({
node,
loc: astUtils.getFunctionHeadLoc(node, sourceCode),
messageId: "missingAwait",
data: {
name: capitalizeFirstLetter(
astUtils.getFunctionNameWithKind(node),
),
},
suggest: [
{
messageId: "removeAsync",
fix: fixer =>
fixer.replaceTextRange(
asyncRange,
addSemiColon ? ";" : "",
),
},
],
});
}
scopeInfo = scopeInfo.upper;
}
return {
FunctionDeclaration: enterFunction,
FunctionExpression: enterFunction,
ArrowFunctionExpression: enterFunction,
"FunctionDeclaration:exit": exitFunction,
"FunctionExpression:exit": exitFunction,
"ArrowFunctionExpression:exit": exitFunction,
AwaitExpression() {
if (!scopeInfo) {
return;
}
scopeInfo.hasAwait = true;
},
ForOfStatement(node) {
if (!scopeInfo) {
return;
}
if (node.await) {
scopeInfo.hasAwait = true;
}
},
VariableDeclaration(node) {
if (!scopeInfo) {
return;
}
if (node.kind === "await using") {
scopeInfo.hasAwait = true;
}
},
};
},
};
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015 Andres Suarez <zertosh@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,8 @@
var $f26362aed63f47e2$exports = {};
$f26362aed63f47e2$exports = {
"longPressMessage": `Ap\u{103}sa\u{21B}i lung sau ap\u{103}sa\u{21B}i pe Alt + s\u{103}geat\u{103} \xeen jos pentru a deschide meniul`
};
export {$f26362aed63f47e2$exports as default};
//# sourceMappingURL=ro-RO.module.js.map
@@ -0,0 +1,132 @@
{
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"bugs": "https://github.com/syntax-tree/mdast-util-to-markdown/issues",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
],
"dependencies": {
"@types/mdast": "^4.0.0",
"@types/unist": "^3.0.0",
"longest-streak": "^3.0.0",
"mdast-util-phrasing": "^4.0.0",
"mdast-util-to-string": "^4.0.0",
"micromark-util-classify-character": "^2.0.0",
"micromark-util-decode-string": "^2.0.0",
"unist-util-visit": "^5.0.0",
"zwitch": "^2.0.0"
},
"description": "mdast utility to serialize markdown",
"devDependencies": {
"@types/node": "^22.0.0",
"c8": "^10.0.0",
"mdast-util-from-markdown": "^2.0.0",
"prettier": "^3.0.0",
"remark-cli": "^12.0.0",
"remark-preset-wooorm": "^10.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"unist-util-remove-position": "^5.0.0",
"xo": "^0.59.0"
},
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
"index.js"
],
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"keywords": [
"ast",
"compile",
"markdown",
"markup",
"mdast-util",
"mdast",
"serialize",
"stringify",
"syntax",
"tree",
"unist",
"utility",
"util"
],
"license": "MIT",
"name": "mdast-util-to-markdown",
"prettier": {
"bracketSpacing": false,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false
},
"remarkConfig": {
"plugins": [
"remark-preset-wooorm"
]
},
"repository": "syntax-tree/mdast-util-to-markdown",
"version": "2.1.2",
"scripts": {
"prepack": "npm run build && npm run format",
"build": "tsc --build --clean && tsc --build && type-coverage",
"format": "remark . -qfo && prettier . -w --log-level warn && xo --fix",
"test-api": "node --conditions development test/index.js",
"test-coverage": "c8 --100 --reporter lcov npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
},
"sideEffects": false,
"typeCoverage": {
"atLeast": 100,
"ignoreFiles": [
"lib/types.d.ts"
],
"strict": true
},
"type": "module",
"xo": {
"overrides": [
{
"files": [
"**/*.d.ts"
],
"rules": {
"@typescript-eslint/array-type": [
"error",
{
"default": "generic"
}
],
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true
}
],
"@typescript-eslint/consistent-type-definitions": [
"error",
"interface"
]
}
},
{
"files": [
"test/**/*.js"
],
"rules": {
"max-depth": "off",
"no-await-in-loop": "off"
}
}
],
"prettier": true,
"rules": {
"complexity": "off",
"unicorn/prefer-at": "off",
"unicorn/prefer-code-point": "off"
}
}
}
@@ -0,0 +1,111 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.configResponsive = configResponsive;
exports["default"] = void 0;
var _tslib = require("tslib");
var _react = require("react");
var _isBrowser = _interopRequireDefault(require("../utils/isBrowser"));
var subscribers = new Set();
var info;
var responsiveConfig = {
xs: 0,
sm: 576,
md: 768,
lg: 992,
xl: 1200
};
function handleResize() {
var e_1, _a;
var oldInfo = info;
calculate();
if (oldInfo === info) {
return;
}
try {
for (var subscribers_1 = (0, _tslib.__values)(subscribers), subscribers_1_1 = subscribers_1.next(); !subscribers_1_1.done; subscribers_1_1 = subscribers_1.next()) {
var subscriber = subscribers_1_1.value;
subscriber();
}
} catch (e_1_1) {
e_1 = {
error: e_1_1
};
} finally {
try {
if (subscribers_1_1 && !subscribers_1_1.done && (_a = subscribers_1["return"])) _a.call(subscribers_1);
} finally {
if (e_1) throw e_1.error;
}
}
}
var listening = false;
function calculate() {
var e_2, _a;
var width = window.innerWidth;
var newInfo = {};
var shouldUpdate = false;
try {
for (var _b = (0, _tslib.__values)(Object.keys(responsiveConfig)), _c = _b.next(); !_c.done; _c = _b.next()) {
var key = _c.value;
newInfo[key] = width >= responsiveConfig[key];
if (newInfo[key] !== info[key]) {
shouldUpdate = true;
}
}
} catch (e_2_1) {
e_2 = {
error: e_2_1
};
} finally {
try {
if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
} finally {
if (e_2) throw e_2.error;
}
}
if (shouldUpdate) {
info = newInfo;
}
}
function configResponsive(config) {
responsiveConfig = config;
if (info) calculate();
}
function useResponsive() {
if (_isBrowser["default"] && !listening) {
info = {};
calculate();
window.addEventListener('resize', handleResize);
listening = true;
}
var _a = (0, _tslib.__read)((0, _react.useState)(info), 2),
state = _a[0],
setState = _a[1];
(0, _react.useEffect)(function () {
if (!_isBrowser["default"]) {
return;
}
// In React 18's StrictMode, useEffect perform twice, resize listener is remove, so handleResize is never perform.
// https://github.com/alibaba/hooks/issues/1910
if (!listening) {
window.addEventListener('resize', handleResize);
}
var subscriber = function subscriber() {
setState(info);
};
subscribers.add(subscriber);
return function () {
subscribers["delete"](subscriber);
if (subscribers.size === 0) {
window.removeEventListener('resize', handleResize);
listening = false;
}
};
}, []);
return state;
}
var _default = exports["default"] = useResponsive;
@@ -0,0 +1,56 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ObjectCreate = GetIntrinsic('%Object.create%', true);
var $TypeError = require('es-errors/type');
var $SyntaxError = require('es-errors/syntax');
var isObject = require('es-object-atoms/isObject');
var IsArray = require('./IsArray');
var forEach = require('../helpers/forEach');
var SLOT = require('internal-slot');
var hasProto = require('has-proto')();
// https://262.ecma-international.org/11.0/#sec-objectcreate
module.exports = function OrdinaryObjectCreate(proto) {
if (proto !== null && !isObject(proto)) {
throw new $TypeError('Assertion failed: `proto` must be null or an object');
}
var additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];
if (!IsArray(additionalInternalSlotsList)) {
throw new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');
}
// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1
// internalSlotsList.push(...additionalInternalSlotsList); // step 2
// var O = MakeBasicObject(internalSlotsList); // step 3
// setProto(O, proto); // step 4
// return O; // step 5
var O;
if (hasProto) {
O = { __proto__: proto };
} else if ($ObjectCreate) {
O = $ObjectCreate(proto);
} else {
if (proto === null) {
throw new $SyntaxError('native Object.create support is required to create null objects');
}
var T = function T() {};
T.prototype = proto;
O = new T();
}
if (additionalInternalSlotsList.length > 0) {
forEach(additionalInternalSlotsList, function (slot) {
SLOT.set(O, slot, void undefined);
});
}
return O;
};
@@ -0,0 +1,9 @@
'use strict';
var ToNumber = require('./ToNumber');
// http://262.ecma-international.org/5.1/#sec-9.6
module.exports = function ToUint32(x) {
return ToNumber(x) >>> 0;
};
@@ -0,0 +1,6 @@
import {
SortIcon
} from "./chunk-PEW76GLL.mjs";
export {
SortIcon
};
@@ -0,0 +1,35 @@
{
"name": "@types/resolve",
"version": "1.20.2",
"description": "TypeScript definitions for resolve",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/resolve",
"license": "MIT",
"contributors": [
{
"name": "Mario Nebl",
"url": "https://github.com/marionebl",
"githubUsername": "marionebl"
},
{
"name": "Klaus Meinhardt",
"url": "https://github.com/ajafff",
"githubUsername": "ajafff"
},
{
"name": "Jordan Harband",
"url": "https://github.com/ljharb",
"githubUsername": "ljharb"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/resolve"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "f17c01e45c248ed2430e1f5d8b89310de423f1564ee420b04ea91177066c05f1",
"typeScriptVersion": "3.9"
}
@@ -0,0 +1,77 @@
/*
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 ParsePlugin {
/**
* @param {string | ResolveStepHook} source source
* @param {Partial<ResolveRequest>} requestOptions request options
* @param {string | ResolveStepHook} target target
*/
constructor(source, requestOptions, target) {
this.source = source;
this.requestOptions = requestOptions;
this.target = target;
}
/**
* @param {Resolver} resolver the resolver
* @returns {void}
*/
apply(resolver) {
const target = resolver.ensureHook(this.target);
resolver
.getHook(this.source)
.tapAsync("ParsePlugin", (request, resolveContext, callback) => {
const parsed = resolver.parse(/** @type {string} */ (request.request));
/** @type {ResolveRequest} */
const obj = { ...request, ...parsed, ...this.requestOptions };
if (request.query && !parsed.query) {
obj.query = request.query;
}
if (request.fragment && !parsed.fragment) {
obj.fragment = request.fragment;
}
if (parsed && resolveContext.log) {
if (parsed.module) resolveContext.log("Parsed request is a module");
if (parsed.directory) {
resolveContext.log("Parsed request is a directory");
}
}
// There is an edge-case where a request with # can be a path or a fragment -> try both
if (obj.request && !obj.query && obj.fragment) {
const directory = obj.fragment.endsWith("/");
/** @type {ResolveRequest} */
const alternative = {
...obj,
directory,
request:
obj.request +
(obj.directory ? "/" : "") +
(directory ? obj.fragment.slice(0, -1) : obj.fragment),
fragment: "",
};
resolver.doResolve(
target,
alternative,
null,
resolveContext,
(err, result) => {
if (err) return callback(err);
if (result) return callback(null, result);
resolver.doResolve(target, obj, null, resolveContext, callback);
},
);
return;
}
resolver.doResolve(target, obj, null, resolveContext, callback);
});
}
};
@@ -0,0 +1,2 @@
// Note: types exposed from `index.d.ts`.
export {default} from './lib/index.js'
@@ -0,0 +1,6 @@
/**
* Map of named character references.
*
* @type {Record<string, string>}
*/
export const characterEntities: Record<string, string>
@@ -0,0 +1,29 @@
import type { Stats } from "node:fs";
import type { IncomingMessage, ServerResponse } from "node:http";
type Arrayable<T> = T | T[];
export type NextHandler = () => void | Promise<void>;
export type RequestHandler = (
req: IncomingMessage,
res: ServerResponse,
next?: NextHandler,
) => void;
export interface Options {
dev?: boolean;
etag?: boolean;
maxAge?: number;
immutable?: boolean;
single?: string | boolean;
ignores?: false | Arrayable<string | RegExp>;
extensions?: string[];
dotfiles?: boolean;
brotli?: boolean;
gzip?: boolean;
onNoMatch?: (req: IncomingMessage, res: ServerResponse) => void;
setHeaders?: (res: ServerResponse, pathname: string, stats: Stats) => void;
}
export default function (dir?: string, opts?: Options): RequestHandler;
@@ -0,0 +1,4 @@
/** Used to match template delimiters. */
var reInterpolate = /<%=([\s\S]+?)%>/g;
export default reInterpolate;
@@ -0,0 +1 @@
{"version":3,"file":"DeactivationParams.js","sourceRoot":"","sources":["../../../../src/resolution/models/DeactivationParams.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from './types.mjs';
import 'react';
declare const DeleteIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { DeleteIcon };
@@ -0,0 +1,238 @@
exports.setopts = setopts
exports.ownProp = ownProp
exports.makeAbs = makeAbs
exports.finish = finish
exports.mark = mark
exports.isIgnored = isIgnored
exports.childrenIgnored = childrenIgnored
function ownProp (obj, field) {
return Object.prototype.hasOwnProperty.call(obj, field)
}
var fs = require("fs")
var path = require("path")
var minimatch = require("minimatch")
var isAbsolute = require("path-is-absolute")
var Minimatch = minimatch.Minimatch
function alphasort (a, b) {
return a.localeCompare(b, 'en')
}
function setupIgnores (self, options) {
self.ignore = options.ignore || []
if (!Array.isArray(self.ignore))
self.ignore = [self.ignore]
if (self.ignore.length) {
self.ignore = self.ignore.map(ignoreMap)
}
}
// ignore patterns are always in dot:true mode.
function ignoreMap (pattern) {
var gmatcher = null
if (pattern.slice(-3) === '/**') {
var gpattern = pattern.replace(/(\/\*\*)+$/, '')
gmatcher = new Minimatch(gpattern, { dot: true })
}
return {
matcher: new Minimatch(pattern, { dot: true }),
gmatcher: gmatcher
}
}
function setopts (self, pattern, options) {
if (!options)
options = {}
// base-matching: just use globstar for that.
if (options.matchBase && -1 === pattern.indexOf("/")) {
if (options.noglobstar) {
throw new Error("base matching requires globstar")
}
pattern = "**/" + pattern
}
self.silent = !!options.silent
self.pattern = pattern
self.strict = options.strict !== false
self.realpath = !!options.realpath
self.realpathCache = options.realpathCache || Object.create(null)
self.follow = !!options.follow
self.dot = !!options.dot
self.mark = !!options.mark
self.nodir = !!options.nodir
if (self.nodir)
self.mark = true
self.sync = !!options.sync
self.nounique = !!options.nounique
self.nonull = !!options.nonull
self.nosort = !!options.nosort
self.nocase = !!options.nocase
self.stat = !!options.stat
self.noprocess = !!options.noprocess
self.absolute = !!options.absolute
self.fs = options.fs || fs
self.maxLength = options.maxLength || Infinity
self.cache = options.cache || Object.create(null)
self.statCache = options.statCache || Object.create(null)
self.symlinks = options.symlinks || Object.create(null)
setupIgnores(self, options)
self.changedCwd = false
var cwd = process.cwd()
if (!ownProp(options, "cwd"))
self.cwd = cwd
else {
self.cwd = path.resolve(options.cwd)
self.changedCwd = self.cwd !== cwd
}
self.root = options.root || path.resolve(self.cwd, "/")
self.root = path.resolve(self.root)
if (process.platform === "win32")
self.root = self.root.replace(/\\/g, "/")
// TODO: is an absolute `cwd` supposed to be resolved against `root`?
// e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')
self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)
if (process.platform === "win32")
self.cwdAbs = self.cwdAbs.replace(/\\/g, "/")
self.nomount = !!options.nomount
// disable comments and negation in Minimatch.
// Note that they are not supported in Glob itself anyway.
options.nonegate = true
options.nocomment = true
// always treat \ in patterns as escapes, not path separators
options.allowWindowsEscape = false
self.minimatch = new Minimatch(pattern, options)
self.options = self.minimatch.options
}
function finish (self) {
var nou = self.nounique
var all = nou ? [] : Object.create(null)
for (var i = 0, l = self.matches.length; i < l; i ++) {
var matches = self.matches[i]
if (!matches || Object.keys(matches).length === 0) {
if (self.nonull) {
// do like the shell, and spit out the literal glob
var literal = self.minimatch.globSet[i]
if (nou)
all.push(literal)
else
all[literal] = true
}
} else {
// had matches
var m = Object.keys(matches)
if (nou)
all.push.apply(all, m)
else
m.forEach(function (m) {
all[m] = true
})
}
}
if (!nou)
all = Object.keys(all)
if (!self.nosort)
all = all.sort(alphasort)
// at *some* point we statted all of these
if (self.mark) {
for (var i = 0; i < all.length; i++) {
all[i] = self._mark(all[i])
}
if (self.nodir) {
all = all.filter(function (e) {
var notDir = !(/\/$/.test(e))
var c = self.cache[e] || self.cache[makeAbs(self, e)]
if (notDir && c)
notDir = c !== 'DIR' && !Array.isArray(c)
return notDir
})
}
}
if (self.ignore.length)
all = all.filter(function(m) {
return !isIgnored(self, m)
})
self.found = all
}
function mark (self, p) {
var abs = makeAbs(self, p)
var c = self.cache[abs]
var m = p
if (c) {
var isDir = c === 'DIR' || Array.isArray(c)
var slash = p.slice(-1) === '/'
if (isDir && !slash)
m += '/'
else if (!isDir && slash)
m = m.slice(0, -1)
if (m !== p) {
var mabs = makeAbs(self, m)
self.statCache[mabs] = self.statCache[abs]
self.cache[mabs] = self.cache[abs]
}
}
return m
}
// lotta situps...
function makeAbs (self, f) {
var abs = f
if (f.charAt(0) === '/') {
abs = path.join(self.root, f)
} else if (isAbsolute(f) || f === '') {
abs = f
} else if (self.changedCwd) {
abs = path.resolve(self.cwd, f)
} else {
abs = path.resolve(f)
}
if (process.platform === 'win32')
abs = abs.replace(/\\/g, '/')
return abs
}
// Return true, if pattern ends with globstar '**', for the accompanying parent directory.
// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents
function isIgnored (self, path) {
if (!self.ignore.length)
return false
return self.ignore.some(function(item) {
return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))
})
}
function childrenIgnored (self, path) {
if (!self.ignore.length)
return false
return self.ignore.some(function(item) {
return !!(item.gmatcher && item.gmatcher.match(path))
})
}
@@ -0,0 +1,42 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
thunk: () => thunk,
withExtraArgument: () => withExtraArgument
});
module.exports = __toCommonJS(src_exports);
function createThunkMiddleware(extraArgument) {
const middleware = ({ dispatch, getState }) => (next) => (action) => {
if (typeof action === "function") {
return action(dispatch, getState, extraArgument);
}
return next(action);
};
return middleware;
}
var thunk = createThunkMiddleware();
var withExtraArgument = createThunkMiddleware;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
thunk,
withExtraArgument
});
@@ -0,0 +1,97 @@
/**
* @license React
* use-sync-external-store-shim/with-selector.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function is(x, y) {
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
}
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
var React = require("react"),
shim = require("use-sync-external-store/shim"),
objectIs = "function" === typeof Object.is ? Object.is : is,
useSyncExternalStore = shim.useSyncExternalStore,
useRef = React.useRef,
useEffect = React.useEffect,
useMemo = React.useMemo,
useDebugValue = React.useDebugValue;
exports.useSyncExternalStoreWithSelector = function (
subscribe,
getSnapshot,
getServerSnapshot,
selector,
isEqual
) {
var instRef = useRef(null);
if (null === instRef.current) {
var inst = { hasValue: !1, value: null };
instRef.current = inst;
} else inst = instRef.current;
instRef = useMemo(
function () {
function memoizedSelector(nextSnapshot) {
if (!hasMemo) {
hasMemo = !0;
memoizedSnapshot = nextSnapshot;
nextSnapshot = selector(nextSnapshot);
if (void 0 !== isEqual && inst.hasValue) {
var currentSelection = inst.value;
if (isEqual(currentSelection, nextSnapshot))
return (memoizedSelection = currentSelection);
}
return (memoizedSelection = nextSnapshot);
}
currentSelection = memoizedSelection;
if (objectIs(memoizedSnapshot, nextSnapshot))
return currentSelection;
var nextSelection = selector(nextSnapshot);
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
return (memoizedSnapshot = nextSnapshot), currentSelection;
memoizedSnapshot = nextSnapshot;
return (memoizedSelection = nextSelection);
}
var hasMemo = !1,
memoizedSnapshot,
memoizedSelection,
maybeGetServerSnapshot =
void 0 === getServerSnapshot ? null : getServerSnapshot;
return [
function () {
return memoizedSelector(getSnapshot());
},
null === maybeGetServerSnapshot
? void 0
: function () {
return memoizedSelector(maybeGetServerSnapshot());
}
];
},
[getSnapshot, getServerSnapshot, selector, isEqual]
);
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
useEffect(
function () {
inst.hasValue = !0;
inst.value = value;
},
[value]
);
useDebugValue(value);
return value;
};
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
})();
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,81 @@
{
"name": "fraction.js",
"title": "Fraction.js",
"version": "5.3.4",
"description": "The RAW rational numbers library",
"homepage": "https://raw.org/article/rational-numbers-in-javascript/",
"bugs": "https://github.com/rawify/Fraction.js/issues",
"keywords": [
"math",
"numbers",
"parser",
"ratio",
"fraction",
"fractions",
"rational",
"rationals",
"rational numbers",
"bigint",
"arbitrary precision",
"mixed numbers",
"decimal",
"numerator",
"denominator",
"simplification"
],
"private": false,
"main": "./dist/fraction.js",
"module": "./dist/fraction.mjs",
"browser": "./dist/fraction.min.js",
"unpkg": "./dist/fraction.min.js",
"types": "./fraction.d.mts",
"exports": {
".": {
"types": {
"import": "./fraction.d.mts",
"require": "./fraction.d.ts"
},
"import": "./dist/fraction.mjs",
"require": "./dist/fraction.js",
"browser": "./dist/fraction.min.js"
},
"./package.json": "./package.json"
},
"typesVersions": {
"<4.7": {
"*": [
"fraction.d.ts"
]
}
},
"sideEffects": false,
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/rawify/Fraction.js.git"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/rawify"
},
"author": {
"name": "Robert Eisele",
"email": "robert@raw.org",
"url": "https://raw.org/"
},
"license": "MIT",
"engines": {
"node": "*"
},
"directories": {
"example": "examples",
"test": "tests"
},
"scripts": {
"build": "crude-build Fraction",
"test": "mocha tests/*.js"
},
"devDependencies": {
"crude-build": "^0.1.2",
"mocha": "*"
}
}
@@ -0,0 +1,3 @@
import CryptoJS = require("./index");
export = CryptoJS.pad.ZeroPadding;
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('split', require('../split'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,64 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _extends = require('@babel/runtime/helpers/extends');
var _objectWithoutPropertiesLoose = require('@babel/runtime/helpers/objectWithoutPropertiesLoose');
var React = require('react');
var useComposedRef = require('use-composed-ref');
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var useComposedRef__default = /*#__PURE__*/_interopDefault(useComposedRef);
var noop = function noop() {};
var _excluded = ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"];
var TextareaAutosize = function TextareaAutosize(_ref, userRef) {
_ref.cacheMeasurements;
_ref.maxRows;
_ref.minRows;
var _ref$onChange = _ref.onChange,
onChange = _ref$onChange === void 0 ? noop : _ref$onChange;
_ref.onHeightChange;
var props = _objectWithoutPropertiesLoose(_ref, _excluded);
if (props.style) {
if ('maxHeight' in props.style) {
throw new Error('Using `style.maxHeight` for <TextareaAutosize/> is not supported. Please use `maxRows`.');
}
if ('minHeight' in props.style) {
throw new Error('Using `style.minHeight` for <TextareaAutosize/> is not supported. Please use `minRows`.');
}
}
props.value !== undefined;
var libRef = React__namespace.useRef(null);
var ref = useComposedRef__default["default"](libRef, userRef);
React__namespace.useRef(0);
React__namespace.useRef();
return /*#__PURE__*/React__namespace.createElement("textarea", _extends({}, props, {
onChange: onChange,
ref: ref
}));
};
var index = /* #__PURE__ */React__namespace.forwardRef(TextareaAutosize);
exports["default"] = index;
@@ -0,0 +1 @@
{"version":3,"file":"isStackOverflowError.js","sourceRoot":"","sources":["../../../../src/error/calculations/isStackOverflowError.ts"],"names":[],"mappings":";;AAAA,oDAmBC;AAnBD,SAAgB,oBAAoB,CAAC,KAAc;IACjD,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,uEAAuE;IACvE,+CAA+C;IAC/C,sDAAsD;IACtD,gDAAgD;IAChD,MAAM,qBAAqB,GACzB,4CAA4C,CAAC;IAE/C,OAAO;IACL,mDAAmD;IACnD,CAAC,KAAK,YAAY,UAAU;QAC1B,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC5C,8DAA8D;QAC9D,CAAC,KAAK,CAAC,IAAI,KAAK,eAAe,IAAI,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAC7E,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"A B","2":"K D E F wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 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 1C","2":"xC TC 0C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 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","2":"J"},E:{"1":"J 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":"2C ZC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z ID NC uC JD OC","2":"F FD GD HD"},G:{"1":"E 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","2":"ZC KD vC LD"},H:{"130":"hD"},I:{"130":"TC J I iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","130":"A B C NC uC OC"},L:{"132":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"130":"PC"},P:{"130":"J","132":"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:{"132":"zD"},R:{"132":"0D"},S:{"1":"2D","2":"1D"}},B:1,C:"Multiple file selection",D:true};
@@ -0,0 +1,28 @@
'use strict';
var util = require('util');
var stream = require('stream');
module.exports.createReadStream = function (object, options) {
return new MultiStream (object, options);
};
var MultiStream = function (object, options) {
if (object instanceof Buffer || typeof object === 'string') {
options = options || {};
stream.Readable.call(this, {
highWaterMark: options.highWaterMark,
encoding: options.encoding
});
} else {
stream.Readable.call(this, { objectMode: true });
}
this._object = object;
};
util.inherits(MultiStream, stream.Readable);
MultiStream.prototype._read = function () {
this.push(this._object);
this._object = null;
};
@@ -0,0 +1,890 @@
[![Travis](https://img.shields.io/travis/Microsoft/tsyringe.svg)](https://travis-ci.org/Microsoft/tsyringe/)
[![npm](https://img.shields.io/npm/v/tsyringe.svg)](https://www.npmjs.com/package/tsyringe)
[![npm](https://img.shields.io/npm/dt/tsyringe.svg)](https://www.npmjs.com/package/tsyringe)
# TSyringe
A lightweight dependency injection container for TypeScript/JavaScript for
constructor injection.
<!-- TOC depthFrom:1 depthTo:3 -->
- [TSyringe](#tsyringe)
- [Installation](#installation)
- [API](#api)
- [Decorators](#decorators)
- [injectable()](#injectable)
- [singleton()](#singleton)
- [autoInjectable()](#autoinjectable)
- [inject()](#inject)
- [injectAll()](#injectall)
- [injectWithTransform()](#injectWithTransform)
- [injectAllWithTransform()](#injectAllWithTransform)
- [scoped()](#scoped)
- [Container](#container)
- [Injection Token](#injection-token)
- [Providers](#providers)
- [Register](#register)
- [Registry](#registry)
- [Resolution](#resolution)
- [IsRegistered](#isregistered)
- [Interception](#interception)
- [Child Containers](#child-containers)
- [Clearing Instances](#clearing-instances)
- [Circular dependencies](#circular-dependencies)
- [The `delay` helper function](#the-delay-helper-function)
- [Interfaces and circular dependencies](#interfaces-and-circular-dependencies)
- [Disposable instances](#disposable-instances)
- [Full examples](#full-examples)
- [Example without interfaces](#example-without-interfaces)
- [Example with interfaces](#example-with-interfaces)
- [Injecting primitive values (Named injection)](#injecting-primitive-values-named-injection)
- [Non goals](#non-goals)
- [Contributing](#contributing)
<!-- /TOC -->
## Installation
Install by `npm`
```sh
npm install --save tsyringe
```
**or** install with `yarn` (this project is developed using `yarn`)
```sh
yarn add tsyringe
```
Modify your `tsconfig.json` to include the following settings
```json
{
"compilerOptions": {
"experimentalDecorators": true,
"emitDecoratorMetadata": true
}
}
```
Add a polyfill for the Reflect API (examples below use reflect-metadata). You can use:
- [reflect-metadata](https://www.npmjs.com/package/reflect-metadata)
- [core-js (core-js/es7/reflect)](https://www.npmjs.com/package/core-js)
- [reflection](https://www.npmjs.com/package/@abraham/reflection)
The Reflect polyfill import should only be added once, and before DI is used:
```typescript
// main.ts
import "reflect-metadata";
// Your code here...
```
### Babel
If you're using Babel (e.g. using React Native), you will need to configure it to emit TypeScript metadata.
First get the Babel plugin
#### Yarn
```
yarn add --dev babel-plugin-transform-typescript-metadata
```
#### npm
```
npm install --save-dev babel-plugin-transform-typescript-metadata
```
Then add it to your Babel config
```
plugins: [
'babel-plugin-transform-typescript-metadata',
/* ...the rest of your config... */
]
```
# API
TSyringe performs [Constructor Injection](https://en.wikipedia.org/wiki/Dependency_injection#Constructor_injection)
on the constructors of decorated classes.
## Decorators
### injectable()
Class decorator factory that allows the class' dependencies to be injected at
runtime. TSyringe relies on several decorators in order to collect metadata about classes
to be instantiated.
#### Usage
```typescript
import {injectable} from "tsyringe";
@injectable()
class Foo {
constructor(private database: Database) {}
}
// some other file
import "reflect-metadata";
import {container} from "tsyringe";
import {Foo} from "./foo";
const instance = container.resolve(Foo);
```
### singleton()
Class decorator factory that registers the class as a singleton within the
global container.
#### Usage
```typescript
import {singleton} from "tsyringe";
@singleton()
class Foo {
constructor() {}
}
// some other file
import "reflect-metadata";
import {container} from "tsyringe";
import {Foo} from "./foo";
const instance = container.resolve(Foo);
```
### autoInjectable()
Class decorator factory that replaces the decorated class' constructor with
a parameterless constructor that has dependencies auto-resolved.
**Note** Resolution is performed using the global container.
#### Usage
```typescript
import {autoInjectable} from "tsyringe";
@autoInjectable()
class Foo {
constructor(private database?: Database) {}
}
// some other file
import {Foo} from "./foo";
const instance = new Foo();
```
Notice how in order to allow the use of the empty constructor `new Foo()`, we
need to make the parameters optional, e.g. `database?: Database`.
### inject()
Parameter decorator factory that allows for interface and other non-class
information to be stored in the constructor's metadata.
#### Usage
```typescript
import {injectable, inject} from "tsyringe";
interface Database {
// ...
}
@injectable()
class Foo {
constructor(@inject("Database") private database?: Database) {}
}
```
#### Optional
By default, `@inject()` throws an exception if no registration is found. If you want to have `undefined` injected when the registration isn't found, you can pass this options `{ isOptional: true }` as the second parameter:
```typescript
import {injectable, injectAll} from "tsyringe";
@injectable()
class Foo {
constructor(@inject("Database", { isOptional: true }) private database?: Database) {}
}
```
### injectAll()
Parameter decorator for array parameters where the array contents will come from the container.
It will inject an array using the specified injection token to resolve the values.
#### Usage
```typescript
import {injectable, injectAll} from "tsyringe";
@injectable()
class Foo {}
@injectable()
class Bar {
constructor(@injectAll(Foo) fooArray: Foo[]) {
// ...
}
}
```
#### Optional
By default, `@injectAll()` throws an exception if no registrations were found. If you want to return an empty array, you can pass this options `{ isOptional: true }` as the second parameter:
```typescript
import {injectable, injectAll} from "tsyringe";
@injectable()
class Bar {
constructor(@injectAll(Foo, { isOptional: true }) fooArray: Foo[]) {
// ...
}
}
```
### injectWithTransform()
Parameter decorator which allows for a transformer object to take an action on the resolved object
before returning the result.
```typescript
class FeatureFlags {
public getFlagValue(flagName: string): boolean {
// ...
}
}
class Foo() {}
class FeatureFlagsTransformer implements Transform<FeatureFlags, boolean> {
public transform(flags: FeatureFlags, flag: string) {
return flags.getFlagValue(flag);
}
}
@injectable()
class MyComponent(foo: Foo, @injectWithTransform(FeatureFlags, FeatureFlagsTransformer, "IsBlahEnabled") blahEnabled: boolean){
// ...
}
```
### injectAllWithTransform()
This parameter decorator allows for array contents to be passed through a transformer. The transformer can return any type, so this
can be used to map or fold an array.
```typescript
@injectable()
class Foo {
public value;
}
class FooTransform implements Transform<Foo[], string[]>{
public transform(foos: Foo[]): string[]{
return foos.map(f => f.value));
}
}
@injectable()
class Bar {
constructor(@injectAllWithTransform(Foo, FooTransform) stringArray: string[]) {
// ...
}
}
```
### scoped()
Class decorator factory that registers the class as a scoped dependency within the global container.
#### Available scopes
- Transient
- The **default** registration scope, a new instance will be created with each resolve
- Singleton
- Each resolve will return the same instance (including resolves from child containers)
- ResolutionScoped
- The same instance will be resolved for each resolution of this dependency during a single
resolution chain
- ContainerScoped
- The dependency container will return the same instance each time a resolution for this dependency
is requested. This is similar to being a singleton, however if a child container is made, that child
container will resolve an instance unique to it.
#### Usage
```typescript
@scoped(Lifecycle.ContainerScoped)
class Foo {}
```
## Container
The general principle behind [Inversion of Control](https://en.wikipedia.org/wiki/Inversion_of_control) (IoC) containers
is you give the container a _token_, and in exchange you get an instance/value. Our container automatically figures out the tokens most of the time, with 2 major exceptions, interfaces and non-class types, which require the `@inject()` decorator to be used on the constructor parameter to be injected (see above).
In order for your decorated classes to be used, they need to be registered with the container. Registrations take the
form of a Token/Provider pair, so we need to take a brief diversion to discuss tokens and providers.
### Injection Token
A token may be either a string, a symbol, a class constructor, or a instance of [`DelayedConstructor`](#circular-dependencies).
```typescript
type InjectionToken<T = any> =
| constructor<T>
| DelayedConstructor<T>
| string
| symbol;
```
### Providers
Our container has the notion of a _provider_. A provider is registered with the DI
container and provides the container the information
needed to resolve an instance for a given token. In our implementation, we have the following 4
provider types:
#### Class Provider
```TypeScript
{
token: InjectionToken<T>;
useClass: constructor<T>;
}
```
This provider is used to resolve classes by their constructor. When registering a class provider
you can simply use the constructor itself, unless of course you're making an alias (a
class provider where the token isn't the class itself).
#### Value Provider
```TypeScript
{
token: InjectionToken<T>;
useValue: T
}
```
This provider is used to resolve a token to a given value. This is useful for registering
constants, or things that have a already been instantiated in a particular way.
#### Factory provider
```TypeScript
{
token: InjectionToken<T>;
useFactory: FactoryFunction<T>;
}
```
This provider is used to resolve a token using a given factory. The factory has full access
to the dependency container.
We have provided 2 factories for you to use, though any function that matches the `FactoryFunction<T>` signature
can be used as a factory:
```typescript
type FactoryFunction<T> = (dependencyContainer: DependencyContainer) => T;
```
##### instanceCachingFactory
This factory is used to lazy construct an object and cache result, returning the single instance for each subsequent
resolution. This is very similar to `@singleton()`
```typescript
import {instanceCachingFactory} from "tsyringe";
{
token: "SingletonFoo";
useFactory: instanceCachingFactory<Foo>(c => c.resolve(Foo));
}
```
##### instancePerContainerCachingFactory
This factory is used to lazy construct an object and cache result per `DependencyContainer`, returning the single instance for each subsequent
resolution from a single container. This is very similar to `@scoped(Lifecycle.ContainerScoped)`
```typescript
import {instancePerContainerCachingFactory} from "tsyringe";
{
token: "ContainerScopedFoo";
useFactory: instancePerContainerCachingFactory<Foo>(c => c.resolve(Foo));
}
```
##### predicateAwareClassFactory
This factory is used to provide conditional behavior upon resolution. It caches the result by default, but
has an optional parameter to resolve fresh each time.
```typescript
import {predicateAwareClassFactory} from "tsyringe";
{
token: "FooHttp",
useFactory: predicateAwareClassFactory<Foo>(
c => c.resolve(Bar).useHttps, // Predicate for evaluation
FooHttps, // A FooHttps will be resolved from the container if predicate is true
FooHttp // A FooHttp will be resolved if predicate is false
);
}
```
#### Token Provider
```TypeScript
{
token: InjectionToken<T>;
useToken: InjectionToken<T>;
}
```
This provider can be thought of as a redirect or an alias, it simply states that given token _x_,
resolve using token _y_.
### Register
The normal way to achieve this is to add `DependencyContainer.register()` statements somewhere
in your program some time before your first decorated class is instantiated.
```typescript
container.register<Foo>(Foo, {useClass: Foo});
container.register<Bar>(Bar, {useValue: new Bar()});
container.register<Baz>("MyBaz", {useValue: new Baz()});
```
#### Registration options
As an optional parameter to `.register()` you may provide [`RegistrationOptions`](./src/types/registration-options.ts)
which customize how the registration behaves. See the linked source code for up to date documentation
on available options.
### Registry
You can also mark up any class with the `@registry()` decorator to have the given providers registered
upon importing the marked up class. `@registry()` takes an array of providers like so:
```TypeScript
@registry([
{ token: Foobar, useClass: Foobar },
{ token: "theirClass", useFactory: (c) => {
return new TheirClass( "arg" )
},
}
])
class MyClass {}
```
This is useful when you want to [register multiple classes for the same token](#register).
You can also use it to register and declare objects that wouldn't be imported by anything else,
such as more classes annotated with `@registry` or that are otherwise responsible for registering objects.
Lastly you might choose to use this to register 3rd party instances instead of the `container.register(...)` method.
note: if you want this class to be `@injectable` you must put the decorator before `@registry`, this annotation is not
required though.
### Resolution
Resolution is the process of exchanging a token for an instance. Our container will recursively fulfill the
dependencies of the token being resolved in order to return a fully constructed object.
The typical way that an object is resolved is from the container using `resolve()`.
```typescript
const myFoo = container.resolve(Foo);
const myBar = container.resolve<Bar>("Bar");
```
You can also resolve all instances registered against a given token with `resolveAll()`.
```typescript
interface Bar {}
@injectable()
class Foo implements Bar {}
@injectable()
class Baz implements Bar {}
@registry([
// registry is optional, all you need is to use the same token when registering
{token: "Bar", useToken: Foo}, // can be any provider
{token: "Bar", useToken: Baz}
])
class MyRegistry {}
const myBars = container.resolveAll<Bar>("Bar"); // myBars type is Bar[]
```
You can also add one or more `InjectionToken` to the registration of your class directly in the `@injectable()` decorator:
```typescript
interface Bar {}
@injectable({token: "Bar"})
class Foo implements Bar {}
@injectable({token: ["Bar", "Bar2"]})
class Baz implements Bar {}
class MyRegistry {}
const myBars = container.resolveAll<Bar>("Bar"); // myBars type is Bar[], contains 2 instances
const myBars2 = container.resolveAll<Bar>("Bar2"); // myBars2 type is Bar[], contains 1 instance
```
### IsRegistered
You can check if a token is registered in the container using `isRegistered()`.
```typescript
const isRegistered = container.isRegistered("Bar"); // true
```
If you have a childContainer and want to recursively check if a token is registered in the parent container, you can pass `true` as a second parameter of `isRegistered()`.
```typescript
class Bar {}
container.register(Bar, {useClass: Bar});
const childContainer = container.createChildContainer();
childContainer.isRegistered(Bar); // false
childContainer.isRegistered(Bar, true); // true
```
### Interception
Interception allows you to register a callback that will be called before or after the resolution of a specific token.
This callback can be registered to execute only once (to perform initialization, for example),
on each resolution to do logging, for example.
`beforeResolution` is used to take an action before an object is resolved.
```typescript
class Bar {}
container.beforeResolution(
Bar,
// Callback signature is (token: InjectionToken<T>, resolutionType: ResolutionType) => void
() => {
console.log("Bar is about to be resolved!");
},
{frequency: "Always"}
);
```
`afterResolution` is used to take an action after the object has been resolved.
```typescript
class Bar {
public init(): void {
// ...
}
}
container.afterResolution(
Bar,
// Callback signature is (token: InjectionToken<T>, result: T | T[], resolutionType: ResolutionType)
(_t, result) => {
result.init();
},
{frequency: "Once"}
);
```
### Child Containers
If you need to have multiple containers that have disparate sets of registrations, you can create child containers:
```typescript
const childContainer1 = container.createChildContainer();
const childContainer2 = container.createChildContainer();
const grandChildContainer = childContainer1.createChildContainer();
```
Each of the child containers will have independent registrations, but if a registration is absent in the child container at resolution, the token will be resolved from the parent. This allows for a set of common services to be registered at the root, with specialized services registered on the child. This can be useful, for example, if you wish to create per-request containers that use common stateless services from the root container.
### Clearing Instances
The `container.clearInstances()` method allows you to clear all previously created and registered instances:
```typescript
class Foo {}
@singleton()
class Bar {}
const myFoo = new Foo();
container.registerInstance("Test", myFoo);
const myBar = container.resolve(Bar);
container.clearInstances();
container.resolve("Test"); // throws error
const myBar2 = container.resolve(Bar); // myBar !== myBar2
const myBar3 = container.resolve(Bar); // myBar2 === myBar3
```
Unlike with `container.reset()`, the registrations themselves are not cleared.
This is especially useful for testing:
```typescript
@singleton()
class Foo {}
beforeEach(() => {
container.clearInstances();
});
test("something", () => {
container.resolve(Foo); // will be a new singleton instance in every test
});
```
# Circular dependencies
Sometimes you need to inject services that have cyclic dependencies between them. As an example:
```typescript
@injectable()
export class Foo {
constructor(public bar: Bar) {}
}
@injectable()
export class Bar {
constructor(public foo: Foo) {}
}
```
Trying to resolve one of the services will end in an error because always one of the constructor will not be fully defined to construct the other one.
```typescript
container.resolve(Foo);
```
```
Error: Cannot inject the dependency at position #0 of "Foo" constructor. Reason:
Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.
```
### The `delay` helper function
The best way to deal with this situation is to do some kind of refactor to avoid the cyclic dependencies. Usually this implies introducing additional services to cut the cycles.
But when refactor is not an option you can use the `delay` function helper. The `delay` function wraps the constructor in an instance of `DelayedConstructor`.
The _delayed constructor_ is a kind of special `InjectionToken` that will eventually be evaluated to construct an intermediate proxy object wrapping a factory for the real object.
When the proxy object is used for the first time it will construct a real object using this factory and any usage will be forwarded to the real object.
```typescript
@injectable()
export class Foo {
constructor(@inject(delay(() => Bar)) public bar: Bar) {}
}
@injectable()
export class Bar {
constructor(@inject(delay(() => Foo)) public foo: Foo) {}
}
// construction of foo is possible
const foo = container.resolve(Foo);
// property bar will hold a proxy that looks and acts as a real Bar instance.
foo.bar instanceof Bar; // true
```
### Interfaces and circular dependencies
We can rest in the fact that a `DelayedConstructor` could be used in the same contexts that a constructor and will be handled transparently by tsyringe. Such idea is used in the next example involving interfaces:
```typescript
export interface IFoo {}
@injectable()
@registry([
{
token: "IBar",
// `DelayedConstructor` of Bar will be the token
useToken: delay(() => Bar)
}
])
export class Foo implements IFoo {
constructor(@inject("IBar") public bar: IBar) {}
}
export interface IBar {}
@injectable()
@registry([
{
token: "IFoo",
useToken: delay(() => Foo)
}
])
export class Bar implements IBar {
constructor(@inject("IFoo") public foo: IFoo) {}
}
```
# Disposable instances
All instances created by the container that implement the [`Disposable`](./src/types/disposable.ts)
interface will automatically be disposed of when the container is disposed.
```typescript
container.dispose();
```
or to await all asynchronous disposals:
```typescript
await container.dispose();
```
# Full examples
## Example without interfaces
Since classes have type information at runtime, we can resolve them without any
extra information.
```typescript
// Foo.ts
export class Foo {}
```
```typescript
// Bar.ts
import {Foo} from "./Foo";
import {injectable} from "tsyringe";
@injectable()
export class Bar {
constructor(public myFoo: Foo) {}
}
```
```typescript
// main.ts
import "reflect-metadata";
import {container} from "tsyringe";
import {Bar} from "./Bar";
const myBar = container.resolve(Bar);
// myBar.myFoo => An instance of Foo
```
## Example with interfaces
Interfaces don't have type information at runtime, so we need to decorate them
with `@inject(...)` so the container knows how to resolve them.
```typescript
// SuperService.ts
export interface SuperService {
// ...
}
```
```typescript
// TestService.ts
import {SuperService} from "./SuperService";
export class TestService implements SuperService {
//...
}
```
```typescript
// Client.ts
import {injectable, inject} from "tsyringe";
@injectable()
export class Client {
constructor(@inject("SuperService") private service: SuperService) {}
}
```
```typescript
// main.ts
import "reflect-metadata";
import {Client} from "./Client";
import {TestService} from "./TestService";
import {container} from "tsyringe";
container.register("SuperService", {
useClass: TestService
});
const client = container.resolve(Client);
// client's dependencies will have been resolved
```
## Injecting primitive values (Named injection)
Primitive values can also be injected by utilizing named injection
```typescript
import {singleton, inject} from "tsyringe";
@singleton()
class Foo {
private str: string;
constructor(@inject("SpecialString") value: string) {
this.str = value;
}
}
// some other file
import "reflect-metadata";
import {container} from "tsyringe";
import {Foo} from "./foo";
const str = "test";
container.register("SpecialString", {useValue: str});
const instance = container.resolve(Foo);
```
# Non goals
The following is a list of features we explicitly plan on not adding:
- Property Injection
# How to release
The library uses the step action `EndBug/version-check` which requires these two conditions to be met to execute:
1. Have a commit named: `Release X.Y.Z`
2. In the commit, have a version change in the `package.json` file.
# Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit [https://cla.microsoft.com](https://cla.microsoft.com).
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
@@ -0,0 +1,24 @@
var $97cebfa4133ebec3$exports = require("./LiveAnnouncer.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "announce", () => $97cebfa4133ebec3$exports.announce);
$parcel$export(module.exports, "clearAnnouncer", () => $97cebfa4133ebec3$exports.clearAnnouncer);
$parcel$export(module.exports, "destroyAnnouncer", () => $97cebfa4133ebec3$exports.destroyAnnouncer);
/*
* 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.
*/
//# sourceMappingURL=main.js.map
@@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = glyf2svg;
var _contours2svg = _interopRequireDefault(require("./contours2svg"));
var _transformGlyfContours = _interopRequireDefault(require("./transformGlyfContours"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file glyf转换svg,复合字形轮廓需要ttfObject支持
* @author mengke01(kekee000@gmail.com)
*
* thanks to:
* ynakajima/ttf.js
* https://github.com/ynakajima/ttf.js
*/
/**
* glyf转换svg
*
* @param {Object} glyf 解析后的glyf结构
* @param {Object} ttf ttf对象
* @return {string} svg文本
*/
function glyf2svg(glyf, ttf) {
if (!glyf) {
return '';
}
var pathArray = [];
if (!glyf.compound) {
if (glyf.contours && glyf.contours.length) {
pathArray.push((0, _contours2svg.default)(glyf.contours));
}
} else {
var contours = (0, _transformGlyfContours.default)(glyf, ttf);
if (contours && contours.length) {
pathArray.push((0, _contours2svg.default)(contours));
}
}
return pathArray.join(' ');
}
@@ -0,0 +1 @@
{"version":3,"file":"by-source.d.ts","sourceRoot":"","sources":["../src/by-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,MAAM,MAAM,GAAG,cAAc,EAAE,EAAE,CAAC;AAIxC,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EAAE,EACtC,KAAK,EAAE,OAAO,EAAE,GACf,MAAM,EAAE,CA4BV"}
@@ -0,0 +1,55 @@
RegExp.prototype.flags <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![Build Status][travis-svg]][travis-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
[![browser support][testling-svg]][testling-url]
An ES6 spec-compliant `RegExp.prototype.flags` shim. Invoke its "shim" method to shim RegExp.prototype.flags if it is unavailable.
*Note*: `RegExp#flags` requires a true ES5 environment - specifically, one with ES5 getters.
This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES5-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-get-regexp.prototype.flags).
Most common usage:
```js
var flags = require('regexp.prototype.flags');
var assert = require('assert');
assert(flags(/a/) === '');
assert(flags(new RegExp('a')) === '');
assert(flags(/a/mig) === 'gim');
assert(flags(new RegExp('a', 'mig')) === 'gim');
if (!RegExp.prototype.flags) {
flags.shim();
}
assert(flags(/a/) === /a/.flags);
assert(flags(new RegExp('a')) === new RegExp('a').flags);
assert(flags(/a/mig) === /a/mig.flags);
assert(flags(new RegExp('a', 'mig')) === new RegExp('a', 'mig').flags);
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.com/package/regexp.prototype.flags
[npm-version-svg]: http://versionbadg.es/es-shims/RegExp.prototype.flags.svg
[travis-svg]: https://travis-ci.org/es-shims/RegExp.prototype.flags.svg
[travis-url]: https://travis-ci.org/es-shims/RegExp.prototype.flags
[deps-svg]: https://david-dm.org/es-shims/RegExp.prototype.flags.svg
[deps-url]: https://david-dm.org/es-shims/RegExp.prototype.flags
[dev-deps-svg]: https://david-dm.org/es-shims/RegExp.prototype.flags/dev-status.svg
[dev-deps-url]: https://david-dm.org/es-shims/RegExp.prototype.flags#info=devDependencies
[testling-svg]: https://ci.testling.com/es-shims/RegExp.prototype.flags.png
[testling-url]: https://ci.testling.com/es-shims/RegExp.prototype.flags
[npm-badge-png]: https://nodei.co/npm/regexp.prototype.flags.png?downloads=true&stars=true
[license-image]: http://img.shields.io/npm/l/regexp.prototype.flags.svg
[license-url]: LICENSE
[downloads-image]: http://img.shields.io/npm/dm/regexp.prototype.flags.svg
[downloads-url]: http://npm-stat.com/charts.html?package=regexp.prototype.flags
@@ -0,0 +1,46 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/dropdown-trigger.tsx
var dropdown_trigger_exports = {};
__export(dropdown_trigger_exports, {
default: () => dropdown_trigger_default
});
module.exports = __toCommonJS(dropdown_trigger_exports);
var import_popover = require("@heroui/popover");
// src/dropdown-context.ts
var import_react_utils = require("@heroui/react-utils");
var [DropdownProvider, useDropdownContext] = (0, import_react_utils.createContext)({
name: "DropdownContext",
errorMessage: "useDropdownContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Dropdown />`"
});
// src/dropdown-trigger.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var DropdownTrigger = (props) => {
const { getMenuTriggerProps } = useDropdownContext();
const { children, ...otherProps } = props;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popover.PopoverTrigger, { ...getMenuTriggerProps(otherProps), children });
};
DropdownTrigger.displayName = "HeroUI.DropdownTrigger";
var dropdown_trigger_default = DropdownTrigger;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
@@ -0,0 +1,43 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("eslint-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `String.raw` method.",
category: "ES2015",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-string-raw.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"() {
const tracker = new ReferenceTracker(context.getScope())
for (const { node, path } of tracker.iterateGlobalReferences({
String: {
raw: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,8 @@
function _defineAccessor(e, r, n, t) {
var c = {
configurable: !0,
enumerable: !0
};
return c[e] = t, Object.defineProperty(r, n, c);
}
export { _defineAccessor as default };
@@ -0,0 +1,140 @@
/*
* 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.
*/ let $fb18d541ea1ad717$var$formatterCache = new Map();
class $fb18d541ea1ad717$export$ad991b66133851cf {
/** Formats a date as a string according to the locale and format options passed to the constructor. */ format(value) {
return this.formatter.format(value);
}
/** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */ formatToParts(value) {
return this.formatter.formatToParts(value);
}
/** Formats a date range as a string. */ formatRange(start, end) {
// @ts-ignore
if (typeof this.formatter.formatRange === 'function') // @ts-ignore
return this.formatter.formatRange(start, end);
if (end < start) throw new RangeError('End date must be >= start date');
// Very basic fallback for old browsers.
return `${this.formatter.format(start)} \u{2013} ${this.formatter.format(end)}`;
}
/** Formats a date range as an array of parts. */ formatRangeToParts(start, end) {
// @ts-ignore
if (typeof this.formatter.formatRangeToParts === 'function') // @ts-ignore
return this.formatter.formatRangeToParts(start, end);
if (end < start) throw new RangeError('End date must be >= start date');
let startParts = this.formatter.formatToParts(start);
let endParts = this.formatter.formatToParts(end);
return [
...startParts.map((p)=>({
...p,
source: 'startRange'
})),
{
type: 'literal',
value: " \u2013 ",
source: 'shared'
},
...endParts.map((p)=>({
...p,
source: 'endRange'
}))
];
}
/** Returns the resolved formatting options based on the values passed to the constructor. */ resolvedOptions() {
let resolvedOptions = this.formatter.resolvedOptions();
if ($fb18d541ea1ad717$var$hasBuggyResolvedHourCycle()) {
if (!this.resolvedHourCycle) this.resolvedHourCycle = $fb18d541ea1ad717$var$getResolvedHourCycle(resolvedOptions.locale, this.options);
resolvedOptions.hourCycle = this.resolvedHourCycle;
resolvedOptions.hour12 = this.resolvedHourCycle === 'h11' || this.resolvedHourCycle === 'h12';
}
// Safari uses a different name for the Ethiopic (Amete Alem) calendar.
// https://bugs.webkit.org/show_bug.cgi?id=241564
if (resolvedOptions.calendar === 'ethiopic-amete-alem') resolvedOptions.calendar = 'ethioaa';
return resolvedOptions;
}
constructor(locale, options = {}){
this.formatter = $fb18d541ea1ad717$var$getCachedDateFormatter(locale, options);
this.options = options;
}
}
// There are multiple bugs involving the hour12 and hourCycle options in various browser engines.
// - Chrome [1] (and the ECMA 402 spec [2]) resolve hour12: false in English and other locales to h24 (24:00 - 23:59)
// rather than h23 (00:00 - 23:59). Same can happen with hour12: true in French, which Chrome resolves to h11 (00:00 - 11:59)
// rather than h12 (12:00 - 11:59).
// - WebKit returns an incorrect hourCycle resolved option in the French locale due to incorrect parsing of 'h' literal
// in the resolved pattern. It also formats incorrectly when specifying the hourCycle option for the same reason. [3]
// [1] https://bugs.chromium.org/p/chromium/issues/detail?id=1045791
// [2] https://github.com/tc39/ecma402/issues/402
// [3] https://bugs.webkit.org/show_bug.cgi?id=229313
// https://github.com/unicode-org/cldr/blob/018b55eff7ceb389c7e3fc44e2f657eae3b10b38/common/supplemental/supplementalData.xml#L4774-L4802
const $fb18d541ea1ad717$var$hour12Preferences = {
true: {
// Only Japanese uses the h11 style for 12 hour time. All others use h12.
ja: 'h11'
},
false: {
}
};
function $fb18d541ea1ad717$var$getCachedDateFormatter(locale, options = {}) {
// Work around buggy hour12 behavior in Chrome / ECMA 402 spec by using hourCycle instead.
// Only apply the workaround if the issue is detected, because the hourCycle option is buggy in Safari.
if (typeof options.hour12 === 'boolean' && $fb18d541ea1ad717$var$hasBuggyHour12Behavior()) {
options = {
...options
};
let pref = $fb18d541ea1ad717$var$hour12Preferences[String(options.hour12)][locale.split('-')[0]];
let defaultHourCycle = options.hour12 ? 'h12' : 'h23';
options.hourCycle = pref !== null && pref !== void 0 ? pref : defaultHourCycle;
delete options.hour12;
}
let cacheKey = locale + (options ? Object.entries(options).sort((a, b)=>a[0] < b[0] ? -1 : 1).join() : '');
if ($fb18d541ea1ad717$var$formatterCache.has(cacheKey)) return $fb18d541ea1ad717$var$formatterCache.get(cacheKey);
let numberFormatter = new Intl.DateTimeFormat(locale, options);
$fb18d541ea1ad717$var$formatterCache.set(cacheKey, numberFormatter);
return numberFormatter;
}
let $fb18d541ea1ad717$var$_hasBuggyHour12Behavior = null;
function $fb18d541ea1ad717$var$hasBuggyHour12Behavior() {
if ($fb18d541ea1ad717$var$_hasBuggyHour12Behavior == null) $fb18d541ea1ad717$var$_hasBuggyHour12Behavior = new Intl.DateTimeFormat('en-US', {
hour: 'numeric',
hour12: false
}).format(new Date(2020, 2, 3, 0)) === '24';
return $fb18d541ea1ad717$var$_hasBuggyHour12Behavior;
}
let $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle = null;
function $fb18d541ea1ad717$var$hasBuggyResolvedHourCycle() {
if ($fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle == null) $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle = new Intl.DateTimeFormat('fr', {
hour: 'numeric',
hour12: false
}).resolvedOptions().hourCycle === 'h12';
return $fb18d541ea1ad717$var$_hasBuggyResolvedHourCycle;
}
function $fb18d541ea1ad717$var$getResolvedHourCycle(locale, options) {
if (!options.timeStyle && !options.hour) return undefined;
// Work around buggy results in resolved hourCycle and hour12 options in WebKit.
// Format the minimum possible hour and maximum possible hour in a day and parse the results.
locale = locale.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, '');
locale += (locale.includes('-u-') ? '' : '-u') + '-nu-latn';
let formatter = $fb18d541ea1ad717$var$getCachedDateFormatter(locale, {
...options,
timeZone: undefined // use local timezone
});
let min = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 0)).find((p)=>p.type === 'hour').value, 10);
let max = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 23)).find((p)=>p.type === 'hour').value, 10);
if (min === 0 && max === 23) return 'h23';
if (min === 24 && max === 23) return 'h24';
if (min === 0 && max === 11) return 'h11';
if (min === 12 && max === 11) return 'h12';
throw new Error('Unexpected hour cycle result');
}
export {$fb18d541ea1ad717$export$ad991b66133851cf as DateFormatter};
//# sourceMappingURL=DateFormatter.module.js.map
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_ts_values.cjs",
"module": "../../esm/_ts_values.js"
}
@@ -0,0 +1,39 @@
{
"name": "crypto-js",
"version": "4.2.0",
"description": "JavaScript library of crypto standards.",
"license": "MIT",
"homepage": "http://github.com/brix/crypto-js",
"repository": {
"type": "git",
"url": "http://github.com/brix/crypto-js.git"
},
"keywords": [
"security",
"crypto",
"Hash",
"MD5",
"SHA1",
"SHA-1",
"SHA256",
"SHA-256",
"RC4",
"Rabbit",
"AES",
"DES",
"PBKDF2",
"HMAC",
"OFB",
"CFB",
"CTR",
"CBC",
"Base64",
"Base64url"
],
"main": "index.js",
"dependencies": {},
"browser": {
"crypto": false
},
"ignore": []
}
@@ -0,0 +1,66 @@
{
"name": "@heroui/navbar",
"version": "2.2.9",
"description": "A responsive navigation header positioned on top side of your page that includes support for branding, links, navigation, collapse and more.",
"keywords": [
"navbar"
],
"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/navbar"
},
"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",
"framer-motion": ">=11.5.6 || >=12.0.0-alpha.1",
"@heroui/theme": ">=2.4.0",
"@heroui/system": ">=2.4.0"
},
"dependencies": {
"@react-aria/focus": "3.19.0",
"@react-aria/interactions": "3.22.5",
"@react-aria/button": "3.11.0",
"@react-aria/overlays": "3.24.0",
"@react-aria/utils": "3.26.0",
"@react-stately/toggle": "3.8.0",
"@react-stately/utils": "3.10.5",
"@heroui/shared-utils": "2.1.3",
"@heroui/react-utils": "2.1.4",
"@heroui/framer-utils": "2.1.7",
"@heroui/use-scroll-position": "2.1.2",
"@heroui/dom-animation": "2.1.2"
},
"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,7 @@
import { getType } from "./getType.mjs";
function isAsyncFunction(value) {
return getType(value) === "AsyncFunction";
}
export {
isAsyncFunction
};
@@ -0,0 +1,36 @@
"use strict"
const { READ } = require("@eslint-community/eslint-utils")
/**
* @satisfies {import('../types.js').SupportVersionTraceMap}
*/
const diagnostics_channel = {
hasSubscribers: { [READ]: { supported: ["15.1.0", "14.17.0"] } },
channel: { [READ]: { supported: ["15.1.0", "14.17.0"] } },
subscribe: { [READ]: { supported: ["18.7.0", "16.17.0"] } },
unsubscribe: { [READ]: { supported: ["18.7.0", "16.17.0"] } },
tracingChannel: { [READ]: { experimental: ["19.9.0"] } },
Channel: { [READ]: { supported: ["15.1.0", "14.17.0"] } },
TracingChannel: { [READ]: { experimental: ["19.9.0"] } },
}
/**
* @satisfies {import('../types.js').SupportVersionTraceMap}
*/
module.exports = {
diagnostics_channel: {
[READ]: {
experimental: ["15.1.0", "14.17.0"],
supported: ["19.2.0", "18.13.0"],
},
...diagnostics_channel,
},
"node:diagnostics_channel": {
[READ]: {
experimental: ["15.1.0", "14.17.0"],
supported: ["19.2.0", "18.13.0"],
},
...diagnostics_channel,
},
}
@@ -0,0 +1,109 @@
import { Transform } from './index.js';
import { BlockMarkers, Block, Line, Markers } from '../primitives.js';
import { rewireSource } from '../util.js';
interface Width {
start: number;
tag: number;
type: number;
name: number;
}
const zeroWidth = {
start: 0,
tag: 0,
type: 0,
name: 0,
};
const getWidth =
(markers = Markers) =>
(w: Width, { tokens: t }: Line) => ({
start: t.delimiter === markers.start ? t.start.length : w.start,
tag: Math.max(w.tag, t.tag.length),
type: Math.max(w.type, t.type.length),
name: Math.max(w.name, t.name.length),
});
const space = (len: number) => ''.padStart(len, ' ');
export default function align(markers = Markers): Transform {
let intoTags = false;
let w: Width;
function update(line: Line): Line {
const tokens = { ...line.tokens };
if (tokens.tag !== '') intoTags = true;
const isEmpty =
tokens.tag === '' &&
tokens.name === '' &&
tokens.type === '' &&
tokens.description === '';
// dangling '*/'
if (tokens.end === markers.end && isEmpty) {
tokens.start = space(w.start + 1);
return { ...line, tokens };
}
switch (tokens.delimiter) {
case markers.start:
tokens.start = space(w.start);
break;
case markers.delim:
tokens.start = space(w.start + 1);
break;
default:
tokens.delimiter = '';
tokens.start = space(w.start + 2); // compensate delimiter
}
if (!intoTags) {
tokens.postDelimiter = tokens.description === '' ? '' : ' ';
return { ...line, tokens };
}
const nothingAfter = {
delim: false,
tag: false,
type: false,
name: false,
};
if (tokens.description === '') {
nothingAfter.name = true;
tokens.postName = '';
if (tokens.name === '') {
nothingAfter.type = true;
tokens.postType = '';
if (tokens.type === '') {
nothingAfter.tag = true;
tokens.postTag = '';
if (tokens.tag === '') {
nothingAfter.delim = true;
}
}
}
}
tokens.postDelimiter = nothingAfter.delim ? '' : ' ';
if (!nothingAfter.tag)
tokens.postTag = space(w.tag - tokens.tag.length + 1);
if (!nothingAfter.type)
tokens.postType = space(w.type - tokens.type.length + 1);
if (!nothingAfter.name)
tokens.postName = space(w.name - tokens.name.length + 1);
return { ...line, tokens };
}
return ({ source, ...fields }: Block): Block => {
w = source.reduce(getWidth(markers), { ...zeroWidth });
return rewireSource({ ...fields, source: source.map(update) });
};
}
@@ -0,0 +1,15 @@
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,105 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _once = require('./internal/once.js');
var _once2 = _interopRequireDefault(_once);
var _onlyOnce = require('./internal/onlyOnce.js');
var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Runs the `tasks` array of functions in series, each passing their results to
* the next in the array. However, if any of the `tasks` pass an error to their
* own callback, the next function is not executed, and the main `callback` is
* immediately called with the error.
*
* @name waterfall
* @static
* @memberOf module:ControlFlow
* @method
* @category Control Flow
* @param {Array} tasks - An array of [async functions]{@link AsyncFunction}
* to run.
* Each function should complete with any number of `result` values.
* The `result` values will be passed as arguments, in order, to the next task.
* @param {Function} [callback] - An optional callback to run once all the
* functions have completed. This will be passed the results of the last task's
* callback. Invoked with (err, [results]).
* @returns {Promise} a promise, if a callback is omitted
* @example
*
* async.waterfall([
* function(callback) {
* callback(null, 'one', 'two');
* },
* function(arg1, arg2, callback) {
* // arg1 now equals 'one' and arg2 now equals 'two'
* callback(null, 'three');
* },
* function(arg1, callback) {
* // arg1 now equals 'three'
* callback(null, 'done');
* }
* ], function (err, result) {
* // result now equals 'done'
* });
*
* // Or, with named functions:
* async.waterfall([
* myFirstFunction,
* mySecondFunction,
* myLastFunction,
* ], function (err, result) {
* // result now equals 'done'
* });
* function myFirstFunction(callback) {
* callback(null, 'one', 'two');
* }
* function mySecondFunction(arg1, arg2, callback) {
* // arg1 now equals 'one' and arg2 now equals 'two'
* callback(null, 'three');
* }
* function myLastFunction(arg1, callback) {
* // arg1 now equals 'three'
* callback(null, 'done');
* }
*/
function waterfall(tasks, callback) {
callback = (0, _once2.default)(callback);
if (!Array.isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions'));
if (!tasks.length) return callback();
var taskIndex = 0;
function nextTask(args) {
var task = (0, _wrapAsync2.default)(tasks[taskIndex++]);
task(...args, (0, _onlyOnce2.default)(next));
}
function next(err, ...args) {
if (err === false) return;
if (err || taskIndex === tasks.length) {
return callback(err, ...args);
}
nextTask(args);
}
nextTask([]);
}
exports.default = (0, _awaitify2.default)(waterfall);
module.exports = exports.default;
@@ -0,0 +1,55 @@
# available-typed-arrays <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]
Returns an array of Typed Array names that are available in the current environment.
## Example
```js
var availableTypedArrays = require('available-typed-arrays');
var assert = require('assert');
assert.deepStrictEqual(
availableTypedArrays().sort(),
[
'Int8Array',
'Uint8Array',
'Uint8ClampedArray',
'Int16Array',
'Uint16Array',
'Int32Array',
'Uint32Array',
'Float32Array',
'Float64Array',
'BigInt64Array',
'BigUint64Array'
].sort()
);
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[1]: https://npmjs.org/package/available-typed-arrays
[2]: https://versionbadg.es/inspect-js/available-typed-arrays.svg
[5]: https://david-dm.org/inspect-js/available-typed-arrays.svg
[6]: https://david-dm.org/inspect-js/available-typed-arrays
[7]: https://david-dm.org/inspect-js/available-typed-arrays/dev-status.svg
[8]: https://david-dm.org/inspect-js/available-typed-arrays#info=devDependencies
[11]: https://nodei.co/npm/available-typed-arrays.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/available-typed-arrays.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/available-typed-arrays.svg
[downloads-url]: https://npm-stat.com/charts.html?package=available-typed-arrays
[codecov-image]: https://codecov.io/gh/inspect-js/available-typed-arrays/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/available-typed-arrays/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/available-typed-arrays
[actions-url]: https://github.com/inspect-js/available-typed-arrays/actions
@@ -0,0 +1,135 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/hidden-select.tsx
var hidden_select_exports = {};
__export(hidden_select_exports, {
HiddenSelect: () => HiddenSelect,
useHiddenSelect: () => useHiddenSelect
});
module.exports = __toCommonJS(hidden_select_exports);
var import_utils2 = require("@react-aria/utils");
var import_visually_hidden = require("@react-aria/visually-hidden");
var import_form2 = require("@react-aria/form");
// src/use-select.ts
var import_system = require("@heroui/system");
var import_theme = require("@heroui/theme");
var import_react_utils = require("@heroui/react-utils");
var import_react = require("react");
var import_use_aria_button = require("@heroui/use-aria-button");
var import_focus = require("@react-aria/focus");
var import_shared_utils = require("@heroui/shared-utils");
var import_utils = require("@react-aria/utils");
var import_interactions = require("@react-aria/interactions");
var import_use_aria_multiselect = require("@heroui/use-aria-multiselect");
var import_use_safe_layout_effect = require("@heroui/use-safe-layout-effect");
var import_aria_utils = require("@heroui/aria-utils");
var import_form = require("@heroui/form");
var selectData = /* @__PURE__ */ new WeakMap();
// src/hidden-select.tsx
var import_jsx_runtime = require("react/jsx-runtime");
function useHiddenSelect(props, state, triggerRef) {
var _a;
let data = selectData.get(state) || {};
let {
autoComplete,
name = data.name,
isDisabled = data.isDisabled,
selectionMode,
onChange
} = props;
let { validationBehavior, isRequired, isInvalid } = data;
let { visuallyHiddenProps } = (0, import_visually_hidden.useVisuallyHidden)();
(0, import_utils2.useFormReset)(props.selectRef, state.selectedKeys, state.setSelectedKeys);
(0, import_form2.useFormValidation)(
{
validationBehavior,
focus: () => {
var _a2;
return (_a2 = triggerRef.current) == null ? void 0 : _a2.focus();
}
},
state,
props.selectRef
);
return {
containerProps: {
...visuallyHiddenProps,
"aria-hidden": true,
["data-a11y-ignore"]: "aria-hidden-focus"
},
inputProps: {
style: { display: "none" }
},
selectProps: {
autoComplete,
disabled: isDisabled,
"aria-invalid": isInvalid || void 0,
"aria-required": isRequired && validationBehavior === "aria" || void 0,
required: isRequired && validationBehavior === "native",
name,
tabIndex: -1,
value: selectionMode === "multiple" ? [...state.selectedKeys].map((k) => String(k)) : (_a = [...state.selectedKeys][0]) != null ? _a : "",
multiple: selectionMode === "multiple",
onChange: (e) => {
state.setSelectedKeys(e.target.value);
onChange == null ? void 0 : onChange(e);
}
}
};
}
function HiddenSelect(props) {
var _a;
let { state, triggerRef, selectRef, label, name, isDisabled } = props;
let { containerProps, selectProps } = useHiddenSelect({ ...props, selectRef }, state, triggerRef);
if (state.collection.size <= 300) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...containerProps, "data-testid": "hidden-select-container", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { children: [
label,
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("select", { ...selectProps, ref: selectRef, children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {}),
[...state.collection.getKeys()].map((key) => {
let item = state.collection.getItem(key);
if ((item == null ? void 0 : item.type) === "item") {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: item.key, children: item.textValue }, item.key);
}
})
] })
] }) });
} else if (name) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"input",
{
autoComplete: selectProps.autoComplete,
disabled: isDisabled,
name,
type: "hidden",
value: (_a = [...state.selectedKeys].join(",")) != null ? _a : ""
}
);
}
return null;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
HiddenSelect,
useHiddenSelect
});
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more