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

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

No files matched your search

@@ -0,0 +1,96 @@
const description =
' See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.'
warnCjsUsage()
// type utils
module.exports.defineConfig = (config) => config
// proxy cjs utils (sync functions)
Object.assign(module.exports, require('./dist/node-cjs/publicUtils.cjs'))
// async functions, can be redirect from ESM build
const asyncFunctions = [
'build',
'createServer',
'preview',
'transformWithEsbuild',
'resolveConfig',
'optimizeDeps',
'formatPostcssSourceMap',
'loadConfigFromFile',
'preprocessCSS',
'createBuilder',
'runnerImport',
]
asyncFunctions.forEach((name) => {
module.exports[name] = (...args) =>
import('./dist/node/index.js').then((i) => i[name](...args))
})
// variables and sync functions that cannot be used from cjs build
const disallowedVariables = [
// was not exposed in cjs from the beginning
'parseAst',
'parseAstAsync',
'buildErrorMessage',
'sortUserPlugins',
// Environment API related variables that are too big to include in the cjs build
'DevEnvironment',
'BuildEnvironment',
'createIdResolver',
'createRunnableDevEnvironment',
// can be redirected from ESM, but doesn't make sense as it's Environment API related
'fetchModule',
'moduleRunnerTransform',
// can be exposed, but doesn't make sense as it's Environment API related
'createServerHotChannel',
'createServerModuleRunner',
'createServerModuleRunnerTransport',
'isRunnableDevEnvironment',
'createFetchableDevEnvironment',
'isFetchableDevEnvironment',
]
disallowedVariables.forEach((name) => {
Object.defineProperty(module.exports, name, {
get() {
throw new Error(
`${name} is not available in the CJS build of Vite.` + description,
)
},
})
})
function warnCjsUsage() {
if (process.env.VITE_CJS_IGNORE_WARNING) return
const logLevelIndex = process.argv.findIndex((arg) =>
/^(?:-l|--logLevel)/.test(arg),
)
if (logLevelIndex > 0) {
const logLevelValue = process.argv[logLevelIndex + 1]
if (logLevelValue === 'silent' || logLevelValue === 'error') {
return
}
if (/silent|error/.test(process.argv[logLevelIndex])) {
return
}
}
const yellow = (str) => `\u001b[33m${str}\u001b[39m`
console.warn(
yellow("The CJS build of Vite's Node API is deprecated." + description),
)
if (process.env.VITE_CJS_TRACE) {
const e = {}
const stackTraceLimit = Error.stackTraceLimit
Error.stackTraceLimit = 100
Error.captureStackTrace(e)
Error.stackTraceLimit = stackTraceLimit
console.log(
e.stack
.split('\n')
.slice(1)
.filter((line) => !line.includes('(node:'))
.join('\n'),
)
}
}
@@ -0,0 +1,218 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
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.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
export function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
export var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
}
return __assign.apply(this, arguments);
}
export function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
export function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
export function __param(paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
}
export function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
export function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
export function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
export function __createBinding(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}
export function __exportStar(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
}
export function __values(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
export function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
export function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
export function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
export function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
export function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}
export function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
}
export function __asyncValues(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}
export function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
export function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result.default = mod;
return result;
}
export function __importDefault(mod) {
return (mod && mod.__esModule) ? mod : { default: mod };
}
export function __classPrivateFieldGet(receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
}
export function __classPrivateFieldSet(receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
}
@@ -0,0 +1,32 @@
# Installation
> `npm install --save @types/on-finished`
# Summary
This package contains type definitions for on-finished (https://github.com/jshttp/on-finished).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/on-finished.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/on-finished/index.d.ts)
````ts
/// <reference types="node" />
import { IncomingMessage, OutgoingMessage } from "http";
export = onFinished;
declare function onFinished<T extends IncomingMessage | OutgoingMessage>(
msg: T,
listener: (err: Error | null, msg: T) => void,
): T;
declare namespace onFinished {
function isFinished(msg: IncomingMessage | OutgoingMessage): boolean;
}
````
### Additional Details
* Last updated: Sat, 07 Jun 2025 02:15:25 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
# Credits
These definitions were written by [Honza Dvorsky](https://github.com/czechboy0), [BendingBender](https://github.com/BendingBender), and [Sebastian Beltran](https://github.com/bjohansebas).
@@ -0,0 +1,23 @@
import {
tv
} from "./chunk-UWE6H66T.mjs";
import {
dataFocusVisibleClasses
} from "./chunk-GH5E4FQB.mjs";
// src/components/user.ts
var user = tv({
slots: {
base: [
"inline-flex items-center justify-center gap-2 rounded-small outline-none",
...dataFocusVisibleClasses
],
wrapper: "inline-flex flex-col items-start",
name: "text-small text-inherit",
description: "text-tiny text-foreground-400"
}
});
export {
user
};
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Certificate = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const algorithm_identifier_1 = require("./algorithm_identifier");
const tbs_certificate_1 = require("./tbs_certificate");
class Certificate {
constructor(params = {}) {
this.tbsCertificate = new tbs_certificate_1.TBSCertificate();
this.signatureAlgorithm = new algorithm_identifier_1.AlgorithmIdentifier();
this.signatureValue = new ArrayBuffer(0);
Object.assign(this, params);
}
}
exports.Certificate = Certificate;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: tbs_certificate_1.TBSCertificate, raw: true })
], Certificate.prototype, "tbsCertificate", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: algorithm_identifier_1.AlgorithmIdentifier })
], Certificate.prototype, "signatureAlgorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.BitString })
], Certificate.prototype, "signatureValue", void 0);
@@ -0,0 +1,144 @@
By providing `accept` prop you can make the dropzone accept specific file types and reject the others.
The value must be an object with a common [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) as keys and an array of file extensions as values (similar to [showOpenFilePicker](https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker)'s types `accept` option).
```js static
useDropzone({
accept: {
'image/png': ['.png'],
'text/html': ['.html', '.htm'],
}
})
```
For more information see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input.
```jsx harmony
import React from 'react';
import {useDropzone} from 'react-dropzone';
function Accept(props) {
const {
acceptedFiles,
fileRejections,
getRootProps,
getInputProps
} = useDropzone({
accept: {
'image/jpeg': [],
'image/png': []
}
});
const acceptedFileItems = acceptedFiles.map(file => (
<li key={file.path}>
{file.path} - {file.size} bytes
</li>
));
const fileRejectionItems = fileRejections.map(({ file, errors }) => (
<li key={file.path}>
{file.path} - {file.size} bytes
<ul>
{errors.map(e => (
<li key={e.code}>{e.message}</li>
))}
</ul>
</li>
));
return (
<section className="container">
<div {...getRootProps({ className: 'dropzone' })}>
<input {...getInputProps()} />
<p>Drag 'n' drop some files here, or click to select files</p>
<em>(Only *.jpeg and *.png images will be accepted)</em>
</div>
<aside>
<h4>Accepted files</h4>
<ul>{acceptedFileItems}</ul>
<h4>Rejected files</h4>
<ul>{fileRejectionItems}</ul>
</aside>
</section>
);
}
<Accept />
```
### Browser limitations
Because of HTML5 File API differences across different browsers during the drag, Dropzone might not be able to detect whether the files are accepted or rejected in Safari nor IE.
Furthermore, at this moment it's not possible to read file names (and thus, file extensions) during the drag operation. For that reason, if you want to react on different file types _during_ the drag operation, _you have to use_ mime types and not extensions! For example, the following example won't work even in Chrome:
```jsx harmony
import React from 'react';
import {useDropzone} from 'react-dropzone';
function Accept(props) {
const {
getRootProps,
getInputProps,
isDragActive,
isDragAccept,
isDragReject
} = useDropzone({
accept: {
'image/jpeg': ['.jpeg', '.png']
}
});
return (
<div className="container">
<div {...getRootProps({className: 'dropzone'})}>
<input {...getInputProps()} />
{isDragAccept && (<p>All files will be accepted</p>)}
{isDragReject && (<p>Some files will be rejected</p>)}
{!isDragActive && (<p>Drop some files here ...</p>)}
</div>
</div>
);
}
<Accept />
```
but this one will:
```jsx harmony
import React from 'react';
import {useDropzone} from 'react-dropzone';
function Accept(props) {
const {
getRootProps,
getInputProps,
isDragActive,
isDragAccept,
isDragReject
} = useDropzone({
accept: {
'image/*': ['.jpeg', '.png']
}
});
return (
<div className="container">
<div {...getRootProps({className: "dropzone"})}>
<input {...getInputProps()} />
{isDragAccept && (<p>All files will be accepted</p>)}
{isDragReject && (<p>Some files will be rejected</p>)}
{!isDragActive && (<p>Drop some files here ...</p>)}
</div>
</div>
);
}
<Accept />
```
### Notes
Mime type determination is not reliable across platforms. CSV files, for example, are reported as text/plain under macOS but as application/vnd.ms-excel under Windows. In some cases there might not be a mime type set at all.
@@ -0,0 +1,3 @@
# @react-types/table
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
@@ -0,0 +1,82 @@
export declare type CallbackFunction<T = string> = (error: Error | null, result?: T) => void;
declare const figlet: FigletModule;
export default figlet;
export declare interface FigletDefaults {
font: FontName;
fontPath: string;
fetchFontIfMissing: boolean;
}
declare class FigletFont {
options: FontMetadata;
comment: string;
numChars: number;
[charCode: number]: string[];
constructor();
}
declare interface FigletModule {
loadFont: (font: FontName, callback?: CallbackFunction<FontMetadata>) => Promise<FontMetadata | null>;
loadFontSync: (font: FontName) => FontMetadata;
fonts: (callback?: CallbackFunction<FontName[]>) => Promise<FontName[]>;
fontsSync: () => FontName[];
parseFont: (font: FontName, data: string, override?: boolean) => FontMetadata;
preloadFonts: (fonts: FontName[], callback?: (error?: Error) => void) => Promise<void>;
loadedFonts: () => string[];
clearLoadedFonts: () => void;
textSync: (text: string, options?: FigletOptions) => string;
text: (text: string, optionsOrFontOrCallback?: FigletOptions | FontName | CallbackFunction<string>, callback?: CallbackFunction<string>) => Promise<string>;
(text: string, optionsOrFontOrCallback?: FigletOptions | FontName | CallbackFunction<string>, callback?: CallbackFunction<string>): Promise<string>;
figFonts: Record<string, FigletFont>;
defaults: (opts?: Partial<FigletDefaults>) => FigletDefaults;
metadata: (fontName: FontName, callback?: (error: Error | null, fontOptions?: FontMetadata, comment?: string) => void) => Promise<[FontMetadata, string] | null>;
}
export declare interface FigletOptions {
font?: FontName;
horizontalLayout?: KerningMethods;
verticalLayout?: KerningMethods;
width?: number;
whitespaceBreak?: boolean;
printDirection?: PrintDirection;
showHardBlanks?: boolean;
}
declare interface FittingRules {
hLayout: number;
hRule1: boolean;
hRule2: boolean;
hRule3: boolean;
hRule4: boolean;
hRule5: boolean;
hRule6: boolean;
vLayout: number;
vRule1: boolean;
vRule2: boolean;
vRule3: boolean;
vRule4: boolean;
vRule5: boolean;
}
export declare interface FontMetadata {
baseline?: number;
codeTagCount?: number | null;
fittingRules: FittingRules;
fullLayout?: number | null;
hardBlank?: string;
height?: number;
maxLength?: number;
numCommentLines?: number;
oldLayout?: number;
printDirection?: PrintDirection;
}
export declare type FontName = "1Row" | "3-D" | "3D Diagonal" | "3D-ASCII" | "3x5" | "4Max" | "5 Line Oblique" | "Standard" | "Ghost" | "Big" | "Block" | "Bubble" | "Digital" | "Ivrit" | "Mini" | "Script" | "Shadow" | "Slant" | "Small" | "Speed" | "Tinker-Toy" | string;
declare type KerningMethods = "default" | "full" | "fitted" | "controlled smushing" | "universal smushing";
declare type PrintDirection = -1 | 0 | 1;
export { }
@@ -0,0 +1,45 @@
import path from 'node:path';
import { importType, createRule, moduleVisitor, makeOptionsSchema, resolve, } from '../utils/index.js';
export default createRule({
name: 'no-relative-parent-imports',
meta: {
type: 'suggestion',
docs: {
category: 'Static analysis',
description: 'Forbid importing modules from parent directories.',
},
schema: [makeOptionsSchema()],
messages: {
noAllowed: "Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `{{filename}}` to same directory as `{{depPath}}` or consider making `{{depPath}}` a package.",
},
},
defaultOptions: [],
create(context) {
const filename = context.physicalFilename;
if (filename === '<text>') {
return {};
}
return moduleVisitor(sourceNode => {
const depPath = sourceNode.value;
if (importType(depPath, context) === 'external') {
return;
}
const absDepPath = resolve(depPath, context);
if (!absDepPath) {
return;
}
const relDepPath = path.relative(path.dirname(filename), absDepPath);
if (importType(relDepPath, context) === 'parent') {
context.report({
node: sourceNode,
messageId: 'noAllowed',
data: {
filename: path.basename(filename),
depPath,
},
});
}
}, context.options[0]);
},
});
//# sourceMappingURL=no-relative-parent-imports.js.map
@@ -0,0 +1,31 @@
{
"name": "@babel/helper-validator-identifier",
"version": "7.28.5",
"description": "Validate identifier/keywords name",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-helper-validator-identifier"
},
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "./lib/index.js",
"exports": {
".": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
},
"./package.json": "./package.json"
},
"devDependencies": {
"@unicode/unicode-17.0.0": "^1.6.10",
"charcodes": "^0.2.0"
},
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)",
"type": "commonjs"
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E wC","260":"F A B"},B:{"2":"UB VB WB XB YB I","66":"KB LB MB NB OB PB QB RB SB TB","132":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB","260":"C L M G N O P"},C:{"2":"xC TC J ZB XB YB I XC MC YC yC zC 0C 1C","260":"0 1 2 3 4 5 6 7 8 9 K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},D:{"2":"SB TB UB VB WB XB YB I XC MC YC","16":"J ZB K D E F A B C L M","66":"KB LB MB NB OB PB QB RB","132":"0 1 2 3 4 5 6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 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"},E:{"2":"sC tC DD ED","16":"2C ZC","132":"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"},F:{"1":"C JD OC","2":"F FD GD HD ID","16":"B NC uC","66":"0 1 2 3 4 5 w x y z","132":"6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v"},G:{"2":"sC tC","16":"ZC KD","132":"E vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC"},H:{"2":"hD"},I:{"2":"I","16":"iD jD","132":"TC J kD lD vC mD nD"},J:{"132":"D A"},K:{"1":"C OC","2":"A","16":"B NC uC","132":"H"},L:{"2":"I"},M:{"2":"MC"},N:{"260":"A B"},O:{"132":"PC"},P:{"132":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"132":"zD"},R:{"132":"0D"},S:{"260":"1D 2D"}},B:7,C:"Mutation events",D:true};
@@ -0,0 +1,9 @@
export type Options = [
{
ignoreIntersections?: boolean;
ignoreUnions?: boolean;
}
];
export type MessageIds = 'duplicate' | 'unnecessary';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,122 @@
# Installation
> `npm install --save @types/unist`
# Summary
This package contains type definitions for unist (https://github.com/syntax-tree/unist).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unist/v2.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unist/v2/index.d.ts)
````ts
/**
* Syntactic units in unist syntax trees are called nodes.
*
* @typeParam TData Information from the ecosystem. Useful for more specific {@link Node.data}.
*/
export interface Node<TData extends object = Data> {
/**
* The variant of a node.
*/
type: string;
/**
* Information from the ecosystem.
*/
data?: TData | undefined;
/**
* Location of a node in a source document.
* Must not be present if a node is generated.
*/
position?: Position | undefined;
}
/**
* Information associated by the ecosystem with the node.
* Space is guaranteed to never be specified by unist or specifications
* implementing unist.
*/
export interface Data {
[key: string]: unknown;
}
/**
* Location of a node in a source file.
*/
export interface Position {
/**
* Place of the first character of the parsed source region.
*/
start: Point;
/**
* Place of the first character after the parsed source region.
*/
end: Point;
/**
* Start column at each index (plus start line) in the source region,
* for elements that span multiple lines.
*/
indent?: number[] | undefined;
}
/**
* One place in a source file.
*/
export interface Point {
/**
* Line in a source file (1-indexed integer).
*/
line: number;
/**
* Column in a source file (1-indexed integer).
*/
column: number;
/**
* Character in a source file (0-indexed integer).
*/
offset?: number | undefined;
}
/**
* Util for extracting type of {@link Node.data}
*
* @typeParam TNode Specific node type such as {@link Node} with {@link Data}, {@link Literal}, etc.
*
* @example `NodeData<Node<{ key: string }>>` -> `{ key: string }`
*/
export type NodeData<TNode extends Node<object>> = TNode extends Node<infer TData> ? TData : never;
/**
* Nodes containing other nodes.
*
* @typeParam ChildNode Node item of {@link Parent.children}
*/
export interface Parent<ChildNode extends Node<object> = Node, TData extends object = NodeData<ChildNode>>
extends Node<TData>
{
/**
* List representing the children of a node.
*/
children: ChildNode[];
}
/**
* Nodes containing a value.
*
* @typeParam Value Specific value type of {@link Literal.value} such as `string` for `Text` node
*/
export interface Literal<Value = unknown, TData extends object = Data> extends Node<TData> {
value: Value;
}
````
### Additional Details
* Last updated: Thu, 15 Aug 2024 02:18:53 GMT
* Dependencies: none
# Credits
These definitions were written by [bizen241](https://github.com/bizen241), [Jun Lu](https://github.com/lujun2), [Hernan Rajchert](https://github.com/hrajchert), [Titus Wormer](https://github.com/wooorm), [Junyoung Choi](https://github.com/rokt33r), [Ben Moon](https://github.com/GuiltyDolphin), and [JounQin](https://github.com/JounQin).
@@ -0,0 +1 @@
{"version":3,"file":"proxy-signals.d.ts","sourceRoot":"","sources":["../../src/proxy-signals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAGjD;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,YAAY,eA4B/C,CAAA"}
@@ -0,0 +1,99 @@
import { ChatType, Peer } from '../types';
import { GeneralCallResult } from './common';
export interface NodeIKernelSearchService {
addKernelSearchListener(listener: unknown): number;
removeKernelSearchListener(listenerId: number): void;
searchStranger(unknown: string, searchStranger: unknown, searchParams: unknown): Promise<unknown>;
searchGroup(param: {
keyWords: string;
groupNum: number;
exactSearch: boolean;
penetrate: string;
}): Promise<GeneralCallResult>;
searchLocalInfo(keywords: string, type: number): unknown;
cancelSearchLocalInfo(...args: unknown[]): unknown;
searchBuddyChatInfo(...args: unknown[]): unknown;
searchMoreBuddyChatInfo(...args: unknown[]): unknown;
cancelSearchBuddyChatInfo(...args: unknown[]): unknown;
searchContact(...args: unknown[]): unknown;
searchMoreContact(...args: unknown[]): unknown;
cancelSearchContact(...args: unknown[]): unknown;
searchGroupChatInfo(...args: unknown[]): unknown;
resetSearchGroupChatInfoSortType(...args: unknown[]): unknown;
resetSearchGroupChatInfoFilterMembers(...args: unknown[]): unknown;
searchMoreGroupChatInfo(...args: unknown[]): unknown;
cancelSearchGroupChatInfo(...args: unknown[]): unknown;
searchChatsWithKeywords(...args: unknown[]): unknown;
searchMoreChatsWithKeywords(...args: unknown[]): unknown;
cancelSearchChatsWithKeywords(...args: unknown[]): unknown;
searchChatMsgs(...args: unknown[]): unknown;
searchMoreChatMsgs(...args: unknown[]): unknown;
cancelSearchChatMsgs(...args: unknown[]): unknown;
searchMsgWithKeywords(keyWords: string[], param: Peer & {
searchFields: number;
pageLimit: number;
}): Promise<GeneralCallResult>;
searchMoreMsgWithKeywords(...args: unknown[]): unknown;
cancelSearchMsgWithKeywords(...args: unknown[]): unknown;
searchFileWithKeywords(keywords: string[], source: number): Promise<string>;
searchMoreFileWithKeywords(...args: unknown[]): unknown;
cancelSearchFileWithKeywords(...args: unknown[]): unknown;
searchAtMeChats(...args: unknown[]): unknown;
searchMoreAtMeChats(...args: unknown[]): unknown;
cancelSearchAtMeChats(...args: unknown[]): unknown;
searchChatAtMeMsgs(...args: unknown[]): unknown;
searchMoreChatAtMeMsgs(...args: unknown[]): unknown;
cancelSearchChatAtMeMsgs(...args: unknown[]): unknown;
addSearchHistory(param: {
type: number;
contactList: [];
id: number;
groupInfos: [];
msgs: [];
fileInfos: [
{
chatType: ChatType;
buddyChatInfo: Array<{
category_name: string;
peerUid: string;
peerUin: string;
remark: string;
}>;
discussChatInfo: [];
groupChatInfo: Array<{
groupCode: string;
isConf: boolean;
hasModifyConfGroupFace: boolean;
hasModifyConfGroupName: boolean;
groupName: string;
remark: string;
}>;
dataLineChatInfo: [];
tmpChatInfo: [];
msgId: string;
msgSeq: string;
msgTime: string;
senderUid: string;
senderNick: string;
senderRemark: string;
senderCard: string;
elemId: string;
elemType: string;
fileSize: string;
filePath: string;
fileName: string;
hits: Array<{
start: 12;
end: 14;
}>;
}
];
}): Promise<{
result: number;
errMsg: string;
id?: number;
}>;
removeSearchHistory(...args: unknown[]): unknown;
searchCache(...args: unknown[]): unknown;
clearSearchCache(...args: unknown[]): unknown;
}
@@ -0,0 +1 @@
{"version":3,"file":"merge-configs.mjs","sources":["../../src/lib/merge-configs.ts"],"sourcesContent":["import { Config } from './types'\n\n/**\n * @param baseConfig Config where other config will be merged into. This object will be mutated.\n * @param configExtension Partial config to merge into the `baseConfig`.\n */\nexport function mergeConfigs(baseConfig: Config, configExtension: Partial<Config>) {\n for (const key in configExtension) {\n mergePropertyRecursively(baseConfig as any, key, configExtension[key as keyof Config])\n }\n\n return baseConfig\n}\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty\nconst overrideTypes = new Set(['string', 'number', 'boolean'])\n\nfunction mergePropertyRecursively(\n baseObject: Record<string, unknown>,\n mergeKey: string,\n mergeValue: unknown,\n) {\n if (\n !hasOwnProperty.call(baseObject, mergeKey) ||\n overrideTypes.has(typeof mergeValue) ||\n mergeValue === null\n ) {\n baseObject[mergeKey] = mergeValue\n return\n }\n\n if (Array.isArray(mergeValue) && Array.isArray(baseObject[mergeKey])) {\n baseObject[mergeKey] = (baseObject[mergeKey] as unknown[]).concat(mergeValue)\n return\n }\n\n if (typeof mergeValue === 'object' && typeof baseObject[mergeKey] === 'object') {\n if (baseObject[mergeKey] === null) {\n baseObject[mergeKey] = mergeValue\n return\n }\n\n for (const nextKey in mergeValue) {\n mergePropertyRecursively(\n baseObject[mergeKey] as Record<string, unknown>,\n nextKey,\n mergeValue[nextKey as keyof object],\n )\n }\n }\n}\n"],"names":["mergeConfigs","baseConfig","configExtension","key","mergePropertyRecursively","hasOwnProperty","Object","prototype","overrideTypes","Set","baseObject","mergeKey","mergeValue","call","has","Array","isArray","concat","nextKey"],"mappings":"AAEA;;;AAGG;AACa,SAAAA,YAAY,CAACC,UAAkB,EAAEC,eAAgC,EAAA;AAC7E,EAAA,KAAK,IAAMC,GAAG,IAAID,eAAe,EAAE;IAC/BE,wBAAwB,CAACH,UAAiB,EAAEE,GAAG,EAAED,eAAe,CAACC,GAAmB,CAAC,CAAC,CAAA;AACzF,GAAA;AAED,EAAA,OAAOF,UAAU,CAAA;AACrB,CAAA;AAEA,IAAMI,cAAc,GAAGC,MAAM,CAACC,SAAS,CAACF,cAAc,CAAA;AACtD,IAAMG,aAAa,gBAAG,IAAIC,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAA;AAE9D,SAASL,wBAAwB,CAC7BM,UAAmC,EACnCC,QAAgB,EAChBC,UAAmB,EAAA;EAEnB,IACI,CAACP,cAAc,CAACQ,IAAI,CAACH,UAAU,EAAEC,QAAQ,CAAC,IAC1CH,aAAa,CAACM,GAAG,CAAC,OAAOF,UAAU,CAAC,IACpCA,UAAU,KAAK,IAAI,EACrB;AACEF,IAAAA,UAAU,CAACC,QAAQ,CAAC,GAAGC,UAAU,CAAA;AACjC,IAAA,OAAA;AACH,GAAA;AAED,EAAA,IAAIG,KAAK,CAACC,OAAO,CAACJ,UAAU,CAAC,IAAIG,KAAK,CAACC,OAAO,CAACN,UAAU,CAACC,QAAQ,CAAC,CAAC,EAAE;AAClED,IAAAA,UAAU,CAACC,QAAQ,CAAC,GAAID,UAAU,CAACC,QAAQ,CAAe,CAACM,MAAM,CAACL,UAAU,CAAC,CAAA;AAC7E,IAAA,OAAA;AACH,GAAA;AAED,EAAA,IAAI,OAAOA,UAAU,KAAK,QAAQ,IAAI,OAAOF,UAAU,CAACC,QAAQ,CAAC,KAAK,QAAQ,EAAE;AAC5E,IAAA,IAAID,UAAU,CAACC,QAAQ,CAAC,KAAK,IAAI,EAAE;AAC/BD,MAAAA,UAAU,CAACC,QAAQ,CAAC,GAAGC,UAAU,CAAA;AACjC,MAAA,OAAA;AACH,KAAA;AAED,IAAA,KAAK,IAAMM,OAAO,IAAIN,UAAU,EAAE;AAC9BR,MAAAA,wBAAwB,CACpBM,UAAU,CAACC,QAAQ,CAA4B,EAC/CO,OAAO,EACPN,UAAU,CAACM,OAAuB,CAAC,CACtC,CAAA;AACJ,KAAA;AACJ,GAAA;AACL;;;;"}
@@ -0,0 +1,71 @@
import {isIOS as $7R18e$isIOS, getOwnerDocument as $7R18e$getOwnerDocument, runAfterTransition as $7R18e$runAfterTransition} from "@react-aria/utils";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
// Note that state only matters here for iOS. Non-iOS gets user-select: none applied to the target element
// rather than at the document level so we just need to apply/remove user-select: none for each pressed element individually
let $14c0b72509d70225$var$state = 'default';
let $14c0b72509d70225$var$savedUserSelect = '';
let $14c0b72509d70225$var$modifiedElementMap = new WeakMap();
function $14c0b72509d70225$export$16a4697467175487(target) {
if ((0, $7R18e$isIOS)()) {
if ($14c0b72509d70225$var$state === 'default') {
const documentObject = (0, $7R18e$getOwnerDocument)(target);
$14c0b72509d70225$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;
documentObject.documentElement.style.webkitUserSelect = 'none';
}
$14c0b72509d70225$var$state = 'disabled';
} else if (target instanceof HTMLElement || target instanceof SVGElement) {
// If not iOS, store the target's original user-select and change to user-select: none
// Ignore state since it doesn't apply for non iOS
let property = 'userSelect' in target.style ? 'userSelect' : 'webkitUserSelect';
$14c0b72509d70225$var$modifiedElementMap.set(target, target.style[property]);
target.style[property] = 'none';
}
}
function $14c0b72509d70225$export$b0d6fa1ab32e3295(target) {
if ((0, $7R18e$isIOS)()) {
// If the state is already default, there's nothing to do.
// If it is restoring, then there's no need to queue a second restore.
if ($14c0b72509d70225$var$state !== 'disabled') return;
$14c0b72509d70225$var$state = 'restoring';
// There appears to be a delay on iOS where selection still might occur
// after pointer up, so wait a bit before removing user-select.
setTimeout(()=>{
// Wait for any CSS transitions to complete so we don't recompute style
// for the whole page in the middle of the animation and cause jank.
(0, $7R18e$runAfterTransition)(()=>{
// Avoid race conditions
if ($14c0b72509d70225$var$state === 'restoring') {
const documentObject = (0, $7R18e$getOwnerDocument)(target);
if (documentObject.documentElement.style.webkitUserSelect === 'none') documentObject.documentElement.style.webkitUserSelect = $14c0b72509d70225$var$savedUserSelect || '';
$14c0b72509d70225$var$savedUserSelect = '';
$14c0b72509d70225$var$state = 'default';
}
});
}, 300);
} else if (target instanceof HTMLElement || target instanceof SVGElement) // If not iOS, restore the target's original user-select if any
// Ignore state since it doesn't apply for non iOS
{
if (target && $14c0b72509d70225$var$modifiedElementMap.has(target)) {
let targetOldUserSelect = $14c0b72509d70225$var$modifiedElementMap.get(target);
let property = 'userSelect' in target.style ? 'userSelect' : 'webkitUserSelect';
if (target.style[property] === 'none') target.style[property] = targetOldUserSelect;
if (target.getAttribute('style') === '') target.removeAttribute('style');
$14c0b72509d70225$var$modifiedElementMap.delete(target);
}
}
}
export {$14c0b72509d70225$export$16a4697467175487 as disableTextSelection, $14c0b72509d70225$export$b0d6fa1ab32e3295 as restoreTextSelection};
//# sourceMappingURL=textSelection.module.js.map
@@ -0,0 +1,22 @@
import { FormProps as FormProps$1 } from '@react-types/form';
import { DOMProps, ContextValue } from './utils.js';
import React__default from 'react';
import '@react-types/shared';
interface FormProps extends FormProps$1, DOMProps {
/**
* Whether to use native HTML form validation to prevent form submission
* when a field value is missing or invalid, or mark fields as required
* or invalid via ARIA.
* @default 'native'
*/
validationBehavior?: "aria" | "native";
}
declare const FormContext: React__default.Context<ContextValue<FormProps, HTMLFormElement>>;
/**
* A form is a group of inputs that allows users to submit data to a server,
* with support for providing field validation errors.
*/
declare const Form: React__default.ForwardRefExoticComponent<FormProps & React__default.RefAttributes<HTMLFormElement>>;
export { Form, FormContext, type FormProps };
@@ -0,0 +1,168 @@
var $1117b6c0d4c4c164$exports = require("./focusWithoutScrolling.main.js");
var $9e20cff0af27e8cc$exports = require("./platform.main.js");
var $6kLG7$react = require("react");
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "RouterProvider", () => $4068a0fae83b6d84$export$323e4fc2fa4753fb);
$parcel$export(module.exports, "shouldClientNavigate", () => $4068a0fae83b6d84$export$efa8c9099e530235);
$parcel$export(module.exports, "openLink", () => $4068a0fae83b6d84$export$95185d699e05d4d7);
$parcel$export(module.exports, "useRouter", () => $4068a0fae83b6d84$export$9a302a45f65d0572);
$parcel$export(module.exports, "useSyntheticLinkProps", () => $4068a0fae83b6d84$export$bdc77b0c0a3a85d6);
$parcel$export(module.exports, "getSyntheticLinkProps", () => $4068a0fae83b6d84$export$51437d503373d223);
$parcel$export(module.exports, "useLinkProps", () => $4068a0fae83b6d84$export$7e924b3091a3bd18);
$parcel$export(module.exports, "handleLinkClick", () => $4068a0fae83b6d84$export$13aea1a3cb5e3f1f);
/*
* Copyright 2023 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $4068a0fae83b6d84$var$RouterContext = /*#__PURE__*/ (0, $6kLG7$react.createContext)({
isNative: true,
open: $4068a0fae83b6d84$var$openSyntheticLink,
useHref: (href)=>href
});
function $4068a0fae83b6d84$export$323e4fc2fa4753fb(props) {
let { children: children, navigate: navigate, useHref: useHref } = props;
let ctx = (0, $6kLG7$react.useMemo)(()=>({
isNative: false,
open: (target, modifiers, href, routerOptions)=>{
$4068a0fae83b6d84$var$getSyntheticLink(target, (link)=>{
if ($4068a0fae83b6d84$export$efa8c9099e530235(link, modifiers)) navigate(href, routerOptions);
else $4068a0fae83b6d84$export$95185d699e05d4d7(link, modifiers);
});
},
useHref: useHref || ((href)=>href)
}), [
navigate,
useHref
]);
return /*#__PURE__*/ (0, ($parcel$interopDefault($6kLG7$react))).createElement($4068a0fae83b6d84$var$RouterContext.Provider, {
value: ctx
}, children);
}
function $4068a0fae83b6d84$export$9a302a45f65d0572() {
return (0, $6kLG7$react.useContext)($4068a0fae83b6d84$var$RouterContext);
}
function $4068a0fae83b6d84$export$efa8c9099e530235(link, modifiers) {
// Use getAttribute here instead of link.target. Firefox will default link.target to "_parent" when inside an iframe.
let target = link.getAttribute('target');
return (!target || target === '_self') && link.origin === location.origin && !link.hasAttribute('download') && !modifiers.metaKey && // open in new tab (mac)
!modifiers.ctrlKey && // open in new tab (windows)
!modifiers.altKey && // download
!modifiers.shiftKey;
}
function $4068a0fae83b6d84$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
var _window_event_type, _window_event;
let { metaKey: metaKey, ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey } = modifiers;
// Firefox does not recognize keyboard events as a user action by default, and the popup blocker
// will prevent links with target="_blank" from opening. However, it does allow the event if the
// Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.
// See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.
if ((0, $9e20cff0af27e8cc$exports.isFirefox)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith('key')) && target.target === '_blank') {
if ((0, $9e20cff0af27e8cc$exports.isMac)()) metaKey = true;
else ctrlKey = true;
}
// WebKit does not support firing click events with modifier keys, but does support keyboard events.
// https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184
let event = (0, $9e20cff0af27e8cc$exports.isWebKit)() && (0, $9e20cff0af27e8cc$exports.isMac)() && !(0, $9e20cff0af27e8cc$exports.isIPad)() && process.env.NODE_ENV !== 'test' ? new KeyboardEvent('keydown', {
keyIdentifier: 'Enter',
metaKey: metaKey,
ctrlKey: ctrlKey,
altKey: altKey,
shiftKey: shiftKey
}) : new MouseEvent('click', {
metaKey: metaKey,
ctrlKey: ctrlKey,
altKey: altKey,
shiftKey: shiftKey,
bubbles: true,
cancelable: true
});
$4068a0fae83b6d84$export$95185d699e05d4d7.isOpening = setOpening;
(0, $1117b6c0d4c4c164$exports.focusWithoutScrolling)(target);
target.dispatchEvent(event);
$4068a0fae83b6d84$export$95185d699e05d4d7.isOpening = false;
}
// https://github.com/parcel-bundler/parcel/issues/8724
$4068a0fae83b6d84$export$95185d699e05d4d7.isOpening = false;
function $4068a0fae83b6d84$var$getSyntheticLink(target, open) {
if (target instanceof HTMLAnchorElement) open(target);
else if (target.hasAttribute('data-href')) {
let link = document.createElement('a');
link.href = target.getAttribute('data-href');
if (target.hasAttribute('data-target')) link.target = target.getAttribute('data-target');
if (target.hasAttribute('data-rel')) link.rel = target.getAttribute('data-rel');
if (target.hasAttribute('data-download')) link.download = target.getAttribute('data-download');
if (target.hasAttribute('data-ping')) link.ping = target.getAttribute('data-ping');
if (target.hasAttribute('data-referrer-policy')) link.referrerPolicy = target.getAttribute('data-referrer-policy');
target.appendChild(link);
open(link);
target.removeChild(link);
}
}
function $4068a0fae83b6d84$var$openSyntheticLink(target, modifiers) {
$4068a0fae83b6d84$var$getSyntheticLink(target, (link)=>$4068a0fae83b6d84$export$95185d699e05d4d7(link, modifiers));
}
function $4068a0fae83b6d84$export$bdc77b0c0a3a85d6(props) {
let router = $4068a0fae83b6d84$export$9a302a45f65d0572();
var _props_href;
const href = router.useHref((_props_href = props.href) !== null && _props_href !== void 0 ? _props_href : '');
return {
'data-href': props.href ? href : undefined,
'data-target': props.target,
'data-rel': props.rel,
'data-download': props.download,
'data-ping': props.ping,
'data-referrer-policy': props.referrerPolicy
};
}
function $4068a0fae83b6d84$export$51437d503373d223(props) {
return {
'data-href': props.href,
'data-target': props.target,
'data-rel': props.rel,
'data-download': props.download,
'data-ping': props.ping,
'data-referrer-policy': props.referrerPolicy
};
}
function $4068a0fae83b6d84$export$7e924b3091a3bd18(props) {
let router = $4068a0fae83b6d84$export$9a302a45f65d0572();
var _props_href;
const href = router.useHref((_props_href = props === null || props === void 0 ? void 0 : props.href) !== null && _props_href !== void 0 ? _props_href : '');
return {
href: (props === null || props === void 0 ? void 0 : props.href) ? href : undefined,
target: props === null || props === void 0 ? void 0 : props.target,
rel: props === null || props === void 0 ? void 0 : props.rel,
download: props === null || props === void 0 ? void 0 : props.download,
ping: props === null || props === void 0 ? void 0 : props.ping,
referrerPolicy: props === null || props === void 0 ? void 0 : props.referrerPolicy
};
}
function $4068a0fae83b6d84$export$13aea1a3cb5e3f1f(e, router, href, routerOptions) {
// If a custom router is provided, prevent default and forward if this link should client navigate.
if (!router.isNative && e.currentTarget instanceof HTMLAnchorElement && e.currentTarget.href && // If props are applied to a router Link component, it may have already prevented default.
!e.isDefaultPrevented() && $4068a0fae83b6d84$export$efa8c9099e530235(e.currentTarget, e) && href) {
e.preventDefault();
router.open(e.currentTarget, e, href, routerOptions);
}
}
//# sourceMappingURL=openLink.main.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 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","2":"C L M G N"},C:{"1":"0 1 2 3 4 5 oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB 0C 1C"},D:{"1":"0 1 2 3 4 5 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":"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"},E:{"1":"B C L M G NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A 2C ZC 3C 4C 5C 6C aC"},F:{"1":"0 1 2 3 4 5 dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB FD GD HD ID NC uC JD OC"},G:{"1":"UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD","194":"TD"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD","2":"J"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:2,C:"Subresource Integrity",D:true};
@@ -0,0 +1,134 @@
<p align="center">
<a href="https://tailwind-variants.org">
<img width="20%" src=".github/assets/isotipo.png" alt="tailwind-variants" />
<h1 align="center">tailwind-variants</h1>
</a>
</p>
<p align="center">
The <em>power</em> of Tailwind combined with a <em>first-class</em> variant API.<br><br>
<a href="https://www.npmjs.com/package/tailwind-variants">
<img src="https://img.shields.io/npm/dm/tailwind-variants.svg?style=flat-round" alt="npm downloads">
</a>
<a href="https://www.npmjs.com/package/tailwind-variants">
<img alt="NPM Version" src="https://badgen.net/npm/v/tailwind-variants" />
</a>
<a href="https://github.com/nextui-org/tailwind-variants/blob/main/LICENSE">
<img src="https://img.shields.io/npm/l/tailwind-variants?style=flat" alt="License">
</a>
</p>
## Features
- First-class variant API
- Responsive variants
- Slots support
- Composition support
- Fully typed
- Framework agnostic
- Automatic conflict resolution
## Documentation
For full documentation, visit [tailwind-variants.org](https://tailwind-variants.org)
## Quick Start
1. Installation:
To use Tailwind Variants in your project, you can install it as a dependency:
```bash
yarn add tailwind-variants
# or
npm i tailwind-variants
```
2. Usage:
```js
import { tv } from 'tailwind-variants';
const button = tv({
base: "font-medium bg-blue-500 text-white rounded-full active:opacity-80",
variants: {
color: {
primary: "bg-blue-500 text-white",
secondary: "bg-purple-500 text-white",
},
size: {
sm: "text-sm",
md: "text-base",
lg: "px-4 py-3 text-lg",
},
},
compoundVariants: [
{
size: ["sm", "md"],
class: "px-3 py-1",
},
],
defaultVariants: {
size: "md",
color: "primary",
}
});
return (
<button className={button({ size: 'sm', color: 'secondary' })}>Click me</button>
)
```
3. Responsive variants configuration (optional): If you want to use responsive variants
you need to add the Tailwind Variants `wrapper` to your TailwindCSS config file `tailwind.config.js`.
```js
// tailwind.config.js
const { withTV } = require('tailwind-variants/transformer')
/** @type {import('tailwindcss').Config} */
module.exports = withTV({
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {},
},
plugins: [],
})
```
## Acknowledgements
- [**cva**](https://github.com/joe-bell/cva) ([Joe Bell](https://github.com/joe-bell))
This project as started as an extension of Joe's work on `cva` – a great tool for generating variants for a single element with Tailwind CSS. Big shoutout to [Joe Bell](https://github.com/joe-bell) and [contributors](https://github.com/joe-bell/cva/graphs/contributors) you guys rock! 🤘 - we recommend to use `cva` if don't need any of the **Tailwind Variants** features listed [here](https://www.tailwind-variants.org/docs/comparison).
- [**Stitches**](https://stitches.dev/) ([Modulz](https://modulz.app))
The pioneers of the `variants` API movement. Inmense thanks to [Modulz](https://modulz.app) for their work on Stitches and the community around it. 🙏
## Community
We're excited to see the community adopt NextUI, raise issues, and provide feedback. Whether it's a feature request, bug report, or a project to showcase, please get involved!
- [Discord](https://discord.gg/9b6yyZKmH4)
- [Twitter](https://twitter.com/getnextui)
- [GitHub Discussions](https://github.com/nextui-org/tailwind-variants/discussions)
## Contributing
Contributions are always welcome!
Please follow our [contributing guidelines](./CONTRIBUTING.md).
Please adhere to this project's [CODE_OF_CONDUCT](./CODE_OF_CONDUCT.md).
## Authors
- Junior garcia ([@jrgarciadev](https://github.com/jrgaciadev))
- Tianen Pang ([@tianenpang](https://github.com/tianenpang))
## License
Licensed under the MIT License.
See [LICENSE](./LICENSE.md) for more information.
@@ -0,0 +1,17 @@
'use strict';
var b;
var l;
if (process.env.NODE_ENV === 'production') {
b = require('./cjs/react-dom-server.bun.production.js');
l = require('./cjs/react-dom-server-legacy.browser.production.js');
} else {
b = require('./cjs/react-dom-server.bun.development.js');
l = require('./cjs/react-dom-server-legacy.browser.development.js');
}
exports.version = b.version;
exports.renderToReadableStream = b.renderToReadableStream;
exports.resume = b.resume;
exports.renderToString = l.renderToString;
exports.renderToStaticMarkup = l.renderToStaticMarkup;
@@ -0,0 +1,521 @@
import { mockObject } from './index.js';
import { M as MockerRegistry, R as RedirectedModule, A as AutomockedModule } from './chunk-registry.js';
import { e as extname, j as join } from './chunk-pathe.M-eThtNZ.js';
/**
* Get original stacktrace without source map support the most performant way.
* - Create only 1 stack frame.
* - Rewrite prepareStackTrace to bypass "support-stack-trace" (usually takes ~250ms).
*/
function createSimpleStackTrace(options) {
const { message = "$$stack trace error", stackTraceLimit = 1 } = options || {};
const limit = Error.stackTraceLimit;
const prepareStackTrace = Error.prepareStackTrace;
Error.stackTraceLimit = stackTraceLimit;
Error.prepareStackTrace = (e) => e.stack;
const err = new Error(message);
const stackTrace = err.stack || "";
Error.prepareStackTrace = prepareStackTrace;
Error.stackTraceLimit = limit;
return stackTrace;
}
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
function normalizeWindowsPath(input = "") {
if (!input) {
return input;
}
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
}
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
function cwd() {
if (typeof process !== "undefined" && typeof process.cwd === "function") {
return process.cwd().replace(/\\/g, "/");
}
return "/";
}
const resolve = function(...arguments_) {
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
let resolvedPath = "";
let resolvedAbsolute = false;
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
const path = index >= 0 ? arguments_[index] : cwd();
if (!path || path.length === 0) {
continue;
}
resolvedPath = `${path}/${resolvedPath}`;
resolvedAbsolute = isAbsolute(path);
}
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
return `/${resolvedPath}`;
}
return resolvedPath.length > 0 ? resolvedPath : ".";
};
function normalizeString(path, allowAboveRoot) {
let res = "";
let lastSegmentLength = 0;
let lastSlash = -1;
let dots = 0;
let char = null;
for (let index = 0; index <= path.length; ++index) {
if (index < path.length) {
char = path[index];
} else if (char === "/") {
break;
} else {
char = "/";
}
if (char === "/") {
if (lastSlash === index - 1 || dots === 1);
else if (dots === 2) {
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
if (res.length > 2) {
const lastSlashIndex = res.lastIndexOf("/");
if (lastSlashIndex === -1) {
res = "";
lastSegmentLength = 0;
} else {
res = res.slice(0, lastSlashIndex);
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
}
lastSlash = index;
dots = 0;
continue;
} else if (res.length > 0) {
res = "";
lastSegmentLength = 0;
lastSlash = index;
dots = 0;
continue;
}
}
if (allowAboveRoot) {
res += res.length > 0 ? "/.." : "..";
lastSegmentLength = 2;
}
} else {
if (res.length > 0) {
res += `/${path.slice(lastSlash + 1, index)}`;
} else {
res = path.slice(lastSlash + 1, index);
}
lastSegmentLength = index - lastSlash - 1;
}
lastSlash = index;
dots = 0;
} else if (char === "." && dots !== -1) {
++dots;
} else {
dots = -1;
}
}
return res;
}
const isAbsolute = function(p) {
return _IS_ABSOLUTE_RE.test(p);
};
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var intToChar = new Uint8Array(64);
var charToInt = new Uint8Array(128);
for (let i = 0; i < chars.length; i++) {
const c = chars.charCodeAt(i);
intToChar[i] = c;
charToInt[c] = i;
}
const CHROME_IE_STACK_REGEXP = /^\s*at .*(?:\S:\d+|\(native\))/m;
const SAFARI_NATIVE_CODE_REGEXP = /^(?:eval@)?(?:\[native code\])?$/;
function extractLocation(urlLike) {
// Fail-fast but return locations like "(native)"
if (!urlLike.includes(":")) {
return [urlLike];
}
const regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
const parts = regExp.exec(urlLike.replace(/^\(|\)$/g, ""));
if (!parts) {
return [urlLike];
}
let url = parts[1];
if (url.startsWith("async ")) {
url = url.slice(6);
}
if (url.startsWith("http:") || url.startsWith("https:")) {
const urlObj = new URL(url);
urlObj.searchParams.delete("import");
urlObj.searchParams.delete("browserv");
url = urlObj.pathname + urlObj.hash + urlObj.search;
}
if (url.startsWith("/@fs/")) {
const isWindows = /^\/@fs\/[a-zA-Z]:\//.test(url);
url = url.slice(isWindows ? 5 : 4);
}
return [
url,
parts[2] || undefined,
parts[3] || undefined
];
}
function parseSingleFFOrSafariStack(raw) {
let line = raw.trim();
if (SAFARI_NATIVE_CODE_REGEXP.test(line)) {
return null;
}
if (line.includes(" > eval")) {
line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1");
}
// Early return for lines that don't look like Firefox/Safari stack traces
// Firefox/Safari stack traces must contain '@' and should have location info after it
if (!line.includes("@")) {
return null;
}
// Find the correct @ that separates function name from location
// For cases like '@https://@fs/path' or 'functionName@https://@fs/path'
// we need to find the first @ that precedes a valid location (containing :)
let atIndex = -1;
let locationPart = "";
let functionName;
// Try each @ from left to right to find the one that gives us a valid location
for (let i = 0; i < line.length; i++) {
if (line[i] === "@") {
const candidateLocation = line.slice(i + 1);
// Minimum length 3 for valid location: 1 for filename + 1 for colon + 1 for line number (e.g., "a:1")
if (candidateLocation.includes(":") && candidateLocation.length >= 3) {
atIndex = i;
locationPart = candidateLocation;
functionName = i > 0 ? line.slice(0, i) : undefined;
break;
}
}
}
// Validate we found a valid location with minimum length (filename:line format)
if (atIndex === -1 || !locationPart.includes(":") || locationPart.length < 3) {
return null;
}
const [url, lineNumber, columnNumber] = extractLocation(locationPart);
if (!url || !lineNumber || !columnNumber) {
return null;
}
return {
file: url,
method: functionName || "",
line: Number.parseInt(lineNumber),
column: Number.parseInt(columnNumber)
};
}
function parseSingleStack(raw) {
const line = raw.trim();
if (!CHROME_IE_STACK_REGEXP.test(line)) {
return parseSingleFFOrSafariStack(line);
}
return parseSingleV8Stack(line);
}
// Based on https://github.com/stacktracejs/error-stack-parser
// Credit to stacktracejs
function parseSingleV8Stack(raw) {
let line = raw.trim();
if (!CHROME_IE_STACK_REGEXP.test(line)) {
return null;
}
if (line.includes("(eval ")) {
line = line.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, "");
}
let sanitizedLine = line.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, "");
// capture and preserve the parenthesized location "(/foo/my bar.js:12:87)" in
// case it has spaces in it, as the string is split on \s+ later on
const location = sanitizedLine.match(/ (\(.+\)$)/);
// remove the parenthesized location from the line, if it was matched
sanitizedLine = location ? sanitizedLine.replace(location[0], "") : sanitizedLine;
// if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine
// because this line doesn't have function name
const [url, lineNumber, columnNumber] = extractLocation(location ? location[1] : sanitizedLine);
let method = location && sanitizedLine || "";
let file = url && ["eval", "<anonymous>"].includes(url) ? undefined : url;
if (!file || !lineNumber || !columnNumber) {
return null;
}
if (method.startsWith("async ")) {
method = method.slice(6);
}
if (file.startsWith("file://")) {
file = file.slice(7);
}
// normalize Windows path (\ -> /)
file = file.startsWith("node:") || file.startsWith("internal:") ? file : resolve(file);
if (method) {
method = method.replace(/__vite_ssr_import_\d+__\./g, "").replace(/(Object\.)?__vite_ssr_export_default__\s?/g, "");
}
return {
method,
file,
line: Number.parseInt(lineNumber),
column: Number.parseInt(columnNumber)
};
}
function createCompilerHints(options) {
const globalThisAccessor = (options === null || options === void 0 ? void 0 : options.globalThisKey) || "__vitest_mocker__";
function _mocker() {
// @ts-expect-error injected by the plugin
return typeof globalThis[globalThisAccessor] !== "undefined" ? globalThis[globalThisAccessor] : new Proxy({}, { get(_, name) {
throw new Error("Vitest mocker was not initialized in this environment. " + `vi.${String(name)}() is forbidden.`);
} });
}
return {
hoisted(factory) {
if (typeof factory !== "function") {
throw new TypeError(`vi.hoisted() expects a function, but received a ${typeof factory}`);
}
return factory();
},
mock(path, factory) {
if (typeof path !== "string") {
throw new TypeError(`vi.mock() expects a string path, but received a ${typeof path}`);
}
const importer = getImporter("mock");
_mocker().queueMock(path, importer, typeof factory === "function" ? () => factory(() => _mocker().importActual(path, importer)) : factory);
},
unmock(path) {
if (typeof path !== "string") {
throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof path}`);
}
_mocker().queueUnmock(path, getImporter("unmock"));
},
doMock(path, factory) {
if (typeof path !== "string") {
throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof path}`);
}
const importer = getImporter("doMock");
_mocker().queueMock(path, importer, typeof factory === "function" ? () => factory(() => _mocker().importActual(path, importer)) : factory);
},
doUnmock(path) {
if (typeof path !== "string") {
throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof path}`);
}
_mocker().queueUnmock(path, getImporter("doUnmock"));
},
async importActual(path) {
return _mocker().importActual(path, getImporter("importActual"));
},
async importMock(path) {
return _mocker().importMock(path, getImporter("importMock"));
}
};
}
function getImporter(name) {
const stackTrace = /* @__PURE__ */ createSimpleStackTrace({ stackTraceLimit: 5 });
const stackArray = stackTrace.split("\n");
// if there is no message in a stack trace, use the item - 1
const importerStackIndex = stackArray.findIndex((stack) => {
return stack.includes(` at Object.${name}`) || stack.includes(`${name}@`);
});
const stack = /* @__PURE__ */ parseSingleStack(stackArray[importerStackIndex + 1]);
return (stack === null || stack === void 0 ? void 0 : stack.file) || "";
}
const hot = import.meta.hot || {
on: warn,
off: warn,
send: warn
};
function warn() {
console.warn("Vitest mocker cannot work if Vite didn't establish WS connection.");
}
function rpc(event, data) {
hot.send(event, data);
return new Promise((resolve, reject) => {
const timeout = setTimeout(() => {
reject(new Error(`Failed to resolve ${event} in time`));
}, 5e3);
hot.on(`${event}:result`, function r(data) {
resolve(data);
clearTimeout(timeout);
hot.off(`${event}:result`, r);
});
});
}
const { now } = Date;
class ModuleMocker {
registry = new MockerRegistry();
queue = new Set();
mockedIds = new Set();
constructor(interceptor, rpc, createMockInstance, config) {
this.interceptor = interceptor;
this.rpc = rpc;
this.createMockInstance = createMockInstance;
this.config = config;
}
async prepare() {
if (!this.queue.size) {
return;
}
await Promise.all([...this.queue.values()]);
}
async resolveFactoryModule(id) {
const mock = this.registry.get(id);
if (!mock || mock.type !== "manual") {
throw new Error(`Mock ${id} wasn't registered. This is probably a Vitest error. Please, open a new issue with reproduction.`);
}
const result = await mock.resolve();
return result;
}
getFactoryModule(id) {
const mock = this.registry.get(id);
if (!mock || mock.type !== "manual") {
throw new Error(`Mock ${id} wasn't registered. This is probably a Vitest error. Please, open a new issue with reproduction.`);
}
if (!mock.cache) {
throw new Error(`Mock ${id} wasn't resolved. This is probably a Vitest error. Please, open a new issue with reproduction.`);
}
return mock.cache;
}
async invalidate() {
const ids = Array.from(this.mockedIds);
if (!ids.length) {
return;
}
await this.rpc.invalidate(ids);
await this.interceptor.invalidate();
this.registry.clear();
}
async importActual(id, importer) {
const resolved = await this.rpc.resolveId(id, importer);
if (resolved == null) {
throw new Error(`[vitest] Cannot resolve "${id}" imported from "${importer}"`);
}
const ext = extname(resolved.id);
const url = new URL(resolved.url, location.href);
const query = `_vitest_original&ext${ext}`;
const actualUrl = `${url.pathname}${url.search ? `${url.search}&${query}` : `?${query}`}${url.hash}`;
return this.wrapDynamicImport(() => import(
/* @vite-ignore */
actualUrl
)).then((mod) => {
if (!resolved.optimized || typeof mod.default === "undefined") {
return mod;
}
// vite injects this helper for optimized modules, so we try to follow the same behavior
const m = mod.default;
return (m === null || m === void 0 ? void 0 : m.__esModule) ? m : {
...typeof m === "object" && !Array.isArray(m) || typeof m === "function" ? m : {},
default: m
};
});
}
async importMock(rawId, importer) {
await this.prepare();
const { resolvedId, resolvedUrl, redirectUrl } = await this.rpc.resolveMock(rawId, importer, { mock: "auto" });
const mockUrl = this.resolveMockPath(cleanVersion(resolvedUrl));
let mock = this.registry.get(mockUrl);
if (!mock) {
if (redirectUrl) {
const resolvedRedirect = new URL(this.resolveMockPath(cleanVersion(redirectUrl)), location.href).toString();
mock = new RedirectedModule(rawId, resolvedId, mockUrl, resolvedRedirect);
} else {
mock = new AutomockedModule(rawId, resolvedId, mockUrl);
}
}
if (mock.type === "manual") {
return await mock.resolve();
}
if (mock.type === "automock" || mock.type === "autospy") {
const url = new URL(`/@id/${resolvedId}`, location.href);
const query = url.search ? `${url.search}&t=${now()}` : `?t=${now()}`;
const moduleObject = await import(
/* @vite-ignore */
`${url.pathname}${query}&mock=${mock.type}${url.hash}`
);
return this.mockObject(moduleObject, mock.type);
}
return import(
/* @vite-ignore */
mock.redirect
);
}
mockObject(object, moduleType = "automock") {
return mockObject({
globalConstructors: {
Object,
Function,
Array,
Map,
RegExp
},
createMockInstance: this.createMockInstance,
type: moduleType
}, object);
}
queueMock(rawId, importer, factoryOrOptions) {
const promise = this.rpc.resolveMock(rawId, importer, { mock: typeof factoryOrOptions === "function" ? "factory" : (factoryOrOptions === null || factoryOrOptions === void 0 ? void 0 : factoryOrOptions.spy) ? "spy" : "auto" }).then(async ({ redirectUrl, resolvedId, resolvedUrl, needsInterop, mockType }) => {
const mockUrl = this.resolveMockPath(cleanVersion(resolvedUrl));
this.mockedIds.add(resolvedId);
const factory = typeof factoryOrOptions === "function" ? async () => {
const data = await factoryOrOptions();
// vite wraps all external modules that have "needsInterop" in a function that
// merges all exports from default into the module object
return needsInterop ? { default: data } : data;
} : undefined;
const mockRedirect = typeof redirectUrl === "string" ? new URL(this.resolveMockPath(cleanVersion(redirectUrl)), location.href).toString() : null;
let module;
if (mockType === "manual") {
module = this.registry.register("manual", rawId, resolvedId, mockUrl, factory);
} else if (mockType === "autospy") {
module = this.registry.register("autospy", rawId, resolvedId, mockUrl);
} else if (mockType === "redirect") {
module = this.registry.register("redirect", rawId, resolvedId, mockUrl, mockRedirect);
} else {
module = this.registry.register("automock", rawId, resolvedId, mockUrl);
}
await this.interceptor.register(module);
}).finally(() => {
this.queue.delete(promise);
});
this.queue.add(promise);
}
queueUnmock(id, importer) {
const promise = this.rpc.resolveId(id, importer).then(async (resolved) => {
if (!resolved) {
return;
}
const mockUrl = this.resolveMockPath(cleanVersion(resolved.url));
this.mockedIds.add(resolved.id);
this.registry.delete(mockUrl);
await this.interceptor.delete(mockUrl);
}).finally(() => {
this.queue.delete(promise);
});
this.queue.add(promise);
}
// We need to await mock registration before importing the actual module
// In case there is a mocked module in the import chain
wrapDynamicImport(moduleFactory) {
if (typeof moduleFactory === "function") {
const promise = new Promise((resolve, reject) => {
this.prepare().finally(() => {
moduleFactory().then(resolve, reject);
});
});
return promise;
}
return moduleFactory;
}
resolveMockPath(path) {
const config = this.config;
const fsRoot = join("/@fs/", config.root);
// URL can be /file/path.js, but path is resolved to /file/path
if (path.startsWith(config.root)) {
return path.slice(config.root.length);
}
if (path.startsWith(fsRoot)) {
return path.slice(fsRoot.length);
}
return path;
}
}
const versionRegexp = /(\?|&)v=\w{8}/;
function cleanVersion(url) {
return url.replace(versionRegexp, "");
}
export { ModuleMocker as M, createCompilerHints as c, hot as h, rpc as r };
@@ -0,0 +1,29 @@
import basePullAll from './_basePullAll.js';
/**
* This method is like `_.pull` except that it accepts an array of values to remove.
*
* **Note:** Unlike `_.difference`, this method mutates `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to modify.
* @param {Array} values The values to remove.
* @returns {Array} Returns `array`.
* @example
*
* var array = ['a', 'b', 'c', 'a', 'b', 'c'];
*
* _.pullAll(array, ['a', 'c']);
* console.log(array);
* // => ['b', 'b']
*/
function pullAll(array, values) {
return (array && array.length && values && values.length)
? basePullAll(array, values)
: array;
}
export default pullAll;
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('reduceRight', require('../reduceRight'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,29 @@
"use strict"
const { READ } = require("@eslint-community/eslint-utils")
/**
* @satisfies {import('../types.js').SupportVersionTraceMap}
*/
const https = {
globalAgent: { [READ]: { supported: ["0.5.9"] } },
createServer: { [READ]: { supported: ["0.3.4"] } },
get: { [READ]: { supported: ["0.3.6"] } },
request: { [READ]: { supported: ["0.3.6"] } },
Agent: { [READ]: { supported: ["0.4.5"] } },
Server: { [READ]: { supported: ["0.3.4"] } },
}
/**
* @satisfies {import('../types.js').SupportVersionTraceMap}
*/
module.exports = {
https: {
[READ]: { supported: ["0.3.4"] },
...https,
},
"node:https": {
[READ]: { supported: ["14.13.1", "12.20.0"] },
...https,
},
}
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNotParentBindingConstraints = isNotParentBindingConstraints;
function isNotParentBindingConstraints(condition) {
return (constraints) => {
const ancestorMetadata = constraints.getAncestor();
return ancestorMetadata === undefined || !condition(ancestorMetadata);
};
}
//# sourceMappingURL=isNotParentBindingConstraints.js.map
@@ -0,0 +1,214 @@
import {
ClassGroup,
ClassValidator,
Config,
GenericClassGroupIds,
GenericConfig,
GenericThemeGroupIds,
ThemeGetter,
ThemeObject,
} from './types'
export interface ClassPartObject {
nextPart: Map<string, ClassPartObject>
validators: ClassValidatorObject[]
classGroupId?: GenericClassGroupIds
}
interface ClassValidatorObject {
classGroupId: GenericClassGroupIds
validator: ClassValidator
}
const CLASS_PART_SEPARATOR = '-'
export const createClassGroupUtils = (config: GenericConfig) => {
const classMap = createClassMap(config)
const { conflictingClassGroups, conflictingClassGroupModifiers } = config
const getClassGroupId = (className: string) => {
const classParts = className.split(CLASS_PART_SEPARATOR)
// Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts.
if (classParts[0] === '' && classParts.length !== 1) {
classParts.shift()
}
return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className)
}
const getConflictingClassGroupIds = (
classGroupId: GenericClassGroupIds,
hasPostfixModifier: boolean,
) => {
const conflicts = conflictingClassGroups[classGroupId] || []
if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]!]
}
return conflicts
}
return {
getClassGroupId,
getConflictingClassGroupIds,
}
}
const getGroupRecursive = (
classParts: string[],
classPartObject: ClassPartObject,
): GenericClassGroupIds | undefined => {
if (classParts.length === 0) {
return classPartObject.classGroupId
}
const currentClassPart = classParts[0]!
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart)
const classGroupFromNextClassPart = nextClassPartObject
? getGroupRecursive(classParts.slice(1), nextClassPartObject)
: undefined
if (classGroupFromNextClassPart) {
return classGroupFromNextClassPart
}
if (classPartObject.validators.length === 0) {
return undefined
}
const classRest = classParts.join(CLASS_PART_SEPARATOR)
return classPartObject.validators.find(({ validator }) => validator(classRest))?.classGroupId
}
const arbitraryPropertyRegex = /^\[(.+)\]$/
const getGroupIdForArbitraryProperty = (className: string) => {
if (arbitraryPropertyRegex.test(className)) {
const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)![1]
const property = arbitraryPropertyClassName?.substring(
0,
arbitraryPropertyClassName.indexOf(':'),
)
if (property) {
// I use two dots here because one dot is used as prefix for class groups in plugins
return 'arbitrary..' + property
}
}
}
/**
* Exported for testing only
*/
export const createClassMap = (config: Config<GenericClassGroupIds, GenericThemeGroupIds>) => {
const { theme, prefix } = config
const classMap: ClassPartObject = {
nextPart: new Map<string, ClassPartObject>(),
validators: [],
}
const prefixedClassGroupEntries = getPrefixedClassGroupEntries(
Object.entries(config.classGroups),
prefix,
)
prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
processClassesRecursively(classGroup, classMap, classGroupId, theme)
})
return classMap
}
const processClassesRecursively = (
classGroup: ClassGroup<GenericThemeGroupIds>,
classPartObject: ClassPartObject,
classGroupId: GenericClassGroupIds,
theme: ThemeObject<GenericThemeGroupIds>,
) => {
classGroup.forEach((classDefinition) => {
if (typeof classDefinition === 'string') {
const classPartObjectToEdit =
classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition)
classPartObjectToEdit.classGroupId = classGroupId
return
}
if (typeof classDefinition === 'function') {
if (isThemeGetter(classDefinition)) {
processClassesRecursively(
classDefinition(theme),
classPartObject,
classGroupId,
theme,
)
return
}
classPartObject.validators.push({
validator: classDefinition,
classGroupId,
})
return
}
Object.entries(classDefinition).forEach(([key, classGroup]) => {
processClassesRecursively(
classGroup,
getPart(classPartObject, key),
classGroupId,
theme,
)
})
})
}
const getPart = (classPartObject: ClassPartObject, path: string) => {
let currentClassPartObject = classPartObject
path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
if (!currentClassPartObject.nextPart.has(pathPart)) {
currentClassPartObject.nextPart.set(pathPart, {
nextPart: new Map(),
validators: [],
})
}
currentClassPartObject = currentClassPartObject.nextPart.get(pathPart)!
})
return currentClassPartObject
}
const isThemeGetter = (func: ClassValidator | ThemeGetter): func is ThemeGetter =>
(func as ThemeGetter).isThemeGetter
const getPrefixedClassGroupEntries = (
classGroupEntries: Array<[classGroupId: string, classGroup: ClassGroup<GenericThemeGroupIds>]>,
prefix: string | undefined,
): Array<[classGroupId: string, classGroup: ClassGroup<GenericThemeGroupIds>]> => {
if (!prefix) {
return classGroupEntries
}
return classGroupEntries.map(([classGroupId, classGroup]) => {
const prefixedClassGroup = classGroup.map((classDefinition) => {
if (typeof classDefinition === 'string') {
return prefix + classDefinition
}
if (typeof classDefinition === 'object') {
return Object.fromEntries(
Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]),
)
}
return classDefinition
})
return [classGroupId, prefixedClassGroup]
})
}
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,kBAAkB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,eAAe,CAAC;IAC3E,qBAAqB,CAAC,gDAA0C,CAAC;IACjE,UAAU,CAAC,SAAS,CAAC;IACrB,eAAe,CAAC,uBAAuB,CAAC;IACxC,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,4BAA4B,CAAC;YAAE,KAAK,IAAM,CAAC,YAAY,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,OAAO,CAAC;YAAE,OAAO,IAAM,CAAC,YAAY,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,OAAO,CAAC;QAAA,GAAG,CAAC,CAAC;IACpP,gBAAgB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,aAAa,CAAC;AACvD","sources":["packages/@react-aria/grid/intl/sr-SP.json"],"sourcesContent":["{\n \"deselectedItem\": \"{item} nije izabrano.\",\n \"longPressToSelect\": \"Dugo pritisnite za ulazak u režim biranja.\",\n \"select\": \"Izaberite\",\n \"selectedAll\": \"Izabrane su sve stavke.\",\n \"selectedCount\": \"{count, plural, =0 {Nije izabrana nijedna stavka} one {Izabrana je # stavka} other {Izabrano je # stavki}}.\",\n \"selectedItem\": \"{item} je izabrano.\"\n}\n"],"names":[],"version":3,"file":"sr-SP.main.js.map"}
@@ -0,0 +1,240 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory());
})(this, (function () { 'use strict';
// Matches the scheme of a URL, eg "http://"
const schemeRegex = /^[\w+.-]+:\/\//;
/**
* Matches the parts of a URL:
* 1. Scheme, including ":", guaranteed.
* 2. User/password, including "@", optional.
* 3. Host, guaranteed.
* 4. Port, including ":", optional.
* 5. Path, including "/", optional.
* 6. Query, including "?", optional.
* 7. Hash, including "#", optional.
*/
const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
/**
* File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start
* with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).
*
* 1. Host, optional.
* 2. Path, which may include "/", guaranteed.
* 3. Query, including "?", optional.
* 4. Hash, including "#", optional.
*/
const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
function isAbsoluteUrl(input) {
return schemeRegex.test(input);
}
function isSchemeRelativeUrl(input) {
return input.startsWith('//');
}
function isAbsolutePath(input) {
return input.startsWith('/');
}
function isFileUrl(input) {
return input.startsWith('file:');
}
function isRelative(input) {
return /^[.?#]/.test(input);
}
function parseAbsoluteUrl(input) {
const match = urlRegex.exec(input);
return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');
}
function parseFileUrl(input) {
const match = fileRegex.exec(input);
const path = match[2];
return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');
}
function makeUrl(scheme, user, host, port, path, query, hash) {
return {
scheme,
user,
host,
port,
path,
query,
hash,
type: 7 /* Absolute */,
};
}
function parseUrl(input) {
if (isSchemeRelativeUrl(input)) {
const url = parseAbsoluteUrl('http:' + input);
url.scheme = '';
url.type = 6 /* SchemeRelative */;
return url;
}
if (isAbsolutePath(input)) {
const url = parseAbsoluteUrl('http://foo.com' + input);
url.scheme = '';
url.host = '';
url.type = 5 /* AbsolutePath */;
return url;
}
if (isFileUrl(input))
return parseFileUrl(input);
if (isAbsoluteUrl(input))
return parseAbsoluteUrl(input);
const url = parseAbsoluteUrl('http://foo.com/' + input);
url.scheme = '';
url.host = '';
url.type = input
? input.startsWith('?')
? 3 /* Query */
: input.startsWith('#')
? 2 /* Hash */
: 4 /* RelativePath */
: 1 /* Empty */;
return url;
}
function stripPathFilename(path) {
// If a path ends with a parent directory "..", then it's a relative path with excess parent
// paths. It's not a file, so we can't strip it.
if (path.endsWith('/..'))
return path;
const index = path.lastIndexOf('/');
return path.slice(0, index + 1);
}
function mergePaths(url, base) {
normalizePath(base, base.type);
// If the path is just a "/", then it was an empty path to begin with (remember, we're a relative
// path).
if (url.path === '/') {
url.path = base.path;
}
else {
// Resolution happens relative to the base path's directory, not the file.
url.path = stripPathFilename(base.path) + url.path;
}
}
/**
* The path can have empty directories "//", unneeded parents "foo/..", or current directory
* "foo/.". We need to normalize to a standard representation.
*/
function normalizePath(url, type) {
const rel = type <= 4 /* RelativePath */;
const pieces = url.path.split('/');
// We need to preserve the first piece always, so that we output a leading slash. The item at
// pieces[0] is an empty string.
let pointer = 1;
// Positive is the number of real directories we've output, used for popping a parent directory.
// Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo".
let positive = 0;
// We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will
// generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a
// real directory, we won't need to append, unless the other conditions happen again.
let addTrailingSlash = false;
for (let i = 1; i < pieces.length; i++) {
const piece = pieces[i];
// An empty directory, could be a trailing slash, or just a double "//" in the path.
if (!piece) {
addTrailingSlash = true;
continue;
}
// If we encounter a real directory, then we don't need to append anymore.
addTrailingSlash = false;
// A current directory, which we can always drop.
if (piece === '.')
continue;
// A parent directory, we need to see if there are any real directories we can pop. Else, we
// have an excess of parents, and we'll need to keep the "..".
if (piece === '..') {
if (positive) {
addTrailingSlash = true;
positive--;
pointer--;
}
else if (rel) {
// If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute
// URL, protocol relative URL, or an absolute path, we don't need to keep excess.
pieces[pointer++] = piece;
}
continue;
}
// We've encountered a real directory. Move it to the next insertion pointer, which accounts for
// any popped or dropped directories.
pieces[pointer++] = piece;
positive++;
}
let path = '';
for (let i = 1; i < pointer; i++) {
path += '/' + pieces[i];
}
if (!path || (addTrailingSlash && !path.endsWith('/..'))) {
path += '/';
}
url.path = path;
}
/**
* Attempts to resolve `input` URL/path relative to `base`.
*/
function resolve(input, base) {
if (!input && !base)
return '';
const url = parseUrl(input);
let inputType = url.type;
if (base && inputType !== 7 /* Absolute */) {
const baseUrl = parseUrl(base);
const baseType = baseUrl.type;
switch (inputType) {
case 1 /* Empty */:
url.hash = baseUrl.hash;
// fall through
case 2 /* Hash */:
url.query = baseUrl.query;
// fall through
case 3 /* Query */:
case 4 /* RelativePath */:
mergePaths(url, baseUrl);
// fall through
case 5 /* AbsolutePath */:
// The host, user, and port are joined, you can't copy one without the others.
url.user = baseUrl.user;
url.host = baseUrl.host;
url.port = baseUrl.port;
// fall through
case 6 /* SchemeRelative */:
// The input doesn't have a schema at least, so we need to copy at least that over.
url.scheme = baseUrl.scheme;
}
if (baseType > inputType)
inputType = baseType;
}
normalizePath(url, inputType);
const queryHash = url.query + url.hash;
switch (inputType) {
// This is impossible, because of the empty checks at the start of the function.
// case UrlType.Empty:
case 2 /* Hash */:
case 3 /* Query */:
return queryHash;
case 4 /* RelativePath */: {
// The first char is always a "/", and we need it to be relative.
const path = url.path.slice(1);
if (!path)
return queryHash || '.';
if (isRelative(base || input) && !isRelative(path)) {
// If base started with a leading ".", or there is no base and input started with a ".",
// then we need to ensure that the relative path starts with a ".". We don't know if
// relative starts with a "..", though, so check before prepending.
return './' + path + queryHash;
}
return path + queryHash;
}
case 5 /* AbsolutePath */:
return url.path + queryHash;
default:
return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;
}
}
return resolve;
}));
//# sourceMappingURL=resolve-uri.umd.js.map
@@ -0,0 +1,6 @@
import { ServiceIdentifier } from '@inversifyjs/common';
import { InternalBindingConstraints } from '../../binding/models/BindingConstraintsImplementation';
import { SingleImmutableLinkedListNode } from '../../common/models/SingleImmutableLinkedList';
import { PlanBindingNode } from '../models/PlanBindingNode';
export declare function throwErrorWhenUnexpectedBindingsAmountFound(bindingNodes: PlanBindingNode[] | PlanBindingNode | undefined, isOptional: boolean, bindingConstraintNode: SingleImmutableLinkedListNode<InternalBindingConstraints>, serviceRedirections: readonly ServiceIdentifier[]): void;
//# sourceMappingURL=throwErrorWhenUnexpectedBindingsAmountFound.d.ts.map
@@ -0,0 +1 @@
{"mappings":";;;AAAA;;;;;;;;;;CAUC;;AA8BM,SAAS,0CAAQ,KAAsB,EAAE,GAAuC;IACrF,IAAI,eACF,cAAc,cACd,OAAO,gBACP,YAAY,cACZ,UAAU,WACV,OAAO,cACP,UAAU,EACV,GAAG,YACJ,GAAG;IAEJ,IAAI,YAA2B,CAAC;IAChC,IAAI,gBAAgB,KAClB,YAAY;QACV,MAAM;QACN,UAAU,CAAC,aAAa,IAAI;IAC9B;IAEF,IAAI,kBAAC,cAAc,EAAC,GAAG,CAAA,GAAA,mBAAW,EAAE,OAAO;IAC3C,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;iBAAC;sBAAS;oBAAc;iBAAY;oBAAS;aAAY;IAAG;IACnG,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,YAAY;QAAC,WAAW;IAAI;IAC1D,IAAI,sBAAsB,CAAA,GAAA,iBAAS,EAAE,gBAAgB;IACrD,IAAI,SAAS,CAAA,GAAA,gBAAQ;IACrB,IAAI,kBAAkB,CAAA,GAAA,mBAAW,EAAE;IAEnC,OAAO;mBACL;QACA,WAAW,CAAA,GAAA,iBAAS,EAAE,UAAU,iBAAiB;YAC/C,GAAG,mBAAmB;YACtB,GAAG,SAAS;YACZ,iBAAiB,cAAc;YAC/B,gBAAgB,KAAK,CAAC,eAAe;YACrC,SAAS,CAAC;oBACR;iBAAA,sBAAA,WAAW,OAAO,cAAlB,0CAAA,yBAAA,YAAqB;gBACrB,CAAA,GAAA,sBAAc,EAAE,GAAG,QAAQ,MAAM,IAAI,EAAE,MAAM,aAAa;YAC5D;QACF;IACF;AACF","sources":["packages/@react-aria/link/src/useLink.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLinkProps} from '@react-types/link';\nimport {DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';\nimport {filterDOMProps, handleLinkClick, mergeProps, useLinkProps, useRouter} from '@react-aria/utils';\nimport React from 'react';\nimport {useFocusable, usePress} from '@react-aria/interactions';\n\nexport interface AriaLinkOptions extends AriaLinkProps {\n /** Whether the link is disabled. */\n isDisabled?: boolean,\n /**\n * The HTML element used to render the link, e.g. 'a', or 'span'.\n * @default 'a'\n */\n elementType?: string\n}\n\nexport interface LinkAria {\n /** Props for the link element. */\n linkProps: DOMAttributes,\n /** Whether the link is currently pressed. */\n isPressed: boolean\n}\n\n/**\n * Provides the behavior and accessibility implementation for a link component.\n * A link allows a user to navigate to another page or resource within a web page\n * or application.\n */\nexport function useLink(props: AriaLinkOptions, ref: RefObject<FocusableElement | null>): LinkAria {\n let {\n elementType = 'a',\n onPress,\n onPressStart,\n onPressEnd,\n onClick,\n isDisabled,\n ...otherProps\n } = props;\n\n let linkProps: DOMAttributes = {};\n if (elementType !== 'a') {\n linkProps = {\n role: 'link',\n tabIndex: !isDisabled ? 0 : undefined\n };\n }\n let {focusableProps} = useFocusable(props, ref);\n let {pressProps, isPressed} = usePress({onPress, onPressStart, onPressEnd, onClick, isDisabled, ref});\n let domProps = filterDOMProps(otherProps, {labelable: true});\n let interactionHandlers = mergeProps(focusableProps, pressProps);\n let router = useRouter();\n let routerLinkProps = useLinkProps(props);\n\n return {\n isPressed, // Used to indicate press state for visual\n linkProps: mergeProps(domProps, routerLinkProps, {\n ...interactionHandlers,\n ...linkProps,\n 'aria-disabled': isDisabled || undefined,\n 'aria-current': props['aria-current'],\n onClick: (e: React.MouseEvent<HTMLAnchorElement>) => {\n pressProps.onClick?.(e);\n handleLinkClick(e, router, props.href, props.routerOptions);\n }\n })\n };\n}\n"],"names":[],"version":3,"file":"useLink.module.js.map"}
@@ -0,0 +1,7 @@
import {
extendVariants
} from "./chunk-Z7BOKSG7.mjs";
import "./chunk-YFAKJTDR.mjs";
export {
extendVariants
};
@@ -0,0 +1,483 @@
/**
* @fileoverview Utility functions for AST
*/
'use strict';
const estraverse = require('estraverse');
const eslintUtil = require('./eslint');
const getFirstTokens = eslintUtil.getFirstTokens;
const getScope = eslintUtil.getScope;
const getSourceCode = eslintUtil.getSourceCode;
// const pragmaUtil = require('./pragma');
/**
* Wrapper for estraverse.traverse
*
* @param {ASTNode} ASTnode The AST node being checked
* @param {Object} visitor Visitor Object for estraverse
*/
function traverse(ASTnode, visitor) {
const opts = Object.assign({}, {
fallback(node) {
return Object.keys(node).filter((key) => key === 'children' || key === 'argument');
},
}, visitor);
opts.keys = Object.assign({}, visitor.keys, {
JSXElement: ['children'],
JSXFragment: ['children'],
});
estraverse.traverse(ASTnode, opts);
}
function loopNodes(nodes) {
for (let i = nodes.length - 1; i >= 0; i--) {
if (nodes[i].type === 'ReturnStatement') {
return nodes[i];
}
if (nodes[i].type === 'SwitchStatement') {
const j = nodes[i].cases.length - 1;
if (j >= 0) {
return loopNodes(nodes[i].cases[j].consequent);
}
}
}
return false;
}
/**
* Find a return statement in the current node
*
* @param {ASTNode} node The AST node being checked
* @returns {ASTNode | false}
*/
function findReturnStatement(node) {
if (
(!node.value || !node.value.body || !node.value.body.body)
&& (!node.body || !node.body.body)
) {
return false;
}
const bodyNodes = node.value ? node.value.body.body : node.body.body;
return loopNodes(bodyNodes);
}
// eslint-disable-next-line valid-jsdoc -- valid-jsdoc cannot parse function types.
/**
* Helper function for traversing "returns" (return statements or the
* returned expression in the case of an arrow function) of a function
*
* @param {ASTNode} ASTNode The AST node being checked
* @param {Context} context The context of `ASTNode`.
* @param {(returnValue: ASTNode, breakTraverse: () => void) => void} onReturn
* Function to execute for each returnStatement found
* @returns {undefined}
*/
function traverseReturns(ASTNode, context, onReturn) {
const nodeType = ASTNode.type;
if (nodeType === 'ReturnStatement') {
onReturn(ASTNode.argument, () => {});
return;
}
if (nodeType === 'ArrowFunctionExpression' && ASTNode.expression) {
onReturn(ASTNode.body, () => {});
return;
}
/* TODO: properly warn on React.forwardRefs having typo properties
if (astUtil.isCallExpression(ASTNode)) {
const callee = ASTNode.callee;
const pragma = pragmaUtil.getFromContext(context);
if (
callee.type === 'MemberExpression'
&& callee.object.type === 'Identifier'
&& callee.object.name === pragma
&& callee.property.type === 'Identifier'
&& callee.property.name === 'forwardRef'
&& ASTNode.arguments.length > 0
) {
return enterFunc(ASTNode.arguments[0]);
}
return;
}
*/
if (
nodeType !== 'FunctionExpression'
&& nodeType !== 'FunctionDeclaration'
&& nodeType !== 'ArrowFunctionExpression'
&& nodeType !== 'MethodDefinition'
) {
return;
}
traverse(ASTNode.body, {
enter(node) {
const breakTraverse = () => {
this.break();
};
switch (node.type) {
case 'ReturnStatement':
this.skip();
onReturn(node.argument, breakTraverse);
return;
case 'BlockStatement':
case 'IfStatement':
case 'ForStatement':
case 'WhileStatement':
case 'SwitchStatement':
case 'SwitchCase':
return;
default:
this.skip();
}
},
});
}
/**
* Get node with property's name
* @param {Object} node - Property.
* @returns {Object} Property name node.
*/
function getPropertyNameNode(node) {
if (
node.key
|| node.type === 'MethodDefinition'
|| node.type === 'Property'
) {
return node.key;
}
if (node.type === 'MemberExpression') {
return node.property;
}
return null;
}
/**
* Get properties name
* @param {Object} node - Property.
* @returns {string} Property name.
*/
function getPropertyName(node) {
const nameNode = getPropertyNameNode(node);
return nameNode ? nameNode.name : '';
}
/**
* Get properties for a given AST node
* @param {ASTNode} node The AST node being checked.
* @returns {Array} Properties array.
*/
function getComponentProperties(node) {
switch (node.type) {
case 'ClassDeclaration':
case 'ClassExpression':
return node.body.body;
case 'ObjectExpression':
return node.properties;
default:
return [];
}
}
/**
* Gets the first node in a line from the initial node, excluding whitespace.
* @param {Object} context The node to check
* @param {ASTNode} node The node to check
* @return {ASTNode} the first node in the line
*/
function getFirstNodeInLine(context, node) {
const sourceCode = getSourceCode(context);
let token = node;
let lines;
do {
token = sourceCode.getTokenBefore(token);
lines = token.type === 'JSXText'
? token.value.split('\n')
: null;
} while (
token.type === 'JSXText'
&& /^\s*$/.test(lines[lines.length - 1])
);
return token;
}
/**
* Checks if the node is the first in its line, excluding whitespace.
* @param {Object} context The node to check
* @param {ASTNode} node The node to check
* @return {boolean} true if it's the first node in its line
*/
function isNodeFirstInLine(context, node) {
const token = getFirstNodeInLine(context, node);
const startLine = node.loc.start.line;
const endLine = token ? token.loc.end.line : -1;
return startLine !== endLine;
}
/**
* Checks if the node is a function or arrow function expression.
* @param {ASTNode} node The node to check
* @return {boolean} true if it's a function-like expression
*/
function isFunctionLikeExpression(node) {
return node.type === 'FunctionExpression' || node.type === 'ArrowFunctionExpression';
}
/**
* Checks if the node is a function.
* @param {ASTNode} node The node to check
* @return {boolean} true if it's a function
*/
function isFunction(node) {
return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration';
}
/**
* Checks if node is a function declaration or expression or arrow function.
* @param {ASTNode} node The node to check
* @return {boolean} true if it's a function-like
*/
function isFunctionLike(node) {
return node.type === 'FunctionDeclaration' || isFunctionLikeExpression(node);
}
/**
* Checks if the node is a class.
* @param {ASTNode} node The node to check
* @return {boolean} true if it's a class
*/
function isClass(node) {
return node.type === 'ClassDeclaration' || node.type === 'ClassExpression';
}
/**
* Check if we are in a class constructor
* @param {Context} context
* @param {ASTNode} node The AST node being checked.
* @return {boolean}
*/
function inConstructor(context, node) {
let scope = getScope(context, node);
while (scope) {
// @ts-ignore
if (scope.block && scope.block.parent && scope.block.parent.kind === 'constructor') {
return true;
}
scope = scope.upper;
}
return false;
}
/**
* Removes quotes from around an identifier.
* @param {string} string the identifier to strip
* @returns {string}
*/
function stripQuotes(string) {
return string.replace(/^'|'$/g, '');
}
/**
* Retrieve the name of a key node
* @param {Context} context The AST node with the key.
* @param {any} node The AST node with the key.
* @return {string | undefined} the name of the key
*/
function getKeyValue(context, node) {
if (node.type === 'ObjectTypeProperty') {
const tokens = getFirstTokens(context, node, 2);
return (tokens[0].value === '+' || tokens[0].value === '-'
? tokens[1].value
: stripQuotes(tokens[0].value)
);
}
if (node.type === 'GenericTypeAnnotation') {
return node.id.name;
}
if (node.type === 'ObjectTypeAnnotation') {
return;
}
const key = node.key || node.argument;
if (!key) {
return;
}
return key.type === 'Identifier' ? key.name : key.value;
}
/**
* Checks if a node is surrounded by parenthesis.
*
* @param {object} context - Context from the rule
* @param {ASTNode} node - Node to be checked
* @returns {boolean}
*/
function isParenthesized(context, node) {
const sourceCode = getSourceCode(context);
const previousToken = sourceCode.getTokenBefore(node);
const nextToken = sourceCode.getTokenAfter(node);
return !!previousToken && !!nextToken
&& previousToken.value === '(' && previousToken.range[1] <= node.range[0]
&& nextToken.value === ')' && nextToken.range[0] >= node.range[1];
}
/**
* Checks if a node is being assigned a value: props.bar = 'bar'
* @param {ASTNode} node The AST node being checked.
* @returns {boolean}
*/
function isAssignmentLHS(node) {
return (
node.parent
&& node.parent.type === 'AssignmentExpression'
&& node.parent.left === node
);
}
function isTSAsExpression(node) {
return node && node.type === 'TSAsExpression';
}
/**
* Matcher used to check whether given node is a `CallExpression`
* @param {ASTNode} node The AST node
* @returns {boolean} True if node is a `CallExpression`, false if not
*/
function isCallExpression(node) {
return node && node.type === 'CallExpression';
}
/**
* Extracts the expression node that is wrapped inside a TS type assertion
*
* @param {ASTNode} node - potential TS node
* @returns {ASTNode} - unwrapped expression node
*/
function unwrapTSAsExpression(node) {
return isTSAsExpression(node) ? node.expression : node;
}
function isTSTypeReference(node) {
if (!node) return false;
return node.type === 'TSTypeReference';
}
function isTSTypeAnnotation(node) {
if (!node) { return false; }
return node.type === 'TSTypeAnnotation';
}
function isTSTypeLiteral(node) {
if (!node) { return false; }
return node.type === 'TSTypeLiteral';
}
function isTSIntersectionType(node) {
if (!node) { return false; }
return node.type === 'TSIntersectionType';
}
function isTSInterfaceHeritage(node) {
if (!node) { return false; }
return node.type === 'TSInterfaceHeritage';
}
function isTSInterfaceDeclaration(node) {
if (!node) { return false; }
return (node.type === 'ExportNamedDeclaration' && node.declaration
? node.declaration.type
: node.type
) === 'TSInterfaceDeclaration';
}
function isTSTypeDeclaration(node) {
if (!node) { return false; }
const nodeToCheck = node.type === 'ExportNamedDeclaration' && node.declaration
? node.declaration
: node;
return nodeToCheck.type === 'VariableDeclaration' && nodeToCheck.kind === 'type';
}
function isTSTypeAliasDeclaration(node) {
if (!node) { return false; }
if (node.type === 'ExportNamedDeclaration' && node.declaration) {
return node.declaration.type === 'TSTypeAliasDeclaration' && node.exportKind === 'type';
}
return node.type === 'TSTypeAliasDeclaration';
}
function isTSParenthesizedType(node) {
if (!node) { return false; }
return node.type === 'TSTypeAliasDeclaration';
}
function isTSFunctionType(node) {
if (!node) { return false; }
return node.type === 'TSFunctionType';
}
function isTSTypeQuery(node) {
if (!node) { return false; }
return node.type === 'TSTypeQuery';
}
function isTSTypeParameterInstantiation(node) {
if (!node) { return false; }
return node.type === 'TSTypeParameterInstantiation';
}
module.exports = {
findReturnStatement,
getComponentProperties,
getFirstNodeInLine,
getKeyValue,
getPropertyName,
getPropertyNameNode,
inConstructor,
isAssignmentLHS,
isCallExpression,
isClass,
isFunction,
isFunctionLike,
isFunctionLikeExpression,
isNodeFirstInLine,
isParenthesized,
isTSAsExpression,
isTSFunctionType,
isTSInterfaceDeclaration,
isTSInterfaceHeritage,
isTSIntersectionType,
isTSParenthesizedType,
isTSTypeAliasDeclaration,
isTSTypeAnnotation,
isTSTypeDeclaration,
isTSTypeLiteral,
isTSTypeParameterInstantiation,
isTSTypeQuery,
isTSTypeReference,
traverse,
traverseReturns,
unwrapTSAsExpression,
};
@@ -0,0 +1,8 @@
/**
* @fileoverview API entrypoint for hfs/core
* @author Nicholas C. Zakas
*/
export { Hfs } from "./hfs.js";
export { Path } from "./path.js";
export * from "./errors.js";
@@ -0,0 +1,4 @@
<svg viewbox="0 0 18 18">
<circle class="ql-stroke" cx="9" cy="9" r="2"></circle>
<path class="ql-stroke" d="M11,14.651A6,6,0,1,1,15,9a2,2,0,0,1-4,0V7"></path>
</svg>

After

Width:  |  Height:  |  Size: 170 B

@@ -0,0 +1,99 @@
import {mergeIds as $bdb11010cef70236$export$cd8c9cb68f842629, useId as $bdb11010cef70236$export$f680877a34711e37, useSlotId as $bdb11010cef70236$export$b4cc09c592e8fdb8} from "./useId.mjs";
import {chain as $ff5963eb1fccf552$export$e08e3b67e392101e} from "./chain.mjs";
import {createShadowTreeWalker as $dfc540311bf7f109$export$4d0f8be8b12a7ef6, ShadowTreeWalker as $dfc540311bf7f109$export$63eb3ababa9c55c4} from "./ShadowTreeWalker.mjs";
import {getActiveElement as $d4ee10de306f2510$export$cd4e5573fbe2b576, getEventTarget as $d4ee10de306f2510$export$e58f029f0fbfdb29, nodeContains as $d4ee10de306f2510$export$4282f70798064fe0} from "./DOMFunctions.mjs";
import {getOwnerDocument as $431fbd86ca7dc216$export$b204af158042fbac, getOwnerWindow as $431fbd86ca7dc216$export$f21a1ffae260145a, isShadowRoot as $431fbd86ca7dc216$export$af51f0f06c0f328a} from "./domHelpers.mjs";
import {mergeProps as $3ef42575df84b30b$export$9d1611c77c2fe928} from "./mergeProps.mjs";
import {mergeRefs as $5dc95899b306f630$export$c9058316764c140e} from "./mergeRefs.mjs";
import {filterDOMProps as $65484d02dcb7eb3e$export$457c3d6518dd4c6f} from "./filterDOMProps.mjs";
import {focusWithoutScrolling as $7215afc6de606d6b$export$de79e2c695e052f3} from "./focusWithoutScrolling.mjs";
import {getOffset as $ab71dadb03a6fb2e$export$622cea445a1c5b7d} from "./getOffset.mjs";
import {getSyntheticLinkProps as $ea8dcbcb9ea1b556$export$51437d503373d223, handleLinkClick as $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f, openLink as $ea8dcbcb9ea1b556$export$95185d699e05d4d7, RouterProvider as $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb, shouldClientNavigate as $ea8dcbcb9ea1b556$export$efa8c9099e530235, useLinkProps as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18, useRouter as $ea8dcbcb9ea1b556$export$9a302a45f65d0572, useSyntheticLinkProps as $ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6} from "./openLink.mjs";
import {runAfterTransition as $bbed8b41f857bcc0$export$24490316f764c430} from "./runAfterTransition.mjs";
import {useDrag1D as $9cc09df9fd7676be$export$7bbed75feba39706} from "./useDrag1D.mjs";
import {useGlobalListeners as $03deb23ff14920c4$export$4eaf04e54aa8eed6} from "./useGlobalListeners.mjs";
import {useLabels as $313b98861ee5dd6c$export$d6875122194c7b44} from "./useLabels.mjs";
import {useObjectRef as $df56164dff5785e2$export$4338b53315abf666} from "./useObjectRef.mjs";
import {useUpdateEffect as $4f58c5f72bcf79f7$export$496315a1608d9602} from "./useUpdateEffect.mjs";
import {useUpdateLayoutEffect as $ca9b37712f007381$export$72ef708ab07251f1} from "./useUpdateLayoutEffect.mjs";
import {useLayoutEffect as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c} from "./useLayoutEffect.mjs";
import {useResizeObserver as $9daab02d461809db$export$683480f191c0e3ea} from "./useResizeObserver.mjs";
import {useSyncRef as $e7801be82b4b2a53$export$4debdb1a3f0fa79e} from "./useSyncRef.mjs";
import {getScrollParent as $62d8ded9296f3872$export$cfa2225e87938781} from "./getScrollParent.mjs";
import {getScrollParents as $a40c673dc9f6d9c7$export$94ed1c92c7beeb22} from "./getScrollParents.mjs";
import {isScrollable as $cc38e7bd3fc7b213$export$2bb74740c4e19def} from "./isScrollable.mjs";
import {useViewportSize as $5df64b3807dc15ee$export$d699905dd57c73ca} from "./useViewportSize.mjs";
import {useDescription as $ef06256079686ba0$export$f8aeda7b10753fa1} from "./useDescription.mjs";
import {isAndroid as $c87311424ea30a05$export$a11b0059900ceec8, isAppleDevice as $c87311424ea30a05$export$e1865c3bedcd822b, isChrome as $c87311424ea30a05$export$6446a186d09e379e, isFirefox as $c87311424ea30a05$export$b7d78993b74f766d, isIOS as $c87311424ea30a05$export$fedb369cb70207f1, isIPad as $c87311424ea30a05$export$7bef049ce92e4224, isIPhone as $c87311424ea30a05$export$186c6964ca17d99, isMac as $c87311424ea30a05$export$9ac100e40613ea10, isWebKit as $c87311424ea30a05$export$78551043582a6a98} from "./platform.mjs";
import {useEvent as $e9faafb641e167db$export$90fc3a17d93f704c} from "./useEvent.mjs";
import {useValueEffect as $1dbecbe27a04f9af$export$14d238f342723f25} from "./useValueEffect.mjs";
import {scrollIntoView as $2f04cbc44ee30ce0$export$53a0910f038337bd, scrollIntoViewport as $2f04cbc44ee30ce0$export$c826860796309d1b} from "./scrollIntoView.mjs";
import {isVirtualClick as $6a7db85432448f7f$export$60278871457622de, isVirtualPointerEvent as $6a7db85432448f7f$export$29bf1b5f2c56cf63} from "./isVirtualEvent.mjs";
import {useEffectEvent as $8ae05eaa5c114e9c$export$7f54fc3180508a52} from "./useEffectEvent.mjs";
import {useDeepMemo as $5a387cc49350e6db$export$722debc0e56fea39} from "./useDeepMemo.mjs";
import {useFormReset as $99facab73266f662$export$5add1d006293d136} from "./useFormReset.mjs";
import {useLoadMore as $26f7f3da73fcd9d6$export$7717c92ee915373e} from "./useLoadMore.mjs";
import {useLoadMoreSentinel as $a5fa973c1850dd36$export$ccaea96c28e8b9e7} from "./useLoadMoreSentinel.mjs";
import {inertValue as $cdc5a6778b766db2$export$a9d04c5684123369} from "./inertValue.mjs";
import {CLEAR_FOCUS_EVENT as $5671b20cf9b562b2$export$447a38995de2c711, FOCUS_EVENT as $5671b20cf9b562b2$export$831c820ad60f9d12} from "./constants.mjs";
import {isCtrlKeyPressed as $21f1aa98acb08317$export$16792effe837dba3, willOpenKeyboard as $21f1aa98acb08317$export$c57958e35f31ed73} from "./keyboard.mjs";
import {useEnterAnimation as $d3f049242431219c$export$6d3443f2c48bfc20, useExitAnimation as $d3f049242431219c$export$45fda7c47f93fd48} from "./animation.mjs";
import {isFocusable as $b4b717babfbb907b$export$4c063cf1350e6fed, isTabbable as $b4b717babfbb907b$export$bebd5a1431fec25d} from "./isFocusable.mjs";
import {clamp as $4507461a1b870123$re_export$clamp, snapValueToStep as $4507461a1b870123$re_export$snapValueToStep} from "@react-stately/utils";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export {$bdb11010cef70236$export$f680877a34711e37 as useId, $bdb11010cef70236$export$cd8c9cb68f842629 as mergeIds, $bdb11010cef70236$export$b4cc09c592e8fdb8 as useSlotId, $ff5963eb1fccf552$export$e08e3b67e392101e as chain, $dfc540311bf7f109$export$4d0f8be8b12a7ef6 as createShadowTreeWalker, $dfc540311bf7f109$export$63eb3ababa9c55c4 as ShadowTreeWalker, $d4ee10de306f2510$export$cd4e5573fbe2b576 as getActiveElement, $d4ee10de306f2510$export$e58f029f0fbfdb29 as getEventTarget, $d4ee10de306f2510$export$4282f70798064fe0 as nodeContains, $431fbd86ca7dc216$export$b204af158042fbac as getOwnerDocument, $431fbd86ca7dc216$export$f21a1ffae260145a as getOwnerWindow, $431fbd86ca7dc216$export$af51f0f06c0f328a as isShadowRoot, $3ef42575df84b30b$export$9d1611c77c2fe928 as mergeProps, $5dc95899b306f630$export$c9058316764c140e as mergeRefs, $65484d02dcb7eb3e$export$457c3d6518dd4c6f as filterDOMProps, $7215afc6de606d6b$export$de79e2c695e052f3 as focusWithoutScrolling, $ab71dadb03a6fb2e$export$622cea445a1c5b7d as getOffset, $ea8dcbcb9ea1b556$export$95185d699e05d4d7 as openLink, $ea8dcbcb9ea1b556$export$51437d503373d223 as getSyntheticLinkProps, $ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6 as useSyntheticLinkProps, $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb as RouterProvider, $ea8dcbcb9ea1b556$export$efa8c9099e530235 as shouldClientNavigate, $ea8dcbcb9ea1b556$export$9a302a45f65d0572 as useRouter, $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 as useLinkProps, $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f as handleLinkClick, $bbed8b41f857bcc0$export$24490316f764c430 as runAfterTransition, $9cc09df9fd7676be$export$7bbed75feba39706 as useDrag1D, $03deb23ff14920c4$export$4eaf04e54aa8eed6 as useGlobalListeners, $313b98861ee5dd6c$export$d6875122194c7b44 as useLabels, $df56164dff5785e2$export$4338b53315abf666 as useObjectRef, $4f58c5f72bcf79f7$export$496315a1608d9602 as useUpdateEffect, $ca9b37712f007381$export$72ef708ab07251f1 as useUpdateLayoutEffect, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as useLayoutEffect, $9daab02d461809db$export$683480f191c0e3ea as useResizeObserver, $e7801be82b4b2a53$export$4debdb1a3f0fa79e as useSyncRef, $62d8ded9296f3872$export$cfa2225e87938781 as getScrollParent, $a40c673dc9f6d9c7$export$94ed1c92c7beeb22 as getScrollParents, $cc38e7bd3fc7b213$export$2bb74740c4e19def as isScrollable, $5df64b3807dc15ee$export$d699905dd57c73ca as useViewportSize, $ef06256079686ba0$export$f8aeda7b10753fa1 as useDescription, $c87311424ea30a05$export$9ac100e40613ea10 as isMac, $c87311424ea30a05$export$186c6964ca17d99 as isIPhone, $c87311424ea30a05$export$7bef049ce92e4224 as isIPad, $c87311424ea30a05$export$fedb369cb70207f1 as isIOS, $c87311424ea30a05$export$e1865c3bedcd822b as isAppleDevice, $c87311424ea30a05$export$78551043582a6a98 as isWebKit, $c87311424ea30a05$export$6446a186d09e379e as isChrome, $c87311424ea30a05$export$a11b0059900ceec8 as isAndroid, $c87311424ea30a05$export$b7d78993b74f766d as isFirefox, $e9faafb641e167db$export$90fc3a17d93f704c as useEvent, $1dbecbe27a04f9af$export$14d238f342723f25 as useValueEffect, $2f04cbc44ee30ce0$export$53a0910f038337bd as scrollIntoView, $2f04cbc44ee30ce0$export$c826860796309d1b as scrollIntoViewport, $4507461a1b870123$re_export$clamp as clamp, $4507461a1b870123$re_export$snapValueToStep as snapValueToStep, $6a7db85432448f7f$export$60278871457622de as isVirtualClick, $6a7db85432448f7f$export$29bf1b5f2c56cf63 as isVirtualPointerEvent, $8ae05eaa5c114e9c$export$7f54fc3180508a52 as useEffectEvent, $5a387cc49350e6db$export$722debc0e56fea39 as useDeepMemo, $99facab73266f662$export$5add1d006293d136 as useFormReset, $26f7f3da73fcd9d6$export$7717c92ee915373e as useLoadMore, $a5fa973c1850dd36$export$ccaea96c28e8b9e7 as useLoadMoreSentinel, $a5fa973c1850dd36$export$ccaea96c28e8b9e7 as UNSTABLE_useLoadMoreSentinel, $cdc5a6778b766db2$export$a9d04c5684123369 as inertValue, $5671b20cf9b562b2$export$447a38995de2c711 as CLEAR_FOCUS_EVENT, $5671b20cf9b562b2$export$831c820ad60f9d12 as FOCUS_EVENT, $21f1aa98acb08317$export$16792effe837dba3 as isCtrlKeyPressed, $21f1aa98acb08317$export$c57958e35f31ed73 as willOpenKeyboard, $d3f049242431219c$export$6d3443f2c48bfc20 as useEnterAnimation, $d3f049242431219c$export$45fda7c47f93fd48 as useExitAnimation, $b4b717babfbb907b$export$4c063cf1350e6fed as isFocusable, $b4b717babfbb907b$export$bebd5a1431fec25d as isTabbable};
//# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
{"name":"@vitejs/plugin-react","version":"4.7.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532117796,"integrity":"sha512-5b0PSbSNn11Hq4GbeVLirYoFEfyYeyZtKWkTWFn7VSf2fBkb8tspLMsM6VHH1mBdVJ2KjM362jH5RXWWSFf+QA==","mode":420,"size":1103},"dist/index.cjs":{"checkedAt":1794532117796,"integrity":"sha512-xGEVgoryGuKwpFsrWscsjd0zyZI77ZXLmDFrl+qqq/n1AZbrfMbvVhk7UQf/ptlFtTA3WyztZLJyU3wJKB2BUg==","mode":420,"size":13985},"dist/index.d.cts":{"checkedAt":1794532117796,"integrity":"sha512-ORmH5iYvt79OrUaUYxaZPXlgKq0RFKWu6Gp0YqcJJGcYhVmrZXw3azPD5S9dvUuHaKXFLmJf730P+m17645yig==","mode":420,"size":2240},"dist/index.js":{"checkedAt":1794532117796,"integrity":"sha512-abFC2N4+5GNoeCye5d3luVhgN5Qu12M1GbxQQVAANJwKEsR1rNXJJ+Up/XJi6oWonOMiiW/TxRiF1gguIfgqHw==","mode":420,"size":12779},"dist/refresh-runtime.js":{"checkedAt":1794532117797,"integrity":"sha512-Bofc1ZqlAOJe7V/Z+GtASFV2vKUQn+4QDMBRhvEFx43kh7ANf5lS4HHPxJMVCXGY+XFOAie9uQgjdCXUCLsVbA==","mode":420,"size":21434},"package.json":{"checkedAt":1794532117797,"integrity":"sha512-l+uiCu07eGIMhQD7dR0FcP4BRdk8JEOVRVqu/zCCnj194WMlio5IMHSW1ZOErTn5xcufFwSlTfQYJqus3KsPgg==","mode":420,"size":1743},"README.md":{"checkedAt":1794532117797,"integrity":"sha512-LvaOda8oJ+cf0zMvYvKbFHnFMwJrA7KSskG2+Wl/KAQfh/BOe9PXCmZXfATvnPtPMEakaljnzNkKwvqfQ+NQfg==","mode":420,"size":4747},"dist/index.d.ts":{"checkedAt":1794532117797,"integrity":"sha512-LueTtw8c83xfhaXnWKSfPDlipAiS5rAWRxc5L4xgZMtEyjQ0nf3xxnlljXVCOWgGStNDqenGS3X/sjhU8qIBdQ==","mode":420,"size":2240}}}
@@ -0,0 +1,188 @@
import type * as TSESTree from './generated/ast-spec';
declare module './generated/ast-spec' {
interface BaseNode {
parent: TSESTree.Node;
}
interface Program {
/**
* @remarks This never-used property exists only as a convenience for code that tries to access node parents repeatedly.
*/
parent?: never;
}
interface AccessorPropertyComputedName {
parent: TSESTree.ClassBody;
}
interface AccessorPropertyNonComputedName {
parent: TSESTree.ClassBody;
}
interface TSAbstractAccessorPropertyComputedName {
parent: TSESTree.ClassBody;
}
interface TSAbstractAccessorPropertyNonComputedName {
parent: TSESTree.ClassBody;
}
interface VariableDeclaratorDefiniteAssignment {
parent: TSESTree.VariableDeclaration;
}
interface VariableDeclaratorMaybeInit {
parent: TSESTree.VariableDeclaration;
}
interface VariableDeclaratorNoInit {
parent: TSESTree.VariableDeclaration;
}
interface UsingInForOfDeclarator {
parent: TSESTree.VariableDeclaration;
}
interface UsingInNormalContextDeclarator {
parent: TSESTree.VariableDeclaration;
}
interface CatchClause {
parent: TSESTree.TryStatement;
}
interface ClassBody {
parent: TSESTree.ClassDeclaration | TSESTree.ClassExpression;
}
interface ImportAttribute {
parent: TSESTree.ExportAllDeclaration | TSESTree.ExportNamedDeclaration | TSESTree.ImportDeclaration | TSESTree.TSImportType;
}
interface ImportDefaultSpecifier {
parent: TSESTree.ImportDeclaration;
}
interface ImportNamespaceSpecifier {
parent: TSESTree.ImportDeclaration;
}
interface ImportSpecifier {
parent: TSESTree.ExportAllDeclaration | TSESTree.ExportNamedDeclaration | TSESTree.ImportDeclaration;
}
interface ExportDefaultDeclaration {
parent: TSESTree.BlockStatement | TSESTree.Program | TSESTree.TSModuleBlock;
}
interface ExportNamedDeclarationWithoutSourceWithMultiple {
parent: TSESTree.BlockStatement | TSESTree.Program | TSESTree.TSModuleBlock;
}
interface ExportNamedDeclarationWithoutSourceWithSingle {
parent: TSESTree.BlockStatement | TSESTree.Program | TSESTree.TSModuleBlock;
}
interface ExportNamedDeclarationWithSource {
parent: TSESTree.BlockStatement | TSESTree.Program | TSESTree.TSModuleBlock;
}
interface FunctionDeclarationWithName {
parent: TSESTree.BlockStatement | TSESTree.ExportDefaultDeclaration | TSESTree.ExportNamedDeclaration | TSESTree.Program;
}
interface FunctionDeclarationWithOptionalName {
parent: TSESTree.ExportDefaultDeclaration;
}
interface JSXAttribute {
parent: TSESTree.JSXOpeningElement;
}
interface JSXClosingElement {
parent: TSESTree.JSXElement;
}
interface JSXClosingFragment {
parent: TSESTree.JSXFragment;
}
interface JSXOpeningElement {
parent: TSESTree.JSXElement;
}
interface JSXOpeningFragment {
parent: TSESTree.JSXFragment;
}
interface JSXSpreadAttribute {
parent: TSESTree.JSXOpeningElement;
}
interface MethodDefinitionComputedName {
parent: TSESTree.ClassBody;
}
interface MethodDefinitionNonComputedName {
parent: TSESTree.ClassBody;
}
interface TSAbstractMethodDefinitionComputedName {
parent: TSESTree.ClassBody;
}
interface TSAbstractMethodDefinitionNonComputedName {
parent: TSESTree.ClassBody;
}
interface PropertyComputedName {
parent: TSESTree.ObjectExpression | TSESTree.ObjectPattern;
}
interface PropertyNonComputedName {
parent: TSESTree.ObjectExpression | TSESTree.ObjectPattern;
}
interface PropertyDefinitionComputedName {
parent: TSESTree.ClassBody;
}
interface PropertyDefinitionNonComputedName {
parent: TSESTree.ClassBody;
}
interface TSAbstractPropertyDefinitionComputedName {
parent: TSESTree.ClassBody;
}
interface TSAbstractPropertyDefinitionNonComputedName {
parent: TSESTree.ClassBody;
}
interface SpreadElement {
parent: TSESTree.ArrayExpression | TSESTree.CallExpression | TSESTree.NewExpression | TSESTree.ObjectExpression;
}
interface StaticBlock {
parent: TSESTree.ClassBody;
}
interface SwitchCase {
parent: TSESTree.SwitchStatement;
}
interface TemplateElement {
parent: TSESTree.TemplateLiteral | TSESTree.TSTemplateLiteralType;
}
interface TSCallSignatureDeclaration {
parent: TSESTree.TSInterfaceBody | TSESTree.TSTypeLiteral;
}
interface TSConstructSignatureDeclaration {
parent: TSESTree.TSInterfaceBody | TSESTree.TSTypeLiteral;
}
interface TSClassImplements {
parent: TSESTree.ClassDeclaration | TSESTree.ClassExpression;
}
interface TSEnumBody {
parent: TSESTree.TSEnumDeclaration;
}
interface TSEnumMember {
parent: TSESTree.TSEnumBody;
}
interface TSIndexSignature {
parent: TSESTree.ClassBody | TSESTree.TSInterfaceBody | TSESTree.TSTypeLiteral;
}
interface TSInterfaceBody {
parent: TSESTree.TSInterfaceDeclaration;
}
interface TSInterfaceHeritage {
parent: TSESTree.TSInterfaceBody;
}
interface TSMethodSignatureComputedName {
parent: TSESTree.TSInterfaceBody | TSESTree.TSTypeLiteral;
}
interface TSMethodSignatureNonComputedName {
parent: TSESTree.TSInterfaceBody | TSESTree.TSTypeLiteral;
}
interface TSModuleBlock {
parent: TSESTree.TSModuleDeclaration;
}
interface TSParameterProperty {
parent: TSESTree.FunctionLike;
}
interface TSPropertySignatureComputedName {
parent: TSESTree.TSInterfaceBody | TSESTree.TSTypeLiteral;
}
interface TSPropertySignatureNonComputedName {
parent: TSESTree.TSInterfaceBody | TSESTree.TSTypeLiteral;
}
interface TSTypeParameter {
parent: TSESTree.TSInferType | TSESTree.TSMappedType | TSESTree.TSTypeParameterDeclaration;
}
interface ExportSpecifierWithIdentifierLocal {
parent: TSESTree.ExportNamedDeclaration;
}
interface ExportSpecifierWithStringOrLiteralLocal {
parent: TSESTree.ExportNamedDeclaration;
}
}
export * as TSESTree from './generated/ast-spec';
export type NodeWithParent = Exclude<TSESTree.Node, TSESTree.Program>;
@@ -0,0 +1,167 @@
/**
* @fileoverview Rule to flag use of unnecessary semicolons
* @author Nicholas C. Zakas
* @deprecated in ESLint v8.53.0
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const FixTracker = require("./utils/fix-tracker");
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "no-extra-semi",
url: "https://eslint.style/rules/no-extra-semi",
},
},
],
},
type: "suggestion",
docs: {
description: "Disallow unnecessary semicolons",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-extra-semi",
},
fixable: "code",
schema: [],
messages: {
unexpected: "Unnecessary semicolon.",
},
},
create(context) {
const sourceCode = context.sourceCode;
/**
* Checks if a node or token is fixable.
* A node is fixable if it can be removed without turning a subsequent statement into a directive after fixing other nodes.
* @param {Token} nodeOrToken The node or token to check.
* @returns {boolean} Whether or not the node is fixable.
*/
function isFixable(nodeOrToken) {
const nextToken = sourceCode.getTokenAfter(nodeOrToken);
if (!nextToken || nextToken.type !== "String") {
return true;
}
const stringNode = sourceCode.getNodeByRangeIndex(
nextToken.range[0],
);
return !astUtils.isTopLevelExpressionStatement(stringNode.parent);
}
/**
* Reports an unnecessary semicolon error.
* @param {Node|Token} nodeOrToken A node or a token to be reported.
* @returns {void}
*/
function report(nodeOrToken) {
context.report({
node: nodeOrToken,
messageId: "unexpected",
fix: isFixable(nodeOrToken)
? fixer =>
/*
* Expand the replacement range to include the surrounding
* tokens to avoid conflicting with semi.
* https://github.com/eslint/eslint/issues/7928
*/
new FixTracker(fixer, context.sourceCode)
.retainSurroundingTokens(nodeOrToken)
.remove(nodeOrToken)
: null,
});
}
/**
* Checks for a part of a class body.
* This checks tokens from a specified token to a next MethodDefinition or the end of class body.
* @param {Token} firstToken The first token to check.
* @returns {void}
*/
function checkForPartOfClassBody(firstToken) {
for (
let token = firstToken;
token.type === "Punctuator" &&
!astUtils.isClosingBraceToken(token);
token = sourceCode.getTokenAfter(token)
) {
if (astUtils.isSemicolonToken(token)) {
report(token);
}
}
}
return {
/**
* Reports this empty statement, except if the parent node is a loop.
* @param {Node} node A EmptyStatement node to be reported.
* @returns {void}
*/
EmptyStatement(node) {
const parent = node.parent,
allowedParentTypes = [
"ForStatement",
"ForInStatement",
"ForOfStatement",
"WhileStatement",
"DoWhileStatement",
"IfStatement",
"LabeledStatement",
"WithStatement",
];
if (!allowedParentTypes.includes(parent.type)) {
report(node);
}
},
/**
* Checks tokens from the head of this class body to the first MethodDefinition or the end of this class body.
* @param {Node} node A ClassBody node to check.
* @returns {void}
*/
ClassBody(node) {
checkForPartOfClassBody(sourceCode.getFirstToken(node, 1)); // 0 is `{`.
},
/**
* Checks tokens from this MethodDefinition to the next MethodDefinition or the end of this class body.
* @param {Node} node A MethodDefinition node of the start point.
* @returns {void}
*/
"MethodDefinition, PropertyDefinition, StaticBlock"(node) {
checkForPartOfClassBody(sourceCode.getTokenAfter(node));
},
};
},
};
@@ -0,0 +1,79 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
flagEnabled: function() {
return flagEnabled;
},
issueFlagNotices: function() {
return issueFlagNotices;
},
default: function() {
return _default;
}
});
const _picocolors = /*#__PURE__*/ _interop_require_default(require("picocolors"));
const _log = /*#__PURE__*/ _interop_require_default(require("./util/log"));
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
let defaults = {
optimizeUniversalDefaults: false,
generalizedModifiers: true,
disableColorOpacityUtilitiesByDefault: false,
relativeContentPathsByDefault: false
};
let featureFlags = {
future: [
"hoverOnlyWhenSupported",
"respectDefaultRingColorOpacity",
"disableColorOpacityUtilitiesByDefault",
"relativeContentPathsByDefault"
],
experimental: [
"optimizeUniversalDefaults",
"generalizedModifiers"
]
};
function flagEnabled(config, flag) {
if (featureFlags.future.includes(flag)) {
var _config_future;
var _config_future_flag, _ref;
return config.future === "all" || ((_ref = (_config_future_flag = config === null || config === void 0 ? void 0 : (_config_future = config.future) === null || _config_future === void 0 ? void 0 : _config_future[flag]) !== null && _config_future_flag !== void 0 ? _config_future_flag : defaults[flag]) !== null && _ref !== void 0 ? _ref : false);
}
if (featureFlags.experimental.includes(flag)) {
var _config_experimental;
var _config_experimental_flag, _ref1;
return config.experimental === "all" || ((_ref1 = (_config_experimental_flag = config === null || config === void 0 ? void 0 : (_config_experimental = config.experimental) === null || _config_experimental === void 0 ? void 0 : _config_experimental[flag]) !== null && _config_experimental_flag !== void 0 ? _config_experimental_flag : defaults[flag]) !== null && _ref1 !== void 0 ? _ref1 : false);
}
return false;
}
function experimentalFlagsEnabled(config) {
if (config.experimental === "all") {
return featureFlags.experimental;
}
var _config_experimental;
return Object.keys((_config_experimental = config === null || config === void 0 ? void 0 : config.experimental) !== null && _config_experimental !== void 0 ? _config_experimental : {}).filter((flag)=>featureFlags.experimental.includes(flag) && config.experimental[flag]);
}
function issueFlagNotices(config) {
if (process.env.JEST_WORKER_ID !== undefined) {
return;
}
if (experimentalFlagsEnabled(config).length > 0) {
let changes = experimentalFlagsEnabled(config).map((s)=>_picocolors.default.yellow(s)).join(", ");
_log.default.warn("experimental-flags-enabled", [
`You have enabled experimental features: ${changes}`,
"Experimental features in Tailwind CSS are not covered by semver, may introduce breaking changes, and can change at any time."
]);
}
}
const _default = featureFlags;
@@ -0,0 +1 @@
{"version":3,"file":"resolveBindingActivations.spec.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveBindingActivations.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
'use strict';
module.exports = function (val) {
if (val === null || val === undefined) {
return [];
}
return Array.isArray(val) ? val : [val];
};
@@ -0,0 +1,374 @@
## 6.10.1 (2025-12-17)
### Bug fixes
Fix a bug where `copyLineDown` would leave the cursor on the wrong line when it was at the start of the line.
## 6.10.0 (2025-10-23)
### New features
The new `deleteGroupForwardWin` command provides by-group forward deletion using the Windows convention.
## 6.9.0 (2025-10-02)
### Bug fixes
Prevent the default behavior of backspace and delete keys, to prevent the browser from doing anything creative when there's nothing to delete.
### New features
Implement new `addCursorAbove` and `addCursorBelow` commands. Bind them to Mod-Alt-ArrowUp/Down in the default keymap.
## 6.8.1 (2025-03-31)
### Bug fixes
Fix an issue where creating a comment for a line that starts an inner language would use the comment style from the outer language.
## 6.8.0 (2025-01-08)
### New features
The new `cursorGroupForwardWin` and `selectGroupForwardWin` commands implement Windows-style forward motion by group.
## 6.7.1 (2024-10-21)
### Bug fixes
Change `toggleBlockCommentByLine` to not affect lines with the selection end right at their start.
## 6.7.0 (2024-10-07)
### Bug fixes
Bind Shift-Enter to the same command as Enter in the default keymap, so that it doesn't do nothing when on an EditContext-supporting browser.
### New features
Add commands for by-string-index cursor motion that ignores text direction.
## 6.6.2 (2024-09-17)
### Bug fixes
Fix an issue causing `selectParentSyntax` to not select syntax that is a direct child of the top node.
Make `selectParentSyntax` return false when it doesn't change the selection.
## 6.6.1 (2024-08-31)
### Bug fixes
Fix a bug in the undo history that would cause it to incorrectly track inverted effects when adding multiple edits to a single history event.
## 6.6.0 (2024-06-04)
### New features
The new `toggleTabFocusMode` and `temporarilySetTabFocusMode` commands provide control over the view's tab-focus mode.
The default keymap now binds Ctrl-m (Shift-Alt-m on macOS) to `toggleTabFocusMode`.
## 6.5.0 (2024-04-19)
### New features
The `insertNewlineKeepIndent` command inserts a newline along with the same indentation as the line before.
## 6.4.0 (2024-04-17)
### Bug fixes
Fix an issue where `deleteLine` sometimes leaves the cursor on the wrong line.
### New features
The new `deleteCharBackwardStrict` command just deletes a character, without further smart behavior around indentation.
## 6.3.3 (2023-12-28)
### Bug fixes
Fix an issue causing cursor motion commands to not dispatch a transaction when the change only affects cursor associativity.
## 6.3.2 (2023-11-28)
### Bug fixes
Fix a regression that caused `deleteCharBackward` to sometimes delete a large chunk of text.
## 6.3.1 (2023-11-27)
### Bug fixes
When undoing, store the selection after the undone change with the redo event, so that redoing restores it.
`deleteCharBackward` will no longer delete variant selector characters as separate characters.
## 6.3.0 (2023-09-29)
### Bug fixes
Make it possible for `selectParentSyntax` to jump out of or into a syntax tree overlay.
Make Cmd-Backspace and Cmd-Delete on macOS delete to the next line wrap point, not the start/end of the line.
### New features
The new `deleteLineBoundaryForward` and `deleteLineBoundaryBackward` commands delete to the start/end of the line or the next line wrapping point.
## 6.2.5 (2023-08-26)
### Bug fixes
Make `insertNewlineAndIndent` properly count indentation for tabs when copying over the previous line's indentation.
The various sub-word motion commands will now use `Intl.Segmenter`, when available, to stop at CJK language word boundaries.
Fix a bug in `insertNewlineAndIndent` that would delete text between brackets if it had no corresponding AST node.
## 6.2.4 (2023-05-03)
### Bug fixes
The by-subword motion commands now properly treat dashes, underscores, and similar as subword separators.
## 6.2.3 (2023-04-19)
### Bug fixes
Block commenting the selection no longer includes indentation on the first line.
## 6.2.2 (2023-03-10)
### Bug fixes
Fix a bug where line commenting got confused when commenting a range that crossed language boundaries.
## 6.2.1 (2023-02-15)
### Bug fixes
Keep cursor position stable in `cursorPageUp`/`cursorPageDown` when there are panels or other scroll margins active.
Make sure `toggleComment` doesn't get thrown off by local language nesting, by fetching the language data for the start of the selection line.
## 6.2.0 (2023-01-18)
### New features
The new `joinToEvent` history configuration option allows you to provide custom logic that determines whether a new transaction is added to an existing history event.
## 6.1.3 (2022-12-26)
### Bug fixes
Preserve selection bidi level when extending the selection, to prevent shift-selection from getting stuck in some kinds of bidirectional text.
## 6.1.2 (2022-10-13)
### Bug fixes
Fix a bug that caused deletion commands on non-empty ranges to incorrectly return false and do nothing, causing the editor to fall back to native behavior.
## 6.1.1 (2022-09-28)
### Bug fixes
Make sure the selection endpoints are moved out of atomic ranges when applying a deletion command to a non-empty selection.
## 6.1.0 (2022-08-18)
### Bug fixes
Prevent native behavior on Ctrl/Cmd-ArrowLeft/ArrowRight bindings, so that browsers with odd bidi behavior won't do the wrong thing at start/end of line.
Cmd-ArrowLeft/Right on macOS now moves the cursor in the direction of the arrow even in right-to-left content.
### New features
The new `cursorLineBoundaryLeft`/`Right` and `selectLineBoundaryLeft`/`Right` commands allow directional motion to line boundaries.
## 6.0.1 (2022-06-30)
### Bug fixes
Announce to the screen reader when the selection is deleted.
Also bind Ctrl-Shift-z to redo on Linux.
## 6.0.0 (2022-06-08)
### Bug fixes
Fix a bug where by-page selection commands sometimes moved one line too far.
## 0.20.0 (2022-04-20)
### Breaking changes
There is no longer a separate `commentKeymap`. Those bindings are now part of `defaultKeymap`.
### Bug fixes
Make `cursorPageUp` and `cursorPageDown` move by window height when the editor is higher than the window.
Make sure the default behavior of Home/End is prevented, since it could produce unexpected results on macOS.
### New features
The exports from @codemirror/comment are now available in this package.
The exports from the @codemirror/history package are now available from this package.
## 0.19.8 (2022-01-26)
### Bug fixes
`deleteCharBackward` now removes extending characters one at a time, rather than deleting the entire glyph at once.
Alt-v is no longer bound in `emacsStyleKeymap` and macOS's `standardKeymap`, because macOS doesn't bind it by default and it conflicts with some keyboard layouts.
## 0.19.7 (2022-01-11)
### Bug fixes
Don't bind Alt-\< and Alt-> on macOS by default, since those interfere with some keyboard layouts. Make cursorPageUp/Down scroll the view to keep the cursor in place
`cursorPageUp` and `cursorPageDown` now scroll the view by the amount that the cursor moved.
## 0.19.6 (2021-12-10)
### Bug fixes
The standard keymap no longer overrides Shift-Delete, in order to allow the native behavior of that key to happen on platforms that support it.
## 0.19.5 (2021-09-21)
### New features
Adds an `insertBlankLine` command which creates an empty line below the selection, and binds it to Mod-Enter in the default keymap.
## 0.19.4 (2021-09-13)
### Bug fixes
Make commands that affect the editor's content check `state.readOnly` and return false when that is true.
## 0.19.3 (2021-09-09)
### Bug fixes
Make by-line cursor motion commands move the cursor to the start/end of the document when they hit the first/last line.
Fix a bug where `deleteCharForward`/`Backward` behaved incorrectly when deleting directly before or after an atomic range.
## 0.19.2 (2021-08-24)
### New features
New commands `cursorSubwordForward`, `cursorSubwordBackward`, `selectSubwordForward`, and `selectSubwordBackward` which implement motion by camel case subword.
## 0.19.1 (2021-08-11)
### Bug fixes
Fix incorrect versions for @lezer dependencies.
## 0.19.0 (2021-08-11)
### Breaking changes
Change default binding for backspace to `deleteCharBackward`, drop `deleteCodePointBackward`/`Forward` from the library.
`defaultTabBinding` was removed.
### Bug fixes
Drop Alt-d, Alt-f, and Alt-b bindings from `emacsStyleKeymap` (and thus from the default macOS bindings).
`deleteCharBackward` and `deleteCharForward` now take atomic ranges into account.
### New features
Attach more granular user event strings to transactions.
The module exports a new binding `indentWithTab` that binds tab and shift-tab to `indentMore` and `indentLess`.
## 0.18.3 (2021-06-11)
### Bug fixes
`moveLineDown` will no longer incorrectly grow the selection.
Line-based commands will no longer include lines where a range selection ends right at the start of the line.
## 0.18.2 (2021-05-06)
### Bug fixes
Use Ctrl-l, not Alt-l, to bind `selectLine` on macOS, to avoid conflicting with special-character-insertion bindings.
Make the macOS Command-ArrowLeft/Right commands behave more like their native versions.
## 0.18.1 (2021-04-08)
### Bug fixes
Also bind Shift-Backspace and Shift-Delete in the default keymap (to do the same thing as the Shift-less binding).
### New features
Adds a `deleteToLineStart` command.
Adds bindings for Cmd-Delete and Cmd-Backspace on macOS.
## 0.18.0 (2021-03-03)
### Breaking changes
Update dependencies to 0.18.
## 0.17.5 (2021-02-25)
### Bug fixes
Use Alt-l for the default `selectLine` binding, because Mod-l already has an important meaning in the browser.
Make `deleteGroupBackward`/`deleteGroupForward` delete groups of whitespace when bigger than a single space.
Don't change lines that have the end of a range selection directly at their start in `indentLess`, `indentMore`, and `indentSelection`.
## 0.17.4 (2021-02-18)
### Bug fixes
Fix a bug where `deleteToLineEnd` would delete the rest of the document when at the end of a line.
## 0.17.3 (2021-02-16)
### Bug fixes
Fix an issue where `insertNewlineAndIndent` behaved strangely with the cursor between brackets that sat on different lines.
## 0.17.2 (2021-01-22)
### New features
The new `insertTab` command inserts a tab when nothing is selected, and defers to `indentMore` otherwise.
The package now exports a `defaultTabBinding` object that provides a recommended binding for tab (if you must bind tab).
## 0.17.1 (2021-01-06)
### New features
The package now also exports a CommonJS module.
## 0.17.0 (2020-12-29)
### Breaking changes
First numbered release.
@@ -0,0 +1,16 @@
/**
* @file 字体粗细度量
* @author mengke01(kekee000@gmail.com)
*/
export default {
100: 'Ultra-light',
200: 'Extra-light',
300: 'Light',
400: 'Semi-light',
500: 'Medium (normal)',
600: 'Semi-bold',
700: 'Bold',
800: 'Extra-Bold',
900: 'Ultra-bold'
};
@@ -0,0 +1,325 @@
export default `flf2a$ 3 3 10 -1 16 0 0 0
Author :myflix
Date : 2006/4/6 7:38:43
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $#
$ $#
$ $##
__ #
|_/ #
(_) ##
____ #
|_|__| #
##
____ #
|_|__| #
|_|__| ##
___ #
(|_|\` #
_|_|) ##
_ _ #
()_/ /_ #
/_/_()##
_ #
_|_) #
(|__7 ##
__ #
|_|| #
##
__ #
| | #
\\_\\ ##
__ #
| | #
/_/ ##
*#
#
##
+#
#
##
#
__ #
/_/) ##
___ #
|___| #
##
#
__ #
(_() ##
__ #
/ / #
/_/ ##
___ #
/ / \\ #
\\_\\_/ ##
_ #
/ | #
|_| ##
___ #
) ) #
/_/_ ##
___ #
) ) #
_)_) ##
_ #
/_| | #
|_| ##
___ #
| | #
_)_) ##
__ #
/ / #
(_)_) ##
____ #
/ / #
/_/ ##
___ #
( (_) #
(_(_) ##
___ #
( ( ) #
/_/ ##
__ #
(_() #
(_() ##
__ #
(_() #
/_/) ##
__ #
/ / #
\\_\\ ##
___ #
|___| #
|___| ##
__ #
\\ \\ #
/_/ ##
___ #
'_)_) #
(_) ##
@#
#
##
__ #
/ /\\ #
/_/--\\ ##
___ #
| |_) #
|_|_) ##
__ #
/ /\` #
\\_\\_, ##
___ #
| | \\ #
|_|_/ ##
____ #
| |_ #
|_|__ ##
____ #
| |_ #
|_| ##
__ #
/ /\`_ #
\\_\\_/ ##
_ #
| |_| #
|_| | ##
_ #
| | #
|_| ##
_ #
| | #
\\_|_| ##
_ #
| |_/ #
|_| \\ ##
_ #
| | #
|_|__ ##
_ #
| |\\/| #
|_| | ##
_ #
| |\\ | #
|_| \\| ##
___ #
/ / \\ #
\\_\\_/ ##
___ #
| |_) #
|_| ##
___ #
/ / \\ #
\\_\\_\\\\ ##
___ #
| |_) #
|_| \\ ##
__ #
( (\` #
_)_) ##
_____ #
| | #
|_| ##
_ #
| | | #
\\_\\_/ ##
_ #
\\ \\ / #
\\_\\/ ##
_ #
\\ \\ /#
\\_\\/\\/ ##
_ #
\\ \\_/ #
/_/ \\ ##
_ #
\\ \\_/ #
|_| ##
____ #
/ / #
/_/_ ##
___ #
| | #
|_|_ ##
__ #
\\ \\ #
\\_\\ ##
___ #
| | #
_|_| ##
___ #
/_/ \\ #
##
#
___ #
|___| ##
___ #
\\_\\\\ #
##
__ #
/ /\\ #
/_/--\\ ##
___ #
| |_) #
|_|_) ##
__ #
/ /\` #
\\_\\_, ##
___ #
| | \\ #
|_|_/ ##
____ #
| |_ #
|_|__ ##
____ #
| |_ #
|_| ##
__ #
/ /\`_ #
\\_\\_/ ##
_ #
| |_| #
|_| | ##
_ #
| | #
|_| ##
_ #
| | #
\\_|_| ##
_ #
| |_/ #
|_| \\ ##
_ #
| | #
|_|__ ##
_ #
| |\\/| #
|_| | ##
_ #
| |\\ | #
|_| \\| ##
___ #
/ / \\ #
\\_\\_/ ##
___ #
| |_) #
|_| ##
___ #
/ / \\ #
\\_\\_\\\\ ##
___ #
| |_) #
|_| \\ ##
__ #
( (\` #
_)_) ##
_____ #
| | #
|_| ##
_ #
| | | #
\\_\\_/ ##
_ #
\\ \\ / #
\\_\\/ ##
_ #
\\ \\ /#
\\_\\/\\/ ##
_ #
\\ \\_/ #
/_/ \\ ##
_ #
\\ \\_/ #
|_| ##
____ #
/ / #
/_/_ ##
__ #
< < #
\\_\\ ##
__ #
| | #
|_| ##
__ #
> > #
/_/ ##
~#
#
##
__ #
/ /\\ #
/_/--\\ ##
___ #
/ / \\ #
\\_\\_/ ##
_ #
| | | #
\\_\\_/ ##
__ #
/ /\\ #
/_/--\\ ##
___ #
/ / \\ #
\\_\\_/ ##
_ #
| | | #
\\_\\_/ ##
�#
#
##
`
@@ -0,0 +1,56 @@
import { DateInput, Unit } from './types';
/**
* Checks if a date is the same as another date or a specified time unit.
* 检查一个日期是否与另一个日期或指定的时间单位相同。
*
* @param date - The date to compare. (要比较的日期。)
* @param input - The date or time unit to compare against. (要比较的日期或时间单位。)
* @param unit - The unit of time to compare (e.g., 'year', 'month', 'day', 'hour', 'minute', 'second', 'millisecond').
* (要比较的时间单位,例如 'year'、'month'、'day'、'hour'、'minute'、'second'、'millisecond'。)
* @returns A boolean indicating whether the first date is the same as the second date or time unit.
* (布尔值,表示第一个日期是否与第二个日期或时间单位相同。)
* @example
* ```ts
* // Checking if a date is the same as another date (检查一个日期是否与另一个日期相同)
* const date1 = new Date('2023-10-01');
* const date2 = new Date('2023-10-01');
* const isSameDate = isSame(date1, date2, 'day');
* console.log(isSameDate); // Outputs: true (输出: true)
*
* // Checking if a date is the same as a specific year (检查一个日期是否与特定年份相同)
* const date3 = new Date('2023-10-01');
* const isSameYear = isSame(date3, 2023, 'year');
* console.log(isSameYear); // Outputs: true (输出: true)
*
* // Checking if a date is the same as a specific month (检查一个日期是否与特定月份相同)
* const date4 = new Date('2023-10-01');
* const isSameMonth = isSame(date4, '2023-10', 'month');
* console.log(isSameMonth); // Outputs: true (输出: true)
*
* // Checking if a date is the same as a specific day (检查一个日期是否与特定天数相同)
* const date5 = new Date('2023-10-01');
* const isSameDay = isSame(date5, '2023-10-01', 'day');
* console.log(isSameDay); // Outputs: true (输出: true)
*
* // Checking if a date is the same as a specific hour (检查一个日期是否与特定小时相同)
* const date6 = new Date('2023-10-01T12:00:00');
* const isSameHour = isSame(date6, '2023-10-01T12:00:00', 'hour');
* console.log(isSameHour); // Outputs: true (输出: true)
*
* // Checking if a date is the same as a specific minute (检查一个日期是否与特定分钟相同)
* const date7 = new Date('2023-10-01T12:00:00');
* const isSameMinute = isSame(date7, '2023-10-01T12:00:00', 'minute');
* console.log(isSameMinute); // Outputs: true (输出: true)
*
* // Checking if a date is the same as a specific second (检查一个日期是否与特定秒数相同)
* const date8 = new Date('2023-10-01T12:00:00');
* const isSameSecond = isSame(date8, '2023-10-01T12:00:00', 'second');
* console.log(isSameSecond); // Outputs: true (输出: true)
*
* // Checking if a date is the same as a specific millisecond (检查一个日期是否与特定毫秒数相同)
* const date9 = new Date('2023-10-01T12:00:00.000');
* const isSameMillisecond = isSame(date9, '2023-10-01T12:00:00.000', 'millisecond');
* console.log(isSameMillisecond); // Outputs: true (输出: true)
* ```
*/
export default function isSame(date: Date, input: DateInput, unit?: Unit): boolean;
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,CAAkB,EAClB,CAAkB,EAClB,GAAW,EACX,EAAE;IACF,MAAM,EAAE,GAAG,CAAC,YAAY,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACvD,MAAM,EAAE,GAAG,CAAC,YAAY,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAEvD,MAAM,CAAC,GAAG,EAAE,KAAK,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,KAAK,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;IAEzD,OAAO,CACL,CAAC,IAAI;QACH,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;QACX,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QACT,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACvB,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;KAClC,CACF,CAAA;AACH,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE;IAC9C,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACxB,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AACxB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,CACnB,CAAS,EACT,CAAS,EACT,GAAW,EACmB,EAAE;IAChC,IAAI,IAAc,EAChB,GAAuB,EACvB,IAAY,EACZ,KAAK,GAAuB,SAAS,EACrC,MAAoC,CAAA;IACtC,IAAI,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IACvB,IAAI,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAA;IAC/B,IAAI,CAAC,GAAG,EAAE,CAAA;IAEV,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QACtB,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACZ,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;QACjB,CAAC;QACD,IAAI,GAAG,EAAE,CAAA;QACT,IAAI,GAAG,GAAG,CAAC,MAAM,CAAA;QAEjB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACzB,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;gBACb,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;gBACZ,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;YAC5B,CAAC;iBAAM,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC7B,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;gBACpB,IAAI,CAAC,KAAK,SAAS;oBAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;YACvC,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;gBAChB,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,GAAG,IAAI,EAAE,CAAC;oBACpC,IAAI,GAAG,GAAG,CAAA;oBACV,KAAK,GAAG,EAAE,CAAA;gBACZ,CAAC;gBAED,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;YAC5B,CAAC;YAED,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QAClC,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACvC,MAAM,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACxB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA","sourcesContent":["export const balanced = (\n a: string | RegExp,\n b: string | RegExp,\n str: string,\n) => {\n const ma = a instanceof RegExp ? maybeMatch(a, str) : a\n const mb = b instanceof RegExp ? maybeMatch(b, str) : b\n\n const r = ma !== null && mb != null && range(ma, mb, str)\n\n return (\n r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + ma.length, r[1]),\n post: str.slice(r[1] + mb.length),\n }\n )\n}\n\nconst maybeMatch = (reg: RegExp, str: string) => {\n const m = str.match(reg)\n return m ? m[0] : null\n}\n\nexport const range = (\n a: string,\n b: string,\n str: string,\n): undefined | [number, number] => {\n let begs: number[],\n beg: number | undefined,\n left: number,\n right: number | undefined = undefined,\n result: undefined | [number, number]\n let ai = str.indexOf(a)\n let bi = str.indexOf(b, ai + 1)\n let i = ai\n\n if (ai >= 0 && bi > 0) {\n if (a === b) {\n return [ai, bi]\n }\n begs = []\n left = str.length\n\n while (i >= 0 && !result) {\n if (i === ai) {\n begs.push(i)\n ai = str.indexOf(a, i + 1)\n } else if (begs.length === 1) {\n const r = begs.pop()\n if (r !== undefined) result = [r, bi]\n } else {\n beg = begs.pop()\n if (beg !== undefined && beg < left) {\n left = beg\n right = bi\n }\n\n bi = str.indexOf(b, i + 1)\n }\n\n i = ai < bi && ai >= 0 ? ai : bi\n }\n\n if (begs.length && right !== undefined) {\n result = [left, right]\n }\n }\n\n return result\n}\n"]}
@@ -0,0 +1 @@
{"version":3,"names":["ReferencedIdentifier","exports","ReferencedMemberExpression","BindingIdentifier","Statement","Expression","Scope","Referenced","BlockScoped","Var","User","Generated","Pure","Flow","RestProperty","SpreadProperty","ExistentialTypeParam","NumericLiteralTypeAnnotation","ForAwaitStatement"],"sources":["../../../src/path/lib/virtual-types.ts"],"sourcesContent":["import type * as t from \"@babel/types\";\n\nexport interface VirtualTypeAliases {\n BindingIdentifier: t.Identifier;\n BlockScoped:\n | t.FunctionDeclaration\n | t.ClassDeclaration\n | t.VariableDeclaration;\n ExistentialTypeParam: t.ExistsTypeAnnotation;\n Expression: t.Expression;\n Flow: t.Flow | t.ImportDeclaration | t.ExportDeclaration | t.ImportSpecifier;\n ForAwaitStatement: t.ForOfStatement;\n Generated: t.Node;\n NumericLiteralTypeAnnotation: t.NumberLiteralTypeAnnotation;\n Pure: t.Node;\n Referenced: t.Node;\n ReferencedIdentifier: t.Identifier | t.JSXIdentifier;\n ReferencedMemberExpression: t.MemberExpression;\n RestProperty: t.RestElement;\n Scope: t.Scopable | t.Pattern;\n SpreadProperty: t.RestElement;\n Statement: t.Statement;\n User: t.Node;\n Var: t.VariableDeclaration;\n}\n\ntype VirtualTypeMapping = readonly (t.Node[\"type\"] | keyof t.Aliases)[] | null;\n\nexport const ReferencedIdentifier: VirtualTypeMapping = [\n \"Identifier\",\n \"JSXIdentifier\",\n] as const;\n\nexport const ReferencedMemberExpression: VirtualTypeMapping = [\n \"MemberExpression\",\n] as const;\n\nexport const BindingIdentifier: VirtualTypeMapping = [\"Identifier\"] as const;\n\nexport const Statement: VirtualTypeMapping = [\"Statement\"] as const;\n\nexport const Expression: VirtualTypeMapping = [\"Expression\"] as const;\n\nexport const Scope: VirtualTypeMapping = [\"Scopable\", \"Pattern\"] as const;\n\nexport const Referenced: VirtualTypeMapping = null;\n\nexport const BlockScoped: VirtualTypeMapping = [\n \"FunctionDeclaration\",\n \"ClassDeclaration\",\n \"VariableDeclaration\",\n] as const;\n\nexport const Var: VirtualTypeMapping = [\"VariableDeclaration\"];\n\nexport const User: VirtualTypeMapping = null;\n\nexport const Generated: VirtualTypeMapping = null;\n\nexport const Pure: VirtualTypeMapping = null;\n\nexport const Flow: VirtualTypeMapping = [\n \"Flow\",\n \"ImportDeclaration\",\n \"ExportDeclaration\",\n \"ImportSpecifier\",\n] as const;\n\n// TODO: 7.0 Backwards Compat\nexport const RestProperty: VirtualTypeMapping = [\"RestElement\"] as const;\n\nexport const SpreadProperty: VirtualTypeMapping = [\"RestElement\"] as const;\n\nexport const ExistentialTypeParam: VirtualTypeMapping = [\n \"ExistsTypeAnnotation\",\n] as const;\n\nexport const NumericLiteralTypeAnnotation: VirtualTypeMapping = [\n \"NumberLiteralTypeAnnotation\",\n] as const;\n\nexport const ForAwaitStatement: VirtualTypeMapping = [\n \"ForOfStatement\",\n] as const;\n"],"mappings":";;;;;;AA4BO,MAAMA,oBAAwC,GAAAC,OAAA,CAAAD,oBAAA,GAAG,CACtD,YAAY,EACZ,eAAe,CACP;AAEH,MAAME,0BAA8C,GAAAD,OAAA,CAAAC,0BAAA,GAAG,CAC5D,kBAAkB,CACV;AAEH,MAAMC,iBAAqC,GAAAF,OAAA,CAAAE,iBAAA,GAAG,CAAC,YAAY,CAAU;AAErE,MAAMC,SAA6B,GAAAH,OAAA,CAAAG,SAAA,GAAG,CAAC,WAAW,CAAU;AAE5D,MAAMC,UAA8B,GAAAJ,OAAA,CAAAI,UAAA,GAAG,CAAC,YAAY,CAAU;AAE9D,MAAMC,KAAyB,GAAAL,OAAA,CAAAK,KAAA,GAAG,CAAC,UAAU,EAAE,SAAS,CAAU;AAElE,MAAMC,UAA8B,GAAAN,OAAA,CAAAM,UAAA,GAAG,IAAI;AAE3C,MAAMC,WAA+B,GAAAP,OAAA,CAAAO,WAAA,GAAG,CAC7C,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,CACb;AAEH,MAAMC,GAAuB,GAAAR,OAAA,CAAAQ,GAAA,GAAG,CAAC,qBAAqB,CAAC;AAEvD,MAAMC,IAAwB,GAAAT,OAAA,CAAAS,IAAA,GAAG,IAAI;AAErC,MAAMC,SAA6B,GAAAV,OAAA,CAAAU,SAAA,GAAG,IAAI;AAE1C,MAAMC,IAAwB,GAAAX,OAAA,CAAAW,IAAA,GAAG,IAAI;AAErC,MAAMC,IAAwB,GAAAZ,OAAA,CAAAY,IAAA,GAAG,CACtC,MAAM,EACN,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,CACT;AAGH,MAAMC,YAAgC,GAAAb,OAAA,CAAAa,YAAA,GAAG,CAAC,aAAa,CAAU;AAEjE,MAAMC,cAAkC,GAAAd,OAAA,CAAAc,cAAA,GAAG,CAAC,aAAa,CAAU;AAEnE,MAAMC,oBAAwC,GAAAf,OAAA,CAAAe,oBAAA,GAAG,CACtD,sBAAsB,CACd;AAEH,MAAMC,4BAAgD,GAAAhB,OAAA,CAAAgB,4BAAA,GAAG,CAC9D,6BAA6B,CACrB;AAEH,MAAMC,iBAAqC,GAAAjB,OAAA,CAAAiB,iBAAA,GAAG,CACnD,gBAAgB,CACR","ignoreList":[]}
@@ -0,0 +1,4 @@
/*#__NO_SIDE_EFFECTS__*/
const noop = (any) => any;
export { noop };
@@ -0,0 +1,159 @@
/**
* @file ttf转eot
* @author mengke01(kekee000@gmail.com)
*
* reference:
* http://www.w3.org/Submission/EOT/
* https://github.com/fontello/ttf2eot/blob/master/index.js
*/
import Reader from './reader';
import Writer from './writer';
import string from './util/string';
import error from './error';
import table from './table/table';
import struct from './table/struct';
import NameTbl from './table/name';
const EotHead = table.create(
'head',
[
['EOTSize', struct.Uint32],
['FontDataSize', struct.Uint32],
['Version', struct.Uint32],
['Flags', struct.Uint32],
['PANOSE', struct.Bytes, 10],
['Charset', struct.Uint8],
['Italic', struct.Uint8],
['Weight', struct.Uint32],
['fsType', struct.Uint16],
['MagicNumber', struct.Uint16],
['UnicodeRange', struct.Bytes, 16],
['CodePageRange', struct.Bytes, 8],
['CheckSumAdjustment', struct.Uint32],
['Reserved', struct.Bytes, 16],
['Padding1', struct.Uint16]
]
);
/**
* ttf格式转换成eot字体格式
*
* @param {ArrayBuffer} ttfBuffer ttf缓冲数组
* @param {Object} options 选项
* @return {ArrayBuffer} eot格式byte流
*/
// eslint-disable-next-line no-unused-vars
export default function ttf2eot(ttfBuffer, options = {}) {
// 构造eot头部
const eotHead = new EotHead();
const eotHeaderSize = eotHead.size();
const eot = {};
eot.head = eotHead.read(new Reader(new ArrayBuffer(eotHeaderSize)));
// set fields
eot.head.FontDataSize = ttfBuffer.byteLength || ttfBuffer.length;
eot.head.Version = 0x20001;
eot.head.Flags = 0;
eot.head.Charset = 0x1;
eot.head.MagicNumber = 0x504C;
eot.head.Padding1 = 0;
const ttfReader = new Reader(ttfBuffer);
// 读取ttf表个数
const numTables = ttfReader.readUint16(4);
if (numTables <= 0 || numTables > 100) {
error.raise(10101);
}
// 读取ttf表索引信息
ttfReader.seek(12);
// 需要读取3个表内容,设置3个byte
let tblReaded = 0;
for (let i = 0; i < numTables && tblReaded !== 0x7; ++i) {
const tableEntry = {
tag: ttfReader.readString(ttfReader.offset, 4),
checkSum: ttfReader.readUint32(),
offset: ttfReader.readUint32(),
length: ttfReader.readUint32()
};
const entryOffset = ttfReader.offset;
if (tableEntry.tag === 'head') {
eot.head.CheckSumAdjustment = ttfReader.readUint32(tableEntry.offset + 8);
tblReaded += 0x1;
}
else if (tableEntry.tag === 'OS/2') {
eot.head.PANOSE = ttfReader.readBytes(tableEntry.offset + 32, 10);
eot.head.Italic = ttfReader.readUint16(tableEntry.offset + 62);
eot.head.Weight = ttfReader.readUint16(tableEntry.offset + 4);
eot.head.fsType = ttfReader.readUint16(tableEntry.offset + 8);
eot.head.UnicodeRange = ttfReader.readBytes(tableEntry.offset + 42, 16);
eot.head.CodePageRange = ttfReader.readBytes(tableEntry.offset + 78, 8);
tblReaded += 0x2;
}
// 设置名字信息
else if (tableEntry.tag === 'name') {
const names = new NameTbl(tableEntry.offset).read(ttfReader);
eot.FamilyName = string.toUCS2Bytes(names.fontFamily || '');
eot.FamilyNameSize = eot.FamilyName.length;
eot.StyleName = string.toUCS2Bytes(names.fontStyle || '');
eot.StyleNameSize = eot.StyleName.length;
eot.VersionName = string.toUCS2Bytes(names.version || '');
eot.VersionNameSize = eot.VersionName.length;
eot.FullName = string.toUCS2Bytes(names.fullName || '');
eot.FullNameSize = eot.FullName.length;
tblReaded += 0x3;
}
ttfReader.seek(entryOffset);
}
// 计算size
eot.head.EOTSize = eotHeaderSize
+ 4 + eot.FamilyNameSize
+ 4 + eot.StyleNameSize
+ 4 + eot.VersionNameSize
+ 4 + eot.FullNameSize
+ 2
+ eot.head.FontDataSize;
// 这里用小尾方式写入
const eotWriter = new Writer(new ArrayBuffer(eot.head.EOTSize), 0, eot.head.EOTSize, true);
// write head
eotHead.write(eotWriter, eot);
// write names
eotWriter.writeUint16(eot.FamilyNameSize);
eotWriter.writeBytes(eot.FamilyName, eot.FamilyNameSize);
eotWriter.writeUint16(0);
eotWriter.writeUint16(eot.StyleNameSize);
eotWriter.writeBytes(eot.StyleName, eot.StyleNameSize);
eotWriter.writeUint16(0);
eotWriter.writeUint16(eot.VersionNameSize);
eotWriter.writeBytes(eot.VersionName, eot.VersionNameSize);
eotWriter.writeUint16(0);
eotWriter.writeUint16(eot.FullNameSize);
eotWriter.writeBytes(eot.FullName, eot.FullNameSize);
eotWriter.writeUint16(0);
// write rootstring
eotWriter.writeUint16(0);
eotWriter.writeBytes(ttfBuffer, eot.head.FontDataSize);
return eotWriter.getBuffer();
}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('updateWith', require('../updateWith'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,428 @@
# remark-parse
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
[![Sponsors][sponsors-badge]][collective]
[![Backers][backers-badge]][collective]
[![Chat][chat-badge]][chat]
**[remark][]** plugin to add support for parsing from markdown.
## Contents
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`unified().use(remarkParse)`](#unifieduseremarkparse)
* [Examples](#examples)
* [Example: support GFM and frontmatter](#example-support-gfm-and-frontmatter)
* [Example: turning markdown into a man page](#example-turning-markdown-into-a-man-page)
* [Syntax](#syntax)
* [Syntax tree](#syntax-tree)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [License](#license)
## What is this?
This package is a [unified][] ([remark][]) plugin that defines how to take
markdown as input and turn it into a syntax tree.
See [the monorepo readme][remark] for info on what the remark ecosystem is.
## When should I use this?
This plugin adds support to unified for parsing markdown.
If you also need to serialize markdown, you can alternatively use
[`remark`][remark-core], which combines unified, this plugin, and
[`remark-stringify`][remark-stringify].
If you *just* want to turn markdown into HTML (with maybe a few extensions),
we recommend [`micromark`][micromark] instead.
If you don’t use plugins and want to access the syntax tree, you can directly
use [`mdast-util-from-markdown`][mdast-util-from-markdown].
remark focusses on making it easier to transform content by abstracting these
internals away.
You can combine this plugin with other plugins to add syntax extensions.
Notable examples that deeply integrate with it are
[`remark-gfm`][remark-gfm],
[`remark-mdx`][remark-mdx],
[`remark-frontmatter`][remark-frontmatter],
[`remark-math`][remark-math], and
[`remark-directive`][remark-directive].
You can also use any other [remark plugin][remark-plugin] after `remark-parse`.
## Install
This package is [ESM only][esm].
In Node.js (version 16+), install with [npm][]:
```sh
npm install remark-parse
```
In Deno with [`esm.sh`][esmsh]:
```js
import remarkParse from 'https://esm.sh/remark-parse@11'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import remarkParse from 'https://esm.sh/remark-parse@11?bundle'
</script>
```
## Use
Say we have the following module `example.js`:
```js
import rehypeStringify from 'rehype-stringify'
import remarkGfm from 'remark-gfm'
import remarkParse from 'remark-parse'
import remarkRehype from 'remark-rehype'
import {unified} from 'unified'
const doc = `
# Mercury
**Mercury** is the first planet from the [Sun](https://en.wikipedia.org/wiki/Sun)
and the smallest planet in the Solar System.
`
const file = await unified()
.use(remarkParse)
.use(remarkGfm)
.use(remarkRehype)
.use(rehypeStringify)
.process(doc)
console.log(String(file))
```
…then running `node example.js` yields:
```html
<h1>Mercury</h1>
<p><strong>Mercury</strong> is the first planet from the <a href="https://en.wikipedia.org/wiki/Sun">Sun</a>
and the smallest planet in the Solar System.</p>
```
## API
This package exports no identifiers.
The default export is [`remarkParse`][api-remark-parse].
### `unified().use(remarkParse)`
Add support for parsing from markdown.
###### Parameters
There are no parameters.
###### Returns
Nothing (`undefined`).
## Examples
### Example: support GFM and frontmatter
We support CommonMark by default.
Non-standard markdown extensions can be enabled with plugins.
This example shows how to support GFM features (autolink literals,
footnotes, strikethrough, tables, tasklists) and frontmatter (YAML):
```js
import rehypeStringify from 'rehype-stringify'
import remarkFrontmatter from 'remark-frontmatter'
import remarkGfm from 'remark-gfm'
import remarkParse from 'remark-parse'
import remarkRehype from 'remark-rehype'
import {unified} from 'unified'
const doc = `---
layout: solar-system
---
# Hi ~~Mars~~Venus!
`
const file = await unified()
.use(remarkParse)
.use(remarkFrontmatter)
.use(remarkGfm)
.use(remarkRehype)
.use(rehypeStringify)
.process(doc)
console.log(String(file))
```
Yields:
```html
<h1>Hi <del>Mars</del>Venus!</h1>
```
### Example: turning markdown into a man page
Man pages (short for manual pages) are a way to document CLIs (example: type
`man git-log` in your terminal).
They use an old markup format called roff.
There’s a remark plugin, [`remark-man`][remark-man], that can serialize as
roff.
This example shows how to turn markdown into man pages by using unified with
`remark-parse` and `remark-man`:
```js
import remarkMan from 'remark-man'
import remarkParse from 'remark-parse'
import {unified} from 'unified'
const doc = `
# titan(7) -- largest moon of saturn
Titan is the largest moon…
`
const file = await unified().use(remarkParse).use(remarkMan).process(doc)
console.log(String(file))
```
Yields:
```roff
.TH "TITAN" "7" "September 2023" "" ""
.SH "NAME"
\fBtitan\fR - largest moon of saturn
.P
Titan is the largest moon…
```
## Syntax
Markdown is parsed according to CommonMark.
Other plugins can add support for syntax extensions.
If you’re interested in extending markdown,
[more information is available in micromark’s readme][micromark-extend].
## Syntax tree
The syntax tree used in remark is [mdast][].
## Types
This package is fully typed with [TypeScript][].
It exports the additional type `Options` (which is currently empty).
## Compatibility
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line, `remark-parse@^11`,
compatible with Node.js 16.
## Security
As markdown can be turned into HTML and improper use of HTML can open you up to
[cross-site scripting (XSS)][xss] attacks, use of remark can be unsafe.
When going to HTML, you will combine remark with **[rehype][]**, in which case
you should use [`rehype-sanitize`][rehype-sanitize].
Use of remark plugins could also open you up to other attacks.
Carefully assess each plugin and the risks involved in using them.
For info on how to submit a report, see our [security policy][security].
## Contribute
See [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways
to get started.
See [`support.md`][support] for ways to get help.
Join us in [Discussions][chat] to chat with the community and contributors.
This project has a [code of conduct][coc].
By interacting with this repository, organization, or community you agree to
abide by its terms.
## Sponsor
Support this effort and give back by sponsoring on [OpenCollective][collective]!
<table>
<tr valign="middle">
<td width="20%" align="center" rowspan="2" colspan="2">
<a href="https://vercel.com">Vercel</a><br><br>
<a href="https://vercel.com"><img src="https://avatars1.githubusercontent.com/u/14985020?s=256&v=4" width="128"></a>
</td>
<td width="20%" align="center" rowspan="2" colspan="2">
<a href="https://motif.land">Motif</a><br><br>
<a href="https://motif.land"><img src="https://avatars1.githubusercontent.com/u/74457950?s=256&v=4" width="128"></a>
</td>
<td width="20%" align="center" rowspan="2" colspan="2">
<a href="https://www.hashicorp.com">HashiCorp</a><br><br>
<a href="https://www.hashicorp.com"><img src="https://avatars1.githubusercontent.com/u/761456?s=256&v=4" width="128"></a>
</td>
<td width="20%" align="center" rowspan="2" colspan="2">
<a href="https://www.gitbook.com">GitBook</a><br><br>
<a href="https://www.gitbook.com"><img src="https://avatars1.githubusercontent.com/u/7111340?s=256&v=4" width="128"></a>
</td>
<td width="20%" align="center" rowspan="2" colspan="2">
<a href="https://www.gatsbyjs.org">Gatsby</a><br><br>
<a href="https://www.gatsbyjs.org"><img src="https://avatars1.githubusercontent.com/u/12551863?s=256&v=4" width="128"></a>
</td>
</tr>
<tr valign="middle">
</tr>
<tr valign="middle">
<td width="20%" align="center" rowspan="2" colspan="2">
<a href="https://www.netlify.com">Netlify</a><br><br>
<!--OC has a sharper image-->
<a href="https://www.netlify.com"><img src="https://images.opencollective.com/netlify/4087de2/logo/256.png" width="128"></a>
</td>
<td width="10%" align="center">
<a href="https://www.coinbase.com">Coinbase</a><br><br>
<a href="https://www.coinbase.com"><img src="https://avatars1.githubusercontent.com/u/1885080?s=256&v=4" width="64"></a>
</td>
<td width="10%" align="center">
<a href="https://themeisle.com">ThemeIsle</a><br><br>
<a href="https://themeisle.com"><img src="https://avatars1.githubusercontent.com/u/58979018?s=128&v=4" width="64"></a>
</td>
<td width="10%" align="center">
<a href="https://expo.io">Expo</a><br><br>
<a href="https://expo.io"><img src="https://avatars1.githubusercontent.com/u/12504344?s=128&v=4" width="64"></a>
</td>
<td width="10%" align="center">
<a href="https://boostnote.io">Boost Note</a><br><br>
<a href="https://boostnote.io"><img src="https://images.opencollective.com/boosthub/6318083/logo/128.png" width="64"></a>
</td>
<td width="10%" align="center">
<a href="https://markdown.space">Markdown Space</a><br><br>
<a href="https://markdown.space"><img src="https://images.opencollective.com/markdown-space/e1038ed/logo/128.png" width="64"></a>
</td>
<td width="10%" align="center">
<a href="https://www.holloway.com">Holloway</a><br><br>
<a href="https://www.holloway.com"><img src="https://avatars1.githubusercontent.com/u/35904294?s=128&v=4" width="64"></a>
</td>
<td width="10%"></td>
<td width="10%"></td>
</tr>
<tr valign="middle">
<td width="100%" align="center" colspan="8">
<br>
<a href="https://opencollective.com/unified"><strong>You?</strong></a>
<br><br>
</td>
</tr>
</table>
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[build-badge]: https://github.com/remarkjs/remark/workflows/main/badge.svg
[build]: https://github.com/remarkjs/remark/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/remarkjs/remark.svg
[coverage]: https://codecov.io/github/remarkjs/remark
[downloads-badge]: https://img.shields.io/npm/dm/remark-parse.svg
[downloads]: https://www.npmjs.com/package/remark-parse
[size-badge]: https://img.shields.io/bundlejs/size/remark-parse
[size]: https://bundlejs.com/?q=remark-parse
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[collective]: https://opencollective.com/unified
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/remarkjs/remark/discussions
[security]: https://github.com/remarkjs/.github/blob/main/security.md
[health]: https://github.com/remarkjs/.github
[contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md
[support]: https://github.com/remarkjs/.github/blob/main/support.md
[coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md
[license]: https://github.com/remarkjs/remark/blob/main/license
[author]: https://wooorm.com
[npm]: https://docs.npmjs.com/cli/install
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[esmsh]: https://esm.sh
[mdast]: https://github.com/syntax-tree/mdast
[mdast-util-from-markdown]: https://github.com/syntax-tree/mdast-util-from-markdown
[micromark]: https://github.com/micromark/micromark
[micromark-extend]: https://github.com/micromark/micromark#extensions
[rehype]: https://github.com/rehypejs/rehype
[rehype-sanitize]: https://github.com/rehypejs/rehype-sanitize
[remark]: https://github.com/remarkjs/remark
[remark-core]: ../remark/
[remark-directive]: https://github.com/remarkjs/remark-directive
[remark-frontmatter]: https://github.com/remarkjs/remark-frontmatter
[remark-gfm]: https://github.com/remarkjs/remark-gfm
[remark-mdx]: https://github.com/mdx-js/mdx/tree/main/packages/remark-mdx
[remark-man]: https://github.com/remarkjs/remark-man
[remark-math]: https://github.com/remarkjs/remark-math
[remark-plugin]: https://github.com/remarkjs/remark#plugin
[remark-stringify]: ../remark-stringify/
[typescript]: https://www.typescriptlang.org
[unified]: https://github.com/unifiedjs/unified
[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting
[api-remark-parse]: #unifieduseremarkparse
@@ -0,0 +1,55 @@
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var UTF16DecodeSurrogatePair = require('./UTF16DecodeSurrogatePair');
var $charAt = callBound('String.prototype.charAt');
var $charCodeAt = callBound('String.prototype.charCodeAt');
// https://262.ecma-international.org/11.0/#sec-codepointat
module.exports = function CodePointAt(string, position) {
if (typeof string !== 'string') {
throw new $TypeError('Assertion failed: `string` must be a String');
}
var size = string.length;
if (position < 0 || position >= size) {
throw new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');
}
var first = $charCodeAt(string, position);
var cp = $charAt(string, position);
var firstIsLeading = isLeadingSurrogate(first);
var firstIsTrailing = isTrailingSurrogate(first);
if (!firstIsLeading && !firstIsTrailing) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': false
};
}
if (firstIsTrailing || (position + 1 === size)) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': true
};
}
var second = $charCodeAt(string, position + 1);
if (!isTrailingSurrogate(second)) {
return {
'[[CodePoint]]': cp,
'[[CodeUnitCount]]': 1,
'[[IsUnpairedSurrogate]]': true
};
}
return {
'[[CodePoint]]': UTF16DecodeSurrogatePair(first, second),
'[[CodeUnitCount]]': 2,
'[[IsUnpairedSurrogate]]': false
};
};
@@ -0,0 +1,49 @@
{
"name": "base-log-factory",
"version": "2.1.4",
"description": "A flexible and simple JS logging library that allows logging or collecting logs in different environments by configuring various Appenders. Suitable for browser, NodeJS and other environments.",
"types": "dist/index.d.ts",
"module": "dist/index.mjs",
"main": "dist/index.js",
"scripts": {
"clean": "rm -rf node_modules",
"build": "vite build",
"test": "vitest run --coverage",
"prepublishOnly": "npm run build",
"release": "npm publish",
"typedoc": "typedoc && typedoc --options typedoc.zh.json"
},
"keywords": [
"log",
"logging",
"log4j"
],
"author": "Jesse Feng <fxm0016@126.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/fengxinming/base-log-factory.git"
},
"bugs": {
"url": "https://github.com/fengxinming/base-log-factory/issues"
},
"homepage": "https://fengxinming.github.io/base-log-factory/",
"dependencies": {
"date-manip": "^2.0.6",
"is-what-type": "^1.0.1"
},
"devDependencies": {
"@rollup/plugin-typescript": "^12.1.2",
"@vitest/coverage-v8": "^3.0.8",
"typedoc": "^0.28.1",
"typedoc-plugin-markdown": "^4.5.2",
"vite": "^6.2.2",
"vite-plugin-combine": "^6.2.1",
"vite-plugin-external": "6.0.1",
"vite-plugin-separate-importer": "^6.1.0",
"vitest": "^3.0.8"
},
"files": [
"dist"
]
}
@@ -0,0 +1,143 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "តួអក្សរ", verb: "គួរមាន" },
file: { unit: "បៃ", verb: "គួរមាន" },
array: { unit: "ធាតុ", verb: "គួរមាន" },
set: { unit: "ធាតុ", verb: "គួរមាន" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "មិនមែនជាលេខ (NaN)" : "លេខ";
}
case "object": {
if (Array.isArray(data)) {
return "អារេ (Array)";
}
if (data === null) {
return "គ្មានតម្លៃ (null)";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "ទិន្នន័យបញ្ចូល",
email: "អាសយដ្ឋានអ៊ីមែល",
url: "URL",
emoji: "សញ្ញាអារម្មណ៍",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "កាលបរិច្ឆេទ និងម៉ោង ISO",
date: "កាលបរិច្ឆេទ ISO",
time: "ម៉ោង ISO",
duration: "រយៈពេល ISO",
ipv4: "អាសយដ្ឋាន IPv4",
ipv6: "អាសយដ្ឋាន IPv6",
cidrv4: "ដែនអាសយដ្ឋាន IPv4",
cidrv6: "ដែនអាសយដ្ឋាន IPv6",
base64: "ខ្សែអក្សរអ៊ិកូដ base64",
base64url: "ខ្សែអក្សរអ៊ិកូដ base64url",
json_string: "ខ្សែអក្សរ JSON",
e164: "លេខ E.164",
jwt: "JWT",
template_literal: "ទិន្នន័យបញ្ចូល",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue.expected} ប៉ុន្តែទទួលបាន ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${util.stringifyPrimitive(issue.values[0])}`;
return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? "ធាតុ"}`;
return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;
}
return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${_issue.prefix}"`;
}
if (_issue.format === "ends_with")
return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${_issue.suffix}"`;
if (_issue.format === "includes")
return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${_issue.includes}"`;
if (_issue.format === "regex")
return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${_issue.pattern}`;
return `មិនត្រឹមត្រូវ៖ ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${issue.divisor}`;
case "unrecognized_keys":
return `រកឃើញសោមិនស្គាល់៖ ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `សោមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
case "invalid_union":
return `ទិន្នន័យមិនត្រឹមត្រូវ`;
case "invalid_element":
return `ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
default:
return `ទិន្នន័យមិនត្រឹមត្រូវ`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}
@@ -0,0 +1,7 @@
<svg viewbox="0 0 18 18">
<polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon>
<line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"></line>
<path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"></path>
<rect class="ql-fill" height="11" width="1" x="5" y="4"></rect>
<rect class="ql-fill" height="11" width="1" x="7" y="4"></rect>
</svg>

After

Width:  |  Height:  |  Size: 376 B

@@ -0,0 +1,96 @@
{
"name": "lru-cache",
"description": "A cache object that deletes the least-recently-used items.",
"version": "7.18.3",
"author": "Isaac Z. Schlueter <i@izs.me>",
"keywords": [
"mru",
"lru",
"cache"
],
"sideEffects": false,
"scripts": {
"build": "npm run prepare",
"pretest": "npm run prepare",
"presnap": "npm run prepare",
"prepare": "node ./scripts/transpile-to-esm.js",
"size": "size-limit",
"test": "tap",
"snap": "tap",
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"format": "prettier --write .",
"typedoc": "typedoc ./index.d.ts"
},
"type": "commonjs",
"main": "./index.js",
"module": "./index.mjs",
"types": "./index.d.ts",
"exports": {
".": {
"import": {
"types": "./index.d.ts",
"default": "./index.mjs"
},
"require": {
"types": "./index.d.ts",
"default": "./index.js"
}
},
"./package.json": "./package.json"
},
"repository": "git://github.com/isaacs/node-lru-cache.git",
"devDependencies": {
"@size-limit/preset-small-lib": "^7.0.8",
"@types/node": "^17.0.31",
"@types/tap": "^15.0.6",
"benchmark": "^2.1.4",
"c8": "^7.11.2",
"clock-mock": "^1.0.6",
"eslint-config-prettier": "^8.5.0",
"prettier": "^2.6.2",
"size-limit": "^7.0.8",
"tap": "^16.3.4",
"ts-node": "^10.7.0",
"tslib": "^2.4.0",
"typedoc": "^0.23.24",
"typescript": "^4.6.4"
},
"license": "ISC",
"files": [
"index.js",
"index.mjs",
"index.d.ts"
],
"engines": {
"node": ">=12"
},
"prettier": {
"semi": false,
"printWidth": 70,
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"jsxSingleQuote": false,
"bracketSameLine": true,
"arrowParens": "avoid",
"endOfLine": "lf"
},
"tap": {
"nyc-arg": [
"--include=index.js"
],
"node-arg": [
"--expose-gc",
"--require",
"ts-node/register"
],
"ts": false
},
"size-limit": [
{
"path": "./index.js"
}
]
}
@@ -0,0 +1,50 @@
{
"name": "brace-expansion",
"description": "Brace expansion as known from sh/bash",
"version": "1.1.12",
"repository": {
"type": "git",
"url": "git://github.com/juliangruber/brace-expansion.git"
},
"homepage": "https://github.com/juliangruber/brace-expansion",
"main": "index.js",
"scripts": {
"test": "tape test/*.js",
"gentest": "bash test/generate.sh",
"bench": "matcha test/perf/bench.js"
},
"dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
},
"devDependencies": {
"matcha": "^0.7.0",
"tape": "^4.6.0"
},
"keywords": [],
"author": {
"name": "Julian Gruber",
"email": "mail@juliangruber.com",
"url": "http://juliangruber.com"
},
"license": "MIT",
"testling": {
"files": "test/*.js",
"browsers": [
"ie/8..latest",
"firefox/20..latest",
"firefox/nightly",
"chrome/25..latest",
"chrome/canary",
"opera/12..latest",
"opera/next",
"safari/5.1..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2..latest"
]
},
"publishConfig": {
"tag": "1.x"
}
}
@@ -0,0 +1,22 @@
/**
* Encodes all characters in the input using HTML entities. This includes
* characters that are valid ASCII characters in HTML documents, such as `#`.
*
* To get a more compact output, consider using the `encodeNonAsciiHTML`
* function, which will only encode characters that are not valid in HTML
* documents, as well as non-ASCII characters.
*
* If a character has no equivalent entity, a numeric hexadecimal reference
* (eg. `&#xfc;`) will be used.
*/
export declare function encodeHTML(data: string): string;
/**
* Encodes all non-ASCII characters, as well as characters not valid in HTML
* documents using HTML entities. This function will not encode characters that
* are valid in HTML documents, such as `#`.
*
* If a character has no equivalent entity, a numeric hexadecimal reference
* (eg. `&#xfc;`) will be used.
*/
export declare function encodeNonAsciiHTML(data: string): string;
//# sourceMappingURL=encode.d.ts.map
@@ -0,0 +1,17 @@
function join(tokens) {
return (tokens.start +
tokens.delimiter +
tokens.postDelimiter +
tokens.tag +
tokens.postTag +
tokens.type +
tokens.postType +
tokens.name +
tokens.postName +
tokens.description +
tokens.end +
tokens.lineEnd);
}
export default function getStringifier() {
return (block) => block.source.map(({ tokens }) => join(tokens)).join('\n');
}
@@ -0,0 +1 @@
{"name":"object.values","version":"1.2.1","requiresBuild":false,"files":{".editorconfig":{"checkedAt":1794532098049,"integrity":"sha512-gD3iQtgC7ZgFS97pyZqR0FPjMNyRAfat8dipbSL28iiJ6B1MP5dDeDYeEnP5sYMTz8whQIk3E5vltk2kcyJJEQ==","mode":420,"size":286},".eslintrc":{"checkedAt":1794532098049,"integrity":"sha512-tjSqkSsbNg8Gxb6FX7uI2QNvccyHNv7k/RxbBxt8A1ImOiJJDoWl1ZAmkhEMAIQkx8HD2G1i5h9fh4sgbkFRUQ==","mode":420,"size":278},"test/.eslintrc":{"checkedAt":1794532098049,"integrity":"sha512-Y0Jn/7+hdG9f45Fe9R6adr5oXmcMmWvsnN7uOX/4dt8XeU/KvIUrft4ybFVr64orVBdC+RNsBR8v9/2yL4H2wA==","mode":420,"size":246},".nycrc":{"checkedAt":1794532089075,"integrity":"sha512-2vm1RFz8Ajl/OYrfoCWPJIm3Bpnf7Gyn5bha/lZx/cq+We3uMy9xj15XeP6x4wF3jf/pO7KMHAkU9mllm605xg==","mode":420,"size":139},"LICENSE":{"checkedAt":1794532098050,"integrity":"sha512-CWRd82wre8E2D9wfNTwrOCxhLsdU7obtQTc4poEGt1uTk93MEI2QW01sXILetqMRgoYp4EIKQZNHNCQrALOFjw==","mode":420,"size":1082},"auto.js":{"checkedAt":1794532098050,"integrity":"sha512-8Q3Im5cACiIFrMmxvLnJnA8SXOjAd1kh/R0UIDVnErDD1WUlJIDrNfaOcIB6rtjAXNhq/OdL1374JM/QcAJ1VQ==","mode":420,"size":36},"implementation.js":{"checkedAt":1794532098050,"integrity":"sha512-GiW5lh3569VGr95LHWSoLvgileKu7L/Ryk/8UgwxA9gnEXJJd0TB46Torfjroiwhs9840mtLPH6OaLKtHR0uTQ==","mode":420,"size":441},"test/implementation.js":{"checkedAt":1794532098050,"integrity":"sha512-EzeZImqSyhWYEpQaZMYuOp23sJHpDrHT4HXbdZGfz07NqoBA1xeBgEmksBuiBk1R8dk9NIQYEWS7ngwU8rtbng==","mode":420,"size":645},"index.js":{"checkedAt":1794532098050,"integrity":"sha512-e82g7DfugppTkMhTMuOUWP5RaWJj6Qd3kGSU5ZsZZFZ+jo4BIBYILzgq0FOVuW2VCpDyoXJvu2snFARe3eNrZA==","mode":420,"size":390},"test/index.js":{"checkedAt":1794532098050,"integrity":"sha512-pobHiQ3O89x559KCDXV/FDw+1ogpgjZSkXO/6Pst3ikAtR9hoVLlpPaoViRB1v3dsKO/nqOO3iSiAix1/dyR2A==","mode":420,"size":424},"polyfill.js":{"checkedAt":1794532098050,"integrity":"sha512-5pIWaccA8ZtxVasEOwCv3vI8UqpfMY33DEZobtMcdDw10ReP/u9+tDoY+7YH6Eh9MlZhiqj1eE7LxYr74Wt77g==","mode":420,"size":189},"shim.js":{"checkedAt":1794532098050,"integrity":"sha512-rEQlCD0utRvmoWv09fXf7kFRKGIdV/zq/gy6QRtn5EkEY2EPGPknJsYyLR1PH7c0cNLNYN+b20wYkU/2uw8bmg==","mode":420,"size":314},"test/shimmed.js":{"checkedAt":1794532098051,"integrity":"sha512-+AvCc2pMX8ITC4MjK/gwAHara97JbjIbjkZTINYfsRxQN3k8ICiLc5bI7QbzXji2iT61O9+mLX15YIi6zKB/Rg==","mode":420,"size":1164},"test/tests.js":{"checkedAt":1794532098051,"integrity":"sha512-5fOeoggpAwdZJnKWkrQbr2S4zNOWwjFtFY9b9cp2/dZicIuleTCyEhWf3mKtf55kRtEXDOzCnWGiFLERt31zAw==","mode":420,"size":2635},"package.json":{"checkedAt":1794532098051,"integrity":"sha512-tWms7DfT+JAO2Zvj1CCEgng9dH2ho7YClyZIH9yQyrBMbH5wkVs2yzBwzXGmmxzdLo+/9uuUmomrYuF/bVbY9w==","mode":420,"size":2404},"CHANGELOG.md":{"checkedAt":1794532098051,"integrity":"sha512-M0KszaXrZUril8+l4D16swSJUa66GF6qcJE0e9fU2IrIwHaLAFrEa80wEEah9lw24kYCaQyZ3fByuraIN7eOaQ==","mode":420,"size":19657},"README.md":{"checkedAt":1794532098051,"integrity":"sha512-GjYOTrUwpgWSBDTOUkLt6JwDqDMUHRyPFwS72/fCFgm6il6cQex0xYaPw77SamnpxX+7Q/3n7eVSrvG03t3OLA==","mode":420,"size":2337}}}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E wC","36":"F A B"},B:{"1":"0 1 2 3 4 5 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","36":"C L M"},C:{"1":"0 1 2 3 4 5 fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC 0C","36":"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 1C"},D:{"1":"0 1 2 3 4 5 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","36":"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"},E:{"1":"E F A B C L M G 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J 2C ZC","36":"ZB K D 3C 4C"},F:{"1":"0 1 2 3 4 5 7 8 9 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F B FD GD HD ID NC","36":"6 C G N O P aB uC JD OC"},G:{"1":"E OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC","36":"KD vC LD MD ND"},H:{"2":"hD"},I:{"1":"I","2":"iD","36":"TC J jD kD lD vC mD nD"},J:{"36":"D A"},K:{"1":"H","2":"A B","36":"C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"36":"A B"},O:{"1":"PC"},P:{"1":"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","36":"J"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"matches() DOM method",D:true};
@@ -0,0 +1,41 @@
'use strict'
var validate = require('aproba')
var renderTemplate = require('./render-template.js')
var wideTruncate = require('./wide-truncate')
var stringWidth = require('string-width')
module.exports = function (theme, width, completed) {
validate('ONN', [theme, width, completed])
if (completed < 0) {
completed = 0
}
if (completed > 1) {
completed = 1
}
if (width <= 0) {
return ''
}
var sofar = Math.round(width * completed)
var rest = width - sofar
var template = [
{ type: 'complete', value: repeat(theme.complete, sofar), length: sofar },
{ type: 'remaining', value: repeat(theme.remaining, rest), length: rest },
]
return renderTemplate(width, template, theme)
}
// lodash's way of repeating
function repeat (string, width) {
var result = ''
var n = width
do {
if (n % 2) {
result += string
}
n = Math.floor(n / 2)
/* eslint no-self-assign: 0 */
string += string
} while (n && stringWidth(result) < width)
return wideTruncate(result, width)
}
@@ -0,0 +1,249 @@
/**
* @fileoverview Restrict usage of specified node modules.
* @author Christian Schulz
* @deprecated in ESLint v7.0.0
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
const ignore = require("ignore");
const arrayOfStrings = {
type: "array",
items: { type: "string" },
uniqueItems: true,
};
const arrayOfStringsOrObjects = {
type: "array",
items: {
anyOf: [
{ type: "string" },
{
type: "object",
properties: {
name: { type: "string" },
message: {
type: "string",
minLength: 1,
},
},
additionalProperties: false,
required: ["name"],
},
],
},
uniqueItems: true,
};
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "no-restricted-require",
url: "https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-restricted-require.md",
},
},
],
},
type: "suggestion",
docs: {
description: "Disallow specified modules when loaded by `require`",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-restricted-modules",
},
schema: {
anyOf: [
arrayOfStringsOrObjects,
{
type: "array",
items: {
type: "object",
properties: {
paths: arrayOfStringsOrObjects,
patterns: arrayOfStrings,
},
additionalProperties: false,
},
additionalItems: false,
},
],
},
messages: {
defaultMessage: "'{{name}}' module is restricted from being used.",
customMessage:
// eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
"'{{name}}' module is restricted from being used. {{customMessage}}",
patternMessage:
"'{{name}}' module is restricted from being used by a pattern.",
},
},
create(context) {
const options = Array.isArray(context.options) ? context.options : [];
const isPathAndPatternsObject =
typeof options[0] === "object" &&
(Object.hasOwn(options[0], "paths") ||
Object.hasOwn(options[0], "patterns"));
const restrictedPaths =
(isPathAndPatternsObject ? options[0].paths : context.options) ||
[];
const restrictedPatterns =
(isPathAndPatternsObject ? options[0].patterns : []) || [];
const restrictedPathMessages = restrictedPaths.reduce(
(memo, importName) => {
if (typeof importName === "string") {
memo[importName] = null;
} else {
memo[importName.name] = importName.message;
}
return memo;
},
{},
);
// if no imports are restricted we don't need to check
if (
Object.keys(restrictedPaths).length === 0 &&
restrictedPatterns.length === 0
) {
return {};
}
// relative paths are supported for this rule
const ig = ignore({ allowRelativePaths: true }).add(restrictedPatterns);
/**
* Function to check if a node is a string literal.
* @param {ASTNode} node The node to check.
* @returns {boolean} If the node is a string literal.
*/
function isStringLiteral(node) {
return (
node &&
node.type === "Literal" &&
typeof node.value === "string"
);
}
/**
* Function to check if a node is a require call.
* @param {ASTNode} node The node to check.
* @returns {boolean} If the node is a require call.
*/
function isRequireCall(node) {
return (
node.callee.type === "Identifier" &&
node.callee.name === "require"
);
}
/**
* Extract string from Literal or TemplateLiteral node
* @param {ASTNode} node The node to extract from
* @returns {string|null} Extracted string or null if node doesn't represent a string
*/
function getFirstArgumentString(node) {
if (isStringLiteral(node)) {
return node.value.trim();
}
if (astUtils.isStaticTemplateLiteral(node)) {
return node.quasis[0].value.cooked.trim();
}
return null;
}
/**
* Report a restricted path.
* @param {node} node representing the restricted path reference
* @param {string} name restricted path
* @returns {void}
* @private
*/
function reportPath(node, name) {
const customMessage = restrictedPathMessages[name];
const messageId = customMessage
? "customMessage"
: "defaultMessage";
context.report({
node,
messageId,
data: {
name,
customMessage,
},
});
}
/**
* Check if the given name is a restricted path name
* @param {string} name name of a variable
* @returns {boolean} whether the variable is a restricted path or not
* @private
*/
function isRestrictedPath(name) {
return Object.hasOwn(restrictedPathMessages, name);
}
return {
CallExpression(node) {
if (isRequireCall(node)) {
// node has arguments
if (node.arguments.length) {
const name = getFirstArgumentString(node.arguments[0]);
// if first argument is a string literal or a static string template literal
if (name) {
// check if argument value is in restricted modules array
if (isRestrictedPath(name)) {
reportPath(node, name);
}
if (
restrictedPatterns.length > 0 &&
ig.ignores(name)
) {
context.report({
node,
messageId: "patternMessage",
data: { name },
});
}
}
}
}
},
};
},
};
@@ -0,0 +1,11 @@
import type { Config, PluginCreator } from './types/config'
type Plugin = {
withOptions<T>(
plugin: (options: T) => PluginCreator,
config?: (options: T) => Partial<Config>
): { (options: T): { handler: PluginCreator; config?: Partial<Config> }; __isOptionsFunction: true }
(plugin: PluginCreator, config?: Partial<Config>): { handler: PluginCreator; config?: Partial<Config> }
}
declare const plugin: Plugin
export = plugin
@@ -0,0 +1 @@
{"version":3,"file":"setInstanceProperties.js","sourceRoot":"","sources":["../../../../src/resolution/actions/setInstanceProperties.ts"],"names":[],"mappings":";;AAUA,sDAgDC;AA1DD,gDAAgD;AAEhD,8EAA2E;AAC3E,sFAAmF;AAEnF,6FAA0F;AAK1F,SAAgB,qBAAqB,CACnC,kBAGY;IAMZ,OAAO,CACL,MAAwB,EACxB,QAA0C,EAC1C,IAAyB,EACH,EAAE;QACxB,MAAM,0BAA0B,GAAoB,EAAE,CAAC;QAEvD,KAAK,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YAC9D,MAAM,QAAQ,GACZ,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YAEjD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC3B,MAAM,IAAI,uCAAkB,CAC1B,+CAAsB,CAAC,UAAU,EACjC,mCAAmC,WAAW,CAAC,QAAQ,EAAE,eAAe,CACzE,CAAC;YACJ,CAAC;YAED,IACE,QAAQ,CAAC,IAAI,KAAK,mDAAwB,CAAC,SAAS;gBACpD,YAAY,CAAC,QAAQ,KAAK,SAAS,EACnC,CAAC;gBACD,QAAQ,CAAC,WAAW,CAAC,GAAG,kBAAkB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;gBAEjE,IAAI,IAAA,kBAAS,EAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC;oBACrC,0BAA0B,CAAC,IAAI,CAC7B,CAAC,KAAK,IAAI,EAAE;wBACV,QAAQ,CAAC,WAAW,CAAC,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,CAAC;oBACtD,CAAC,CAAC,EAAE,CACL,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,0BAA0B,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1C,OAAO,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QACvE,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
const t={};class e{constructor(){this.subscriptions=[]}add(t){var e,s;return e=this.subscriptions,s=t,-1===e.indexOf(s)&&e.push(s),()=>function(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}(this.subscriptions,t)}notify(t,e,s){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,s);else for(let n=0;n<i;n++){const i=this.subscriptions[n];i&&i(t,e,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const s=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],i={value:null,addProjectionMetrics:null};function n(e,n){let r=!1,a=!0;const o={delta:0,timestamp:0,isProcessing:!1},c=()=>r=!0,h=s.reduce((t,e)=>(t[e]=function(t,e){let s=new Set,n=new Set,r=!1,a=!1;const o=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1},h=0;function p(e){o.has(e)&&(d.schedule(e),t()),h++,e(c)}const d={schedule:(t,e=!1,i=!1)=>{const a=i&&r?s:n;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{c=t,r?a=!0:(r=!0,[s,n]=[n,s],s.forEach(p),e&&i.value&&i.value.frameloop[e].push(h),h=0,s.clear(),r=!1,a&&(a=!1,d.process(t)))}};return d}(c,e),t),{}),{setup:p,read:d,resolveKeyframes:u,preUpdate:l,update:v,preRender:m,render:f,postRender:g}=h,y=()=>{const s=t.useManualTiming?o.timestamp:performance.now();r=!1,t.useManualTiming||(o.delta=a?1e3/60:Math.max(Math.min(s-o.timestamp,40),1)),o.timestamp=s,o.isProcessing=!0,p.process(o),d.process(o),u.process(o),l.process(o),v.process(o),m.process(o),f.process(o),g.process(o),o.isProcessing=!1,r&&n&&(a=!1,e(y))};return{schedule:s.reduce((t,s)=>{const i=h[s];return t[s]=(t,s=!1,n=!1)=>(r||(r=!0,a=!0,o.isProcessing||e(y)),i.schedule(t,s,n)),t},{}),cancel:t=>{for(let e=0;e<s.length;e++)h[s[e]].cancel(t)},state:o,steps:h}}const{schedule:r,cancel:a,state:o,steps:c}=n("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:t=>t,!0);let h;function p(){h=void 0}const d={now:()=>(void 0===h&&d.set(o.isProcessing||t.useManualTiming?o.timestamp:performance.now()),h),set:t=>{h=t,queueMicrotask(p)}},u={current:void 0};class l{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=d.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=d.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,s){this.events[t]||(this.events[t]=new e);const i=this.events[t].add(s);return"change"===t?()=>{i(),r.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return u.current&&u.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=d.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return s=parseFloat(this.current)-parseFloat(this.prevFrameValue),(i=e)?s*(1e3/i):0;var s,i}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function v(t,e){return new l(t,e)}export{l as MotionValue,u as collectMotionValues,v as motionValue};
@@ -0,0 +1 @@
{"version":3,"file":"index.cjs","sources":["../../src/index.ts"],"sourcesContent":["import { approxEqual, debounce, memo, notUndefined } from './utils'\n\nexport * from './utils'\n\n//\n\ntype ScrollDirection = 'forward' | 'backward'\n\ntype ScrollAlignment = 'start' | 'center' | 'end' | 'auto'\n\ntype ScrollBehavior = 'auto' | 'smooth'\n\nexport interface ScrollToOptions {\n align?: ScrollAlignment\n behavior?: ScrollBehavior\n}\n\ntype ScrollToOffsetOptions = ScrollToOptions\n\ntype ScrollToIndexOptions = ScrollToOptions\n\nexport interface Range {\n startIndex: number\n endIndex: number\n overscan: number\n count: number\n}\n\ntype Key = number | string | bigint\n\nexport interface VirtualItem {\n key: Key\n index: number\n start: number\n end: number\n size: number\n lane: number\n}\n\nexport interface Rect {\n width: number\n height: number\n}\n\n//\n\nexport const defaultKeyExtractor = (index: number) => index\n\nexport const defaultRangeExtractor = (range: Range) => {\n const start = Math.max(range.startIndex - range.overscan, 0)\n const end = Math.min(range.endIndex + range.overscan, range.count - 1)\n\n const arr = []\n\n for (let i = start; i <= end; i++) {\n arr.push(i)\n }\n\n return arr\n}\n\nexport const observeElementRect = <T extends Element>(\n instance: Virtualizer<T, any>,\n cb: (rect: Rect) => void,\n) => {\n const element = instance.scrollElement\n if (!element) {\n return\n }\n const targetWindow = instance.targetWindow\n if (!targetWindow) {\n return\n }\n\n const handler = (rect: Rect) => {\n const { width, height } = rect\n cb({ width: Math.round(width), height: Math.round(height) })\n }\n\n handler(element.getBoundingClientRect())\n\n if (!targetWindow.ResizeObserver) {\n return () => {}\n }\n\n const observer = new targetWindow.ResizeObserver((entries) => {\n const entry = entries[0]\n if (entry?.borderBoxSize) {\n const box = entry.borderBoxSize[0]\n if (box) {\n handler({ width: box.inlineSize, height: box.blockSize })\n return\n }\n }\n handler(element.getBoundingClientRect())\n })\n\n observer.observe(element, { box: 'border-box' })\n\n return () => {\n observer.unobserve(element)\n }\n}\n\nconst addEventListenerOptions = {\n passive: true,\n}\n\nexport const observeWindowRect = (\n instance: Virtualizer<Window, any>,\n cb: (rect: Rect) => void,\n) => {\n const element = instance.scrollElement\n if (!element) {\n return\n }\n\n const handler = () => {\n cb({ width: element.innerWidth, height: element.innerHeight })\n }\n handler()\n\n element.addEventListener('resize', handler, addEventListenerOptions)\n\n return () => {\n element.removeEventListener('resize', handler)\n }\n}\n\nconst supportsScrollend =\n typeof window == 'undefined' ? true : 'onscrollend' in window\n\ntype ObserveOffsetCallBack = (offset: number, isScrolling: boolean) => void\n\nexport const observeElementOffset = <T extends Element>(\n instance: Virtualizer<T, any>,\n cb: ObserveOffsetCallBack,\n) => {\n const element = instance.scrollElement\n if (!element) {\n return\n }\n const targetWindow = instance.targetWindow\n if (!targetWindow) {\n return\n }\n\n let offset = 0\n const fallback =\n instance.options.useScrollendEvent && supportsScrollend\n ? () => undefined\n : debounce(\n targetWindow,\n () => {\n cb(offset, false)\n },\n instance.options.isScrollingResetDelay,\n )\n\n const createHandler = (isScrolling: boolean) => () => {\n const { horizontal, isRtl } = instance.options\n offset = horizontal\n ? element['scrollLeft'] * ((isRtl && -1) || 1)\n : element['scrollTop']\n fallback()\n cb(offset, isScrolling)\n }\n const handler = createHandler(true)\n const endHandler = createHandler(false)\n endHandler()\n\n element.addEventListener('scroll', handler, addEventListenerOptions)\n element.addEventListener('scrollend', endHandler, addEventListenerOptions)\n\n return () => {\n element.removeEventListener('scroll', handler)\n element.removeEventListener('scrollend', endHandler)\n }\n}\n\nexport const observeWindowOffset = (\n instance: Virtualizer<Window, any>,\n cb: ObserveOffsetCallBack,\n) => {\n const element = instance.scrollElement\n if (!element) {\n return\n }\n const targetWindow = instance.targetWindow\n if (!targetWindow) {\n return\n }\n\n let offset = 0\n const fallback =\n instance.options.useScrollendEvent && supportsScrollend\n ? () => undefined\n : debounce(\n targetWindow,\n () => {\n cb(offset, false)\n },\n instance.options.isScrollingResetDelay,\n )\n\n const createHandler = (isScrolling: boolean) => () => {\n offset = element[instance.options.horizontal ? 'scrollX' : 'scrollY']\n fallback()\n cb(offset, isScrolling)\n }\n const handler = createHandler(tLine truncated
@@ -0,0 +1,25 @@
/**
* Checks `value` to determine whether a default value should be returned in
* its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
* or `undefined`.
*
* @static
* @memberOf _
* @since 4.14.0
* @category Util
* @param {*} value The value to check.
* @param {*} defaultValue The default value.
* @returns {*} Returns the resolved value.
* @example
*
* _.defaultTo(1, 10);
* // => 1
*
* _.defaultTo(undefined, 10);
* // => 10
*/
function defaultTo(value, defaultValue) {
return (value == null || value !== value) ? defaultValue : value;
}
export default defaultTo;
@@ -0,0 +1,19 @@
# @babel/helpers
> Collection of helper functions used by Babel transforms.
See our website [@babel/helpers](https://babeljs.io/docs/babel-helpers) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/helpers
```
or using yarn:
```sh
yarn add @babel/helpers --dev
```
@@ -0,0 +1,27 @@
import baseIsDate from './_baseIsDate.js';
import baseUnary from './_baseUnary.js';
import nodeUtil from './_nodeUtil.js';
/* Node.js helper references. */
var nodeIsDate = nodeUtil && nodeUtil.isDate;
/**
* Checks if `value` is classified as a `Date` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
* @example
*
* _.isDate(new Date);
* // => true
*
* _.isDate('Mon April 23 2012');
* // => false
*/
var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
export default isDate;
@@ -0,0 +1,17 @@
import baseGetAllKeys from './_baseGetAllKeys.js';
import getSymbolsIn from './_getSymbolsIn.js';
import keysIn from './keysIn.js';
/**
* Creates an array of own and inherited enumerable property names and
* symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names and symbols.
*/
function getAllKeysIn(object) {
return baseGetAllKeys(object, keysIn, getSymbolsIn);
}
export default getAllKeysIn;
@@ -0,0 +1,48 @@
/*
* 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 {AriaLabelingProps, DOMProps} from '@react-types/shared';
import {useId} from './useId';
/**
* Merges aria-label and aria-labelledby into aria-labelledby when both exist.
* @param props - Aria label props.
* @param defaultLabel - Default value for aria-label when not present.
*/
export function useLabels(props: DOMProps & AriaLabelingProps, defaultLabel?: string): DOMProps & AriaLabelingProps {
let {
id,
'aria-label': label,
'aria-labelledby': labelledBy
} = props;
// If there is both an aria-label and aria-labelledby,
// combine them by pointing to the element itself.
id = useId(id);
if (labelledBy && label) {
let ids = new Set([id, ...labelledBy.trim().split(/\s+/)]);
labelledBy = [...ids].join(' ');
} else if (labelledBy) {
labelledBy = labelledBy.trim().split(/\s+/).join(' ');
}
// If no labels are provided, use the default
if (!label && !labelledBy && defaultLabel) {
label = defaultLabel;
}
return {
id,
'aria-label': label,
'aria-labelledby': labelledBy
};
}
@@ -0,0 +1,100 @@
# 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.7](https://github.com/inspect-js/available-typed-arrays/compare/v1.0.6...v1.0.7) - 2024-02-19
### Commits
- [Refactor] use `possible-typed-array-names` [`ac86abf`](https://github.com/inspect-js/available-typed-arrays/commit/ac86abfd64c4b633fd6523cc4193f1913fd22666)
## [v1.0.6](https://github.com/inspect-js/available-typed-arrays/compare/v1.0.5...v1.0.6) - 2024-01-31
### Commits
- [actions] reuse common workflows [`1850353`](https://github.com/inspect-js/available-typed-arrays/commit/1850353ded0ceb4d02d9d05649da5b7f3a28c89f)
- [meta] use `npmignore` to autogenerate an npmignore file [`5c7de12`](https://github.com/inspect-js/available-typed-arrays/commit/5c7de120d22a5c35f703ba3f0b5287e5c5f38af6)
- [patch] add types [`fcfb0ea`](https://github.com/inspect-js/available-typed-arrays/commit/fcfb0ea21c9dc8459d68f8bb26679abb0bec71ca)
- [actions] update codecov uploader [`d844945`](https://github.com/inspect-js/available-typed-arrays/commit/d84494596881a298aabde9bd87e538ce10c6cd01)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `array.prototype.every`, `safe-publish-latest`, `tape` [`a2be6f4`](https://github.com/inspect-js/available-typed-arrays/commit/a2be6f482010e920692d8f65fe1f193dbb73004d)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`b283a3e`](https://github.com/inspect-js/available-typed-arrays/commit/b283a3e2176fbe8e431a27e20df21c831f216d5a)
- [actions] update rebase action to use reusable workflow [`0ad1f2d`](https://github.com/inspect-js/available-typed-arrays/commit/0ad1f2d82b11713ee48d9b37cb73fcc891bd9f4a)
- [Dev Deps] update `@ljharb/eslint-config`, `array.prototype.every`, `aud`, `tape` [`cd36e81`](https://github.com/inspect-js/available-typed-arrays/commit/cd36e8131076dd4e67a88b259f829067fa56c139)
- [meta] simplify "exports" [`f696e5f`](https://github.com/inspect-js/available-typed-arrays/commit/f696e5ff9ded838e192ade4e8550a890c4f35eb0)
- [Dev Deps] update `aud`, `npmignore`, `tape` [`bf20080`](https://github.com/inspect-js/available-typed-arrays/commit/bf200809aea3107b31fc8817122c693e099be30e)
## [v1.0.5](https://github.com/inspect-js/available-typed-arrays/compare/v1.0.4...v1.0.5) - 2021-08-30
### Fixed
- [Refactor] use `globalThis` if available [`#12`](https://github.com/inspect-js/available-typed-arrays/issues/12)
### Commits
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`1199790`](https://github.com/inspect-js/available-typed-arrays/commit/1199790ab5841517ad04827fab3f135d2dc5cfb7)
## [v1.0.4](https://github.com/inspect-js/available-typed-arrays/compare/v1.0.3...v1.0.4) - 2021-05-25
### Commits
- [Refactor] Remove `array.prototype.filter` dependency [`f39c90e`](https://github.com/inspect-js/available-typed-arrays/commit/f39c90ecb1907de28ee2d3577b7da37ae12aac56)
- [Dev Deps] update `eslint`, `auto-changelog` [`b2e3a03`](https://github.com/inspect-js/available-typed-arrays/commit/b2e3a035e8cd3ddfd7b565249e1651c6419a34d0)
- [meta] create `FUNDING.yml` [`8c0e758`](https://github.com/inspect-js/available-typed-arrays/commit/8c0e758c6ec80adbb3770554653cdc3aa16beb55)
- [Tests] fix harmony test matrix [`ef96549`](https://github.com/inspect-js/available-typed-arrays/commit/ef96549df171776267529413240a2219cb59d5ce)
- [meta] add `sideEffects` flag [`288cca0`](https://github.com/inspect-js/available-typed-arrays/commit/288cca0fbd214bec706447851bb8bccc4b899a48)
## [v1.0.3](https://github.com/inspect-js/available-typed-arrays/compare/v1.0.2...v1.0.3) - 2021-05-19
### Commits
- [Tests] migrate tests to Github Actions [`3ef082c`](https://github.com/inspect-js/available-typed-arrays/commit/3ef082caaa153b49f4c37c85bbd5c4b13fe4f638)
- [meta] do not publish github action workflow files [`fd95ffd`](https://github.com/inspect-js/available-typed-arrays/commit/fd95ffdaca759eca81cb4c5d5772ee863dfea501)
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`eb6bd65`](https://github.com/inspect-js/available-typed-arrays/commit/eb6bd659a31c92a6a178c71a89fe0d5261413e6c)
- [Tests] run `nyc` on all tests [`636c946`](https://github.com/inspect-js/available-typed-arrays/commit/636c94657b532599ef90a214aaa12639d11b0161)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`70a3b61`](https://github.com/inspect-js/available-typed-arrays/commit/70a3b61367b318fb883c2f35b8f2d539849a23b6)
- [actions] add "Allow Edits" workflow [`bd09c45`](https://github.com/inspect-js/available-typed-arrays/commit/bd09c45299e396fa5bbd5be4c58b1aedcb372a82)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `array.prototype.every`, `aud`, `tape` [`8f97523`](https://github.com/inspect-js/available-typed-arrays/commit/8f9752308390a79068cd431436bbfd77bca15647)
- [readme] fix URLs [`75418e2`](https://github.com/inspect-js/available-typed-arrays/commit/75418e20b57f4ad5e65d8c2e1864efd14eaa2e65)
- [readme] add actions and codecov badges [`4a8bc30`](https://github.com/inspect-js/available-typed-arrays/commit/4a8bc30af2ce1f48e2b28ab3db5be9589bd6f2d0)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud` [`65198ac`](https://github.com/inspect-js/available-typed-arrays/commit/65198ace335a013ef49b6bd722bc80bbbc6be784)
- [actions] update workflows [`7f816eb`](https://github.com/inspect-js/available-typed-arrays/commit/7f816eb231131e53ced2572ba6c6c6a00f975789)
- [Refactor] use `array.prototype.filter` instead of `array-filter` [`2dd1038`](https://github.com/inspect-js/available-typed-arrays/commit/2dd1038d71ce48b5650687691cf8fe09795a6d30)
- [actions] switch Automatic Rease workflow to `pull_request_target` event [`9b45e91`](https://github.com/inspect-js/available-typed-arrays/commit/9b45e914fcb08bdaaaa0166b41716e51f400d1c6)
- [Dev Deps] update `auto-changelog`, `tape` [`0003a5b`](https://github.com/inspect-js/available-typed-arrays/commit/0003a5b122a0724db5499c114104eeeb396b2f67)
- [meta] use `prepublishOnly` script for npm 7+ [`d884dd1`](https://github.com/inspect-js/available-typed-arrays/commit/d884dd1c1117411f35d9fbc07f513a1a85ccdead)
- [readme] remove travis badge [`9da2b3c`](https://github.com/inspect-js/available-typed-arrays/commit/9da2b3c29706340fada995137aba12cfae4d6f37)
- [Dev Deps] update `auto-changelog`; add `aud` [`41b1336`](https://github.com/inspect-js/available-typed-arrays/commit/41b13369c71b0e3e57b9de0f4fb1e4d67950d74a)
- [Tests] only audit prod deps [`2571826`](https://github.com/inspect-js/available-typed-arrays/commit/2571826a5d121eeeeccf4c711e3f9e4616685d50)
## [v1.0.2](https://github.com/inspect-js/available-typed-arrays/compare/v1.0.1...v1.0.2) - 2020-01-26
### Commits
- [actions] add automatic rebasing / merge commit blocking [`3229a74`](https://github.com/inspect-js/available-typed-arrays/commit/3229a74bda60f24e2257efc40ddff9a3ce98de76)
- [Dev Deps] update `@ljharb/eslint-config` [`9579abe`](https://github.com/inspect-js/available-typed-arrays/commit/9579abecc196088561d3aedf27cad45b56f8e18b)
- [Fix] remove `require` condition to avoid experimental warning [`2cade6b`](https://github.com/inspect-js/available-typed-arrays/commit/2cade6b56d6a508a950c7da27d038bee496e716b)
## [v1.0.1](https://github.com/inspect-js/available-typed-arrays/compare/v1.0.0...v1.0.1) - 2020-01-24
### Commits
- [meta] add "exports" [`5942917`](https://github.com/inspect-js/available-typed-arrays/commit/5942917aafb56c6bce80f01b7ae6a9b46bc72c69)
## v1.0.0 - 2020-01-24
### Commits
- Initial commit [`2bc5144`](https://github.com/inspect-js/available-typed-arrays/commit/2bc514459c9f65756adfbd9964abf433183d78f6)
- readme [`31e4796`](https://github.com/inspect-js/available-typed-arrays/commit/31e4796379eba4a16d3c6a8e9baf6eb3f39e33d1)
- npm init [`9194266`](https://github.com/inspect-js/available-typed-arrays/commit/9194266b471a2a2dd5e6969bc40358ceb346e21e)
- Tests [`b539830`](https://github.com/inspect-js/available-typed-arrays/commit/b539830c3213f90de42b4d6e62803f52daf61a6d)
- Implementation [`6577df2`](https://github.com/inspect-js/available-typed-arrays/commit/6577df244ea146ef5ec16858044c8955e0fc445c)
- [meta] add `auto-changelog` [`7b43310`](https://github.com/inspect-js/available-typed-arrays/commit/7b43310be76f00fe60b74a2fd6d0e46ac1d01f3e)
- [Tests] add `npm run lint` [`dedfbc1`](https://github.com/inspect-js/available-typed-arrays/commit/dedfbc1592f86ac1636267d3965f2345df43815b)
- [Tests] use shared travis-ci configs [`c459d78`](https://github.com/inspect-js/available-typed-arrays/commit/c459d78bf2efa9d777f88599ae71a796dbfcb70f)
- Only apps should have lockfiles [`d294668`](https://github.com/inspect-js/available-typed-arrays/commit/d294668422cf35f5e7716a85bfd204e62b01c056)
- [meta] add `funding` field [`6e70bc1`](https://github.com/inspect-js/available-typed-arrays/commit/6e70bc1fb199c7898165aaf05c25bb49f4062e53)
- [meta] add `safe-publish-latest` [`dd89ca2`](https://github.com/inspect-js/available-typed-arrays/commit/dd89ca2c6842f0f3e82958df2b2bd0fc0c929c51)
@@ -0,0 +1,29 @@
/**
* @author Yosuke Ota <https://github.com/ota-meshi>
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
meta: {
docs: {
description: "disallow `export * as ns`.",
category: "ES2020",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-export-ns-from.html",
},
fixable: null,
messages: {
forbidden: "ES2020 'export * as ns' are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"ExportAllDeclaration[exported!=null]"(node) {
context.report({ node, messageId: "forbidden" })
},
}
},
}
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,aAAa,CAAC,kBAAY,CAAC;IAC7C,iBAAiB,CAAC,OAAS,GAAG,KAAK,UAAU,CAAC,gDAAiC,CAAC;IAChF,cAAc,CAAC,OAAS,GAAG,KAAK,KAAK,CAAC,OAAO,CAAC;IAC9C,cAAc,CAAC,mBAAa,CAAC;IAC7B,kBAAkB,CAAC,OAAS,GAAG,KAAK,UAAU,CAAC,iDAAkC,CAAC;IAClF,sBAAsB,CAAC,wDAAyC,CAAC;IACjE,UAAU,CAAC,MAAG,CAAC;IACf,aAAa,CAAC,sBAAU,CAAC;IACzB,YAAY,CAAC,4BAAmB,CAAC;AACnC","sources":["packages/@react-aria/table/intl/tr-TR.json"],"sourcesContent":["{\n \"ascending\": \"artan sırada\",\n \"ascendingSort\": \"{columnName} sütuna göre artan düzende sırala\",\n \"columnSize\": \"{value} piksel\",\n \"descending\": \"azalan sırada\",\n \"descendingSort\": \"{columnName} sütuna göre azalan düzende sırala\",\n \"resizerDescription\": \"Yeniden boyutlandırmak için Enter'a basın\",\n \"select\": \"Seç\",\n \"selectAll\": \"Tümünü Seç\",\n \"sortable\": \"Sıralanabilir sütun\"\n}\n"],"names":[],"version":3,"file":"tr-TR.module.js.map"}
@@ -0,0 +1,7 @@
'use strict';
var isIteratorRecordNew = require('./iterator-record');
module.exports = function isIteratorRecord(value) {
return isIteratorRecordNew(value) && typeof value['[[NextMethod]]'] === 'function';
};
@@ -0,0 +1,13 @@
"use strict";
const { stringifyValueForError } = require("./shared");
module.exports = function ({ ruleId, value }) {
return `
Configuration for rule "${ruleId}" is invalid. Expected severity of "off", 0, "warn", 1, "error", or 2.
You passed '${stringifyValueForError(value, 4)}'.
See https://eslint.org/docs/latest/use/configure/rules#using-configuration-files for configuring rules.
`.trimStart();
};
@@ -0,0 +1,14 @@
import { __decorate } from "tslib";
import { AsnProp } from "@peculiar/asn1-schema";
import { GeneralNames, GeneralName } from "@peculiar/asn1-x509";
export class RoleSyntax {
constructor(params = {}) {
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: GeneralNames, implicit: true, context: 0, optional: true })
], RoleSyntax.prototype, "roleAuthority", void 0);
__decorate([
AsnProp({ type: GeneralName, implicit: true, context: 1 })
], RoleSyntax.prototype, "roleName", void 0);
@@ -0,0 +1,78 @@
var fs = require('fs');
var path = require('path');
var pify = require('pify');
var stat = pify(fs.stat);
var readFile = pify(fs.readFile);
var resolve = path.resolve;
var cache = Object.create(null);
function convert(content, encoding) {
if (Buffer.isEncoding(encoding)) {
return content.toString(encoding);
}
return content;
}
module.exports = function (path, encoding) {
path = resolve(path);
return stat(path).then(function (stats) {
var item = cache[path];
if (item && item.mtime.getTime() === stats.mtime.getTime()) {
return convert(item.content, encoding);
}
return readFile(path).then(function (data) {
cache[path] = {
mtime: stats.mtime,
content: data
};
return convert(data, encoding);
});
}).catch(function (err) {
cache[path] = null;
return Promise.reject(err);
});
};
module.exports.sync = function (path, encoding) {
path = resolve(path);
try {
var stats = fs.statSync(path);
var item = cache[path];
if (item && item.mtime.getTime() === stats.mtime.getTime()) {
return convert(item.content, encoding);
}
var data = fs.readFileSync(path);
cache[path] = {
mtime: stats.mtime,
content: data
};
return convert(data, encoding);
} catch (err) {
cache[path] = null;
throw err;
}
};
module.exports.get = function (path, encoding) {
path = resolve(path);
if (cache[path]) {
return convert(cache[path].content, encoding);
}
return null;
};
module.exports.clear = function () {
cache = Object.create(null);
};
@@ -0,0 +1,18 @@
Copyright 2020 Filament (Anomalous Technologies Limited)
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,41 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnType, AsnTypeTypes, OctetString } from "@peculiar/asn1-schema";
import { CMSVersion, KeyEncryptionAlgorithmIdentifier } from "./types";
import { IssuerAndSerialNumber } from "./issuer_and_serial_number";
import { SubjectKeyIdentifier } from "@peculiar/asn1-x509";
let RecipientIdentifier = class RecipientIdentifier {
constructor(params = {}) {
Object.assign(this, params);
}
};
__decorate([
AsnProp({ type: SubjectKeyIdentifier, context: 0, implicit: true })
], RecipientIdentifier.prototype, "subjectKeyIdentifier", void 0);
__decorate([
AsnProp({ type: IssuerAndSerialNumber })
], RecipientIdentifier.prototype, "issuerAndSerialNumber", void 0);
RecipientIdentifier = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], RecipientIdentifier);
export { RecipientIdentifier };
export class KeyTransRecipientInfo {
constructor(params = {}) {
this.version = CMSVersion.v0;
this.rid = new RecipientIdentifier();
this.keyEncryptionAlgorithm = new KeyEncryptionAlgorithmIdentifier();
this.encryptedKey = new OctetString();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], KeyTransRecipientInfo.prototype, "version", void 0);
__decorate([
AsnProp({ type: RecipientIdentifier })
], KeyTransRecipientInfo.prototype, "rid", void 0);
__decorate([
AsnProp({ type: KeyEncryptionAlgorithmIdentifier })
], KeyTransRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
__decorate([
AsnProp({ type: OctetString })
], KeyTransRecipientInfo.prototype, "encryptedKey", void 0);
@@ -0,0 +1,32 @@
'use strict';
var parse = require('../');
var test = require('tape');
test('short -k=v', function (t) {
t.plan(1);
var argv = parse(['-b=123']);
t.deepEqual(argv, { b: 123, _: [] });
});
test('multi short -k=v', function (t) {
t.plan(1);
var argv = parse(['-a=whatever', '-b=robots']);
t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] });
});
test('short with embedded equals -k=a=b', function (t) {
t.plan(1);
var argv = parse(['-k=a=b']);
t.deepEqual(argv, { k: 'a=b', _: [] });
});
test('short with later equals like -ab=c', function (t) {
t.plan(1);
var argv = parse(['-ab=c']);
t.deepEqual(argv, { a: true, b: 'c', _: [] });
});
@@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var imgRole = {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: true,
nameFrom: ['author'],
prohibitedProps: [],
props: {},
relatedConcepts: [{
concept: {
attributes: [{
constraints: ['set'],
name: 'alt'
}],
name: 'img'
},
module: 'HTML'
}, {
concept: {
attributes: [{
constraints: ['undefined'],
name: 'alt'
}],
name: 'img'
},
module: 'HTML'
}, {
concept: {
name: 'imggroup'
},
module: 'DTB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section']]
};
var _default = exports.default = imgRole;
@@ -0,0 +1,19 @@
import { useEffect, useRef } from 'react';
import useUnmount from '../useUnmount';
import isBrowser from '../utils/isBrowser';
var DEFAULT_OPTIONS = {
restoreOnUnmount: false,
};
function useTitle(title, options) {
if (options === void 0) { options = DEFAULT_OPTIONS; }
var titleRef = useRef(isBrowser ? document.title : '');
useEffect(function () {
document.title = title;
}, [title]);
useUnmount(function () {
if (options.restoreOnUnmount) {
document.title = titleRef.current;
}
});
}
export default useTitle;
@@ -0,0 +1,11 @@
'use strict';
var parse = require('../');
var test = require('tape');
test('parse with modifier functions', function (t) {
t.plan(1);
var argv = parse(['-b', '123'], { boolean: 'b' });
t.deepEqual(argv, { b: true, _: [123] });
});
@@ -0,0 +1,105 @@
{
"name": "regexp.prototype.flags",
"version": "1.5.4",
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"description": "ES6 spec-compliant RegExp.prototype.flags shim.",
"license": "MIT",
"main": "index.js",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run lint",
"test": "npm run tests-only",
"posttest": "npx npm@'>=10.2' audit --production",
"tests-only": "nyc tape 'test/**/*.js'",
"prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
"lint": "eslint --ext=js,mjs .",
"postlint": "evalmd README.md && es-shim-api --bound",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git://github.com/es-shims/RegExp.prototype.flags.git"
},
"keywords": [
"RegExp.prototype.flags",
"regex",
"regular expression",
"ES6",
"shim",
"flag",
"flags",
"regexp",
"RegExp#flags",
"polyfill",
"es-shim API"
],
"dependencies": {
"call-bind": "^1.0.8",
"define-properties": "^1.2.1",
"es-errors": "^1.3.0",
"get-proto": "^1.0.1",
"gopd": "^1.2.0",
"set-function-name": "^2.0.2"
},
"devDependencies": {
"@es-shims/api": "^2.5.1",
"@ljharb/eslint-config": "^21.1.1",
"auto-changelog": "^2.5.0",
"available-regexp-flags": "^1.0.4",
"eclint": "^2.8.1",
"encoding": "^0.1.13",
"es-value-fixtures": "^1.5.0",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"for-each": "^0.3.3",
"functions-have-names": "^1.2.3",
"has-strict-mode": "^1.0.1",
"hasown": "^2.0.2",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0"
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/9.0..latest",
"firefox/4.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/11.6..latest",
"opera/next",
"safari/5.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}
@@ -0,0 +1,31 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
test("passing validations", () => {
const example1 = z.custom<number>((x) => typeof x === "number");
example1.parse(1234);
expect(() => example1.parse({})).toThrow();
});
test("string params", () => {
const example1 = z.custom<number>((x) => typeof x !== "number", "customerr");
const result = example1.safeParse(1234);
expect(result.success).toEqual(false);
// @ts-ignore
expect(JSON.stringify(result.error).includes("customerr")).toEqual(true);
});
test("async validations", async () => {
const example1 = z.custom<number>(async (x) => {
return typeof x === "number";
});
const r1 = await example1.safeParseAsync(1234);
expect(r1.success).toEqual(true);
expect(r1.data).toEqual(1234);
const r2 = await example1.safeParseAsync("asdf");
expect(r2.success).toEqual(false);
expect(r2.error!.issues.length).toEqual(1);
});
@@ -0,0 +1,63 @@
/**
* Short/Long format for `value`.
*
* @param {Number} value
* @param {{long: boolean}} options
* @return {String}
*/
declare function ms(value: number, options?: { long: boolean }): string;
/**
* Parse the given `value` and return milliseconds.
*
* @param {ms.StringValue} value
* @return {Number}
*/
declare function ms(value: ms.StringValue): number;
declare namespace ms {
// Unit, UnitAnyCase, and StringValue are backported from ms@3
// https://github.com/vercel/ms/blob/8b5923d1d86c84a9f6aba8022d416dcf2361aa8d/src/index.ts
type Unit =
| "Years"
| "Year"
| "Yrs"
| "Yr"
| "Y"
| "Weeks"
| "Week"
| "W"
| "Days"
| "Day"
| "D"
| "Hours"
| "Hour"
| "Hrs"
| "Hr"
| "H"
| "Minutes"
| "Minute"
| "Mins"
| "Min"
| "M"
| "Seconds"
| "Second"
| "Secs"
| "Sec"
| "s"
| "Milliseconds"
| "Millisecond"
| "Msecs"
| "Msec"
| "Ms";
type UnitAnyCase = Unit | Uppercase<Unit> | Lowercase<Unit>;
type StringValue =
| `${number}`
| `${number}${UnitAnyCase}`
| `${number} ${UnitAnyCase}`;
}
export = ms;
@@ -0,0 +1,30 @@
import createRelationalOperation from './_createRelationalOperation.js';
/**
* Checks if `value` is less than or equal to `other`.
*
* @static
* @memberOf _
* @since 3.9.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is less than or equal to
* `other`, else `false`.
* @see _.gte
* @example
*
* _.lte(1, 3);
* // => true
*
* _.lte(3, 3);
* // => true
*
* _.lte(3, 1);
* // => false
*/
var lte = createRelationalOperation(function(value, other) {
return value <= other;
});
export default lte;
@@ -0,0 +1 @@
{"version":3,"file":"no-redundant-should-component-update.d.ts","sourceRoot":"","sources":["no-redundant-should-component-update.js"],"names":[],"mappings":"wBAmBW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1,115 @@
/**
* @fileoverview Rule to disallow uses of await inside of loops.
* @author Nat Mote (nmote)
*/
"use strict";
/**
* Check whether it should stop traversing ancestors at the given node.
* @param {ASTNode} node A node to check.
* @returns {boolean} `true` if it should stop traversing.
*/
function isBoundary(node) {
const t = node.type;
return (
t === "FunctionDeclaration" ||
t === "FunctionExpression" ||
t === "ArrowFunctionExpression" ||
/*
* Don't report the await expressions on for-await-of loop since it's
* asynchronous iteration intentionally.
*/
(t === "ForOfStatement" && node.await === true)
);
}
/**
* Check whether the given node is in loop.
* @param {ASTNode} node A node to check.
* @param {ASTNode} parent A parent node to check.
* @returns {boolean} `true` if the node is in loop.
*/
function isLooped(node, parent) {
switch (parent.type) {
case "ForStatement":
return (
node === parent.test ||
node === parent.update ||
node === parent.body
);
case "ForOfStatement":
case "ForInStatement":
return (
node === parent.body ||
(node === parent.left && node.kind === "await using")
);
case "WhileStatement":
case "DoWhileStatement":
return node === parent.test || node === parent.body;
default:
return false;
}
}
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
docs: {
description: "Disallow `await` inside of loops",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-await-in-loop",
},
schema: [],
messages: {
unexpectedAwait: "Unexpected `await` inside a loop.",
},
},
create(context) {
/**
* Validate an await expression.
* @param {ASTNode} awaitNode An AwaitExpression or ForOfStatement node to validate.
* @returns {void}
*/
function validate(awaitNode) {
if (
awaitNode.type === "VariableDeclaration" &&
awaitNode.kind !== "await using"
) {
return;
}
if (awaitNode.type === "ForOfStatement" && !awaitNode.await) {
return;
}
let node = awaitNode;
let parent = node.parent;
while (parent && !isBoundary(parent)) {
if (isLooped(node, parent)) {
context.report({
node: awaitNode,
messageId: "unexpectedAwait",
});
return;
}
node = parent;
parent = parent.parent;
}
}
return {
AwaitExpression: validate,
ForOfStatement: validate,
VariableDeclaration: validate,
};
},
};
@@ -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","2":"xC TC 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"1":"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","132":"J 2C ZC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 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 uC JD OC","2":"F FD GD HD ID","132":"B NC"},G:{"1":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"1":"hD"},I:{"1":"TC I iD jD kD vC mD nD","4":"J lD"},J:{"1":"D A"},K:{"1":"B C H NC uC OC","2":"A"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"input placeholder attribute",D:true};
@@ -0,0 +1,60 @@
# import/no-unassigned-import
<!-- end auto-generated rule header -->
With both CommonJS' `require` and the ES6 modules' `import` syntax, it is possible to import a module but not to use its result. This can be done explicitly by not assigning the module to as variable. Doing so can mean either of the following things:
- The module is imported but not used
- The module has side-effects (like [`should`](https://www.npmjs.com/package/should)). Having side-effects, makes it hard to know whether the module is actually used or can be removed. It can also make it harder to test or mock parts of your application.
This rule aims to remove modules with side-effects by reporting when a module is imported but not assigned.
## Options
This rule supports the following option:
`allow`: An Array of globs. The files that match any of these patterns would be ignored/allowed by the linter. This can be useful for some build environments (e.g. css-loader in webpack).
Note that the globs start from the where the linter is executed (usually project root), but not from each file that includes the source. Learn more in both the pass and fail examples below.
## Fail
```js
import 'should'
require('should')
// In <PROJECT_ROOT>/src/app.js
import '../styles/app.css'
// {"allow": ["styles/*.css"]}
```
## Pass
```js
import _ from 'foo'
import _, {foo} from 'foo'
import _, {foo as bar} from 'foo'
import {foo as bar} from 'foo'
import * as _ from 'foo'
const _ = require('foo')
const {foo} = require('foo')
const {foo: bar} = require('foo')
const [a, b] = require('foo')
const _ = require('foo')
// Module is not assigned, but it is used
bar(require('foo'))
require('foo').bar
require('foo').bar()
require('foo')()
// With allow option set
import './style.css' // {"allow": ["**/*.css"]}
import 'babel-register' // {"allow": ["babel-register"]}
// In <PROJECT_ROOT>/src/app.js
import './styles/app.css'
import '../scripts/register.js'
// {"allow": ["src/styles/**", "**/scripts/*.js"]}
```
@@ -0,0 +1,5 @@
import type { FieldValues, UseFormProps, UseFormReturn } from '../types';
export declare function createFormControl<TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues = TFieldValues>(props?: UseFormProps<TFieldValues, TContext, TTransformedValues>): Omit<UseFormReturn<TFieldValues, TContext, TTransformedValues>, 'formState'> & {
formControl: Omit<UseFormReturn<TFieldValues, TContext, TTransformedValues>, 'formState'>;
};
//# sourceMappingURL=createFormControl.d.ts.map
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more