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

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

No files matched your search

@@ -0,0 +1 @@
{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,MACd,MAAM,6CAIN,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,eAAe,CAAC,WAapE,CAAA"}
@@ -0,0 +1,117 @@
import * as util from "../core/util.js";
export const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "number";
}
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 error = () => {
const Sizable = {
string: { unit: "characters", verb: "to have" },
file: { unit: "bytes", verb: "to have" },
array: { unit: "items", verb: "to have" },
set: { unit: "items", verb: "to have" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const Nouns = {
regex: "input",
email: "email address",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO datetime",
date: "ISO date",
time: "ISO time",
duration: "ISO duration",
ipv4: "IPv4 address",
ipv6: "IPv6 address",
cidrv4: "IPv4 range",
cidrv6: "IPv6 range",
base64: "base64-encoded string",
base64url: "base64url-encoded string",
json_string: "JSON string",
e164: "E.164 number",
jwt: "JWT",
template_literal: "input",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Invalid input: expected ${issue.expected}, received ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;
return `Invalid option: expected one of ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Too big: expected ${issue.origin ?? "value"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"}`;
return `Too big: expected ${issue.origin ?? "value"} to be ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `Invalid string: must start with "${_issue.prefix}"`;
}
if (_issue.format === "ends_with")
return `Invalid string: must end with "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Invalid string: must include "${_issue.includes}"`;
if (_issue.format === "regex")
return `Invalid string: must match pattern ${_issue.pattern}`;
return `Invalid ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Invalid number: must be a multiple of ${issue.divisor}`;
case "unrecognized_keys":
return `Unrecognized key${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Invalid key in ${issue.origin}`;
case "invalid_union":
return "Invalid input";
case "invalid_element":
return `Invalid value in ${issue.origin}`;
default:
return `Invalid input`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1,8 @@
"use strict";
function _instanceof(left, right) {
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
return !!right[Symbol.hasInstance](left);
} else return left instanceof right;
}
exports._ = _instanceof;
@@ -0,0 +1,74 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PathCache = void 0;
const fs_1 = require("fs");
const path_1 = require("path");
class PathCache {
constructor(useCache, fileExtensions) {
this.fileExtensions = fileExtensions || [
'js',
'json',
'jsx',
'cjs',
'mjs',
'd.ts',
'd.tsx',
'd.cts',
'd.mts'
];
this.useCache = useCache;
if (useCache) {
this.existsCache = new Map();
this.absoluteCache = new Map();
}
}
existsResolvedAlias(path) {
if (!this.useCache)
return this.exists(path);
if (this.existsCache.has(path)) {
return this.existsCache.get(path);
}
else {
const result = this.exists(path);
this.existsCache.set(path, result);
return result;
}
}
getAbsoluteAliasPath(basePath, aliasPath) {
const request = { basePath, aliasPath };
if (!this.useCache)
return this.getAAP(request);
if (this.absoluteCache.has(this.getCacheKey(request))) {
return this.absoluteCache.get(this.getCacheKey(request));
}
else {
const result = this.getAAP(request);
this.absoluteCache.set(this.getCacheKey(request), result);
return result;
}
}
getCacheKey({ basePath, aliasPath }) {
return `${basePath}___${aliasPath}`;
}
getAAP({ basePath, aliasPath }) {
const aliasPathParts = aliasPath
.split('/')
.filter((part) => !part.match(/^\.$|^\s*$/));
let aliasPathPart = aliasPathParts.shift() || '';
let pathExists = false;
while (!(pathExists = this.exists((0, path_1.join)(basePath, aliasPathPart))) &&
aliasPathParts.length) {
aliasPathPart = aliasPathParts.shift();
}
if (pathExists) {
return (0, path_1.join)(basePath, aliasPathPart, aliasPathParts.join('/'));
}
return '---' + (0, path_1.join)(basePath, aliasPathParts.join('/'));
}
exists(path) {
return ((0, fs_1.existsSync)(path) ||
this.fileExtensions.some((extension) => (0, fs_1.existsSync)(`${path}.${extension}`)));
}
}
exports.PathCache = PathCache;
//# sourceMappingURL=path-cache.js.map
@@ -0,0 +1,6 @@
import { CreateType } from '../create/type.mjs';
import { Kind } from '../symbols/index.mjs';
/** `[Json]` Creates a Never type */
export function Never(options) {
return CreateType({ [Kind]: 'Never', not: {} }, options);
}
@@ -0,0 +1,249 @@
import type {
AnyFunction,
DefaultMemoizeFields,
EqualityFn,
Simplify
} from './types'
import type { NOT_FOUND_TYPE } from './utils'
import { NOT_FOUND } from './utils'
// Cache implementation based on Erik Rasmussen's `lru-memoize`:
// https://github.com/erikras/lru-memoize
interface Entry {
key: unknown
value: unknown
}
interface Cache {
get(key: unknown): unknown | NOT_FOUND_TYPE
put(key: unknown, value: unknown): void
getEntries(): Entry[]
clear(): void
}
function createSingletonCache(equals: EqualityFn): Cache {
let entry: Entry | undefined
return {
get(key: unknown) {
if (entry && equals(entry.key, key)) {
return entry.value
}
return NOT_FOUND
},
put(key: unknown, value: unknown) {
entry = { key, value }
},
getEntries() {
return entry ? [entry] : []
},
clear() {
entry = undefined
}
}
}
function createLruCache(maxSize: number, equals: EqualityFn): Cache {
let entries: Entry[] = []
function get(key: unknown) {
const cacheIndex = entries.findIndex(entry => equals(key, entry.key))
// We found a cached entry
if (cacheIndex > -1) {
const entry = entries[cacheIndex]
// Cached entry not at top of cache, move it to the top
if (cacheIndex > 0) {
entries.splice(cacheIndex, 1)
entries.unshift(entry)
}
return entry.value
}
// No entry found in cache, return sentinel
return NOT_FOUND
}
function put(key: unknown, value: unknown) {
if (get(key) === NOT_FOUND) {
// TODO Is unshift slow?
entries.unshift({ key, value })
if (entries.length > maxSize) {
entries.pop()
}
}
}
function getEntries() {
return entries
}
function clear() {
entries = []
}
return { get, put, getEntries, clear }
}
/**
* Runs a simple reference equality check.
* What {@linkcode lruMemoize lruMemoize} uses by default.
*
* **Note**: This function was previously known as `defaultEqualityCheck`.
*
* @public
*/
export const referenceEqualityCheck: EqualityFn = (a, b) => a === b
export function createCacheKeyComparator(equalityCheck: EqualityFn) {
return function areArgumentsShallowlyEqual(
prev: unknown[] | IArguments | null,
next: unknown[] | IArguments | null
): boolean {
if (prev === null || next === null || prev.length !== next.length) {
return false
}
// Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.
const { length } = prev
for (let i = 0; i < length; i++) {
if (!equalityCheck(prev[i], next[i])) {
return false
}
}
return true
}
}
/**
* Options for configuring the behavior of a function memoized with
* LRU (Least Recently Used) caching.
*
* @template Result - The type of the return value of the memoized function.
*
* @public
*/
export interface LruMemoizeOptions<Result = any> {
/**
* Function used to compare the individual arguments of the
* provided calculation function.
*
* @default referenceEqualityCheck
*/
equalityCheck?: EqualityFn
/**
* If provided, used to compare a newly generated output value against
* previous values in the cache. If a match is found,
* the old value is returned. This addresses the common
* ```ts
* todos.map(todo => todo.id)
* ```
* use case, where an update to another field in the original data causes
* a recalculation due to changed references, but the output is still
* effectively the same.
*
* @since 4.1.0
*/
resultEqualityCheck?: EqualityFn<Result>
/**
* The maximum size of the cache used by the selector.
* A size greater than 1 means the selector will use an
* LRU (Least Recently Used) cache, allowing for the caching of multiple
* results based on different sets of arguments.
*
* @default 1
*/
maxSize?: number
}
/**
* Creates a memoized version of a function with an optional
* LRU (Least Recently Used) cache. The memoized function uses a cache to
* store computed values. Depending on the `maxSize` option, it will use
* either a singleton cache (for a single entry) or an
* LRU cache (for multiple entries).
*
* **Note**: This function was previously known as `defaultMemoize`.
*
* @param func - The function to be memoized.
* @param equalityCheckOrOptions - Either an equality check function or an options object.
* @returns A memoized function with a `.clearCache()` method attached.
*
* @template Func - The type of the function that is memoized.
*
* @see {@link https://reselect.js.org/api/lruMemoize `lruMemoize`}
*
* @public
*/
export function lruMemoize<Func extends AnyFunction>(
func: Func,
equalityCheckOrOptions?: EqualityFn | LruMemoizeOptions<ReturnType<Func>>
) {
const providedOptions =
typeof equalityCheckOrOptions === 'object'
? equalityCheckOrOptions
: { equalityCheck: equalityCheckOrOptions }
const {
equalityCheck = referenceEqualityCheck,
maxSize = 1,
resultEqualityCheck
} = providedOptions
const comparator = createCacheKeyComparator(equalityCheck)
let resultsCount = 0
const cache =
maxSize <= 1
? createSingletonCache(comparator)
: createLruCache(maxSize, comparator)
function memoized() {
let value = cache.get(arguments) as ReturnType<Func>
if (value === NOT_FOUND) {
// apply arguments instead of spreading for performance.
// @ts-ignore
value = func.apply(null, arguments) as ReturnType<Func>
resultsCount++
if (resultEqualityCheck) {
const entries = cache.getEntries()
const matchingEntry = entries.find(entry =>
resultEqualityCheck(entry.value as ReturnType<Func>, value)
)
if (matchingEntry) {
value = matchingEntry.value as ReturnType<Func>
resultsCount !== 0 && resultsCount--
}
}
cache.put(arguments, value)
}
return value
}
memoized.clearCache = () => {
cache.clear()
memoized.resetResultsCount()
}
memoized.resultsCount = () => resultsCount
memoized.resetResultsCount = () => {
resultsCount = 0
}
return memoized as Func & Simplify<DefaultMemoizeFields>
}
@@ -0,0 +1,36 @@
'use strict';
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var objectKeys = require('object-keys');
var safePushApply = require('safe-push-apply');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var forEach = require('../helpers/forEach');
// https://262.ecma-international.org/14.0/#sec-enumerableownproperties
module.exports = function EnumerableOwnProperties(O, kind) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var keys = objectKeys(O);
if (kind === 'key') {
return keys;
}
if (kind === 'value' || kind === 'key+value') {
var results = [];
forEach(keys, function (key) {
if ($isEnumerable(O, key)) {
safePushApply(results, [
kind === 'value' ? O[key] : [key, O[key]]
]);
}
});
return results;
}
throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind);
};
@@ -0,0 +1,118 @@
/**
* @fileoverview Enforce aria role attribute is valid.
* @author Ethan Cohen
*/
// -----------------------------------------------------------------------------
// Requirements
// -----------------------------------------------------------------------------
import { roles } from 'aria-query';
import { RuleTester } from 'eslint';
import parserOptionsMapper from '../../__util__/parserOptionsMapper';
import parsers from '../../__util__/helpers/parsers';
import rule from '../../../src/rules/aria-role';
// -----------------------------------------------------------------------------
// Tests
// -----------------------------------------------------------------------------
const ruleTester = new RuleTester();
const errorMessage = {
message: 'Elements with ARIA roles must use a valid, non-abstract ARIA role.',
type: 'JSXAttribute',
};
const roleKeys = roles.keys();
const validRoles = roleKeys.filter((role) => roles.get(role).abstract === false);
const invalidRoles = roleKeys.filter((role) => roles.get(role).abstract === true);
const createTests = (roleNames) => roleNames.map((role) => ({
code: `<div role="${role.toLowerCase()}" />`,
}));
const validTests = createTests(validRoles);
const invalidTests = createTests(invalidRoles).map((test) => {
const invalidTest = { ...test };
invalidTest.errors = [errorMessage];
return invalidTest;
});
const allowedInvalidRoles = [{
allowedInvalidRoles: ['invalid-role', 'other-invalid-role'],
}];
const ignoreNonDOMSchema = [{
ignoreNonDOM: true,
}];
const customDivSettings = {
'jsx-a11y': {
polymorphicPropName: 'asChild',
components: {
Div: 'div',
},
},
};
ruleTester.run('aria-role', rule, {
valid: parsers.all([].concat(
// Variables should pass, as we are only testing literals.
{ code: '<div />' },
{ code: '<div></div>' },
{ code: '<div role={role} />' },
{ code: '<div role={role || "button"} />' },
{ code: '<div role={role || "foobar"} />' },
{ code: '<div role="tabpanel row" />' },
{ code: '<div role="switch" />' },
{ code: '<div role="doc-abstract" />' },
{ code: '<div role="doc-appendix doc-bibliography" />' },
{ code: '<Bar baz />' },
{ code: '<img role="invalid-role" />', options: allowedInvalidRoles },
{ code: '<img role="invalid-role tabpanel" />', options: allowedInvalidRoles },
{ code: '<img role="invalid-role other-invalid-role" />', options: allowedInvalidRoles },
{ code: '<Foo role="bar" />', options: ignoreNonDOMSchema },
{ code: '<fakeDOM role="bar" />', options: ignoreNonDOMSchema },
{ code: '<img role="presentation" />', options: ignoreNonDOMSchema },
{
code: '<Div role="button" />',
settings: customDivSettings,
},
{
code: '<Box asChild="div" role="button" />',
settings: customDivSettings,
},
{ code: '<svg role="graphics-document document" />' },
{ code: '<svg role="img" />' },
)).concat(validTests).map(parserOptionsMapper),
invalid: parsers.all([].concat(
{ code: '<div role="foobar" />', errors: [errorMessage] },
{ code: '<div role="datepicker"></div>', errors: [errorMessage] },
{ code: '<div role="range"></div>', errors: [errorMessage] },
{ code: '<div role="Button"></div>', errors: [errorMessage] },
{ code: '<div role=""></div>', errors: [errorMessage] },
{ code: '<div role="tabpanel row foobar"></div>', errors: [errorMessage] },
{ code: '<div role="tabpanel row range"></div>', errors: [errorMessage] },
{ code: '<div role="doc-endnotes range"></div>', errors: [errorMessage] },
{ code: '<div role />', errors: [errorMessage] },
{ code: '<div role="unknown-invalid-role" />', errors: [errorMessage], options: allowedInvalidRoles },
{ code: '<div role={null}></div>', errors: [errorMessage] },
{ code: '<Foo role="datepicker" />', errors: [errorMessage] },
{ code: '<Foo role="Button" />', errors: [errorMessage] },
{ code: '<Div role="Button" />', errors: [errorMessage], settings: customDivSettings },
{
code: '<Div role="Button" />',
errors: [errorMessage],
options: ignoreNonDOMSchema,
settings: customDivSettings,
},
{
code: '<Box asChild="div" role="Button" />',
settings: customDivSettings,
errors: [errorMessage],
},
)).concat(invalidTests).map(parserOptionsMapper),
});
@@ -0,0 +1,5 @@
# @vitest/mocker
Vitest's module mocker implementation.
[GitHub](https://github.com/vitest-dev/vitest/blob/main/packages/mocker/) | [Documentation](https://github.com/vitest-dev/vitest/blob/main/packages/mocker/EXPORTS.md)
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=buildDeactivationParams.spec.d.ts.map
@@ -0,0 +1,197 @@
export enum GroupNotifyMsgType {
UN_SPECIFIED = 0,
INVITED_BY_MEMBER = 1,
REFUSE_INVITED = 2,
REFUSED_BY_ADMINI_STRATOR = 3,
AGREED_TOJOIN_DIRECT = 4,// 有人接受了邀请入群
INVITED_NEED_ADMINI_STRATOR_PASS = 5,
AGREED_TO_JOIN_BY_ADMINI_STRATOR = 6,
REQUEST_JOIN_NEED_ADMINI_STRATOR_PASS = 7,
SET_ADMIN = 8,
KICK_MEMBER_NOTIFY_ADMIN = 9,
KICK_MEMBER_NOTIFY_KICKED = 10,
MEMBER_LEAVE_NOTIFY_ADMIN = 11,// 主动退出
CANCEL_ADMIN_NOTIFY_CANCELED = 12,
CANCEL_ADMIN_NOTIFY_ADMIN = 13,// 其他人取消管理员
TRANSFER_GROUP_NOTIFY_OLDOWNER = 14,
TRANSFER_GROUP_NOTIFY_ADMIN = 15
}
export interface GroupNotifies {
doubt: boolean;
nextStartSeq: string;
notifies: GroupNotify[];
}
export enum GroupNotifyMsgStatus {
KINIT = 0,// 初始化
KUNHANDLE = 1,// 未处理
KAGREED = 2,// 同意
KREFUSED = 3,// 拒绝
KIGNORED = 4
}
export enum GroupInviteStatus {
INIT = 0,
WAIT_TO_APPROVE = 1,
JOINED = 2,
REFUSED_BY_ADMINI_STRATOR = 3
}
export enum GroupInviteType {
BYBUDDY = 0,
BYGROUPMEMBER = 1,
BYDISCUSSMEMBER = 2
}
export interface ShutUpGroupHonor {
[key: string]: number;
}
export interface ShutUpGroupMember {
uid: string;
qid: string;
uin: string;
nick: string;
remark: string;
cardType: number;
cardName: string;
role: number;
avatarPath: string;
shutUpTime: number;
isDelete: boolean;
isSpecialConcerned: boolean;
isSpecialShield: boolean;
isRobot: boolean;
groupHonor: ShutUpGroupHonor;
memberRealLevel: number;
memberLevel: number;
globalGroupLevel: number;
globalGroupPoint: number;
memberTitleId: number;
memberSpecialTitle: string;
specialTitleExpireTime: string;
userShowFlag: number;
userShowFlagNew: number;
richFlag: number;
mssVipType: number;
bigClubLevel: number;
bigClubFlag: number;
autoRemark: string;
creditLevel: number;
joinTime: number;
lastSpeakTime: number;
memberFlag: number;
memberFlagExt: number;
memberMobileFlag: number;
memberFlagExt2: number;
isSpecialShielded: boolean;
cardNameId: number;
}
export interface GroupNotify {
seq: string;
type: GroupNotifyMsgType;
status: GroupNotifyMsgStatus;
group: {
groupCode: string;
groupName: string;
};
user1: {
uid: string;
nickName: string;
};
user2: {
uid: string;
nickName: string;
};
actionUser: {
uid: string;
nickName: string;
};
actionTime: string;
invitationExt: {
srcType: GroupInviteType;
groupCode: string;
waitStatus: GroupInviteStatus;
};
postscript: string;
repeatSeqs: [];
warningTips: string;
}
export enum NTGroupRequestOperateTypes {
KUNSPECIFIED = 0,
KAGREE = 1,
KREFUSE = 2,
KIGNORE = 3,
KDELETE = 4
}
export enum BuddyReqType {
KMEINITIATOR = 0,
KPEERINITIATOR = 1,
KMEAGREED = 2,
KMEAGREEDANDADDED = 3,
KPEERAGREED = 4,
KPEERAGREEDANDADDED = 5,
KPEERREFUSED = 6,
KMEREFUSED = 7,
KMEIGNORED = 8,
KMEAGREEANYONE = 9,
KMESETQUESTION = 10,
KMEAGREEANDADDFAILED = 11,
KMSGINFO = 12,
KMEINITIATORWAITPEERCONFIRM = 13
}
export interface FriendRequest {
isInitiator?: boolean;
isDecide: boolean;
friendUid: string;
reqType: BuddyReqType;
reqTime: string;
flag?: number;
preGroupingId?: number;
commFriendNum?: number;
extWords: string;
isUnread: boolean;
isDoubt?: boolean;
nameMore?: string;
friendNick: string;
sourceId: number;
groupCode: string;
isBuddy?: boolean;
isAgreed?: boolean;
relation?: number;
}
export interface FriendRequestNotify {
unreadNums: number;
buddyReqs: Friendany[];
}
export enum MemberExtSourceType {
DEFAULTTYPE = 0,
TITLETYPE = 1,
NEWGROUPTYPE = 2
}
export interface GroupExtParam {
groupCode: string;
seq: string;
beginUin: string;
dataTime: string;
uinList: Array<string>;
uinNum: string;
groupType: string;
richCardNameVer: string;
sourceType: MemberExtSourceType;
memberExtFilter: {
memberLevelInfoUin: number;
memberLevelInfoPoint: number;
memberLevelInfoActiveDay: number;
memberLevelInfoLevel: number;
memberLevelInfoName: number;
levelName: number;
dataTime: number;
userShowFlag: number;
sysShowFlag: number;
timeToUpdate: number;
nickName: number;
specialTitle: number;
levelNameNew: number;
userShowFlagNew: number;
msgNeedField: number;
cmdUinFlagExt3Grocery: number;
memberIcon: number;
memberInfoSeq: number;
};
}
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,kBAAkB,CAAC,OAAS,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,WAAW,CAAC;IAC/E,qBAAqB,CAAC,kEAAgD,CAAC;IACvE,UAAU,CAAC,QAAQ,CAAC;IACpB,eAAe,CAAC,wBAAwB,CAAC;IACzC,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,uBAAuB,CAAC;YAAE,KAAK,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,kBAAkB,CAAC;YAAE,OAAO,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,sBAAsB,CAAC;QAAA,GAAG,CAAC,CAAC;IACjP,gBAAgB,CAAC,OAAS,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,WAAW,CAAC;AAC7D","sources":["packages/@react-aria/grid/intl/sl-SI.json"],"sourcesContent":["{\n \"deselectedItem\": \"Element {item} ni izbran.\",\n \"longPressToSelect\": \"Za izbirni način pritisnite in dlje časa držite.\",\n \"select\": \"Izberite\",\n \"selectedAll\": \"Vsi elementi so izbrani.\",\n \"selectedCount\": \"{count, plural, =0 {Noben element ni izbran} one {# element je izbran} other {# elementov je izbranih}}.\",\n \"selectedItem\": \"Element {item} je izbran.\"\n}\n"],"names":[],"version":3,"file":"sl-SI.main.js.map"}
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAO,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,IAAA,aAAK,EAAC,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;AAnBY,QAAA,QAAQ,YAmBpB;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;AAEM,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;AA/CY,QAAA,KAAK,SA+CjB","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 @@
{"mappings":"AAAA,iBAAiB;IAAG,eAAe,CAAC,gBAAgB,CAAC;AACrD","sources":["packages/@react-aria/breadcrumbs/intl/nb-NO.json"],"sourcesContent":["{\n \"breadcrumbs\": \"Navigasjonsstier\"\n}\n"],"names":[],"version":3,"file":"nb-NO.main.js.map"}
@@ -0,0 +1,235 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// 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.
'use strict';
var tape = require('tape');
var path = require('../');
var winPaths = [
// [path, root]
['C:\\path\\dir\\index.html', 'C:\\'],
['C:\\another_path\\DIR\\1\\2\\33\\\\index', 'C:\\'],
['another_path\\DIR with spaces\\1\\2\\33\\index', ''],
['\\', '\\'],
['\\foo\\C:', '\\'],
['file', ''],
['file:stream', ''],
['.\\file', ''],
['C:', 'C:'],
['C:.', 'C:'],
['C:..', 'C:'],
['C:abc', 'C:'],
['C:\\', 'C:\\'],
['C:\\abc', 'C:\\' ],
['', ''],
// unc
['\\\\server\\share\\file_path', '\\\\server\\share\\'],
['\\\\server two\\shared folder\\file path.zip',
'\\\\server two\\shared folder\\'],
['\\\\teela\\admin$\\system32', '\\\\teela\\admin$\\'],
['\\\\?\\UNC\\server\\share', '\\\\?\\UNC\\']
];
var winSpecialCaseParseTests = [
['/foo/bar', { root: '/' }],
];
var winSpecialCaseFormatTests = [
[{ dir: 'some\\dir' }, 'some\\dir\\'],
[{ base: 'index.html' }, 'index.html'],
[{ root: 'C:\\' }, 'C:\\'],
[{ name: 'index', ext: '.html' }, 'index.html'],
[{ dir: 'some\\dir', name: 'index', ext: '.html' }, 'some\\dir\\index.html'],
[{ root: 'C:\\', name: 'index', ext: '.html' }, 'C:\\index.html'],
[{}, '']
];
var unixPaths = [
// [path, root]
['/home/user/dir/file.txt', '/'],
['/home/user/a dir/another File.zip', '/'],
['/home/user/a dir//another&File.', '/'],
['/home/user/a$$$dir//another File.zip', '/'],
['user/dir/another File.zip', ''],
['file', ''],
['.\\file', ''],
['./file', ''],
['C:\\foo', ''],
['/', '/'],
['', ''],
['.', ''],
['..', ''],
['/foo', '/'],
['/foo.', '/'],
['/foo.bar', '/'],
['/.', '/'],
['/.foo', '/'],
['/.foo.bar', '/'],
['/foo/bar.baz', '/']
];
var unixSpecialCaseFormatTests = [
[{ dir: 'some/dir' }, 'some/dir/'],
[{ base: 'index.html' }, 'index.html'],
[{ root: '/' }, '/'],
[{ name: 'index', ext: '.html' }, 'index.html'],
[{ dir: 'some/dir', name: 'index', ext: '.html' }, 'some/dir/index.html'],
[{ root: '/', name: 'index', ext: '.html' }, '/index.html'],
[{}, '']
];
var errors = [
{ method: 'parse', input: [null], message: TypeError },
{ method: 'parse', input: [{}], message: TypeError },
{ method: 'parse', input: [true], message: TypeError },
{ method: 'parse', input: [1], message: TypeError },
{ method: 'parse', input: [], message: TypeError },
{ method: 'format', input: [null], message: TypeError },
{ method: 'format', input: [''], message: TypeError },
{ method: 'format', input: [true], message: TypeError },
{ method: 'format', input: [1], message: TypeError },
];
tape('path.win32.parse', { skip: true }, function (t) {
checkParseFormat(t, path.win32, winPaths);
checkSpecialCaseParseFormat(t, path.win32, winSpecialCaseParseTests);
t.end();
});
tape('path.posix.parse', function (t) {
checkParseFormat(t, path.posix, unixPaths);
t.end();
});
tape('path.win32.parse errors', { skip: true }, function (t) {
checkErrors(t, path.win32);
t.end();
});
tape('path.posix.parse errors', function (t) {
checkErrors(t, path.posix);
t.end();
});
tape('path.win32.format', { skip: true }, function (t) {
checkFormat(t, path.win32, winSpecialCaseFormatTests);
t.end();
});
tape('path.posix.format', function (t) {
checkFormat(t, path.posix, unixSpecialCaseFormatTests);
t.end();
});
// Test removal of trailing path separators
var windowsTrailingTests =
[['.\\', { root: '', dir: '', base: '.', ext: '', name: '.' }],
['\\\\', { root: '\\', dir: '\\', base: '', ext: '', name: '' }],
['\\\\', { root: '\\', dir: '\\', base: '', ext: '', name: '' }],
['c:\\foo\\\\\\',
{ root: 'c:\\', dir: 'c:\\', base: 'foo', ext: '', name: 'foo' }],
['D:\\foo\\\\\\bar.baz',
{ root: 'D:\\',
dir: 'D:\\foo\\\\',
base: 'bar.baz',
ext: '.baz',
name: 'bar'
}
]
];
var posixTrailingTests =
[['./', { root: '', dir: '', base: '.', ext: '', name: '.' }],
['//', { root: '/', dir: '/', base: '', ext: '', name: '' }],
['///', { root: '/', dir: '/', base: '', ext: '', name: '' }],
['/foo///', { root: '/', dir: '/', base: 'foo', ext: '', name: 'foo' }],
['/foo///bar.baz',
{ root: '/', dir: '/foo//', base: 'bar.baz', ext: '.baz', name: 'bar' }
]
];
tape('path.win32.parse trailing', { skip: true }, function (t) {
windowsTrailingTests.forEach(function (p) {
var actual = path.win32.parse(p[0]);
var expected = p[1];
t.deepEqual(actual, expected)
});
t.end();
});
tape('path.posix.parse trailing', function (t) {
posixTrailingTests.forEach(function (p) {
var actual = path.posix.parse(p[0]);
var expected = p[1];
t.deepEqual(actual, expected)
});
t.end();
});
function checkErrors(t, path) {
errors.forEach(function(errorCase) {
t.throws(function () {
path[errorCase.method].apply(path, errorCase.input);
}, errorCase.message);
});
}
function checkParseFormat(t, path, paths) {
paths.forEach(function(p) {
var element = p[0];
var root = p[1];
var output = path.parse(element);
t.strictEqual(typeof output.root, 'string');
t.strictEqual(typeof output.dir, 'string');
t.strictEqual(typeof output.base, 'string');
t.strictEqual(typeof output.ext, 'string');
t.strictEqual(typeof output.name, 'string');
t.strictEqual(path.format(output), element);
t.strictEqual(output.root, root);
t.ok(output.dir.startsWith(output.root));
t.strictEqual(output.dir, output.dir ? path.dirname(element) : '');
t.strictEqual(output.base, path.basename(element));
t.strictEqual(output.ext, path.extname(element));
});
}
function checkSpecialCaseParseFormat(t, path, testCases) {
testCases.forEach(function(testCase) {
var element = testCase[0];
var expect = testCase[1];
var output = path.parse(element);
Object.keys(expect).forEach(function(key) {
t.strictEqual(output[key], expect[key]);
});
});
}
function checkFormat(t, path, testCases) {
testCases.forEach(function(testCase) {
t.strictEqual(path.format(testCase[0]), testCase[1]);
});
[null, undefined, 1, true, false, 'string'].forEach(function (pathObject) {
t.throws(function() {
path.format(pathObject);
}, /The "pathObject" argument must be of type Object. Received type (\w+)/);
});
}
@@ -0,0 +1 @@
{"version":3,"file":"getOwnReflectMetadata.spec.d.ts","sourceRoot":"","sources":["../../../../src/reflectMetadata/utils/getOwnReflectMetadata.spec.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,CAAC"}
@@ -0,0 +1,77 @@
// src/utils/variants.ts
var solid = {
default: "bg-default text-default-foreground",
primary: "bg-primary text-primary-foreground",
secondary: "bg-secondary text-secondary-foreground",
success: "bg-success text-success-foreground",
warning: "bg-warning text-warning-foreground",
danger: "bg-danger text-danger-foreground",
foreground: "bg-foreground text-background"
};
var shadow = {
default: "shadow-lg shadow-default/50 bg-default text-default-foreground",
primary: "shadow-lg shadow-primary/40 bg-primary text-primary-foreground",
secondary: "shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",
success: "shadow-lg shadow-success/40 bg-success text-success-foreground",
warning: "shadow-lg shadow-warning/40 bg-warning text-warning-foreground",
danger: "shadow-lg shadow-danger/40 bg-danger text-danger-foreground",
foreground: "shadow-lg shadow-foreground/40 bg-foreground text-background"
};
var bordered = {
default: "bg-transparent border-default text-foreground",
primary: "bg-transparent border-primary text-primary",
secondary: "bg-transparent border-secondary text-secondary",
success: "bg-transparent border-success text-success",
warning: "bg-transparent border-warning text-warning",
danger: "bg-transparent border-danger text-danger",
foreground: "bg-transparent border-foreground text-foreground"
};
var flat = {
default: "bg-default/40 text-default-700",
primary: "bg-primary/20 text-primary-600",
secondary: "bg-secondary/20 text-secondary-600",
success: "bg-success/20 text-success-700 dark:text-success",
warning: "bg-warning/20 text-warning-700 dark:text-warning",
danger: "bg-danger/20 text-danger-600 dark:text-danger-500",
foreground: "bg-foreground/10 text-foreground"
};
var faded = {
default: "border-default bg-default-100 text-default-foreground",
primary: "border-default bg-default-100 text-primary",
secondary: "border-default bg-default-100 text-secondary",
success: "border-default bg-default-100 text-success",
warning: "border-default bg-default-100 text-warning",
danger: "border-default bg-default-100 text-danger",
foreground: "border-default bg-default-100 text-foreground"
};
var light = {
default: "bg-transparent text-default-foreground",
primary: "bg-transparent text-primary",
secondary: "bg-transparent text-secondary",
success: "bg-transparent text-success",
warning: "bg-transparent text-warning",
danger: "bg-transparent text-danger",
foreground: "bg-transparent text-foreground"
};
var ghost = {
default: "border-default text-default-foreground",
primary: "border-primary text-primary",
secondary: "border-secondary text-secondary",
success: "border-success text-success",
warning: "border-warning text-warning",
danger: "border-danger text-danger",
foreground: "border-foreground text-foreground hover:!bg-foreground"
};
var colorVariants = {
solid,
shadow,
bordered,
flat,
faded,
light,
ghost
};
export {
colorVariants
};
@@ -0,0 +1,42 @@
{
"name": "content-type",
"description": "Create and parse HTTP Content-Type header",
"version": "1.0.5",
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
"license": "MIT",
"keywords": [
"content-type",
"http",
"req",
"res",
"rfc7231"
],
"repository": "jshttp/content-type",
"devDependencies": {
"deep-equal": "1.0.1",
"eslint": "8.32.0",
"eslint-config-standard": "15.0.1",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-standard": "4.1.0",
"mocha": "10.2.0",
"nyc": "15.1.0"
},
"files": [
"LICENSE",
"HISTORY.md",
"README.md",
"index.js"
],
"engines": {
"node": ">= 0.6"
},
"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec --check-leaks --bail test/",
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test",
"version": "node scripts/version-history.js && git add HISTORY.md"
}
}
@@ -0,0 +1,4 @@
export declare type Coordinates = {
x: number;
y: number;
};
@@ -0,0 +1,18 @@
'use strict';
var define = require('define-properties');
var callBind = require('call-bind');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var flagsBound = callBind(getPolyfill());
define(flagsBound, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = flagsBound;
@@ -0,0 +1,26 @@
/*
* Copyright 2024 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {isScrollable} from './isScrollable';
export function getScrollParents(node: Element, checkForOverflow?: boolean): Element[] {
const scrollParents: Element[] = [];
while (node && node !== document.documentElement) {
if (isScrollable(node, checkForOverflow)) {
scrollParents.push(node);
}
node = node.parentElement as Element;
}
return scrollParents;
}
@@ -0,0 +1,3 @@
import { MetadataName } from '../models/MetadataName';
export declare function named(name: MetadataName): MethodDecorator & ParameterDecorator & PropertyDecorator;
//# sourceMappingURL=named.d.ts.map
@@ -0,0 +1,30 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { Range } = require("semver")
const cache = new Map()
/**
* Get the `semver.Range` object of a given range text.
* @param {string} x The text expression for a semver range.
* @returns {Range|null} The range object of a given range text.
* It's null if the `x` is not a valid range text.
*/
module.exports = function getSemverRange(x) {
const s = String(x)
let ret = cache.get(s) || null
if (!ret) {
try {
ret = new Range(s)
} catch (_error) {
// Ignore parsing error.
}
cache.set(s, ret)
}
return ret
}
@@ -0,0 +1,98 @@
import type { MutableRefObject } from 'react';
import type { DeepRequired } from '@dnd-kit/utilities';
import type { SyntheticListeners } from '../hooks/utilities';
import type { Collision } from '../utilities/algorithms';
import type { MeasuringConfiguration } from '../components';
import type { Coordinates, ClientRect, UniqueIdentifier } from '../types';
import type { Actions } from './actions';
import type { DroppableContainersMap } from './constructors';
export interface DraggableElement {
node: DraggableNode;
id: UniqueIdentifier;
index: number;
collection: string;
disabled: boolean;
}
declare type AnyData = Record<string, any>;
export declare type Data<T = AnyData> = T & AnyData;
export declare type DataRef<T = AnyData> = MutableRefObject<Data<T> | undefined>;
export interface DroppableContainer {
id: UniqueIdentifier;
key: UniqueIdentifier;
data: DataRef;
disabled: boolean;
node: MutableRefObject<HTMLElement | null>;
rect: MutableRefObject<ClientRect | null>;
}
export interface Active {
id: UniqueIdentifier;
data: DataRef;
rect: MutableRefObject<{
initial: ClientRect | null;
translated: ClientRect | null;
}>;
}
export interface Over {
id: UniqueIdentifier;
rect: ClientRect;
disabled: boolean;
data: DataRef;
}
export declare type DraggableNode = {
id: UniqueIdentifier;
key: UniqueIdentifier;
node: MutableRefObject<HTMLElement | null>;
activatorNode: MutableRefObject<HTMLElement | null>;
data: DataRef;
};
export declare type DraggableNodes = Map<UniqueIdentifier, DraggableNode | undefined>;
export declare type DroppableContainers = DroppableContainersMap;
export declare type RectMap = Map<UniqueIdentifier, ClientRect>;
export interface State {
droppable: {
containers: DroppableContainers;
};
draggable: {
active: UniqueIdentifier | null;
initialCoordinates: Coordinates;
nodes: DraggableNodes;
translate: Coordinates;
};
}
export interface PublicContextDescriptor {
activatorEvent: Event | null;
active: Active | null;
activeNode: HTMLElement | null;
activeNodeRect: ClientRect | null;
collisions: Collision[] | null;
containerNodeRect: ClientRect | null;
draggableNodes: DraggableNodes;
droppableContainers: DroppableContainers;
droppableRects: RectMap;
over: Over | null;
dragOverlay: {
nodeRef: MutableRefObject<HTMLElement | null>;
rect: ClientRect | null;
setRef: (element: HTMLElement | null) => void;
};
scrollableAncestors: Element[];
scrollableAncestorRects: ClientRect[];
measuringConfiguration: DeepRequired<MeasuringConfiguration>;
measureDroppableContainers(ids: UniqueIdentifier[]): void;
measuringScheduled: boolean;
windowRect: ClientRect | null;
}
export interface InternalContextDescriptor {
activatorEvent: Event | null;
activators: SyntheticListeners;
active: Active | null;
activeNodeRect: ClientRect | null;
ariaDescribedById: {
draggable: string;
};
dispatch: React.Dispatch<Actions>;
draggableNodes: DraggableNodes;
over: Over | null;
measureDroppableContainers(ids: UniqueIdentifier[]): void;
}
export {};
@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.handlePlanError = handlePlanError;
const common_1 = require("@inversifyjs/common");
const isStackOverflowError_1 = require("../../error/calculations/isStackOverflowError");
const InversifyCoreError_1 = require("../../error/models/InversifyCoreError");
const InversifyCoreErrorKind_1 = require("../../error/models/InversifyCoreErrorKind");
/**
* Extracts a likely circular dependency asuming a service asociated to a
* service identifier should not be asociated to services asociated to the same
* service identifier.
*
* Important note: given the current binding constraints, there's no way to know
* which is exactly the circular dependency. Custom ancestor based constraints might
* allow circular dependencies breaking the loop when a certain condition is met.
*
* @param params plan params
*/
function extractLikelyCircularDependency(params) {
const serviceIdentifiers = new Set();
for (const serviceIdentifier of params.servicesBranch) {
if (serviceIdentifiers.has(serviceIdentifier)) {
return [...serviceIdentifiers, serviceIdentifier];
}
serviceIdentifiers.add(serviceIdentifier);
}
return [...serviceIdentifiers];
}
function handlePlanError(params, error) {
if ((0, isStackOverflowError_1.isStackOverflowError)(error)) {
const stringifiedCircularDependencies = stringifyServiceIdentifierTrace(extractLikelyCircularDependency(params));
throw new InversifyCoreError_1.InversifyCoreError(InversifyCoreErrorKind_1.InversifyCoreErrorKind.planning, `Circular dependency found: ${stringifiedCircularDependencies}`, { cause: error });
}
throw error;
}
function stringifyServiceIdentifierTrace(serviceIdentifiers) {
const serviceIdentifiersArray = [...serviceIdentifiers];
if (serviceIdentifiersArray.length === 0) {
return '(No dependency trace)';
}
return serviceIdentifiersArray.map(common_1.stringifyServiceIdentifier).join(' -> ');
}
//# sourceMappingURL=handlePlanError.js.map
@@ -0,0 +1,3 @@
declare function isInteger(argument: unknown): argument is number;
export = isInteger;
@@ -0,0 +1,826 @@
flf2a$ 8 6 15 -1 9
nancyj-improved.flf
named after the login of a woman who asked me to make her a
sig. this is the font that came out of it. this is my first
attempt at a figlet font, so leave me alone.
vampyr@acs.bu.edu
$$ @
$$ @
$$ @
$$ @
$$ @
$$ @
$$ @
$$ @@
dP @
88 @
88 @
dP @
@
oo @
@
@@
dP dP @
dP dP @
@
@
@
@
@
@@
@
dP dP @
8888888 @
88 88 @
8888888 @
dP dP @
@
@@
# # @
.d8888P' @
Y8#oo#o. @
# #88 @
`88888P' @
# # @
@
@@
d8P dP @
8 8 d8' @
Y8P d8' @
d8' d8P @
d8' 8 8 @
88 Y8P @
@
@@
d88b @
8`'8 @
d8b @
d8P`8b @
d8' `8bP @
`888P'`YP @
@
@@
d8 @
88 @
.P @
@
@
@
@
@@
a88P @
d8' @
88 @
88 @
Y8. @
Y88b @
@
@@
Y88o @
`8b @
88 @
88 @
.8P @
d88Y @
@
@@
dP @
8b. 88 .d8 @
`8b88d8' @
.8P88Y8. @
8P' 88 `Y8 @
dP @
@
@@
@
dP @
88 @
88888888 @
88 @
dP @
@
@@
@
@
@
@
dP @
88 @
.P @
@@
@
@
@
88888888 @
@
@
@
@@
@
@
@
@
dP @
88 @
@
@@
d8' @
d8' @
d8' @
d8' @
d8' @
88 @
@
@@
a8888a @
d8' ..8b @
88 .P 88 @
88 d' 88 @
Y8'' .8P @
Y8888P @
@
@@
d88 @
88 @
88 @
88 @
88 @
d88P @
@
@@
d8888b. @
`88 @
.aaadP' @
88' @
88. @
Y88888P @
@
@@
d8888b. @
`88 @
aaad8' @
`88 @
.88 @
d88888P @
@
@@
dP dP @
88 88 @
88aaa88 @
88 @
88 @
dP @
@
@@
888888P @
88' @
88baaa. @
`88 @
88 @
d88888P @
@
@@
.d8888P @
88' @
88baaa. @
88` `88 @
8b. .d8 @
`Y888P' @
@
@@
d88888P @
d8' @
d8' @
d8' @
d8' @
d8' @
@
@@
.d888b. @
Y8' `8P @
d8bad8b @
88` `88 @
8b. .88 @
Y88888P @
@
@@
.d888b. @
Y8' `88 @
`8bad88 @
`88 @
d. .88 @
`8888P @
@
@@
dP @
88 @
@
@
dP @
88 @
@
@@
dP @
88 @
@
@
dP @
88 @
.P @
@@
d8 @
d8' @
d8' @
Y8. @
Y8. @
Y8 @
@
@@
@
@
aaaaaaaa @
@
88888888 @
@
@
@@
8b @
`8b @
`8b @
.8P @
.8P @
8P @
@
@@
.d8888ba @
`8' `8b @
.d8' @
d8P' @
"" @
oo @
@
@@
a88888b. @
d8' `88 @
88 d8P 88 @
88 Yo8b88 @
Y8. @
Y88888P' @
@
@@
.d888888 @
d8' 88 @
88aaaaa88a @
88 88 @
88 88 @
88 88 @
@
@@
888888ba @
88 `8b @
a88aaaa8P' @
88 `8b. @
88 .88 @
88888888P @
@
@@
a88888b. @
d8' `88 @
88 @
88 @
Y8. .88 @
Y88888P' @
@
@@
888888ba @
88 `8b @
88 88 @
88 88 @
88 .8P @
8888888P @
@
@@
88888888b @
88 @
a88aaaa @
88 @
88 @
88888888P @
@
@@
88888888b @
88 @
a88aaaa @
88 @
88 @
dP @
@
@@
.88888. @
d8' `88 @
88 @
88 YP88 @
Y8. .88 @
`88888' @
@
@@
dP dP @
88 88 @
88aaaaa88a @
88 88 @
88 88 @
dP dP @
@
@@
dP @
88 @
88 @
88 @
88 @
dP @
@
@@
dP @
88 @
88 @
88 @
88. .d8P @
`Y8888' @
@
@@
dP dP @
88 .d8' @
88aaa8P' @
88 `8b. @
88 88 @
dP dP @
@
@@
dP @
88 @
88 @
88 @
88 @
88888888P @
@
@@
8888ba.88ba @
88 `8b `8b @
88 88 88 @
88 88 88 @
88 88 88 @
dP dP dP @
@
@@
888888ba @
88 `8b @
88 88 @
88 88 @
88 88 @
dP dP @
@
@@
.88888. @
d8' `8b @
88 88 @
88 88 @
Y8. .8P @
`8888P' @
@
@@
888888ba @
88 `8b @
a88aaaa8P' @
88 @
88 @
dP @
@
@@
.88888. @
d8' `8b @
88 88 @
88 db 88 @
Y8. Y88P @
`8888PY8b @
@
@@
888888ba @
88 `8b @
a88aaaa8P' @
88 `8b. @
88 88 @
dP dP @
@
@@
.d88888b @
88. "' @
`Y88888b. @
`8b @
d8' .8P @
Y88888P @
@
@@
d888888P @
88 @
88 @
88 @
88 @
dP @
@
@@
dP dP @
88 88 @
88 88 @
88 88 @
Y8. .8P @
`Y88888P' @
@
@@
dP dP @
88 88 @
88 .8P @
88 d8' @
88 .d8P @
888888' @
@
@@
dP dP dP @
88 88 88 @
88 .8P .8P @
88 d8' d8' @
88.d8P8.d8P @
8888' Y88' @
@
@@
dP dP @
Y8. .8P @
Y8aa8P @
d8' `8b @
88 88 @
dP dP @
@
@@
dP dP @
Y8. .8P @
Y8aa8P @
88 @
88 @
dP @
@
@@
d8888888P @
.d8' @
.d8' @
.d8' @
d8' @
Y8888888P @
@
@@
8888P @
88 @
88 @
88 @
88 @
88888 @
@
@@
Yb @
`Yb @
`Yb @
`Yb @
`Yb @
88 @
@
@@
d8888 @
88 @
88 @
88 @
88 @
88888 @
@
@@
db @
d8'`8b @
`" "' @
@
@
@
@
@@
@
@
@
@
@
@
oooooooooooo @
@@
dP @
88 @
Y. @
@
@
@
@
@@
@
@
.d8888b. @
88' `88 @
88. .88 @
`88888P8 @
@
@@
dP @
88 @
88d888b. @
88' `88 @
88. .88 @
88Y8888' @
@
@@
@
@
.d8888b. @
88' `"" @
88. ... @
`88888P' @
@
@@
dP @
88 @
.d888b88 @
88' `88 @
88. .88 @
`88888P8 @
@
@@
@
@
.d8888b. @
88ooood8 @
88. ... @
`88888P' @
@
@@
.8888b @
88 " @
88aaa @
88 @
88 @
dP @
@
@@
@
@
.d8888b. @
88' `88 @
88. .88 @
`8888P88 @
.88 @
d8888P @@
dP @
88 @
88d888b. @
88' `88 @
88 88 @
dP dP @
@
@@
oo @
@
dP @
88 @
88 @
dP @
@
@@
oo @
@
dP @
88 @
88 @
88 @
88 @
dP @@
dP @
88 @
88 .dP @
88888" @
88 `8b. @
dP `YP @
@
@@
dP @
88 @
88 @
88 @
88 @
dP @
@
@@
@
@
88d8b.d8b. @
88'`88'`88 @
88 88 88 @
dP dP dP @
@
@@
@
@
88d888b. @
88' `88 @
88 88 @
dP dP @
@
@@
@
@
.d8888b. @
88' `88 @
88. .88 @
`88888P' @
@
@@
@
@
88d888b. @
88' `88 @
88. .88 @
88Y888P' @
88 @
dP @@
@
@
.d8888b. @
88' `88 @
88. .88 @
`8888P88 @
88 @
dP @@
@
@
88d888b. @
88' `88 @
88 @
dP @
@
@@
@
@
.d8888b. @
Y8ooooo. @
88 @
`88888P' @
@
@@
dP @
88 @
d8888P @
88 @
88 @
dP @
@
@@
@
@
dP dP @
88 88 @
88. .88 @
`88888P' @
@
@@
@
@
dP .dP @
88 d8' @
88 .88' @
8888P' @
@
@@
@
@
dP dP dP @
88 88 88 @
88.88b.88' @
8888P Y8P @
@
@@
@
@
dP. .dP @
`8bd8' @
.d88b. @
dP' `dP @
@
@@
@
@
dP dP @
88 88 @
88. .88 @
`8888P88 @
.88 @
d8888P @@
@
@
d888888b @
.d8P' @
.Y8P @
d888888P @
@
@@
.d88P @
8: @
.oY8. @
d8 @
8: @
`Y88b @
@
@@
dP @
88 @
"' @
dP @
88 @
"' @
@
@@
d88b. @
:8 @
.8Yo. @
8b @
:8 @
Y88P' @
@
@@
.oo. .d @
dP" "d8P @
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@@ -0,0 +1,124 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
interface Colors {
comment: {
close: string;
open: string;
};
content: {
close: string;
open: string;
};
prop: {
close: string;
open: string;
};
tag: {
close: string;
open: string;
};
value: {
close: string;
open: string;
};
}
type Indent = (arg0: string) => string;
type Refs = Array<unknown>;
type Print = (arg0: unknown) => string;
type Theme = Required<{
comment?: string;
content?: string;
prop?: string;
tag?: string;
value?: string;
}>;
/**
* compare function used when sorting object keys, `null` can be used to skip over sorting.
*/
type CompareKeys = ((a: string, b: string) => number) | null | undefined;
type RequiredOptions = Required<PrettyFormatOptions>;
interface Options extends Omit<RequiredOptions, "compareKeys" | "theme"> {
compareKeys: CompareKeys;
theme: Theme;
}
interface PrettyFormatOptions {
callToJSON?: boolean;
escapeRegex?: boolean;
escapeString?: boolean;
highlight?: boolean;
indent?: number;
maxDepth?: number;
maxWidth?: number;
min?: boolean;
printBasicPrototype?: boolean;
printFunctionName?: boolean;
printShadowRoot?: boolean;
compareKeys?: CompareKeys;
plugins?: Plugins;
}
type OptionsReceived = PrettyFormatOptions;
interface Config {
callToJSON: boolean;
compareKeys: CompareKeys;
colors: Colors;
escapeRegex: boolean;
escapeString: boolean;
indent: string;
maxDepth: number;
maxWidth: number;
min: boolean;
plugins: Plugins;
printBasicPrototype: boolean;
printFunctionName: boolean;
printShadowRoot: boolean;
spacingInner: string;
spacingOuter: string;
}
type Printer = (val: unknown, config: Config, indentation: string, depth: number, refs: Refs, hasCalledToJSON?: boolean) => string;
type Test = (arg0: any) => boolean;
interface NewPlugin {
serialize: (val: any, config: Config, indentation: string, depth: number, refs: Refs, printer: Printer) => string;
test: Test;
}
interface PluginOptions {
edgeSpacing: string;
min: boolean;
spacing: string;
}
interface OldPlugin {
print: (val: unknown, print: Print, indent: Indent, options: PluginOptions, colors: Colors) => string;
test: Test;
}
type Plugin = NewPlugin | OldPlugin;
type Plugins = Array<Plugin>;
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
declare const DEFAULT_OPTIONS: Options;
/**
* Returns a presentation string of your `val` object
* @param val any potential JavaScript object
* @param options Custom settings
*/
declare function format(val: unknown, options?: OptionsReceived): string;
declare const plugins: {
AsymmetricMatcher: NewPlugin;
DOMCollection: NewPlugin;
DOMElement: NewPlugin;
Immutable: NewPlugin;
ReactElement: NewPlugin;
ReactTestComponent: NewPlugin;
Error: NewPlugin;
};
export { DEFAULT_OPTIONS, format, plugins };
export type { Colors, CompareKeys, Config, NewPlugin, OldPlugin, Options, OptionsReceived, Plugin, Plugins, PrettyFormatOptions, Printer, Refs, Theme };
@@ -0,0 +1,194 @@
import {nodeContains as $d4ee10de306f2510$export$4282f70798064fe0} from "./DOMFunctions.module.js";
import {shadowDOM as $bJKXg$shadowDOM} from "@react-stately/flags";
// https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/ShadowTreeWalker.ts
class $dfc540311bf7f109$export$63eb3ababa9c55c4 {
get currentNode() {
return this._currentNode;
}
set currentNode(node) {
if (!(0, $d4ee10de306f2510$export$4282f70798064fe0)(this.root, node)) throw new Error('Cannot set currentNode to a node that is not contained by the root node.');
const walkers = [];
let curNode = node;
let currentWalkerCurrentNode = node;
this._currentNode = node;
while(curNode && curNode !== this.root)if (curNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
const shadowRoot = curNode;
const walker = this._doc.createTreeWalker(shadowRoot, this.whatToShow, {
acceptNode: this._acceptNode
});
walkers.push(walker);
walker.currentNode = currentWalkerCurrentNode;
this._currentSetFor.add(walker);
curNode = currentWalkerCurrentNode = shadowRoot.host;
} else curNode = curNode.parentNode;
const walker = this._doc.createTreeWalker(this.root, this.whatToShow, {
acceptNode: this._acceptNode
});
walkers.push(walker);
walker.currentNode = currentWalkerCurrentNode;
this._currentSetFor.add(walker);
this._walkerStack = walkers;
}
get doc() {
return this._doc;
}
firstChild() {
let currentNode = this.currentNode;
let newNode = this.nextNode();
if (!(0, $d4ee10de306f2510$export$4282f70798064fe0)(currentNode, newNode)) {
this.currentNode = currentNode;
return null;
}
if (newNode) this.currentNode = newNode;
return newNode;
}
lastChild() {
let walker = this._walkerStack[0];
let newNode = walker.lastChild();
if (newNode) this.currentNode = newNode;
return newNode;
}
nextNode() {
const nextNode = this._walkerStack[0].nextNode();
if (nextNode) {
const shadowRoot = nextNode.shadowRoot;
if (shadowRoot) {
var _this_filter;
let nodeResult;
if (typeof this.filter === 'function') nodeResult = this.filter(nextNode);
else if ((_this_filter = this.filter) === null || _this_filter === void 0 ? void 0 : _this_filter.acceptNode) nodeResult = this.filter.acceptNode(nextNode);
if (nodeResult === NodeFilter.FILTER_ACCEPT) {
this.currentNode = nextNode;
return nextNode;
}
// _acceptNode should have added new walker for this shadow,
// go in recursively.
let newNode = this.nextNode();
if (newNode) this.currentNode = newNode;
return newNode;
}
if (nextNode) this.currentNode = nextNode;
return nextNode;
} else {
if (this._walkerStack.length > 1) {
this._walkerStack.shift();
let newNode = this.nextNode();
if (newNode) this.currentNode = newNode;
return newNode;
} else return null;
}
}
previousNode() {
const currentWalker = this._walkerStack[0];
if (currentWalker.currentNode === currentWalker.root) {
if (this._currentSetFor.has(currentWalker)) {
this._currentSetFor.delete(currentWalker);
if (this._walkerStack.length > 1) {
this._walkerStack.shift();
let newNode = this.previousNode();
if (newNode) this.currentNode = newNode;
return newNode;
} else return null;
}
return null;
}
const previousNode = currentWalker.previousNode();
if (previousNode) {
const shadowRoot = previousNode.shadowRoot;
if (shadowRoot) {
var _this_filter;
let nodeResult;
if (typeof this.filter === 'function') nodeResult = this.filter(previousNode);
else if ((_this_filter = this.filter) === null || _this_filter === void 0 ? void 0 : _this_filter.acceptNode) nodeResult = this.filter.acceptNode(previousNode);
if (nodeResult === NodeFilter.FILTER_ACCEPT) {
if (previousNode) this.currentNode = previousNode;
return previousNode;
}
// _acceptNode should have added new walker for this shadow,
// go in recursively.
let newNode = this.lastChild();
if (newNode) this.currentNode = newNode;
return newNode;
}
if (previousNode) this.currentNode = previousNode;
return previousNode;
} else {
if (this._walkerStack.length > 1) {
this._walkerStack.shift();
let newNode = this.previousNode();
if (newNode) this.currentNode = newNode;
return newNode;
} else return null;
}
}
/**
* @deprecated
*/ nextSibling() {
// if (__DEV__) {
// throw new Error("Method not implemented.");
// }
return null;
}
/**
* @deprecated
*/ previousSibling() {
// if (__DEV__) {
// throw new Error("Method not implemented.");
// }
return null;
}
/**
* @deprecated
*/ parentNode() {
// if (__DEV__) {
// throw new Error("Method not implemented.");
// }
return null;
}
constructor(doc, root, whatToShow, filter){
this._walkerStack = [];
this._currentSetFor = new Set();
this._acceptNode = (node)=>{
if (node.nodeType === Node.ELEMENT_NODE) {
const shadowRoot = node.shadowRoot;
if (shadowRoot) {
const walker = this._doc.createTreeWalker(shadowRoot, this.whatToShow, {
acceptNode: this._acceptNode
});
this._walkerStack.unshift(walker);
return NodeFilter.FILTER_ACCEPT;
} else {
var _this_filter;
if (typeof this.filter === 'function') return this.filter(node);
else if ((_this_filter = this.filter) === null || _this_filter === void 0 ? void 0 : _this_filter.acceptNode) return this.filter.acceptNode(node);
else if (this.filter === null) return NodeFilter.FILTER_ACCEPT;
}
}
return NodeFilter.FILTER_SKIP;
};
this._doc = doc;
this.root = root;
this.filter = filter !== null && filter !== void 0 ? filter : null;
this.whatToShow = whatToShow !== null && whatToShow !== void 0 ? whatToShow : NodeFilter.SHOW_ALL;
this._currentNode = root;
this._walkerStack.unshift(doc.createTreeWalker(root, whatToShow, this._acceptNode));
const shadowRoot = root.shadowRoot;
if (shadowRoot) {
const walker = this._doc.createTreeWalker(shadowRoot, this.whatToShow, {
acceptNode: this._acceptNode
});
this._walkerStack.unshift(walker);
}
}
}
function $dfc540311bf7f109$export$4d0f8be8b12a7ef6(doc, root, whatToShow, filter) {
if ((0, $bJKXg$shadowDOM)()) return new $dfc540311bf7f109$export$63eb3ababa9c55c4(doc, root, whatToShow, filter);
return doc.createTreeWalker(root, whatToShow, filter);
}
export {$dfc540311bf7f109$export$63eb3ababa9c55c4 as ShadowTreeWalker, $dfc540311bf7f109$export$4d0f8be8b12a7ef6 as createShadowTreeWalker};
//# sourceMappingURL=ShadowTreeWalker.module.js.map
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAOM,SAAS,0CAAa,GAAG,IAAqE;IACnG,IAAI,KAAK,MAAM,KAAK,KAAK,IAAI,CAAC,EAAE,EAC9B,OAAO,IAAI,CAAC,EAAE;IAGhB,OAAO,CAAC;QACN,KAAK,IAAI,OAAO,KAAM;YACpB,IAAI,OAAO,QAAQ,YACjB,IAAI;iBACC,IAAI,OAAO,MAChB,IAAI,OAAO,GAAG;QAElB;IACF;AACF","sources":["packages/@react-aria/utils/src/mergeRefs.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 {ForwardedRef, MutableRefObject} from 'react';\n\n/**\n * Merges multiple refs into one. Works with either callback or object refs.\n */\nexport function mergeRefs<T>(...refs: Array<ForwardedRef<T> | MutableRefObject<T> | null | undefined>): ForwardedRef<T> {\n if (refs.length === 1 && refs[0]) {\n return refs[0];\n }\n\n return (value: T | null) => {\n for (let ref of refs) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n ref.current = value;\n }\n }\n };\n}\n"],"names":[],"version":3,"file":"mergeRefs.module.js.map"}
@@ -0,0 +1,64 @@
/*
* 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, ItemProps, Key, LinkDOMProps, StyleProps} from '@react-types/shared';
import {AriaLinkProps} from '@react-types/link';
import {ReactElement, ReactNode} from 'react';
export interface BreadcrumbItemProps extends AriaLinkProps, LinkDOMProps {
/** Whether the breadcrumb item represents the current page. */
isCurrent?: boolean,
/**
* The type of current location the breadcrumb item represents, if `isCurrent` is true.
* @default 'page'
*/
'aria-current'?: 'page' | 'step' | 'location' | 'date' | 'time' | boolean | 'true' | 'false',
/** Whether the breadcrumb item is disabled. */
isDisabled?: boolean,
/** The contents of the breadcrumb item. */
children: ReactNode
}
export interface AriaBreadcrumbItemProps extends BreadcrumbItemProps, DOMProps {
/**
* The HTML element used to render the breadcrumb link, e.g. 'a', or 'span'.
* @default 'a'
*/
elementType?: string
}
export interface BreadcrumbsProps {}
export interface AriaBreadcrumbsProps extends BreadcrumbsProps, DOMProps, AriaLabelingProps {}
export interface SpectrumBreadcrumbsProps<T> extends AriaBreadcrumbsProps, StyleProps {
/** The breadcrumb items. */
children: ReactElement<ItemProps<T>> | ReactElement<ItemProps<T>>[],
/** Whether the Breadcrumbs are disabled. */
isDisabled?: boolean,
/** Called when an item is acted upon (usually selection via press). */
onAction?: (key: Key) => void,
/**
* Size of the Breadcrumbs including spacing and layout.
* @default 'L'
*/
size?: 'S' | 'M' | 'L',
/** Whether to always show the root item if the items are collapsed. */
showRoot?: boolean,
/**
* Whether to place the last Breadcrumb item onto a new line.
*/
isMultiline?: boolean,
/**
* Whether to autoFocus the last Breadcrumb item when the Breadcrumbs render.
*/
autoFocusCurrent?: boolean
}
@@ -0,0 +1,49 @@
{
"name": "esbuild",
"version": "0.27.2",
"description": "An extremely fast JavaScript and CSS bundler and minifier.",
"repository": {
"type": "git",
"url": "git+https://github.com/evanw/esbuild.git"
},
"scripts": {
"postinstall": "node install.js"
},
"main": "lib/main.js",
"types": "lib/main.d.ts",
"engines": {
"node": ">=18"
},
"bin": {
"esbuild": "bin/esbuild"
},
"optionalDependencies": {
"@esbuild/aix-ppc64": "0.27.2",
"@esbuild/android-arm": "0.27.2",
"@esbuild/android-arm64": "0.27.2",
"@esbuild/android-x64": "0.27.2",
"@esbuild/darwin-arm64": "0.27.2",
"@esbuild/darwin-x64": "0.27.2",
"@esbuild/freebsd-arm64": "0.27.2",
"@esbuild/freebsd-x64": "0.27.2",
"@esbuild/linux-arm": "0.27.2",
"@esbuild/linux-arm64": "0.27.2",
"@esbuild/linux-ia32": "0.27.2",
"@esbuild/linux-loong64": "0.27.2",
"@esbuild/linux-mips64el": "0.27.2",
"@esbuild/linux-ppc64": "0.27.2",
"@esbuild/linux-riscv64": "0.27.2",
"@esbuild/linux-s390x": "0.27.2",
"@esbuild/linux-x64": "0.27.2",
"@esbuild/netbsd-arm64": "0.27.2",
"@esbuild/netbsd-x64": "0.27.2",
"@esbuild/openbsd-arm64": "0.27.2",
"@esbuild/openbsd-x64": "0.27.2",
"@esbuild/openharmony-arm64": "0.27.2",
"@esbuild/sunos-x64": "0.27.2",
"@esbuild/win32-arm64": "0.27.2",
"@esbuild/win32-ia32": "0.27.2",
"@esbuild/win32-x64": "0.27.2"
},
"license": "MIT"
}
@@ -0,0 +1,5 @@
'use strict';
module.exports = function isCodePoint(cp) {
return typeof cp === 'number' && cp >= 0 && cp <= 0x10FFFF && (cp | 0) === cp;
};
@@ -0,0 +1,55 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { getSourceCode } = require("eslint-compat-utils")
const { definePatternSearchGenerator } = require("../utils")
const iterateTargetChars = definePatternSearchGenerator(/[\u2028\u2029]/gu)
module.exports = {
meta: {
docs: {
description: "disallow `\\u2028` and `\\u2029` in string literals.",
category: "ES2019",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-json-superset.html",
},
fixable: "code",
messages: {
forbidden: "ES2019 '\\u{{code}}' in string literals is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
const sourceCode = getSourceCode(context)
return {
Literal(node) {
if (typeof node.value !== "string") {
return
}
const offset = node.range[0]
for (const { index } of iterateTargetChars(node.raw)) {
const code = node.raw.codePointAt(index).toString(16)
const loc = sourceCode.getLocFromIndex(offset + index)
context.report({
node,
loc,
messageId: "forbidden",
data: { code },
fix(fixer) {
return fixer.replaceTextRange(
[offset + index, offset + index + 1],
`\\u${code}`,
)
},
})
}
},
}
},
}
@@ -0,0 +1,114 @@
/*
* 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 {Collection, Key, Node} from '@react-types/shared';
export class ListCollection<T> implements Collection<Node<T>> {
private keyMap: Map<Key, Node<T>> = new Map();
private iterable: Iterable<Node<T>>;
private firstKey: Key | null = null;
private lastKey: Key | null = null;
private _size: number;
constructor(nodes: Iterable<Node<T>>) {
this.iterable = nodes;
let visit = (node: Node<T>) => {
this.keyMap.set(node.key, node);
if (node.childNodes && node.type === 'section') {
for (let child of node.childNodes) {
visit(child);
}
}
};
for (let node of nodes) {
visit(node);
}
let last: Node<T> | null = null;
let index = 0;
let size = 0;
for (let [key, node] of this.keyMap) {
if (last) {
last.nextKey = key;
node.prevKey = last.key;
} else {
this.firstKey = key;
node.prevKey = undefined;
}
if (node.type === 'item') {
node.index = index++;
}
// Only count sections and items when determining size so that
// loaders and separators in RAC/S2 don't influence the emptyState determination
if (node.type === 'section' || node.type === 'item') {
size++;
}
last = node;
// Set nextKey as undefined since this might be the last node
// If it isn't the last node, last.nextKey will properly set at start of new loop
last.nextKey = undefined;
}
this._size = size;
this.lastKey = last?.key ?? null;
}
*[Symbol.iterator](): IterableIterator<Node<T>> {
yield* this.iterable;
}
get size(): number {
return this._size;
}
getKeys(): IterableIterator<Key> {
return this.keyMap.keys();
}
getKeyBefore(key: Key): Key | null {
let node = this.keyMap.get(key);
return node ? node.prevKey ?? null : null;
}
getKeyAfter(key: Key): Key | null {
let node = this.keyMap.get(key);
return node ? node.nextKey ?? null : null;
}
getFirstKey(): Key | null {
return this.firstKey;
}
getLastKey(): Key | null {
return this.lastKey;
}
getItem(key: Key): Node<T> | null {
return this.keyMap.get(key) ?? null;
}
at(idx: number): Node<T> | null {
const keys = [...this.getKeys()];
return this.getItem(keys[idx]);
}
getChildren(key: Key): Iterable<Node<T>> {
let node = this.keyMap.get(key);
return node?.childNodes || [];
}
}
@@ -0,0 +1,4 @@
declare type Dictionary<T> = {
[key: string]: T;
};
export default Dictionary;
@@ -0,0 +1,208 @@
are-we-there-yet
----------------
Track complex hierarchies of asynchronous task completion statuses. This is
intended to give you a way of recording and reporting the progress of the big
recursive fan-out and gather type workflows that are so common in async.
What you do with this completion data is up to you, but the most common use case is to
feed it to one of the many progress bar modules.
Most progress bar modules include a rudimentary version of this, but my
needs were more complex.
Usage
=====
```javascript
var TrackerGroup = require("are-we-there-yet").TrackerGroup
var top = new TrackerGroup("program")
var single = top.newItem("one thing", 100)
single.completeWork(20)
console.log(top.completed()) // 0.2
fs.stat("file", function(er, stat) {
if (er) throw er
var stream = top.newStream("file", stat.size)
console.log(top.completed()) // now 0.1 as single is 50% of the job and is 20% complete
// and 50% * 20% == 10%
fs.createReadStream("file").pipe(stream).on("data", function (chunk) {
// do stuff with chunk
})
top.on("change", function (name) {
// called each time a chunk is read from "file"
// top.completed() will start at 0.1 and fill up to 0.6 as the file is read
})
})
```
Shared Methods
==============
* var completed = tracker.completed()
Implemented in: `Tracker`, `TrackerGroup`, `TrackerStream`
Returns the ratio of completed work to work to be done. Range of 0 to 1.
* tracker.finish()
Implemented in: `Tracker`, `TrackerGroup`
Marks the tracker as completed. With a TrackerGroup this marks all of its
components as completed.
Marks all of the components of this tracker as finished, which in turn means
that `tracker.completed()` for this will now be 1.
This will result in one or more `change` events being emitted.
Events
======
All tracker objects emit `change` events with the following arguments:
```
function (name, completed, tracker)
```
`name` is the name of the tracker that originally emitted the event,
or if it didn't have one, the first containing tracker group that had one.
`completed` is the percent complete (as returned by `tracker.completed()` method).
`tracker` is the tracker object that you are listening for events on.
TrackerGroup
============
* var tracker = new TrackerGroup(**name**)
* **name** *(optional)* - The name of this tracker group, used in change
notifications if the component updating didn't have a name. Defaults to undefined.
Creates a new empty tracker aggregation group. These are trackers whose
completion status is determined by the completion status of other trackers added to this aggregation group.
Ex.
```javascript
var tracker = new TrackerGroup("parent")
var foo = tracker.newItem("firstChild", 100)
var bar = tracker.newItem("secondChild", 100)
foo.finish()
console.log(tracker.completed()) // 0.5
bar.finish()
console.log(tracker.completed()) // 1
```
* tracker.addUnit(**otherTracker**, **weight**)
* **otherTracker** - Any of the other are-we-there-yet tracker objects
* **weight** *(optional)* - The weight to give the tracker, defaults to 1.
Adds the **otherTracker** to this aggregation group. The weight determines
how long you expect this tracker to take to complete in proportion to other
units. So for instance, if you add one tracker with a weight of 1 and
another with a weight of 2, you're saying the second will take twice as long
to complete as the first. As such, the first will account for 33% of the
completion of this tracker and the second will account for the other 67%.
Returns **otherTracker**.
* var subGroup = tracker.newGroup(**name**, **weight**)
The above is exactly equivalent to:
```javascript
var subGroup = tracker.addUnit(new TrackerGroup(name), weight)
```
* var subItem = tracker.newItem(**name**, **todo**, **weight**)
The above is exactly equivalent to:
```javascript
var subItem = tracker.addUnit(new Tracker(name, todo), weight)
```
* var subStream = tracker.newStream(**name**, **todo**, **weight**)
The above is exactly equivalent to:
```javascript
var subStream = tracker.addUnit(new TrackerStream(name, todo), weight)
```
* console.log( tracker.debug() )
Returns a tree showing the completion of this tracker group and all of its
children, including recursively entering all of the children.
Tracker
=======
* var tracker = new Tracker(**name**, **todo**)
* **name** *(optional)* The name of this counter to report in change
events. Defaults to undefined.
* **todo** *(optional)* The amount of work todo (a number). Defaults to 0.
Ordinarily these are constructed as a part of a tracker group (via
`newItem`).
* var completed = tracker.completed()
Returns the ratio of completed work to work to be done. Range of 0 to 1. If
total work to be done is 0 then it will return 0.
* tracker.addWork(**todo**)
* **todo** A number to add to the amount of work to be done.
Increases the amount of work to be done, thus decreasing the completion
percentage. Triggers a `change` event.
* tracker.completeWork(**completed**)
* **completed** A number to add to the work complete
Increase the amount of work complete, thus increasing the completion percentage.
Will never increase the work completed past the amount of work todo. That is,
percentages > 100% are not allowed. Triggers a `change` event.
* tracker.finish()
Marks this tracker as finished, tracker.completed() will now be 1. Triggers
a `change` event.
TrackerStream
=============
* var tracker = new TrackerStream(**name**, **size**, **options**)
* **name** *(optional)* The name of this counter to report in change
events. Defaults to undefined.
* **size** *(optional)* The number of bytes being sent through this stream.
* **options** *(optional)* A hash of stream options
The tracker stream object is a pass through stream that updates an internal
tracker object each time a block passes through. It's intended to track
downloads, file extraction and other related activities. You use it by piping
your data source into it and then using it as your data source.
If your data has a length attribute then that's used as the amount of work
completed when the chunk is passed through. If it does not (eg, object
streams) then each chunk counts as completing 1 unit of work, so your size
should be the total number of objects being streamed.
* tracker.addWork(**todo**)
* **todo** Increase the expected overall size by **todo** bytes.
Increases the amount of work to be done, thus decreasing the completion
percentage. Triggers a `change` event.
@@ -0,0 +1,20 @@
var baseIndexOf = require('./_baseIndexOf');
/**
* Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
* that is not found in the character symbols.
*
* @private
* @param {Array} strSymbols The string symbols to inspect.
* @param {Array} chrSymbols The character symbols to find.
* @returns {number} Returns the index of the first unmatched string symbol.
*/
function charsStartIndex(strSymbols, chrSymbols) {
var index = -1,
length = strSymbols.length;
while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
return index;
}
module.exports = charsStartIndex;
@@ -0,0 +1,14 @@
import * as proto from '../../../packet/transformer/proto';
import { OidbPacket, PacketTransformer } from '../../../packet/transformer/base';
declare class GetStrangerInfo extends PacketTransformer<typeof proto.OidbSvcTrpcTcp0XFE1_2RSP> {
build(uin: number): OidbPacket;
parse(data: Buffer): import("napcat-protobuf").any {
status: import("napcat-protobuf").MessageProtoFieldType<() => {
key: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
value: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
}, false, false>;
}, false, false>;
}>;
}
declare const _default: GetStrangerInfo;
export default _default;
@@ -0,0 +1 @@
{"name":"@heroui/scroll-shadow","version":"2.3.6","requiresBuild":false,"files":{"dist/index.js":{"checkedAt":1794532108967,"integrity":"sha512-CwLThLCiHZv2U3/rbSJQBoe/k8Z+iwJFQ3XjXqtITck5HoD/+WLwwhhD1KmUwsAJ204/xgEadkbJHKNOPISpkg==","mode":420,"size":3346},"dist/scroll-shadow.js":{"checkedAt":1794532108967,"integrity":"sha512-OQHH2DLhVcpArjCS7/4G7aMM1ofJWIrni3iuxT3aLIL5/ky4PwwUUDB5/4fFEKe+341AoUyO5ILFExDm8RmRFQ==","mode":420,"size":3277},"dist/use-scroll-shadow.js":{"checkedAt":1794532108967,"integrity":"sha512-hxNFtkV0CIYt1uy7+15Sj1kTrw/7NC84jheZnPiOxDyxXdaT5uyPTv2ktStmQ34oujBFAozq/5MF9vknt9lBtg==","mode":420,"size":2809},"package.json":{"checkedAt":1794532108967,"integrity":"sha512-9b+0EacUd/e4+CZFsReQxwqouiTvbniD4UUP482QArXWqbXixhEtkC8T7q92urIUwP78W5Q6aW1dNDGV3S627Q==","mode":420,"size":1474},"README.md":{"checkedAt":1794532108967,"integrity":"sha512-WIvqgZIt2jYQPcqVVag8GawkqD56VsEswb/Md1yPqHAcjzfxGrsWZAFx0huBUbca1kWG8yWdk7xx4zT0QxlvNw==","mode":420,"size":579},"dist/chunk-4EXC76WE.mjs":{"checkedAt":1794532108967,"integrity":"sha512-VO00RUY7BMn9Ty2nw16947Y8td1YJrBf7Tqz98Ju6p/f7vHMFOSayIxwEbx93hN4QPaapn0MWQ3TGcfiolhuUw==","mode":420,"size":523},"dist/chunk-XKHEX3UH.mjs":{"checkedAt":1794532108968,"integrity":"sha512-B/OUbSBBjwXie8SsK1DCSM2dD5myoxp2/aUNlc7lOUx6QSPb35csu+8fToUSlAL/Jf3QcQ9xKTH+1RbuhgUPFw==","mode":420,"size":1579},"dist/index.mjs":{"checkedAt":1794532108968,"integrity":"sha512-e6sVvcQ9tWaZ8GsctitJN4lvlD2XJlRAqZ1/71K82kbfCrl3G3iQnad0fqq4vJopIEnwkg84xFXAitFl8Qu7DQ==","mode":420,"size":207},"dist/scroll-shadow.mjs":{"checkedAt":1794532108968,"integrity":"sha512-FVeue++B8KRv10Go5Rf6MqoSqTSm4bIfEpKWipuGf9NrrEb2mokPSvTJB9HZTvrRwImj4wimfVCcFHoQTYLavw==","mode":420,"size":156},"dist/use-scroll-shadow.mjs":{"checkedAt":1794532108968,"integrity":"sha512-Pb37BMy2/ZkyRiMJaJF7gG5SBy+SauFLRY3iyVbOWGmzP1OFvtY5WoSHAnRx0Gx6MtGH+A+1+1PVF/Wx0Iv17Q==","mode":420,"size":102},"dist/index.d.ts":{"checkedAt":1794532108968,"integrity":"sha512-N3yUFZvZOpbZjFj/TZ2TFOxiIvQHJLMmq0WbXHxB6xYqFToq1dlyup0Sp/Q51PeCAa5CHClRMt5fgU/NK03UUw==","mode":420,"size":391},"dist/scroll-shadow.d.ts":{"checkedAt":1794532108968,"integrity":"sha512-64OJOkNWmDkLrJGSAQrMAwQVjbqDUosH8ffXdEWphJ7lPQhnzsjrJjRjIu5oClNDSuIyWJEWurfxpKn3gkGc8w==","mode":420,"size":454},"dist/use-scroll-shadow.d.ts":{"checkedAt":1794532108968,"integrity":"sha512-qUBrJJsmae4HJsxFQvU0frFm84iO/KMwNodQcegQWf1meVCEmJ/B3nCNzSD19rDdblEJ3N6CC28PugQBGGc+rw==","mode":420,"size":1118},"LICENSE":{"checkedAt":1794532108969,"integrity":"sha512-eaopHP+N4EYXlGoX9hmoxDPoVft4BqrXKmbsFTcsoBHSrJp/GWF4qVtLBzrw9h9ZrbFfPY69z+3RuDX9FdPG+Q==","mode":420,"size":1064}}}
@@ -0,0 +1,2 @@
var N=e=>typeof e=="function",D=(e,t)=>N(e)?e(t):e;var V=(()=>{let e=0;return()=>(++e).toString()})(),J=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})();import{useEffect as L,useState as C,useRef as H}from"react";var j=20,h="default";var v=(e,t)=>{let{toastLimit:s}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,s)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:r}=t;return v(e,{type:e.toasts.find(o=>o.id===r.id)?1:0,toast:r});case 3:let{toastId:a}=t;return{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let T=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+T}))}}},O=[],I={toasts:[],pausedAt:void 0,settings:{toastLimit:j}},l={},M=(e,t=h)=>{l[t]=v(l[t]||I,e),O.forEach(([s,r])=>{s===t&&r(l[t])})},P=e=>Object.keys(l).forEach(t=>M(e,t)),U=e=>Object.keys(l).find(t=>l[t].toasts.some(s=>s.id===e)),f=(e=h)=>t=>{M(t,e)},Q={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},x=(e={},t=h)=>{let[s,r]=C(l[t]||I),a=H(l[t]);L(()=>(a.current!==l[t]&&r(l[t]),O.push([t,r]),()=>{let o=O.findIndex(([p])=>p===t);o>-1&&O.splice(o,1)}),[t]);let T=s.toasts.map(o=>{var p,A,y;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((p=e[o.type])==null?void 0:p.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((A=e[o.type])==null?void 0:A.duration)||(e==null?void 0:e.duration)||Q[o.type],style:{...e.style,...(y=e[o.type])==null?void 0:y.style,...o.style}}});return{...s,toasts:T}};var B=(e,t="blank",s)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...s,id:(s==null?void 0:s.id)||V()}),S=e=>(t,s)=>{let r=B(t,e,s);return f(r.toasterId||U(r.id))({type:2,toast:r}),r.id},n=(e,t)=>S("blank")(e,t);n.error=S("error");n.success=S("success");n.loading=S("loading");n.custom=S("custom");n.dismiss=(e,t)=>{let s={type:3,toastId:e};t?f(t)(s):P(s)};n.dismissAll=e=>n.dismiss(void 0,e);n.remove=(e,t)=>{let s={type:4,toastId:e};t?f(t)(s):P(s)};n.removeAll=e=>n.remove(void 0,e);n.promise=(e,t,s)=>{let r=n.loading(t.loading,{...s,...s==null?void 0:s.loading});return typeof e=="function"&&(e=e()),e.then(a=>{let T=t.success?D(t.success,a):void 0;return T?n.success(T,{id:r,...s,...s==null?void 0:s.success}):n.dismiss(r),a}).catch(a=>{let T=t.error?D(t.error,a):void 0;T?n.error(T,{id:r,...s,...s==null?void 0:s.error}):n.dismiss(r)}),e};import{useEffect as F,useCallback as m,useRef as W}from"react";var X=1e3,q=(e,t="default")=>{let{toasts:s,pausedAt:r}=x(e,t),a=W(new Map).current,T=m((i,c=X)=>{if(a.has(i))return;let u=setTimeout(()=>{a.delete(i),o({type:4,toastId:i})},c);a.set(i,u)},[]);F(()=>{if(r)return;let i=Date.now(),c=s.map(u=>{if(u.duration===1/0)return;let g=(u.duration||0)+u.pauseDuration-(i-u.createdAt);if(g<0){u.visible&&n.dismiss(u.id);return}return setTimeout(()=>n.dismiss(u.id,t),g)});return()=>{c.forEach(u=>u&&clearTimeout(u))}},[s,r,t]);let o=m(f(t),[t]),p=m(()=>{o({type:5,time:Date.now()})},[o]),A=m((i,c)=>{o({type:1,toast:{id:i,height:c}})},[o]),y=m(()=>{r&&o({type:6,time:Date.now()})},[r,o]),k=m((i,c)=>{let{reverseOrder:u=!1,gutter:g=8,defaultPosition:R}=c||{},E=s.filter(d=>(d.position||R)===(i.position||R)&&d.height),w=E.findIndex(d=>d.id===i.id),_=E.filter((d,b)=>b<w&&d.visible).length;return E.filter(d=>d.visible).slice(...u?[_+1]:[0,_]).reduce((d,b)=>d+(b.height||0)+g,0)},[s]);return F(()=>{s.forEach(i=>{if(i.dismissed)T(i.id,i.removeDelay);else{let c=a.get(i.id);c&&(clearTimeout(c),a.delete(i.id))}})},[s,T]),{toasts:s,handlers:{updateHeight:A,startPause:p,endPause:y,calculateOffset:k}}};var Ae=n;export{Ae as default,D as resolveValue,n as toast,q as useToaster,x as useToasterStore};
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,110 @@
// please no
module['exports'] = function zalgo(text, options) {
text = text || ' he is here ';
var soul = {
'up': [
'̍', '̎', '̄', '̅',
'̿', '̑', '̆', '̐',
'͒', '͗', '͑', '̇',
'̈', '̊', '͂', '̓',
'̈', '͊', '͋', '͌',
'̃', '̂', '̌', '͐',
'̀', '́', '̋', '̏',
'̒', '̓', '̔', '̽',
'̉', 'ͣ', 'ͤ', 'ͥ',
'ͦ', 'ͧ', 'ͨ', 'ͩ',
'ͪ', 'ͫ', 'ͬ', 'ͭ',
'ͮ', 'ͯ', '̾', '͛',
'͆', '̚',
],
'down': [
'̖', '̗', '̘', '̙',
'̜', '̝', '̞', '̟',
'̠', '̤', '̥', '̦',
'̩', '̪', '̫', '̬',
'̭', '̮', '̯', '̰',
'̱', '̲', '̳', '̹',
'̺', '̻', '̼', 'ͅ',
'͇', '͈', '͉', '͍',
'͎', '͓', '͔', '͕',
'͖', '͙', '͚', '̣',
],
'mid': [
'̕', '̛', '̀', '́',
'͘', '̡', '̢', '̧',
'̨', '̴', '̵', '̶',
'͜', '͝', '͞',
'͟', '͠', '͢', '̸',
'̷', '͡', ' ҉',
],
};
var all = [].concat(soul.up, soul.down, soul.mid);
function randomNumber(range) {
var r = Math.floor(Math.random() * range);
return r;
}
function isChar(character) {
var bool = false;
all.filter(function(i) {
bool = (i === character);
});
return bool;
}
function heComes(text, options) {
var result = '';
var counts;
var l;
options = options || {};
options['up'] =
typeof options['up'] !== 'undefined' ? options['up'] : true;
options['mid'] =
typeof options['mid'] !== 'undefined' ? options['mid'] : true;
options['down'] =
typeof options['down'] !== 'undefined' ? options['down'] : true;
options['size'] =
typeof options['size'] !== 'undefined' ? options['size'] : 'maxi';
text = text.split('');
for (l in text) {
if (isChar(l)) {
continue;
}
result = result + text[l];
counts = {'up': 0, 'down': 0, 'mid': 0};
switch (options.size) {
case 'mini':
counts.up = randomNumber(8);
counts.mid = randomNumber(2);
counts.down = randomNumber(8);
break;
case 'maxi':
counts.up = randomNumber(16) + 3;
counts.mid = randomNumber(4) + 1;
counts.down = randomNumber(64) + 3;
break;
default:
counts.up = randomNumber(8) + 1;
counts.mid = randomNumber(6) / 2;
counts.down = randomNumber(8) + 1;
break;
}
var arr = ['up', 'mid', 'down'];
for (var d in arr) {
var index = arr[d];
for (var i = 0; i <= counts[index]; i++) {
if (options[index]) {
result = result + soul[index][randomNumber(soul[index].length)];
}
}
}
}
return result;
}
// don't summon him
return heComes(text, options);
};
@@ -0,0 +1,39 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { isCommaToken } = require("../utils")
module.exports = {
meta: {
docs: {
description: "disallow trailing commas in array/object literals.",
category: "ES5",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-trailing-commas.html",
},
fixable: null,
messages: {
forbidden:
"ES5 trailing commas in array/object literals are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
const sourceCode = context.getSourceCode()
return {
"ArrayExpression, ArrayPattern, ObjectExpression, ObjectPattern"(
node
) {
const token = sourceCode.getLastToken(node, 1)
if (isCommaToken(token)) {
context.report({ node, messageId: "forbidden" })
}
},
}
},
}
@@ -0,0 +1,34 @@
import baseUnset from './_baseUnset.js';
/**
* Removes the property at `path` of `object`.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to unset.
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 7 } }] };
* _.unset(object, 'a[0].b.c');
* // => true
*
* console.log(object);
* // => { 'a': [{ 'b': {} }] };
*
* _.unset(object, ['a', '0', 'b', 'c']);
* // => true
*
* console.log(object);
* // => { 'a': [{ 'b': {} }] };
*/
function unset(object, path) {
return object == null ? true : baseUnset(object, path);
}
export default unset;
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Roland Groza
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 @@
{"version":3,"file":"isBindingIdentifier.d.ts","sourceRoot":"","sources":["../../../../src/binding/calculations/isBindingIdentifier.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAElB,MAAM,6BAA6B,CAAC;AAErC,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,iBAAiB,CAM5B"}
@@ -0,0 +1,17 @@
'use strict'
var experimentalWarnings = new Set();
function emitExperimentalWarning(feature) {
if (experimentalWarnings.has(feature)) return;
var msg = feature + ' is an experimental feature. This feature could ' +
'change at any time';
experimentalWarnings.add(feature);
process.emitWarning(msg, 'ExperimentalWarning');
}
function noop() {}
module.exports.emitExperimentalWarning = process.emitWarning
? emitExperimentalWarning
: noop;
@@ -0,0 +1,68 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/sun.tsx
var sun_exports = {};
__export(sun_exports, {
SunIcon: () => SunIcon
});
module.exports = __toCommonJS(sun_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var SunIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
"svg",
{
"aria-hidden": "true",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 512 512",
width: "1em",
...props,
children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M256 48v48M256 416v48M403.08 108.92l-33.94 33.94M142.86 369.14l-33.94 33.94M464 256h-48M96 256H48M403.08 403.08l-33.94-33.94M142.86 142.86l-33.94-33.94",
fill: "none",
stroke: "currentColor",
strokeLinecap: "round",
strokeMiterlimit: 10,
strokeWidth: 32
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"circle",
{
cx: 256,
cy: 256,
fill: "none",
r: 80,
stroke: "currentColor",
strokeLinecap: "round",
strokeMiterlimit: 10,
strokeWidth: 32
}
)
]
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
SunIcon
});
@@ -0,0 +1,358 @@
/** Used to map aliases to their real names. */
exports.aliasToReal = {
// Lodash aliases.
'each': 'forEach',
'eachRight': 'forEachRight',
'entries': 'toPairs',
'entriesIn': 'toPairsIn',
'extend': 'assignIn',
'extendAll': 'assignInAll',
'extendAllWith': 'assignInAllWith',
'extendWith': 'assignInWith',
'first': 'head',
// Methods that are curried variants of others.
'conforms': 'conformsTo',
'matches': 'isMatch',
'property': 'get',
// Ramda aliases.
'__': 'placeholder',
'F': 'stubFalse',
'T': 'stubTrue',
'all': 'every',
'allPass': 'overEvery',
'always': 'constant',
'any': 'some',
'anyPass': 'overSome',
'apply': 'spread',
'assoc': 'set',
'assocPath': 'set',
'complement': 'negate',
'compose': 'flowRight',
'contains': 'includes',
'dissoc': 'unset',
'dissocPath': 'unset',
'dropLast': 'dropRight',
'dropLastWhile': 'dropRightWhile',
'equals': 'isEqual',
'identical': 'eq',
'indexBy': 'keyBy',
'init': 'initial',
'invertObj': 'invert',
'juxt': 'over',
'omitAll': 'omit',
'nAry': 'ary',
'path': 'get',
'pathEq': 'matchesProperty',
'pathOr': 'getOr',
'paths': 'at',
'pickAll': 'pick',
'pipe': 'flow',
'pluck': 'map',
'prop': 'get',
'propEq': 'matchesProperty',
'propOr': 'getOr',
'props': 'at',
'symmetricDifference': 'xor',
'symmetricDifferenceBy': 'xorBy',
'symmetricDifferenceWith': 'xorWith',
'takeLast': 'takeRight',
'takeLastWhile': 'takeRightWhile',
'unapply': 'rest',
'unnest': 'flatten',
'useWith': 'overArgs',
'where': 'conformsTo',
'whereEq': 'isMatch',
'zipObj': 'zipObject'
};
/** Used to map ary to method names. */
exports.aryMethod = {
'1': [
'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',
'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',
'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',
'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
'uniqueId', 'words', 'zipAll'
],
'2': [
'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',
'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',
'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',
'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',
'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',
'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach',
'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',
'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',
'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy',
'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty',
'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',
'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',
'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll',
'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
'zipObjectDeep'
],
'3': [
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',
'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy',
'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy',
'xorWith', 'zipWith'
],
'4': [
'fill', 'setWith', 'updateWith'
]
};
/** Used to map ary to rearg configs. */
exports.aryRearg = {
'2': [1, 0],
'3': [2, 0, 1],
'4': [3, 2, 0, 1]
};
/** Used to map method names to their iteratee ary. */
exports.iterateeAry = {
'dropRightWhile': 1,
'dropWhile': 1,
'every': 1,
'filter': 1,
'find': 1,
'findFrom': 1,
'findIndex': 1,
'findIndexFrom': 1,
'findKey': 1,
'findLast': 1,
'findLastFrom': 1,
'findLastIndex': 1,
'findLastIndexFrom': 1,
'findLastKey': 1,
'flatMap': 1,
'flatMapDeep': 1,
'flatMapDepth': 1,
'forEach': 1,
'forEachRight': 1,
'forIn': 1,
'forInRight': 1,
'forOwn': 1,
'forOwnRight': 1,
'map': 1,
'mapKeys': 1,
'mapValues': 1,
'partition': 1,
'reduce': 2,
'reduceRight': 2,
'reject': 1,
'remove': 1,
'some': 1,
'takeRightWhile': 1,
'takeWhile': 1,
'times': 1,
'transform': 2
};
/** Used to map method names to iteratee rearg configs. */
exports.iterateeRearg = {
'mapKeys': [1],
'reduceRight': [1, 0]
};
/** Used to map method names to rearg configs. */
exports.methodRearg = {
'assignInAllWith': [1, 0],
'assignInWith': [1, 2, 0],
'assignAllWith': [1, 0],
'assignWith': [1, 2, 0],
'differenceBy': [1, 2, 0],
'differenceWith': [1, 2, 0],
'getOr': [2, 1, 0],
'intersectionBy': [1, 2, 0],
'intersectionWith': [1, 2, 0],
'isEqualWith': [1, 2, 0],
'isMatchWith': [2, 1, 0],
'mergeAllWith': [1, 0],
'mergeWith': [1, 2, 0],
'padChars': [2, 1, 0],
'padCharsEnd': [2, 1, 0],
'padCharsStart': [2, 1, 0],
'pullAllBy': [2, 1, 0],
'pullAllWith': [2, 1, 0],
'rangeStep': [1, 2, 0],
'rangeStepRight': [1, 2, 0],
'setWith': [3, 1, 2, 0],
'sortedIndexBy': [2, 1, 0],
'sortedLastIndexBy': [2, 1, 0],
'unionBy': [1, 2, 0],
'unionWith': [1, 2, 0],
'updateWith': [3, 1, 2, 0],
'xorBy': [1, 2, 0],
'xorWith': [1, 2, 0],
'zipWith': [1, 2, 0]
};
/** Used to map method names to spread configs. */
exports.methodSpread = {
'assignAll': { 'start': 0 },
'assignAllWith': { 'start': 0 },
'assignInAll': { 'start': 0 },
'assignInAllWith': { 'start': 0 },
'defaultsAll': { 'start': 0 },
'defaultsDeepAll': { 'start': 0 },
'invokeArgs': { 'start': 2 },
'invokeArgsMap': { 'start': 2 },
'mergeAll': { 'start': 0 },
'mergeAllWith': { 'start': 0 },
'partial': { 'start': 1 },
'partialRight': { 'start': 1 },
'without': { 'start': 1 },
'zipAll': { 'start': 0 }
};
/** Used to identify methods which mutate arrays or objects. */
exports.mutate = {
'array': {
'fill': true,
'pull': true,
'pullAll': true,
'pullAllBy': true,
'pullAllWith': true,
'pullAt': true,
'remove': true,
'reverse': true
},
'object': {
'assign': true,
'assignAll': true,
'assignAllWith': true,
'assignIn': true,
'assignInAll': true,
'assignInAllWith': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsAll': true,
'defaultsDeep': true,
'defaultsDeepAll': true,
'merge': true,
'mergeAll': true,
'mergeAllWith': true,
'mergeWith': true,
},
'set': {
'set': true,
'setWith': true,
'unset': true,
'update': true,
'updateWith': true
}
};
/** Used to map real names to their aliases. */
exports.realToAlias = (function() {
var hasOwnProperty = Object.prototype.hasOwnProperty,
object = exports.aliasToReal,
result = {};
for (var key in object) {
var value = object[key];
if (hasOwnProperty.call(result, value)) {
result[value].push(key);
} else {
result[value] = [key];
}
}
return result;
}());
/** Used to map method names to other names. */
exports.remap = {
'assignAll': 'assign',
'assignAllWith': 'assignWith',
'assignInAll': 'assignIn',
'assignInAllWith': 'assignInWith',
'curryN': 'curry',
'curryRightN': 'curryRight',
'defaultsAll': 'defaults',
'defaultsDeepAll': 'defaultsDeep',
'findFrom': 'find',
'findIndexFrom': 'findIndex',
'findLastFrom': 'findLast',
'findLastIndexFrom': 'findLastIndex',
'getOr': 'get',
'includesFrom': 'includes',
'indexOfFrom': 'indexOf',
'invokeArgs': 'invoke',
'invokeArgsMap': 'invokeMap',
'lastIndexOfFrom': 'lastIndexOf',
'mergeAll': 'merge',
'mergeAllWith': 'mergeWith',
'padChars': 'pad',
'padCharsEnd': 'padEnd',
'padCharsStart': 'padStart',
'propertyOf': 'get',
'rangeStep': 'range',
'rangeStepRight': 'rangeRight',
'restFrom': 'rest',
'spreadFrom': 'spread',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart',
'zipAll': 'zip'
};
/** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
'castArray': true,
'flow': true,
'flowRight': true,
'iteratee': true,
'mixin': true,
'rearg': true,
'runInContext': true
};
/** Used to track methods that skip rearranging arguments. */
exports.skipRearg = {
'add': true,
'assign': true,
'assignIn': true,
'bind': true,
'bindKey': true,
'concat': true,
'difference': true,
'divide': true,
'eq': true,
'gt': true,
'gte': true,
'isEqual': true,
'lt': true,
'lte': true,
'matchesProperty': true,
'merge': true,
'multiply': true,
'overArgs': true,
'partial': true,
'partialRight': true,
'propertyOf': true,
'random': true,
'range': true,
'rangeRight': true,
'subtract': true,
'zip': true,
'zipObject': true,
'zipObjectDeep': true
};
@@ -0,0 +1,212 @@
/**
* @import {Event} from 'micromark-util-types'
*/
// Port of `edit_map.rs` from `markdown-rs`.
// This should move to `markdown-js` later.
// Deal with several changes in events, batching them together.
//
// Preferably, changes should be kept to a minimum.
// Sometimes, it’s needed to change the list of events, because parsing can be
// messy, and it helps to expose a cleaner interface of events to the compiler
// and other users.
// It can also help to merge many adjacent similar events.
// And, in other cases, it’s needed to parse subcontent: pass some events
// through another tokenizer and inject the result.
/**
* @typedef {[number, number, Array<Event>]} Change
* @typedef {[number, number, number]} Jump
*/
/**
* Tracks a bunch of edits.
*/
export class EditMap {
/**
* Create a new edit map.
*/
constructor() {
/**
* Record of changes.
*
* @type {Array<Change>}
*/
this.map = []
}
/**
* Create an edit: a remove and/or add at a certain place.
*
* @param {number} index
* @param {number} remove
* @param {Array<Event>} add
* @returns {undefined}
*/
add(index, remove, add) {
addImplementation(this, index, remove, add)
}
// To do: add this when moving to `micromark`.
// /**
// * Create an edit: but insert `add` before existing additions.
// *
// * @param {number} index
// * @param {number} remove
// * @param {Array<Event>} add
// * @returns {undefined}
// */
// addBefore(index, remove, add) {
// addImplementation(this, index, remove, add, true)
// }
/**
* Done, change the events.
*
* @param {Array<Event>} events
* @returns {undefined}
*/
consume(events) {
this.map.sort(function (a, b) {
return a[0] - b[0]
})
/* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
if (this.map.length === 0) {
return
}
// To do: if links are added in events, like they are in `markdown-rs`,
// this is needed.
// // Calculate jumps: where items in the current list move to.
// /** @type {Array<Jump>} */
// const jumps = []
// let index = 0
// let addAcc = 0
// let removeAcc = 0
// while (index < this.map.length) {
// const [at, remove, add] = this.map[index]
// removeAcc += remove
// addAcc += add.length
// jumps.push([at, removeAcc, addAcc])
// index += 1
// }
//
// . shiftLinks(events, jumps)
let index = this.map.length
/** @type {Array<Array<Event>>} */
const vecs = []
while (index > 0) {
index -= 1
vecs.push(
events.slice(this.map[index][0] + this.map[index][1]),
this.map[index][2]
)
// Truncate rest.
events.length = this.map[index][0]
}
vecs.push(events.slice())
events.length = 0
let slice = vecs.pop()
while (slice) {
for (const element of slice) {
events.push(element)
}
slice = vecs.pop()
}
// Truncate everything.
this.map.length = 0
}
}
/**
* Create an edit.
*
* @param {EditMap} editMap
* @param {number} at
* @param {number} remove
* @param {Array<Event>} add
* @returns {undefined}
*/
function addImplementation(editMap, at, remove, add) {
let index = 0
/* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
if (remove === 0 && add.length === 0) {
return
}
while (index < editMap.map.length) {
if (editMap.map[index][0] === at) {
editMap.map[index][1] += remove
// To do: before not used by tables, use when moving to micromark.
// if (before) {
// add.push(...editMap.map[index][2])
// editMap.map[index][2] = add
// } else {
editMap.map[index][2].push(...add)
// }
return
}
index += 1
}
editMap.map.push([at, remove, add])
}
// /**
// * Shift `previous` and `next` links according to `jumps`.
// *
// * This fixes links in case there are events removed or added between them.
// *
// * @param {Array<Event>} events
// * @param {Array<Jump>} jumps
// */
// function shiftLinks(events, jumps) {
// let jumpIndex = 0
// let index = 0
// let add = 0
// let rm = 0
// while (index < events.length) {
// const rmCurr = rm
// while (jumpIndex < jumps.length && jumps[jumpIndex][0] <= index) {
// add = jumps[jumpIndex][2]
// rm = jumps[jumpIndex][1]
// jumpIndex += 1
// }
// // Ignore items that will be removed.
// if (rm > rmCurr) {
// index += rm - rmCurr
// } else {
// // ?
// // if let Some(link) = &events[index].link {
// // if let Some(next) = link.next {
// // events[next].link.as_mut().unwrap().previous = Some(index + add - rm);
// // while jumpIndex < jumps.len() && jumps[jumpIndex].0 <= next {
// // add = jumps[jumpIndex].2;
// // rm = jumps[jumpIndex].1;
// // jumpIndex += 1;
// // }
// // events[index].link.as_mut().unwrap().next = Some(next + add - rm);
// // index = next;
// // continue;
// // }
// // }
// index += 1
// }
// }
// }
@@ -0,0 +1,36 @@
import type TokenProcessor from "../TokenProcessor";
export type ImportExportSpecifierInfo = {
isType: false;
leftName: string;
rightName: string;
endIndex: number;
} | {
isType: true;
leftName: null;
rightName: null;
endIndex: number;
};
/**
* Determine information about this named import or named export specifier.
*
* This syntax is the `a` from statements like these:
* import {A} from "./foo";
* export {A};
* export {A} from "./foo";
*
* As it turns out, we can exactly characterize the syntax meaning by simply
* counting the number of tokens, which can be from 1 to 4:
* {A}
* {type A}
* {A as B}
* {type A as B}
*
* In the type case, we never actually need the names in practice, so don't get
* them.
*
* TODO: There's some redundancy with the type detection here and the isType
* flag that's already present on tokens in TS mode. This function could
* potentially be simplified and/or pushed to the call sites to avoid the object
* allocation.
*/
export default function getImportExportSpecifierInfo(tokens: TokenProcessor, index?: number): ImportExportSpecifierInfo;
@@ -0,0 +1,683 @@
/**
* The `node:zlib` module provides compression functionality implemented using
* Gzip, Deflate/Inflate, and Brotli.
*
* To access it:
*
* ```js
* import zlib from 'node:zlib';
* ```
*
* Compression and decompression are built around the Node.js
* [Streams API](https://nodejs.org/docs/latest-v22.x/api/stream.html).
*
* Compressing or decompressing a stream (such as a file) can be accomplished by
* piping the source stream through a `zlib` `Transform` stream into a destination
* stream:
*
* ```js
* import { createGzip } from 'node:zlib';
* import { pipeline } from 'node:stream';
* import {
* createReadStream,
* createWriteStream,
* } from 'node:fs';
*
* const gzip = createGzip();
* const source = createReadStream('input.txt');
* const destination = createWriteStream('input.txt.gz');
*
* pipeline(source, gzip, destination, (err) => {
* if (err) {
* console.error('An error occurred:', err);
* process.exitCode = 1;
* }
* });
*
* // Or, Promisified
*
* import { promisify } from 'node:util';
* const pipe = promisify(pipeline);
*
* async function do_gzip(input, output) {
* const gzip = createGzip();
* const source = createReadStream(input);
* const destination = createWriteStream(output);
* await pipe(source, gzip, destination);
* }
*
* do_gzip('input.txt', 'input.txt.gz')
* .catch((err) => {
* console.error('An error occurred:', err);
* process.exitCode = 1;
* });
* ```
*
* It is also possible to compress or decompress data in a single step:
*
* ```js
* import { deflate, unzip } from 'node:zlib';
*
* const input = '.................................';
* deflate(input, (err, buffer) => {
* if (err) {
* console.error('An error occurred:', err);
* process.exitCode = 1;
* }
* console.log(buffer.toString('base64'));
* });
*
* const buffer = Buffer.from('eJzT0yMAAGTvBe8=', 'base64');
* unzip(buffer, (err, buffer) => {
* if (err) {
* console.error('An error occurred:', err);
* process.exitCode = 1;
* }
* console.log(buffer.toString());
* });
*
* // Or, Promisified
*
* import { promisify } from 'node:util';
* const do_unzip = promisify(unzip);
*
* do_unzip(buffer)
* .then((buf) => console.log(buf.toString()))
* .catch((err) => {
* console.error('An error occurred:', err);
* process.exitCode = 1;
* });
* ```
* @since v0.5.8
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/zlib.js)
*/
declare module "zlib" {
import { NonSharedBuffer } from "node:buffer";
import * as stream from "node:stream";
interface ZlibOptions {
/**
* @default constants.Z_NO_FLUSH
*/
flush?: number | undefined;
/**
* @default constants.Z_FINISH
*/
finishFlush?: number | undefined;
/**
* @default 16*1024
*/
chunkSize?: number | undefined;
windowBits?: number | undefined;
level?: number | undefined; // compression only
memLevel?: number | undefined; // compression only
strategy?: number | undefined; // compression only
dictionary?: NodeJS.ArrayBufferView | ArrayBuffer | undefined; // deflate/inflate only, empty dictionary by default
/**
* If `true`, returns an object with `buffer` and `engine`.
*/
info?: boolean | undefined;
/**
* Limits output size when using convenience methods.
* @default buffer.kMaxLength
*/
maxOutputLength?: number | undefined;
}
interface BrotliOptions {
/**
* @default constants.BROTLI_OPERATION_PROCESS
*/
flush?: number | undefined;
/**
* @default constants.BROTLI_OPERATION_FINISH
*/
finishFlush?: number | undefined;
/**
* @default 16*1024
*/
chunkSize?: number | undefined;
params?:
| {
/**
* Each key is a `constants.BROTLI_*` constant.
*/
[key: number]: boolean | number;
}
| undefined;
/**
* Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v22.x/api/zlib.html#convenience-methods).
* @default buffer.kMaxLength
*/
maxOutputLength?: number | undefined;
/**
* If `true`, returns an object with `buffer` and `engine`.
*/
info?: boolean | undefined;
}
interface ZstdOptions {
/**
* @default constants.ZSTD_e_continue
*/
flush?: number | undefined;
/**
* @default constants.ZSTD_e_end
*/
finishFlush?: number | undefined;
/**
* @default 16 * 1024
*/
chunkSize?: number | undefined;
/**
* Key-value object containing indexed
* [Zstd parameters](https://nodejs.org/docs/latest-v22.x/api/zlib.html#zstd-constants).
*/
params?: { [key: number]: number | boolean } | undefined;
/**
* Limits output size when using
* [convenience methods](https://nodejs.org/docs/latest-v22.x/api/zlib.html#convenience-methods).
* @default buffer.kMaxLength
*/
maxOutputLength?: number | undefined;
/**
* If `true`, returns an object with `buffer` and `engine`.
*/
info?: boolean | undefined;
/**
* Optional dictionary used to improve compression efficiency when compressing or decompressing data that
* shares common patterns with the dictionary.
* @since v22.19.0
*/
dictionary?: NodeJS.ArrayBufferView | undefined;
}
interface Zlib {
/** @deprecated Use bytesWritten instead. */
readonly bytesRead: number;
readonly bytesWritten: number;
shell?: boolean | string | undefined;
close(callback?: () => void): void;
flush(kind?: number, callback?: () => void): void;
flush(callback?: () => void): void;
}
interface ZlibParams {
params(level: number, strategy: number, callback: () => void): void;
}
interface ZlibReset {
reset(): void;
}
interface BrotliCompress extends stream.Transform, Zlib {}
interface BrotliDecompress extends stream.Transform, Zlib {}
interface Gzip extends stream.Transform, Zlib {}
interface Gunzip extends stream.Transform, Zlib {}
interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
interface Inflate extends stream.Transform, Zlib, ZlibReset {}
interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
interface InflateRaw extends stream.Transform, Zlib, ZlibReset {}
interface Unzip extends stream.Transform, Zlib {}
/**
* @since v22.15.0
* @experimental
*/
interface ZstdCompress extends stream.Transform, Zlib {}
/**
* @since v22.15.0
* @experimental
*/
interface ZstdDecompress extends stream.Transform, Zlib {}
/**
* Computes a 32-bit [Cyclic Redundancy Check](https://en.wikipedia.org/wiki/Cyclic_redundancy_check) checksum of `data`.
* If `value` is specified, it is used as the starting value of the checksum, otherwise, 0 is used as the starting value.
* @param data When `data` is a string, it will be encoded as UTF-8 before being used for computation.
* @param value An optional starting value. It must be a 32-bit unsigned integer. @default 0
* @returns A 32-bit unsigned integer containing the checksum.
* @since v22.2.0
*/
function crc32(data: string | NodeJS.ArrayBufferView, value?: number): number;
/**
* Creates and returns a new `BrotliCompress` object.
* @since v11.7.0, v10.16.0
*/
function createBrotliCompress(options?: BrotliOptions): BrotliCompress;
/**
* Creates and returns a new `BrotliDecompress` object.
* @since v11.7.0, v10.16.0
*/
function createBrotliDecompress(options?: BrotliOptions): BrotliDecompress;
/**
* Creates and returns a new `Gzip` object.
* See `example`.
* @since v0.5.8
*/
function createGzip(options?: ZlibOptions): Gzip;
/**
* Creates and returns a new `Gunzip` object.
* @since v0.5.8
*/
function createGunzip(options?: ZlibOptions): Gunzip;
/**
* Creates and returns a new `Deflate` object.
* @since v0.5.8
*/
function createDeflate(options?: ZlibOptions): Deflate;
/**
* Creates and returns a new `Inflate` object.
* @since v0.5.8
*/
function createInflate(options?: ZlibOptions): Inflate;
/**
* Creates and returns a new `DeflateRaw` object.
*
* An upgrade of zlib from 1.2.8 to 1.2.11 changed behavior when `windowBits` is set to 8 for raw deflate streams. zlib would automatically set `windowBits` to 9 if was initially set to 8. Newer
* versions of zlib will throw an exception,
* so Node.js restored the original behavior of upgrading a value of 8 to 9,
* since passing `windowBits = 9` to zlib actually results in a compressed stream
* that effectively uses an 8-bit window only.
* @since v0.5.8
*/
function createDeflateRaw(options?: ZlibOptions): DeflateRaw;
/**
* Creates and returns a new `InflateRaw` object.
* @since v0.5.8
*/
function createInflateRaw(options?: ZlibOptions): InflateRaw;
/**
* Creates and returns a new `Unzip` object.
* @since v0.5.8
*/
function createUnzip(options?: ZlibOptions): Unzip;
/**
* Creates and returns a new `ZstdCompress` object.
* @since v22.15.0
*/
function createZstdCompress(options?: ZstdOptions): ZstdCompress;
/**
* Creates and returns a new `ZstdDecompress` object.
* @since v22.15.0
*/
function createZstdDecompress(options?: ZstdOptions): ZstdDecompress;
type InputType = string | ArrayBuffer | NodeJS.ArrayBufferView;
type CompressCallback = (error: Error | null, result: NonSharedBuffer) => void;
/**
* @since v11.7.0, v10.16.0
*/
function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
function brotliCompress(buf: InputType, callback: CompressCallback): void;
namespace brotliCompress {
function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<NonSharedBuffer>;
}
/**
* Compress a chunk of data with `BrotliCompress`.
* @since v11.7.0, v10.16.0
*/
function brotliCompressSync(buf: InputType, options?: BrotliOptions): NonSharedBuffer;
/**
* @since v11.7.0, v10.16.0
*/
function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
function brotliDecompress(buf: InputType, callback: CompressCallback): void;
namespace brotliDecompress {
function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<NonSharedBuffer>;
}
/**
* Decompress a chunk of data with `BrotliDecompress`.
* @since v11.7.0, v10.16.0
*/
function brotliDecompressSync(buf: InputType, options?: BrotliOptions): NonSharedBuffer;
/**
* @since v0.6.0
*/
function deflate(buf: InputType, callback: CompressCallback): void;
function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
namespace deflate {
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
}
/**
* Compress a chunk of data with `Deflate`.
* @since v0.11.12
*/
function deflateSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
/**
* @since v0.6.0
*/
function deflateRaw(buf: InputType, callback: CompressCallback): void;
function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
namespace deflateRaw {
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
}
/**
* Compress a chunk of data with `DeflateRaw`.
* @since v0.11.12
*/
function deflateRawSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
/**
* @since v0.6.0
*/
function gzip(buf: InputType, callback: CompressCallback): void;
function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
namespace gzip {
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
}
/**
* Compress a chunk of data with `Gzip`.
* @since v0.11.12
*/
function gzipSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
/**
* @since v0.6.0
*/
function gunzip(buf: InputType, callback: CompressCallback): void;
function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
namespace gunzip {
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
}
/**
* Decompress a chunk of data with `Gunzip`.
* @since v0.11.12
*/
function gunzipSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
/**
* @since v0.6.0
*/
function inflate(buf: InputType, callback: CompressCallback): void;
function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
namespace inflate {
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
}
/**
* Decompress a chunk of data with `Inflate`.
* @since v0.11.12
*/
function inflateSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
/**
* @since v0.6.0
*/
function inflateRaw(buf: InputType, callback: CompressCallback): void;
function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
namespace inflateRaw {
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
}
/**
* Decompress a chunk of data with `InflateRaw`.
* @since v0.11.12
*/
function inflateRawSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
/**
* @since v0.6.0
*/
function unzip(buf: InputType, callback: CompressCallback): void;
function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
namespace unzip {
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
}
/**
* Decompress a chunk of data with `Unzip`.
* @since v0.11.12
*/
function unzipSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
/**
* @since v22.15.0
* @experimental
*/
function zstdCompress(buf: InputType, callback: CompressCallback): void;
function zstdCompress(buf: InputType, options: ZstdOptions, callback: CompressCallback): void;
namespace zstdCompress {
function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<NonSharedBuffer>;
}
/**
* Compress a chunk of data with `ZstdCompress`.
* @since v22.15.0
* @experimental
*/
function zstdCompressSync(buf: InputType, options?: ZstdOptions): NonSharedBuffer;
/**
* @since v22.15.0
* @experimental
*/
function zstdDecompress(buf: InputType, callback: CompressCallback): void;
function zstdDecompress(buf: InputType, options: ZstdOptions, callback: CompressCallback): void;
namespace zstdDecompress {
function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<NonSharedBuffer>;
}
/**
* Decompress a chunk of data with `ZstdDecompress`.
* @since v22.15.0
* @experimental
*/
function zstdDecompressSync(buf: InputType, options?: ZstdOptions): NonSharedBuffer;
namespace constants {
const BROTLI_DECODE: number;
const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;
const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: number;
const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: number;
const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: number;
const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: number;
const BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: number;
const BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: number;
const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: number;
const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: number;
const BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: number;
const BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: number;
const BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: number;
const BROTLI_DECODER_ERROR_FORMAT_DISTANCE: number;
const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: number;
const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: number;
const BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: number;
const BROTLI_DECODER_ERROR_FORMAT_PADDING_1: number;
const BROTLI_DECODER_ERROR_FORMAT_PADDING_2: number;
const BROTLI_DECODER_ERROR_FORMAT_RESERVED: number;
const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: number;
const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: number;
const BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: number;
const BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: number;
const BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: number;
const BROTLI_DECODER_ERROR_UNREACHABLE: number;
const BROTLI_DECODER_NEEDS_MORE_INPUT: number;
const BROTLI_DECODER_NEEDS_MORE_OUTPUT: number;
const BROTLI_DECODER_NO_ERROR: number;
const BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: number;
const BROTLI_DECODER_PARAM_LARGE_WINDOW: number;
const BROTLI_DECODER_RESULT_ERROR: number;
const BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: number;
const BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: number;
const BROTLI_DECODER_RESULT_SUCCESS: number;
const BROTLI_DECODER_SUCCESS: number;
const BROTLI_DEFAULT_MODE: number;
const BROTLI_DEFAULT_QUALITY: number;
const BROTLI_DEFAULT_WINDOW: number;
const BROTLI_ENCODE: number;
const BROTLI_LARGE_MAX_WINDOW_BITS: number;
const BROTLI_MAX_INPUT_BLOCK_BITS: number;
const BROTLI_MAX_QUALITY: number;
const BROTLI_MAX_WINDOW_BITS: number;
const BROTLI_MIN_INPUT_BLOCK_BITS: number;
const BROTLI_MIN_QUALITY: number;
const BROTLI_MIN_WINDOW_BITS: number;
const BROTLI_MODE_FONT: number;
const BROTLI_MODE_GENERIC: number;
const BROTLI_MODE_TEXT: number;
const BROTLI_OPERATION_EMIT_METADATA: number;
const BROTLI_OPERATION_FINISH: number;
const BROTLI_OPERATION_FLUSH: number;
const BROTLI_OPERATION_PROCESS: number;
const BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: number;
const BROTLI_PARAM_LARGE_WINDOW: number;
const BROTLI_PARAM_LGBLOCK: number;
const BROTLI_PARAM_LGWIN: number;
const BROTLI_PARAM_MODE: number;
const BROTLI_PARAM_NDIRECT: number;
const BROTLI_PARAM_NPOSTFIX: number;
const BROTLI_PARAM_QUALITY: number;
const BROTLI_PARAM_SIZE_HINT: number;
const DEFLATE: number;
const DEFLATERAW: number;
const GUNZIP: number;
const GZIP: number;
const INFLATE: number;
const INFLATERAW: number;
const UNZIP: number;
const ZLIB_VERNUM: number;
const ZSTD_CLEVEL_DEFAULT: number;
const ZSTD_COMPRESS: number;
const ZSTD_DECOMPRESS: number;
const ZSTD_btlazy2: number;
const ZSTD_btopt: number;
const ZSTD_btultra: number;
const ZSTD_btultra2: number;
const ZSTD_c_chainLog: number;
const ZSTD_c_checksumFlag: number;
const ZSTD_c_compressionLevel: number;
const ZSTD_c_contentSizeFlag: number;
const ZSTD_c_dictIDFlag: number;
const ZSTD_c_enableLongDistanceMatching: number;
const ZSTD_c_hashLog: number;
const ZSTD_c_jobSize: number;
const ZSTD_c_ldmBucketSizeLog: number;
const ZSTD_c_ldmHashLog: number;
const ZSTD_c_ldmHashRateLog: number;
const ZSTD_c_ldmMinMatch: number;
const ZSTD_c_minMatch: number;
const ZSTD_c_nbWorkers: number;
const ZSTD_c_overlapLog: number;
const ZSTD_c_searchLog: number;
const ZSTD_c_strategy: number;
const ZSTD_c_targetLength: number;
const ZSTD_c_windowLog: number;
const ZSTD_d_windowLogMax: number;
const ZSTD_dfast: number;
const ZSTD_e_continue: number;
const ZSTD_e_end: number;
const ZSTD_e_flush: number;
const ZSTD_error_GENERIC: number;
const ZSTD_error_checksum_wrong: number;
const ZSTD_error_corruption_detected: number;
const ZSTD_error_dictionaryCreation_failed: number;
const ZSTD_error_dictionary_corrupted: number;
const ZSTD_error_dictionary_wrong: number;
const ZSTD_error_dstBuffer_null: number;
const ZSTD_error_dstSize_tooSmall: number;
const ZSTD_error_frameParameter_unsupported: number;
const ZSTD_error_frameParameter_windowTooLarge: number;
const ZSTD_error_init_missing: number;
const ZSTD_error_literals_headerWrong: number;
const ZSTD_error_maxSymbolValue_tooLarge: number;
const ZSTD_error_maxSymbolValue_tooSmall: number;
const ZSTD_error_memory_allocation: number;
const ZSTD_error_noForwardProgress_destFull: number;
const ZSTD_error_noForwardProgress_inputEmpty: number;
const ZSTD_error_no_error: number;
const ZSTD_error_parameter_combination_unsupported: number;
const ZSTD_error_parameter_outOfBound: number;
const ZSTD_error_parameter_unsupported: number;
const ZSTD_error_prefix_unknown: number;
const ZSTD_error_srcSize_wrong: number;
const ZSTD_error_stabilityCondition_notRespected: number;
const ZSTD_error_stage_wrong: number;
const ZSTD_error_tableLog_tooLarge: number;
const ZSTD_error_version_unsupported: number;
const ZSTD_error_workSpace_tooSmall: number;
const ZSTD_fast: number;
const ZSTD_greedy: number;
const ZSTD_lazy: number;
const ZSTD_lazy2: number;
const Z_BEST_COMPRESSION: number;
const Z_BEST_SPEED: number;
const Z_BLOCK: number;
const Z_BUF_ERROR: number;
const Z_DATA_ERROR: number;
const Z_DEFAULT_CHUNK: number;
const Z_DEFAULT_COMPRESSION: number;
const Z_DEFAULT_LEVEL: number;
const Z_DEFAULT_MEMLEVEL: number;
const Z_DEFAULT_STRATEGY: number;
const Z_DEFAULT_WINDOWBITS: number;
const Z_ERRNO: number;
const Z_FILTERED: number;
const Z_FINISH: number;
const Z_FIXED: number;
const Z_FULL_FLUSH: number;
const Z_HUFFMAN_ONLY: number;
const Z_MAX_CHUNK: number;
const Z_MAX_LEVEL: number;
const Z_MAX_MEMLEVEL: number;
const Z_MAX_WINDOWBITS: number;
const Z_MEM_ERROR: number;
const Z_MIN_CHUNK: number;
const Z_MIN_LEVEL: number;
const Z_MIN_MEMLEVEL: number;
const Z_MIN_WINDOWBITS: number;
const Z_NEED_DICT: number;
const Z_NO_COMPRESSION: number;
const Z_NO_FLUSH: number;
const Z_OK: number;
const Z_PARTIAL_FLUSH: number;
const Z_RLE: number;
const Z_STREAM_END: number;
const Z_STREAM_ERROR: number;
const Z_SYNC_FLUSH: number;
const Z_VERSION_ERROR: number;
}
// Allowed flush values.
/** @deprecated Use `constants.Z_NO_FLUSH` */
const Z_NO_FLUSH: number;
/** @deprecated Use `constants.Z_PARTIAL_FLUSH` */
const Z_PARTIAL_FLUSH: number;
/** @deprecated Use `constants.Z_SYNC_FLUSH` */
const Z_SYNC_FLUSH: number;
/** @deprecated Use `constants.Z_FULL_FLUSH` */
const Z_FULL_FLUSH: number;
/** @deprecated Use `constants.Z_FINISH` */
const Z_FINISH: number;
/** @deprecated Use `constants.Z_BLOCK` */
const Z_BLOCK: number;
// Return codes for the compression/decompression functions.
// Negative values are errors, positive values are used for special but normal events.
/** @deprecated Use `constants.Z_OK` */
const Z_OK: number;
/** @deprecated Use `constants.Z_STREAM_END` */
const Z_STREAM_END: number;
/** @deprecated Use `constants.Z_NEED_DICT` */
const Z_NEED_DICT: number;
/** @deprecated Use `constants.Z_ERRNO` */
const Z_ERRNO: number;
/** @deprecated Use `constants.Z_STREAM_ERROR` */
const Z_STREAM_ERROR: number;
/** @deprecated Use `constants.Z_DATA_ERROR` */
const Z_DATA_ERROR: number;
/** @deprecated Use `constants.Z_MEM_ERROR` */
const Z_MEM_ERROR: number;
/** @deprecated Use `constants.Z_BUF_ERROR` */
const Z_BUF_ERROR: number;
/** @deprecated Use `constants.Z_VERSION_ERROR` */
const Z_VERSION_ERROR: number;
// Compression levels.
/** @deprecated Use `constants.Z_NO_COMPRESSION` */
const Z_NO_COMPRESSION: number;
/** @deprecated Use `constants.Z_BEST_SPEED` */
const Z_BEST_SPEED: number;
/** @deprecated Use `constants.Z_BEST_COMPRESSION` */
const Z_BEST_COMPRESSION: number;
/** @deprecated Use `constants.Z_DEFAULT_COMPRESSION` */
const Z_DEFAULT_COMPRESSION: number;
// Compression strategy.
/** @deprecated Use `constants.Z_FILTERED` */
const Z_FILTERED: number;
/** @deprecated Use `constants.Z_HUFFMAN_ONLY` */
const Z_HUFFMAN_ONLY: number;
/** @deprecated Use `constants.Z_RLE` */
const Z_RLE: number;
/** @deprecated Use `constants.Z_FIXED` */
const Z_FIXED: number;
/** @deprecated Use `constants.Z_DEFAULT_STRATEGY` */
const Z_DEFAULT_STRATEGY: number;
/** @deprecated */
const Z_BINARY: number;
/** @deprecated */
const Z_TEXT: number;
/** @deprecated */
const Z_ASCII: number;
/** @deprecated */
const Z_UNKNOWN: number;
/** @deprecated */
const Z_DEFLATED: number;
}
declare module "node:zlib" {
export * from "zlib";
}
@@ -0,0 +1,97 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { RegExpValidator } = require("regexpp")
const { getRegExpCalls } = require("../utils")
const scNamePattern = /^(?:Script(?:_Extensions)?|scx?)$/u
const scValuePattern = /^(?:Dogr|Dogra|Gong|Gunjala_Gondi|Hanifi_Rohingya|Maka|Makasar|Medefaidrin|Medf|Old_Sogdian|Rohg|Sogd|Sogdian|Sogo)$/u
function isNewUnicodePropertyKeyValuePair(key, value) {
return scNamePattern.test(key) && scValuePattern.test(value)
}
function isNewBinaryUnicodeProperty(key) {
return key === "Extended_Pictographic"
}
/**
* Verify a given regular expression.
* @param {RuleContext} context The rule context to report.
* @param {Node} node The AST node to report.
* @param {string} pattern The pattern part of a RegExp.
* @param {string} flags The flags part of a RegExp.
* @returns {void}
*/
function verify(context, node, pattern, flags) {
try {
let foundValue = ""
new RegExpValidator({
onUnicodePropertyCharacterSet(start, end, _kind, key, value) {
if (foundValue) {
return
}
if (
value
? isNewUnicodePropertyKeyValuePair(key, value)
: isNewBinaryUnicodeProperty(key)
) {
foundValue = pattern.slice(start, end)
}
},
}).validatePattern(pattern, 0, pattern.length, flags.includes("u"))
if (foundValue) {
context.report({
node,
messageId: "forbidden",
data: { value: foundValue },
})
}
} catch (error) {
//istanbul ignore else
if (error.message.startsWith("Invalid regular expression:")) {
return
}
//istanbul ignore next
throw error
}
}
module.exports = {
meta: {
docs: {
description:
"disallow the new values of RegExp Unicode property escape sequences in ES2019",
category: "ES2019",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-regexp-unicode-property-escapes-2019.html",
},
fixable: null,
messages: {
forbidden: "ES2019 '{{value}}' is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Literal[regex]"(node) {
const { pattern, flags } = node.regex
verify(context, node, pattern || "", flags || "")
},
"Program:exit"() {
const scope = context.getScope()
for (const { node, pattern, flags } of getRegExpCalls(scope)) {
verify(context, node, pattern || "", flags || "")
}
},
}
},
}
@@ -0,0 +1,62 @@
var $01d3f539e91688c8$exports = require("./context.main.js");
var $3maub$reactariautils = require("@react-aria/utils");
var $3maub$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, "PressResponder", () => $3596bae48579386f$export$3351871ee4b288b8);
$parcel$export(module.exports, "ClearPressResponder", () => $3596bae48579386f$export$cf75428e0b9ed1ea);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $3596bae48579386f$export$3351871ee4b288b8 = /*#__PURE__*/ (0, ($parcel$interopDefault($3maub$react))).forwardRef(({ children: children, ...props }, ref)=>{
let isRegistered = (0, $3maub$react.useRef)(false);
let prevContext = (0, $3maub$react.useContext)((0, $01d3f539e91688c8$exports.PressResponderContext));
ref = (0, $3maub$reactariautils.useObjectRef)(ref || (prevContext === null || prevContext === void 0 ? void 0 : prevContext.ref));
let context = (0, $3maub$reactariautils.mergeProps)(prevContext || {}, {
...props,
ref: ref,
register () {
isRegistered.current = true;
if (prevContext) prevContext.register();
}
});
(0, $3maub$reactariautils.useSyncRef)(prevContext, ref);
(0, $3maub$react.useEffect)(()=>{
if (!isRegistered.current) {
console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.");
isRegistered.current = true; // only warn once in strict mode.
}
}, []);
return /*#__PURE__*/ (0, ($parcel$interopDefault($3maub$react))).createElement((0, $01d3f539e91688c8$exports.PressResponderContext).Provider, {
value: context
}, children);
});
function $3596bae48579386f$export$cf75428e0b9ed1ea({ children: children }) {
let context = (0, $3maub$react.useMemo)(()=>({
register: ()=>{}
}), []);
return /*#__PURE__*/ (0, ($parcel$interopDefault($3maub$react))).createElement((0, $01d3f539e91688c8$exports.PressResponderContext).Provider, {
value: context
}, children);
}
//# sourceMappingURL=PressResponder.main.js.map
@@ -0,0 +1,2 @@
export function formatHelpMessage(name: string, info?: Readonly<import("./help-list-types.js").HelpMessageInfo>): string;
//# sourceMappingURL=format-help.d.ts.map
@@ -0,0 +1 @@
{"name":"http-proxy-agent","version":"5.0.0","requiresBuild":false,"files":{"dist/agent.js":{"checkedAt":1794532121883,"integrity":"sha512-mBzjANSiVrwwrwmBcgWbcWjuIrqKxDtcJBF5O7fKtkgWh08oKmYacWSRveKHzr/KUorRdWL4RhEdiUJ+eYrZcQ==","mode":420,"size":6608},"dist/index.js":{"checkedAt":1794532121883,"integrity":"sha512-nMxQhB0tyqyumtGZ5VLawVoHGoHrm/FGMOBMiZ4ohLZMacbhilYmHMYHhQdf4xs0Rm7dTK/ddgYzciTFTh+0AA==","mode":420,"size":571},"package.json":{"checkedAt":1794532121883,"integrity":"sha512-u8ffb8At8lV++N7GLrDwGz6tp1KIuC3ehp1G5AXO+xvMOTec5u/IlOrijQoVQtIXEJjrsZ4glWe5al1uVO97ww==","mode":420,"size":1425},"dist/agent.js.map":{"checkedAt":1794532121884,"integrity":"sha512-ydUAi1KtcsuEaT6eoJayU3VzhpyjvcYR17hrbha7SfphTi+4VJMZa3PogmTYOZ+vNfcY/9QJGFyTqPiL0q9MvA==","mode":420,"size":3781},"dist/index.js.map":{"checkedAt":1794532121884,"integrity":"sha512-Z73XuluvZVxKf6nxyda61IEdg0A9hmZRZFZaoUlwHYyDIpom8Imokgl8Cfxi0x3H4fmAHB20ONT/iWkUESamxQ==","mode":420,"size":359},"README.md":{"checkedAt":1794532121884,"integrity":"sha512-3WwrRYa+yv3DJvUGaVPkEp+Z9vX1TzaGa/oLYbYUs9K2HtsAoNdtGu5pFjXp+g7aCYH6U61mM1UxS1Yb3UhzAw==","mode":420,"size":2527},"dist/agent.d.ts":{"checkedAt":1794532121884,"integrity":"sha512-+NvGnvT55R8+uKf2yYO6hcBqKKskjoAnuQ7kRc1raWIEn8kw2HvUT2xHfC5qVh+tYZCTJA6AA0R+1AfYf0AR2Q==","mode":420,"size":941},"dist/index.d.ts":{"checkedAt":1794532121884,"integrity":"sha512-oNfeVq2UuUHUv86un07xpkQ+Vg3sEp0UxNmYFLJ6bL7CnDv0kxSnFrDrVlvOVcb7XO09Awe8KfeX4jAYmJQgpA==","mode":420,"size":872}}}
@@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = require("react");
var useLoadingDelayPlugin = function useLoadingDelayPlugin(fetchInstance, _a) {
var loadingDelay = _a.loadingDelay,
ready = _a.ready;
var timerRef = (0, _react.useRef)(undefined);
if (!loadingDelay) {
return {};
}
var cancelTimeout = function cancelTimeout() {
if (timerRef.current) {
clearTimeout(timerRef.current);
}
};
return {
onBefore: function onBefore() {
cancelTimeout();
// Two cases:
// 1. ready === undefined
// 2. ready === true
if (ready !== false) {
timerRef.current = setTimeout(function () {
fetchInstance.setState({
loading: true
});
}, loadingDelay);
}
return {
loading: false
};
},
onFinally: function onFinally() {
cancelTimeout();
},
onCancel: function onCancel() {
cancelTimeout();
}
};
};
var _default = exports["default"] = useLoadingDelayPlugin;
@@ -0,0 +1,46 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
const { getSourceCode } = require("eslint-compat-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `Math.expm1` method.",
category: "ES2015",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-math-expm1.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"(program) {
const sourceCode = getSourceCode(context)
const tracker = new ReferenceTracker(
sourceCode.getScope(program),
)
for (const { node, path } of tracker.iterateGlobalReferences({
Math: {
expm1: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,498 @@
import { frame, mixNumber, setDragLock, percent } from 'motion-dom';
import { invariant } from 'motion-utils';
import { animateMotionValue } from '../../animation/interfaces/motion-value.mjs';
import { addDomEvent } from '../../events/add-dom-event.mjs';
import { addPointerEvent } from '../../events/add-pointer-event.mjs';
import { extractEventInfo } from '../../events/event-info.mjs';
import { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../projection/geometry/conversion.mjs';
import { calcLength } from '../../projection/geometry/delta-calc.mjs';
import { createBox } from '../../projection/geometry/models.mjs';
import { eachAxis } from '../../projection/utils/each-axis.mjs';
import { measurePageBox } from '../../projection/utils/measure.mjs';
import { getContextWindow } from '../../utils/get-context-window.mjs';
import { isRefObject } from '../../utils/is-ref-object.mjs';
import { addValueToWillChange } from '../../value/use-will-change/add-will-change.mjs';
import { PanSession } from '../pan/PanSession.mjs';
import { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';
const elementDragControls = new WeakMap();
class VisualElementDragControls {
constructor(visualElement) {
this.openDragLock = null;
this.isDragging = false;
this.currentDirection = null;
this.originPoint = { x: 0, y: 0 };
/**
* The permitted boundaries of travel, in pixels.
*/
this.constraints = false;
this.hasMutatedConstraints = false;
/**
* The per-axis resolved elastic values.
*/
this.elastic = createBox();
/**
* The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments.
*/
this.latestPointerEvent = null;
/**
* The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments.
*/
this.latestPanInfo = null;
this.visualElement = visualElement;
}
start(originEvent, { snapToCursor = false, distanceThreshold } = {}) {
/**
* Don't start dragging if this component is exiting
*/
const { presenceContext } = this.visualElement;
if (presenceContext && presenceContext.isPresent === false)
return;
const onSessionStart = (event) => {
const { dragSnapToOrigin } = this.getProps();
// Stop or pause any animations on both axis values immediately. This allows the user to throw and catch
// the component.
dragSnapToOrigin ? this.pauseAnimation() : this.stopAnimation();
if (snapToCursor) {
this.snapToCursor(extractEventInfo(event).point);
}
};
const onStart = (event, info) => {
// Attempt to grab the global drag gesture lock - maybe make this part of PanSession
const { drag, dragPropagation, onDragStart } = this.getProps();
if (drag && !dragPropagation) {
if (this.openDragLock)
this.openDragLock();
this.openDragLock = setDragLock(drag);
// If we don 't have the lock, don't start dragging
if (!this.openDragLock)
return;
}
this.latestPointerEvent = event;
this.latestPanInfo = info;
this.isDragging = true;
this.currentDirection = null;
this.resolveConstraints();
if (this.visualElement.projection) {
this.visualElement.projection.isAnimationBlocked = true;
this.visualElement.projection.target = undefined;
}
/**
* Record gesture origin
*/
eachAxis((axis) => {
let current = this.getAxisMotionValue(axis).get() || 0;
/**
* If the MotionValue is a percentage value convert to px
*/
if (percent.test(current)) {
const { projection } = this.visualElement;
if (projection && projection.layout) {
const measuredAxis = projection.layout.layoutBox[axis];
if (measuredAxis) {
const length = calcLength(measuredAxis);
current = length * (parseFloat(current) / 100);
}
}
}
this.originPoint[axis] = current;
});
// Fire onDragStart event
if (onDragStart) {
frame.postRender(() => onDragStart(event, info));
}
addValueToWillChange(this.visualElement, "transform");
const { animationState } = this.visualElement;
animationState && animationState.setActive("whileDrag", true);
};
const onMove = (event, info) => {
this.latestPointerEvent = event;
this.latestPanInfo = info;
const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();
// If we didn't successfully receive the gesture lock, early return.
if (!dragPropagation && !this.openDragLock)
return;
const { offset } = info;
// Attempt to detect drag direction if directionLock is true
if (dragDirectionLock && this.currentDirection === null) {
this.currentDirection = getCurrentDirection(offset);
// If we've successfully set a direction, notify listener
if (this.currentDirection !== null) {
onDirectionLock && onDirectionLock(this.currentDirection);
}
return;
}
// Update each point with the latest position
this.updateAxis("x", info.point, offset);
this.updateAxis("y", info.point, offset);
/**
* Ideally we would leave the renderer to fire naturally at the end of
* this frame but if the element is about to change layout as the result
* of a re-render we want to ensure the browser can read the latest
* bounding box to ensure the pointer and element don't fall out of sync.
*/
this.visualElement.render();
/**
* This must fire after the render call as it might trigger a state
* change which itself might trigger a layout update.
*/
onDrag && onDrag(event, info);
};
const onSessionEnd = (event, info) => {
this.latestPointerEvent = event;
this.latestPanInfo = info;
this.stop(event, info);
this.latestPointerEvent = null;
this.latestPanInfo = null;
};
const resumeAnimation = () => eachAxis((axis) => this.getAnimationState(axis) === "paused" &&
this.getAxisMotionValue(axis).animation?.play());
const { dragSnapToOrigin } = this.getProps();
this.panSession = new PanSession(originEvent, {
onSessionStart,
onStart,
onMove,
onSessionEnd,
resumeAnimation,
}, {
transformPagePoint: this.visualElement.getTransformPagePoint(),
dragSnapToOrigin,
distanceThreshold,
contextWindow: getContextWindow(this.visualElement),
});
}
/**
* @internal
*/
stop(event, panInfo) {
const finalEvent = event || this.latestPointerEvent;
const finalPanInfo = panInfo || this.latestPanInfo;
const isDragging = this.isDragging;
this.cancel();
if (!isDragging || !finalPanInfo || !finalEvent)
return;
const { velocity } = finalPanInfo;
this.startAnimation(velocity);
const { onDragEnd } = this.getProps();
if (onDragEnd) {
frame.postRender(() => onDragEnd(finalEvent, finalPanInfo));
}
}
/**
* @internal
*/
cancel() {
this.isDragging = false;
const { projection, animationState } = this.visualElement;
if (projection) {
projection.isAnimationBlocked = false;
}
this.panSession && this.panSession.end();
this.panSession = undefined;
const { dragPropagation } = this.getProps();
if (!dragPropagation && this.openDragLock) {
this.openDragLock();
this.openDragLock = null;
}
animationState && animationState.setActive("whileDrag", false);
}
updateAxis(axis, _point, offset) {
const { drag } = this.getProps();
// If we're not dragging this axis, do an early return.
if (!offset || !shouldDrag(axis, drag, this.currentDirection))
return;
const axisValue = this.getAxisMotionValue(axis);
let next = this.originPoint[axis] + offset[axis];
// Apply constraints
if (this.constraints && this.constraints[axis]) {
next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);
}
axisValue.set(next);
}
resolveConstraints() {
const { dragConstraints, dragElastic } = this.getProps();
const layout = this.visualElement.projection &&
!this.visualElement.projection.layout
? this.visualElement.projection.measure(false)
: this.visualElement.projection?.layout;
const prevConstraints = this.constraints;
if (dragConstraints && isRefObject(dragConstraints)) {
if (!this.constraints) {
this.constraints = this.resolveRefConstraints();
}
}
else {
if (dragConstraints && layout) {
this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);
}
else {
this.constraints = false;
}
}
this.elastic = resolveDragElastic(dragElastic);
/**
* If we're outputting to external MotionValues, we want to rebase the measured constraints
* from viewport-relative to component-relative.
*/
if (prevConstraints !== this.constraints &&
layout &&
this.constraints &&
!this.hasMutatedConstraints) {
eachAxis((axis) => {
if (this.constraints !== false &&
this.getAxisMotionValue(axis)) {
this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);
}
});
}
}
resolveRefConstraints() {
const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();
if (!constraints || !isRefObject(constraints))
return false;
const constraintsElement = constraints.current;
invariant(constraintsElement !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
const { projection } = this.visualElement;
// TODO
if (!projection || !projection.layout)
return false;
const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());
let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);
/**
* If there's an onMeasureDragConstraints listener we call it and
* if different constraints are returned, set constraints to that
*/
if (onMeasureDragConstraints) {
const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));
this.hasMutatedConstraints = !!userConstraints;
if (userConstraints) {
measuredConstraints = convertBoundingBoxToBox(userConstraints);
}
}
return measuredConstraints;
}
startAnimation(velocity) {
const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();
const constraints = this.constraints || {};
const momentumAnimations = eachAxis((axis) => {
if (!shouldDrag(axis, drag, this.currentDirection)) {
return;
}
let transition = (constraints && constraints[axis]) || {};
if (dragSnapToOrigin)
transition = { min: 0, max: 0 };
/**
* Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame
* of spring animations so we should look into adding a disable spring option to `inertia`.
* We could do something here where we affect the `bounceStiffness` and `bounceDamping`
* using the value of `dragElastic`.
*/
const bounceStiffness = dragElastic ? 200 : 1000000;
const bounceDamping = dragElastic ? 40 : 10000000;
const inertia = {
type: "inertia",
velocity: dragMomentum ? velocity[axis] : 0,
bounceStiffness,
bounceDamping,
timeConstant: 750,
restDelta: 1,
restSpeed: 10,
...dragTransition,
...transition,
};
// If we're not animating on an externally-provided `MotionValue` we can use the
// component's animation controls which will handle interactions with whileHover (etc),
// otherwise we just have to animate the `MotionValue` itself.
return this.startAxisValueAnimation(axis, inertia);
});
// Run all animations and then resolve the new drag constraints.
return Promise.all(momentumAnimations).then(onDragTransitionEnd);
}
startAxisValueAnimation(axis, transition) {
const axisValue = this.getAxisMotionValue(axis);
addValueToWillChange(this.visualElement, axis);
return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));
}
stopAnimation() {
eachAxis((axis) => this.getAxisMotionValue(axis).stop());
}
pauseAnimation() {
eachAxis((axis) => this.getAxisMotionValue(axis).animation?.pause());
}
getAnimationState(axis) {
return this.getAxisMotionValue(axis).animation?.state;
}
/**
* Drag works differently depending on which props are provided.
*
* - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.
* - Otherwise, we apply the delta to the x/y motion values.
*/
getAxisMotionValue(axis) {
const dragKey = `_drag${axis.toUpperCase()}`;
const props = this.visualElement.getProps();
const externalMotionValue = props[dragKey];
return externalMotionValue
? externalMotionValue
: this.visualElement.getValue(axis, (props.initial
? props.initial[axis]
: undefined) || 0);
}
snapToCursor(point) {
eachAxis((axis) => {
const { drag } = this.getProps();
// If we're not dragging this axis, do an early return.
if (!shouldDrag(axis, drag, this.currentDirection))
return;
const { projection } = this.visualElement;
const axisValue = this.getAxisMotionValue(axis);
if (projection && projection.layout) {
const { min, max } = projection.layout.layoutBox[axis];
axisValue.set(point[axis] - mixNumber(min, max, 0.5));
}
});
}
/**
* When the viewport resizes we want to check if the measured constraints
* have changed and, if so, reposition the element within those new constraints
* relative to where it was before the resize.
*/
scalePositionWithinConstraints() {
if (!this.visualElement.current)
return;
const { drag, dragConstraints } = this.getProps();
const { projection } = this.visualElement;
if (!isRefObject(dragConstraints) || !projection || !this.constraints)
return;
/**
* Stop current animations as there can be visual glitching if we try to do
* this mid-animation
*/
this.stopAnimation();
/**
* Record the relative position of the dragged element relative to the
* constraints box and save as a progress value.
*/
const boxProgress = { x: 0, y: 0 };
eachAxis((axis) => {
const axisValue = this.getAxisMotionValue(axis);
if (axisValue && this.constraints !== false) {
const latest = axisValue.get();
boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);
}
});
/**
* Update the layout of this element and resolve the latest drag constraints
*/
const { transformTemplate } = this.visualElement.getProps();
this.visualElement.current.style.transform = transformTemplate
? transformTemplate({}, "")
: "none";
projection.root && projection.root.updateScroll();
projection.updateLayout();
this.resolveConstraints();
/**
* For each axis, calculate the current progress of the layout axis
* within the new constraints.
*/
eachAxis((axis) => {
if (!shouldDrag(axis, drag, null))
return;
/**
* Calculate a new transform based on the previous box progress
*/
const axisValue = this.getAxisMotionValue(axis);
const { min, max } = this.constraints[axis];
axisValue.set(mixNumber(min, max, boxProgress[axis]));
});
}
addListeners() {
if (!this.visualElement.current)
return;
elementDragControls.set(this.visualElement, this);
const element = this.visualElement.current;
/**
* Attach a pointerdown event listener on this DOM element to initiate drag tracking.
*/
const stopPointerListener = addPointerEvent(element, "pointerdown", (event) => {
const { drag, dragListener = true } = this.getProps();
drag && dragListener && this.start(event);
});
const measureDragConstraints = () => {
const { dragConstraints } = this.getProps();
if (isRefObject(dragConstraints) && dragConstraints.current) {
this.constraints = this.resolveRefConstraints();
}
};
const { projection } = this.visualElement;
const stopMeasureLayoutListener = projection.addEventListener("measure", measureDragConstraints);
if (projection && !projection.layout) {
projection.root && projection.root.updateScroll();
projection.updateLayout();
}
frame.read(measureDragConstraints);
/**
* Attach a window resize listener to scale the draggable target within its defined
* constraints as the window resizes.
*/
const stopResizeListener = addDomEvent(window, "resize", () => this.scalePositionWithinConstraints());
/**
* If the element's layout changes, calculate the delta and apply that to
* the drag gesture's origin point.
*/
const stopLayoutUpdateListener = projection.addEventListener("didUpdate", (({ delta, hasLayoutChanged }) => {
if (this.isDragging && hasLayoutChanged) {
eachAxis((axis) => {
const motionValue = this.getAxisMotionValue(axis);
if (!motionValue)
return;
this.originPoint[axis] += delta[axis].translate;
motionValue.set(motionValue.get() + delta[axis].translate);
});
this.visualElement.render();
}
}));
return () => {
stopResizeListener();
stopPointerListener();
stopMeasureLayoutListener();
stopLayoutUpdateListener && stopLayoutUpdateListener();
};
}
getProps() {
const props = this.visualElement.getProps();
const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;
return {
...props,
drag,
dragDirectionLock,
dragPropagation,
dragConstraints,
dragElastic,
dragMomentum,
};
}
}
function shouldDrag(direction, drag, currentDirection) {
return ((drag === true || drag === direction) &&
(currentDirection === null || currentDirection === direction));
}
/**
* Based on an x/y offset determine the current drag direction. If both axis' offsets are lower
* than the provided threshold, return `null`.
*
* @param offset - The x/y offset from origin.
* @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.
*/
function getCurrentDirection(offset, lockThreshold = 10) {
let direction = null;
if (Math.abs(offset.y) > lockThreshold) {
direction = "y";
}
else if (Math.abs(offset.x) > lockThreshold) {
direction = "x";
}
return direction;
}
export { VisualElementDragControls, elementDragControls };
@@ -0,0 +1,67 @@
// Chinese (China) [zh-cn]
import dayjs from '../index';
var locale = {
name: 'zh-cn',
weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
ordinal: function ordinal(number, period) {
switch (period) {
case 'W':
return number + "\u5468";
default:
return number + "\u65E5";
}
},
weekStart: 1,
yearStart: 4,
formats: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'YYYY/MM/DD',
LL: 'YYYY年M月D日',
LLL: 'YYYY年M月D日Ah点mm分',
LLLL: 'YYYY年M月D日ddddAh点mm分',
l: 'YYYY/M/D',
ll: 'YYYY年M月D日',
lll: 'YYYY年M月D日 HH:mm',
llll: 'YYYY年M月D日dddd HH:mm'
},
relativeTime: {
future: '%s内',
past: '%s前',
s: '几秒',
m: '1 分钟',
mm: '%d 分钟',
h: '1 小时',
hh: '%d 小时',
d: '1 天',
dd: '%d 天',
M: '1 个月',
MM: '%d 个月',
y: '1 年',
yy: '%d 年'
},
meridiem: function meridiem(hour, minute) {
var hm = hour * 100 + minute;
if (hm < 600) {
return '凌晨';
} else if (hm < 900) {
return '早上';
} else if (hm < 1100) {
return '上午';
} else if (hm < 1300) {
return '中午';
} else if (hm < 1800) {
return '下午';
}
return '晚上';
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1 @@
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,eAAO,MAAM,MAAM,EAAE,CACnB,EAAE,EAAE,OAAO,EACX,IAAI,EAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,KAC3B,MAAM,IAAqB,CAAA;AAChC,eAAO,MAAM,IAAI,YAAW,CAAA;AAC5B,eAAO,MAAM,MAAM,YAAW,CAAA"}
@@ -0,0 +1,115 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'prefer-for-of',
meta: {
type: 'suggestion',
docs: {
description: 'Enforce the use of `for-of` loop over the standard `for` loop where possible',
recommended: 'stylistic',
},
messages: {
preferForOf: 'Expected a `for-of` loop instead of a `for` loop with this simple iteration.',
},
schema: [],
},
defaultOptions: [],
create(context) {
function isSingleVariableDeclaration(node) {
return (node?.type === utils_1.AST_NODE_TYPES.VariableDeclaration &&
node.kind !== 'const' &&
node.declarations.length === 1);
}
function isLiteral(node, value) {
return node.type === utils_1.AST_NODE_TYPES.Literal && node.value === value;
}
function isZeroInitialized(node) {
return node.init != null && isLiteral(node.init, 0);
}
function isMatchingIdentifier(node, name) {
return node.type === utils_1.AST_NODE_TYPES.Identifier && node.name === name;
}
function isLessThanLengthExpression(node, name) {
if (node?.type === utils_1.AST_NODE_TYPES.BinaryExpression &&
node.operator === '<' &&
isMatchingIdentifier(node.left, name) &&
node.right.type === utils_1.AST_NODE_TYPES.MemberExpression &&
isMatchingIdentifier(node.right.property, 'length')) {
return node.right.object;
}
return null;
}
function isIncrement(node, name) {
if (!node) {
return false;
}
switch (node.type) {
case utils_1.AST_NODE_TYPES.UpdateExpression:
// x++ or ++x
return (node.operator === '++' && isMatchingIdentifier(node.argument, name));
case utils_1.AST_NODE_TYPES.AssignmentExpression:
if (isMatchingIdentifier(node.left, name)) {
if (node.operator === '+=') {
// x += 1
return isLiteral(node.right, 1);
}
if (node.operator === '=') {
// x = x + 1 or x = 1 + x
const expr = node.right;
return (expr.type === utils_1.AST_NODE_TYPES.BinaryExpression &&
expr.operator === '+' &&
((isMatchingIdentifier(expr.left, name) &&
isLiteral(expr.right, 1)) ||
(isLiteral(expr.left, 1) &&
isMatchingIdentifier(expr.right, name))));
}
}
}
return false;
}
function contains(outer, inner) {
return (outer.range[0] <= inner.range[0] && outer.range[1] >= inner.range[1]);
}
function isIndexOnlyUsedWithArray(body, indexVar, arrayExpression) {
const arrayText = context.sourceCode.getText(arrayExpression);
return indexVar.references.every(reference => {
const id = reference.identifier;
const node = id.parent;
return (!contains(body, id) ||
(node.type === utils_1.AST_NODE_TYPES.MemberExpression &&
node.object.type !== utils_1.AST_NODE_TYPES.ThisExpression &&
node.property === id &&
context.sourceCode.getText(node.object) === arrayText &&
!(0, util_1.isAssignee)(node)));
});
}
return {
'ForStatement:exit'(node) {
if (!isSingleVariableDeclaration(node.init)) {
return;
}
const declarator = node.init.declarations[0];
if (!declarator ||
!isZeroInitialized(declarator) ||
declarator.id.type !== utils_1.AST_NODE_TYPES.Identifier) {
return;
}
const indexName = declarator.id.name;
const arrayExpression = isLessThanLengthExpression(node.test, indexName);
if (!arrayExpression) {
return;
}
const [indexVar] = context.sourceCode.getDeclaredVariables(node.init);
if (isIncrement(node.update, indexName) &&
isIndexOnlyUsedWithArray(node.body, indexVar, arrayExpression)) {
context.report({
node,
messageId: 'preferForOf',
});
}
},
};
},
});
@@ -0,0 +1,6 @@
import {
useSeparator
} from "./chunk-D2EG5U3Q.mjs";
export {
useSeparator
};
@@ -0,0 +1,9 @@
class Feature {
constructor(node) {
this.isMounted = false;
this.node = node;
}
update() { }
}
export { Feature };
@@ -0,0 +1,54 @@
/**
* These are types for things that are present in the `experimental` builds of React but not yet
* on a stable build.
*
* Once they are promoted to stable they can just be moved to the main index file.
*
* To load the types declared here in an actual project, there are three ways. The easiest one,
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
* is to add `"react-dom/experimental"` to the `"types"` array.
*
* Alternatively, a specific import syntax can to be used from a typescript file.
* This module does not exist in reality, which is why the {} is important:
*
* ```ts
* import {} from 'react-dom/experimental'
* ```
*
* It is also possible to include it through a triple-slash reference:
*
* ```ts
* /// <reference types="react-dom/experimental" />
* ```
*
* Either the import or the reference only needs to appear once, anywhere in the project.
*/
// See https://github.com/facebook/react/blob/main/packages/react-dom/index.experimental.js to see how the exports are declared,
// but confirm with published source code (e.g. https://unpkg.com/react-dom@experimental) that these exports end up in the published code
import React = require("react");
import ReactDOM = require("./canary");
export {};
declare const UNDEFINED_VOID_ONLY: unique symbol;
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
declare module "." {
}
declare module "react" {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface GestureProvider extends AnimationTimeline {}
}
declare module "./client" {
type TransitionIndicatorCleanup = () => VoidOrUndefinedOnly;
interface RootOptions {
onDefaultTransitionIndicator?: (() => void | TransitionIndicatorCleanup) | undefined;
}
interface HydrationOptions {
onDefaultTransitionIndicator?: (() => void | TransitionIndicatorCleanup) | undefined;
}
}
@@ -0,0 +1,52 @@
let Declaration = require('../declaration')
let { isPureNumber } = require('../utils')
class GridEnd extends Declaration {
/**
* Change repeating syntax for IE
*/
insert(decl, prefix, prefixes, result) {
if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
let clonedDecl = this.clone(decl)
let startProp = decl.prop.replace(/end$/, 'start')
let spanProp = prefix + decl.prop.replace(/end$/, 'span')
if (decl.parent.some(i => i.prop === spanProp)) {
return undefined
}
clonedDecl.prop = spanProp
if (decl.value.includes('span')) {
clonedDecl.value = decl.value.replace(/span\s/i, '')
} else {
let startDecl
decl.parent.walkDecls(startProp, d => {
startDecl = d
})
if (startDecl) {
if (isPureNumber(startDecl.value)) {
let value = Number(decl.value) - Number(startDecl.value) + ''
clonedDecl.value = value
} else {
return undefined
}
} else {
decl.warn(
result,
`Can not prefix ${decl.prop} (${startProp} is not found)`
)
}
}
decl.cloneBefore(clonedDecl)
return undefined
}
}
GridEnd.names = ['grid-row-end', 'grid-column-end']
module.exports = GridEnd
@@ -0,0 +1 @@
{"name":"is-bigint","version":"1.1.0","requiresBuild":false,"files":{".eslintrc":{"checkedAt":1794532097671,"integrity":"sha512-4+yheARSL/pPQeg25245ejEKIOgmGjgRW2fotkREQVMDnQQZj7Rw9FvimX0senKxW9R3GgLHQbPLwHLqbvQy6Q==","mode":420,"size":43},".nycrc":{"checkedAt":1794532097671,"integrity":"sha512-2vm1RFz8Ajl/OYrfoCWPJIm3Bpnf7Gyn5bha/lZx/cq+We3uMy9xj15XeP6x4wF3jf/pO7KMHAkU9mllm605xg==","mode":420,"size":139},"LICENSE":{"checkedAt":1794532097671,"integrity":"sha512-2OWQhRmHTKt3rYbHOrwTDQOhnQEL6mjR3H1mMql4QfQcDa0rpjgTAf2zpWl5RLE5AzLmekxiNW5px+HAcw0n0Q==","mode":420,"size":1071},"index.js":{"checkedAt":1794532097671,"integrity":"sha512-8UBEeTg2KmWbBFwGL1Rr89megINTm7ASf6+5uVWEtFGylY8Z7ZyfpgynGnvorilYaJWy0N3t3ZBOXJwryhuo1w==","mode":420,"size":844},"test/index.js":{"checkedAt":1794532097671,"integrity":"sha512-g1pU55oj0wOaExU0xUS2A4QSTYXSguBcQlMybzUKLv+atcdkcPZbb0/DMCn3Zy9NfvYMeMcoW8K+rXOYpXKuPA==","mode":420,"size":2196},"package.json":{"checkedAt":1794532097671,"integrity":"sha512-VkMwNh5DPWT1gES6ygSFrJa3JdsCmU8atB7j6/HAOy14dsk4fMsBhWzeA5jGhK2ZfKG50oMF5do3PR2iv4BHXQ==","mode":420,"size":2067},"tsconfig.json":{"checkedAt":1794532097671,"integrity":"sha512-G5TL2bnT395BqGez+9xQ1y3SLgDH02BmKrcCPi2ZqYX4R9bnh5r/5OndAzu60nrsK4zZ2iGgHtH1RKQ1ridK5g==","mode":420,"size":114},"CHANGELOG.md":{"checkedAt":1794532097672,"integrity":"sha512-fCDXQCpmtXM53daexG2ApPtQh6PQI9erJy09xnKAUf0gwnhSNPZXeBYQFa3Ua98S0rcVOtSoY99b11yJjV8Fmg==","mode":420,"size":9128},"README.md":{"checkedAt":1794532097672,"integrity":"sha512-3XZWsZKRoFXGvvz4SGC9eXjMxp4sX9+dtHOKweIe3tByY+s/CjxqX3JHeYtSoM7TZ5xnkQYGFnA9QfBBsJT4jw==","mode":420,"size":1623},"index.d.ts":{"checkedAt":1794532097672,"integrity":"sha512-p31HbGL2z6ow6QDlU5eKK8aKlJsOQgADX562/iud5PBNDvhR0zflbaXywt+xfqPH2+HYHN9ouGgfBZCZ/Lg+hQ==","mode":420,"size":90},".github/FUNDING.yml":{"checkedAt":1794532097672,"integrity":"sha512-1o4XBlZQMLt7dAg0jfHm+tNirwwixjPf0gPQ5HI17wn4ipR2sMyVR622xYqNBVvjk7SAdXeCsAYAfKsq3HJPqw==","mode":420,"size":580}}}
@@ -0,0 +1 @@
{"version":3,"file":"case-insensitive-transform.d.ts","sourceRoot":"","sources":["case-insensitive-transform.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,qDAPW,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YAEtB,MAAM,GAEJ,MAAM,CAKlB"}
@@ -0,0 +1 @@
!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_fa=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"fa",weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekStart:6,months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"}};return t.default.locale(d,null,!0),d}));
@@ -0,0 +1 @@
{"version":3,"file":"resolveFactoryBindingCallback.d.ts","sourceRoot":"","sources":["../../../../src/resolution/calculations/resolveFactoryBindingCallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,wBAAgB,6BAA6B,CAC3C,UAAU,SAAS,OAAO,CAAC,OAAO,CAAC,EAEnC,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC,GAClC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAElC"}
@@ -0,0 +1,300 @@
"use client";
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/tooltip.tsx
var tooltip_exports = {};
__export(tooltip_exports, {
default: () => tooltip_default
});
module.exports = __toCommonJS(tooltip_exports);
var import_system2 = require("@heroui/system");
var import_overlays2 = require("@react-aria/overlays");
var import_framer_motion = require("framer-motion");
var import_framer_utils = require("@heroui/framer-utils");
var import_shared_utils2 = require("@heroui/shared-utils");
var import_react3 = require("react");
var import_aria_utils2 = require("@heroui/aria-utils");
var import_utils2 = require("@react-aria/utils");
// src/use-tooltip.ts
var import_react = require("react");
var import_tooltip = require("@react-stately/tooltip");
var import_utils = require("@react-aria/utils");
var import_tooltip2 = require("@react-aria/tooltip");
var import_overlays = require("@react-aria/overlays");
var import_system = require("@heroui/system");
var import_theme = require("@heroui/theme");
var import_shared_utils = require("@heroui/shared-utils");
var import_react_utils = require("@heroui/react-utils");
var import_react_utils2 = require("@heroui/react-utils");
var import_react2 = require("react");
var import_aria_utils = require("@heroui/aria-utils");
var import_use_safe_layout_effect = require("@heroui/use-safe-layout-effect");
function useTooltip(originalProps) {
var _a, _b;
const globalContext = (0, import_system.useProviderContext)();
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.popover.variantKeys);
const {
ref,
as,
isOpen: isOpenProp,
content,
children,
defaultOpen,
onOpenChange,
isDisabled,
trigger: triggerAction,
shouldFlip = true,
containerPadding = 12,
placement: placementProp = "top",
delay = 0,
closeDelay = 500,
showArrow = false,
offset = 7,
crossOffset = 0,
isDismissable,
shouldCloseOnBlur = true,
portalContainer,
isKeyboardDismissDisabled = false,
updatePositionDeps = [],
shouldCloseOnInteractOutside,
className,
onClose,
motionProps,
classNames,
...otherProps
} = props;
const Component = as || "div";
const disableAnimation = (_b = (_a = originalProps == null ? void 0 : originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const state = (0, import_tooltip.useTooltipTriggerState)({
delay,
closeDelay,
isDisabled,
defaultOpen,
isOpen: isOpenProp,
onOpenChange: (isOpen2) => {
onOpenChange == null ? void 0 : onOpenChange(isOpen2);
if (!isOpen2) {
onClose == null ? void 0 : onClose();
}
}
});
const triggerRef = (0, import_react2.useRef)(null);
const overlayRef = (0, import_react2.useRef)(null);
const tooltipId = (0, import_react.useId)();
const isOpen = state.isOpen && !isDisabled;
(0, import_react.useImperativeHandle)(
ref,
() => (0, import_react_utils2.createDOMRef)(overlayRef)
);
const { triggerProps, tooltipProps: triggerTooltipProps } = (0, import_tooltip2.useTooltipTrigger)(
{
isDisabled,
trigger: triggerAction
},
state,
triggerRef
);
const { tooltipProps } = (0, import_tooltip2.useTooltip)(
{
isOpen,
...(0, import_utils.mergeProps)(props, triggerTooltipProps)
},
state
);
const {
overlayProps: positionProps,
placement,
updatePosition
} = (0, import_overlays.useOverlayPosition)({
isOpen,
targetRef: triggerRef,
placement: (0, import_aria_utils.toReactAriaPlacement)(placementProp),
overlayRef,
offset: showArrow ? offset + 3 : offset,
crossOffset,
shouldFlip,
containerPadding
});
(0, import_use_safe_layout_effect.useSafeLayoutEffect)(() => {
if (!updatePositionDeps.length)
return;
updatePosition();
}, updatePositionDeps);
const { overlayProps } = (0, import_overlays.useOverlay)(
{
isOpen,
onClose: state.close,
isDismissable,
shouldCloseOnBlur,
isKeyboardDismissDisabled,
shouldCloseOnInteractOutside
},
overlayRef
);
const slots = (0, import_react2.useMemo)(
() => {
var _a2, _b2, _c;
return (0, import_theme.popover)({
...variantProps,
disableAnimation,
radius: (_a2 = originalProps == null ? void 0 : originalProps.radius) != null ? _a2 : "md",
size: (_b2 = originalProps == null ? void 0 : originalProps.size) != null ? _b2 : "md",
shadow: (_c = originalProps == null ? void 0 : originalProps.shadow) != null ? _c : "sm"
});
},
[
(0, import_shared_utils.objectToDeps)(variantProps),
disableAnimation,
originalProps == null ? void 0 : originalProps.radius,
originalProps == null ? void 0 : originalProps.size,
originalProps == null ? void 0 : originalProps.shadow
]
);
const getTriggerProps = (0, import_react2.useCallback)(
(props2 = {}, _ref = null) => ({
...(0, import_utils.mergeProps)(triggerProps, props2),
ref: (0, import_react_utils.mergeRefs)(_ref, triggerRef),
"aria-describedby": isOpen ? tooltipId : void 0
}),
[triggerProps, isOpen, tooltipId, state]
);
const getTooltipProps = (0, import_react2.useCallback)(
() => ({
ref: overlayRef,
"data-slot": "base",
"data-open": (0, import_shared_utils.dataAttr)(isOpen),
"data-arrow": (0, import_shared_utils.dataAttr)(showArrow),
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
"data-placement": (0, import_aria_utils.getArrowPlacement)(placement || "top", placementProp),
...(0, import_utils.mergeProps)(tooltipProps, overlayProps, otherProps),
style: (0, import_utils.mergeProps)(positionProps.style, otherProps.style, props.style),
className: slots.base({ class: classNames == null ? void 0 : classNames.base }),
id: tooltipId
}),
[
slots,
isOpen,
showArrow,
isDisabled,
placement,
placementProp,
tooltipProps,
overlayProps,
otherProps,
positionProps,
props,
tooltipId
]
);
const getTooltipContentProps = (0, import_react2.useCallback)(
() => ({
"data-slot": "content",
"data-open": (0, import_shared_utils.dataAttr)(isOpen),
"data-arrow": (0, import_shared_utils.dataAttr)(showArrow),
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
"data-placement": (0, import_aria_utils.getArrowPlacement)(placement || "top", placementProp),
className: slots.content({ class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.content, className) })
}),
[slots, isOpen, showArrow, isDisabled, placement, placementProp, classNames]
);
return {
Component,
content,
children,
isOpen,
triggerRef,
showArrow,
portalContainer,
placement: placementProp,
disableAnimation,
isDisabled,
motionProps,
getTooltipContentProps,
getTriggerProps,
getTooltipProps
};
}
// src/tooltip.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var domAnimation = () => import("@heroui/dom-animation").then((res) => res.default);
var Tooltip = (0, import_system2.forwardRef)((props, ref) => {
const {
Component,
children,
content,
isOpen,
portalContainer,
placement,
disableAnimation,
motionProps,
getTriggerProps,
getTooltipProps,
getTooltipContentProps
} = useTooltip({
...props,
ref
});
let trigger;
try {
const childrenNum = import_react3.Children.count(children);
if (childrenNum !== 1)
throw new Error();
if (!(0, import_react3.isValidElement)(children)) {
trigger = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { ...getTriggerProps(), children });
} else {
const child = children;
trigger = (0, import_react3.cloneElement)(child, getTriggerProps(child.props, child.ref));
}
} catch (error) {
trigger = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {});
(0, import_shared_utils2.warn)("Tooltip must have only one child node. Please, check your code.");
}
const { ref: tooltipRef, id, style, ...otherTooltipProps } = getTooltipProps();
const animatedContent = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: tooltipRef, id, style, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.LazyMotion, { features: domAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_framer_motion.m.div,
{
animate: "enter",
exit: "exit",
initial: "exit",
variants: import_framer_utils.TRANSITION_VARIANTS.scaleSpring,
...(0, import_utils2.mergeProps)(motionProps, otherTooltipProps),
style: {
...(0, import_aria_utils2.getTransformOrigins)(placement)
},
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...getTooltipContentProps(), children: content })
}
) }) });
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
trigger,
disableAnimation && isOpen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_overlays2.OverlayContainer, { portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: tooltipRef, id, style, ...otherTooltipProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...getTooltipContentProps(), children: content }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_overlays2.OverlayContainer, { portalContainer, children: animatedContent }) : null })
] });
});
Tooltip.displayName = "HeroUI.Tooltip";
var tooltip_default = Tooltip;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
@@ -0,0 +1,10 @@
export declare class NodeIKernelRecentContactListener {
onDeletedContactsNotify(..._args: unknown[]): any;
onRecentContactNotification(_msgList: any, _arg0: {
msgListUnreadCnt: string;
}, _arg1: number): any;
onMsgUnreadCountUpdate(..._args: unknown[]): any;
onGuildDisplayRecentContactListChanged(..._args: unknown[]): any;
onRecentContactListChanged(..._args: unknown[]): any;
onRecentContactListChangedVer2(..._args: unknown[]): any;
}
@@ -0,0 +1,94 @@
import type {Data, ElementContent, Literal, Properties} from 'hast'
// Expose types.
export type {
FootnoteBackContentTemplate,
FootnoteBackLabelTemplate
} from './lib/footer.js'
export type {Handler, Handlers, Options, State} from './lib/state.js'
// Expose JS API.
export {handlers as defaultHandlers} from './lib/handlers/index.js'
export {
defaultFootnoteBackContent,
defaultFootnoteBackLabel
} from './lib/footer.js'
export {toHast} from './lib/index.js'
/**
* Raw string of HTML embedded into HTML AST.
*/
export interface Raw extends Literal {
/**
* Node type of raw.
*/
type: 'raw'
/**
* Data associated with the hast raw.
*/
data?: RawData | undefined
}
/**
* Info associated with hast raw nodes by the ecosystem.
*/
export interface RawData extends Data {}
// Register nodes in content.
declare module 'hast' {
interface ElementData {
/**
* Custom info relating to the node, if `<code>` in `<pre>`.
*
* Defined by `mdast-util-to-hast` (`remark-rehype`).
*/
meta?: string | null | undefined
}
interface ElementContentMap {
/**
* Raw string of HTML embedded into HTML AST.
*/
raw: Raw
}
interface RootContentMap {
/**
* Raw string of HTML embedded into HTML AST.
*/
raw: Raw
}
}
// Register data on mdast.
declare module 'mdast' {
interface Data {
/**
* Field supported by `mdast-util-to-hast` to signal that a node should
* result in something with these children.
*
* When this is defined, when a parent is created, these children will
* be used.
*/
hChildren?: ElementContent[] | undefined
/**
* Field supported by `mdast-util-to-hast` to signal that a node should
* result in a particular element, instead of its default behavior.
*
* When this is defined, an element with the given tag name is created.
* For example, when setting `hName` to `'b'`, a `<b>` element is created.
*/
hName?: string | undefined
/**
* Field supported by `mdast-util-to-hast` to signal that a node should
* result in an element with these properties.
*
* When this is defined, when an element is created, these properties will
* be used.
*/
hProperties?: Properties | undefined
}
}
@@ -0,0 +1,57 @@
import Scope from '../../scope.js';
import type { Leaf } from './blot.js';
import ShadowBlot from './shadow.js';
class LeafBlot extends ShadowBlot implements Leaf {
public static scope = Scope.INLINE_BLOT;
/**
* Returns the value represented by domNode if it is this Blot's type
* No checking that domNode can represent this Blot type is required so
* applications needing it should check externally before calling.
*/
public static value(_domNode: Node): any {
return true;
}
/**
* Given location represented by node and offset from DOM Selection Range,
* return index to that location.
*/
public index(node: Node, offset: number): number {
if (
this.domNode === node ||
this.domNode.compareDocumentPosition(node) &
Node.DOCUMENT_POSITION_CONTAINED_BY
) {
return Math.min(offset, 1);
}
return -1;
}
/**
* Given index to location within blot, return node and offset representing
* that location, consumable by DOM Selection Range
*/
public position(index: number, _inclusive?: boolean): [Node, number] {
const childNodes: Node[] = Array.from(this.parent.domNode.childNodes);
let offset = childNodes.indexOf(this.domNode);
if (index > 0) {
offset += 1;
}
return [this.parent.domNode, offset];
}
/**
* Return value represented by this blot
* Should not change without interaction from API or
* user change detectable by update()
*/
public value(): any {
return {
[this.statics.blotName]: this.statics.value(this.domNode) || true,
};
}
}
export default LeafBlot;
@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNotParentBindingConstraintsWithName = isNotParentBindingConstraintsWithName;
const isBindingConstraintsWithName_1 = require("./isBindingConstraintsWithName");
const isNotParentBindingConstraints_1 = require("./isNotParentBindingConstraints");
function isNotParentBindingConstraintsWithName(name) {
return (0, isNotParentBindingConstraints_1.isNotParentBindingConstraints)((0, isBindingConstraintsWithName_1.isBindingConstraintsWithName)(name));
}
//# sourceMappingURL=isNotParentBindingConstraintsWithName.js.map
@@ -0,0 +1,47 @@
"use strict"
const {
definePrototypeMethodHandler,
} = require("../util/define-prototype-method-handler")
module.exports = {
meta: {
docs: {
description:
"disallow the `Array.prototype.{findLast,findLastIndex}` methods.",
category: "ES2023",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-array-prototype-findlast-findlastindex.html",
},
fixable: null,
messages: {
forbidden: "ES2023 '{{name}}' method is forbidden.",
},
schema: [
{
type: "object",
properties: {
aggressive: { type: "boolean" },
},
additionalProperties: false,
},
],
type: "problem",
},
create(context) {
return definePrototypeMethodHandler(context, {
Array: ["findLast", "findLastIndex"],
Int8Array: ["findLast", "findLastIndex"],
Uint8Array: ["findLast", "findLastIndex"],
Uint8ClampedArray: ["findLast", "findLastIndex"],
Int16Array: ["findLast", "findLastIndex"],
Uint16Array: ["findLast", "findLastIndex"],
Int32Array: ["findLast", "findLastIndex"],
Uint32Array: ["findLast", "findLastIndex"],
Float32Array: ["findLast", "findLastIndex"],
Float64Array: ["findLast", "findLastIndex"],
BigInt64Array: ["findLast", "findLastIndex"],
BigUint64Array: ["findLast", "findLastIndex"],
})
},
}
@@ -0,0 +1 @@
{"name":"motion-dom","version":"12.23.23","requiresBuild":false,"files":{"dist/cjs/index.js":{"checkedAt":1794532106478,"integrity":"sha512-BS6mHoW5cnWxoZTJEs1WA05WS8ZmY97wqeB92bGZp9iZBRFANLSmt1v+ErujqPyWr+Qw1kF80XShAvXlSOCijQ==","mode":420,"size":161958},"dist/motion-dom.dev.js":{"checkedAt":1794532106479,"integrity":"sha512-kk4JNhlGVG7V19ny1UiQyN/bjqBbx8xDFKzMQwqlEew4u/AQ0gop+STrbCSDOCjivKPVHdX6MjueTaWiG8dASA==","mode":420,"size":180769},"dist/motion-dom.js":{"checkedAt":1794532106479,"integrity":"sha512-ECarZoayYkkCDT6sBUNX0Y9TIoBlBtzg6BBSQrQVKYLtgGGlxyJPXU3RTe5UzcTTosSK1Z6omxQHviCJ458B6g==","mode":420,"size":53832},"dist/size-rollup-motion-value.js":{"checkedAt":1794532106479,"integrity":"sha512-gYR9CE0Rm2w/MLmYRx487vfpepcR8XUmo7xkuy+th3aEF5xvKvCv9Z2PPF/rySuMBiinWljtbxNQyBtR6pA0mw==","mode":420,"size":4675},"dist/size-rollup-style-effect.js":{"checkedAt":1794532106479,"integrity":"sha512-fFufONjSFV2iNab/+K3shXCym5GMY1gvUBHCpYGX10+blb8FuhZBucP15XkVyNFPGq8RAW2f9VjyeJJxEx1Jqw==","mode":420,"size":7890},"package.json":{"checkedAt":1794532106479,"integrity":"sha512-XB8L7K5XaMV7BOqCTLzz6dQeTKkn7fNRCQXYaNMSTE0EIYhkzjSGhpD2ob+/MeNYoC7B0IyVPSFRQbzpu9K7xw==","mode":420,"size":1341},"LICENSE.md":{"checkedAt":1794532106479,"integrity":"sha512-zg8k8mNHcPalqI3gKWjrjVK5YvuQNj3Sb+xuJPuxap3sFnIrgH/qttpVYh1zca7oBmJdakudYZuMmkNqr/m1cQ==","mode":420,"size":1100},"dist/es/animation/waapi/utils/accelerated-values.mjs":{"checkedAt":1794532106480,"integrity":"sha512-GXIh/OzMqcQeSYXL0gRWdsz6m546aLxog024GJVtbggQuaIjL1DKaiVpcKJxnAHXD34pxGGhOwV6BI5fvaFEqQ==","mode":420,"size":396},"dist/es/animation/utils/active-animations.mjs":{"checkedAt":1794532106480,"integrity":"sha512-w7XJpqGdpuQuSvCBw5J6CLd7A5rmYJ1L6yUo6Rfjgpgsd33I04L8zzdFiCc4Th6fQc5KI4R5lzt8QH8kJ0VRWA==","mode":420,"size":313},"dist/es/value/types/utils/animatable-none.mjs":{"checkedAt":1794532106480,"integrity":"sha512-xMnnvjN16dkofsw4xPFU87CLU8jADk1i4iJumzF2c3wLD4eX7RjghHGWfMhQneph5b9ftrebB0892BRZL9fTMA==","mode":420,"size":592},"dist/es/stats/animation-count.mjs":{"checkedAt":1794532106480,"integrity":"sha512-B+TOlyqWmNUvkT93liAMFv3pl/qgeBUzOnES1/s+U9Ti27DeiojSWmqPWMnWQ0DNmyb0KoxWLTmFzUtwY5eAig==","mode":420,"size":108},"dist/es/animation/waapi/utils/apply-generator.mjs":{"checkedAt":1794532106480,"integrity":"sha512-DfwsciSRggB1iIlIFfRwTfNTDdIKSZoVeFIJs9w5W0I7Hh2LRbuOpMmHJaiGILPIIUfLXHysIiZop/JGXp/20Q==","mode":420,"size":495},"dist/es/animation/keyframes/utils/apply-px-defaults.mjs":{"checkedAt":1794532106480,"integrity":"sha512-Tkl5SuUd1sKoMtfW+EXMPjqHWXJ6jE/VeAJpB0qAUpidfQ/EmU2MP5LDA3hKzTERCJYpLo9RZ3f9owgg4d4w7A==","mode":420,"size":319},"dist/es/animation/AsyncMotionValueAnimation.mjs":{"checkedAt":1794532106480,"integrity":"sha512-CdmGdZLCVYfTVG9kXafqt5PF5dY2/7T16VPB2TsqQt+mjvcOv4A6SEbRLHLkBFY6XZHHZwGqoQpKmEFc7A64ow==","mode":420,"size":6392},"dist/es/value/types/auto.mjs":{"checkedAt":1794532106481,"integrity":"sha512-ijyqeBlCw68SPQt8pIUNCapApZtf3pkvlBQrvgJ0lZbF0IIgzMAt/F1zWNdzrBIZPtlkFKb2Vm7I+HYDyOkdaw==","mode":420,"size":120},"dist/es/frameloop/batcher.mjs":{"checkedAt":1794532106481,"integrity":"sha512-a+LZaUmALy2xYV0PzStNb1T/CO3irYtNGpMXyOCLbxSPBhtUU3T9GTb0h4zl4+qZP91dxYrHISdOFbrk5BTzCw==","mode":420,"size":2468},"dist/es/stats/buffer.mjs":{"checkedAt":1794532106481,"integrity":"sha512-V13TdjqsMkPASV62BS6tqAVhYyzvc34hScmKseYLkr4RzSQB3wOHU+SjmtbABZQFkMULVYNXIfmpqZHMTbNxaQ==","mode":420,"size":99},"dist/es/animation/generators/utils/calc-duration.mjs":{"checkedAt":1794532106481,"integrity":"sha512-/UwbcB6qe8XTXl5gQYLXkJcPEXcvNm0crvWivtaeJoarftMJLVnAHDkebBNfPK9kY9GcV0F15iwUA21Hl2iYUg==","mode":420,"size":533},"dist/es/render/dom/utils/camel-to-dash.mjs":{"checkedAt":1794532106481,"integrity":"sha512-RVXo9OhBjD0rKF+LPdH3E9phcxcQUO6wS018qsvmdu4OK2uuxiJEWM3VmSCF6sZfsUSyJH/kOWx8AjcGUWF3Qg==","mode":420,"size":129},"dist/es/animation/utils/can-animate.mjs":{"checkedAt":1794532106481,"integrity":"sha512-NEdvLHGBznIGrsDFexGjbz/B459Mb2AvOsy89/qlbHi0F1cvo8l53HLYR9fWcA+UFxWwXqCCMskW32vaxN1qRQ==","mode":420,"size":1762},"dist/es/view/utils/choose-layer-type.mjs":{"checkedAt":1794532106481,"integrity":"sha512-DwjfjfNErmSIpGj+G2fMLWQqwpQUWJ3uq+GmHVXZ/I9v/IBOoha/IfjyKOyWUcH0r4jmCMnKpZT4z9cyDwrVPw==","mode":420,"size":296},"dist/es/value/types/utils/color-regex.mjs":{"checkedAt":1794532106481,"integrity":"sha512-j+yEDb/LcwTnwfkU+fx2Mxd62t6WuYDYIyL+/i7ppZXiIuiuCpOPXSnKeJsDRJyg2k+daN8oFTCZihNZWMjKsw==","mode":420,"size":161},"dist/es/utils/mix/color.mjs":{"checkedAt":1794532106482,"integrity":"sha512-2dhS/W0Vlzj9PZgfjJl3Sws9dPMuXgKjvWXzdAZqXt8AUfV7xBa0HzAv5OYNZcnK+TFEDc12u0vdX7rXy1cexw==","mode":420,"size":1831},"dist/es/utils/mix/complex.mjs":{"checkedAt":1794532106482,"integrity":"sha512-0vAc15uqfw8ef2Giy28++MJ2MVB4AuOT3imQwbtOkVncuMsE4umpVnOWFrFXY8Z78/hKJFvjBTuEjlYWrT86rg==","mode":420,"size":3384},"dist/es/effects/utils/create-dom-effect.mjs":{"checkedAt":1794532106482,"integrity":"sha512-XvbG56YTresOI4BZ7dMfaD4hblegahyLXHgMyREw+hmqExIEmqe0H8rW3bUdsG2oe4p2bE5Qtwv7zZo3MNZN0Line truncated
@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'prefer-namespace-keyword',
meta: {
type: 'suggestion',
docs: {
description: 'Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules',
recommended: 'recommended',
},
fixable: 'code',
messages: {
useNamespace: "Use 'namespace' instead of 'module' to declare custom TypeScript modules.",
},
schema: [],
},
defaultOptions: [],
create(context) {
return {
TSModuleDeclaration(node) {
// Do nothing if the name is a string.
if (node.id.type === utils_1.AST_NODE_TYPES.Literal) {
return;
}
// Get tokens of the declaration header.
const moduleType = context.sourceCode.getTokenBefore(node.id);
if (moduleType &&
moduleType.type === utils_1.AST_TOKEN_TYPES.Identifier &&
moduleType.value === 'module') {
context.report({
node,
messageId: 'useNamespace',
fix(fixer) {
return fixer.replaceText(moduleType, 'namespace');
},
});
}
},
};
},
});
@@ -0,0 +1,194 @@
"use client";
// src/use-menu-item.ts
import { useMemo, useRef, useCallback } from "react";
import { menuItem } from "@heroui/theme";
import { mapPropsVariants, useProviderContext } from "@heroui/system";
import { useFocusRing } from "@react-aria/focus";
import { clsx, dataAttr, objectToDeps, removeEvents, warn } from "@heroui/shared-utils";
import { useMenuItem as useAriaMenuItem } from "@react-aria/menu";
import { isFocusVisible as AriaIsFocusVisible, useHover } from "@react-aria/interactions";
import { mergeProps } from "@react-aria/utils";
import { useIsMobile } from "@heroui/use-is-mobile";
import { filterDOMProps } from "@heroui/react-utils";
function useMenuItem(originalProps) {
var _a, _b;
const globalContext = useProviderContext();
const [props, variantProps] = mapPropsVariants(originalProps, menuItem.variantKeys);
const {
as,
item,
state,
shortcut,
description,
startContent,
endContent,
isVirtualized,
selectedIcon,
className,
classNames,
onAction,
autoFocus,
onPress,
onPressStart,
onPressUp,
onPressEnd,
onPressChange,
onHoverStart: hoverStartProp,
onHoverChange,
onHoverEnd,
hideSelectedIcon = false,
isReadOnly = false,
closeOnSelect,
onClose,
onClick: deprecatedOnClick,
...otherProps
} = props;
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const domRef = useRef(null);
const Component = as || ((otherProps == null ? void 0 : otherProps.href) ? "a" : "li");
const shouldFilterDOMProps = typeof Component === "string";
const { rendered, key } = item;
const isDisabledProp = state.disabledKeys.has(key) || originalProps.isDisabled;
const isSelectable = state.selectionManager.selectionMode !== "none";
const isMobile = useIsMobile();
const { isFocusVisible, focusProps } = useFocusRing({
autoFocus
});
if (deprecatedOnClick && typeof deprecatedOnClick === "function") {
warn(
"onClick is deprecated, please use onPress instead. See: https://github.com/heroui-inc/heroui/issues/4292",
"MenuItem"
);
}
const handlePress = useCallback(
(e) => {
deprecatedOnClick == null ? void 0 : deprecatedOnClick(e);
onPress == null ? void 0 : onPress(e);
},
[deprecatedOnClick, onPress]
);
const {
isPressed,
isFocused,
isSelected,
isDisabled,
menuItemProps,
labelProps,
descriptionProps,
keyboardShortcutProps
} = useAriaMenuItem(
{
key,
onClose,
isDisabled: isDisabledProp,
onPress: handlePress,
onPressStart,
onPressUp,
onPressEnd,
onPressChange,
"aria-label": props["aria-label"],
closeOnSelect,
isVirtualized,
onAction
},
state,
domRef
);
let { hoverProps, isHovered } = useHover({
isDisabled,
onHoverStart(e) {
if (!AriaIsFocusVisible()) {
state.selectionManager.setFocused(true);
state.selectionManager.setFocusedKey(key);
}
hoverStartProp == null ? void 0 : hoverStartProp(e);
},
onHoverChange,
onHoverEnd
});
let itemProps = menuItemProps;
const slots = useMemo(
() => menuItem({
...variantProps,
isDisabled,
disableAnimation,
hasTitleTextChild: typeof rendered === "string",
hasDescriptionTextChild: typeof description === "string"
}),
[objectToDeps(variantProps), isDisabled, disableAnimation, rendered, description]
);
const baseStyles = clsx(classNames == null ? void 0 : classNames.base, className);
if (isReadOnly) {
itemProps = removeEvents(itemProps);
}
const getItemProps = (props2 = {}) => ({
ref: domRef,
...mergeProps(
isReadOnly ? {} : focusProps,
filterDOMProps(otherProps, {
enabled: shouldFilterDOMProps
}),
itemProps,
hoverProps,
props2
),
"data-focus": dataAttr(isFocused),
"data-selectable": dataAttr(isSelectable),
"data-hover": dataAttr(isMobile ? isHovered || isPressed : isHovered),
"data-disabled": dataAttr(isDisabled),
"data-selected": dataAttr(isSelected),
"data-pressed": dataAttr(isPressed),
"data-focus-visible": dataAttr(isFocusVisible),
className: slots.base({ class: clsx(baseStyles, props2.className) })
});
const getLabelProps = (props2 = {}) => ({
...mergeProps(labelProps, props2),
className: slots.title({ class: classNames == null ? void 0 : classNames.title })
});
const getDescriptionProps = (props2 = {}) => ({
...mergeProps(descriptionProps, props2),
className: slots.description({ class: classNames == null ? void 0 : classNames.description })
});
const getKeyboardShortcutProps = (props2 = {}) => ({
...mergeProps(keyboardShortcutProps, props2),
className: slots.shortcut({ class: classNames == null ? void 0 : classNames.shortcut })
});
const getSelectedIconProps = useCallback(
(props2 = {}) => {
return {
"aria-hidden": dataAttr(true),
"data-disabled": dataAttr(isDisabled),
className: slots.selectedIcon({ class: classNames == null ? void 0 : classNames.selectedIcon }),
...props2
};
},
[isDisabled, slots, classNames]
);
return {
Component,
domRef,
slots,
classNames,
isSelectable,
isSelected,
isDisabled,
rendered,
shortcut,
description,
startContent,
endContent,
selectedIcon,
disableAnimation,
getItemProps,
getLabelProps,
hideSelectedIcon,
getDescriptionProps,
getKeyboardShortcutProps,
getSelectedIconProps
};
}
export {
useMenuItem
};
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,oBAAoB,CAAC,gFAAgF,CAAC;AAC1H","sources":["packages/@react-aria/menu/intl/hr-HR.json"],"sourcesContent":["{\n \"longPressMessage\": \"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika\"\n}\n"],"names":[],"version":3,"file":"hr-HR.main.js.map"}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2021 Vercel, Inc.
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 @@
{"version":3,"file":"assertMetadataFromTypescriptIfManaged.js","sourceRoot":"","sources":["../../../../src/metadata/calculations/assertMetadataFromTypescriptIfManaged.ts"],"names":[],"mappings":";;AAMA,sFAYC;AAlBD,8EAA2E;AAC3E,sFAAmF;AAEnF,2FAAwF;AAGxF,SAAgB,qCAAqC,CACnD,QAAwE;IAExE,IACE,QAAQ,CAAC,IAAI,KAAK,6DAA6B,CAAC,OAAO;QACvD,QAAQ,CAAC,yBAAyB,KAAK,IAAI,EAC3C,CAAC;QACD,MAAM,IAAI,uCAAkB,CAC1B,+CAAsB,CAAC,0BAA0B,EACjD,2FAA2F,CAC5F,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TemplateLiteral = TemplateLiteral;
const type_1 = require("../create/type");
const syntax_1 = require("./syntax");
const pattern_1 = require("./pattern");
const value_1 = require("../guard/value");
const index_1 = require("../symbols/index");
/** `[Json]` Creates a TemplateLiteral type */
// prettier-ignore
function TemplateLiteral(unresolved, options) {
const pattern = (0, value_1.IsString)(unresolved)
? (0, pattern_1.TemplateLiteralPattern)((0, syntax_1.TemplateLiteralSyntax)(unresolved))
: (0, pattern_1.TemplateLiteralPattern)(unresolved);
return (0, type_1.CreateType)({ [index_1.Kind]: 'TemplateLiteral', type: 'string', pattern }, options);
}
@@ -0,0 +1,265 @@
import Delta from 'quill-delta';
import { EmbedBlot, Scope } from 'parchment';
import Quill from '../core/quill.js';
import logger from '../core/logger.js';
import Module from '../core/module.js';
const debug = logger('quill:toolbar');
class Toolbar extends Module {
constructor(quill, options) {
super(quill, options);
if (Array.isArray(this.options.container)) {
const container = document.createElement('div');
container.setAttribute('role', 'toolbar');
addControls(container, this.options.container);
quill.container?.parentNode?.insertBefore(container, quill.container);
this.container = container;
} else if (typeof this.options.container === 'string') {
this.container = document.querySelector(this.options.container);
} else {
this.container = this.options.container;
}
if (!(this.container instanceof HTMLElement)) {
debug.error('Container required for toolbar', this.options);
return;
}
this.container.classList.add('ql-toolbar');
this.controls = [];
this.handlers = {};
if (this.options.handlers) {
Object.keys(this.options.handlers).forEach(format => {
const handler = this.options.handlers?.[format];
if (handler) {
this.addHandler(format, handler);
}
});
}
Array.from(this.container.querySelectorAll('button, select')).forEach(input => {
// @ts-expect-error
this.attach(input);
});
this.quill.on(Quill.events.EDITOR_CHANGE, () => {
const [range] = this.quill.selection.getRange(); // quill.getSelection triggers update
this.update(range);
});
}
addHandler(format, handler) {
this.handlers[format] = handler;
}
attach(input) {
let format = Array.from(input.classList).find(className => {
return className.indexOf('ql-') === 0;
});
if (!format) return;
format = format.slice('ql-'.length);
if (input.tagName === 'BUTTON') {
input.setAttribute('type', 'button');
}
if (this.handlers[format] == null && this.quill.scroll.query(format) == null) {
debug.warn('ignoring attaching to nonexistent format', format, input);
return;
}
const eventName = input.tagName === 'SELECT' ? 'change' : 'click';
input.addEventListener(eventName, e => {
let value;
if (input.tagName === 'SELECT') {
// @ts-expect-error
if (input.selectedIndex < 0) return;
// @ts-expect-error
const selected = input.options[input.selectedIndex];
if (selected.hasAttribute('selected')) {
value = false;
} else {
value = selected.value || false;
}
} else {
if (input.classList.contains('ql-active')) {
value = false;
} else {
// @ts-expect-error
value = input.value || !input.hasAttribute('value');
}
e.preventDefault();
}
this.quill.focus();
const [range] = this.quill.selection.getRange();
if (this.handlers[format] != null) {
this.handlers[format].call(this, value);
} else if (
// @ts-expect-error
this.quill.scroll.query(format).prototype instanceof EmbedBlot) {
value = prompt(`Enter ${format}`); // eslint-disable-line no-alert
if (!value) return;
this.quill.updateContents(new Delta()
// @ts-expect-error Fix me later
.retain(range.index)
// @ts-expect-error Fix me later
.delete(range.length).insert({
[format]: value
}), Quill.sources.USER);
} else {
this.quill.format(format, value, Quill.sources.USER);
}
this.update(range);
});
this.controls.push([format, input]);
}
update(range) {
const formats = range == null ? {} : this.quill.getFormat(range);
this.controls.forEach(pair => {
const [format, input] = pair;
if (input.tagName === 'SELECT') {
let option = null;
if (range == null) {
option = null;
} else if (formats[format] == null) {
option = input.querySelector('option[selected]');
} else if (!Array.isArray(formats[format])) {
let value = formats[format];
if (typeof value === 'string') {
value = value.replace(/"/g, '\\"');
}
option = input.querySelector(`option[value="${value}"]`);
}
if (option == null) {
// @ts-expect-error TODO fix me later
input.value = ''; // TODO make configurable?
// @ts-expect-error TODO fix me later
input.selectedIndex = -1;
} else {
option.selected = true;
}
} else if (range == null) {
input.classList.remove('ql-active');
input.setAttribute('aria-pressed', 'false');
} else if (input.hasAttribute('value')) {
// both being null should match (default values)
// '1' should match with 1 (headers)
const value = formats[format];
const isActive = value === input.getAttribute('value') || value != null && value.toString() === input.getAttribute('value') || value == null && !input.getAttribute('value');
input.classList.toggle('ql-active', isActive);
input.setAttribute('aria-pressed', isActive.toString());
} else {
const isActive = formats[format] != null;
input.classList.toggle('ql-active', isActive);
input.setAttribute('aria-pressed', isActive.toString());
}
});
}
}
Toolbar.DEFAULTS = {};
function addButton(container, format, value) {
const input = document.createElement('button');
input.setAttribute('type', 'button');
input.classList.add(`ql-${format}`);
input.setAttribute('aria-pressed', 'false');
if (value != null) {
input.value = value;
input.setAttribute('aria-label', `${format}: ${value}`);
} else {
input.setAttribute('aria-label', format);
}
container.appendChild(input);
}
function addControls(container, groups) {
if (!Array.isArray(groups[0])) {
// @ts-expect-error
groups = [groups];
}
groups.forEach(controls => {
const group = document.createElement('span');
group.classList.add('ql-formats');
controls.forEach(control => {
if (typeof control === 'string') {
addButton(group, control);
} else {
const format = Object.keys(control)[0];
const value = control[format];
if (Array.isArray(value)) {
addSelect(group, format, value);
} else {
addButton(group, format, value);
}
}
});
container.appendChild(group);
});
}
function addSelect(container, format, values) {
const input = document.createElement('select');
input.classList.add(`ql-${format}`);
values.forEach(value => {
const option = document.createElement('option');
if (value !== false) {
option.setAttribute('value', String(value));
} else {
option.setAttribute('selected', 'selected');
}
input.appendChild(option);
});
container.appendChild(input);
}
Toolbar.DEFAULTS = {
container: null,
handlers: {
clean() {
const range = this.quill.getSelection();
if (range == null) return;
if (range.length === 0) {
const formats = this.quill.getFormat();
Object.keys(formats).forEach(name => {
// Clean functionality in existing apps only clean inline formats
if (this.quill.scroll.query(name, Scope.INLINE) != null) {
this.quill.format(name, false, Quill.sources.USER);
}
});
} else {
this.quill.removeFormat(range.index, range.length, Quill.sources.USER);
}
},
direction(value) {
const {
align
} = this.quill.getFormat();
if (value === 'rtl' && align == null) {
this.quill.format('align', 'right', Quill.sources.USER);
} else if (!value && align === 'right') {
this.quill.format('align', false, Quill.sources.USER);
}
this.quill.format('direction', value, Quill.sources.USER);
},
indent(value) {
const range = this.quill.getSelection();
// @ts-expect-error
const formats = this.quill.getFormat(range);
// @ts-expect-error
const indent = parseInt(formats.indent || 0, 10);
if (value === '+1' || value === '-1') {
let modifier = value === '+1' ? 1 : -1;
if (formats.direction === 'rtl') modifier *= -1;
this.quill.format('indent', indent + modifier, Quill.sources.USER);
}
},
link(value) {
if (value === true) {
value = prompt('Enter link URL:'); // eslint-disable-line no-alert
}
this.quill.format('link', value, Quill.sources.USER);
},
list(value) {
const range = this.quill.getSelection();
// @ts-expect-error
const formats = this.quill.getFormat(range);
if (value === 'check') {
if (formats.list === 'checked' || formats.list === 'unchecked') {
this.quill.format('list', false, Quill.sources.USER);
} else {
this.quill.format('list', 'unchecked', Quill.sources.USER);
}
} else {
this.quill.format('list', value, Quill.sources.USER);
}
}
}
};
export { Toolbar as default, addControls };
//# sourceMappingURL=toolbar.js.map
@@ -0,0 +1,39 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TemplateLiteralPatternError = void 0;
exports.TemplateLiteralPattern = TemplateLiteralPattern;
const index_1 = require("../patterns/index");
const index_2 = require("../symbols/index");
const index_3 = require("../error/index");
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
const kind_1 = require("../guard/kind");
// ------------------------------------------------------------------
// TemplateLiteralPatternError
// ------------------------------------------------------------------
class TemplateLiteralPatternError extends index_3.TypeBoxError {
}
exports.TemplateLiteralPatternError = TemplateLiteralPatternError;
// ------------------------------------------------------------------
// TemplateLiteralPattern
// ------------------------------------------------------------------
function Escape(value) {
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}
// prettier-ignore
function Visit(schema, acc) {
return ((0, kind_1.IsTemplateLiteral)(schema) ? schema.pattern.slice(1, schema.pattern.length - 1) :
(0, kind_1.IsUnion)(schema) ? `(${schema.anyOf.map((schema) => Visit(schema, acc)).join('|')})` :
(0, kind_1.IsNumber)(schema) ? `${acc}${index_1.PatternNumber}` :
(0, kind_1.IsInteger)(schema) ? `${acc}${index_1.PatternNumber}` :
(0, kind_1.IsBigInt)(schema) ? `${acc}${index_1.PatternNumber}` :
(0, kind_1.IsString)(schema) ? `${acc}${index_1.PatternString}` :
(0, kind_1.IsLiteral)(schema) ? `${acc}${Escape(schema.const.toString())}` :
(0, kind_1.IsBoolean)(schema) ? `${acc}${index_1.PatternBoolean}` :
(() => { throw new TemplateLiteralPatternError(`Unexpected Kind '${schema[index_2.Kind]}'`); })());
}
function TemplateLiteralPattern(kinds) {
return `^${kinds.map((schema) => Visit(schema, '')).join('')}\$`;
}
@@ -0,0 +1,181 @@
/**
* @file 空的ttf格式json对象
* @author mengke01(kekee000@gmail.com)
*/
/* eslint-disable */
export default {
"version": 1,
"numTables": 10,
"searchRange": 128,
"entrySelector": 3,
"rangeShift": 64,
"head": {
"version": 1,
"fontRevision": 1,
"checkSumAdjustment": 0,
"magickNumber": 1594834165,
"flags": 11,
"unitsPerEm": 1024,
"created": 1428940800000,
"modified": 1428940800000,
"xMin": 34,
"yMin": 0,
"xMax": 306,
"yMax": 682,
"macStyle": 0,
"lowestRecPPEM": 8,
"fontDirectionHint": 2,
"indexToLocFormat": 0,
"glyphDataFormat": 0
},
"glyf": [{
"contours": [
[{
"x": 34,
"y": 0,
"onCurve": true
}, {
"x": 34,
"y": 682,
"onCurve": true
}, {
"x": 306,
"y": 682,
"onCurve": true
}, {
"x": 306,
"y": 0,
"onCurve": true
}],
[{
"x": 68,
"y": 34,
"onCurve": true
}, {
"x": 272,
"y": 34,
"onCurve": true
}, {
"x": 272,
"y": 648,
"onCurve": true
}, {
"x": 68,
"y": 648,
"onCurve": true
}]
],
"xMin": 34,
"yMin": 0,
"xMax": 306,
"yMax": 682,
"advanceWidth": 374,
"leftSideBearing": 34,
"name": ".notdef"
}],
"cmap": {},
"name": {
"fontFamily": "fonteditor",
"fontSubFamily": "Medium",
"uniqueSubFamily": "FontEditor 1.0 : fonteditor",
"version": "Version 1.0 ; FontEditor (v0.0.1)",
"postScriptName": "fonteditor",
"fullName": "fonteditor"
},
"hhea": {
"version": 1,
"ascent": 812,
"descent": -212,
"lineGap": 92,
"advanceWidthMax": 374,
"minLeftSideBearing": 34,
"minRightSideBearing": 68,
"xMaxExtent": 306,
"caretSlopeRise": 1,
"caretSlopeRun": 0,
"caretOffset": 0,
"reserved0": 0,
"reserved1": 0,
"reserved2": 0,
"reserved3": 0,
"metricDataFormat": 0,
"numOfLongHorMetrics": 1
},
"post": {
"italicAngle": 0,
"postoints": 65411,
"underlinePosition": 50,
"underlineThickness": 0,
"isFixedPitch": 0,
"minMemType42": 0,
"maxMemType42": 0,
"minMemType1": 0,
"maxMemType1": 1,
"format": 2
},
"maxp": {
"version": 1.0,
"numGlyphs": 0,
"maxPoints": 0,
"maxContours": 0,
"maxCompositePoints": 0,
"maxCompositeContours": 0,
"maxZones": 0,
"maxTwilightPoints": 0,
"maxStorage": 0,
"maxFunctionDefs": 0,
"maxStackElements": 0,
"maxSizeOfInstructions": 0,
"maxComponentElements": 0,
"maxComponentDepth": 0
},
"OS/2": {
"version": 4,
"xAvgCharWidth": 1031,
"usWeightClass": 400,
"usWidthClass": 5,
"fsType": 0,
"ySubscriptXSize": 665,
"ySubscriptYSize": 716,
"ySubscriptXOffset": 0,
"ySubscriptYOffset": 143,
"ySuperscriptXSize": 665,
"ySuperscriptYSize": 716,
"ySuperscriptXOffset": 0,
"ySuperscriptYOffset": 491,
"yStrikeoutSize": 51,
"yStrikeoutPosition": 265,
"sFamilyClass": 0,
"bFamilyType": 2,
"bSerifStyle": 0,
"bWeight": 6,
"bProportion": 3,
"bContrast": 0,
"bStrokeVariation": 0,
"bArmStyle": 0,
"bLetterform": 0,
"bMidline": 0,
"bXHeight": 0,
"ulUnicodeRange1": 1,
"ulUnicodeRange2": 268435456,
"ulUnicodeRange3": 0,
"ulUnicodeRange4": 0,
"achVendID": "PfEd",
"fsSelection": 192,
"usFirstCharIndex": 65535,
"usLastCharIndex": -1,
"sTypoAscender": 812,
"sTypoDescender": -212,
"sTypoLineGap": 92,
"usWinAscent": 812,
"usWinDescent": 212,
"ulCodePageRange1": 1,
"ulCodePageRange2": 0,
"sxHeight": 792,
"sCapHeight": 0,
"usDefaultChar": 0,
"usBreakChar": 32,
"usMaxContext": 1
}
};
@@ -0,0 +1,4 @@
function _classPrivateMethodSet() {
throw new TypeError("attempted to reassign private method");
}
module.exports = _classPrivateMethodSet, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,7 @@
export interface Options {
allowAsThisParameter?: boolean;
allowInGenericTypeArguments?: boolean | [string, ...string[]];
}
export type MessageIds = 'invalidVoidForGeneric' | 'invalidVoidNotReturn' | 'invalidVoidNotReturnOrGeneric' | 'invalidVoidNotReturnOrThisParam' | 'invalidVoidNotReturnOrThisParamOrGeneric' | 'invalidVoidUnionConstituent';
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 @@
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../src/config/react.ts"],"names":[],"mappings":"AASA,eAAe;IACb,QAAQ,EAAE;QACR,qBAAqB,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;KACvC;IACD,aAAa,EAAE;QACb,YAAY,EAAE;YACZ,GAAG,EAAE,IAAI;SACV;KACF;CACqB,CAAA"}
@@ -0,0 +1,4 @@
'use strict';
/** @type {import('./ref')} */
module.exports = ReferenceError;
@@ -0,0 +1,825 @@
export default `flf2a$ 8 7 20 -1 7
CATWALK by Ron Fritz 8/94
Figlet Release 2/0
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
_//@
_//@
_//@
_/ @
_/ @
@
_//@
@@
_/ _/@
_/ _/@
@
@
@
@
@
@@
@
_// _// @
_////// _////@
_// _// @
_// _// @
_////// _////@
_// _// @
@@
_// @
_// _//@
_// @
_// @
_//@
_// _// @
_// @
@@
@
_// _// @
_// @
_// @
_// @
_// @
_// _// @
@@
_/ @
_// _//@
_// @
_/// @
_// @
_// _//@
_/ @
@@
_//@
_/@
@
@
@
@
@
@@
_//@
_// @
_// @
_// @
_// @
_// @
_//@
@@
_// @
_// @
_//@
_//@
_//@
_// @
_// @
@@
_// @
_// _// _//@
_/ _/ _// @
_//// _///////@
_/ _/ _// @
_// _// _//@
_// @
@@
@
_// @
_// @
_/// _/////@
_// @
_// @
@
@@
@
@
@
@
@
@
_//@
_/@@
@
@
@
_/////@
@
@
@
@@
@
@
@
@
@
@
_//@
@@
_//@
_// @
_// @
_// @
_// @
_// @
_// @
@@
@
_// @
_// _// @
_// _// @
_// _//@
_// _// @
_/// @
@@
@
_// @
_// @
_// @
_// @
_// @
_/////@
@@
@
_// _/ @
_/ _//@
_// @
_// @
_// @
_//////// @
@@
@
_// _// @
_// @
_// @
_// @
_//@
_///// @
@@
@
_// @
_ _// @
_/ _// @
_// _// @
_//// _/ _//@
_// @
@@
@
_// _/// @
_// @
_/// @
_// @
_//@
_/// _// @
@@
@
_// @
_// @
_// @
_/ _// @
_// _//@
_// _// @
@@
@
_///// _//@
_// @
_// @
_// @
_// @
_// @
@@
@
_/ @
_// _// @
_// _/ @
_// _/ @
_// _//@
_//// @
@@
@
_/ _// @
_// _//@
_/ _// @
_/ _// @
_// @
_// @
@@
@
@
@
@
_//@
@
_//@
@@
@
@
@
@
_//@
@
_//@
_/@@
_//@
_// @
_// @
_// @
_// @
_// @
_//@
@@
@
@
_//////@
@
_//////@
@
@
@@
_// @
_// @
_// @
_//@
_// @
_// @
_// @
@@
_/// @
_// @
_//@
_// @
_// @
@
_// @
@@
@
_/// @
_/ _// @
_/ _// _//@
_// _//_ _//@
_// \`\`\` @
_// @
@@
_/ @
_/ // @
_/ _// @
_// _// @
_////// _// @
_// _// @
_// _//@
@@
_// _// @
_/ _// @
_/ _//@
_/// _/ @
_/ _//@
_/ _/@
_//// _// @
@@
_// @
_// _//@
_// @
_// @
_// @
_// _//@
_//// @
@@
_///// @
_// _// @
_// _//@
_// _//@
_// _//@
_// _// @
_///// @
@@
_////////@
_// @
_// @
_////// @
_// @
_// @
_////////@
@@
_////////@
_// @
_// @
_////// @
_// @
_// @
_// @
@@
_//// @
_/ _// @
_// @
_// @
_// _////@
_// _/ @
_///// @
@@
_// _//@
_// _//@
_// _//@
_////// _//@
_// _//@
_// _//@
_// _//@
@@
_//@
_//@
_//@
_//@
_//@
_//@
_//@
@@
_//@
_//@
_//@
_//@
_//@
_/ _//@
_//// @
@@
_// _// @
_// _// @
_// _// @
_/ _/ @
_// _// @
_// _// @
_// _//@
@@
_// @
_// @
_// @
_// @
_// @
_// @
_////////@
@@
_// _//@
_/ _// _///@
_// _// _ _//@
_// _// _//@
_// _/ _//@
_// _//@
_// _//@
@@
_/// _//@
_/ _// _//@
_// _// _//@
_// _// _//@
_// _/ _//@
_// _/ //@
_// _//@
@@
_//// @
_// _// @
_// _//@
_// _//@
_// _//@
_// _// @
_//// @
@@
_/////// @
_// _//@
_// _//@
_/////// @
_// @
_// @
_// @
@@
_//// @
_// _// @
_// _//@
_// _//@
_// _//@
_// _/ _// @
_// // @
_/ @@
_/////// @
_// _// @
_// _// @
_/ _// @
_// _// @
_// _// @
_// _//@
@@
_// // @
_// _//@
_// @
_// @
_// @
_// _//@
_// // @
@@
_/// _//////@
_// @
_// @
_// @
_// @
_// @
_// @
@@
_// _//@
_// _//@
_// _//@
_// _//@
_// _//@
_// _//@
_///// @
@@
_// _//@
_// _// @
_// _// @
_// _// @
_// _// @
_//// @
_// @
@@
_// _//@
_// _//@
_// _/ _//@
_// _// _//@
_// _/ _// _//@
_/ _/ _////@
_// _//@
@@
_// _//@
_// _// @
_// _// @
_// @
_// _// @
_// _// @
_// _//@
@@
_// _//@
_// _// @
_// _// @
_// @
_// @
_// @
_// @
@@
_/////// _//@
_// @
_// @
_// @
_// @
_// @
_///////////@
@@
_////@
_// @
_// @
_// @
_// @
_// @
_////@
@@
_// @
_// @
_// @
_// @
_// @
_// @
_//@
@@
_////@
_//@
_//@
_//@
_//@
_//@
_////@
@@
_// @
_// _// @
_// _//@
@
@
@
@
@@
@
@
@
@
@
@
@
_/////@@
_//@
_/ @
@
@
@
@
@
@@
@
@
_// @
_// _// @
_// _// @
_// _// @
_// _///@
@@
_// @
_// @
_// @
_// _// @
_// _//@
_// _//@
_// _// @
@@
@
@
_///@
_// @
_// @
_// @
_///@
@@
_//@
_//@
_//@
_// _//@
_/ _//@
_/ _//@
_// _//@
@@
@
@
_// @
_/ _// @
_///// _//@
_/ @
_//// @
@@
_//@
_/ @
_/_/ _/@
_// @
_// @
_// @
_// @
@@
@
@
_// @
_// _//@
_// _//@
_// _//@
_// @
_// @@
@
_// @
_// @
_/ _/ @
_// _//@
_/ _//@
_// _//@
@@
@
_/@
@
_//@
_//@
_//@
_//@
@@
@
_//@
@
_//@
_//@
_//@
_//@
_/// @@
_// @
_// @
_// _//@
_// _// @
_/_// @
_// _// @
_// _//@
@@
_//@
_//@
_//@
_//@
_//@
_//@
_///@
@@
@
@
_/// _// _// @
_// _/ _//@
_// _/ _//@
_// _/ _//@
_/// _/ _//@
@@
@
@
_// _// @
_// _//@
_// _//@
_// _//@
_/// _//@
@@
@
@
_// @
_// _// @
_// _//@
_// _// @
_// @
@@
@
@
_/ _// @
_/ _// @
_/ _//@
_// _// @
_// @
_// @@
@
@
_// @
_/ _// @
_/ _// @
_//_// @
_// @
_///@@
@
@
_/ _///@
_// @
_// @
_// @
_/// @
@@
@
@
_//// @
_// @
_/// @
_//@
_// _//@
@@
_// @
_// @
_/_/ _/@
_// @
_// @
_// @
_// @
@@
@
@
_// _//@
_// _//@
_// _//@
_// _//@
_//_//@
@@
@
@
_// _//@
_// _// @
_// _// @
_/_// @
_// @
@@
@
@
_// _///@
_// / _//@
_// _/ _//@
_/ _/ _/_//@
_/// _///@
@@
@
@
_// _//@
_/ _// @
_/ @
_/ _// @
_// _//@
@@
@
@
_// _//@
_// _// @
_/// @
_// @
_// @
_// @@
@
@
_//// _//@
_// @
_// @
_// @
_////////@
@@
_//@
_// @
_// @
_/// @
_// @
_// @
_//@
@@
_/@
_/@
_/@
@
_/@
_/@
_/@
@@
_// @
_// @
_// @
_///@
_// @
_// @
_// @
@@
_// _/ @
_/ _//@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,26 @@
'use strict';
var GetIterator = require('./GetIterator');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
// https://262.ecma-international.org/12.0/#sec-iterabletolist
module.exports = function IterableToList(items) {
var iterator;
if (arguments.length > 1) {
iterator = GetIterator(items, 'sync', arguments[1]);
} else {
iterator = GetIterator(items, 'sync');
}
var values = [];
var next = true;
while (next) {
next = IteratorStep(iterator);
if (next) {
var nextValue = IteratorValue(next);
values[values.length] = nextValue;
}
}
return values;
};
@@ -0,0 +1,46 @@
Changelog
=========
v0.6.0
------
- Updated "devDependencies" versions to fix vulnerability alerts
- Dropped support of io.js and node.js v0.12.x and lower since new versions of
"devDependencies" couldn't work with those old node.js versions
(minimal supported version of node.js now is v4.0.0)
v0.5.1
------
- Fix prototype pollution vulnerability (thanks to @mwakerman for the PR)
- Avoid using deprecated Buffer API (thanks to @ChALkeR for the PR)
v0.5.0
------
- Auto-testing provided by Travis CI;
- Support older Node.JS versions (`v0.11.x` and `v0.10.x`);
- Removed tests files from npm package.
v0.4.2
------
- Fix for `null` as an argument.
v0.4.1
------
- Removed test code from <b>npm</b> package
([see pull request #21](https://github.com/unclechu/node-deep-extend/pull/21));
- Increased minimal version of Node from `0.4.0` to `0.12.0`
(because can't run tests on lesser version anyway).
v0.4.0
------
- **WARNING!** Broken backward compatibility with `v0.3.x`;
- Fixed bug with extending arrays instead of cloning;
- Deep cloning for arrays;
- Check for own property;
- Fixed some documentation issues;
- Strict JS mode.
@@ -0,0 +1,18 @@
var asciiSize = require('./_asciiSize'),
hasUnicode = require('./_hasUnicode'),
unicodeSize = require('./_unicodeSize');
/**
* Gets the number of symbols in `string`.
*
* @private
* @param {string} string The string to inspect.
* @returns {number} Returns the string size.
*/
function stringSize(string) {
return hasUnicode(string)
? unicodeSize(string)
: asciiSize(string);
}
module.exports = stringSize;
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=jsx-max-props-per-line.d.ts.map
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more