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,179 @@
// Copyright 2013 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// 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 CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Utilities for fast computation of logarithms.
#ifndef BROTLI_ENC_FAST_LOG_H_
#define BROTLI_ENC_FAST_LOG_H_
#include <assert.h>
#include <math.h>
#include <stdint.h>
namespace brotli {
// Return floor(log2(n)) for positive integer n. Returns -1 iff n == 0.
inline int Log2Floor(uint32_t n) {
#if defined(__clang__) || \
(defined(__GNUC__) && \
((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4))
return n == 0 ? -1 : 31 ^ __builtin_clz(n);
#else
if (n == 0)
return -1;
int log = 0;
uint32_t value = n;
for (int i = 4; i >= 0; --i) {
int shift = (1 << i);
uint32_t x = value >> shift;
if (x != 0) {
value = x;
log += shift;
}
}
assert(value == 1);
return log;
#endif
}
static inline int Log2FloorNonZero(uint32_t n) {
#ifdef __GNUC__
return 31 ^ __builtin_clz(n);
#else
unsigned int result = 0;
while (n >>= 1) result++;
return result;
#endif
}
// Return ceiling(log2(n)) for positive integer n. Returns -1 iff n == 0.
inline int Log2Ceiling(uint32_t n) {
int floor = Log2Floor(n);
if (n == (n &~ (n - 1))) // zero or a power of two
return floor;
else
return floor + 1;
}
// A lookup table for small values of log2(int) to be used in entropy
// computation.
//
// ", ".join(["%.16ff" % x for x in [0.0]+[log2(x) for x in range(1, 256)]])
static const float kLog2Table[] = {
0.0000000000000000f, 0.0000000000000000f, 1.0000000000000000f,
1.5849625007211563f, 2.0000000000000000f, 2.3219280948873622f,
2.5849625007211561f, 2.8073549220576042f, 3.0000000000000000f,
3.1699250014423126f, 3.3219280948873626f, 3.4594316186372978f,
3.5849625007211565f, 3.7004397181410922f, 3.8073549220576037f,
3.9068905956085187f, 4.0000000000000000f, 4.0874628412503400f,
4.1699250014423122f, 4.2479275134435852f, 4.3219280948873626f,
4.3923174227787607f, 4.4594316186372973f, 4.5235619560570131f,
4.5849625007211570f, 4.6438561897747244f, 4.7004397181410926f,
4.7548875021634691f, 4.8073549220576037f, 4.8579809951275728f,
4.9068905956085187f, 4.9541963103868758f, 5.0000000000000000f,
5.0443941193584534f, 5.0874628412503400f, 5.1292830169449664f,
5.1699250014423122f, 5.2094533656289501f, 5.2479275134435852f,
5.2854022188622487f, 5.3219280948873626f, 5.3575520046180838f,
5.3923174227787607f, 5.4262647547020979f, 5.4594316186372973f,
5.4918530963296748f, 5.5235619560570131f, 5.5545888516776376f,
5.5849625007211570f, 5.6147098441152083f, 5.6438561897747244f,
5.6724253419714961f, 5.7004397181410926f, 5.7279204545631996f,
5.7548875021634691f, 5.7813597135246599f, 5.8073549220576046f,
5.8328900141647422f, 5.8579809951275719f, 5.8826430493618416f,
5.9068905956085187f, 5.9307373375628867f, 5.9541963103868758f,
5.9772799234999168f, 6.0000000000000000f, 6.0223678130284544f,
6.0443941193584534f, 6.0660891904577721f, 6.0874628412503400f,
6.1085244567781700f, 6.1292830169449672f, 6.1497471195046822f,
6.1699250014423122f, 6.1898245588800176f, 6.2094533656289510f,
6.2288186904958804f, 6.2479275134435861f, 6.2667865406949019f,
6.2854022188622487f, 6.3037807481771031f, 6.3219280948873617f,
6.3398500028846252f, 6.3575520046180847f, 6.3750394313469254f,
6.3923174227787598f, 6.4093909361377026f, 6.4262647547020979f,
6.4429434958487288f, 6.4594316186372982f, 6.4757334309663976f,
6.4918530963296748f, 6.5077946401986964f, 6.5235619560570131f,
6.5391588111080319f, 6.5545888516776376f, 6.5698556083309478f,
6.5849625007211561f, 6.5999128421871278f, 6.6147098441152092f,
6.6293566200796095f, 6.6438561897747253f, 6.6582114827517955f,
6.6724253419714952f, 6.6865005271832185f, 6.7004397181410917f,
6.7142455176661224f, 6.7279204545631988f, 6.7414669864011465f,
6.7548875021634691f, 6.7681843247769260f, 6.7813597135246599f,
6.7944158663501062f, 6.8073549220576037f, 6.8201789624151887f,
6.8328900141647422f, 6.8454900509443757f, 6.8579809951275719f,
6.8703647195834048f, 6.8826430493618416f, 6.8948177633079437f,
6.9068905956085187f, 6.9188632372745955f, 6.9307373375628867f,
6.9425145053392399f, 6.9541963103868758f, 6.9657842846620879f,
6.9772799234999168f, 6.9886846867721664f, 7.0000000000000000f,
7.0112272554232540f, 7.0223678130284544f, 7.0334230015374501f,
7.0443941193584534f, 7.0552824355011898f, 7.0660891904577721f,
7.0768155970508317f, 7.0874628412503400f, 7.0980320829605272f,
7.1085244567781700f, 7.1189410727235076f, 7.1292830169449664f,
7.1395513523987937f, 7.1497471195046822f, 7.1598713367783891f,
7.1699250014423130f, 7.1799090900149345f, 7.1898245588800176f,
7.1996723448363644f, 7.2094533656289492f, 7.2191685204621621f,
7.2288186904958804f, 7.2384047393250794f, 7.2479275134435861f,
7.2573878426926521f, 7.2667865406949019f, 7.2761244052742384f,
7.2854022188622487f, 7.2946207488916270f, 7.3037807481771031f,
7.3128829552843557f, 7.3219280948873617f, 7.3309168781146177f,
7.3398500028846243f, 7.3487281542310781f, 7.3575520046180847f,
7.3663222142458151f, 7.3750394313469254f, 7.3837042924740528f,
7.3923174227787607f, 7.4008794362821844f, 7.4093909361377026f,
7.4178525148858991f, 7.4262647547020979f, 7.4346282276367255f,
7.4429434958487288f, 7.4512111118323299f, 7.4594316186372973f,
7.4676055500829976f, 7.4757334309663976f, 7.4838157772642564f,
7.4918530963296748f, 7.4998458870832057f, 7.5077946401986964f,
7.5156998382840436f, 7.5235619560570131f, 7.5313814605163119f,
7.5391588111080319f, 7.5468944598876373f, 7.5545888516776376f,
7.5622424242210728f, 7.5698556083309478f, 7.5774288280357487f,
7.5849625007211561f, 7.5924570372680806f, 7.5999128421871278f,
7.6073303137496113f, 7.6147098441152075f, 7.6220518194563764f,
7.6293566200796095f, 7.6366246205436488f, 7.6438561897747244f,
7.6510516911789290f, 7.6582114827517955f, 7.6653359171851765f,
7.6724253419714952f, 7.6794800995054464f, 7.6865005271832185f,
7.6934869574993252f, 7.7004397181410926f, 7.7073591320808825f,
7.7142455176661224f, 7.7210991887071856f, 7.7279204545631996f,
7.7347096202258392f, 7.7414669864011465f, 7.7481928495894596f,
7.7548875021634691f, 7.7615512324444795f, 7.7681843247769260f,
7.7747870596011737f, 7.7813597135246608f, 7.7879025593914317f,
7.7944158663501062f, 7.8008998999203047f, 7.8073549220576037f,
7.8137811912170374f, 7.8201789624151887f, 7.8265484872909159f,
7.8328900141647422f, 7.8392037880969445f, 7.8454900509443757f,
7.8517490414160571f, 7.8579809951275719f, 7.8641861446542798f,
7.8703647195834048f, 7.8765169465650002f, 7.8826430493618425f,
7.8887432488982601f, 7.8948177633079446f, 7.9008668079807496f,
7.9068905956085187f, 7.9128893362299619f, 7.9188632372745955f,
7.9248125036057813f, 7.9307373375628867f, 7.9366379390025719f,
7.9425145053392399f, 7.9483672315846778f, 7.9541963103868758f,
7.9600019320680806f, 7.9657842846620870f, 7.9715435539507720f,
7.9772799234999168f, 7.9829935746943104f, 7.9886846867721664f,
7.9943534368588578f
};
// Faster logarithm for small integers, with the property of log2(0) == 0.
static inline double FastLog2(int v) {
if (v < (int)(sizeof(kLog2Table) / sizeof(kLog2Table[0]))) {
return kLog2Table[v];
}
#if defined(_MSC_VER) && _MSC_VER <= 1600
// Visual Studio 2010 does not have the log2() function defined, so we use
// log() and a multiplication instead.
static const double kLog2Inv = 1.4426950408889634f;
return log(static_cast<double>(v)) * kLog2Inv;
#else
return log2(static_cast<double>(v));
#endif
}
} // namespace brotli
#endif // BROTLI_ENC_FAST_LOG_H_
@@ -0,0 +1,237 @@
"use client";
// src/use-accordion-item.ts
import { useProviderContext } from "@heroui/system";
import { useFocusRing } from "@react-aria/focus";
import { accordionItem } from "@heroui/theme";
import {
clsx,
callAllHandlers,
dataAttr,
objectToDeps,
chain,
mergeProps
} from "@heroui/shared-utils";
import { useDOMRef, filterDOMProps } from "@heroui/react-utils";
import { useReactAriaAccordionItem } from "@heroui/use-aria-accordion";
import { useCallback, useMemo } from "react";
import { useHover, usePress } from "@react-aria/interactions";
function useAccordionItem(props) {
var _a, _b;
const globalContext = useProviderContext();
const { ref, as, item, onFocusChange } = props;
const {
state,
className,
indicator,
children,
title,
subtitle,
startContent,
motionProps,
focusedKey,
variant,
isCompact = false,
classNames: classNamesProp = {},
isDisabled: isDisabledProp = false,
hideIndicator = false,
disableAnimation = (_a = globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _a : false,
keepContentMounted = false,
disableIndicatorAnimation = false,
HeadingComponent = as || "h2",
onPress,
onPressStart,
onPressEnd,
onPressChange,
onPressUp,
onClick,
...otherProps
} = props;
const Component = as || "div";
const shouldFilterDOMProps = typeof Component === "string";
const domRef = useDOMRef(ref);
const isDisabled = state.disabledKeys.has(item.key) || isDisabledProp;
const isOpen = state.selectionManager.isSelected(item.key);
const { buttonProps: buttonCompleteProps, regionProps } = useReactAriaAccordionItem(
{ item, isDisabled },
{ ...state, focusedKey },
domRef
);
const { onFocus: onFocusButton, onBlur: onBlurButton, ...buttonProps } = buttonCompleteProps;
const { isFocused, isFocusVisible, focusProps } = useFocusRing({
autoFocus: (_b = item.props) == null ? void 0 : _b.autoFocus
});
const { isHovered, hoverProps } = useHover({ isDisabled });
const { pressProps, isPressed } = usePress({
ref: domRef,
isDisabled,
onPress,
onPressStart,
onPressEnd,
onPressChange,
onPressUp
});
const handleFocus = useCallback(() => {
onFocusChange == null ? void 0 : onFocusChange(true, item.key);
}, []);
const handleBlur = useCallback(() => {
onFocusChange == null ? void 0 : onFocusChange(false, item.key);
}, []);
const classNames = useMemo(
() => ({
...classNamesProp
}),
[objectToDeps(classNamesProp)]
);
const slots = useMemo(
() => accordionItem({
isCompact,
isDisabled,
hideIndicator,
disableAnimation,
disableIndicatorAnimation,
variant
}),
[isCompact, isDisabled, hideIndicator, disableAnimation, disableIndicatorAnimation, variant]
);
const baseStyles = clsx(classNames == null ? void 0 : classNames.base, className);
const getBaseProps = useCallback(
(props2 = {}) => {
return {
"data-open": dataAttr(isOpen),
"data-disabled": dataAttr(isDisabled),
"data-slot": "base",
className: slots.base({ class: baseStyles }),
...mergeProps(
filterDOMProps(otherProps, {
enabled: shouldFilterDOMProps
}),
props2
)
};
},
[baseStyles, shouldFilterDOMProps, otherProps, slots, item.props, isOpen, isDisabled]
);
const getButtonProps = (props2 = {}) => {
var _a2, _b2;
return {
ref: domRef,
"data-open": dataAttr(isOpen),
"data-focus": dataAttr(isFocused),
"data-focus-visible": dataAttr(isFocusVisible),
"data-disabled": dataAttr(isDisabled),
"data-hover": dataAttr(isHovered),
"data-pressed": dataAttr(isPressed),
"data-slot": "trigger",
className: slots.trigger({ class: classNames == null ? void 0 : classNames.trigger }),
onFocus: callAllHandlers(
handleFocus,
onFocusButton,
focusProps.onFocus,
otherProps.onFocus,
(_a2 = item.props) == null ? void 0 : _a2.onFocus
),
onBlur: callAllHandlers(
handleBlur,
onBlurButton,
focusProps.onBlur,
otherProps.onBlur,
(_b2 = item.props) == null ? void 0 : _b2.onBlur
),
...mergeProps(buttonProps, hoverProps, pressProps, props2, {
onClick: chain(pressProps.onClick, onClick)
})
};
};
const getContentProps = useCallback(
(props2 = {}) => {
return {
"data-open": dataAttr(isOpen),
"data-disabled": dataAttr(isDisabled),
"data-slot": "content",
className: slots.content({ class: classNames == null ? void 0 : classNames.content }),
...mergeProps(regionProps, props2)
};
},
[slots, classNames, regionProps, isOpen, isDisabled, classNames == null ? void 0 : classNames.content]
);
const getIndicatorProps = useCallback(
(props2 = {}) => {
return {
"aria-hidden": dataAttr(true),
"data-open": dataAttr(isOpen),
"data-disabled": dataAttr(isDisabled),
"data-slot": "indicator",
className: slots.indicator({ class: classNames == null ? void 0 : classNames.indicator }),
...props2
};
},
[slots, classNames == null ? void 0 : classNames.indicator, isOpen, isDisabled, classNames == null ? void 0 : classNames.indicator]
);
const getHeadingProps = useCallback(
(props2 = {}) => {
return {
"data-open": dataAttr(isOpen),
"data-disabled": dataAttr(isDisabled),
"data-slot": "heading",
className: slots.heading({ class: classNames == null ? void 0 : classNames.heading }),
...props2
};
},
[slots, classNames == null ? void 0 : classNames.heading, isOpen, isDisabled, classNames == null ? void 0 : classNames.heading]
);
const getTitleProps = useCallback(
(props2 = {}) => {
return {
"data-open": dataAttr(isOpen),
"data-disabled": dataAttr(isDisabled),
"data-slot": "title",
className: slots.title({ class: classNames == null ? void 0 : classNames.title }),
...props2
};
},
[slots, classNames == null ? void 0 : classNames.title, isOpen, isDisabled, classNames == null ? void 0 : classNames.title]
);
const getSubtitleProps = useCallback(
(props2 = {}) => {
return {
"data-open": dataAttr(isOpen),
"data-disabled": dataAttr(isDisabled),
"data-slot": "subtitle",
className: slots.subtitle({ class: classNames == null ? void 0 : classNames.subtitle }),
...props2
};
},
[slots, classNames, isOpen, isDisabled, classNames == null ? void 0 : classNames.subtitle]
);
return {
Component,
HeadingComponent,
item,
slots,
classNames,
domRef,
indicator,
children,
title,
subtitle,
startContent,
isOpen,
isDisabled,
hideIndicator,
keepContentMounted,
disableAnimation,
motionProps,
getBaseProps,
getHeadingProps,
getButtonProps,
getContentProps,
getIndicatorProps,
getTitleProps,
getSubtitleProps
};
}
export {
useAccordionItem
};
@@ -0,0 +1,10 @@
import { TSchema, SchemaOptions } from '../schema/index';
import { Kind } from '../symbols/index';
export type TSymbolValue = string | number | undefined;
export interface TSymbol extends TSchema, SchemaOptions {
[Kind]: 'Symbol';
static: symbol;
type: 'symbol';
}
/** `[JavaScript]` Creates a Symbol type */
export declare function Symbol(options?: SchemaOptions): TSymbol;
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAQD,MAAM,qCAAe,OAAO,GAAG,CAAC;AAChC,MAAM,sCAAgB,OAAO,GAAG,CAAC;AACjC,IAAI,4CAAuG;AAMpG,MAAM;IAaX,6DAA6D,GAC7D,mBAAmB,GAAM,EAAE,MAAc,EAAK;QAC5C,IAAI,UAAU,IAAI,CAAC,mBAAmB,CAAC;QACvC,IAAI,SAAS,OAAO,CAAC,IAAI;QACzB,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,CAAC,4BAA4B,EAAE,IAAI,IAAI,EAAE,OAAO,OAAO,CAAC;QAG1E,OAAO;IACT;IAEA,wDAAwD,GACxD,oBAAoB,MAAc,EAAgB;QAChD,IAAI,UAAU,IAAI,CAAC,OAAO,CAAC,OAAO;QAClC,IAAI,CAAC,SAAS;YACZ,UAAU,0CAAoB,QAAQ,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa;YACtE,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG;QACzB;QAEA,OAAO;IACT;IAEA,OAAO,8BAA6F,WAAmB,EAA0C;QAC/J,IAAI,OAAO,WAAW,aACpB,OAAO;QAGT,IAAI,SAAS,MAAM,CAAC,mCAAa;QACjC,IAAI,8CAAwB,WAAW;YACrC,IAAI,gBAAgB,MAAM,CAAC,oCAAc;YACzC,IAAI,CAAC,eACH,OAAO;YAGT,4CAAsB,CAAC;YACvB,IAAK,IAAI,OAAO,cACd,yCAAmB,CAAC,IAAI,GAAG,IAAI,0CAA0B;gBAAC,CAAC,OAAO,EAAE,aAAa,CAAC,IAAI;YAAA,GAAG;QAE7F;QAEA,IAAI,aAAa,sDAAA,gEAAA,yCAAqB,CAAC,YAAY;QACnD,IAAI,CAAC,YACH,MAAM,IAAI,MAAM,CAAC,qBAAqB,EAAE,YAAY,oHAAoH,CAAC;QAG3K,OAAO;IACT;IAvDA,YAAY,QAAgC,EAAE,gBAAwB,OAAO,CAAE;QAC7E,yDAAyD;QACzD,uGAAuG;QACvG,IAAI,CAAC,OAAO,GAAG,OAAO,WAAW,CAC/B,OAAO,OAAO,CAAC,UAAU,MAAM,CAAC,CAAC,GAAG,EAAE,GAAK;QAE7C,IAAI,CAAC,aAAa,GAAG;IACvB;AAiDF;AAEA,SAAS,0CAAiE,MAAc,EAAE,OAA+B,EAAE,gBAAgB,OAAO;IAChJ,sCAAsC;IACtC,IAAI,OAAO,CAAC,OAAO,EACjB,OAAO,OAAO,CAAC,OAAO;IAGxB,iDAAiD;IACjD,2EAA2E;IAC3E,8CAA8C;IAC9C,uEAAuE;IACvE,sDAAsD;IACtD,IAAI,WAAW,kCAAY;IAC3B,IAAI,OAAO,CAAC,SAAS,EACnB,OAAO,OAAO,CAAC,SAAS;IAG1B,IAAK,IAAI,OAAO,QAAS;QACvB,IAAI,IAAI,UAAU,CAAC,WAAW,MAC5B,OAAO,OAAO,CAAC,IAAI;IAEvB;IAEA,8BAA8B;IAC9B,OAAO,OAAO,CAAC,cAAc;AAC/B;AAEA,SAAS,kCAAY,MAAc;IACjC,aAAa;IACb,IAAI,KAAK,MAAM,EACb,aAAa;IACb,OAAO,IAAI,KAAK,MAAM,CAAC,QAAQ,QAAQ;IAGzC,OAAO,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE;AAC7B","sources":["packages/@internationalized/string/src/LocalizedStringDictionary.ts"],"sourcesContent":["/*\n * Copyright 2022 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 type {LocalizedString} from './LocalizedStringFormatter';\n\nexport type LocalizedStrings<K extends string, T extends LocalizedString> = {\n [lang: string]: Record<K, T>\n};\n\nconst localeSymbol = Symbol.for('react-aria.i18n.locale');\nconst stringsSymbol = Symbol.for('react-aria.i18n.strings');\nlet cachedGlobalStrings: {[packageName: string]: LocalizedStringDictionary<any, any>} | null | undefined = undefined;\n\n/**\n * Stores a mapping of localized strings. Can be used to find the\n * closest available string for a given locale.\n */\nexport class LocalizedStringDictionary<K extends string = string, T extends LocalizedString = string> {\n private strings: LocalizedStrings<K, T>;\n private defaultLocale: string;\n\n constructor(messages: LocalizedStrings<K, T>, defaultLocale: string = 'en-US') {\n // Clone messages so we don't modify the original object.\n // Filter out entries with falsy values which may have been caused by applying optimize-locales-plugin.\n this.strings = Object.fromEntries(\n Object.entries(messages).filter(([, v]) => v)\n );\n this.defaultLocale = defaultLocale;\n }\n\n /** Returns a localized string for the given key and locale. */\n getStringForLocale(key: K, locale: string): T {\n let strings = this.getStringsForLocale(locale);\n let string = strings[key];\n if (!string) {\n throw new Error(`Could not find intl message ${key} in ${locale} locale`);\n }\n\n return string;\n }\n\n /** Returns all localized strings for the given locale. */\n getStringsForLocale(locale: string): Record<K, T> {\n let strings = this.strings[locale];\n if (!strings) {\n strings = getStringsForLocale(locale, this.strings, this.defaultLocale);\n this.strings[locale] = strings;\n }\n\n return strings;\n }\n\n static getGlobalDictionaryForPackage<K extends string = string, T extends LocalizedString = string>(packageName: string): LocalizedStringDictionary<K, T> | null {\n if (typeof window === 'undefined') {\n return null;\n }\n\n let locale = window[localeSymbol];\n if (cachedGlobalStrings === undefined) {\n let globalStrings = window[stringsSymbol];\n if (!globalStrings) {\n return null;\n }\n\n cachedGlobalStrings = {};\n for (let pkg in globalStrings) {\n cachedGlobalStrings[pkg] = new LocalizedStringDictionary({[locale]: globalStrings[pkg]}, locale);\n }\n }\n\n let dictionary = cachedGlobalStrings?.[packageName];\n if (!dictionary) {\n throLine truncated
@@ -0,0 +1,3 @@
export type MessageId = 'self';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"self", [], import("../utils/create-rule.ts").ImportXPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,11 @@
'use strict';
var $BigInt = typeof BigInt !== 'undefined' && BigInt;
/** @type {import('.')} */
module.exports = function hasNativeBigInts() {
return typeof $BigInt === 'function'
&& typeof BigInt === 'function'
&& typeof $BigInt(42) === 'bigint' // eslint-disable-line no-magic-numbers
&& typeof BigInt(42) === 'bigint'; // eslint-disable-line no-magic-numbers
};
@@ -0,0 +1,53 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
// tslint regex
// https://github.com/palantir/tslint/blob/95d9d958833fd9dc0002d18cbe34db20d0fbf437/src/enableDisableRules.ts#L32
const ENABLE_DISABLE_REGEX = /^\s*tslint:(enable|disable)(?:-(line|next-line))?(:|\s|$)/;
const toText = (text, type) => type === utils_1.AST_TOKEN_TYPES.Line
? ['//', text.trim()].join(' ')
: ['/*', text.trim(), '*/'].join(' ');
exports.default = (0, util_1.createRule)({
name: 'ban-tslint-comment',
meta: {
type: 'suggestion',
docs: {
description: 'Disallow `// tslint:<rule-flag>` comments',
recommended: 'stylistic',
},
fixable: 'code',
messages: {
commentDetected: 'tslint comment detected: "{{ text }}"',
},
schema: [],
},
defaultOptions: [],
create: context => {
return {
Program() {
const comments = context.sourceCode.getAllComments();
comments.forEach(c => {
if (ENABLE_DISABLE_REGEX.test(c.value)) {
context.report({
node: c,
messageId: 'commentDetected',
data: { text: toText(c.value, c.type) },
fix(fixer) {
const rangeStart = context.sourceCode.getIndexFromLoc({
column: c.loc.start.column > 0 ? c.loc.start.column - 1 : 0,
line: c.loc.start.line,
});
const rangeEnd = context.sourceCode.getIndexFromLoc({
column: c.loc.end.column,
line: c.loc.end.line,
});
return fixer.removeRange([rangeStart, rangeEnd + 1]);
},
});
}
});
},
};
},
});
@@ -0,0 +1,13 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export {useControlledState} from './useControlledState';
export {clamp, snapValueToStep, toFixedNumber} from './number';
@@ -0,0 +1,44 @@
import {ConditionalKeys} from './conditional-keys';
/**
Pick keys from the shape that matches the given `Condition`.
This is useful when you want to create a new type from a specific subset of an existing type. For example, you might want to pick all the primitive properties from a class and form a new automatically derived type.
@example
```
import {Primitive, ConditionalPick} from 'type-fest';
class Awesome {
name: string;
successes: number;
failures: bigint;
run() {}
}
type PickPrimitivesFromAwesome = ConditionalPick<Awesome, Primitive>;
//=> {name: string; successes: number; failures: bigint}
```
@example
```
import {ConditionalPick} from 'type-fest';
interface Example {
a: string;
b: string | number;
c: () => void;
d: {};
}
type StringKeysOnly = ConditionalPick<Example, string>;
//=> {a: string}
```
@category Utilities
*/
export type ConditionalPick<Base, Condition> = Pick<
Base,
ConditionalKeys<Base, Condition>
>;
@@ -0,0 +1,52 @@
import * as tailwind_variants from 'tailwind-variants';
import { VariantProps } from 'tailwind-variants';
import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
/**
* Divider wrapper **Tailwind Variants** component
*
* @example
*
* const styles = divider()
*
* <span className={styles} />
*/
declare const divider: tailwind_variants.TVReturnType<{
orientation: {
horizontal: "w-full h-divider";
vertical: "h-full w-divider";
};
}, undefined, "shrink-0 bg-divider border-none", tailwind_variants_dist_config.TVConfig<{
orientation: {
horizontal: "w-full h-divider";
vertical: "h-full w-divider";
};
}, {
orientation: {
horizontal: "w-full h-divider";
vertical: "h-full w-divider";
};
}>, {
orientation: {
horizontal: "w-full h-divider";
vertical: "h-full w-divider";
};
}, undefined, tailwind_variants.TVReturnType<{
orientation: {
horizontal: "w-full h-divider";
vertical: "h-full w-divider";
};
}, undefined, "shrink-0 bg-divider border-none", tailwind_variants_dist_config.TVConfig<{
orientation: {
horizontal: "w-full h-divider";
vertical: "h-full w-divider";
};
}, {
orientation: {
horizontal: "w-full h-divider";
vertical: "h-full w-divider";
};
}>, unknown, unknown, undefined>>;
type DividerVariantProps = VariantProps<typeof divider>;
export { DividerVariantProps, divider };
@@ -0,0 +1 @@
{"name":"color-string","version":"1.9.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532126187,"integrity":"sha512-DnEtgklHUyArTNQUluMZgJaRm+odaSuh/niZke5PcI3KiFuMtlk6CKHJV7uWqBt4iGE+DAtkJnPRvq2gDQrlCQ==","mode":420,"size":1082},"index.js":{"checkedAt":1794532126187,"integrity":"sha512-tq2uumRBfDdkdEmCDg+CTYt1yLfeousol8kUZCr3mBIpp17Sa8gGlep4JM9ek0xryKMtSH3yZX7SserG/I97oA==","mode":420,"size":5716},"package.json":{"checkedAt":1794532126187,"integrity":"sha512-Dx3Jm18YSKHyzVTLTdV8tlmlYVL/ILqAh2RmokCVpr1yNYGFUhZvXlPWbtKaHxmmbJFuGcIyuWq94IsFQ7iYSg==","mode":420,"size":732},"README.md":{"checkedAt":1794532126187,"integrity":"sha512-56j5NvtGkNeJGVY7wflQ2Qx+bOEb/IbxaEW6QGva32BB50PRbKwImaFoDB1YUfEBFA6OrhSiTQJ8Fz+2D+DnIg==","mode":420,"size":2585}}}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2015_iterable: LibDefinition;
@@ -0,0 +1 @@
{"name":"character-entities","version":"2.0.2","requiresBuild":false,"files":{"license":{"checkedAt":1794532112874,"integrity":"sha512-00mBaAegOXNJDyksTMrytYh98gH+v/fruetGXfLv5IVYnw8WD5PgOTOdM0A7q244DNs0Ynq8gFk4JA6SWxIdbA==","mode":420,"size":1099},"index.js":{"checkedAt":1794532112874,"integrity":"sha512-GVetUS6jBJs2+48dKJz++xR0sUOpJTgV1snxzDlEsmm8Jtd5Mal+vW3WB4auN9pPRiFgVhKQ5E1e2yGbKCMVCQ==","mode":420,"size":37342},"package.json":{"checkedAt":1794532112875,"integrity":"sha512-fPlxbQomsWCVU/OaqkOIxxQ4egHfBfPuOhwvWEW5tfdDhMqcKP1IN0xeWeAa+Zq0LLG1tcggV2fZ3Uqgez18tQ==","mode":420,"size":2014},"readme.md":{"checkedAt":1794532112875,"integrity":"sha512-pzOlmWY4P9Ixl/SqPZK94iOqEkmeuhNmHcHFxLh1cBjeTi5T2YbqIz6G1K8322btHd13bL6XJDt69m/UxNWzHg==","mode":420,"size":4041},"index.d.ts":{"checkedAt":1794532112875,"integrity":"sha512-P2Jyhcz5ryPN4iQnpOhQ+QoxvSglN6mXIVckbeGa4NwpKyl2s15UlIvnqwnDik0iDXm7D5Lfgy9zNOUuU3WI4w==","mode":420,"size":138}}}
@@ -0,0 +1,424 @@
flf2a? 4 3 9 0 12 0 64 0
Name : Heart Left
Author : LG Beard
Date : 2004/1/15 15:41:27
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.

.-.-. 
'._.' 

.-.-. 
( ! .' 
`.( 

.-.-. 
( " .' 
'.( 

.-.-. 
( # .' 
'.( 

.-.-. 
( $ .' 
'.( 

.-.-. 
( % .' 
'.( 

.-.-. 
( & .' 
'.( 

.-.-. 
( ' .' 
'.( 

.-.-. 
( ( .' 
'.( 

.-.-. 
( ) .' 
'.( 

.-.-. 
( * .' 
'.( 

.-.-. 
( + .' 
'.( 

.-.-. 
( , .' 
'.( 

.-.-. 
( - .' 
'.( 

.-.-. 
( . .' 
'.( 

.-.-. 
( / .' 
'.( 

.-.-. 
( 0 .' 
`.( 

.-.-. 
( 1 .' 
`.( 

.-.-. 
( 2 .' 
`.( 

.-.-. 
( 3 .' 
`.( 

.-.-. 
( 4 .' 
`.( 

.-.-. 
( 5 .' 
`.( 

.-.-. 
( 6 .' 
`.( 

.-.-. 
( 7 .' 
`.( 

.-.-. 
( 8 .' 
`.( 

.-.-. 
( 9 .' 
`.( 

.-.-. 
( : .' 
'.( 

.-.-. 
( ; .' 
'.( 

.-.-. 
( < .' 
'.( 

.-.-. 
( = .' 
'.( 

.-.-. 
( > .' 
'.( 

.-.-. 
( ? .' 
`.( 

.-.-. 
( @ .' 
`.( 

.-.-. 
( A .' 
`.( 

.-.-. 
( B .' 
`.( 

.-.-. 
( C .' 
`.( 

.-.-. 
( D .' 
`.( 

.-.-. 
( E .' 
`.( 

.-.-. 
( F .' 
`.( 

.-.-. 
( G .' 
`.( 

.-.-. 
( H .' 
`.( 

.-.-. 
( I .' 
`.( 

.-.-. 
( J .' 
`.( 

.-.-. 
( K .' 
`.( 

.-.-. 
( L .' 
`.( 

.-.-. 
( M .' 
`.( 

.-.-. 
( N .' 
`.( 

.-.-. 
( O .' 
`.( 

.-.-. 
( P .' 
`.( 

.-.-. 
( Q .' 
`.( 

.-.-. 
( R .' 
`.( 

.-.-. 
( S .' 
`.( 

.-.-. 
( T .' 
`.( 

.-.-. 
( U .' 
`.( 

.-.-. 
( V .' 
`.( 

.-.-. 
( W .' 
`.( 

.-.-. 
( X .' 
`.( 

.-.-. 
( Y .' 
`.( 

.-.-. 
( Z .' 
`.( 

.-.-. 
( [ .' 
'.( 

.-.-. 
( \ .' 
'.( 

.-.-. 
( ] .' 
'.( 

.-.-. 
( ^ .' 
'.( 

.-.-. 
( _ .' 
'.( 

.-.-. 
( ` .' 
'.( 

.-.-. 
( a .' 
`.( 

.-.-. 
( b .' 
`.( 

.-.-. 
( c .' 
`.( 

.-.-. 
( d .' 
`.( 

.-.-. 
( e .' 
`.( 

.-.-. 
( f .' 
`.( 

.-.-. 
( g .' 
`.( 

.-.-. 
( h .' 
`.( 

.-.-. 
( i .' 
`.( 

.-.-. 
( j .' 
`.( 

.-.-. 
( k .' 
`.( 

.-.-. 
( l .' 
`.( 

.-.-. 
( m .' 
`.( 

.-.-. 
( n .' 
`.( 

.-.-. 
( o .' 
`.( 

.-.-. 
( p .' 
`.( 

.-.-. 
( q .' 
`.( 

.-.-. 
( r .' 
`.( 

.-.-. 
( s .' 
`.( 

.-.-. 
( t .' 
`.( 

.-.-. 
( u .' 
`.( 

.-.-. 
( v .' 
`.( 

.-.-. 
( w .' 
`.( 

.-.-. 
( x .' 
`.( 

.-.-. 
( y .' 
`.( 

.-.-. 
( z .' 
`.( 

.-.-. 
( { .' 
'.( 

.-.-. 
( | .' 
'.( 

.-.-. 
( } .' 
'.( 

.-.-. 
( ~ .' 
'.( 

.-.-. 
( A .' 
`.( 

.-.-. 
( O .' 
`.( 

.-.-. 
( U .' 
`.( 

.-.-. 
( a .' 
`.( 

.-.-. 
( o .' 
`.( 

.-.-. 
( u .' 
`.( 


.-.-. 
'._.' 

@@ -0,0 +1,4 @@
function _non_iterable_spread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
export { _non_iterable_spread as _ };
@@ -0,0 +1,15 @@
export type Options = [
{
allowConciseArrowFunctionExpressionsStartingWithVoid?: boolean;
allowDirectConstAssertionInArrowFunctions?: boolean;
allowedNames?: string[];
allowExpressions?: boolean;
allowFunctionsWithoutTypeParameters?: boolean;
allowHigherOrderFunctions?: boolean;
allowIIFEs?: boolean;
allowTypedFunctionExpressions?: boolean;
}
];
export type MessageIds = 'missingReturnType';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingReturnType", Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,15 @@
ISC License
Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,8 @@
/**
* Extractor function for a JSXText type value node.
*
* Returns self-closing element with correct name.
*/
export default function extractValueFromJSXText(value) {
return value.raw;
}
@@ -0,0 +1 @@
{"name":"wrap-ansi","version":"8.1.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532105632,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1794532105632,"integrity":"sha512-z9Io/phTK0ciZKm40efwODvwPor7G3jhPOTWt3iVlvaM4qYk2hCZzCnLLxLAaE4jY3iS2CuC+MEWZ1UnvOzJYQ==","mode":493,"size":5778},"package.json":{"checkedAt":1794532105632,"integrity":"sha512-bJPZII21JhD6Uxx4b1hR8APXazhwuKMzpOYQub2pY84Y7QCNei4Cxy4gA8fYUGhpimXS4jzh3WdkdxdkdAmGzA==","mode":420,"size":1148},"readme.md":{"checkedAt":1794532105632,"integrity":"sha512-QMtrByIBLBCW2+/ZVcyJEjYqSYzuxoAyF2IihgqnQy2W64duZF6U9vw0cODdvtqmpzP4dBLOaHlfTUuOszoAsw==","mode":420,"size":2466},"index.d.ts":{"checkedAt":1794532105632,"integrity":"sha512-uXvmNGiVRZ9ZiEtEq8c5mqmoEb/7WYFvDTRMY/ikJtkywbC6BA4zDNffSqnojdMu404X/PCRhizaK/uTD4aMBQ==","mode":420,"size":1268}}}
@@ -0,0 +1,5 @@
export interface NodeIKernelTianShuService {
addKernelTianShuListener(listener: unknown): number;
removeKernelTianShuListener(listenerId: number): void;
reportTianShuNumeralRed(...args: unknown[]): unknown;
}
@@ -0,0 +1,63 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.0.2](https://github.com/inspect-js/which-collection/compare/v1.0.1...v1.0.2) - 2024-03-08
### Commits
- [actions] reuse common workflows [`a5b2949`](https://github.com/inspect-js/which-collection/commit/a5b294901933131cf753c260c0dccf15c1aeeadc)
- [Tests] migrate tests to Github Actions [`283ec03`](https://github.com/inspect-js/which-collection/commit/283ec03d70ad8fdc94b3d77c1b11de011617a04d)
- add types [`bf576db`](https://github.com/inspect-js/which-collection/commit/bf576db80dbc9bca1332622f0b6c4772706dca45)
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`24968a2`](https://github.com/inspect-js/which-collection/commit/24968a2aa55109520e2ec0532343224e11a6e311)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`f60b277`](https://github.com/inspect-js/which-collection/commit/f60b27727206261a0359adb5588cba645eb56cf8)
- [Tests] run `nyc` on all tests [`5700269`](https://github.com/inspect-js/which-collection/commit/57002694f9b5f40078bd2777ecc934ece544a556)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`eb1f1a4`](https://github.com/inspect-js/which-collection/commit/eb1f1a468f53bcbed6ddf7459f0811a0f5ea37a7)
- [actions] remove redundant finisher [`cd5b8fc`](https://github.com/inspect-js/which-collection/commit/cd5b8fcddb9d8ea9ea5132b88c50357e2409a277)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`f5786fa`](https://github.com/inspect-js/which-collection/commit/f5786fa3189c884debfa4f160a1733a738acccec)
- [actions] update rebase action to use reusable workflow [`7ac7b67`](https://github.com/inspect-js/which-collection/commit/7ac7b6777797230ca105f9c1560e7b5fc3ba901f)
- [actions] update codecov uploader [`b074105`](https://github.com/inspect-js/which-collection/commit/b074105e5001df42a8889cd8cadaabd2a2fc276c)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`ec640d6`](https://github.com/inspect-js/which-collection/commit/ec640d667a48428aec41e19769ae9490da8301e1)
- [actions] add "Allow Edits" workflow [`65d842e`](https://github.com/inspect-js/which-collection/commit/65d842ee9c09ed60370cf14a721b94f9a5de43cd)
- [readme] remove travis badge [`f106289`](https://github.com/inspect-js/which-collection/commit/f10628946ad70286f503497850f6dd2350311577)
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `npmignore`, `object-inspect`, `tape` [`e784a1f`](https://github.com/inspect-js/which-collection/commit/e784a1fe96f8bc3eb21350ec7a35c3cf24c66a35)
- [meta] use `npmignore` to autogenerate an npmignore file [`95b503f`](https://github.com/inspect-js/which-collection/commit/95b503fd95f30deca71415da97937a3620e24912)
- [readme] add actions and codecov badges [`121ba2d`](https://github.com/inspect-js/which-collection/commit/121ba2d320ecefd51e4af06cacae2f71dd51b59d)
- [Deps] update `is-map`, `is-set`, `is-weakmap`, `is-weakset` [`4aa150f`](https://github.com/inspect-js/which-collection/commit/4aa150fdad7b8c0728972d6b074cb43464681e97)
- [meta] simplify "exports" [`2afaed7`](https://github.com/inspect-js/which-collection/commit/2afaed7f8918aa87a380c333944db274670838ae)
- [Deps] update `is-map`, `is-set` [`ce44763`](https://github.com/inspect-js/which-collection/commit/ce447638a94303f0571b4c3d12389c20a61d7817)
- [actions] switch Automatic Rease workflow to `pull_request_target` event [`b16b664`](https://github.com/inspect-js/which-collection/commit/b16b6641301c3c9ef7df8000be13a69b8087474f)
- [Dev Deps] update `auto-changelog`, `tape` [`2b9c953`](https://github.com/inspect-js/which-collection/commit/2b9c953b469d7fd0e86d96b89f20ef0c424e4ba1)
- [meta] add missing `engines.node` [`dcdbfde`](https://github.com/inspect-js/which-collection/commit/dcdbfdecc9f77daf99735d1f5377d9f3894fead3)
- [Dev Deps] update `auto-changelog`; add `aud` [`8e7f28d`](https://github.com/inspect-js/which-collection/commit/8e7f28d82f6240b2eaf763c32a3ede53be6cdfe1)
- [meta] add `sideEffects` flag [`3e0376b`](https://github.com/inspect-js/which-collection/commit/3e0376b80d7a18b78fdc898a9a166e9ffc83eee3)
- [Deps] update `is-weakset` [`7b3e922`](https://github.com/inspect-js/which-collection/commit/7b3e922ca0f9f356c1cbf4701857d71b378eb7d7)
- [Tests] only audit prod deps [`3339fea`](https://github.com/inspect-js/which-collection/commit/3339fea827a7fdcf8db868bb52278a3186593d48)
## [v1.0.1](https://github.com/inspect-js/which-collection/compare/v1.0.0...v1.0.1) - 2020-01-26
### Commits
- [actions] add automatic rebasing / merge commit blocking [`c3820b2`](https://github.com/inspect-js/which-collection/commit/c3820b2e8c88548f2c7da4080b1d1b6b41be97a4)
- [patch] add "exports" [`10983b5`](https://github.com/inspect-js/which-collection/commit/10983b5fdcc453c64216c3d6aa3fb93340091818)
- [Deps] update `is-map`, `is-set`, `is-weakmap`, `is-weakset` [`1565925`](https://github.com/inspect-js/which-collection/commit/1565925705c4abfe88065b211d1d960791f7cd3c)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`92ef871`](https://github.com/inspect-js/which-collection/commit/92ef871338395352f1bafc3156088361a3fd917a)
- [Dev Deps] update `@ljharb/eslint-config` [`61e9cde`](https://github.com/inspect-js/which-collection/commit/61e9cde1830ccc2b551dd6a1a873ae2cf27a74c7)
## v1.0.0 - 2019-11-13
### Commits
- Initial commit [`a21fddf`](https://github.com/inspect-js/which-collection/commit/a21fddffef3b2f21923e4d056295dd63661d8155)
- Tests [`ec86bc1`](https://github.com/inspect-js/which-collection/commit/ec86bc12f0516bd662c6e2966b36de2e1128a431)
- readme [`ffe969c`](https://github.com/inspect-js/which-collection/commit/ffe969cf4388d18e12c664cc51498bbdef08e565)
- implementation [`9acb669`](https://github.com/inspect-js/which-collection/commit/9acb6695e6a5e60f4c0b6de59eaf8b1f681d78e5)
- npm init [`124a63e`](https://github.com/inspect-js/which-collection/commit/124a63ee68a0015b47cbcc08b0d5598e553e7c9a)
- [meta] add `auto-changelog`, `safe-publish-latest` [`df0d6d4`](https://github.com/inspect-js/which-collection/commit/df0d6d4f1efbc4d9b327471b9c659bd487b25b49)
- [meta] add `funding` field; create FUNDING.yml [`032c81c`](https://github.com/inspect-js/which-collection/commit/032c81c826d68acd6242fa87fd6348db70135506)
- [Tests] add `npm run lint` [`6ae406d`](https://github.com/inspect-js/which-collection/commit/6ae406d9e459779abbdd90f48559552f740b05c9)
- fixup [`a2cad36`](https://github.com/inspect-js/which-collection/commit/a2cad363f12e30afe7619597187c5d4dc840a2a7)
- Only apps should have lockfiles [`30b3aae`](https://github.com/inspect-js/which-collection/commit/30b3aae37155f0786e4582501369f738b3282cd7)
@@ -0,0 +1,458 @@
import { RawSourceMap, SourceMapGenerator } from 'source-map-js'
import AtRule, { AtRuleProps } from './at-rule.js'
import Comment, { CommentProps } from './comment.js'
import Container, { ContainerProps, NewChild } from './container.js'
import CssSyntaxError from './css-syntax-error.js'
import Declaration, { DeclarationProps } from './declaration.js'
import Document, { DocumentProps } from './document.js'
import Input, { FilePosition } from './input.js'
import LazyResult from './lazy-result.js'
import list from './list.js'
import Node, {
AnyNode,
ChildNode,
ChildProps,
NodeErrorOptions,
NodeProps,
Position,
Source
} from './node.js'
import Processor from './processor.js'
import Result, { Message } from './result.js'
import Root, { RootProps } from './root.js'
import Rule, { RuleProps } from './rule.js'
import Warning, { WarningOptions } from './warning.js'
type DocumentProcessor = (
document: Document,
helper: postcss.Helpers
) => Promise<void> | void
type RootProcessor = (
root: Root,
helper: postcss.Helpers
) => Promise<void> | void
type DeclarationProcessor = (
decl: Declaration,
helper: postcss.Helpers
) => Promise<void> | void
type RuleProcessor = (
rule: Rule,
helper: postcss.Helpers
) => Promise<void> | void
type AtRuleProcessor = (
atRule: AtRule,
helper: postcss.Helpers
) => Promise<void> | void
type CommentProcessor = (
comment: Comment,
helper: postcss.Helpers
) => Promise<void> | void
interface Processors {
/**
* Will be called on all`AtRule` nodes.
*
* Will be called again on node or children changes.
*/
AtRule?: { [name: string]: AtRuleProcessor } | AtRuleProcessor
/**
* Will be called on all `AtRule` nodes, when all children will be processed.
*
* Will be called again on node or children changes.
*/
AtRuleExit?: { [name: string]: AtRuleProcessor } | AtRuleProcessor
/**
* Will be called on all `Comment` nodes.
*
* Will be called again on node or children changes.
*/
Comment?: CommentProcessor
/**
* Will be called on all `Comment` nodes after listeners
* for `Comment` event.
*
* Will be called again on node or children changes.
*/
CommentExit?: CommentProcessor
/**
* Will be called on all `Declaration` nodes after listeners
* for `Declaration` event.
*
* Will be called again on node or children changes.
*/
Declaration?: { [prop: string]: DeclarationProcessor } | DeclarationProcessor
/**
* Will be called on all `Declaration` nodes.
*
* Will be called again on node or children changes.
*/
DeclarationExit?:
| { [prop: string]: DeclarationProcessor }
| DeclarationProcessor
/**
* Will be called on `Document` node.
*
* Will be called again on children changes.
*/
Document?: DocumentProcessor
/**
* Will be called on `Document` node, when all children will be processed.
*
* Will be called again on children changes.
*/
DocumentExit?: DocumentProcessor
/**
* Will be called on `Root` node once.
*/
Once?: RootProcessor
/**
* Will be called on `Root` node once, when all children will be processed.
*/
OnceExit?: RootProcessor
/**
* Will be called on `Root` node.
*
* Will be called again on children changes.
*/
Root?: RootProcessor
/**
* Will be called on `Root` node, when all children will be processed.
*
* Will be called again on children changes.
*/
RootExit?: RootProcessor
/**
* Will be called on all `Rule` nodes.
*
* Will be called again on node or children changes.
*/
Rule?: RuleProcessor
/**
* Will be called on all `Rule` nodes, when all children will be processed.
*
* Will be called again on node or children changes.
*/
RuleExit?: RuleProcessor
}
declare namespace postcss {
export {
AnyNode,
AtRule,
AtRuleProps,
ChildNode,
ChildProps,
Comment,
CommentProps,
Container,
ContainerProps,
CssSyntaxError,
Declaration,
DeclarationProps,
Document,
DocumentProps,
FilePosition,
Input,
LazyResult,
list,
Message,
NewChild,
Node,
NodeErrorOptions,
NodeProps,
Position,
Processor,
Result,
Root,
RootProps,
Rule,
RuleProps,
Source,
Warning,
WarningOptions
}
export type SourceMap = {
toJSON(): RawSourceMap
} & SourceMapGenerator
export type Helpers = { postcss: Postcss; result: Result } & Postcss
export interface Plugin extends Processors {
postcssPlugin: string
prepare?: (result: Result) => Processors
}
export interface PluginCreator<PluginOptions> {
(opts?: PluginOptions): Plugin | Processor
postcss: true
}
export interface Transformer extends TransformCallback {
postcssPlugin: string
postcssVersion: string
}
export interface TransformCallback {
(root: Root, result: Result): Promise<void> | void
}
export interface OldPlugin<T> extends Transformer {
(opts?: T): Transformer
postcss: Transformer
}
export type AcceptedPlugin =
| {
postcss: Processor | TransformCallback
}
| OldPlugin<any>
| Plugin
| PluginCreator<any>
| Processor
| TransformCallback
export interface Parser<RootNode = Document | Root> {
(
css: { toString(): string } | string,
opts?: Pick<ProcessOptions, 'document' | 'from' | 'map'>
): RootNode
}
export interface Builder {
(part: string, node?: AnyNode, type?: 'end' | 'start'): void
}
export interface Stringifier {
(node: AnyNode, builder: Builder): void
}
export interface JSONHydrator {
(data: object): Node
(data: object[]): Node[]
}
export interface Syntax<RootNode = Document | Root> {
/**
* Function to generate AST by string.
*/
parse?: Parser<RootNode>
/**
* Class to generate string by AST.
*/
stringify?: Stringifier
}
export interface SourceMapOptions {
/**
* Use absolute path in generated source map.
*/
absolute?: boolean
/**
* Indicates that PostCSS should add annotation comments to the CSS.
* By default, PostCSS will always add a comment with a path
* to the source map. PostCSS will not add annotations to CSS files
* that do not contain any comments.
*
* By default, PostCSS presumes that you want to save the source map as
* `opts.to + '.map'` and will use this path in the annotation comment.
* A different path can be set by providing a string value for annotation.
*
* If you have set `inline: true`, annotation cannot be disabled.
*/
annotation?: ((file: string, root: Root) => string) | boolean | string
/**
* Override `from` in map’s sources.
*/
from?: string
/**
* Indicates that the source map should be embedded in the output CSS
* as a Base64-encoded comment. By default, it is `true`.
* But if all previous maps are external, not inline, PostCSS will not embed
* the map even if you do not set this option.
*
* If you have an inline source map, the result.map property will be empty,
* as the source map will be contained within the text of `result.css`.
*/
inline?: boolean
/**
* Source map content from a previous processing step (e.g., Sass).
*
* PostCSS will try to read the previous source map
* automatically (based on comments within the source CSS), but you can use
* this option to identify it manually.
*
* If desired, you can omit the previous map with prev: `false`.
*/
prev?: ((file: string) => string) | boolean | object | string
/**
* Indicates that PostCSS should set the origin content (e.g., Sass source)
* of the source map. By default, it is true. But if all previous maps do not
* contain sources content, PostCSS will also leave it out even if you
* do not set this option.
*/
sourcesContent?: boolean
}
export interface ProcessOptions<RootNode = Document | Root> {
/**
* Input file if it is not simple CSS file, but HTML with <style> or JS with CSS-in-JS blocks.
*/
document?: string
/**
* The path of the CSS source file. You should always set `from`,
* because it is used in source map generation and syntax error messages.
*/
from?: string | undefined
/**
* Source map options
*/
map?: boolean | SourceMapOptions
/**
* Function to generate AST by string.
*/
parser?: Parser<RootNode> | Syntax<RootNode>
/**
* Class to generate string by AST.
*/
stringifier?: Stringifier | Syntax<RootNode>
/**
* Object with parse and stringify.
*/
syntax?: Syntax<RootNode>
/**
* The path where you'll put the output CSS file. You should always set `to`
* to generate correct source maps.
*/
to?: string
}
export type Postcss = typeof postcss
/**
* Default function to convert a node tree into a CSS string.
*/
export let stringify: Stringifier
/**
* Parses source css and returns a new `Root` or `Document` node,
* which contains the source CSS nodes.
*
* ```js
* // Simple CSS concatenation with source map support
* const root1 = postcss.parse(css1, { from: file1 })
* const root2 = postcss.parse(css2, { from: file2 })
* root1.append(root2).toResult().css
* ```
*/
export let parse: Parser<Root>
/**
* Rehydrate a JSON AST (from `Node#toJSON`) back into the AST classes.
*
* ```js
* const json = root.toJSON()
* // save to file, send by network, etc
* const root2 = postcss.fromJSON(json)
* ```
*/
export let fromJSON: JSONHydrator
/**
* Creates a new `Comment` node.
*
* @param defaults Properties for the new node.
* @return New comment node
*/
export function comment(defaults?: CommentProps): Comment
/**
* Creates a new `AtRule` node.
*
* @param defaults Properties for the new node.
* @return New at-rule node.
*/
export function atRule(defaults?: AtRuleProps): AtRule
/**
* Creates a new `Declaration` node.
*
* @param defaults Properties for the new node.
* @return New declaration node.
*/
export function decl(defaults?: DeclarationProps): Declaration
/**
* Creates a new `Rule` node.
*
* @param default Properties for the new node.
* @return New rule node.
*/
export function rule(defaults?: RuleProps): Rule
/**
* Creates a new `Root` node.
*
* @param defaults Properties for the new node.
* @return New root node.
*/
export function root(defaults?: RootProps): Root
/**
* Creates a new `Document` node.
*
* @param defaults Properties for the new node.
* @return New document node.
*/
export function document(defaults?: DocumentProps): Document
export { postcss as default }
}
/**
* Create a new `Processor` instance that will apply `plugins`
* as CSS processors.
*
* ```js
* let postcss = require('postcss')
*
* postcss(plugins).process(css, { from, to }).then(result => {
* console.log(result.css)
* })
* ```
*
* @param plugins PostCSS plugins.
* @return Processor to process multiple CSS.
*/
declare function postcss(
plugins?: readonly postcss.AcceptedPlugin[]
): Processor
declare function postcss(...plugins: postcss.AcceptedPlugin[]): Processor
export = postcss
@@ -0,0 +1,6 @@
import {
MoonIcon
} from "./chunk-LQ7V7SFR.mjs";
export {
MoonIcon
};
@@ -0,0 +1,51 @@
<p align="center">
<a href="http://gulpjs.com">
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
</a>
</p>
# remove-bom-stream
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
Remove a UTF8 BOM at the start of the stream.
## Usage
```js
var fs = require('fs');
var concat = require('concat-stream');
var removeBOM = require('remove-bom-stream');
fs.createReadStream('utf8-file-with-bom.txt')
.pipe(removeBOM())
.pipe(concat(function(result) {
// result won't have a BOM
}));
```
## API
### `removeBOM()`
Returns a `through2` stream that will remove a BOM, given the data is a UTF8 Buffer with a BOM at the beginning. If the data is not UTF8 or does not have a BOM, the data is not changed and this becomes a normal passthrough stream.
## License
MIT
[downloads-image]: http://img.shields.io/npm/dm/remove-bom-stream.svg
[npm-url]: https://npmjs.com/package/remove-bom-stream
[npm-image]: http://img.shields.io/npm/v/remove-bom-stream.svg
[travis-url]: https://travis-ci.org/gulpjs/remove-bom-stream
[travis-image]: http://img.shields.io/travis/gulpjs/remove-bom-stream.svg?label=travis-ci
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/remove-bom-stream
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/remove-bom-stream.svg?label=appveyor
[coveralls-url]: https://coveralls.io/r/gulpjs/remove-bom-stream
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/remove-bom-stream/master.svg
[gitter-url]: https://gitter.im/gulpjs/gulp
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png
@@ -0,0 +1,182 @@
// @ts-check
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "createWatcher", {
enumerable: true,
get: function() {
return createWatcher;
}
});
const _chokidar = /*#__PURE__*/ _interop_require_default(require("chokidar"));
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
const _micromatch = /*#__PURE__*/ _interop_require_default(require("micromatch"));
const _normalizepath = /*#__PURE__*/ _interop_require_default(require("normalize-path"));
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
const _utils = require("./utils.js");
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function createWatcher(args, { state , rebuild }) {
let shouldPoll = args["--poll"];
let shouldCoalesceWriteEvents = shouldPoll || process.platform === "win32";
// Polling interval in milliseconds
// Used only when polling or coalescing add/change events on Windows
let pollInterval = 10;
let watcher = _chokidar.default.watch([], {
// Force checking for atomic writes in all situations
// This causes chokidar to wait up to 100ms for a file to re-added after it's been unlinked
// This only works when watching directories though
atomic: true,
usePolling: shouldPoll,
interval: shouldPoll ? pollInterval : undefined,
ignoreInitial: true,
awaitWriteFinish: shouldCoalesceWriteEvents ? {
stabilityThreshold: 50,
pollInterval: pollInterval
} : false
});
// A queue of rebuilds, file reads, etc… to run
let chain = Promise.resolve();
/**
* A list of files that have been changed since the last rebuild
*
* @type {{file: string, content: () => Promise<string>, extension: string}[]}
*/ let changedContent = [];
/**
* A list of files for which a rebuild has already been queued.
* This is used to prevent duplicate rebuilds when multiple events are fired for the same file.
* The rebuilt file is cleared from this list when it's associated rebuild has _started_
* This is because if the file is changed during a rebuild it won't trigger a new rebuild which it should
**/ let pendingRebuilds = new Set();
let _timer;
let _reject;
/**
* Rebuilds the changed files and resolves when the rebuild is
* complete regardless of whether it was successful or not
*/ async function rebuildAndContinue() {
let changes = changedContent.splice(0);
// There are no changes to rebuild so we can just do nothing
if (changes.length === 0) {
return Promise.resolve();
}
// Clear all pending rebuilds for the about-to-be-built files
changes.forEach((change)=>pendingRebuilds.delete(change.file));
// Resolve the promise even when the rebuild fails
return rebuild(changes).then(()=>{}, (e)=>{
console.error(e.toString());
});
}
/**
*
* @param {*} file
* @param {(() => Promise<string>) | null} content
* @param {boolean} skipPendingCheck
* @returns {Promise<void>}
*/ function recordChangedFile(file, content = null, skipPendingCheck = false) {
file = _path.default.resolve(file);
// Applications like Vim/Neovim fire both rename and change events in succession for atomic writes
// In that case rebuild has already been queued by rename, so can be skipped in change
if (pendingRebuilds.has(file) && !skipPendingCheck) {
return Promise.resolve();
}
// Mark that a rebuild of this file is going to happen
// It MUST happen synchronously before the rebuild is queued for this to be effective
pendingRebuilds.add(file);
changedContent.push({
file,
content: content !== null && content !== void 0 ? content : ()=>_fs.default.promises.readFile(file, "utf8"),
extension: _path.default.extname(file).slice(1)
});
if (_timer) {
clearTimeout(_timer);
_reject();
}
// If a rebuild is already in progress we don't want to start another one until the 10ms timer has expired
chain = chain.then(()=>new Promise((resolve, reject)=>{
_timer = setTimeout(resolve, 10);
_reject = reject;
}));
// Resolves once this file has been rebuilt (or the rebuild for this file has failed)
// This queues as many rebuilds as there are changed files
// But those rebuilds happen after some delay
// And will immediately resolve if there are no changes
chain = chain.then(rebuildAndContinue, rebuildAndContinue);
return chain;
}
watcher.on("change", (file)=>recordChangedFile(file));
watcher.on("add", (file)=>recordChangedFile(file));
// Restore watching any files that are "removed"
// This can happen when a file is pseudo-atomically replaced (a copy is created, overwritten, the old one is unlinked, and the new one is renamed)
// TODO: An an optimization we should allow removal when the config changes
watcher.on("unlink", (file)=>{
file = (0, _normalizepath.default)(file);
// Only re-add the file if it's not covered by a dynamic pattern
if (!_micromatch.default.some([
file
], state.contentPatterns.dynamic)) {
watcher.add(file);
}
});
// Some applications such as Visual Studio (but not VS Code)
// will only fire a rename event for atomic writes and not a change event
// This is very likely a chokidar bug but it's one we need to work around
// We treat this as a change event and rebuild the CSS
watcher.on("raw", (evt, filePath, meta)=>{
if (evt !== "rename" || filePath === null) {
return;
}
let watchedPath = meta.watchedPath;
// Watched path might be the file itself
// Or the directory it is in
filePath = watchedPath.endsWith(filePath) ? watchedPath : _path.default.join(watchedPath, filePath);
// Skip this event since the files it is for does not match any of the registered content globs
if (!_micromatch.default.some([
filePath
], state.contentPatterns.all)) {
return;
}
// Skip since we've already queued a rebuild for this file that hasn't happened yet
if (pendingRebuilds.has(filePath)) {
return;
}
// We'll go ahead and add the file to the pending rebuilds list here
// It'll be removed when the rebuild starts unless the read fails
// which will be taken care of as well
pendingRebuilds.add(filePath);
async function enqueue() {
try {
// We need to read the file as early as possible outside of the chain
// because it may be gone by the time we get to it. doing the read
// immediately increases the chance that the file is still there
let content = await (0, _utils.readFileWithRetries)(_path.default.resolve(filePath));
if (content === undefined) {
return;
}
// This will push the rebuild onto the chain
// We MUST skip the rebuild check here otherwise the rebuild will never happen on Linux
// This is because the order of events and timing is different on Linux
// @ts-ignore: TypeScript isn't picking up that content is a string here
await recordChangedFile(filePath, ()=>content, true);
} catch {
// If reading the file fails, it's was probably a deleted temporary file
// So we can ignore it and no rebuild is needed
}
}
enqueue().then(()=>{
// If the file read fails we still need to make sure the file isn't stuck in the pending rebuilds list
pendingRebuilds.delete(filePath);
});
});
return {
fswatcher: watcher,
refreshWatchedFiles () {
watcher.add(Array.from(state.contextDependencies));
watcher.add(Array.from(state.configBag.dependencies));
watcher.add(state.contentPatterns.all);
}
};
}
@@ -0,0 +1,8 @@
#!/bin/sh
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
base=$(dirname "$0")
exec python "${base}/gyp_main.py" "$@"
@@ -0,0 +1,58 @@
var $eMoU1$react = require("react");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useObjectRef", () => $475b35fe72ba49b3$export$4338b53315abf666);
/*
* Copyright 2021 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $475b35fe72ba49b3$export$4338b53315abf666(ref) {
const objRef = (0, $eMoU1$react.useRef)(null);
const cleanupRef = (0, $eMoU1$react.useRef)(undefined);
const refEffect = (0, $eMoU1$react.useCallback)((instance)=>{
if (typeof ref === 'function') {
const refCallback = ref;
const refCleanup = refCallback(instance);
return ()=>{
if (typeof refCleanup === 'function') refCleanup();
else refCallback(null);
};
} else if (ref) {
ref.current = instance;
return ()=>{
ref.current = null;
};
}
}, [
ref
]);
return (0, $eMoU1$react.useMemo)(()=>({
get current () {
return objRef.current;
},
set current (value){
objRef.current = value;
if (cleanupRef.current) {
cleanupRef.current();
cleanupRef.current = undefined;
}
if (value != null) cleanupRef.current = refEffect(value);
}
}), [
refEffect
]);
}
//# sourceMappingURL=useObjectRef.main.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"K D E wC"},B:{"1":"C L M G N O P","2":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"2":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C"},D:{"2":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"2":"0 1 2 3 4 5 6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z FD GD HD ID NC uC JD OC"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"2":"TC J I iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C H NC uC OC"},L:{"2":"I"},M:{"2":"MC"},N:{"1":"A B"},O:{"2":"PC"},P:{"2":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"2":"zD"},R:{"2":"0D"},S:{"2":"1D 2D"}},B:6,C:"JPEG XR image format",D:true};
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildBindingIdentifier = buildBindingIdentifier;
const BindingIdentifier_1 = require("../models/BindingIdentifier");
function buildBindingIdentifier(binding) {
return {
[BindingIdentifier_1.bindingIdentifierSymbol]: true,
id: binding.id,
};
}
//# sourceMappingURL=buildBindingIdentifier.js.map
@@ -0,0 +1,23 @@
/**
* Create an extension for `mdast-util-from-markdown` to enable GFM
* strikethrough in markdown.
*
* @returns {FromMarkdownExtension}
* Extension for `mdast-util-from-markdown` to enable GFM strikethrough.
*/
export function gfmStrikethroughFromMarkdown(): FromMarkdownExtension
/**
* Create an extension for `mdast-util-to-markdown` to enable GFM
* strikethrough in markdown.
*
* @returns {ToMarkdownExtension}
* Extension for `mdast-util-to-markdown` to enable GFM strikethrough.
*/
export function gfmStrikethroughToMarkdown(): ToMarkdownExtension
export type Delete = import('mdast').Delete
export type CompileContext = import('mdast-util-from-markdown').CompileContext
export type FromMarkdownExtension = import('mdast-util-from-markdown').Extension
export type FromMarkdownHandle = import('mdast-util-from-markdown').Handle
export type ConstructName = import('mdast-util-to-markdown').ConstructName
export type ToMarkdownHandle = import('mdast-util-to-markdown').Handle
export type ToMarkdownExtension = import('mdast-util-to-markdown').Options
@@ -0,0 +1,40 @@
{
"name": "@types/minimist",
"version": "1.2.5",
"description": "TypeScript definitions for minimist",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/minimist",
"license": "MIT",
"contributors": [
{
"name": "Bart van der Schoor",
"githubUsername": "Bartvds",
"url": "https://github.com/Bartvds"
},
{
"name": "Necroskillz",
"githubUsername": "Necroskillz",
"url": "https://github.com/Necroskillz"
},
{
"name": "kamranayub",
"githubUsername": "kamranayub",
"url": "https://github.com/kamranayub"
},
{
"name": "Piotr Błażejewicz",
"githubUsername": "peterblazejewicz",
"url": "https://github.com/peterblazejewicz"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/minimist"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "e7dad9991b8f1cc7aae482ae6c4009a6a44645234b6f94524e2a76425cda2822",
"typeScriptVersion": "4.5"
}
@@ -0,0 +1,18 @@
/**
* DON'T EDIT THIS FILE.
* This file was generated by "scripts/update-lib-flat-configs.js" script.
*/
"use strict"
module.exports = {
plugins: {
get "es-x"() {
return require("../../index.js")
},
},
rules: {
"es-x/no-intl-datetimeformat-prototype-formatrange": "error",
"es-x/no-intl-displaynames": "error",
"es-x/no-intl-listformat": "error",
},
}
@@ -0,0 +1,2 @@
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"default", [], import("../utils/create-rule.ts").ImportXPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1 @@
{"name":"inversify","version":"7.10.4","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532100714,"integrity":"sha512-nUwbfsASpg02LFEWSLR01A0aw10HqhyQ81npMrQAC6gssu6jYpkcmyFNSmTkxkvr28G/+TE6qK3JDUqMQBBjyg==","mode":420,"size":1087},"lib/cjs/index.js":{"checkedAt":1794532100714,"integrity":"sha512-Xl2Kcf0SGZXREANzUpqhItJrd1qGuDu+6YXXCME9ibAPpy0OBJcyiIcol1aDQIUOa0cNDqsQR7VLUjLGkqReUA==","mode":420,"size":2718},"lib/esm/index.js":{"checkedAt":1794532100715,"integrity":"sha512-/DMeyPN8cnMTa1VqXFw+h/iXSEPvLQY6FDj08cNyGY4XBDSE+kJB3Gs23zKTX/8RkxWMxwCVJN1d6KDQZl5oKg==","mode":420,"size":376},"lib/cjs/test/bugs/issue_1190.test.js":{"checkedAt":1794532100715,"integrity":"sha512-+RC6wkE6Cxjdsel4ZBLMZ2nswTfGkuDQmIYQHonqPcp9PBFD1LWwpczJhbPH+5jt5Sf8nUgP4blTTPCkUHKqWQ==","mode":420,"size":2289},"lib/cjs/test/bugs/issue_1297.test.js":{"checkedAt":1794532100715,"integrity":"sha512-A77ZnxLe18nWwMBcDwvUEQZqt71jxg8Uhf+aMLTt2JoSIct1tlRv/FCEnYyO/AmVGkxdHtpLhRcDtsMSgD1LZQ==","mode":420,"size":2765},"lib/cjs/test/bugs/issue_1416.test.js":{"checkedAt":1794532100715,"integrity":"sha512-iExpjNx2Iaeh3eTHTc/5SwgIKn6mKOLbWfkb0trXbmKmJLJjxE+3t/m3p05eCRHWBUjQ8LgYFvRmOsRXUlhthQ==","mode":420,"size":1784},"lib/cjs/test/bugs/issue_1515.test.js":{"checkedAt":1794532100715,"integrity":"sha512-0558uAtFmIp43UQKCziNxCDSo4Ti2epvouFkn08bgIRDb+pbLfWZYIK8+yQip4ZE4Jr24BlpHd57Ve6fm07O5Q==","mode":420,"size":2522},"lib/cjs/test/bugs/issue_1518.test.js":{"checkedAt":1794532100715,"integrity":"sha512-mw+5Aag+lyJU0B3YjH2+VIcBICFy50MFJGcu0PmewgFGhZxnv8ICn0j/Kq9uLO+GjKpgXjpZlBmc8CT8sDn6uQ==","mode":420,"size":627},"lib/cjs/test/bugs/issue_706.test.js":{"checkedAt":1794532100715,"integrity":"sha512-B2an3wQbq4F1HMvXJ+xlfWQgIFCeFtPSFblkF5Ole1m7QVcQjA2orT7lZnGFXLYWWLfm7RfRumx06v6G9YkMtQ==","mode":420,"size":1188},"lib/cjs/test/bugs/issue_928.test.js":{"checkedAt":1794532100715,"integrity":"sha512-UjSQ3aIjza4Tzkeq5lpXfxZFYqsTPNzleSsjZckl1nXR8Rn/ol3I7wR9AExFrB8l6u9AJdwLBsQ3jvOQnHeCsA==","mode":420,"size":2374},"lib/cjs/package.json":{"checkedAt":1794532100641,"integrity":"sha512-8U1e2/m1/MZLAABugPPCT7pT1gQsJ0emvlef4tzYwWdTJIrY6/1Ks6sAUDIRPeWx9i1UbwxIXcxgesvNgTTtuA==","mode":420,"size":24},"lib/esm/package.json":{"checkedAt":1794532100642,"integrity":"sha512-0/qKvY+e4vDrutI/Gs9dbxgY8+4bWMP+lwjtUzPoWNp8Btq/+DNRn4Fl+lNX+8ULTmX/HqaMXapHD6wIA6VgiQ==","mode":420,"size":22},"package.json":{"checkedAt":1794532100716,"integrity":"sha512-4+9vzFhvxbVB/WD9Ub6+DsFKo5h3y2maXgX7nahQk6RcCsYd9iDOGD7/0mXaBeWNaWwxtOYA6N9NfiV+YS083A==","mode":420,"size":2062},"lib/cjs/test/bugs/bugs.int.spec.d.ts.map":{"checkedAt":1794532100716,"integrity":"sha512-TR/qyiabaMFTFcCGla9pcW8VYZpKk9p7JZCqyDttDoS92k6rW/6KSM8X+yMEeGHGSUFNdDAYmbvLp6RwDtPkXg==","mode":420,"size":139},"lib/cjs/test/container/container_module.int.spec.d.ts.map":{"checkedAt":1794532100716,"integrity":"sha512-zcAYur6N/m0vYPH202iBXLfFqVjnqf26m/z61Rvrz07NttioToeK517mAFNGhcSG9zgqcpnzbWVvuAMK68xDCA==","mode":420,"size":168},"lib/cjs/test/container/container.int.spec.d.ts.map":{"checkedAt":1794532100716,"integrity":"sha512-RgQE8rFkd5hoFIBL8xGWN/lPA0jLD8gIc3EuPLWikNsnUBnA6QcHgI65/RsaB0TdKw+RWxR792aEblOX1BBTmQ==","mode":420,"size":154},"lib/cjs/test/node/error_messages.int.spec.d.ts.map":{"checkedAt":1794532100716,"integrity":"sha512-uwN67/x87r4eZIRYoWdn3dl2XR5epJUByS8xeYP3Jwz1Qd4ZRvZrgLtEMSMB98JyvqH6YB+oXuNErx1nFuw3OQ==","mode":420,"size":159},"lib/cjs/test/node/exceptions.int.spec.d.ts.map":{"checkedAt":1794532100716,"integrity":"sha512-1+AMX6DEi/pyJVDYgcOqBfH5ArJu0Re6UxARF6EiD+yB34ljdw2zNh3hEMwj+uc+ZLJwlELL2Y4Yp9sJp4cABQ==","mode":420,"size":151},"lib/cjs/index.d.ts.map":{"checkedAt":1794532100716,"integrity":"sha512-aeCjWSL/V/8ZiD9u5Bq3nTut3lpuuu135X4FrGFf90asBAskiDx/lCpSVfeXSxgQ5zMNzym27ju7YqtPtZZkvg==","mode":420,"size":930},"lib/esm/index.d.ts.map":{"checkedAt":1794532100716,"integrity":"sha512-aeCjWSL/V/8ZiD9u5Bq3nTut3lpuuu135X4FrGFf90asBAskiDx/lCpSVfeXSxgQ5zMNzym27ju7YqtPtZZkvg==","mode":420,"size":930},"lib/cjs/index.js.map":{"checkedAt":1794532100717,"integrity":"sha512-Is3RAjXPIkog3k7eHL5oqwiuE5QArcmZrf45ibVHBDYbb13KdjNJkPwPESaVtPrk3lFBTuI6X9T71TBin1dP4Q==","mode":420,"size":533},"lib/esm/index.js.map":{"checkedAt":1794532100717,"integrity":"sha512-YQKVY9LU+3B7577X8rvvx/78xBf/YOTunRJXIPbHy1r9cjaIQF9xnkmY8vzk4ldBshM3N56VLONpOPnf1P4lvA==","mode":420,"size":89},"lib/cjs/test/annotation/inject.int.spec.d.ts.map":{"checkedAt":1794532100717,"integrity":"sha512-ZwbgrNnB4Ae8B64VKH3KFlx2gVSwFBBWmbL3RmSAkCWY51G4ptkgi0ckeBlAooIerO8RrVuuJPEappbXd3JvEw==","mode":420,"size":149},"lib/cjs/test/annotation/injectable.int.spec.d.ts.map":{"checkedAt":1794532100717,"integrity":"sha512-kwtD/AP8qSBOUTHNkhtSqAoFnaduSrU4iVh6z26k2Np/Y0NwKo6iuVi4Zts8pXq4cUPPdcYUGVEE7HAo5w/0cA==","mode":420,"size":157},"lib/cjs/test/inversify.int.spec.d.ts.map":{"checkedAt":1794532100717,"integrity":"sha512-hIGy05GxeyyiGiXIARQZPdhumDiRahFffizq+yEUVqHTkZrdIFE90K11S0C9Byh8artNv0umun2brhEXQTpQMQ==","mode":420,"size":141},"lib/cjs/test/bugs/issue_1190.test.d.ts.Line truncated
@@ -0,0 +1 @@
{"version":3,"file":"no-find-dom-node.d.ts","sourceRoot":"","sources":["no-find-dom-node.js"],"names":[],"mappings":"wBAkBW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,aAAa,CAAC,aAAO,CAAC;IACxC,iBAAiB,CAAC,OAAS,CAAC,iCAA2B,EAAE,KAAK,UAAU,CAAC,gCAAoB,CAAC;IAC9F,cAAc,CAAC,OAAS,CAAC,gBAAgB,EAAE,KAAK,KAAK,EAAE;IACvD,cAAc,CAAC,cAAQ,CAAC;IACxB,kBAAkB,CAAC,OAAS,CAAC,iCAA2B,EAAE,KAAK,UAAU,CAAC,iCAAqB,CAAC;IAChG,sBAAsB,CAAC,mEAAiD,CAAC;IACzE,UAAU,CAAC,OAAO,CAAC;IACnB,aAAa,CAAC,gBAAgB,CAAC;IAC/B,YAAY,CAAC,kDAAgC,CAAC;AAChD","sources":["packages/@react-aria/table/intl/pl-PL.json"],"sourcesContent":["{\n \"ascending\": \"rosnąco\",\n \"ascendingSort\": \"posortowano według kolumny {columnName} w porządku rosnącym\",\n \"columnSize\": \"Liczba pikseli: {value}\",\n \"descending\": \"malejąco\",\n \"descendingSort\": \"posortowano według kolumny {columnName} w porządku malejącym\",\n \"resizerDescription\": \"Naciśnij Enter, aby rozpocząć zmienianie rozmiaru\",\n \"select\": \"Zaznacz\",\n \"selectAll\": \"Zaznacz wszystko\",\n \"sortable\": \"kolumna z możliwością sortowania\"\n}\n"],"names":[],"version":3,"file":"pl-PL.module.js.map"}
@@ -0,0 +1,26 @@
"use client";
// src/refs.ts
import { isFunction } from "@heroui/shared-utils";
function assignRef(ref, value) {
if (ref == null) return;
if (isFunction(ref)) {
ref(value);
return;
}
try {
ref.current = value;
} catch {
throw new Error(`Cannot assign value '${value}' to ref '${ref}'`);
}
}
function mergeRefs(...refs) {
return (node) => {
refs.forEach((ref) => assignRef(ref, node));
};
}
export {
assignRef,
mergeRefs
};
@@ -0,0 +1,223 @@
import type { Middleware, StoreEnhancer } from 'redux'
import type { Tuple } from './utils'
export function safeAssign<T extends object>(
target: T,
...args: Array<Partial<NoInfer<T>>>
) {
Object.assign(target, ...args)
}
/**
* return True if T is `any`, otherwise return False
* taken from https://github.com/joonhocho/tsdef
*
* @internal
*/
export type IsAny<T, True, False = never> =
// test if we are going the left AND right path in the condition
true | false extends (T extends never ? true : false) ? True : False
export type CastAny<T, CastTo> = IsAny<T, CastTo, T>
/**
* return True if T is `unknown`, otherwise return False
* taken from https://github.com/joonhocho/tsdef
*
* @internal
*/
export type IsUnknown<T, True, False = never> = unknown extends T
? IsAny<T, False, True>
: False
export type FallbackIfUnknown<T, Fallback> = IsUnknown<T, Fallback, T>
/**
* @internal
*/
export type IfMaybeUndefined<P, True, False> = [undefined] extends [P]
? True
: False
/**
* @internal
*/
export type IfVoid<P, True, False> = [void] extends [P] ? True : False
/**
* @internal
*/
export type IsEmptyObj<T, True, False = never> = T extends any
? keyof T extends never
? IsUnknown<T, False, IfMaybeUndefined<T, False, IfVoid<T, False, True>>>
: False
: never
/**
* returns True if TS version is above 3.5, False if below.
* uses feature detection to detect TS version >= 3.5
* * versions below 3.5 will return `{}` for unresolvable interference
* * versions above will return `unknown`
*
* @internal
*/
export type AtLeastTS35<True, False> = [True, False][IsUnknown<
ReturnType<<T>() => T>,
0,
1
>]
/**
* @internal
*/
export type IsUnknownOrNonInferrable<T, True, False> = AtLeastTS35<
IsUnknown<T, True, False>,
IsEmptyObj<T, True, IsUnknown<T, True, False>>
>
/**
* Convert a Union type `(A|B)` to an intersection type `(A&B)`
*/
export type UnionToIntersection<U> = (
U extends any ? (k: U) => void : never
) extends (k: infer I) => void
? I
: never
// Appears to have a convenient side effect of ignoring `never` even if that's not what you specified
export type ExcludeFromTuple<T, E, Acc extends unknown[] = []> = T extends [
infer Head,
...infer Tail,
]
? ExcludeFromTuple<Tail, E, [...Acc, ...([Head] extends [E] ? [] : [Head])]>
: Acc
type ExtractDispatchFromMiddlewareTuple<
MiddlewareTuple extends readonly any[],
Acc extends {},
> = MiddlewareTuple extends [infer Head, ...infer Tail]
? ExtractDispatchFromMiddlewareTuple<
Tail,
Acc & (Head extends Middleware<infer D> ? IsAny<D, {}, D> : {})
>
: Acc
export type ExtractDispatchExtensions<M> =
M extends Tuple<infer MiddlewareTuple>
? ExtractDispatchFromMiddlewareTuple<MiddlewareTuple, {}>
: M extends ReadonlyArray<Middleware>
? ExtractDispatchFromMiddlewareTuple<[...M], {}>
: never
type ExtractStoreExtensionsFromEnhancerTuple<
EnhancerTuple extends readonly any[],
Acc extends {},
> = EnhancerTuple extends [infer Head, ...infer Tail]
? ExtractStoreExtensionsFromEnhancerTuple<
Tail,
Acc & (Head extends StoreEnhancer<infer Ext> ? IsAny<Ext, {}, Ext> : {})
>
: Acc
export type ExtractStoreExtensions<E> =
E extends Tuple<infer EnhancerTuple>
? ExtractStoreExtensionsFromEnhancerTuple<EnhancerTuple, {}>
: E extends ReadonlyArray<StoreEnhancer>
? UnionToIntersection<
E[number] extends StoreEnhancer<infer Ext>
? Ext extends {}
? IsAny<Ext, {}, Ext>
: {}
: {}
>
: never
type ExtractStateExtensionsFromEnhancerTuple<
EnhancerTuple extends readonly any[],
Acc extends {},
> = EnhancerTuple extends [infer Head, ...infer Tail]
? ExtractStateExtensionsFromEnhancerTuple<
Tail,
Acc &
(Head extends StoreEnhancer<any, infer StateExt>
? IsAny<StateExt, {}, StateExt>
: {})
>
: Acc
export type ExtractStateExtensions<E> =
E extends Tuple<infer EnhancerTuple>
? ExtractStateExtensionsFromEnhancerTuple<EnhancerTuple, {}>
: E extends ReadonlyArray<StoreEnhancer>
? UnionToIntersection<
E[number] extends StoreEnhancer<any, infer StateExt>
? StateExt extends {}
? IsAny<StateExt, {}, StateExt>
: {}
: {}
>
: never
/**
* Helper type. Passes T out again, but boxes it in a way that it cannot
* "widen" the type by accident if it is a generic that should be inferred
* from elsewhere.
*
* @internal
*/
export type NoInfer<T> = [T][T extends any ? 0 : never]
export type NonUndefined<T> = T extends undefined ? never : T
export type WithRequiredProp<T, K extends keyof T> = Omit<T, K> &
Required<Pick<T, K>>
export type WithOptionalProp<T, K extends keyof T> = Omit<T, K> &
Partial<Pick<T, K>>
export interface TypeGuard<T> {
(value: any): value is T
}
export interface HasMatchFunction<T> {
match: TypeGuard<T>
}
export const hasMatchFunction = <T>(
v: Matcher<T>,
): v is HasMatchFunction<T> => {
return v && typeof (v as HasMatchFunction<T>).match === 'function'
}
/** @public */
export type Matcher<T> = HasMatchFunction<T> | TypeGuard<T>
/** @public */
export type ActionFromMatcher<M extends Matcher<any>> =
M extends Matcher<infer T> ? T : never
export type Id<T> = { [K in keyof T]: T[K] } & {}
export type Tail<T extends any[]> = T extends [any, ...infer Tail]
? Tail
: never
export type UnknownIfNonSpecific<T> = {} extends T ? unknown : T
/**
* A Promise that will never reject.
* @see https://github.com/reduxjs/redux-toolkit/issues/4101
*/
export type SafePromise<T> = Promise<T> & {
__linterBrands: 'SafePromise'
}
/**
* Properly wraps a Promise as a {@link SafePromise} with .catch(fallback).
*/
export function asSafePromise<Resolved, Rejected>(
promise: Promise<Resolved>,
fallback: (error: unknown) => Rejected,
) {
return promise.catch(fallback) as SafePromise<Resolved | Rejected>
}
@@ -0,0 +1,30 @@
import eq from './eq.js';
/**
* The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
* support for iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @returns {Array} Returns the new duplicate free array.
*/
function baseSortedUniq(array, iteratee) {
var index = -1,
length = array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
if (!index || !eq(computed, seen)) {
var seen = computed;
result[resIndex++] = value === 0 ? 0 : value;
}
}
return result;
}
export default baseSortedUniq;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"2":"C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p","194":"q r s t","260":"0 1 2 3 4 5 u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"2":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C"},D:{"2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p","194":"q r s t","260":"0 1 2 3 4 5 u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD","260":"nC oC pC qC rC sC tC DD ED","772":"SC"},F:{"2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b FD GD HD ID NC uC JD OC","194":"c d e f g","260":"0 1 2 3 4 5 h i j k l m n o p q r s t u v w x y z"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD","260":"nC oC pC qC rC sC tC","772":"SC"},H:{"2":"hD"},I:{"2":"TC J iD jD kD lD vC mD nD","260":"I"},J:{"2":"D A"},K:{"2":"A B C NC uC OC","260":"H"},L:{"260":"I"},M:{"2":"MC"},N:{"2":"A B"},O:{"2":"PC"},P:{"2":"6 7 J oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD","260":"8 9 AB BB CB DB EB FB"},Q:{"2":"zD"},R:{"2":"0D"},S:{"2":"1D 2D"}},B:5,C:"CSS Container Style Queries",D:true};
@@ -0,0 +1,19 @@
Copyright (c) 2011 Felix Geisendörfer (felix@debuggable.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,66 @@
'use strict';
module.exports = function generate_enum(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
var $i = 'i' + $lvl,
$vSchema = 'schema' + $lvl;
if (!$isData) {
out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';';
}
out += 'var ' + ($valid) + ';';
if ($isData) {
out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';
}
out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }';
if ($isData) {
out += ' } ';
}
out += ' if (!' + ($valid) + ') { ';
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } ';
if (it.opts.messages !== false) {
out += ' , message: \'should be equal to one of the allowed values\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' }';
if ($breakOnError) {
out += ' else { ';
}
return out;
}
@@ -0,0 +1,22 @@
import * as core from "../core/index.cjs";
import * as schemas from "./schemas.cjs";
export interface ZodMiniISODateTime extends schemas.ZodMiniStringFormat<"datetime"> {
_zod: core.$ZodISODateTimeInternals;
}
export declare const ZodMiniISODateTime: core.$constructor<ZodMiniISODateTime>;
export declare function datetime(params?: string | core.$ZodISODateTimeParams): ZodMiniISODateTime;
export interface ZodMiniISODate extends schemas.ZodMiniStringFormat<"date"> {
_zod: core.$ZodISODateInternals;
}
export declare const ZodMiniISODate: core.$constructor<ZodMiniISODate>;
export declare function date(params?: string | core.$ZodISODateParams): ZodMiniISODate;
export interface ZodMiniISOTime extends schemas.ZodMiniStringFormat<"time"> {
_zod: core.$ZodISOTimeInternals;
}
export declare const ZodMiniISOTime: core.$constructor<ZodMiniISOTime>;
export declare function time(params?: string | core.$ZodISOTimeParams): ZodMiniISOTime;
export interface ZodMiniISODuration extends schemas.ZodMiniStringFormat<"duration"> {
_zod: core.$ZodISODurationInternals;
}
export declare const ZodMiniISODuration: core.$constructor<ZodMiniISODuration>;
export declare function duration(params?: string | core.$ZodISODurationParams): ZodMiniISODuration;
@@ -0,0 +1 @@
{"name":"@react-types/dialog","version":"3.5.22","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532108267,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"package.json":{"checkedAt":1794532108267,"integrity":"sha512-3V2LjJFESdNO+pv7b/+d13DOE0bOZ87N3swzv99jtk3g3VwutKoySbdbgoDVN5QWjVQaEY/0XtmYekdfvAwMrw==","mode":420,"size":564},"README.md":{"checkedAt":1794532108267,"integrity":"sha512-HrSAhniOkfFehvqUBgx8zrZtaXJgnfXtPE3e2oLJbgSTA6lPfzrLPIh8FKpli2IBoTewZ/lyutYjSwC5lC7a2g==","mode":420,"size":137},"src/index.d.ts":{"checkedAt":1794532108268,"integrity":"sha512-m2M7Ps/YrGBYAS7Uye5zy04D5czrOEvDBGNR5gjmDkcl+L/bc+wSDWHI9Sy9eyGeyzeGP2eyK7LLmGAWby993w==","mode":420,"size":4775}}}
@@ -0,0 +1,25 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
import { Name, SubjectPublicKeyInfo } from "@peculiar/asn1-x509";
import { Attributes } from "./attributes";
export class CertificationRequestInfo {
constructor(params = {}) {
this.version = 0;
this.subject = new Name();
this.subjectPKInfo = new SubjectPublicKeyInfo();
this.attributes = new Attributes();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], CertificationRequestInfo.prototype, "version", void 0);
__decorate([
AsnProp({ type: Name })
], CertificationRequestInfo.prototype, "subject", void 0);
__decorate([
AsnProp({ type: SubjectPublicKeyInfo })
], CertificationRequestInfo.prototype, "subjectPKInfo", void 0);
__decorate([
AsnProp({ type: Attributes, implicit: true, context: 0, optional: true })
], CertificationRequestInfo.prototype, "attributes", void 0);
@@ -0,0 +1,569 @@
[
{
"path": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community",
"version": "17.4.33213.308",
"packages": [
"Microsoft.VisualStudio.Product.Community",
"Microsoft.VisualStudio.PackageGroup.LiveShare.VSCore",
"Microsoft.VisualStudio.LiveShare.VSCore",
"Microsoft.VisualStudio.Workload.NativeDesktop",
"Microsoft.VisualStudio.Component.VC.ASAN",
"Microsoft.VisualCpp.ASAN.X86",
"Microsoft.VC.14.34.17.4.ASAN.X86.base",
"Microsoft.VC.14.34.17.4.ASAN.X64.base",
"Microsoft.VC.14.34.17.4.ASAN.Headers.base",
"Microsoft.VisualStudio.VC.IDE.Project.Factories",
"Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest",
"Microsoft.VisualStudio.VC.Ide.TestAdapterForGoogleTest",
"Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest",
"Microsoft.VisualStudio.VC.Ide.TestAdapterForBoostTest",
"Microsoft.VisualStudio.Component.VC.CMake.Project",
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.CMake",
"Microsoft.VisualStudio.VC.CMake",
"Microsoft.VisualStudio.VC.CMake.Project",
"Microsoft.VisualStudio.VC.CMake.Client",
"Microsoft.VisualStudio.VC.ExternalBuildFramework",
"Microsoft.VisualStudio.Component.VC.DiagnosticTools",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core",
"Microsoft.VisualStudio.PackageGroup.TestTools.Native",
"Microsoft.VisualStudio.Component.VC.Redist.14.Latest",
"Microsoft.VisualStudio.VC.Templates.UnitTest",
"Microsoft.VisualStudio.VC.UnitTest.Desktop.Build.Core",
"Microsoft.VisualStudio.TestTools.TestPlatform.V1.CPP",
"Microsoft.VisualStudio.VC.Templates.UnitTest.Resources",
"Microsoft.VisualStudio.VC.Templates.Desktop",
"Microsoft.VisualStudio.Component.Graphics",
"Microsoft.VisualStudio.Graphics.Viewers",
"Microsoft.VisualStudio.Graphics.Viewers.Resources",
"Microsoft.VisualStudio.Component.VC.ATL.ARM64",
"Microsoft.VisualCpp.ATL.ARM64",
"Microsoft.VC.14.34.17.4.ATL.ARM64.base",
"Microsoft.VisualStudio.Component.VC.ATL",
"Microsoft.VisualStudio.VC.Ide.ATL",
"Microsoft.VisualStudio.VC.Ide.ATL.Resources",
"Microsoft.VisualCpp.ATL.X86",
"Microsoft.VC.14.34.17.4.ATL.X86.base",
"Microsoft.VisualCpp.ATL.X64",
"Microsoft.VC.14.34.17.4.ATL.X64.base",
"Microsoft.VC.14.34.17.4.Props.ATLMFC",
"Microsoft.VisualCpp.ATL.Source",
"Microsoft.VC.14.34.17.4.ATL.Source.base",
"Microsoft.VisualCpp.ATL.Headers",
"Microsoft.VC.14.34.17.4.ATL.Headers.base",
"Microsoft.VC.14.34.17.4.Servicing.ATL",
"Microsoft.VisualStudio.Component.VC.Tools.ARM64",
"Microsoft.VisualStudio.VC.MSBuild.v170.ARM64.v143",
"Microsoft.VisualStudio.VC.MSBuild.v170.ARM64",
"Microsoft.VS.VC.vcvars.arm64.Shortcuts",
"Microsoft.VisualCpp.CA.Ext.Hostx64.TargetARM64",
"Microsoft.VC.14.34.17.4.CA.Ext.Hostx64.TargetARM64.base",
"Microsoft.VC.14.34.17.4.CA.Ext.Hostx64.TargetARM64.Res.base",
"Microsoft.VisualCpp.CA.Ext.Hostx86.TargetARM64",
"Microsoft.VC.14.34.17.4.CA.Ext.Hostx86.TargetARM64.base",
"Microsoft.VC.14.34.17.4.CA.Ext.Hostx86.TargetARM64.Res.base",
"Microsoft.VisualCpp.CA.Ext.HostARM64.TargetARM64",
"Microsoft.VC.14.34.17.4.CA.Ext.HostARM64.TargetARM64.base",
"Microsoft.VC.14.34.17.4.CA.Ext.HostARM64.TargetARM64.Res.base",
"Microsoft.VisualCpp.Tools.Hostx86.Targetarm64",
"Microsoft.VC.14.34.17.4.Tools.Hostx86.Targetarm64.base",
"Microsoft.VC.14.34.17.4.Tools.HostX86.TargetARM64.Res.base",
"Microsoft.VisualCpp.Tools.HostARM64.TargetARM64",
"Microsoft.VC.14.34.17.4.Tools.HostARM64.TargetARM64.base",
"Microsoft.VC.14.34.17.4.Tools.HostARM64.TargetARM64.Res.base",
"Microsoft.VisualCpp.CRT.Redist.ARM64.OneCore.Desktop",
"Microsoft.VC.14.34.17.4.CRT.Redist.ARM64.OneCore.Desktop.base",
"Microsoft.VisualCpp.CRT.Redist.ARM64",
"Microsoft.VC.14.34.17.4.CRT.Redist.ARM64.base",
"Microsoft.VisualCpp.CRT.ARM64.OneCore.Desktop",
"Microsoft.VC.14.34.17.4.CRT.ARM64.OneCore.Desktop.base",
"Microsoft.VC.14.34.17.4.CRT.ARM64.OneCore.Desktop.debug.base",
"Microsoft.VisualCpp.CRT.ARM64.Store",
"Microsoft.VC.14.34.17.4.CRT.ARM64.Store.base",
"Microsoft.VisualCpp.CRT.ARM64.Desktop",
"Microsoft.VC.14.34.17.4.CRT.ARM64.Desktop.base",
"Microsoft.VC.14.34.17.4.CRT.ARM64.Desktop.debug.base",
"Microsoft.VisualStudio.PackageGroup.VC.Tools.x64.ARM64",
"Microsoft.VisualCpp.Tools.Core",
"Microsoft.VisualCpp.PGO.ARM64",
"Microsoft.VC.14.34.17.4.PGO.ARM64.base",
"Microsoft.VisualCpp.Premium.Tools.Hostx86.Targetarm64",
"Microsoft.VC.14.34.17.4.Premium.Tools.Hostx86.Targetarm64.base",
"Microsoft.VC.14.34.17.4.Prem.HostX86.TargetARM64.Res.base",
"Microsoft.VisualCpp.Premium.Tools.HostX64.TargetARM64",
"Microsoft.VC.14.34.17.4.Premium.Tools.HostX64.TargetARM64.base",
"Microsoft.VC.14.34.17.4.Prem.HostX64.TargetARM64.Res.base",
"Microsoft.VisualCpp.Premium.Tools.ARM64.Base",
"Microsoft.VC.14.34.17.4.Premium.Tools.ARM64.Base.base",
"Microsoft.VisualCpp.Tools.HostX64.TargetARM64",
"Microsoft.VC.14.34.17.4.Tools.HostX64.TargetARM64.base",
"Microsoft.VC.14.34.17.4.Props.ARM64",
"Microsoft.VC.14.34.17.4.Tools.HostX64.TargetARM64.Res.base",
"Microsoft.VisualStudio.Component.VC.Tools.ARM64EC",
"Microsoft.VisualStudio.Component.Windows11SDK.22621",
"Win11SDK_10.0.22621",
"Microsoft.VisualStudio.VC.MSBuild.v170.ARM64EC.v143",
"Microsoft.VisualStudio.VC.MSBuild.v170.ARM64EC",
"Microsoft.VisualCpp.CRT.ARM64EC.Store",
"Microsoft.VC.14.34.17.4.CRT.ARM64EC.Store.base",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualCpp.CodeAnalysis.Extensions",
"Microsoft.VisualCpp.CA.Ext.HostARM64.Targetx64",
"Microsoft.VC.14.34.17.4.CA.Ext.HostARM64.Targetx64.base",
"Microsoft.VC.14.34.17.4.CA.Ext.HostARM64.Targetx64.Res.base",
"Microsoft.VisualCpp.CA.Ext.HostARM64.Targetx86",
"Microsoft.VC.14.34.17.4.CA.Ext.HostARM64.Targetx86.base",
"Microsoft.VC.14.34.17.4.CA.Ext.HostARM64.Targetx86.Res.base",
"Microsoft.VisualCpp.CA.Ext.Hostx86.Targetx64",
"Microsoft.VC.14.34.17.4.CA.Ext.Hostx86.Targetx64.base",
"Microsoft.VC.14.34.17.4.CA.Ext.Hostx86.Targetx64.Res.base",
"Microsoft.VisualCpp.CA.Ext.Hostx86.Targetx86",
"Microsoft.VC.14.34.17.4.CA.Ext.Hostx86.Targetx86.base",
"Microsoft.VC.14.34.17.4.CA.Ext.Hostx86.Targetx86.Res.base",
"Microsoft.VisualCpp.CA.Ext.Hostx64.Targetx64",
"Microsoft.VC.14.34.17.4.CA.Ext.Hostx64.Targetx64.base",
"Microsoft.VC.14.34.17.4.CA.Ext.Hostx64.Targetx64.Res.base",
"Microsoft.VisualCpp.CA.Ext.Hostx64.Targetx86",
"Microsoft.VC.14.34.17.4.CA.Ext.Hostx64.Targetx86.base",
"Microsoft.VC.14.34.17.4.Servicing.CAExtensions",
"Microsoft.VC.14.34.17.4.CA.Ext.Hostx64.Targetx86.Res.base",
"Microsoft.VisualCpp.Tools.HostX64.TargetX86",
"Microsoft.VC.14.34.17.4.Tools.HostX64.TargetX86.base",
"Microsoft.VC.14.34.17.4.Tools.HostX64.TargetX86.Res.base",
"Microsoft.VisualCpp.Tools.HostX64.TargetX64",
"Microsoft.VC.14.34.17.4.Tools.HostX64.TargetX64.base",
"Microsoft.VC.14.34.17.4.Tools.HostX64.TargetX64.Res.base",
"Microsoft.VisualCpp.Tools.HostARM64.TargetX86",
"Microsoft.VC.14.34.17.4.Tools.HostARM64.TargetX86.base",
"Microsoft.VisualCpp.RuntimeDebug.14",
"Microsoft.VC.14.34.17.4.Tools.HostARM64.TargetX86.Res.base",
"Microsoft.VisualCpp.Tools.HostARM64.TargetX64",
"Microsoft.VC.14.34.17.4.Tools.HostARM64.TargetX64.base",
"Microsoft.VisualCpp.RuntimeDebug.14.ARM64",
"Microsoft.VisualCpp.Redist.14.Latest",
"Microsoft.VisualCpp.Redist.14.Latest",
"Microsoft.VC.14.34.17.4.Tools.HostARM64.Targetx64.Res.base",
"Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX64",
"Microsoft.VC.14.34.17.4.Premium.Tools.HostX86.TargetX64.base",
"Microsoft.VC.14.34.17.4.Prem.Hostx86.Targetx64.Res.base",
"Microsoft.VisualCpp.Premium.Tools.HostX86.TargetX86",
"Microsoft.VC.14.34.17.4.Premium.Tools.HostX86.TargetX86.base",
"Microsoft.VC.14.34.17.4.Prem.HostX86.TargetX86.Res.base",
"Microsoft.VisualCpp.Premium.Tools.HostARM64.TargetX86",
"Microsoft.VC.14.34.17.4.Premium.Tools.HostARM64.TargetX86.base",
"Microsoft.VC.14.34.17.4.Prem.HostARM64.TargetX86.Res.base",
"Microsoft.VisualCpp.Premium.Tools.HostARM64.TargetX64",
"Microsoft.VC.14.34.17.4.Premium.Tools.HostARM64.TargetX64.base",
"Microsoft.VC.14.34.17.4.Prem.HostARM64.Targetx64.Res.base",
"Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX86",
"Microsoft.VC.14.34.17.4.Premium.Tools.HostX64.TargetX86.base",
"Microsoft.VC.14.34.17.4.Prem.HostX64.TargetX86.Res.base",
"Microsoft.VisualCpp.Premium.Tools.HostX64.TargetX64",
"Microsoft.VC.14.34.17.4.Premium.Tools.HostX64.TargetX64.base",
"Microsoft.VC.14.34.17.4.Prem.HostX64.TargetX64.Res.base",
"Microsoft.VisualCpp.PGO.X86",
"Microsoft.VC.14.34.17.4.PGO.X86.base",
"Microsoft.VisualCpp.PGO.X64",
"Microsoft.VC.14.34.17.4.PGO.X64.base",
"Microsoft.VisualCpp.PGO.Headers",
"Microsoft.VC.14.34.17.4.PGO.Headers.base",
"Microsoft.VisualCpp.CRT.x86.Store",
"Microsoft.VC.14.34.17.4.CRT.x86.Store.base",
"Microsoft.VisualCpp.CRT.x86.OneCore.Desktop",
"Microsoft.VC.14.34.17.4.CRT.x86.OneCore.Desktop.base",
"Microsoft.VisualCpp.CRT.x64.Store",
"Microsoft.VC.14.34.17.4.CRT.x64.Store.base",
"Microsoft.VisualCpp.CRT.x64.OneCore.Desktop",
"Microsoft.VC.14.34.17.4.CRT.x64.OneCore.Desktop.base",
"Microsoft.VisualCpp.CRT.Redist.x86.OneCore.Desktop",
"Microsoft.VC.14.34.17.4.CRT.Redist.x86.OneCore.Desktop.base",
"Microsoft.VisualCpp.CRT.Redist.x64.OneCore.Desktop",
"Microsoft.VC.14.34.17.4.CRT.Redist.x64.OneCore.Desktop.base",
"Microsoft.VisualStudio.PackageGroup.VC.Tools.x86",
"Microsoft.VisualCpp.Tools.Hostx86.Targetx64.Res",
"Microsoft.VisualCpp.Tools.HostX86.TargetX64",
"Microsoft.VC.14.34.17.4.Tools.HostX86.TargetX64.base",
"Microsoft.VC.14.34.17.4.Props.x64",
"Microsoft.VC.14.34.17.4.Tools.Hostx86.Targetx64.Res.base",
"Microsoft.VisualCpp.Tools.HostX86.TargetX86.Res",
"Microsoft.VisualCpp.Tools.HostX86.TargetX86",
"Microsoft.VC.14.34.17.4.Tools.HostX86.TargetX86.base",
"Microsoft.VC.14.34.17.4.Servicing.Compilers",
"Microsoft.VC.14.34.17.4.Props.x86",
"Microsoft.VC.14.34.17.4.Props",
"Microsoft.VC.14.34.17.4.Tools.HostX86.TargetX86.Res.base",
"Microsoft.VisualCpp.Tools.Core.Resources",
"Microsoft.VisualCpp.Tools.Core.x86",
"Microsoft.VC.14.34.17.4.Tools.Core.Props",
"Microsoft.VisualCpp.DIA.SDK",
"Microsoft.VisualCpp.Servicing.DIASDK",
"Microsoft.VisualCpp.CRT.x86.Desktop",
"Microsoft.VC.14.34.17.4.CRT.x86.Desktop.base",
"Microsoft.VisualCpp.CRT.x64.Desktop",
"Microsoft.VC.14.34.17.4.CRT.x64.Desktop.base",
"Microsoft.VisualCpp.CRT.Source",
"Microsoft.VC.14.34.17.4.CRT.Source.base",
"Microsoft.VisualCpp.CRT.Redist.X86",
"Microsoft.VC.14.34.17.4.CRT.Redist.X86.base",
"Microsoft.VisualCpp.CRT.Redist.X64",
"Microsoft.VisualCpp.CRT.Redist.Resources",
"Microsoft.VC.14.34.17.4.CRT.Redist.X64.base",
"Microsoft.VisualCpp.CRT.Headers",
"Microsoft.VC.14.34.17.4.CRT.Headers.base",
"Microsoft.VC.14.34.17.4.Servicing.CrtHeaders",
"Microsoft.VC.14.34.17.4.Servicing",
"Microsoft.VisualStudio.Component.VC.CoreIde",
"Microsoft.VisualStudio.VC.Ide.Pro",
"Microsoft.VisualStudio.VC.Ide.Pro.Resources",
"Microsoft.VisualStudio.VC.Templates.General",
"Microsoft.VisualStudio.VC.Templates.General.Resources",
"Microsoft.VisualStudio.VC.Items.Pro",
"Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Reduced",
"Microsoft.VisualStudio.VC.Ide.x64",
"Microsoft.VisualStudio.PackageGroup.VC.CoreIDE.Express",
"Microsoft.VisualStudio.VC.vcvars",
"Microsoft.VS.VC.vcvars.x86.Shortcuts",
"Microsoft.VS.VC.vcvars.x64.Shortcuts",
"Microsoft.VS.VC.vcvars.arm64_x64.Shortcuts",
"Microsoft.VisualStudio.VC.MSBuild.v170.X64.v143",
"Microsoft.VisualStudio.VC.MSBuild.v170.X64",
"Microsoft.VisualStudio.VC.MSBuild.v170.ARM.v143",
"Microsoft.VisualStudio.VC.MSBuild.v170.ARM",
"Microsoft.VisualStudio.VC.MSBuild.v170.x86.v143",
"Microsoft.VisualStudio.VC.MSBuild.v170.X86",
"Microsoft.VisualStudio.VC.MSBuild.v170.Base",
"Microsoft.VisualStudio.VC.MSBuild.v170.Base.Resources",
"Microsoft.VisualStudio.VC.Ide.WinXPlus",
"Microsoft.VisualStudio.VC.Ide.Dskx",
"Microsoft.VisualStudio.VC.Ide.Dskx.Resources",
"Microsoft.VisualStudio.VC.Ide.Base",
"Microsoft.VisualStudio.VC.Ide.LanguageService",
"Microsoft.VisualStudio.VC.Ide.SecurityIssueAnalysis.Scripts",
"Microsoft.VisualStudio.VC.Ide.SecurityIssueAnalysis.PythonDistro",
"Microsoft.VisualStudio.VC.Ide.SecurityIssueAnalysis.3rdPartyLibs.10",
"Microsoft.VisualStudio.VC.Ide.SecurityIssueAnalysis.3rdPartyLibs.9",
"Microsoft.VisualStudio.VC.Ide.SecurityIssueAnalysis.3rdPartyLibs.8",
"Microsoft.VisualStudio.VC.Ide.SecurityIssueAnalysis.3rdPartyLibs.7",
"Microsoft.VisualStudio.VC.Ide.SecurityIssueAnalysis.3rdPartyLibs.6",
"Microsoft.VisualStudio.VC.Ide.SecurityIssueAnalysis.3rdPartyLibs.5",
"Microsoft.VisualStudio.VC.Ide.SecurityIssueAnalysis.3rdPartyLibs.4",
"Microsoft.VisualStudio.VC.Ide.SecurityIssueAnalysis.3rdPartyLibs.3",
"Microsoft.VisualStudio.VC.Ide.SecurityIssueAnalysis.3rdPartyLibs.2",
"Microsoft.VisualStudio.VC.Ide.SecurityIssueAnalysis.3rdPartyLibs.1",
"Microsoft.VisualStudio.VC.Ide.VCPkgDatabase",
"Microsoft.VisualStudio.VC.Ide.Core",
"Microsoft.VisualStudio.VC.Ide.ProjectSystem",
"Microsoft.VisualStudio.VC.Ide.ProjectSystem.Resources",
"Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine",
"Microsoft.VisualStudio.VC.Ide.Core.VCProjectEngine.Resources",
"Microsoft.VisualStudio.VC.Ide.LanguageService.Resources",
"Microsoft.VisualStudio.VC.Llvm.Base",
"Microsoft.VisualStudio.VC.Ide.Base.Resources",
"Microsoft.Net.PackageGroup.4.8.1.Redist",
"Microsoft.VisualStudio.Component.IntelliCode",
"Microsoft.VisualStudio.IntelliCode.CSharp",
"Microsoft.VisualStudio.IntelliCode",
"Component.Microsoft.VisualStudio.LiveShare.2022",
"Microsoft.VisualStudio.Component.Debugger.JustInTime",
"Microsoft.VisualStudio.Debugger.ImmersiveActivateHelper.Msi",
"Microsoft.VisualStudio.Debugger.JustInTime",
"Microsoft.VisualStudio.Debugger.JustInTime.Msi",
"Microsoft.VisualStudio.LiveShare.2022",
"Microsoft.Icecap.Analysis",
"Microsoft.Icecap.Analysis.Resources",
"Microsoft.Icecap.Analysis.Resources.Targeted",
"Microsoft.Icecap.Collection.Msi",
"Microsoft.Icecap.Collection.Msi.Targeted",
"Microsoft.Icecap.Collection.Msi.Resources",
"Microsoft.Icecap.Collection.Msi.Resources.Targeted",
"Microsoft.DiagnosticsHub.Instrumentation",
"Microsoft.DiagnosticsHub.Instrumentation.Targeted",
"Microsoft.DiagnosticsHub.CpuSampling",
"Microsoft.DiagnosticsHub.CpuSampling.Targeted",
"Microsoft.PackageGroup.DiagnosticsHub.Platform",
"Microsoft.VisualStudio.InstrumentationEngine.ARM64",
"Microsoft.VisualStudio.InstrumentationEngine",
"Microsoft.DiagnosticsHub.Runtime.ExternalDependencies",
"SQLiteCore",
"SQLiteCore.Targeted",
"Microsoft.DiagnosticsHub.Runtime.ExternalDependencies.Targeted",
"Microsoft.DiagnosticsHub.Runtime",
"Microsoft.DiagnosticsHub.Runtime.Targeted",
"Microsoft.DiagnosticsHub.Collection.ExternalDependencies.arm64",
"Microsoft.DiagnosticsHub.Collection",
"Microsoft.DiagnosticsHub.Collection.Service",
"Microsoft.VisualStudio.VC.Ide.MDD",
"Microsoft.VisualStudio.VC.Ide.Linux.ConnectionManager",
"Microsoft.VisualStudio.VisualC.Utilities",
"Microsoft.VisualStudio.VisualC.Utilities.Resources",
"Microsoft.VisualStudio.VC.Ide.Linux.ConnectionManager.Resources",
"Microsoft.VisualStudio.VC.Ide.ResourceEditor",
"Microsoft.VisualStudio.VC.Ide.ResourceEditor.Resources",
"Microsoft.VisualStudio.PackageGroup.TestTools.Core",
"Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V2.CLI",
"Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI",
"Microsoft.VisualStudio.TestTools.Pex.Common",
"Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.V1.CLI",
"Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.Legacy",
"Microsoft.VisualStudio.PackageGroup.MinShell.Interop",
"Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Msi",
"Microsoft.VisualStudio.TestTools.TP.Legacy.Tips.Common",
"Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips",
"Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Tips.Resources",
"Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.TestSettings",
"Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Professional",
"Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Common",
"Microsoft.VisualStudio.TestTools.TP.Legacy.Common.Res",
"Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core",
"Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Resources",
"Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Agent",
"Microsoft.VisualStudio.PackageGroup.TestTools.TestPlatform.IDE",
"Microsoft.VisualStudio.Cache.Service",
"Microsoft.VisualStudio.TestTools.TestWIExtension",
"Microsoft.VisualStudio.TestTools.TestPlatform.V1.CLI",
"Microsoft.VisualStudio.TestTools.TestPlatform.IDE",
"Microsoft.VisualStudio.PackageGroup.TestTools.CodeCoverage",
"Microsoft.VisualStudio.PackageGroup.TestTools.DataCollectors",
"Microsoft.VisualStudio.Component.NuGet",
"Microsoft.CredentialProvider",
"Microsoft.VisualStudio.NuGet.Licenses",
"Microsoft.VisualStudio.Component.TextTemplating",
"Microsoft.VisualStudio.TextTemplating.MSBuild",
"Microsoft.VisualStudio.TextTemplating.Integration",
"Microsoft.VisualStudio.TextTemplating.Core",
"Microsoft.VisualStudio.TextTemplating.Integration.Resources",
"Microsoft.VisualCpp.CRT.ClickOnce.Msi",
"Microsoft.VisualStudio.Component.Roslyn.LanguageServices",
"Microsoft.VisualStudio.InteractiveWindow",
"Microsoft.DiaSymReader.Native",
"Microsoft.VisualCpp.Redist.14",
"Microsoft.VisualCpp.Redist.14",
"Microsoft.VisualCpp.Servicing.Redist",
"Microsoft.VisualStudio.PackageGroup.StaticAnalysis",
"Microsoft.VisualStudio.StaticAnalysis.IDE",
"Microsoft.VisualStudio.StaticAnalysis.IDE.Resources",
"Microsoft.VisualStudio.StaticAnalysis.FxCop.Resources",
"Microsoft.VisualStudio.StaticAnalysis.auxil",
"Microsoft.VisualStudio.StaticAnalysis.auxil.Resources",
"Roslyn.VisualStudio.Setup.ServiceHub",
"Microsoft.Component.MSBuild",
"Microsoft.NuGet.Build.Tasks.Setup",
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.CodeAnalysis.Compilers",
"Microsoft.VisualStudio.Component.JavaScript.TypeScript",
"Microsoft.VisualStudio.JavaScript.ProjectSystem",
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions",
"Microsoft.VisualStudio.ProTools",
"sqlsysclrtypes",
"SQLCommon",
"Microsoft.VisualStudio.ProTools.Resources",
"Microsoft.VisualStudio.Web.Scaffolding",
"Microsoft.VisualStudio.WebToolsExtensions",
"Microsoft.VisualStudio.ConnectedServices.Core",
"Microsoft.VisualStudio.WebTools",
"Microsoft.VisualStudio.WebToolsExtensions.MSBuild",
"Microsoft.VisualStudio.WebTools.Resources",
"Microsoft.VisualStudio.WebTools.WSP.FSA",
"Microsoft.VisualStudio.WebTools.WSP.FSA.Resources",
"Microsoft.VisualStudio.PackageGroup.Debugger.Script",
"Microsoft.VisualStudio.Component.TypeScript.TSServer",
"Microsoft.VisualStudio.Package.TypeScript.TSServer",
"Microsoft.VisualStudio.PackageGroup.JavaScript.Language",
"Microsoft.VisualStudio.Package.NodeJs",
"TypeScript.Build",
"TypeScript.LanguageService",
"TypeScript.Tools",
"Microsoft.VisualStudio.PackageGroup.Community",
"Microsoft.VisualStudio.Community.VB.x86",
"Microsoft.VisualStudio.Community.VB.x64",
"Microsoft.VisualStudio.PackageGroup.Core",
"Microsoft.VisualStudio.CodeSense.Community",
"Microsoft.VisualStudio.TestTools.TeamFoundationClient",
"Microsoft.VisualStudio.PackageGroup.Debugger.Core",
"Microsoft.VisualStudio.Debugger.BrokeredServices",
"Microsoft.VisualStudio.Debugger.VSCodeDebuggerHost",
"Microsoft.VisualStudio.Debugger.AzureAttach",
"Microsoft.VisualStudio.Web.Azure.Common",
"Microsoft.WebTools.Shared",
"Microsoft.WebTools.DotNet.Core.ItemTemplates",
"Microsoft.VisualStudio.PackageGroup.Debugger.TimeTravel.Replay",
"Microsoft.VisualStudio.VC.Ide.Debugger",
"Microsoft.VisualStudio.VC.Ide.Debugger.Concord",
"Microsoft.VisualStudio.VC.Ide.Debugger.Concord.Resources",
"Microsoft.VisualStudio.VC.Ide.Debugger.Resources",
"Microsoft.VisualStudio.VC.Ide.Common",
"Microsoft.VisualStudio.VC.Ide.Common.Resources",
"Microsoft.VisualStudio.Debugger.CollectionAgents",
"Microsoft.VisualStudio.Debugger.Parallel",
"Microsoft.VisualStudio.Debugger.Parallel.Resources",
"Microsoft.VisualStudio.Debugger.Managed",
"Microsoft.CodeAnalysis.ExpressionEvaluator",
"Microsoft.CodeAnalysis.VisualStudio.Setup",
"Microsoft.VisualStudio.Debugger.Concord.Managed",
"Microsoft.VisualStudio.Debugger.Concord.Managed.Resources",
"Microsoft.VisualStudio.Debugger.Managed.Resources",
"Microsoft.VisualStudio.Debugger.TargetComposition",
"Microsoft.VisualStudio.Debugger.TargetComposition.Remote.arm64",
"Microsoft.VisualStudio.Debugger.TargetComposition.Remote",
"Microsoft.VisualStudio.Debugger.TargetComposition.Remote",
"Microsoft.VisualStudio.Debugger.Remote",
"Microsoft.VisualStudio.Debugger.Concord.Remote",
"Microsoft.VisualStudio.Debugger.Concord.Remote.Resources",
"Microsoft.VisualStudio.Debugger.Remote",
"Microsoft.VisualStudio.Debugger.Remote.ARM64",
"Microsoft.VisualStudio.Debugger.Concord.Remote.ARM64",
"Microsoft.VisualStudio.Debugger.Concord.Remote.Resources.ARM64",
"Microsoft.VisualStudio.Debugger.Remote.ARM",
"Microsoft.VisualStudio.Debugger.Concord.Remote.ARM",
"Microsoft.VisualStudio.Debugger.Concord.Remote.Resources.ARM",
"Microsoft.VisualStudio.Debugger.Remote.Resources.ARM",
"Microsoft.VisualStudio.Debugger.Remote.Resources.ARM64",
"Microsoft.VisualStudio.Debugger.Concord.Remote",
"Microsoft.VisualStudio.Debugger.Concord.Remote.Resources",
"Microsoft.VisualStudio.Debugger.Remote.Resources",
"Microsoft.VisualStudio.Debugger.Remote.Resources",
"Microsoft.VisualStudio.Debugger",
"Microsoft.VisualStudio.VC.MSVCDis",
"Microsoft.IntelliTrace.DiagnosticsHub",
"Microsoft.VisualStudio.Debugger.Concord",
"Microsoft.VisualStudio.Debugger.Concord.Resources",
"Microsoft.VisualStudio.Debugger.Resources",
"Microsoft.VisualStudio.Debugger.Package.DiagHub.Client",
"Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client",
"Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client",
"Microsoft.VisualStudio.Debugger.Remote.DiagnosticsHub.Client",
"Microsoft.PackageGroup.ClientDiagnostics",
"Microsoft.VisualStudio.AppResponsiveness",
"Microsoft.VisualStudio.AppResponsiveness.Targeted",
"Microsoft.VisualStudio.AppResponsiveness.Resources",
"Microsoft.VisualStudio.ClientDiagnostics",
"Microsoft.VisualStudio.ClientDiagnostics.Targeted",
"Microsoft.VisualStudio.ClientDiagnostics.Resources",
"Microsoft.VisualStudio.PackageGroup.CommunityCore",
"Microsoft.VisualStudio.ProjectSystem.Full",
"Microsoft.VisualStudio.LiveShareApi",
"Microsoft.VisualStudio.ProjectSystem.Query",
"Microsoft.VisualStudio.ProjectSystem",
"Microsoft.VisualStudio.Community.x86",
"Microsoft.VisualStudio.Community.x64",
"Microsoft.VisualStudio.Community.Msi.Resources",
"Microsoft.VisualStudio.Community.Msi",
"Microsoft.VisualStudio.Community.Shared.Msi",
"Microsoft.VisualStudio.Devenv.Msi",
"Microsoft.VisualStudio.Devenv.Shared.Msi",
"Microsoft.VisualStudio.MinShell.Interop.Msi",
"Microsoft.VisualStudio.MinShell.Interop.Shared.Msi",
"Microsoft.VisualStudio.Editors",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.PackageGroup.CoreEditor",
"Microsoft.WebView2",
"Microsoft.VisualStudio.ScriptedHost",
"Microsoft.VisualStudio.ScriptedHost.Targeted",
"Microsoft.VisualCpp.Tools.Common.UtilsPrereq",
"Microsoft.VisualCpp.Tools.Common.Utils",
"Microsoft.VisualCpp.Tools.Common.Utils.Resources",
"Microsoft.VisualStudio.PackageGroup.VsDevCmd",
"Microsoft.VisualStudio.VsDevCmd.Ext.NetFxSdk",
"Microsoft.VisualStudio.VsDevCmd.Core.WinSdk",
"Microsoft.VisualStudio.VsDevCmd.Core.DotNet",
"Microsoft.VisualStudio.VC.DevCmd",
"Microsoft.VisualStudio.VC.DevCmd.Resources",
"Microsoft.VisualStudio.VirtualTree",
"Microsoft.DiaSymReader",
"Microsoft.Build.Dependencies",
"Microsoft.Build.FileTracker.Msi",
"Microsoft.Build",
"Microsoft.VisualStudio.PackageGroup.NuGet",
"Microsoft.DataAI.NuGetRecommender",
"Microsoft.VisualStudio.NuGet.Core",
"Microsoft.Build.Arm64",
"Microsoft.Build.UnGAC",
"Microsoft.VisualStudio.TextMateGrammars",
"Microsoft.VisualStudio.Platform.Markdown",
"Microsoft.VisualStudio.Platform.CrossRepositorySearch",
"Microsoft.VisualStudio.PackageGroup.TeamExplorer.Common",
"Microsoft.VisualStudio.TeamExplorer",
"Microsoft.VisualStudio.PackageGroup.ServiceHub",
"Microsoft.ServiceHub.Node",
"Microsoft.ServiceHub.Managed",
"Microsoft.ServiceHub.arm64",
"Microsoft.VisualStudio.ProjectServices",
"Microsoft.VisualStudio.OpenFolder.VSIX",
"Microsoft.VisualStudio.FileHandler.Msi",
"Microsoft.VisualStudio.FileHandler.Msi",
"Microsoft.VisualStudio.PackageGroup.MinShell",
"Microsoft.VisualStudio.MinShell.Msi",
"Microsoft.VisualStudio.MinShell.Shared.Msi",
"Microsoft.VisualStudio.MinShell.Msi.Resources",
"Microsoft.VisualStudio.MinShell.Interop",
"CoreEditorFonts",
"Microsoft.VisualStudio.Log",
"Microsoft.VisualStudio.Log.Targeted",
"Microsoft.VisualStudio.Log.Resources",
"Microsoft.VisualStudio.Finalizer",
"Microsoft.VisualStudio.Devenv",
"Microsoft.VisualStudio.Devenv.Resources",
"Microsoft.VisualStudio.CoreEditor",
"Microsoft.VisualStudio.Navigation.RichCodeNav",
"Microsoft.VisualStudio.Platform.NavigateTo",
"Microsoft.VisualStudio.Connected",
"SQLitePCLRaw",
"SQLitePCLRaw.Targeted",
"Microsoft.VisualStudio.Connected.Auto",
"Microsoft.VisualStudio.Connected.Auto.Resources",
"Microsoft.VisualStudio.AzureSDK",
"Microsoft.VisualStudio.PerfLib",
"Microsoft.VisualStudio.Connected.Resources",
"Microsoft.Net.PackageGroup.4.8.Redist",
"Microsoft.VisualStudio.PackageGroup.Progression",
"Microsoft.VisualStudio.PerformanceProvider",
"Microsoft.VisualStudio.GraphModel",
"Microsoft.VisualStudio.GraphProvider",
"Microsoft.VisualStudio.Community.VB.Targeted",
"Microsoft.VisualStudio.Community.VB.Neutral",
"Microsoft.VisualStudio.Community.CSharp.Targeted",
"Microsoft.VisualStudio.Community.CSharp.Neutral",
"Microsoft.VisualStudio.Community.ProductArch.TargetedExtra",
"Microsoft.VisualStudio.Community.ProductArch.Targeted",
"Microsoft.VisualStudio.Community.ProductArch.NeutralExtra",
"Microsoft.DiaSymReader.PortablePdb",
"Microsoft.IntelliTrace.CollectorCab",
"Microsoft.VisualStudio.Community.VB.Resources.Targeted",
"Microsoft.VisualStudio.Community.VB.Resources.Neutral",
"Microsoft.VisualStudio.Community.CSharp.Resources.Targeted",
"Microsoft.VisualStudio.Community.CSharp.Resources.Neutral",
"Microsoft.VisualStudio.Community.ProductArch.Resources.Targeted",
"Microsoft.VisualStudio.Community.ProductArch.Resources.NeutralExtra",
"Microsoft.VisualStudio.Net.Eula.Resources",
"Microsoft.VisualStudio.Community.ProductArch.Resources.Neutral",
"Microsoft.VisualStudio.WebSiteProject.DTE",
"Microsoft.VisualStudio.Diagnostics.AspNetHelper",
"Microsoft.VisualStudio.Diagnostics.AspNetHelper.Standard",
"Microsoft.MSHtml",
"Microsoft.VisualStudio.Platform.CallHierarchy",
"Microsoft.VisualStudio.Community.ProductArch.Neutral",
"Microsoft.VisualStudio.MinShell",
"Microsoft.VisualStudio.VsWebProtocolSelector.Msi",
"Microsoft.Net.6.WindowsDesktop.Runtime",
"Microsoft.Net.6.Runtime",
"Microsoft.VisualStudio.PackageGroup.Setup.Common",
"Microsoft.VisualStudio.Setup.WMIProvider",
"Microsoft.VisualStudio.Setup.Configuration.Interop",
"Microsoft.VisualStudio.Setup.Configuration",
"Microsoft.VisualStudio.Extensibility.Container",
"Microsoft.VisualStudio.LanguageServer",
"Microsoft.VisualStudio.Platform.Terminal",
"Microsoft.VisualStudio.MefHosting",
"Microsoft.VisualStudio.Initializer",
"Microsoft.VisualStudio.ExtensionManager",
"Microsoft.VisualStudio.Platform.Editor",
"Microsoft.VisualStudio.MinShell.Targeted",
"Microsoft.VisualStudio.NativeImageSupport",
"Microsoft.VisualStudio.Devenv.Config",
"Microsoft.VisualStudio.MinShell.Resources.arm64",
"Microsoft.VisualStudio.MinShell.Auto",
"Microsoft.VisualStudio.MinShell.Auto.Resources",
"Microsoft.VisualStudio.Branding.Community"
]
}
]
@@ -0,0 +1,176 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
const HELPERS = {
require: `
import {createRequire as CREATE_REQUIRE_NAME} from "module";
const require = CREATE_REQUIRE_NAME(import.meta.url);
`,
interopRequireWildcard: `
function interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
} else {
var newObj = {};
if (obj != null) {
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
return newObj;
}
}
`,
interopRequireDefault: `
function interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
`,
createNamedExportFrom: `
function createNamedExportFrom(obj, localName, importedName) {
Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]});
}
`,
// Note that TypeScript and Babel do this differently; TypeScript does a simple existence
// check in the exports object and does a plain assignment, whereas Babel uses
// defineProperty and builds an object of explicitly-exported names so that star exports can
// always take lower precedence. For now, we do the easier TypeScript thing.
createStarExport: `
function createStarExport(obj) {
Object.keys(obj)
.filter((key) => key !== "default" && key !== "__esModule")
.forEach((key) => {
if (exports.hasOwnProperty(key)) {
return;
}
Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});
});
}
`,
nullishCoalesce: `
function nullishCoalesce(lhs, rhsFn) {
if (lhs != null) {
return lhs;
} else {
return rhsFn();
}
}
`,
asyncNullishCoalesce: `
async function asyncNullishCoalesce(lhs, rhsFn) {
if (lhs != null) {
return lhs;
} else {
return await rhsFn();
}
}
`,
optionalChain: `
function optionalChain(ops) {
let lastAccessLHS = undefined;
let value = ops[0];
let i = 1;
while (i < ops.length) {
const op = ops[i];
const fn = ops[i + 1];
i += 2;
if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
return undefined;
}
if (op === 'access' || op === 'optionalAccess') {
lastAccessLHS = value;
value = fn(value);
} else if (op === 'call' || op === 'optionalCall') {
value = fn((...args) => value.call(lastAccessLHS, ...args));
lastAccessLHS = undefined;
}
}
return value;
}
`,
asyncOptionalChain: `
async function asyncOptionalChain(ops) {
let lastAccessLHS = undefined;
let value = ops[0];
let i = 1;
while (i < ops.length) {
const op = ops[i];
const fn = ops[i + 1];
i += 2;
if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
return undefined;
}
if (op === 'access' || op === 'optionalAccess') {
lastAccessLHS = value;
value = await fn(value);
} else if (op === 'call' || op === 'optionalCall') {
value = await fn((...args) => value.call(lastAccessLHS, ...args));
lastAccessLHS = undefined;
}
}
return value;
}
`,
optionalChainDelete: `
function optionalChainDelete(ops) {
const result = OPTIONAL_CHAIN_NAME(ops);
return result == null ? true : result;
}
`,
asyncOptionalChainDelete: `
async function asyncOptionalChainDelete(ops) {
const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);
return result == null ? true : result;
}
`,
};
class HelperManager {
__init() {this.helperNames = {}}
__init2() {this.createRequireName = null}
constructor( nameManager) {;this.nameManager = nameManager;HelperManager.prototype.__init.call(this);HelperManager.prototype.__init2.call(this);}
getHelperName(baseName) {
let helperName = this.helperNames[baseName];
if (helperName) {
return helperName;
}
helperName = this.nameManager.claimFreeName(`_${baseName}`);
this.helperNames[baseName] = helperName;
return helperName;
}
emitHelpers() {
let resultCode = "";
if (this.helperNames.optionalChainDelete) {
this.getHelperName("optionalChain");
}
if (this.helperNames.asyncOptionalChainDelete) {
this.getHelperName("asyncOptionalChain");
}
for (const [baseName, helperCodeTemplate] of Object.entries(HELPERS)) {
const helperName = this.helperNames[baseName];
let helperCode = helperCodeTemplate;
if (baseName === "optionalChainDelete") {
helperCode = helperCode.replace("OPTIONAL_CHAIN_NAME", this.helperNames.optionalChain);
} else if (baseName === "asyncOptionalChainDelete") {
helperCode = helperCode.replace(
"ASYNC_OPTIONAL_CHAIN_NAME",
this.helperNames.asyncOptionalChain,
);
} else if (baseName === "require") {
if (this.createRequireName === null) {
this.createRequireName = this.nameManager.claimFreeName("_createRequire");
}
helperCode = helperCode.replace(/CREATE_REQUIRE_NAME/g, this.createRequireName);
}
if (helperName) {
resultCode += " ";
resultCode += helperCode.replace(baseName, helperName).replace(/\s+/g, " ").trim();
}
}
return resultCode;
}
} exports.HelperManager = HelperManager;
@@ -0,0 +1,84 @@
import { warning, secondsToMilliseconds, clamp, millisecondsToSeconds } from 'motion-utils';
import { springDefaults } from './defaults.mjs';
const safeMin = 0.001;
function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {
let envelope;
let derivative;
warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
let dampingRatio = 1 - bounce;
/**
* Restrict dampingRatio and duration to within acceptable ranges.
*/
dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);
duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));
if (dampingRatio < 1) {
/**
* Underdamped spring
*/
envelope = (undampedFreq) => {
const exponentialDecay = undampedFreq * dampingRatio;
const delta = exponentialDecay * duration;
const a = exponentialDecay - velocity;
const b = calcAngularFreq(undampedFreq, dampingRatio);
const c = Math.exp(-delta);
return safeMin - (a / b) * c;
};
derivative = (undampedFreq) => {
const exponentialDecay = undampedFreq * dampingRatio;
const delta = exponentialDecay * duration;
const d = delta * velocity + velocity;
const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;
const f = Math.exp(-delta);
const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);
const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;
return (factor * ((d - e) * f)) / g;
};
}
else {
/**
* Critically-damped spring
*/
envelope = (undampedFreq) => {
const a = Math.exp(-undampedFreq * duration);
const b = (undampedFreq - velocity) * duration + 1;
return -safeMin + a * b;
};
derivative = (undampedFreq) => {
const a = Math.exp(-undampedFreq * duration);
const b = (velocity - undampedFreq) * (duration * duration);
return a * b;
};
}
const initialGuess = 5 / duration;
const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
duration = secondsToMilliseconds(duration);
if (isNaN(undampedFreq)) {
return {
stiffness: springDefaults.stiffness,
damping: springDefaults.damping,
duration,
};
}
else {
const stiffness = Math.pow(undampedFreq, 2) * mass;
return {
stiffness,
damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),
duration,
};
}
}
const rootIterations = 12;
function approximateRoot(envelope, derivative, initialGuess) {
let result = initialGuess;
for (let i = 1; i < rootIterations; i++) {
result = result - envelope(result) / derivative(result);
}
return result;
}
function calcAngularFreq(undampedFreq, dampingRatio) {
return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);
}
export { calcAngularFreq, findSpring };
@@ -0,0 +1,6 @@
/// <reference types="react" />
import type { InternalContextDescriptor, PublicContextDescriptor } from './types';
export declare const defaultPublicContext: PublicContextDescriptor;
export declare const defaultInternalContext: InternalContextDescriptor;
export declare const InternalContext: import("react").Context<InternalContextDescriptor>;
export declare const PublicContext: import("react").Context<PublicContextDescriptor>;
@@ -0,0 +1,9 @@
export { default as autoInjectable } from "./auto-injectable";
export { default as inject } from "./inject";
export { default as injectable } from "./injectable";
export { default as registry } from "./registry";
export { default as singleton } from "./singleton";
export { default as injectAll } from "./inject-all";
export { default as injectAllWithTransform } from "./inject-all-with-transform";
export { default as injectWithTransform } from "./inject-with-transform";
export { default as scoped } from "./scoped";
@@ -0,0 +1 @@
{"name":"read-pkg-up","version":"8.0.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532093291,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1794532127390,"integrity":"sha512-e5bVwqWPvhYOpVsjairXWAIC+wxcU37lkZ/WZ++E2L/Ynp+HUaxq2ATpuq3lZfCaHcWSaukmR1WLRlc/WcniYA==","mode":420,"size":614},"package.json":{"checkedAt":1794532127390,"integrity":"sha512-S+/PTYYYodcDEXb0g4zU4aZRyeVHlZ+N61/uKGXAfRmOPkTi9WlfBjpaFkryB/l6SsNBW+hKVOSb3P30dhThJA==","mode":420,"size":978},"readme.md":{"checkedAt":1794532127391,"integrity":"sha512-t+40cwqUdxslKFcuW3lndc4ct1z5igXk0thGqC8SZxg8PyTjRod99h5+B/NzFHIyzcnWPowSsQ65dPiY39lYgQ==","mode":420,"size":2108},"index.d.ts":{"checkedAt":1794532127391,"integrity":"sha512-GaUnM/7q9k2q77hxt0rs5w0CEtN4gO7ljwFHBB983+OySwGGSYSdyuK1ZixR+lPhkNUzBcbkXEsaQ2rmHfSLlw==","mode":420,"size":1788}}}
@@ -0,0 +1,3 @@
# Security
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
@@ -0,0 +1,82 @@
var once = require('once')
var eos = require('end-of-stream')
var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
var noop = function () {}
var ancient = /^v?\.0/.test(process.version)
var isFn = function (fn) {
return typeof fn === 'function'
}
var isFS = function (stream) {
if (!ancient) return false // newer node version do not need to care about fs is a special way
if (!fs) return false // browser
return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
}
var isRequest = function (stream) {
return stream.setHeader && isFn(stream.abort)
}
var destroyer = function (stream, reading, writing, callback) {
callback = once(callback)
var closed = false
stream.on('close', function () {
closed = true
})
eos(stream, {readable: reading, writable: writing}, function (err) {
if (err) return callback(err)
closed = true
callback()
})
var destroyed = false
return function (err) {
if (closed) return
if (destroyed) return
destroyed = true
if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
if (isFn(stream.destroy)) return stream.destroy()
callback(err || new Error('stream was destroyed'))
}
}
var call = function (fn) {
fn()
}
var pipe = function (from, to) {
return from.pipe(to)
}
var pump = function () {
var streams = Array.prototype.slice.call(arguments)
var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
if (Array.isArray(streams[0])) streams = streams[0]
if (streams.length < 2) throw new Error('pump requires two streams per minimum')
var error
var destroys = streams.map(function (stream, i) {
var reading = i < streams.length - 1
var writing = i > 0
return destroyer(stream, reading, writing, function (err) {
if (!error) error = err
if (err) destroys.forEach(call)
if (reading) return
destroys.forEach(call)
callback(error)
})
})
streams.reduce(pipe)
}
module.exports = pump
@@ -0,0 +1,226 @@
import * as path from "path";
import * as fs from "fs";
// tslint:disable:no-require-imports
import JSON5 = require("json5");
import StripBom = require("strip-bom");
// tslint:enable:no-require-imports
/**
* Typing for the parts of tsconfig that we care about
*/
export interface Tsconfig {
extends?: string | string[];
compilerOptions?: {
baseUrl?: string;
paths?: { [key: string]: Array<string> };
strict?: boolean;
};
}
export interface TsConfigLoaderResult {
tsConfigPath: string | undefined;
baseUrl: string | undefined;
paths: { [key: string]: Array<string> } | undefined;
}
export interface TsConfigLoaderParams {
getEnv: (key: string) => string | undefined;
cwd: string;
loadSync?(
cwd: string,
filename?: string,
baseUrl?: string
): TsConfigLoaderResult;
}
export function tsConfigLoader({
getEnv,
cwd,
loadSync = loadSyncDefault,
}: TsConfigLoaderParams): TsConfigLoaderResult {
const TS_NODE_PROJECT = getEnv("TS_NODE_PROJECT");
const TS_NODE_BASEURL = getEnv("TS_NODE_BASEURL");
// tsconfig.loadSync handles if TS_NODE_PROJECT is a file or directory
// and also overrides baseURL if TS_NODE_BASEURL is available.
const loadResult = loadSync(cwd, TS_NODE_PROJECT, TS_NODE_BASEURL);
return loadResult;
}
function loadSyncDefault(
cwd: string,
filename?: string,
baseUrl?: string
): TsConfigLoaderResult {
// Tsconfig.loadSync uses path.resolve. This is why we can use an absolute path as filename
const configPath = resolveConfigPath(cwd, filename);
if (!configPath) {
return {
tsConfigPath: undefined,
baseUrl: undefined,
paths: undefined,
};
}
const config = loadTsconfig(configPath);
return {
tsConfigPath: configPath,
baseUrl:
baseUrl ||
(config && config.compilerOptions && config.compilerOptions.baseUrl),
paths: config && config.compilerOptions && config.compilerOptions.paths,
};
}
function resolveConfigPath(cwd: string, filename?: string): string | undefined {
if (filename) {
const absolutePath = fs.lstatSync(filename).isDirectory()
? path.resolve(filename, "./tsconfig.json")
: path.resolve(cwd, filename);
return absolutePath;
}
if (fs.statSync(cwd).isFile()) {
return path.resolve(cwd);
}
const configAbsolutePath = walkForTsConfig(cwd);
return configAbsolutePath ? path.resolve(configAbsolutePath) : undefined;
}
export function walkForTsConfig(
directory: string,
existsSync: (path: string) => boolean = fs.existsSync
): string | undefined {
const configPath = path.join(directory, "./tsconfig.json");
if (existsSync(configPath)) {
return configPath;
}
const parentDirectory = path.join(directory, "../");
// If we reached the top
if (directory === parentDirectory) {
return undefined;
}
return walkForTsConfig(parentDirectory, existsSync);
}
export function loadTsconfig(
configFilePath: string,
existsSync: (path: string) => boolean = fs.existsSync,
readFileSync: (filename: string) => string = (filename: string) =>
fs.readFileSync(filename, "utf8")
): Tsconfig | undefined {
if (!existsSync(configFilePath)) {
return undefined;
}
const configString = readFileSync(configFilePath);
const cleanedJson = StripBom(configString);
let config: Tsconfig;
try {
config = JSON5.parse(cleanedJson);
} catch (e) {
throw new Error(`${configFilePath} is malformed ${e.message}`);
}
let extendedConfig = config.extends;
if (extendedConfig) {
let base: Tsconfig;
if (Array.isArray(extendedConfig)) {
base = extendedConfig.reduce(
(currBase, extendedConfigElement) =>
mergeTsconfigs(
currBase,
loadTsconfigFromExtends(
configFilePath,
extendedConfigElement,
existsSync,
readFileSync
)
),
{}
);
} else {
base = loadTsconfigFromExtends(
configFilePath,
extendedConfig,
existsSync,
readFileSync
);
}
return mergeTsconfigs(base, config);
}
return config;
}
/**
* Intended to be called only from loadTsconfig.
* Parameters don't have defaults because they should use the same as loadTsconfig.
*/
function loadTsconfigFromExtends(
configFilePath: string,
extendedConfigValue: string,
// eslint-disable-next-line no-shadow
existsSync: (path: string) => boolean,
readFileSync: (filename: string) => string
): Tsconfig {
if (
typeof extendedConfigValue === "string" &&
extendedConfigValue.indexOf(".json") === -1
) {
extendedConfigValue += ".json";
}
const currentDir = path.dirname(configFilePath);
let extendedConfigPath = path.join(currentDir, extendedConfigValue);
if (
extendedConfigValue.indexOf("/") !== -1 &&
extendedConfigValue.indexOf(".") !== -1 &&
!existsSync(extendedConfigPath)
) {
extendedConfigPath = path.join(
currentDir,
"node_modules",
extendedConfigValue
);
}
const config =
loadTsconfig(extendedConfigPath, existsSync, readFileSync) || {};
// baseUrl should be interpreted as relative to extendedConfigPath,
// but we need to update it so it is relative to the original tsconfig being loaded
if (config.compilerOptions?.baseUrl) {
const extendsDir = path.dirname(extendedConfigValue);
config.compilerOptions.baseUrl = path.join(
extendsDir,
config.compilerOptions.baseUrl
);
}
return config;
}
function mergeTsconfigs(
base: Tsconfig | undefined,
config: Tsconfig | undefined
): Tsconfig {
base = base || {};
config = config || {};
return {
...base,
...config,
compilerOptions: {
...base.compilerOptions,
...config.compilerOptions,
},
};
}
@@ -0,0 +1,19 @@
Copyright (c) 2014 Forbes Lindesay
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,20 @@
/**
* Extractor function for a Literal type value node.
*
* @param - value - AST Value object with type `Literal`
* @returns { String|Boolean } - The extracted value converted to correct type.
*/
export default function extractValueFromLiteral(value) {
const { value: extractedValue } = value;
const normalizedStringValue = typeof extractedValue === 'string' && extractedValue.toLowerCase();
if (normalizedStringValue === 'true') {
return true;
}
if (normalizedStringValue === 'false') {
return false;
}
return extractedValue;
}
@@ -0,0 +1,14 @@
import { type TTemplateLiteralGenerate, type TTemplateLiteral } from '../template-literal/index.mjs';
import type { TLiteral, TLiteralValue } from '../literal/index.mjs';
import type { TInteger } from '../integer/index.mjs';
import type { TNumber } from '../number/index.mjs';
import type { TSchema } from '../schema/index.mjs';
import type { TUnion } from '../union/index.mjs';
type TFromTemplateLiteral<TemplateLiteral extends TTemplateLiteral, Keys extends string[] = TTemplateLiteralGenerate<TemplateLiteral>> = (Keys);
type TFromUnion<Types extends TSchema[], Result extends string[] = []> = (Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? TFromUnion<Right, [...Result, ...TIndexPropertyKeys<Left>]> : Result);
type TFromLiteral<LiteralValue extends TLiteralValue> = (LiteralValue extends PropertyKey ? [`${LiteralValue}`] : []);
export type TIndexPropertyKeys<Type extends TSchema> = (Type extends TTemplateLiteral ? TFromTemplateLiteral<Type> : Type extends TUnion<infer Types extends TSchema[]> ? TFromUnion<Types> : Type extends TLiteral<infer Value extends TLiteralValue> ? TFromLiteral<Value> : Type extends TNumber ? ['[number]'] : Type extends TInteger ? ['[number]'] : [
]);
/** Returns a tuple of PropertyKeys derived from the given TSchema */
export declare function IndexPropertyKeys<Type extends TSchema>(type: Type): TIndexPropertyKeys<Type>;
export {};
@@ -0,0 +1,332 @@
/**
* @fileoverview Prefer destructuring from arrays and objects
* @author Alex LaFroscia
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const PRECEDENCE_OF_ASSIGNMENT_EXPR = astUtils.getPrecedence({
type: "AssignmentExpression",
});
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Require destructuring from arrays and/or objects",
recommended: false,
frozen: true,
url: "https://eslint.org/docs/latest/rules/prefer-destructuring",
},
fixable: "code",
schema: [
{
/*
* old support {array: Boolean, object: Boolean}
* new support {VariableDeclarator: {}, AssignmentExpression: {}}
*/
oneOf: [
{
type: "object",
properties: {
VariableDeclarator: {
type: "object",
properties: {
array: {
type: "boolean",
},
object: {
type: "boolean",
},
},
additionalProperties: false,
},
AssignmentExpression: {
type: "object",
properties: {
array: {
type: "boolean",
},
object: {
type: "boolean",
},
},
additionalProperties: false,
},
},
additionalProperties: false,
},
{
type: "object",
properties: {
array: {
type: "boolean",
},
object: {
type: "boolean",
},
},
additionalProperties: false,
},
],
},
{
type: "object",
properties: {
enforceForRenamedProperties: {
type: "boolean",
},
},
additionalProperties: false,
},
],
messages: {
preferDestructuring: "Use {{type}} destructuring.",
},
},
create(context) {
const enabledTypes = context.options[0];
const enforceForRenamedProperties =
context.options[1] &&
context.options[1].enforceForRenamedProperties;
let normalizedOptions = {
VariableDeclarator: { array: true, object: true },
AssignmentExpression: { array: true, object: true },
};
if (enabledTypes) {
normalizedOptions =
typeof enabledTypes.array !== "undefined" ||
typeof enabledTypes.object !== "undefined"
? {
VariableDeclarator: enabledTypes,
AssignmentExpression: enabledTypes,
}
: enabledTypes;
}
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
/**
* Checks if destructuring type should be checked.
* @param {string} nodeType "AssignmentExpression" or "VariableDeclarator"
* @param {string} destructuringType "array" or "object"
* @returns {boolean} `true` if the destructuring type should be checked for the given node
*/
function shouldCheck(nodeType, destructuringType) {
return (
normalizedOptions &&
normalizedOptions[nodeType] &&
normalizedOptions[nodeType][destructuringType]
);
}
/**
* Determines if the given node is accessing an array index
*
* This is used to differentiate array index access from object property
* access.
* @param {ASTNode} node the node to evaluate
* @returns {boolean} whether or not the node is an integer
*/
function isArrayIndexAccess(node) {
return Number.isInteger(node.property.value);
}
/**
* Report that the given node should use destructuring
* @param {ASTNode} reportNode the node to report
* @param {string} type the type of destructuring that should have been done
* @param {Function|null} fix the fix function or null to pass to context.report
* @returns {void}
*/
function report(reportNode, type, fix) {
context.report({
node: reportNode,
messageId: "preferDestructuring",
data: { type },
fix,
});
}
/**
* Determines if a node should be fixed into object destructuring
*
* The fixer only fixes the simplest case of object destructuring,
* like: `let x = a.x`;
*
* Assignment expression is not fixed.
* Array destructuring is not fixed.
* Renamed property is not fixed.
* @param {ASTNode} node the node to evaluate
* @returns {boolean} whether or not the node should be fixed
*/
function shouldFix(node) {
return (
node.type === "VariableDeclarator" &&
node.id.type === "Identifier" &&
node.init.type === "MemberExpression" &&
!node.init.computed &&
node.init.property.type === "Identifier" &&
node.id.name === node.init.property.name
);
}
/**
* Fix a node into object destructuring.
* This function only handles the simplest case of object destructuring,
* see {@link shouldFix}.
* @param {SourceCodeFixer} fixer the fixer object
* @param {ASTNode} node the node to be fixed.
* @returns {Object} a fix for the node
*/
function fixIntoObjectDestructuring(fixer, node) {
const rightNode = node.init;
const sourceCode = context.sourceCode;
// Don't fix if that would remove any comments. Only comments inside `rightNode.object` can be preserved.
if (
sourceCode.getCommentsInside(node).length >
sourceCode.getCommentsInside(rightNode.object).length
) {
return null;
}
let objectText = sourceCode.getText(rightNode.object);
if (
astUtils.getPrecedence(rightNode.object) <
PRECEDENCE_OF_ASSIGNMENT_EXPR
) {
objectText = `(${objectText})`;
}
return fixer.replaceText(
node,
`{${rightNode.property.name}} = ${objectText}`,
);
}
/**
* Check that the `prefer-destructuring` rules are followed based on the
* given left- and right-hand side of the assignment.
*
* Pulled out into a separate method so that VariableDeclarators and
* AssignmentExpressions can share the same verification logic.
* @param {ASTNode} leftNode the left-hand side of the assignment
* @param {ASTNode} rightNode the right-hand side of the assignment
* @param {ASTNode} reportNode the node to report the error on
* @returns {void}
*/
function performCheck(leftNode, rightNode, reportNode) {
if (
rightNode.type !== "MemberExpression" ||
rightNode.object.type === "Super" ||
rightNode.property.type === "PrivateIdentifier"
) {
return;
}
if (isArrayIndexAccess(rightNode)) {
if (shouldCheck(reportNode.type, "array")) {
report(reportNode, "array", null);
}
return;
}
const fix = shouldFix(reportNode)
? fixer => fixIntoObjectDestructuring(fixer, reportNode)
: null;
if (
shouldCheck(reportNode.type, "object") &&
enforceForRenamedProperties
) {
report(reportNode, "object", fix);
return;
}
if (shouldCheck(reportNode.type, "object")) {
const property = rightNode.property;
if (
(property.type === "Literal" &&
leftNode.name === property.value) ||
(property.type === "Identifier" &&
leftNode.name === property.name &&
!rightNode.computed)
) {
report(reportNode, "object", fix);
}
}
}
/**
* Check if a given variable declarator is coming from an property access
* that should be using destructuring instead
* @param {ASTNode} node the variable declarator to check
* @returns {void}
*/
function checkVariableDeclarator(node) {
// Skip if variable is declared without assignment
if (!node.init) {
return;
}
// Variable declarations using explicit resource management cannot use destructuring (parse error)
if (
node.parent.kind === "using" ||
node.parent.kind === "await using"
) {
return;
}
// We only care about member expressions past this point
if (node.init.type !== "MemberExpression") {
return;
}
performCheck(node.id, node.init, node);
}
/**
* Run the `prefer-destructuring` check on an AssignmentExpression
* @param {ASTNode} node the AssignmentExpression node
* @returns {void}
*/
function checkAssignmentExpression(node) {
if (node.operator === "=") {
performCheck(node.left, node.right, node);
}
}
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
return {
VariableDeclarator: checkVariableDeclarator,
AssignmentExpression: checkAssignmentExpression,
};
},
};
@@ -0,0 +1,76 @@
#!/usr/bin/env node
import { parse, find, findAll } from '../src/index.js';
import * as process from 'node:process';
const HELP_TEXT = `
Usage: tsconfck <command> <file> [args]
Commands: find, find-all, parse, parse-result
Args:
-js : find/parse jsconfig.json instead of tsconfig.json
Examples:
find tsconfig.json for a file
> tsconfck find src/index.ts
find all tsconfig files in current dir
> tsconfck find-all .
parse tsconfig for a file
> tsconfck parse src/index.ts
`;
const HELP_ARGS = ['-h', '--help', '-?', 'help'];
const JS_ARG = '-js';
const COMMANDS = ['find', 'find-all', 'find-all', 'parse', 'parse-result'];
function needsHelp(args) {
if (args.some((arg) => HELP_ARGS.includes(arg))) {
return HELP_TEXT;
}
const expectedLength = args.includes(JS_ARG) ? 3 : 2;
if (args.length !== expectedLength) {
return 'invalid number of arguments\n' + HELP_TEXT;
} else if (!COMMANDS.includes(args[0])) {
return 'invalid command ' + args[0] + '\n' + HELP_TEXT;
}
}
async function main() {
const args = process.argv.slice(2);
const help = needsHelp(args);
if (help) {
return help;
}
const command = args[0];
const file = args[1];
const isJS = args[2] === JS_ARG;
const findOptions = isJS ? { configName: 'jsconfig.json' } : undefined;
if (command === 'find') {
return find(file, findOptions).then((found) => {
if (!found) {
throw new Error(`no tsconfig found for ${file}`);
}
return found;
});
} else if (command === 'parse') {
return JSON.stringify((await parse(file, findOptions)).tsconfig, null, 2);
} else if (command === 'parse-result') {
return JSON.stringify(await parse(file, findOptions), null, 2);
} else if (command === 'find-all') {
return (
await findAll(file || '.', { configNames: [isJS ? 'jsconfig.json' : 'tsconfig.json'] })
).join('\n');
}
}
main().then(
(result) => {
process.stdout.write(result);
process.stdout.write('\n');
},
(err) => {
console.error(err.message, err);
// eslint-disable-next-line n/no-process-exit
process.exit(1);
}
);
@@ -0,0 +1,2 @@
export const svg: import("./util/schema.js").Schema;
//# sourceMappingURL=svg.d.ts.map
@@ -0,0 +1,438 @@
import getParser, { Parser } from '../../src/parser/source-parser.js';
import { Line } from '../../src/primitives.js';
import { splitLines, seedBlock, seedTokens } from '../../src/util.js';
let _parse: Parser;
const nulls = (n: number): null[] => Array(n).fill(null);
const parse = (source: string): Array<Line[] | null> =>
splitLines(source).map(_parse);
beforeEach(() => {
_parse = getParser();
});
test('multi-line block', () => {
const parsed = parse(`
/**
* description 0
*
* description 1
*
* @param {string} value value description 0
\`\`\`
@sample code
\`\`\`
* description 1
*/`);
const block = [
{
number: 1,
source: ' /**',
tokens: seedTokens({
start: ' ',
delimiter: '/**',
postDelimiter: '',
description: '',
end: '',
}),
},
{
number: 2,
source: ' * description 0',
tokens: seedTokens({
start: ' ',
delimiter: '*',
postDelimiter: ' ',
description: 'description 0',
end: '',
}),
},
{
number: 3,
source: ' *',
tokens: seedTokens({
start: ' ',
delimiter: '*',
postDelimiter: '',
description: '',
end: '',
}),
},
{
number: 4,
source: ' * description 1',
tokens: seedTokens({
start: ' ',
delimiter: '*',
postDelimiter: ' ',
description: 'description 1',
end: '',
}),
},
{
number: 5,
source: ' *',
tokens: seedTokens({
start: ' ',
delimiter: '*',
postDelimiter: '',
description: '',
end: '',
}),
},
{
number: 6,
source: ' * @param {string} value value description 0',
tokens: seedTokens({
start: ' ',
delimiter: '*',
postDelimiter: ' ',
description: '@param {string} value value description 0',
end: '',
}),
},
{
number: 7,
source: ' ```',
tokens: seedTokens({
start: ' ',
delimiter: '',
postDelimiter: '',
description: '```',
end: '',
}),
},
{
number: 8,
source: ' @sample code',
tokens: seedTokens({
start: ' ',
delimiter: '',
postDelimiter: '',
description: '@sample code',
end: '',
}),
},
{
number: 9,
source: ' ```',
tokens: seedTokens({
start: ' ',
delimiter: '',
postDelimiter: '',
description: '```',
end: '',
}),
},
{
number: 10,
source: ' * description 1',
tokens: seedTokens({
start: ' ',
delimiter: '*',
postDelimiter: ' ',
description: 'description 1',
end: '',
}),
},
{
number: 11,
source: ' */',
tokens: seedTokens({
start: ' ',
delimiter: '',
postDelimiter: '',
description: '',
end: '*/',
}),
},
];
expect(parsed).toEqual([...nulls(11), block]);
});
test('one-line block', () => {
const parsed = parse(`
/** description */
`);
const block = [
{
number: 1,
source: ' /** description */',
tokens: seedTokens({
start: ' ',
delimiter: '/**',
postDelimiter: ' ',
description: 'description ',
end: '*/',
}),
},
];
expect(parsed).toEqual([null, block, null]);
});
test('multiple blocks', () => {
const parsed = parse(`
/** description 0 */
/** description 1 */
`);
const block0 = [
{
number: 1,
source: ' /** description 0 */',
tokens: seedTokens({
start: ' ',
delimiter: '/**',
postDelimiter: ' ',
description: 'description 0 ',
end: '*/',
}),
},
];
const block1 = [
{
number: 3,
source: ' /** description 1 */',
tokens: seedTokens({
start: ' ',
delimiter: '/**',
postDelimiter: ' ',
description: 'description 1 ',
end: '*/',
}),
},
];
expect(parsed).toEqual([null, block0, null, block1, null]);
});
test('start line number', () => {
const source = splitLines(`
/** description */`);
const parsed = source.map(getParser({ startLine: 5 }));
const block = [
{
number: 6,
source: ' /** description */',
tokens: seedTokens({
start: ' ',
delimiter: '/**',
postDelimiter: ' ',
description: 'description ',
end: '*/',
}),
},
];
expect(parsed).toEqual([null, block]);
});
test('carriage returns', () => {
const source = splitLines(
['/**', ' * description', ' *', ' */', ''].join('\r\n')
);
const parse = getParser();
const parsed = source.map(parse);
const block = [
{
number: 0,
source: '/**\r',
tokens: seedTokens({
delimiter: '/**',
lineEnd: '\r',
}),
},
{
number: 1,
source: ' * description\r',
tokens: seedTokens({
start: ' ',
delimiter: '*',
postDelimiter: ' ',
description: 'description',
lineEnd: '\r',
}),
},
{
number: 2,
source: ' *\r',
tokens: seedTokens({
start: ' ',
delimiter: '*',
lineEnd: '\r',
}),
},
{
number: 3,
source: ' */\r',
tokens: seedTokens({
start: ' ',
end: '*/',
lineEnd: '\r',
}),
},
];
expect(parsed).toEqual([...nulls(3), block, null]);
});
test('custom markers', () => {
_parse = getParser({
markers: {
start: '////',
nostart: '// ',
delim: '///',
end: '////',
},
});
const parsed = parse(`
////
/// description 0
///
/// description 1
///
/// @param {string} value value description 0
\`\`\`
@sample code
\`\`\`
/// description 1
////`);
const block = [
{
number: 1,
source: ' ////',
tokens: seedTokens({
start: ' ',
delimiter: '////',
postDelimiter: '',
description: '',
end: '',
}),
},
{
number: 2,
source: ' /// description 0',
tokens: seedTokens({
start: ' ',
delimiter: '///',
postDelimiter: ' ',
description: 'description 0',
end: '',
}),
},
{
number: 3,
source: ' ///',
tokens: seedTokens({
start: ' ',
delimiter: '///',
postDelimiter: '',
description: '',
end: '',
}),
},
{
number: 4,
source: ' /// description 1',
tokens: seedTokens({
start: ' ',
delimiter: '///',
postDelimiter: ' ',
description: 'description 1',
end: '',
}),
},
{
number: 5,
source: ' ///',
tokens: seedTokens({
start: ' ',
delimiter: '///',
postDelimiter: '',
description: '',
end: '',
}),
},
{
number: 6,
source: ' /// @param {string} value value description 0',
tokens: seedTokens({
start: ' ',
delimiter: '///',
postDelimiter: ' ',
description: '@param {string} value value description 0',
end: '',
}),
},
{
number: 7,
source: ' ```',
tokens: seedTokens({
start: ' ',
delimiter: '',
postDelimiter: '',
description: '```',
end: '',
}),
},
{
number: 8,
source: ' @sample code',
tokens: seedTokens({
start: ' ',
delimiter: '',
postDelimiter: '',
description: '@sample code',
end: '',
}),
},
{
number: 9,
source: ' ```',
tokens: seedTokens({
start: ' ',
delimiter: '',
postDelimiter: '',
description: '```',
end: '',
}),
},
{
number: 10,
source: ' /// description 1',
tokens: seedTokens({
start: ' ',
delimiter: '///',
postDelimiter: ' ',
description: 'description 1',
end: '',
}),
},
{
number: 11,
source: ' ////',
tokens: seedTokens({
start: ' ',
delimiter: '',
postDelimiter: '',
description: '',
end: '////',
}),
},
];
expect(parsed).toEqual([...nulls(11), block]);
});
@@ -0,0 +1,31 @@
import * as eslint from 'eslint';
import * as semver from 'semver';
import { c as convertConfigToRc } from './shared/eslint-compat-utils.1a5060cf.mjs';
import { c as convertOptionToLegacy } from './shared/eslint-compat-utils.cb6790c2.mjs';
import 'module';
let cacheLinter;
function getLinter() {
return cacheLinter != null ? cacheLinter : cacheLinter = getLinterInternal();
function getLinterInternal() {
if (semver.gte(eslint.Linter.version, "9.0.0-0")) {
return eslint.Linter;
}
return getLinterClassFromLegacyLinter();
}
}
function getLinterClassFromLegacyLinter() {
return class LinterFromLegacyLinter extends eslint.Linter {
static get version() {
return eslint.Linter.version;
}
verify(code, config, option) {
const { processor, ...otherConfig } = config || {};
const newConfig = convertConfigToRc(otherConfig, this);
const newOption = convertOptionToLegacy(processor, option, config || {});
return super.verify(code, newConfig, newOption);
}
};
}
export { getLinter };
@@ -0,0 +1 @@
{"name":"@react-stately/form","version":"3.2.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105972,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/main.js":{"checkedAt":1794532126512,"integrity":"sha512-rJTn8icl/qJGVGSKQnk3t0wFBujU9qb3L/ubIl9F5BbxbB4rQcgFo5GWs6+vse7pFPC7SJLADK+aJ1DTxV++nA==","mode":420,"size":1541},"dist/module.js":{"checkedAt":1794532126512,"integrity":"sha512-FCALlWG4k6JqwClPje3zOtvj+DslAMvE5koilv5m8+muGj7N93+P+y+rWJ+Xn1Hp0MwLzQQXbfYKZEnNuyRvTA==","mode":420,"size":1539},"dist/useFormValidationState.main.js":{"checkedAt":1794532126512,"integrity":"sha512-RAP+bsgbu8BF52OA1SAYzjuOicMoTe7Q2QnBsPxT3u28NHfQbjbsijdmQX9WRu3kuoKzjpqmOQTPgnqSza8Ezw==","mode":420,"size":10270},"dist/useFormValidationState.module.js":{"checkedAt":1794532126512,"integrity":"sha512-CdLP30ACh3Ekdx5QRifuC4p3mats1L0ck3qA2bglhs82oYEDYgj40DlxNbJYt3+tkn7mRSFgPXNvySIPBIsrgg==","mode":420,"size":10021},"package.json":{"checkedAt":1794532126512,"integrity":"sha512-aCyFm+57m9fmPJ11RsYilhlq30q+EX64ZN1iA8L4Mv5ai3XXE8oGbMrkNHXYJwUE+OtRXlrgvMrZHmQGjHcozA==","mode":420,"size":894},"dist/main.js.map":{"checkedAt":1794532126512,"integrity":"sha512-zuQ5GXtaL2inFkC1k1ZcqbXEbOvjcruOjrShSYnxRS9siXBDC7+IK4GG9S8BB68yZzrwL0VkmGsIhqcj7ZroJw==","mode":420,"size":1056},"dist/module.js.map":{"checkedAt":1794532126513,"integrity":"sha512-XLPUTRC6JOoulf5ltbN9ibgBZAwWMkZYV2ZywwCXrWLrskeo+nyMMv+wULC29IbMw1g59stzzlgqa4myANCpwA==","mode":420,"size":1047},"dist/types.d.ts.map":{"checkedAt":1794532126513,"integrity":"sha512-dIfQM3HBRTO3UKW1fb1XkZ/bGYd/qcam6jtb9nTcS6YBYCgLBnOvy4+jdZbxnc0ON6CUjrGApg1ANHqUdjfeqA==","mode":420,"size":1887},"dist/useFormValidationState.main.js.map":{"checkedAt":1794532126513,"integrity":"sha512-qhxvd4lvvZ4r/5OEfU2X1mV5EnU0ft7pam3frkbXvUTFI08yua5OUAoe9x1Ep5HRI7Kwenw7LUkdT5WNL3sM7Q==","mode":420,"size":13366},"dist/useFormValidationState.module.js.map":{"checkedAt":1794532126513,"integrity":"sha512-rGo1Nu908tQ/OdPxsy5KuSVxKZCCgo4cGAte5WoB238EKUHJfOh31HNO0RxTXGfASqsMUKZ4WfrMmI/z5fQ+5Q==","mode":420,"size":13348},"README.md":{"checkedAt":1794532126513,"integrity":"sha512-65AzVk9dVttI2TNpsEFvu/gH09FiVvmNutqgMBpXWvIgMDEy/g8T5B0dQB1ENUIgFY11Q/jjO7DV05t3yrk3Sg==","mode":420,"size":137},"dist/import.mjs":{"checkedAt":1794532126513,"integrity":"sha512-jBV77R76vVdLHwydORCH96PjX3zAFbhwST3wCvTVjrGS2VANjUJf/dovGXeUzTeY294NnY73kW0w2iQvKb5oYw==","mode":420,"size":1533},"dist/useFormValidationState.mjs":{"checkedAt":1794532126513,"integrity":"sha512-CdLP30ACh3Ekdx5QRifuC4p3mats1L0ck3qA2bglhs82oYEDYgj40DlxNbJYt3+tkn7mRSFgPXNvySIPBIsrgg==","mode":420,"size":10021},"src/index.ts":{"checkedAt":1794532126513,"integrity":"sha512-2e7sTWD4cSCFvkwmRJ9HV4JKKMuZ1RMAspdrdazszao73mEWRvOpkmPR6/+uBW2ibfP0UZQj6Cb9QPQPDcaRvA==","mode":420,"size":870},"dist/types.d.ts":{"checkedAt":1794532126513,"integrity":"sha512-7nqjq6A4ykloP0yAFGNHtfAaVVde3hNtprmFFX4poMTgDsR2aIMenLyNVcG7qQAhxIJ+tUQd2rinqLkbLqTlNw==","mode":420,"size":1392},"src/useFormValidationState.ts":{"checkedAt":1794532126514,"integrity":"sha512-j621eeLJHasx5OB80Mlq06otjS4tulBjD4QuMVh6x00wb+ZZ/6QhTW1CIiJ302R0r1MHdmtHRhn9L+95nqyn/Q==","mode":420,"size":9158}}}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-2017 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other 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.
@@ -0,0 +1 @@
{"version":3,"file":"encode-html.js","sourceRoot":"","sources":["../../../src/generated/encode-html.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAM9C,SAAS,WAAW,CAChB,KAAQ;IAER,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;QAChD,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,kBAAkB;AAClB,MAAM,CAAC,MAAM,QAAQ,GAA+B,eAAe,CAAC,IAAI,GAAG,CAAwB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,UAAU,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,oBAAoB,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,SAAS,EAAC,CAAC,EAAC,CAAC,EAAE,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,YAAY,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,aAAa,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CALine truncated
@@ -0,0 +1,9 @@
require('./test-path');
require('./test-path-basename');
require('./test-path-dirname');
require('./test-path-extname');
require('./test-path-isabsolute');
require('./test-path-join');
require('./test-path-relative');
require('./test-path-resolve');
require('./test-path-zero-length-strings');
@@ -0,0 +1,349 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/checkbox.tsx
var checkbox_exports = {};
__export(checkbox_exports, {
default: () => checkbox_default
});
module.exports = __toCommonJS(checkbox_exports);
var import_system2 = require("@heroui/system");
var import_react3 = require("react");
// src/use-checkbox.ts
var import_system = require("@heroui/system");
var import_react = require("react");
var import_react2 = require("react");
var import_toggle = require("@react-stately/toggle");
var import_theme = require("@heroui/theme");
var import_use_callback_ref = require("@heroui/use-callback-ref");
var import_interactions = require("@react-aria/interactions");
var import_focus = require("@react-aria/focus");
var import_shared_utils = require("@heroui/shared-utils");
var import_checkbox = require("@react-aria/checkbox");
var import_use_safe_layout_effect = require("@heroui/use-safe-layout-effect");
var import_react_utils2 = require("@heroui/react-utils");
var import_form = require("@heroui/form");
// src/checkbox-group-context.ts
var import_react_utils = require("@heroui/react-utils");
var [CheckboxGroupProvider, useCheckboxGroupContext] = (0, import_react_utils.createContext)({
name: "CheckboxGroupContext",
strict: false
});
// src/use-checkbox.ts
function useCheckbox(props = {}) {
var _a, _b, _c, _d, _e, _f, _g, _h;
const globalContext = (0, import_system.useProviderContext)();
const groupContext = useCheckboxGroupContext();
const { validationBehavior: formValidationBehavior } = (0, import_form.useSlottedContext)(import_form.FormContext) || {};
const isInGroup = !!groupContext;
const {
as,
ref,
value = "",
children,
icon,
name,
isRequired,
isReadOnly: isReadOnlyProp = false,
autoFocus = false,
isSelected: isSelectedProp,
size = (_a = groupContext == null ? void 0 : groupContext.size) != null ? _a : "md",
color = (_b = groupContext == null ? void 0 : groupContext.color) != null ? _b : "primary",
radius = groupContext == null ? void 0 : groupContext.radius,
lineThrough = (_c = groupContext == null ? void 0 : groupContext.lineThrough) != null ? _c : false,
isDisabled: isDisabledProp = (_d = groupContext == null ? void 0 : groupContext.isDisabled) != null ? _d : false,
disableAnimation = (_f = (_e = groupContext == null ? void 0 : groupContext.disableAnimation) != null ? _e : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _f : false,
validationState,
isInvalid: isInvalidProp = validationState ? validationState === "invalid" : (_g = groupContext == null ? void 0 : groupContext.isInvalid) != null ? _g : false,
isIndeterminate = false,
validationBehavior = isInGroup ? groupContext.validationBehavior : (_h = formValidationBehavior != null ? formValidationBehavior : globalContext == null ? void 0 : globalContext.validationBehavior) != null ? _h : "native",
defaultSelected,
classNames,
className,
onValueChange,
validate,
...otherProps
} = props;
if (groupContext && import_shared_utils.__DEV__) {
if (isSelectedProp) {
(0, import_shared_utils.warn)(
"The Checkbox.Group is being used, `isSelected` will be ignored. Use the `value` of the Checkbox.Group instead.",
"Checkbox"
);
}
if (defaultSelected) {
(0, import_shared_utils.warn)(
"The Checkbox.Group is being used, `defaultSelected` will be ignored. Use the `defaultValue` of the Checkbox.Group instead.",
"Checkbox"
);
}
}
const Component = as || "label";
const domRef = (0, import_react2.useRef)(null);
const inputRef = (0, import_react2.useRef)(null);
let onChange = props.onChange;
if (isInGroup) {
const dispatch = () => {
groupContext.groupState.resetValidation();
};
onChange = (0, import_shared_utils.chain)(dispatch, onChange);
}
const labelId = (0, import_react.useId)();
const ariaCheckboxProps = (0, import_react2.useMemo)(
() => ({
name,
value,
children,
autoFocus,
defaultSelected,
isIndeterminate,
isRequired,
isInvalid: isInvalidProp,
isSelected: isSelectedProp,
isDisabled: isDisabledProp,
isReadOnly: isReadOnlyProp,
"aria-label": (0, import_shared_utils.safeAriaLabel)(otherProps["aria-label"], children),
"aria-labelledby": otherProps["aria-labelledby"] || labelId,
onChange: onValueChange
}),
[
name,
value,
children,
autoFocus,
defaultSelected,
isIndeterminate,
isRequired,
isInvalidProp,
isSelectedProp,
isDisabledProp,
isReadOnlyProp,
otherProps["aria-label"],
otherProps["aria-labelledby"],
labelId,
onValueChange
]
);
const toggleState = (0, import_toggle.useToggleState)(ariaCheckboxProps);
const validationProps = {
isInvalid: isInvalidProp,
isRequired,
validate,
validationState,
validationBehavior
};
const {
inputProps,
isSelected,
isDisabled,
isReadOnly,
isPressed,
isInvalid: isAriaInvalid
} = isInGroup ? (
// eslint-disable-next-line
(0, import_checkbox.useCheckboxGroupItem)(
{ ...ariaCheckboxProps, ...validationProps },
groupContext.groupState,
inputRef
)
) : (
// eslint-disable-next-line
(0, import_checkbox.useCheckbox)({ ...ariaCheckboxProps, ...validationProps }, toggleState, inputRef)
);
const isInteractionDisabled = isDisabled || isReadOnly;
const isInvalid = validationState === "invalid" || isInvalidProp || isAriaInvalid;
const pressed = isInteractionDisabled ? false : isPressed;
const { hoverProps, isHovered } = (0, import_interactions.useHover)({
isDisabled: inputProps.disabled
});
const { focusProps, isFocused, isFocusVisible } = (0, import_focus.useFocusRing)({
autoFocus: inputProps.autoFocus
});
const slots = (0, import_react2.useMemo)(
() => (0, import_theme.checkbox)({
color,
size,
radius,
isInvalid,
lineThrough,
isDisabled,
disableAnimation
}),
[color, size, radius, isInvalid, lineThrough, isDisabled, disableAnimation]
);
(0, import_use_safe_layout_effect.useSafeLayoutEffect)(() => {
if (!inputRef.current) return;
const isInputRefChecked = !!inputRef.current.checked;
toggleState.setSelected(isInputRefChecked);
}, [inputRef.current]);
const onChangeProp = (0, import_use_callback_ref.useCallbackRef)(onChange);
const handleCheckboxChange = (0, import_react.useCallback)(
(event) => {
if (isReadOnly || isDisabled) {
event.preventDefault();
return;
}
onChangeProp == null ? void 0 : onChangeProp(event);
},
[isReadOnly, isDisabled, onChangeProp]
);
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className);
const getBaseProps = (0, import_react.useCallback)(() => {
return {
ref: domRef,
className: slots.base({ class: baseStyles }),
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
"data-selected": (0, import_shared_utils.dataAttr)(isSelected || isIndeterminate),
"data-invalid": (0, import_shared_utils.dataAttr)(isInvalid),
"data-hover": (0, import_shared_utils.dataAttr)(isHovered),
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
"data-pressed": (0, import_shared_utils.dataAttr)(pressed),
"data-readonly": (0, import_shared_utils.dataAttr)(inputProps.readOnly),
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
"data-indeterminate": (0, import_shared_utils.dataAttr)(isIndeterminate),
...(0, import_shared_utils.mergeProps)(hoverProps, otherProps)
};
}, [
slots,
baseStyles,
isDisabled,
isSelected,
isIndeterminate,
isInvalid,
isHovered,
isFocused,
pressed,
inputProps.readOnly,
isFocusVisible,
hoverProps,
otherProps
]);
const getWrapperProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
...props2,
"aria-hidden": true,
className: (0, import_shared_utils.clsx)(slots.wrapper({ class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.wrapper, props2 == null ? void 0 : props2.className) }))
};
},
[slots, classNames == null ? void 0 : classNames.wrapper]
);
const getInputProps = (0, import_react.useCallback)(() => {
return {
ref: (0, import_react_utils2.mergeRefs)(inputRef, ref),
...(0, import_shared_utils.mergeProps)(inputProps, focusProps),
className: slots.hiddenInput({ class: classNames == null ? void 0 : classNames.hiddenInput }),
onChange: (0, import_shared_utils.chain)(inputProps.onChange, handleCheckboxChange)
};
}, [inputProps, focusProps, handleCheckboxChange, classNames == null ? void 0 : classNames.hiddenInput]);
const getLabelProps = (0, import_react.useCallback)(
() => ({
id: labelId,
className: slots.label({ class: classNames == null ? void 0 : classNames.label })
}),
[slots, classNames == null ? void 0 : classNames.label, isDisabled, isSelected, isInvalid]
);
const getIconProps = (0, import_react.useCallback)(
() => ({
isSelected,
isIndeterminate,
disableAnimation,
className: slots.icon({ class: classNames == null ? void 0 : classNames.icon })
}),
[slots, classNames == null ? void 0 : classNames.icon, isSelected, isIndeterminate, disableAnimation]
);
return {
Component,
icon,
children,
isSelected,
isDisabled,
isInvalid,
isFocused,
isHovered,
isFocusVisible,
getBaseProps,
getWrapperProps,
getInputProps,
getLabelProps,
getIconProps
};
}
// src/checkbox-icon.tsx
var import_jsx_runtime = require("react/jsx-runtime");
function CheckIcon(props) {
const { isSelected, disableAnimation, ...otherProps } = props;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"svg",
{
"aria-hidden": "true",
fill: "none",
role: "presentation",
stroke: "currentColor",
strokeDasharray: 22,
strokeDashoffset: isSelected ? 44 : 66,
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 2,
style: !disableAnimation && isSelected ? {
transition: "stroke-dashoffset 250ms linear 0.2s"
} : {},
viewBox: "0 0 17 18",
...otherProps,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "1 9 7 14 15 4" })
}
);
}
function IndeterminateIcon(props) {
const { isSelected, disableAnimation, ...otherProps } = props;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { stroke: "currentColor", strokeWidth: 3, viewBox: "0 0 24 24", ...otherProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "21", x2: "3", y1: "12", y2: "12" }) });
}
function CheckboxIcon(props) {
const { isIndeterminate, ...otherProps } = props;
const BaseIcon = isIndeterminate ? IndeterminateIcon : CheckIcon;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseIcon, { ...otherProps });
}
// src/checkbox.tsx
var import_jsx_runtime2 = require("react/jsx-runtime");
var Checkbox = (0, import_system2.forwardRef)((props, ref) => {
const {
Component,
children,
icon = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CheckboxIcon, {}),
getBaseProps,
getWrapperProps,
getInputProps,
getIconProps,
getLabelProps
} = useCheckbox({ ...props, ref });
const clonedIcon = typeof icon === "function" ? icon(getIconProps()) : (0, import_react3.cloneElement)(icon, getIconProps());
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Component, { ...getBaseProps(), children: [
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("input", { ...getInputProps() }),
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getWrapperProps(), children: clonedIcon }),
children && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getLabelProps(), children })
] });
});
Checkbox.displayName = "HeroUI.Checkbox";
var checkbox_default = Checkbox;
@@ -0,0 +1,2 @@
export * from './required-from-mapped-result.mjs';
export * from './required.mjs';
@@ -0,0 +1,129 @@
const { existsSync } = require('node:fs');
const path = require('node:path');
const { platform, arch, report } = require('node:process');
const isMusl = () => {
try {
return !report.getReport().header.glibcVersionRuntime;
} catch {
return false;
}
};
const isMingw32 = () => {
try {
return report.getReport().header.osName.startsWith('MINGW32_NT');
} catch {
return false;
}
};
const bindingsByPlatformAndArch = {
android: {
arm: { base: 'android-arm-eabi' },
arm64: { base: 'android-arm64' }
},
darwin: {
arm64: { base: 'darwin-arm64' },
x64: { base: 'darwin-x64' }
},
freebsd: {
arm64: { base: 'freebsd-arm64' },
x64: { base: 'freebsd-x64' }
},
linux: {
arm: { base: 'linux-arm-gnueabihf', musl: 'linux-arm-musleabihf' },
arm64: { base: 'linux-arm64-gnu', musl: 'linux-arm64-musl' },
loong64: { base: 'linux-loong64-gnu', musl: null },
ppc64: { base: 'linux-ppc64-gnu', musl: null },
riscv64: { base: 'linux-riscv64-gnu', musl: 'linux-riscv64-musl' },
s390x: { base: 'linux-s390x-gnu', musl: null },
x64: { base: 'linux-x64-gnu', musl: 'linux-x64-musl' }
},
openharmony: {
arm64: { base: 'openharmony-arm64' }
},
win32: {
arm64: { base: 'win32-arm64-msvc' },
ia32: { base: 'win32-ia32-msvc' },
x64: {
base: isMingw32() ? 'win32-x64-gnu' : 'win32-x64-msvc'
}
}
};
const msvcLinkFilenameByArch = {
arm64: 'vc_redist.arm64.exe',
ia32: 'vc_redist.x86.exe',
x64: 'vc_redist.x64.exe'
};
const packageBase = getPackageBase();
const localName = `./rollup.${packageBase}.node`;
const requireWithFriendlyError = id => {
try {
return require(id);
} catch (error) {
if (
platform === 'win32' &&
error instanceof Error &&
error.code === 'ERR_DLOPEN_FAILED' &&
error.message.includes('The specified module could not be found')
) {
const msvcDownloadLink = `https://aka.ms/vs/17/release/${msvcLinkFilenameByArch[arch]}`;
throw new Error(
`Failed to load module ${id}. ` +
'Required DLL was not found. ' +
'This error usually happens when Microsoft Visual C++ Redistributable is not installed. ' +
`You can download it from ${msvcDownloadLink}`,
{ cause: error }
);
}
throw new Error(
`Cannot find module ${id}. ` +
`npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
{ cause: error }
);
}
};
const { parse, parseAsync, xxhashBase64Url, xxhashBase36, xxhashBase16 } = requireWithFriendlyError(
existsSync(path.join(__dirname, localName)) ? localName : `@rollup/rollup-${packageBase}`
);
function getPackageBase() {
const imported = bindingsByPlatformAndArch[platform]?.[arch];
if (!imported) {
throwUnsupportedError(false);
}
if ('musl' in imported && isMusl()) {
return imported.musl || throwUnsupportedError(true);
}
return imported.base;
}
function throwUnsupportedError(isMusl) {
throw new Error(
`Your current platform "${platform}${isMusl ? ' (musl)' : ''}" and architecture "${arch}" combination is not yet supported by the native Rollup build. Please use the WASM build "@rollup/wasm-node" instead.
The following platform-architecture combinations are supported:
${Object.entries(bindingsByPlatformAndArch)
.flatMap(([platformName, architectures]) =>
Object.entries(architectures).flatMap(([architectureName, { musl }]) => {
const name = `${platformName}-${architectureName}`;
return musl ? [name, `${name} (musl)`] : [name];
})
)
.join('\n')}
If this is important to you, please consider supporting Rollup to make a native build for your platform and architecture available.`
);
}
module.exports.parse = parse;
module.exports.parseAsync = parseAsync;
module.exports.xxhashBase64Url = xxhashBase64Url;
module.exports.xxhashBase36 = xxhashBase36;
module.exports.xxhashBase16 = xxhashBase16;
@@ -0,0 +1,29 @@
var baseIteratee = require('./_baseIteratee'),
negate = require('./negate'),
pickBy = require('./pickBy');
/**
* The opposite of `_.pickBy`; this method creates an object composed of
* the own and inherited enumerable string keyed properties of `object` that
* `predicate` doesn't return truthy for. The predicate is invoked with two
* arguments: (value, key).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The source object.
* @param {Function} [predicate=_.identity] The function invoked per property.
* @returns {Object} Returns the new object.
* @example
*
* var object = { 'a': 1, 'b': '2', 'c': 3 };
*
* _.omitBy(object, _.isNumber);
* // => { 'b': '2' }
*/
function omitBy(object, predicate) {
return pickBy(object, negate(baseIteratee(predicate)));
}
module.exports = omitBy;
@@ -0,0 +1,923 @@
/**
* The `node:dns` module enables name resolution. For example, use it to look up IP
* addresses of host names.
*
* Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the
* DNS protocol for lookups. {@link lookup} uses the operating system
* facilities to perform name resolution. It may not need to perform any network
* communication. To perform name resolution the way other applications on the same
* system do, use {@link lookup}.
*
* ```js
* import dns from 'node:dns';
*
* dns.lookup('example.org', (err, address, family) => {
* console.log('address: %j family: IPv%s', address, family);
* });
* // address: "93.184.216.34" family: IPv4
* ```
*
* All other functions in the `node:dns` module connect to an actual DNS server to
* perform name resolution. They will always use the network to perform DNS
* queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform
* DNS queries, bypassing other name-resolution facilities.
*
* ```js
* import dns from 'node:dns';
*
* dns.resolve4('archive.org', (err, addresses) => {
* if (err) throw err;
*
* console.log(`addresses: ${JSON.stringify(addresses)}`);
*
* addresses.forEach((a) => {
* dns.reverse(a, (err, hostnames) => {
* if (err) {
* throw err;
* }
* console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`);
* });
* });
* });
* ```
*
* See the [Implementation considerations section](https://nodejs.org/docs/latest-v22.x/api/dns.html#implementation-considerations) for more information.
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/dns.js)
*/
declare module "dns" {
import * as dnsPromises from "node:dns/promises";
// Supported getaddrinfo flags.
/**
* Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are
* only returned if the current system has at least one IPv4 address configured.
*/
export const ADDRCONFIG: number;
/**
* If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported
* on some operating systems (e.g. FreeBSD 10.1).
*/
export const V4MAPPED: number;
/**
* If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
* well as IPv4 mapped IPv6 addresses.
*/
export const ALL: number;
export interface LookupOptions {
/**
* The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted
* as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used
* with `{ all: true } (see below)`, both IPv4 and IPv6 addresses are returned.
* @default 0
*/
family?: number | "IPv4" | "IPv6" | undefined;
/**
* One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v22.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
* passed by bitwise `OR`ing their values.
*/
hints?: number | undefined;
/**
* When `true`, the callback returns all resolved addresses in an array. Otherwise, returns a single address.
* @default false
*/
all?: boolean | undefined;
/**
* When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted
* by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6
* addresses before IPv4 addresses. Default value is configurable using
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder).
* @default `verbatim` (addresses are not reordered)
* @since v22.1.0
*/
order?: "ipv4first" | "ipv6first" | "verbatim" | undefined;
/**
* When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4
* addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified,
* `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder}
* @default true (addresses are not reordered)
* @deprecated Please use `order` option
*/
verbatim?: boolean | undefined;
}
export interface LookupOneOptions extends LookupOptions {
all?: false | undefined;
}
export interface LookupAllOptions extends LookupOptions {
all: true;
}
export interface LookupAddress {
/**
* A string representation of an IPv4 or IPv6 address.
*/
address: string;
/**
* `4` or `6`, denoting the family of `address`, or `0` if the address is not an IPv4 or IPv6 address. `0` is a likely indicator of a
* bug in the name resolution service used by the operating system.
*/
family: number;
}
/**
* Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
* AAAA (IPv6) record. All `option` properties are optional. If `options` is an
* integer, then it must be `4` or `6` – if `options` is `0` or not provided, then
* IPv4 and IPv6 addresses are both returned if found.
*
* With the `all` option set to `true`, the arguments for `callback` change to `(err, addresses)`, with `addresses` being an array of objects with the
* properties `address` and `family`.
*
* On error, `err` is an `Error` object, where `err.code` is the error code.
* Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
* the host name does not exist but also when the lookup fails in other ways
* such as no available file descriptors.
*
* `dns.lookup()` does not necessarily have anything to do with the DNS protocol.
* The implementation uses an operating system facility that can associate names
* with addresses and vice versa. This implementation can have subtle but
* important consequences on the behavior of any Node.js program. Please take some
* time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v22.x/api/dns.html#implementation-considerations)
* before using `dns.lookup()`.
*
* Example usage:
*
* ```js
* import dns from 'node:dns';
* const options = {
* family: 6,
* hints: dns.ADDRCONFIG | dns.V4MAPPED,
* };
* dns.lookup('example.com', options, (err, address, family) =>
* console.log('address: %j family: IPv%s', address, family));
* // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
*
* // When options.all is true, the result will be an Array.
* options.all = true;
* dns.lookup('example.com', options, (err, addresses) =>
* console.log('addresses: %j', addresses));
* // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
* ```
*
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v22.x/api/util.html#utilpromisifyoriginal) ed
* version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties.
* @since v0.1.90
*/
export function lookup(
hostname: string,
family: number,
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
): void;
export function lookup(
hostname: string,
options: LookupOneOptions,
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
): void;
export function lookup(
hostname: string,
options: LookupAllOptions,
callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void,
): void;
export function lookup(
hostname: string,
options: LookupOptions,
callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void,
): void;
export function lookup(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
): void;
export namespace lookup {
function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
}
/**
* Resolves the given `address` and `port` into a host name and service using
* the operating system's underlying `getnameinfo` implementation.
*
* If `address` is not a valid IP address, a `TypeError` will be thrown.
* The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
*
* On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object,
* where `err.code` is the error code.
*
* ```js
* import dns from 'node:dns';
* dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
* console.log(hostname, service);
* // Prints: localhost ssh
* });
* ```
*
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v22.x/api/util.html#utilpromisifyoriginal) ed
* version, it returns a `Promise` for an `Object` with `hostname` and `service` properties.
* @since v0.11.14
*/
export function lookupService(
address: string,
port: number,
callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void,
): void;
export namespace lookupService {
function __promisify__(
address: string,
port: number,
): Promise<{
hostname: string;
service: string;
}>;
}
export interface ResolveOptions {
ttl: boolean;
}
export interface ResolveWithTtlOptions extends ResolveOptions {
ttl: true;
}
export interface RecordWithTtl {
address: string;
ttl: number;
}
/** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
export interface AnyARecord extends RecordWithTtl {
type: "A";
}
export interface AnyAaaaRecord extends RecordWithTtl {
type: "AAAA";
}
export interface CaaRecord {
critical: number;
issue?: string | undefined;
issuewild?: string | undefined;
iodef?: string | undefined;
contactemail?: string | undefined;
contactphone?: string | undefined;
}
export interface AnyCaaRecord extends CaaRecord {
type: "CAA";
}
export interface MxRecord {
priority: number;
exchange: string;
}
export interface AnyMxRecord extends MxRecord {
type: "MX";
}
export interface NaptrRecord {
flags: string;
service: string;
regexp: string;
replacement: string;
order: number;
preference: number;
}
export interface AnyNaptrRecord extends NaptrRecord {
type: "NAPTR";
}
export interface SoaRecord {
nsname: string;
hostmaster: string;
serial: number;
refresh: number;
retry: number;
expire: number;
minttl: number;
}
export interface AnySoaRecord extends SoaRecord {
type: "SOA";
}
export interface SrvRecord {
priority: number;
weight: number;
port: number;
name: string;
}
export interface AnySrvRecord extends SrvRecord {
type: "SRV";
}
export interface TlsaRecord {
certUsage: number;
selector: number;
match: number;
data: ArrayBuffer;
}
export interface AnyTlsaRecord extends TlsaRecord {
type: "TLSA";
}
export interface AnyTxtRecord {
type: "TXT";
entries: string[];
}
export interface AnyNsRecord {
type: "NS";
value: string;
}
export interface AnyPtrRecord {
type: "PTR";
value: string;
}
export interface AnyCnameRecord {
type: "CNAME";
value: string;
}
export type AnyRecord =
| AnyARecord
| AnyAaaaRecord
| AnyCaaRecord
| AnyCnameRecord
| AnyMxRecord
| AnyNaptrRecord
| AnyNsRecord
| AnyPtrRecord
| AnySoaRecord
| AnySrvRecord
| AnyTlsaRecord
| AnyTxtRecord;
/**
* Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
* of the resource records. The `callback` function has arguments `(err, records)`. When successful, `records` will be an array of resource
* records. The type and structure of individual results varies based on `rrtype`:
*
* <omitted>
*
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object,
* where `err.code` is one of the `DNS error codes`.
* @since v0.1.27
* @param hostname Host name to resolve.
* @param [rrtype='A'] Resource record type.
*/
export function resolve(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
export function resolve(
hostname: string,
rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR",
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
export function resolve(
hostname: string,
rrtype: "ANY",
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
): void;
export function resolve(
hostname: string,
rrtype: "CAA",
callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void,
): void;
export function resolve(
hostname: string,
rrtype: "MX",
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
): void;
export function resolve(
hostname: string,
rrtype: "NAPTR",
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
): void;
export function resolve(
hostname: string,
rrtype: "SOA",
callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void,
): void;
export function resolve(
hostname: string,
rrtype: "SRV",
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
): void;
export function resolve(
hostname: string,
rrtype: "TLSA",
callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
): void;
export function resolve(
hostname: string,
rrtype: "TXT",
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
): void;
export function resolve(
hostname: string,
rrtype: string,
callback: (
err: NodeJS.ErrnoException | null,
addresses:
| string[]
| CaaRecord[]
| MxRecord[]
| NaptrRecord[]
| SoaRecord
| SrvRecord[]
| TlsaRecord[]
| string[][]
| AnyRecord[],
) => void,
): void;
export namespace resolve {
function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
function __promisify__(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
function __promisify__(hostname: string, rrtype: "TLSA"): Promise<TlsaRecord[]>;
function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
function __promisify__(
hostname: string,
rrtype: string,
): Promise<
| string[]
| CaaRecord[]
| MxRecord[]
| NaptrRecord[]
| SoaRecord
| SrvRecord[]
| TlsaRecord[]
| string[][]
| AnyRecord[]
>;
}
/**
* Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the `hostname`. The `addresses` argument passed to the `callback` function
* will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
* @since v0.1.16
* @param hostname Host name to resolve.
*/
export function resolve4(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
export function resolve4(
hostname: string,
options: ResolveWithTtlOptions,
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
): void;
export function resolve4(
hostname: string,
options: ResolveOptions,
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
): void;
export namespace resolve4 {
function __promisify__(hostname: string): Promise<string[]>;
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
}
/**
* Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. The `addresses` argument passed to the `callback` function
* will contain an array of IPv6 addresses.
* @since v0.1.16
* @param hostname Host name to resolve.
*/
export function resolve6(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
export function resolve6(
hostname: string,
options: ResolveWithTtlOptions,
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
): void;
export function resolve6(
hostname: string,
options: ResolveOptions,
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
): void;
export namespace resolve6 {
function __promisify__(hostname: string): Promise<string[]>;
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
}
/**
* Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The `addresses` argument passed to the `callback` function
* will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`).
* @since v0.3.2
*/
export function resolveCname(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
export namespace resolveCname {
function __promisify__(hostname: string): Promise<string[]>;
}
/**
* Uses the DNS protocol to resolve `CAA` records for the `hostname`. The `addresses` argument passed to the `callback` function
* will contain an array of certification authority authorization records
* available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
* @since v15.0.0, v14.17.0
*/
export function resolveCaa(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void,
): void;
export namespace resolveCaa {
function __promisify__(hostname: string): Promise<CaaRecord[]>;
}
/**
* Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
* contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
* @since v0.1.27
*/
export function resolveMx(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
): void;
export namespace resolveMx {
function __promisify__(hostname: string): Promise<MxRecord[]>;
}
/**
* Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of
* objects with the following properties:
*
* * `flags`
* * `service`
* * `regexp`
* * `replacement`
* * `order`
* * `preference`
*
* ```js
* {
* flags: 's',
* service: 'SIP+D2U',
* regexp: '',
* replacement: '_sip._udp.example.com',
* order: 30,
* preference: 100
* }
* ```
* @since v0.9.12
*/
export function resolveNaptr(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
): void;
export namespace resolveNaptr {
function __promisify__(hostname: string): Promise<NaptrRecord[]>;
}
/**
* Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
* contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`).
* @since v0.1.90
*/
export function resolveNs(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
export namespace resolveNs {
function __promisify__(hostname: string): Promise<string[]>;
}
/**
* Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
* be an array of strings containing the reply records.
* @since v6.0.0
*/
export function resolvePtr(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
export namespace resolvePtr {
function __promisify__(hostname: string): Promise<string[]>;
}
/**
* Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
* the `hostname`. The `address` argument passed to the `callback` function will
* be an object with the following properties:
*
* * `nsname`
* * `hostmaster`
* * `serial`
* * `refresh`
* * `retry`
* * `expire`
* * `minttl`
*
* ```js
* {
* nsname: 'ns.example.com',
* hostmaster: 'root.example.com',
* serial: 2013101809,
* refresh: 10000,
* retry: 2400,
* expire: 604800,
* minttl: 3600
* }
* ```
* @since v0.11.10
*/
export function resolveSoa(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void,
): void;
export namespace resolveSoa {
function __promisify__(hostname: string): Promise<SoaRecord>;
}
/**
* Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
* be an array of objects with the following properties:
*
* * `priority`
* * `weight`
* * `port`
* * `name`
*
* ```js
* {
* priority: 10,
* weight: 5,
* port: 21223,
* name: 'service.example.com'
* }
* ```
* @since v0.1.27
*/
export function resolveSrv(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
): void;
export namespace resolveSrv {
function __promisify__(hostname: string): Promise<SrvRecord[]>;
}
/**
* Uses the DNS protocol to resolve certificate associations (`TLSA` records) for
* the `hostname`. The `records` argument passed to the `callback` function is an
* array of objects with these properties:
*
* * `certUsage`
* * `selector`
* * `match`
* * `data`
*
* ```js
* {
* certUsage: 3,
* selector: 1,
* match: 1,
* data: [ArrayBuffer]
* }
* ```
* @since v22.15.0
*/
export function resolveTlsa(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
): void;
export namespace resolveTlsa {
function __promisify__(hostname: string): Promise<TlsaRecord[]>;
}
/**
* Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `records` argument passed to the `callback` function is a
* two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
* one record. Depending on the use case, these could be either joined together or
* treated separately.
* @since v0.1.27
*/
export function resolveTxt(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
): void;
export namespace resolveTxt {
function __promisify__(hostname: string): Promise<string[][]>;
}
/**
* Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
* The `ret` argument passed to the `callback` function will be an array containing
* various types of records. Each object has a property `type` that indicates the
* type of the current record. And depending on the `type`, additional properties
* will be present on the object:
*
* <omitted>
*
* Here is an example of the `ret` object passed to the callback:
*
* ```js
* [ { type: 'A', address: '127.0.0.1', ttl: 299 },
* { type: 'CNAME', value: 'example.com' },
* { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
* { type: 'NS', value: 'ns1.example.com' },
* { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
* { type: 'SOA',
* nsname: 'ns1.example.com',
* hostmaster: 'admin.example.com',
* serial: 156696742,
* refresh: 900,
* retry: 900,
* expire: 1800,
* minttl: 60 } ]
* ```
*
* DNS server operators may choose not to respond to `ANY` queries. It may be better to call individual methods like {@link resolve4}, {@link resolveMx}, and so on. For more details, see
* [RFC 8482](https://tools.ietf.org/html/rfc8482).
*/
export function resolveAny(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
): void;
export namespace resolveAny {
function __promisify__(hostname: string): Promise<AnyRecord[]>;
}
/**
* Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
* array of host names.
*
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object, where `err.code` is
* one of the [DNS error codes](https://nodejs.org/docs/latest-v22.x/api/dns.html#error-codes).
* @since v0.1.16
*/
export function reverse(
ip: string,
callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
): void;
/**
* Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
* The value could be:
*
* * `ipv4first`: for `order` defaulting to `ipv4first`.
* * `ipv6first`: for `order` defaulting to `ipv6first`.
* * `verbatim`: for `order` defaulting to `verbatim`.
* @since v18.17.0
*/
export function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim";
/**
* Sets the IP address and port of servers to be used when performing DNS
* resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
* addresses. If the port is the IANA default DNS port (53) it can be omitted.
*
* ```js
* dns.setServers([
* '4.4.4.4',
* '[2001:4860:4860::8888]',
* '4.4.4.4:1053',
* '[2001:4860:4860::8888]:1053',
* ]);
* ```
*
* An error will be thrown if an invalid address is provided.
*
* The `dns.setServers()` method must not be called while a DNS query is in
* progress.
*
* The {@link setServers} method affects only {@link resolve}, `dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}).
*
* This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
* That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
* subsequent servers provided. Fallback DNS servers will only be used if the
* earlier ones time out or result in some other error.
* @since v0.11.3
* @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses
*/
export function setServers(servers: readonly string[]): void;
/**
* Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
* that are currently configured for DNS resolution. A string will include a port
* section if a custom port is used.
*
* ```js
* [
* '4.4.4.4',
* '2001:4860:4860::8888',
* '4.4.4.4:1053',
* '[2001:4860:4860::8888]:1053',
* ]
* ```
* @since v0.11.3
*/
export function getServers(): string[];
/**
* Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
* The value could be:
*
* * `ipv4first`: sets default `order` to `ipv4first`.
* * `ipv6first`: sets default `order` to `ipv6first`.
* * `verbatim`: sets default `order` to `verbatim`.
*
* The default is `verbatim` and {@link setDefaultResultOrder} have higher
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). When using
* [worker threads](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
* thread won't affect the default dns orders in workers.
* @since v16.4.0, v14.18.0
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
*/
export function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
// Error codes
export const NODATA: "ENODATA";
export const FORMERR: "EFORMERR";
export const SERVFAIL: "ESERVFAIL";
export const NOTFOUND: "ENOTFOUND";
export const NOTIMP: "ENOTIMP";
export const REFUSED: "EREFUSED";
export const BADQUERY: "EBADQUERY";
export const BADNAME: "EBADNAME";
export const BADFAMILY: "EBADFAMILY";
export const BADRESP: "EBADRESP";
export const CONNREFUSED: "ECONNREFUSED";
export const TIMEOUT: "ETIMEOUT";
export const EOF: "EOF";
export const FILE: "EFILE";
export const NOMEM: "ENOMEM";
export const DESTRUCTION: "EDESTRUCTION";
export const BADSTR: "EBADSTR";
export const BADFLAGS: "EBADFLAGS";
export const NONAME: "ENONAME";
export const BADHINTS: "EBADHINTS";
export const NOTINITIALIZED: "ENOTINITIALIZED";
export const LOADIPHLPAPI: "ELOADIPHLPAPI";
export const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
export const CANCELLED: "ECANCELLED";
export interface ResolverOptions {
/**
* Query timeout in milliseconds, or `-1` to use the default timeout.
*/
timeout?: number | undefined;
/**
* The number of tries the resolver will try contacting each name server before giving up.
* @default 4
*/
tries?: number | undefined;
/**
* The max retry timeout, in milliseconds.
* @default 0
*/
maxTimeout?: number | undefined;
}
/**
* An independent resolver for DNS requests.
*
* Creating a new resolver uses the default server settings. Setting
* the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnssetserversservers) does not affect
* other resolvers:
*
* ```js
* import { Resolver } from 'node:dns';
* const resolver = new Resolver();
* resolver.setServers(['4.4.4.4']);
*
* // This request will use the server at 4.4.4.4, independent of global settings.
* resolver.resolve4('example.org', (err, addresses) => {
* // ...
* });
* ```
*
* The following methods from the `node:dns` module are available:
*
* * `resolver.getServers()`
* * `resolver.resolve()`
* * `resolver.resolve4()`
* * `resolver.resolve6()`
* * `resolver.resolveAny()`
* * `resolver.resolveCaa()`
* * `resolver.resolveCname()`
* * `resolver.resolveMx()`
* * `resolver.resolveNaptr()`
* * `resolver.resolveNs()`
* * `resolver.resolvePtr()`
* * `resolver.resolveSoa()`
* * `resolver.resolveSrv()`
* * `resolver.resolveTxt()`
* * `resolver.reverse()`
* * `resolver.setServers()`
* @since v8.3.0
*/
export class Resolver {
constructor(options?: ResolverOptions);
/**
* Cancel all outstanding DNS queries made by this resolver. The corresponding
* callbacks will be called with an error with code `ECANCELLED`.
* @since v8.3.0
*/
cancel(): void;
getServers: typeof getServers;
resolve: typeof resolve;
resolve4: typeof resolve4;
resolve6: typeof resolve6;
resolveAny: typeof resolveAny;
resolveCaa: typeof resolveCaa;
resolveCname: typeof resolveCname;
resolveMx: typeof resolveMx;
resolveNaptr: typeof resolveNaptr;
resolveNs: typeof resolveNs;
resolvePtr: typeof resolvePtr;
resolveSoa: typeof resolveSoa;
resolveSrv: typeof resolveSrv;
resolveTlsa: typeof resolveTlsa;
resolveTxt: typeof resolveTxt;
reverse: typeof reverse;
/**
* The resolver instance will send its requests from the specified IP address.
* This allows programs to specify outbound interfaces when used on multi-homed
* systems.
*
* If a v4 or v6 address is not specified, it is set to the default and the
* operating system will choose a local address automatically.
*
* The resolver will use the v4 local address when making requests to IPv4 DNS
* servers, and the v6 local address when making requests to IPv6 DNS servers.
* The `rrtype` of resolution requests has no impact on the local address used.
* @since v15.1.0, v14.17.0
* @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
* @param [ipv6='::0'] A string representation of an IPv6 address.
*/
setLocalAddress(ipv4?: string, ipv6?: string): void;
setServers: typeof setServers;
}
export { dnsPromises as promises };
}
declare module "node:dns" {
export * from "dns";
}
@@ -0,0 +1 @@
{"version":3,"file":"isHTMLElement.d.ts","sourceRoot":"","sources":["../../src/utils/isHTMLElement.ts"],"names":[],"mappings":"yBAEgB,OAAO,OAAO,KAAG,KAAK,IAAI,WAAW;AAArD,wBAUE"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C"},C:{"1":"0 1 2 3 4 5 CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB 0C 1C"},D:{"1":"0 1 2 3 4 5 kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB"},E:{"1":"A B C L M G aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F 2C ZC 3C 4C 5C 6C"},F:{"1":"0 1 2 3 4 5 CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB FD GD HD ID NC uC JD OC"},G:{"1":"RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:6,C:"ES6 Generators",D:true};
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const reflection_helpers_1 = require("../reflection-helpers");
function injectAll(token, options) {
const data = {
token,
multiple: true,
isOptional: options && options.isOptional
};
return reflection_helpers_1.defineInjectionTokenMetadata(data);
}
exports.default = injectAll;
@@ -0,0 +1,22 @@
let utils = require('./utils')
class OldValue {
constructor(unprefixed, prefixed, string, regexp) {
this.unprefixed = unprefixed
this.prefixed = prefixed
this.string = string || prefixed
this.regexp = regexp || utils.regexp(prefixed)
}
/**
* Check, that value contain old value
*/
check(value) {
if (value.includes(this.string)) {
return !!value.match(this.regexp)
}
return false
}
}
module.exports = OldValue
@@ -0,0 +1,222 @@
'use strict';
var node_process = require('process');
var directives = require('../doc/directives.js');
var Document = require('../doc/Document.js');
var errors = require('../errors.js');
var identity = require('../nodes/identity.js');
var composeDoc = require('./compose-doc.js');
var resolveEnd = require('./resolve-end.js');
function getErrorPos(src) {
if (typeof src === 'number')
return [src, src + 1];
if (Array.isArray(src))
return src.length === 2 ? src : [src[0], src[1]];
const { offset, source } = src;
return [offset, offset + (typeof source === 'string' ? source.length : 1)];
}
function parsePrelude(prelude) {
let comment = '';
let atComment = false;
let afterEmptyLine = false;
for (let i = 0; i < prelude.length; ++i) {
const source = prelude[i];
switch (source[0]) {
case '#':
comment +=
(comment === '' ? '' : afterEmptyLine ? '\n\n' : '\n') +
(source.substring(1) || ' ');
atComment = true;
afterEmptyLine = false;
break;
case '%':
if (prelude[i + 1]?.[0] !== '#')
i += 1;
atComment = false;
break;
default:
// This may be wrong after doc-end, but in that case it doesn't matter
if (!atComment)
afterEmptyLine = true;
atComment = false;
}
}
return { comment, afterEmptyLine };
}
/**
* Compose a stream of CST nodes into a stream of YAML Documents.
*
* ```ts
* import { Composer, Parser } from 'yaml'
*
* const src: string = ...
* const tokens = new Parser().parse(src)
* const docs = new Composer().compose(tokens)
* ```
*/
class Composer {
constructor(options = {}) {
this.doc = null;
this.atDirectives = false;
this.prelude = [];
this.errors = [];
this.warnings = [];
this.onError = (source, code, message, warning) => {
const pos = getErrorPos(source);
if (warning)
this.warnings.push(new errors.YAMLWarning(pos, code, message));
else
this.errors.push(new errors.YAMLParseError(pos, code, message));
};
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
this.directives = new directives.Directives({ version: options.version || '1.2' });
this.options = options;
}
decorate(doc, afterDoc) {
const { comment, afterEmptyLine } = parsePrelude(this.prelude);
//console.log({ dc: doc.comment, prelude, comment })
if (comment) {
const dc = doc.contents;
if (afterDoc) {
doc.comment = doc.comment ? `${doc.comment}\n${comment}` : comment;
}
else if (afterEmptyLine || doc.directives.docStart || !dc) {
doc.commentBefore = comment;
}
else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) {
let it = dc.items[0];
if (identity.isPair(it))
it = it.key;
const cb = it.commentBefore;
it.commentBefore = cb ? `${comment}\n${cb}` : comment;
}
else {
const cb = dc.commentBefore;
dc.commentBefore = cb ? `${comment}\n${cb}` : comment;
}
}
if (afterDoc) {
Array.prototype.push.apply(doc.errors, this.errors);
Array.prototype.push.apply(doc.warnings, this.warnings);
}
else {
doc.errors = this.errors;
doc.warnings = this.warnings;
}
this.prelude = [];
this.errors = [];
this.warnings = [];
}
/**
* Current stream status information.
*
* Mostly useful at the end of input for an empty stream.
*/
streamInfo() {
return {
comment: parsePrelude(this.prelude).comment,
directives: this.directives,
errors: this.errors,
warnings: this.warnings
};
}
/**
* Compose tokens into documents.
*
* @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
* @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
*/
*compose(tokens, forceDoc = false, endOffset = -1) {
for (const token of tokens)
yield* this.next(token);
yield* this.end(forceDoc, endOffset);
}
/** Advance the composer by one CST token. */
*next(token) {
if (node_process.env.LOG_STREAM)
console.dir(token, { depth: null });
switch (token.type) {
case 'directive':
this.directives.add(token.source, (offset, message, warning) => {
const pos = getErrorPos(token);
pos[0] += offset;
this.onError(pos, 'BAD_DIRECTIVE', message, warning);
});
this.prelude.push(token.source);
this.atDirectives = true;
break;
case 'document': {
const doc = composeDoc.composeDoc(this.options, this.directives, token, this.onError);
if (this.atDirectives && !doc.directives.docStart)
this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line');
this.decorate(doc, false);
if (this.doc)
yield this.doc;
this.doc = doc;
this.atDirectives = false;
break;
}
case 'byte-order-mark':
case 'space':
break;
case 'comment':
case 'newline':
this.prelude.push(token.source);
break;
case 'error': {
const msg = token.source
? `${token.message}: ${JSON.stringify(token.source)}`
: token.message;
const error = new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg);
if (this.atDirectives || !this.doc)
this.errors.push(error);
else
this.doc.errors.push(error);
break;
}
case 'doc-end': {
if (!this.doc) {
const msg = 'Unexpected doc-end without preceding document';
this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg));
break;
}
this.doc.directives.docEnd = true;
const end = resolveEnd.resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError);
this.decorate(this.doc, true);
if (end.comment) {
const dc = this.doc.comment;
this.doc.comment = dc ? `${dc}\n${end.comment}` : end.comment;
}
this.doc.range[2] = end.offset;
break;
}
default:
this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`));
}
}
/**
* Call at end of input to yield any remaining document.
*
* @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
* @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
*/
*end(forceDoc = false, endOffset = -1) {
if (this.doc) {
this.decorate(this.doc, true);
yield this.doc;
this.doc = null;
}
else if (forceDoc) {
const opts = Object.assign({ _directives: this.directives }, this.options);
const doc = new Document.Document(undefined, opts);
if (this.atDirectives)
this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line');
doc.range = [0, endOffset, endOffset];
this.decorate(doc, false);
yield doc;
}
}
}
exports.Composer = Composer;
@@ -0,0 +1,94 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.verifyRSA = verifyRSA;
const cose_js_1 = require("../../cose.js");
const mapCoseAlgToWebCryptoAlg_js_1 = require("./mapCoseAlgToWebCryptoAlg.js");
const importKey_js_1 = require("./importKey.js");
const index_js_1 = require("../index.js");
const mapCoseAlgToWebCryptoKeyAlgName_js_1 = require("./mapCoseAlgToWebCryptoKeyAlgName.js");
const getWebCrypto_js_1 = require("./getWebCrypto.js");
/**
* Verify a signature using an RSA public key
*/
async function verifyRSA(opts) {
const { cosePublicKey, signature, data, shaHashOverride } = opts;
const WebCrypto = await (0, getWebCrypto_js_1.getWebCrypto)();
const alg = cosePublicKey.get(cose_js_1.COSEKEYS.alg);
const n = cosePublicKey.get(cose_js_1.COSEKEYS.n);
const e = cosePublicKey.get(cose_js_1.COSEKEYS.e);
if (!alg) {
throw new Error('Public key was missing alg (RSA)');
}
if (!(0, cose_js_1.isCOSEAlg)(alg)) {
throw new Error(`Public key had invalid alg ${alg} (RSA)`);
}
if (!n) {
throw new Error('Public key was missing n (RSA)');
}
if (!e) {
throw new Error('Public key was missing e (RSA)');
}
const keyData = {
kty: 'RSA',
alg: '',
n: index_js_1.isoBase64URL.fromBuffer(n),
e: index_js_1.isoBase64URL.fromBuffer(e),
ext: false,
};
const keyAlgorithm = {
name: (0, mapCoseAlgToWebCryptoKeyAlgName_js_1.mapCoseAlgToWebCryptoKeyAlgName)(alg),
hash: { name: (0, mapCoseAlgToWebCryptoAlg_js_1.mapCoseAlgToWebCryptoAlg)(alg) },
};
const verifyAlgorithm = {
name: (0, mapCoseAlgToWebCryptoKeyAlgName_js_1.mapCoseAlgToWebCryptoKeyAlgName)(alg),
};
if (shaHashOverride) {
keyAlgorithm.hash.name = (0, mapCoseAlgToWebCryptoAlg_js_1.mapCoseAlgToWebCryptoAlg)(shaHashOverride);
}
if (keyAlgorithm.name === 'RSASSA-PKCS1-v1_5') {
if (keyAlgorithm.hash.name === 'SHA-256') {
keyData.alg = 'RS256';
}
else if (keyAlgorithm.hash.name === 'SHA-384') {
keyData.alg = 'RS384';
}
else if (keyAlgorithm.hash.name === 'SHA-512') {
keyData.alg = 'RS512';
}
else if (keyAlgorithm.hash.name === 'SHA-1') {
keyData.alg = 'RS1';
}
}
else if (keyAlgorithm.name === 'RSA-PSS') {
/**
* salt length. The default value is 20 but the convention is to use hLen, the length of the
* output of the hash function in bytes. A salt length of zero is permitted and will result in
* a deterministic signature value. The actual salt length used can be determined from the
* signature value.
*
* From https://www.cryptosys.net/pki/manpki/pki_rsaschemes.html
*/
let saltLength = 0;
if (keyAlgorithm.hash.name === 'SHA-256') {
keyData.alg = 'PS256';
saltLength = 32; // 256 bits => 32 bytes
}
else if (keyAlgorithm.hash.name === 'SHA-384') {
keyData.alg = 'PS384';
saltLength = 48; // 384 bits => 48 bytes
}
else if (keyAlgorithm.hash.name === 'SHA-512') {
keyData.alg = 'PS512';
saltLength = 64; // 512 bits => 64 bytes
}
verifyAlgorithm.saltLength = saltLength;
}
else {
throw new Error(`Unexpected RSA key algorithm ${alg} (${keyAlgorithm.name})`);
}
const key = await (0, importKey_js_1.importKey)({
keyData,
algorithm: keyAlgorithm,
});
return WebCrypto.subtle.verify(verifyAlgorithm, key, signature, data);
}
@@ -0,0 +1,31 @@
{
"name": "@lezer/highlight",
"version": "1.2.3",
"description": "Highlighting system for Lezer parse trees",
"main": "dist/index.cjs",
"type": "module",
"exports": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"module": "dist/index.js",
"types": "dist/index.d.ts",
"author": "Marijn Haverbeke <marijn@haverbeke.berlin>",
"license": "MIT",
"devDependencies": {
"@marijn/buildtool": "0.1.3",
"typescript": "^5.0.0"
},
"dependencies": {
"@lezer/common": "^1.3.0"
},
"files": ["dist"],
"repository": {
"type" : "git",
"url" : "https://github.com/lezer-parser/highlight.git"
},
"scripts": {
"watch": "node build.js --watch",
"prepare": "node build.js"
}
}
@@ -0,0 +1,2 @@
import type { Target } from './types.js';
export declare function parseTriple(rawTriple: string): Target;
@@ -0,0 +1,21 @@
'use strict';
var callBind = require('call-bind');
var test = require('tape');
var hasStrictMode = require('has-strict-mode')();
var implementation = require('../implementation');
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', { skip: !hasStrictMode }, function (st) {
/* eslint no-useless-call: 0 */
st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(implementation), t);
t.end();
});
@@ -0,0 +1 @@
{"name":"error-ex","version":"1.3.4","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532104391,"integrity":"sha512-7//vjzFp/wJ0sSGuB7OHvBEobTIGDrplJXQkJHgmBrhYemDVNbwRqio5YQyr3GUNvnOPswiWp34Lnzyv09n6rg==","mode":420,"size":1077},"index.js":{"checkedAt":1794532120490,"integrity":"sha512-01wfc2i1Vl+5FuHYCo1yWXc11dBJ2tSuzU3uktLN+2Luyqr+My5M9HEmIvu4qWObBoDH5tb3RuJq9IcPwS+G4A==","mode":420,"size":2907},"package.json":{"checkedAt":1794532120490,"integrity":"sha512-+3i9hi7Q27nsXh0vfWXYStnIb3Ao6sMZkc6aSJ7l5EtN8Ga2EBZ7DJHcLAjOu5CtyjL4cxmYubKdaLIdWym7pA==","mode":420,"size":908},"README.md":{"checkedAt":1794532120490,"integrity":"sha512-oxPbr62XfoAymlnls/556xF2oCizFPiy/lhC9y/OH37wHslwMJUj9p31YJjICH9QHkYo+rcTOiSR36yNUA8jyg==","mode":420,"size":4144}}}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('trimEnd', require('../trimEnd'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,719 @@
'use strict';
var utils = require('../utils.js');
var utils$1 = require('@typescript-eslint/utils');
var astUtils = require('@typescript-eslint/utils/ast-utils');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
function containsLineTerminator(str) {
return utils.LINEBREAK_MATCHER.test(str);
}
function last(arr) {
return arr[arr.length - 1];
}
function isSingleLine(node) {
return node.loc.end.line === node.loc.start.line;
}
function isSingleLineImportAttributes(node, sourceCode) {
const openingBrace = sourceCode.getTokenBefore(node.attributes[0], utils.isOpeningBraceToken);
const closingBrace = sourceCode.getTokenAfter(node.attributes[node.attributes.length - 1], utils.isClosingBraceToken);
return closingBrace.loc.end.line === openingBrace.loc.start.line;
}
function isSingleLineProperties(properties) {
const [firstProp] = properties;
const lastProp = last(properties);
return firstProp.loc.start.line === lastProp.loc.end.line;
}
function initOptionProperty(toOptions, fromOptions) {
toOptions.mode = fromOptions.mode || "strict";
if (typeof fromOptions.beforeColon !== "undefined")
toOptions.beforeColon = +fromOptions.beforeColon;
else
toOptions.beforeColon = 0;
if (typeof fromOptions.afterColon !== "undefined")
toOptions.afterColon = +fromOptions.afterColon;
else
toOptions.afterColon = 1;
if (typeof fromOptions.align !== "undefined") {
if (typeof fromOptions.align === "object") {
toOptions.align = fromOptions.align;
} else {
toOptions.align = {
on: fromOptions.align,
mode: toOptions.mode,
beforeColon: toOptions.beforeColon,
afterColon: toOptions.afterColon
};
}
}
return toOptions;
}
function initOptions(toOptions, fromOptions) {
if (typeof fromOptions.align === "object") {
toOptions.align = initOptionProperty({}, fromOptions.align);
toOptions.align.on = fromOptions.align.on || "colon";
toOptions.align.mode = fromOptions.align.mode || "strict";
toOptions.multiLine = initOptionProperty({}, fromOptions.multiLine || fromOptions);
toOptions.singleLine = initOptionProperty({}, fromOptions.singleLine || fromOptions);
} else {
toOptions.multiLine = initOptionProperty({}, fromOptions.multiLine || fromOptions);
toOptions.singleLine = initOptionProperty({}, fromOptions.singleLine || fromOptions);
if (toOptions.multiLine.align) {
toOptions.align = {
on: toOptions.multiLine.align.on,
mode: toOptions.multiLine.align.mode || toOptions.multiLine.mode,
beforeColon: toOptions.multiLine.align.beforeColon,
afterColon: toOptions.multiLine.align.afterColon
};
}
}
return toOptions;
}
var _baseRule = utils.createRule({
name: "key-spacing",
package: "js",
meta: {
type: "layout",
docs: {
description: "Enforce consistent spacing between keys and values in object literal properties"
},
fixable: "whitespace",
schema: [{
anyOf: [
{
type: "object",
properties: {
align: {
anyOf: [
{
type: "string",
enum: ["colon", "value"]
},
{
type: "object",
properties: {
mode: {
type: "string",
enum: ["strict", "minimum"]
},
on: {
type: "string",
enum: ["colon", "value"]
},
beforeColon: {
type: "boolean"
},
afterColon: {
type: "boolean"
}
},
additionalProperties: false
}
]
},
mode: {
type: "string",
enum: ["strict", "minimum"]
},
beforeColon: {
type: "boolean"
},
afterColon: {
type: "boolean"
}
},
additionalProperties: false
},
{
type: "object",
properties: {
singleLine: {
type: "object",
properties: {
mode: {
type: "string",
enum: ["strict", "minimum"]
},
beforeColon: {
type: "boolean"
},
afterColon: {
type: "boolean"
}
},
additionalProperties: false
},
multiLine: {
type: "object",
properties: {
align: {
anyOf: [
{
type: "string",
enum: ["colon", "value"]
},
{
type: "object",
properties: {
mode: {
type: "string",
enum: ["strict", "minimum"]
},
on: {
type: "string",
enum: ["colon", "value"]
},
beforeColon: {
type: "boolean"
},
afterColon: {
type: "boolean"
}
},
additionalProperties: false
}
]
},
mode: {
type: "string",
enum: ["strict", "minimum"]
},
beforeColon: {
type: "boolean"
},
afterColon: {
type: "boolean"
}
},
additionalProperties: false
}
},
additionalProperties: false
},
{
type: "object",
properties: {
singleLine: {
type: "object",
properties: {
mode: {
type: "string",
enum: ["strict", "minimum"]
},
beforeColon: {
type: "boolean"
},
afterColon: {
type: "boolean"
}
},
additionalProperties: false
},
multiLine: {
type: "object",
properties: {
mode: {
type: "string",
enum: ["strict", "minimum"]
},
beforeColon: {
type: "boolean"
},
afterColon: {
type: "boolean"
}
},
additionalProperties: false
},
align: {
type: "object",
properties: {
mode: {
type: "string",
enum: ["strict", "minimum"]
},
on: {
type: "string",
enum: ["colon", "value"]
},
beforeColon: {
type: "boolean"
},
afterColon: {
type: "boolean"
}
},
additionalProperties: false
}
},
additionalProperties: false
}
]
}],
messages: {
extraKey: "Extra space after {{computed}}key '{{key}}'.",
extraValue: "Extra space before value for {{computed}}key '{{key}}'.",
missingKey: "Missing space after {{computed}}key '{{key}}'.",
missingValue: "Missing space before value for {{computed}}key '{{key}}'."
}
},
create(context) {
const options = context.options[0] || {};
const ruleOptions = initOptions({}, options);
const multiLineOptions = ruleOptions.multiLine;
const singleLineOptions = ruleOptions.singleLine;
const alignmentOptions = ruleOptions.align || null;
const sourceCode = context.sourceCode;
function isKeyValueProperty(property) {
if (property.type === "ImportAttribute")
return true;
return !("method" in property && property.method || "shorthand" in property && property.shorthand || "kind" in property && property.kind !== "init" || property.type !== "Property");
}
function getNextColon(node) {
return sourceCode.getTokenAfter(node, utils.isColonToken);
}
function getLastTokenBeforeColon(node) {
const colonToken = getNextColon(node);
return sourceCode.getTokenBefore(colonToken);
}
function getFirstTokenAfterColon(node) {
const colonToken = getNextColon(node);
return sourceCode.getTokenAfter(colonToken);
}
function continuesPropertyGroup(lastMember, candidate) {
const groupEndLine = lastMember.loc.start.line;
const candidateValueStartLine = (isKeyValueProperty(candidate) ? getFirstTokenAfterColon(candidate.key) : candidate).loc.start.line;
if (candidateValueStartLine - groupEndLine <= 1)
return true;
const leadingComments = sourceCode.getCommentsBefore(candidate);
if (leadingComments.length && leadingComments[0].loc.start.line - groupEndLine <= 1 && candidateValueStartLine - last(leadingComments).loc.end.line <= 1) {
for (let i = 1; i < leadingComments.length; i++) {
if (leadingComments[i].loc.start.line - leadingComments[i - 1].loc.end.line > 1)
return false;
}
return true;
}
return false;
}
function getKey(property) {
const key = property.key;
if (property.type !== "ImportAttribute" && property.computed)
return sourceCode.getText().slice(key.range[0], key.range[1]);
return utils.getStaticPropertyName(property);
}
function report(property, side, whitespace, expected, mode) {
const diff = whitespace.length - expected;
if ((diff && mode === "strict" || diff < 0 && mode === "minimum" || diff > 0 && !expected && mode === "minimum") && !(expected && containsLineTerminator(whitespace))) {
const nextColon = getNextColon(property.key);
const tokenBeforeColon = sourceCode.getTokenBefore(nextColon, { includeComments: true });
const tokenAfterColon = sourceCode.getTokenAfter(nextColon, { includeComments: true });
const isKeySide = side === "key";
const isExtra = diff > 0;
const diffAbs = Math.abs(diff);
const spaces = new Array(diffAbs + 1).join(" ");
const locStart = isKeySide ? tokenBeforeColon.loc.end : nextColon.loc.start;
const locEnd = isKeySide ? nextColon.loc.start : tokenAfterColon.loc.start;
const missingLoc = isKeySide ? tokenBeforeColon.loc : tokenAfterColon.loc;
const loc = isExtra ? { start: locStart, end: locEnd } : missingLoc;
let fix;
if (isExtra) {
let range;
if (isKeySide)
range = [tokenBeforeColon.range[1], tokenBeforeColon.range[1] + diffAbs];
else
range = [tokenAfterColon.range[0] - diffAbs, tokenAfterColon.range[0]];
fix = function(fixer) {
return fixer.removeRange(range);
};
} else {
if (isKeySide) {
fix = function(fixer) {
return fixer.insertTextAfter(tokenBeforeColon, spaces);
};
} else {
fix = function(fixer) {
return fixer.insertTextBefore(tokenAfterColon, spaces);
};
}
}
let messageId;
if (isExtra)
messageId = side === "key" ? "extraKey" : "extraValue";
else
messageId = side === "key" ? "missingKey" : "missingValue";
context.report({
node: property[side],
loc,
messageId,
data: {
computed: property.type !== "ImportAttribute" && property.computed ? "computed " : "",
key: getKey(property)
},
fix
});
}
}
function getKeyWidth(property) {
const startToken = sourceCode.getFirstToken(property);
const endToken = getLastTokenBeforeColon(property.key);
return utils.getStringLength(sourceCode.getText().slice(startToken.range[0], endToken.range[1]));
}
function getPropertyWhitespace(property) {
const whitespace = /(\s*):(\s*)/u.exec(sourceCode.getText().slice(
property.key.range[1],
property.value.range[0]
));
if (whitespace) {
return {
beforeColon: whitespace[1],
afterColon: whitespace[2]
};
}
return null;
}
function createGroups(properties) {
if (properties.length === 1)
return [properties];
return properties.reduce((groups, property) => {
const currentGroup = last(groups);
const prev = last(currentGroup);
if (!prev || continuesPropertyGroup(prev, property))
currentGroup.push(property);
else
groups.push([property]);
return groups;
}, [
[]
]);
}
function verifyGroupAlignment(properties) {
const length = properties.length;
const widths = properties.map(getKeyWidth);
const align = alignmentOptions.on;
let targetWidth = Math.max(...widths);
let beforeColon;
let afterColon;
let mode;
if (alignmentOptions && length > 1) {
beforeColon = alignmentOptions.beforeColon;
afterColon = alignmentOptions.afterColon;
mode = alignmentOptions.mode;
} else {
beforeColon = multiLineOptions.beforeColon;
afterColon = multiLineOptions.afterColon;
mode = alignmentOptions.mode;
}
targetWidth += align === "colon" ? beforeColon : afterColon;
for (let i = 0; i < length; i++) {
const property = properties[i];
const whitespace = getPropertyWhitespace(property);
if (whitespace) {
const width = widths[i];
if (align === "value") {
report(property, "key", whitespace.beforeColon, beforeColon, mode);
report(property, "value", whitespace.afterColon, targetWidth - width, mode);
} else {
report(property, "key", whitespace.beforeColon, targetWidth - width, mode);
report(property, "value", whitespace.afterColon, afterColon, mode);
}
}
}
}
function verifySpacing(node, lineOptions) {
const actual = getPropertyWhitespace(node);
if (actual) {
report(node, "key", actual.beforeColon, lineOptions.beforeColon, lineOptions.mode);
report(node, "value", actual.afterColon, lineOptions.afterColon, lineOptions.mode);
}
}
function verifyListSpacing(properties, lineOptions) {
const length = properties.length;
for (let i = 0; i < length; i++)
verifySpacing(properties[i], lineOptions);
}
function verifyAlignment(properties) {
createGroups(properties).forEach((group) => {
const properties2 = group.filter(isKeyValueProperty);
if (properties2.length > 0 && isSingleLineProperties(properties2))
verifyListSpacing(properties2, multiLineOptions);
else
verifyGroupAlignment(properties2);
});
}
function verifyImportAttributes(node) {
if (!node.attributes)
return;
if (!node.attributes.length)
return;
if (isSingleLineImportAttributes(node, sourceCode))
verifyListSpacing(node.attributes, singleLineOptions);
else
verifyAlignment(node.attributes);
}
if (alignmentOptions) {
return {
ObjectExpression(node) {
if (isSingleLine(node))
verifyListSpacing(node.properties.filter(isKeyValueProperty), singleLineOptions);
else
verifyAlignment(node.properties);
},
ImportDeclaration(node) {
verifyImportAttributes(node);
},
ExportNamedDeclaration(node) {
verifyImportAttributes(node);
},
ExportAllDeclaration(node) {
verifyImportAttributes(node);
}
};
}
return {
Property(node) {
verifySpacing(node, isSingleLine(node.parent) ? singleLineOptions : multiLineOptions);
},
ImportAttribute(node) {
const parent = node.parent;
verifySpacing(node, isSingleLineImportAttributes(parent, sourceCode) ? singleLineOptions : multiLineOptions);
}
};
}
});
const baseRule = /* @__PURE__ */ utils.castRuleModule(_baseRule);
const baseSchema = Array.isArray(baseRule.meta.schema) ? baseRule.meta.schema[0] : baseRule.meta.schema;
var keySpacing = utils.createRule({
name: "key-spacing",
package: "ts",
meta: {
type: "layout",
docs: {
description: "Enforce consistent spacing between property names and type annotations in types and interfaces"
},
fixable: "whitespace",
hasSuggestions: baseRule.meta.hasSuggestions,
schema: [baseSchema],
messages: baseRule.meta.messages
},
defaultOptions: [{}],
create(context, [_options]) {
const options = _options || {};
const sourceCode = context.sourceCode;
const baseRules = baseRule.create(context);
function adjustedColumn(position) {
const line = position.line - 1;
return utils.getStringLength(
sourceCode.lines.at(line).slice(0, position.column)
);
}
function getLastTokenBeforeColon(node) {
const colonToken = sourceCode.getTokenAfter(node, astUtils.isColonToken);
return sourceCode.getTokenBefore(colonToken);
}
function isKeyTypeNode(node) {
return (node.type === utils$1.AST_NODE_TYPES.TSPropertySignature || node.type === utils$1.AST_NODE_TYPES.TSIndexSignature || node.type === utils$1.AST_NODE_TYPES.PropertyDefinition) && !!node.typeAnnotation;
}
function isApplicable(node) {
return isKeyTypeNode(node) && node.typeAnnotation.loc.start.line === node.loc.end.line;
}
function getKeyText(node) {
if (node.type !== utils$1.AST_NODE_TYPES.TSIndexSignature)
return sourceCode.getText(node.key);
const code = sourceCode.getText(node);
return code.slice(
0,
sourceCode.getTokenAfter(
node.parameters.at(-1),
astUtils.isClosingBracketToken
).range[1] - node.range[0]
);
}
function getKeyLocEnd(node) {
return getLastTokenBeforeColon(
node.type !== utils$1.AST_NODE_TYPES.TSIndexSignature ? node.key : node.parameters.at(-1)
).loc.end;
}
function checkBeforeColon(node, expectedWhitespaceBeforeColon, mode) {
const { typeAnnotation } = node;
const colon = typeAnnotation.loc.start.column;
const keyEnd = getKeyLocEnd(node);
const difference = colon - keyEnd.column - expectedWhitespaceBeforeColon;
if (mode === "strict" ? difference : difference < 0) {
context.report({
node,
messageId: difference > 0 ? "extraKey" : "missingKey",
fix: (fixer) => {
if (difference > 0) {
return fixer.removeRange([
typeAnnotation.range[0] - difference,
typeAnnotation.range[0]
]);
}
return fixer.insertTextBefore(
typeAnnotation,
" ".repeat(-difference)
);
},
data: {
computed: "",
key: getKeyText(node)
}
});
}
}
function checkAfterColon(node, expectedWhitespaceAfterColon, mode) {
const { typeAnnotation } = node;
const colonToken = sourceCode.getFirstToken(typeAnnotation);
const typeStart = sourceCode.getTokenAfter(colonToken, {
includeComments: true
}).loc.start.column;
const difference = typeStart - colonToken.loc.start.column - 1 - expectedWhitespaceAfterColon;
if (mode === "strict" ? difference : difference < 0) {
context.report({
node,
messageId: difference > 0 ? "extraValue" : "missingValue",
fix: (fixer) => {
if (difference > 0) {
return fixer.removeRange([
colonToken.range[1],
colonToken.range[1] + difference
]);
}
return fixer.insertTextAfter(colonToken, " ".repeat(-difference));
},
data: {
computed: "",
key: getKeyText(node)
}
});
}
}
function continuesAlignGroup(lastMember, candidate) {
const groupEndLine = lastMember.loc.start.line;
const candidateValueStartLine = (isKeyTypeNode(candidate) ? candidate.typeAnnotation : candidate).loc.start.line;
if (candidateValueStartLine === groupEndLine)
return false;
if (candidateValueStartLine - groupEndLine === 1)
return true;
const leadingComments = sourceCode.getCommentsBefore(candidate);
if (leadingComments.length && leadingComments[0].loc.start.line - groupEndLine <= 1 && candidateValueStartLine - leadingComments.at(-1).loc.end.line <= 1) {
for (let i = 1; i < leadingComments.length; i++) {
if (leadingComments[i].loc.start.line - leadingComments[i - 1].loc.end.line > 1) {
return false;
}
}
return true;
}
return false;
}
function checkAlignGroup(group) {
let alignColumn = 0;
const align = (typeof options.align === "object" ? options.align.on : typeof options.multiLine?.align === "object" ? options.multiLine.align.on : options.multiLine?.align ?? options.align) ?? "colon";
const beforeColon = (typeof options.align === "object" ? options.align.beforeColon : options.multiLine ? typeof options.multiLine.align === "object" ? options.multiLine.align.beforeColon : options.multiLine.beforeColon : options.beforeColon) ?? false;
const expectedWhitespaceBeforeColon = beforeColon ? 1 : 0;
const afterColon = (typeof options.align === "object" ? options.align.afterColon : options.multiLine ? typeof options.multiLine.align === "object" ? options.multiLine.align.afterColon : options.multiLine.afterColon : options.afterColon) ?? true;
const expectedWhitespaceAfterColon = afterColon ? 1 : 0;
const mode = (typeof options.align === "object" ? options.align.mode : options.multiLine ? typeof options.multiLine.align === "object" ? options.multiLine.align.mode ?? options.multiLine.mode : options.multiLine.mode : options.mode) ?? "strict";
for (const node of group) {
if (isKeyTypeNode(node)) {
const keyEnd = adjustedColumn(getKeyLocEnd(node));
alignColumn = Math.max(
alignColumn,
align === "colon" ? keyEnd + expectedWhitespaceBeforeColon : keyEnd + ":".length + expectedWhitespaceAfterColon + expectedWhitespaceBeforeColon
);
}
}
for (const node of group) {
if (!isApplicable(node))
continue;
const { typeAnnotation } = node;
const toCheck = align === "colon" ? typeAnnotation : typeAnnotation.typeAnnotation;
const difference = adjustedColumn(toCheck.loc.start) - alignColumn;
if (difference) {
context.report({
node,
messageId: difference > 0 ? align === "colon" ? "extraKey" : "extraValue" : align === "colon" ? "missingKey" : "missingValue",
fix: (fixer) => {
if (difference > 0) {
return fixer.removeRange([
toCheck.range[0] - difference,
toCheck.range[0]
]);
}
return fixer.insertTextBefore(toCheck, " ".repeat(-difference));
},
data: {
computed: "",
key: getKeyText(node)
}
});
}
if (align === "colon")
checkAfterColon(node, expectedWhitespaceAfterColon, mode);
else
checkBeforeColon(node, expectedWhitespaceBeforeColon, mode);
}
}
function checkIndividualNode(node, { singleLine }) {
const beforeColon = (singleLine ? options.singleLine ? options.singleLine.beforeColon : options.beforeColon : options.multiLine ? options.multiLine.beforeColon : options.beforeColon) ?? false;
const expectedWhitespaceBeforeColon = beforeColon ? 1 : 0;
const afterColon = (singleLine ? options.singleLine ? options.singleLine.afterColon : options.afterColon : options.multiLine ? options.multiLine.afterColon : options.afterColon) ?? true;
const expectedWhitespaceAfterColon = afterColon ? 1 : 0;
const mode = (singleLine ? options.singleLine ? options.singleLine.mode : options.mode : options.multiLine ? options.multiLine.mode : options.mode) ?? "strict";
if (isApplicable(node)) {
checkBeforeColon(node, expectedWhitespaceBeforeColon, mode);
checkAfterColon(node, expectedWhitespaceAfterColon, mode);
}
}
function validateBody(body) {
const isSingleLine = body.loc.start.line === body.loc.end.line;
const members = body.type === utils$1.AST_NODE_TYPES.TSTypeLiteral ? body.members : body.body;
let alignGroups = [];
let unalignedElements = [];
if (options.align || options.multiLine?.align) {
let currentAlignGroup = [];
alignGroups.push(currentAlignGroup);
let prevNode;
for (const node of members) {
let prevAlignedNode = currentAlignGroup.at(-1);
if (prevAlignedNode !== prevNode)
prevAlignedNode = void 0;
if (prevAlignedNode && continuesAlignGroup(prevAlignedNode, node)) {
currentAlignGroup.push(node);
} else if (prevNode?.loc.start.line === node.loc.start.line) {
if (prevAlignedNode) {
unalignedElements.push(prevAlignedNode);
currentAlignGroup.pop();
}
unalignedElements.push(node);
} else {
currentAlignGroup = [node];
alignGroups.push(currentAlignGroup);
}
prevNode = node;
}
unalignedElements = unalignedElements.concat(
...alignGroups.filter((group) => group.length === 1)
);
alignGroups = alignGroups.filter((group) => group.length >= 2);
} else {
unalignedElements = members;
}
for (const group of alignGroups)
checkAlignGroup(group);
for (const node of unalignedElements)
checkIndividualNode(node, { singleLine: isSingleLine });
}
return {
...baseRules,
TSTypeLiteral: validateBody,
TSInterfaceBody: validateBody,
ClassBody: validateBody
};
}
});
module.exports = keySpacing;
@@ -0,0 +1 @@
{"name":"mdast-util-gfm-footnote","version":"2.1.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532115781,"integrity":"sha512-ic4iF2Ap25Sn5T9MMw7nJ9C20WL6V01rybBBQi2Qx8cQC9/ERFEqGnove1HT65tK2TIKM30PZoOV3Qbz2FE//A==","mode":420,"size":1094},"index.js":{"checkedAt":1794532115781,"integrity":"sha512-hA1JL29Qtn1pJB3NPBk1Iq3HzSFDaPKUTIKTxE6CrD3Vi2pQlhvlgHmDRNjRpXZ10QgMMIrJ3Kh55Lwh0mt+Jg==","mode":420,"size":127},"lib/index.js":{"checkedAt":1794532115781,"integrity":"sha512-/a9OjR3CYR6oiz1WOCUifmrY8UVwy1YkRyP6/4tS1Nr9u3MASS/8fF/oLM8+DSgw0KygNMMznu6wecNo7EfIeg==","mode":420,"size":5112},"package.json":{"checkedAt":1794532115781,"integrity":"sha512-fWzlzZ/o/YdpM1837EdGhW/HAUDtjXApkNmXNTVc5BtUE4PsZvWWbUpBdzQsv3ohBGWBj2Qwb4kwa4Hy6x9wOw==","mode":420,"size":2796},"lib/index.d.ts.map":{"checkedAt":1794532115781,"integrity":"sha512-IF8F0D4oPD/myxH5APCdv5OqPq56caN6znTw8yg6pk7ztR7Ag55h56bkiBGSrpNhHBhegOFKgIo4OELbz1rB1g==","mode":420,"size":253},"readme.md":{"checkedAt":1794532115781,"integrity":"sha512-KA3aXsGXvQisp826SQQYcZRQb4QZhq6TIgJ8tYS1vv6zp+t8WEjzcmy24Q1YEtgtf1zSnsE5LUCUSagn6bgQlQ==","mode":420,"size":13050},"index.d.ts":{"checkedAt":1794532115782,"integrity":"sha512-LYa0CKfzCGwNijl9LEuUVvvNC6ZKauxGwKuaPd7FGu/tjBVHo7uWUEqtJv+mieyTC4L4LyjUcdSg/L5uuPv++g==","mode":420,"size":722},"lib/index.d.ts":{"checkedAt":1794532115782,"integrity":"sha512-vtdDWlS8FsQqhHn0LKVE0zpkibYJvB4p4MFIP1XVoR6quk/Rt/yXc3SBFKax56Lp9DU72FB85Y+8z3rxGo8gkQ==","mode":420,"size":897}}}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAOM,SAAS,yCAA+C,WAAkB;IAC/E,IAAI,QAAQ;IACZ,MAAM,WAAW,GAAG;IACpB,MAAM,kBAAkB,GAAG,IAAM,MAAM,gBAAgB;IACvD,2FAA2F;IAC3F,MAAM,oBAAoB,GAAG,IAAM,AAAC,MAAc,YAAY;IAC9D,MAAM,OAAO,GAAG,KAAO;IACvB,OAAO;AACT;AAEO,SAAS,0CAAe,KAAY,EAAE,MAAe;IAC1D,OAAO,cAAc,CAAC,OAAO,UAAU;QAAC,OAAO;IAAM;IACrD,OAAO,cAAc,CAAC,OAAO,iBAAiB;QAAC,OAAO;IAAM;AAC9D;AAEO,SAAS,0CAAwD,MAA4C;IAClH,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAE;QACpB,WAAW;QACX,UAAU;IACZ;IAEA,mDAAmD;IAEnD,CAAA,GAAA,qCAAc,EAAE;QACd,MAAM,QAAQ,SAAS,OAAO;QAC9B,OAAO;YACL,IAAI,MAAM,QAAQ,EAAE;gBAClB,MAAM,QAAQ,CAAC,UAAU;gBACzB,MAAM,QAAQ,GAAG;YACnB;QACF;IACF,GAAG,EAAE;IAEL,IAAI,eAAe,CAAA,GAAA,oCAAa,EAAE,CAAC;QACjC,mBAAA,6BAAA,OAAS;IACX;IAEA,wDAAwD;IACxD,OAAO,CAAA,GAAA,wBAAU,EAAE,CAAC;QAClB,wGAAwG;QACxG,sGAAsG;QACtG,6FAA6F;QAC7F,qGAAqG;QACrG,IACE,EAAE,MAAM,YAAY,qBACpB,EAAE,MAAM,YAAY,oBACpB,EAAE,MAAM,YAAY,uBACpB,EAAE,MAAM,YAAY,mBACpB;YACA,SAAS,OAAO,CAAC,SAAS,GAAG;YAE7B,IAAI,SAAS,EAAE,MAAM;YACrB,IAAI,gBAA2D,CAAC;gBAC9D,SAAS,OAAO,CAAC,SAAS,GAAG;gBAE7B,IAAI,OAAO,QAAQ,EAAE;oBACnB,uEAAuE;oBACvE,IAAI,QAAQ,yCAA8C;oBAC1D,aAAa;gBACf;gBAEA,qEAAqE;gBACrE,IAAI,SAAS,OAAO,CAAC,QAAQ,EAAE;oBAC7B,SAAS,OAAO,CAAC,QAAQ,CAAC,UAAU;oBACpC,SAAS,OAAO,CAAC,QAAQ,GAAG;gBAC9B;YACF;YAEA,OAAO,gBAAgB,CAAC,YAAY,eAAe;gBAAC,MAAM;YAAI;YAE9D,SAAS,OAAO,CAAC,QAAQ,GAAG,IAAI,iBAAiB;gBAC/C,IAAI,SAAS,OAAO,CAAC,SAAS,IAAI,OAAO,QAAQ,EAAE;wBACjD;qBAAA,6BAAA,SAAS,OAAO,CAAC,QAAQ,cAAzB,iDAAA,2BAA2B,UAAU;oBACrC,IAAI,kBAAkB,WAAW,SAAS,aAAa,GAAG,OAAO,SAAS,aAAa;oBACvF,OAAO,aAAa,CAAC,IAAI,WAAW,QAAQ;wBAAC,eAAe;oBAAe;oBAC3E,OAAO,aAAa,CAAC,IAAI,WAAW,YAAY;wBAAC,SAAS;wBAAM,eAAe;oBAAe;gBAChG;YACF;YAEA,SAAS,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ;gBAAC,YAAY;gBAAM,iBAAiB;oBAAC;iBAAW;YAAA;QAC5F;IACF,GAAG;QAAC;KAAa;AACnB;AAEO,IAAI,4CAAmB;AAOvB,SAAS,0CAAa,MAA+B;IAC1D,uEAAuE;IACvE,MAAO,UAAU,CAAC,CAAA,GAAA,iCAAU,EAAE,QAC5B,SAAS,OAAO,aAAa;IAG/B,IAAI,SAAS,CAAA,GAAA,oCAAa,EAAE;IAC5B,IAAI,gBAAgB,OAAO,QAAQ,CAAC,aAAa;IACjD,IAAI,CAAC,iBAAiB,kBAAkB,QACtC;IAGF,4CAAmB;IACnB,IAAI,eAAe;IACnB,IAAI,SAAS,CAAC;QACZ,IAAI,EAAE,MAAM,KAAK,iBAAiB,cAChC,EAAE,wBAAwB;IAE9B;IAEA,IAAI,aAAa,CAAC;QAChB,IAAI,EAAE,MAAM,KAAK,iBAAiB,cAAc;YAC9C,EAAE,wBAAwB;YAE1B,qEAAqE;YACrE,6CAA6C;YAC7C,IAAI,CAAC,UAAU,CAAC,cAAc;gBAC5B,eAAe;gBACf,CAAA,GAAA,2CAAoB,EAAE;gBACtB;YACF;QACF;IACF;IAEA,IAAI,UAAU,CAAC;QACb,IAAI,EAAE,MAAM,KAAK,UAAU,cACzB,EAAE,wBAAwB;IAE9B;IAEA,IAAI,YAAY,CAAC;QACf,IAAI,EAAE,MAAM,KAAK,UAAU,cAAc;YACvC,EAAE,wBAAwB;YAE1B,IAAI,CAAC,cAAc;gBACjB,eAAe;gBACf,CAAA,GAAA,2CAAoB,EAAE;gBACtB;YACF;QACF;IACF;IAEA,OAAO,gBAAgB,CAAC,QAAQ,QAAQ;IACxC,OAAO,gBAAgB,CAAC,YAAY,YAAY;IAChD,OAAO,gBAAgB,CAAC,WAAW,WAAW;IAC9C,OAAO,gBAAgB,CAAC,SAAS,SAAS;IAE1C,IAAI,UAAU;QACZ,qBAAqB;QACrB,OAAO,mBAAmB,CAAC,QAAQ,QAAQ;QAC3C,OAAO,mBAAmB,CAAC,YAAY,YAAY;QACnD,OAAO,mBAAmB,CAAC,WAAW,WAAW;QACjD,OAAO,mBAAmB,CAAC,SAAS,SAAS;QAC7C,4CAAmB;QACnB,eAAe;IACjB;IAEA,IAAI,MAAM,sBAAsB;IAChC,OAAO;AACT","sources":["packages/@react-aria/interactions/src/utils.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 {FocusableElement} from '@react-types/shared';\nimport {focusWithoutScrolling, getOwnerWindow, isFocusable, useEffectEvent, useLayoutEffect} from '@react-aria/utils';\nimport {FocusEvent as ReactFocusEvent, SyntheticEvent, useCallback, useRef} from 'react';\n\n// Turn a native event into a React synthetic event.\nexport function createSyntheticEvent<E extends SyntheticEvent>(nativeEvent: Event): E {\n let event = nativeEvent as any as E;\n event.nativeEvent = nativeEvent;\n event.isDefaultPrevented = () => event.defaultPrevented;\n // cancelBubble is technically deprecated in the spec, but still supported in all browsers.\n event.isPropagationStopped = () => (event as any).cancelBubble;\n event.persist = () => {};\n return event;\n}\n\nexport function setEventTarget(event: Event, target: Element): void {\n Object.defineProperty(event, 'target', {value: target});\n Object.defineProperty(event, 'currentTarget', {value: target});\n}\n\nexport function useSyntheticBlurEvent<Target extends Element = Element>(onBlur: (e: ReactFocusEvent<Target>) => void): (e: ReactFocusEvent<Target>) => void {\n let stateRef = useRef({\n isFocused: false,\n observer: null as MutationObserver | null\n });\n\n // Clean up MutationObserver on unmount. See below.\n\n useLayoutEffect(() => {\n const state = stateRef.current;\n return () => {\n if (state.observer) {\n state.observer.disconLine truncated
@@ -0,0 +1,120 @@
/*
* 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} from '@react-types/shared';
import {InvalidationContext} from './types';
import {Layout} from './Layout';
import React, {useCallback, useMemo, useRef, useState} from 'react';
import {Rect} from './Rect';
import {ReusableView} from './ReusableView';
import {Size} from './Size';
import {Virtualizer} from './Virtualizer';
// During SSR, React emits a warning when calling useLayoutEffect.
// Since neither useLayoutEffect nor useEffect run on the server,
// we can suppress this by replace it with a noop on the server.
export const useLayoutEffect: typeof React.useLayoutEffect = typeof document !== 'undefined'
? React.useLayoutEffect
: () => {};
interface VirtualizerProps<T extends object, V, O> {
renderView(type: string, content: T | null): V,
layout: Layout<T>,
collection: Collection<T>,
onVisibleRectChange(rect: Rect): void,
persistedKeys?: Set<Key> | null,
layoutOptions?: O
}
export interface VirtualizerState<T extends object, V> {
visibleViews: ReusableView<T, V>[],
setVisibleRect: (rect: Rect) => void,
contentSize: Size,
virtualizer: Virtualizer<T, V>,
isScrolling: boolean,
startScrolling: () => void,
endScrolling: () => void
}
export function useVirtualizerState<T extends object, V, O = any>(opts: VirtualizerProps<T, V, O>): VirtualizerState<T, V> {
let [visibleRect, setVisibleRect] = useState(new Rect(0, 0, 0, 0));
let [isScrolling, setScrolling] = useState(false);
let [invalidationContext, setInvalidationContext] = useState<InvalidationContext>({});
let visibleRectChanged = useRef(false);
let [virtualizer] = useState(() => new Virtualizer<T, V>({
collection: opts.collection,
layout: opts.layout,
delegate: {
setVisibleRect(rect) {
setVisibleRect(rect);
visibleRectChanged.current = true;
},
// TODO: should changing these invalidate the entire cache?
renderView: opts.renderView,
invalidate: setInvalidationContext
}
}));
// onVisibleRectChange must be called from an effect, not during render.
useLayoutEffect(() => {
if (visibleRectChanged.current) {
visibleRectChanged.current = false;
opts.onVisibleRectChange(visibleRect);
}
});
let mergedInvalidationContext = useMemo(() => {
if (opts.layoutOptions != null) {
return {...invalidationContext, layoutOptions: opts.layoutOptions};
}
return invalidationContext;
}, [invalidationContext, opts.layoutOptions]);
let visibleViews = virtualizer.render({
layout: opts.layout,
collection: opts.collection,
persistedKeys: opts.persistedKeys,
layoutOptions: opts.layoutOptions,
visibleRect,
invalidationContext: mergedInvalidationContext,
isScrolling
});
let contentSize = virtualizer.contentSize;
let startScrolling = useCallback(() => {
setScrolling(true);
}, []);
let endScrolling = useCallback(() => {
setScrolling(false);
}, []);
let state = useMemo(() => ({
virtualizer,
visibleViews,
setVisibleRect,
contentSize,
isScrolling,
startScrolling,
endScrolling
}), [
virtualizer,
visibleViews,
setVisibleRect,
contentSize,
isScrolling,
startScrolling,
endScrolling
]);
return state;
}
@@ -0,0 +1,23 @@
import type { AnyFlag } from './flag-types.d.ts';
export interface HelpListBasicItem {
listGroup?: string;
description: string;
}
export type HelpListBasic = Record<string, HelpListBasicItem>;
export type HelpListItem = AnyFlag | HelpListBasicItem;
export type HelpList = Record<string, HelpListItem | string>;
export interface PeowlyHelpMessageMeta {
examples?: (string | { prefix?: string, suffix?: string })[] | undefined;
indent?: number | undefined;
usage?: string | undefined;
}
export interface HelpMessageInfo extends PeowlyHelpMessageMeta {
aliases?: HelpListBasic;
commands?: HelpListBasic;
flags?: HelpList;
noDefaultFlags?: boolean;
}
@@ -0,0 +1,141 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/form.tsx
var form_exports = {};
__export(form_exports, {
Form: () => Form3
});
module.exports = __toCommonJS(form_exports);
var import_system = require("@heroui/system");
var import_react3 = require("react");
// src/base-form.tsx
var import_form = require("@react-stately/form");
var import_react2 = require("react");
var import_theme = require("@heroui/theme");
// src/utils.ts
var import_react = require("react");
var import_shared_utils = require("@heroui/shared-utils");
var DEFAULT_SLOT = Symbol("default");
function useObjectRef(ref) {
const objRef = (0, import_react.useRef)(null);
const cleanupRef = (0, import_react.useRef)(void 0);
const refEffect = (0, import_react.useCallback)(
(instance) => {
if (typeof ref === "function") {
const refCallback = ref;
const refCleanup = refCallback(instance);
return () => {
if (typeof refCleanup === "function") {
refCleanup();
} else {
refCallback(null);
}
};
} else if (ref) {
ref.current = instance;
return () => {
ref.current = null;
};
}
},
[ref]
);
return (0, import_react.useMemo)(
() => ({
get current() {
return objRef.current;
},
set current(value) {
objRef.current = value;
if (cleanupRef.current) {
cleanupRef.current();
cleanupRef.current = void 0;
}
if (value != null) {
cleanupRef.current = refEffect(value);
}
}
}),
[refEffect]
);
}
function useSlottedContext(context, slot) {
let ctx = (0, import_react.useContext)(context);
if (slot === null) {
return null;
}
if (ctx && typeof ctx === "object" && "slots" in ctx && ctx.slots) {
let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map((p) => `"${p}"`));
if (!slot && !ctx.slots[DEFAULT_SLOT]) {
throw new Error(`A slot prop is required. Valid slot names are ${availableSlots}.`);
}
let slotKey = slot || DEFAULT_SLOT;
if (!ctx.slots[slotKey]) {
throw new Error(`Invalid slot "${slot}". Valid slot names are ${availableSlots}.`);
}
return ctx.slots[slotKey];
}
return ctx;
}
function useContextProps(props, ref, context) {
let ctx = useSlottedContext(context, props.slot) || {};
let { ref: contextRef, ...contextProps } = ctx;
let mergedRef = useObjectRef((0, import_react.useMemo)(() => (0, import_shared_utils.mergeRefs)(ref, contextRef), [ref, contextRef]));
let mergedProps = (0, import_shared_utils.mergeProps)(contextProps, props);
if ("style" in contextProps && contextProps.style && "style" in props && props.style) {
if (typeof contextProps.style === "function" || typeof props.style === "function") {
mergedProps.style = (renderProps) => {
let contextStyle = typeof contextProps.style === "function" ? contextProps.style(renderProps) : contextProps.style;
let defaultStyle = { ...renderProps.defaultStyle, ...contextStyle };
let style = typeof props.style === "function" ? props.style({ ...renderProps, defaultStyle }) : props.style;
return { ...defaultStyle, ...style };
};
} else {
mergedProps.style = { ...contextProps.style, ...props.style };
}
}
return [mergedProps, mergedRef];
}
// src/base-form.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var FormContext = (0, import_react2.createContext)(null);
var Form = (0, import_react2.forwardRef)(function Form2(props, ref) {
[props, ref] = useContextProps(props, ref, FormContext);
let { validationErrors, validationBehavior = "native", children, className, ...domProps } = props;
const styles = (0, import_react2.useMemo)(() => (0, import_theme.form)({ className }), [className]);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("form", { noValidate: validationBehavior !== "native", ...domProps, ref, className: styles, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormContext.Provider, { value: { ...props, validationBehavior }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormValidationContext.Provider, { value: validationErrors != null ? validationErrors : {}, children }) }) });
});
// src/form.tsx
var import_jsx_runtime2 = require("react/jsx-runtime");
var Form3 = (0, import_react3.forwardRef)(function Form4(props, ref) {
var _a, _b;
const globalContext = (0, import_system.useProviderContext)();
const validationBehavior = (_b = (_a = props.validationBehavior) != null ? _a : globalContext == null ? void 0 : globalContext.validationBehavior) != null ? _b : "native";
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Form, { ...props, ref, validationBehavior });
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Form
});
@@ -0,0 +1,6 @@
export type { Coordinates, DistanceMeasurement, Translate, ScrollCoordinates, } from './coordinates';
export { Direction } from './direction';
export type { DragAbortEvent, DragPendingEvent, DragStartEvent, DragCancelEvent, DragEndEvent, DragMoveEvent, DragOverEvent, } from './events';
export type { UniqueIdentifier } from './other';
export type { SyntheticEventName } from './react';
export type { ClientRect } from './rect';
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAeM,SAAS,0CAAY,OAAyB;IACnD,6EAA6E;IAC7E,4EAA4E;IAC5E,2EAA2E;IAC3E,+EAA+E;IAC/E,uBAAuB;IACvB,MAAM,gBAAgB,CAAA,GAAA,sCAAe,EAAE;IACvC,MAAM,gBAAgB,CAAA,GAAA,sCAAe,EAAE;IACvC,IAAI,CAAA,GAAA,gDAAqB,QAAQ,WAAW;QAC1C,IAAI,qBAAqB;QACzB,CAAA,GAAA,wCAAiB,EAAE;YACjB,4EAA4E;YAC5E,IAAI,CAAA,GAAA,sCAAe,EAAE,mBAAmB,sBAAsB,QAAQ,WAAW,EAC/E,CAAA,GAAA,2CAAoB,EAAE;QAE1B;IACF,OACE,CAAA,GAAA,2CAAoB,EAAE;AAE1B","sources":["packages/@react-aria/interactions/src/focusSafely.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 {FocusableElement} from '@react-types/shared';\nimport {\n focusWithoutScrolling,\n getActiveElement,\n getOwnerDocument,\n runAfterTransition\n} from '@react-aria/utils';\nimport {getInteractionModality} from './useFocusVisible';\n\n/**\n * A utility function that focuses an element while avoiding undesired side effects such\n * as page scrolling and screen reader issues with CSS transitions.\n */\nexport function focusSafely(element: FocusableElement): void {\n // If the user is interacting with a virtual cursor, e.g. screen reader, then\n // wait until after any animated transitions that are currently occurring on\n // the page before shifting focus. This avoids issues with VoiceOver on iOS\n // causing the page to scroll when moving focus if the element is transitioning\n // from off the screen.\n const ownerDocument = getOwnerDocument(element);\n const activeElement = getActiveElement(ownerDocument);\n if (getInteractionModality() === 'virtual') {\n let lastFocusedElement = activeElement;\n runAfterTransition(() => {\n // If focus did not move and the element is still in the document, focus it.\n if (getActiveElement(ownerDocument) === lastFocusedElement && element.isConnected) {\n focusWithoutScrolling(element);\n }\n });\n } else {\n focusWithoutScrolling(element);\n }\n}\n"],"names":[],"version":3,"file":"focusSafely.main.js.map"}
@@ -0,0 +1,65 @@
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
/* eslint-disable node/no-deprecated-api */
var buffer = require('buffer')
var Buffer = buffer.Buffer
// alternative to using Object.keys for old browsers
function copyProps (src, dst) {
for (var key in src) {
dst[key] = src[key]
}
}
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
module.exports = buffer
} else {
// Copy properties from require('buffer')
copyProps(buffer, exports)
exports.Buffer = SafeBuffer
}
function SafeBuffer (arg, encodingOrOffset, length) {
return Buffer(arg, encodingOrOffset, length)
}
SafeBuffer.prototype = Object.create(Buffer.prototype)
// Copy static methods from Buffer
copyProps(Buffer, SafeBuffer)
SafeBuffer.from = function (arg, encodingOrOffset, length) {
if (typeof arg === 'number') {
throw new TypeError('Argument must not be a number')
}
return Buffer(arg, encodingOrOffset, length)
}
SafeBuffer.alloc = function (size, fill, encoding) {
if (typeof size !== 'number') {
throw new TypeError('Argument must be a number')
}
var buf = Buffer(size)
if (fill !== undefined) {
if (typeof encoding === 'string') {
buf.fill(fill, encoding)
} else {
buf.fill(fill)
}
} else {
buf.fill(0)
}
return buf
}
SafeBuffer.allocUnsafe = function (size) {
if (typeof size !== 'number') {
throw new TypeError('Argument must be a number')
}
return Buffer(size)
}
SafeBuffer.allocUnsafeSlow = function (size) {
if (typeof size !== 'number') {
throw new TypeError('Argument must be a number')
}
return buffer.SlowBuffer(size)
}
@@ -0,0 +1 @@
{"name":"@heroui/framer-utils","version":"2.1.7","requiresBuild":false,"files":{"dist/index.js":{"checkedAt":1794532108154,"integrity":"sha512-zLQ5q3PdH1gcBXbO9M/Iy+hmfMRvcLCz6rCVLzR0q2dJ4Wp8FMhSLo1kJDGrjDOO7MdQ5e8h7l0l/Y557NKvNg==","mode":420,"size":5025},"dist/resizable-panel.js":{"checkedAt":1794532108154,"integrity":"sha512-MduN/BU4xNXR9OUnuXSTFrsaYJ3sWHVhMHbqMLevx5QCC5FSo5Ez9e9G1KKqeKDpTKWjfnZqbMujGCgEQiU1cg==","mode":420,"size":2165},"dist/transition-utils.js":{"checkedAt":1794532108154,"integrity":"sha512-BdGGLHEiINfCeNWWSR1ufYjlbKPfSIMKCLb34gXa+NDQKfsmLxbtBmZBw+8jYNGtvBXPU6KkE0oKer/s9cr3RA==","mode":420,"size":3914},"package.json":{"checkedAt":1794532108154,"integrity":"sha512-nhfhVSaDRrSxoe4m1ixOt7IzsULokXpdX3BavtGdjUxmZeFi/sTxiiYGic/m5seCTlih/KCuEmrtaiPZhPebpA==","mode":420,"size":1403},"README.md":{"checkedAt":1794532108154,"integrity":"sha512-sxAAu5x5FDgH96kSWT0gJG1kyDIGm0+Pav4qYT2ZwhN8WXbJlyydOdUhP+Kz8GY/2NXW6CYa4OrjloX9NEZCnQ==","mode":420,"size":491},"dist/chunk-54L3M2TC.mjs":{"checkedAt":1794532108154,"integrity":"sha512-Thrdojh+ECYDC9hZepEe4T/t18dKVKXDEvaBo9nnSqJfetfr4xxNDviiGkTWeOHNRb8xRAkdVsX6vNdGb5jXLQ==","mode":420,"size":928},"dist/chunk-736YWA4T.mjs":{"checkedAt":1794532108154,"integrity":"sha512-zJnCUACCauAswzHxVoOJkvhFYwhGYINYw6UVYasdY4vlijVxM5FhZ9Mb6cplMBu7/5UvRHzysN4pLMqs0qUmIw==","mode":420,"size":2757},"dist/index.mjs":{"checkedAt":1794532108155,"integrity":"sha512-rvKFDJo9RAAXeBfXKOmqLH483/2Qgs+hY57fdfIeYaIrcIfs1m7vw6vxm9I8LiEs4END3tXQV2Ppq5ZmNSemtg==","mode":420,"size":275},"dist/resizable-panel.mjs":{"checkedAt":1794532108155,"integrity":"sha512-/OYXXLfxeembPF8MhTCqPUOb8OkNzgMI/gH+xRy9Wn+5azgEy2sDt5HR8DgPjKMJUJAtAG9IOExI4R04jGgXGA==","mode":420,"size":100},"dist/transition-utils.mjs":{"checkedAt":1794532108155,"integrity":"sha512-fV8tb96d7gqcxB5CEXnBq6rQLlRtBbSprWRdSrCnxZUbargySNDJHyu4ShFym3Gi/UOOQUdBCJ/rOxzv+1rDSg==","mode":420,"size":200},"dist/index.d.ts":{"checkedAt":1794532108155,"integrity":"sha512-TTRiY62n8aDWC84gj09VIocmw4rDHlxcjJbPByr+0ZU0vEy1Zuaeu93eYXx3p+RsscaIuLpdl8Ck3SQ2GNW4gQ==","mode":420,"size":314},"dist/resizable-panel.d.ts":{"checkedAt":1794532108155,"integrity":"sha512-qb2IJZMRnw0b+Tw9Din6fzjo4wpUURS3PvIZh0jEKB0MpDwxEADSaum13HKADfB+l91w0OIzh/VUo18rxzhFxA==","mode":420,"size":370},"dist/transition-utils.d.ts":{"checkedAt":1794532108155,"integrity":"sha512-wS9RoZ5LvzZODb/rBr4HIUGKUXX69mvvHWAVmrVvDGVsgAYsra2LskOxMBMWoIffnf3zVDmdiEEOVJSyQEwE5Q==","mode":420,"size":1635},"LICENSE":{"checkedAt":1794532108155,"integrity":"sha512-eaopHP+N4EYXlGoX9hmoxDPoVft4BqrXKmbsFTcsoBHSrJp/GWF4qVtLBzrw9h9ZrbFfPY69z+3RuDX9FdPG+Q==","mode":420,"size":1064}}}
@@ -0,0 +1 @@
{"version":3,"names":["isDigit","code","forbiddenNumericSeparatorSiblings","decBinOct","Set","hex","isAllowedNumericSeparatorSibling","bin","ch","oct","dec","readStringContents","type","input","pos","lineStart","curLine","errors","initialPos","initialLineStart","initialCurLine","out","firstInvalidLoc","chunkStart","length","unterminated","slice","charCodeAt","isStringEnd","res","readEscapedChar","str","containsInvalid","inTemplate","throwOnInvalid","readHexChar","String","fromCharCode","readCodePoint","fromCodePoint","strictNumericEscape","startPos","match","exec","octalStr","octal","parseInt","next","len","forceLen","n","readInt","invalidEscapeSequence","radix","allowNumSeparator","bailOnError","start","forbiddenSiblings","isAllowedSibling","invalid","total","i","e","Infinity","val","prev","numericSeparatorInEscapeSequence","Number","isNaN","has","unexpectedNumericSeparator","_isDigit","invalidDigit","indexOf","invalidCodePoint"],"sources":["../src/index.ts"],"sourcesContent":["// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// The following character codes are forbidden from being\n// an immediate sibling of NumericLiteralSeparator _\nconst forbiddenNumericSeparatorSiblings = {\n decBinOct: new Set<number>([\n charCodes.dot,\n charCodes.uppercaseB,\n charCodes.uppercaseE,\n charCodes.uppercaseO,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseB,\n charCodes.lowercaseE,\n charCodes.lowercaseO,\n ]),\n hex: new Set<number>([\n charCodes.dot,\n charCodes.uppercaseX,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseX,\n ]),\n};\n\nconst isAllowedNumericSeparatorSibling = {\n // 0 - 1\n bin: (ch: number) => ch === charCodes.digit0 || ch === charCodes.digit1,\n\n // 0 - 7\n oct: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit7,\n\n // 0 - 9\n dec: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit9,\n\n // 0 - 9, A - F, a - f,\n hex: (ch: number) =>\n (ch >= charCodes.digit0 && ch <= charCodes.digit9) ||\n (ch >= charCodes.uppercaseA && ch <= charCodes.uppercaseF) ||\n (ch >= charCodes.lowercaseA && ch <= charCodes.lowercaseF),\n};\n\nexport type StringContentsErrorHandlers = EscapedCharErrorHandlers & {\n unterminated(\n initialPos: number,\n initialLineStart: number,\n initialCurLine: number,\n ): void;\n};\n\nexport function readStringContents(\n type: \"single\" | \"double\" | \"template\",\n input: string,\n pos: number,\n lineStart: number,\n curLine: number,\n errors: StringContentsErrorHandlers,\n) {\n const initialPos = pos;\n const initialLineStart = lineStart;\n const initialCurLine = curLine;\n\n let out = \"\";\n let firstInvalidLoc = null;\n let chunkStart = pos;\n const { length } = input;\n for (;;) {\n if (pos >= length) {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n out += input.slice(chunkStart, pos);\n break;\n }\n const ch = input.charCodeAt(pos);\n if (isStringEnd(type, ch, input, pos)) {\n out += input.slice(chunkStart, pos);\n break;\n }\n if (ch === charCodes.backslash) {\n out += input.slice(chunkStart, pos);\n const res = readEscapedChar(\n input,\n pos,\n lineStart,\n curLine,\n type === \"template\",\n errors,\n );\n if (res.ch === null && !firstInvalidLoc) {\n firstInvalidLoc = { pos, lineStart, curLine };\n } else {\n out += res.ch;\n }\n ({ pos, lineStart, curLine } = res);\n chunkStart = pos;\n } else if (\n ch === charCodes.lineSeparator ||\n ch === charCodes.paragraphSeparator\n ) {\n ++pos;\n ++curLine;\n lineStart = pos;\n } else if (ch === charCodes.lineFeed || ch === charCodes.carriageReturn) {\n if (type === \"template\") {\n out += input.slice(chunkStart, pos) + \"\\n\";\n ++pos;\n if (\n ch === charCodes.carriageReturn &&\n input.charCodeAt(pos) === charCodes.lineFeed\n ) {\n ++pos;\n }\n ++curLine;\n chunkStart = lineStart = pos;\n } else {\n errors.unterminated(initialPos, initialLineStart, initialCurLine);\n }\n } else {\n ++pos;\n }\n }\n return process.env.BABEL_8_BREAKING\n ? { pos, str: out, firstInvalidLoc, lineStart, curLine }\n : {\n pos,\n str: out,\n firstInvalidLoc,\n lineStart,\n curLine,\n containsInvalid: !!firstInvalidLoc,\n };\n}\n\nfunction isStringEnd(\n type: \"single\" | \"double\" | \"template\",\n ch: number,\n input: string,\n pos: number,\n) {\n if (type === \"template\") {\n return (\n ch === charCodes.graveAccent ||\n (ch === charCodes.dollarSign &&\n input.charCodeAt(pos + 1) === charCodes.leftCuLine truncated
@@ -0,0 +1,17 @@
import * as asn1js from "asn1js";
/**
* Serializes objects into ASN.1 encoded data
*/
export declare class AsnSerializer {
/**
* Serializes an object to the ASN.1 encoded buffer
* @param obj The object to serialize
*/
static serialize(obj: unknown): ArrayBuffer;
/**
* Serialize an object to the asn1js object
* @param obj The object to serialize
*/
static toASN(obj: unknown): asn1js.AsnType;
private static toAsnItem;
}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more