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,20 @@
import type { SchemaOptions } from '../schema/index';
import type { TSchema } from '../schema/index';
import { Kind } from '../symbols/index';
export interface RegExpOptions extends SchemaOptions {
/** The maximum length of the string */
maxLength?: number;
/** The minimum length of the string */
minLength?: number;
}
export interface TRegExp extends TSchema {
[Kind]: 'RegExp';
static: `${string}`;
type: 'RegExp';
source: string;
flags: string;
}
/** `[JavaScript]` Creates a RegExp type */
export declare function RegExp(pattern: string, options?: RegExpOptions): TRegExp;
/** `[JavaScript]` Creates a RegExp type */
export declare function RegExp(regex: RegExp, options?: RegExpOptions): TRegExp;
@@ -0,0 +1,46 @@
import {
die,
isDraft,
shallowCopy,
each,
DRAFT_STATE,
set,
ImmerState,
isDraftable,
isFrozen
} from "../internal"
/** Takes a snapshot of the current state of a draft and finalizes it (but without freezing). This is a great utility to print the current state during debugging (no Proxies in the way). The output of current can also be safely leaked outside the producer. */
export function current<T>(value: T): T
export function current(value: any): any {
if (!isDraft(value)) die(10, value)
return currentImpl(value)
}
function currentImpl(value: any): any {
if (!isDraftable(value) || isFrozen(value)) return value
const state: ImmerState | undefined = value[DRAFT_STATE]
let copy: any
let strict = true // Default to strict for compatibility
if (state) {
if (!state.modified_) return state.base_
// Optimization: avoid generating new drafts during copying
state.finalized_ = true
copy = shallowCopy(value, state.scope_.immer_.useStrictShallowCopy_)
strict = state.scope_.immer_.shouldUseStrictIteration()
} else {
copy = shallowCopy(value, true)
}
// recurse
each(
copy,
(key, childValue) => {
set(copy, key, currentImpl(childValue))
},
strict
)
if (state) {
state.finalized_ = false
}
return copy
}
@@ -0,0 +1,25 @@
// Konkani Latin script [gom-latn]
import dayjs from '../index';
var locale = {
name: 'gom-latn',
weekdays: "Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split('_'),
months: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'),
weekStart: 1,
weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
ordinal: function ordinal(n) {
return n;
},
formats: {
LT: 'A h:mm [vazta]',
LTS: 'A h:mm:ss [vazta]',
L: 'DD-MM-YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY A h:mm [vazta]',
LLLL: 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]',
llll: 'ddd, D MMM YYYY, A h:mm [vazta]'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1 @@
{"version":3,"names":["_checkPrivateRedeclaration","require","_classPrivateMethodInitSpec","obj","privateSet","checkPrivateRedeclaration","add"],"sources":["../../src/helpers/classPrivateMethodInitSpec.ts"],"sourcesContent":["/* @minVersion 7.14.1 */\n\nimport checkPrivateRedeclaration from \"./checkPrivateRedeclaration.ts\";\n\nexport default function _classPrivateMethodInitSpec(\n obj: object,\n privateSet: WeakSet<object>,\n) {\n checkPrivateRedeclaration(obj, privateSet);\n privateSet.add(obj);\n}\n"],"mappings":";;;;;;AAEA,IAAAA,0BAAA,GAAAC,OAAA;AAEe,SAASC,2BAA2BA,CACjDC,GAAW,EACXC,UAA2B,EAC3B;EACA,IAAAC,kCAAyB,EAACF,GAAG,EAAEC,UAAU,CAAC;EAC1CA,UAAU,CAACE,GAAG,CAACH,GAAG,CAAC;AACrB","ignoreList":[]}
@@ -0,0 +1,36 @@
"use client";
// src/checkbox-icon.tsx
import { jsx } from "react/jsx-runtime";
function CheckIcon(props) {
const { isSelected, disableAnimation, ...otherProps } = props;
return /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", role: "presentation", viewBox: "0 0 17 18", ...otherProps, children: /* @__PURE__ */ jsx(
"polyline",
{
fill: "none",
points: "1 9 7 14 15 4",
stroke: "currentColor",
strokeDasharray: 22,
strokeDashoffset: isSelected ? 44 : 66,
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 2,
style: !disableAnimation && isSelected ? {
transition: "stroke-dashoffset 250ms linear 0.2s"
} : {}
}
) });
}
function IndeterminateIcon(props) {
const { isSelected, disableAnimation, ...otherProps } = props;
return /* @__PURE__ */ jsx("svg", { stroke: "currentColor", strokeWidth: 3, viewBox: "0 0 24 24", ...otherProps, children: /* @__PURE__ */ jsx("line", { x1: "21", x2: "3", y1: "12", y2: "12" }) });
}
function CheckboxIcon(props) {
const { isIndeterminate, ...otherProps } = props;
const BaseIcon = isIndeterminate ? IndeterminateIcon : CheckIcon;
return /* @__PURE__ */ jsx(BaseIcon, { ...otherProps });
}
export {
CheckboxIcon
};
@@ -0,0 +1,34 @@
var ListCache = require('./_ListCache'),
Map = require('./_Map'),
MapCache = require('./_MapCache');
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* Sets the stack `key` to `value`.
*
* @private
* @name set
* @memberOf Stack
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
var data = this.__data__;
if (data instanceof ListCache) {
var pairs = data.__data__;
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
pairs.push([key, value]);
this.size = ++data.size;
return this;
}
data = this.__data__ = new MapCache(pairs);
}
data.set(key, value);
this.size = data.size;
return this;
}
module.exports = stackSet;
@@ -0,0 +1,8 @@
import type { PackageJson } from "pkg-types";
export declare function getCacheDir(): string;
export declare function isDir(filename: string): boolean;
export declare function isWritable(filename: string): boolean;
export declare function md5(content: string, len?: number): string;
export declare function detectLegacySyntax(code: string): RegExpMatchArray | null;
export declare function isObject(val: any): boolean;
export declare function readNearestPackageJSON(path: string): PackageJson | undefined;
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from './types.mjs';
import 'react';
declare const SunFilledIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { SunFilledIcon };
@@ -0,0 +1,42 @@
import { OneBotAction } from '../../action/OneBotAction';
import { Peer } from '../../../napcat-core/types';
import { Static } from '@sinclair/typebox';
declare const PayloadSchema: import("@sinclair/typebox").TObject<{
message_id: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString]>;
group_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
user_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
}>;
type PayloadType = Static<typeof PayloadSchema>;
declare const ReturnSchema: import("@sinclair/typebox").TNull;
type ReturnType = Static<typeof ReturnSchema>;
declare class ForwardSingleMsg extends OneBotAction<PayloadType, ReturnType> {
actionSummary: string;
actionDescription: string;
actionTags: string[];
payloadExample: {
message_id: number;
group_id: string;
};
returnExample: null;
protected getTargetPeer(payload: PayloadType): Promise<Peer>;
_handle(payload: PayloadType): Promise<null>;
}
export declare class ForwardFriendSingleMsg extends ForwardSingleMsg {
payloadSchema: import("@sinclair/typebox").TObject<{
message_id: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString]>;
group_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
user_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
}>;
returnSchema: import("@sinclair/typebox").TNull;
actionName: "forward_friend_single_msg";
}
export declare class ForwardGroupSingleMsg extends ForwardSingleMsg {
payloadSchema: import("@sinclair/typebox").TObject<{
message_id: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString]>;
group_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
user_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
}>;
returnSchema: import("@sinclair/typebox").TNull;
actionName: "forward_group_single_msg";
}
export {};
@@ -0,0 +1,119 @@
/*
* 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 {
AnchorHTMLAttributes,
ButtonHTMLAttributes,
ElementType,
HTMLAttributes,
InputHTMLAttributes,
RefObject
} from 'react';
import {AriaButtonProps} from '@react-types/button';
import {DOMAttributes} from '@react-types/shared';
import {filterDOMProps, mergeProps} from '@react-aria/utils';
import {useFocusable} from '@react-aria/focus';
import {usePress} from '@react-aria/interactions';
export interface AriaButtonOptions<E extends ElementType> extends Omit<AriaButtonProps<E>, 'children'> {}
export interface ButtonAria<T> {
/** Props for the button element. */
buttonProps: T,
/** Whether the button is currently pressed. */
isPressed: boolean
}
// Order with overrides is important: 'button' should be default
export function useButton(props: AriaButtonOptions<'button'>, ref: RefObject<HTMLButtonElement | null>): ButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;
export function useButton(props: AriaButtonOptions<'a'>, ref: RefObject<HTMLAnchorElement | null>): ButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;
export function useButton(props: AriaButtonOptions<'div'>, ref: RefObject<HTMLDivElement | null>): ButtonAria<HTMLAttributes<HTMLDivElement>>;
export function useButton(props: AriaButtonOptions<'input'>, ref: RefObject<HTMLInputElement | null>): ButtonAria<InputHTMLAttributes<HTMLInputElement>>;
export function useButton(props: AriaButtonOptions<'span'>, ref: RefObject<HTMLSpanElement | null>): ButtonAria<HTMLAttributes<HTMLSpanElement>>;
export function useButton(props: AriaButtonOptions<ElementType>, ref: RefObject<Element | null>): ButtonAria<DOMAttributes>;
/**
* Provides the behavior and accessibility implementation for a button component. Handles mouse, keyboard, and touch interactions,
* focus behavior, and ARIA props for both native button elements and custom element types.
* @param props - Props to be applied to the button.
* @param ref - A ref to a DOM element for the button.
*/
export function useButton(props: AriaButtonOptions<ElementType>, ref: RefObject<any>): ButtonAria<HTMLAttributes<any>> {
let {
elementType = 'button',
isDisabled,
onPress,
onPressStart,
onPressEnd,
onPressUp,
onPressChange,
preventFocusOnPress,
// @ts-ignore - undocumented
allowFocusWhenDisabled,
// @ts-ignore
onClick: deprecatedOnClick,
href,
target,
rel,
type = 'button'
} = props;
let additionalProps;
if (elementType === 'button') {
additionalProps = {
type,
disabled: isDisabled
};
} else {
additionalProps = {
role: 'button',
tabIndex: isDisabled ? undefined : 0,
href: elementType === 'a' && !isDisabled ? href : undefined,
target: elementType === 'a' ? target : undefined,
type: elementType === 'input' ? type : undefined,
disabled: elementType === 'input' ? isDisabled : undefined,
'aria-disabled': !isDisabled || elementType === 'input' ? undefined : isDisabled,
rel: elementType === 'a' ? rel : undefined
};
}
let {pressProps, isPressed} = usePress({
onPressStart,
onPressEnd,
onPressChange,
onPress,
onPressUp,
isDisabled,
preventFocusOnPress,
ref
});
let {focusableProps} = useFocusable(props, ref);
if (allowFocusWhenDisabled) {
focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;
}
let buttonProps = mergeProps(focusableProps, pressProps, filterDOMProps(props, {labelable: true}));
return {
isPressed, // Used to indicate press state for visual
buttonProps: mergeProps(additionalProps, buttonProps, {
'aria-haspopup': props['aria-haspopup'],
'aria-expanded': props['aria-expanded'],
'aria-controls': props['aria-controls'],
'aria-pressed': props['aria-pressed'],
onClick: (e) => {
if (deprecatedOnClick) {
deprecatedOnClick(e);
console.warn('onClick is deprecated, please use onPress');
}
}
})
};
}
@@ -0,0 +1,103 @@
# is-valid-glob [![NPM version](https://img.shields.io/npm/v/is-valid-glob.svg?style=flat)](https://www.npmjs.com/package/is-valid-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-valid-glob.svg?style=flat)](https://npmjs.org/package/is-valid-glob) [![NPM total downloads](https://img.shields.io/npm/dt/is-valid-glob.svg?style=flat)](https://npmjs.org/package/is-valid-glob) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-valid-glob.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-valid-glob)
> Return true if a value is a valid glob pattern or patterns.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save is-valid-glob
```
## Usage
This really just checks to make sure that a pattern is either a string or array, and if it's an array it's either empty or consists of only strings.
```js
var isValidGlob = require('is-valid-glob');
isValidGlob('foo/*.js');
//=> true
```
**Valid patterns**
```js
isValidGlob('a');
isValidGlob('a.js');
isValidGlob('*.js');
isValidGlob(['a', 'b']);
//=> all true
```
**Invalid patterns**
```js
isValidGlob();
isValidGlob('');
isValidGlob(null);
isValidGlob(undefined);
isValidGlob(new Buffer('foo'));
isValidGlob(['foo', [[]]]);
isValidGlob(['foo', [['bar']]]);
isValidGlob(['foo', {}]);
isValidGlob({});
isValidGlob([]);
isValidGlob(['']);
//=> all false
```
## About
### Related projects
* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.")
* [vinyl-fs](https://www.npmjs.com/package/vinyl-fs): Vinyl adapter for the file system | [homepage](http://github.com/wearefractal/vinyl-fs "Vinyl adapter for the file system")
* [vinyl](https://www.npmjs.com/package/vinyl): Virtual file format. | [homepage](https://github.com/gulpjs/vinyl#readme "Virtual file format.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 9 | [jonschlinkert](https://github.com/jonschlinkert) |
| 2 | [contra](https://github.com/contra) |
### Building docs
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
### Running tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
### License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 21, 2017._
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var docConclusionRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'conclusion [EPUB-SSV]'
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docConclusionRole;
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,iBAAiB;IACf,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;AACX","sources":["packages/@react-aria/grid/src/*.js"],"sourcesContent":["const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}"],"names":[],"version":3,"file":"intlStrings.main.js.map"}
@@ -0,0 +1,9 @@
export * from "./converters";
export * from "./types/index";
export { AsnProp, AsnType, AsnChoiceType, AsnSequenceType, AsnSetType } from "./decorators";
export { AsnTypeTypes, AsnPropTypes } from "./enums";
export { AsnParser } from "./parser";
export { AsnSerializer } from "./serializer";
export * from "./errors";
export * from "./objects";
export * from "./convert";
@@ -0,0 +1,15 @@
/**
* Turn an mdast `inlineCode` node into hast.
*
* @param {State} state
* Info passed around.
* @param {InlineCode} node
* mdast node.
* @returns {Element}
* hast node.
*/
export function inlineCode(state: State, node: InlineCode): Element;
export type Element = import("hast").Element;
export type Text = import("hast").Text;
export type InlineCode = import("mdast").InlineCode;
export type State = import("../state.js").State;
@@ -0,0 +1,113 @@
'use strict';
const fill = require('fill-range');
const stringify = require('./stringify');
const utils = require('./utils');
const append = (queue = '', stash = '', enclose = false) => {
const result = [];
queue = [].concat(queue);
stash = [].concat(stash);
if (!stash.length) return queue;
if (!queue.length) {
return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
}
for (const item of queue) {
if (Array.isArray(item)) {
for (const value of item) {
result.push(append(value, stash, enclose));
}
} else {
for (let ele of stash) {
if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;
result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
}
}
}
return utils.flatten(result);
};
const expand = (ast, options = {}) => {
const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit;
const walk = (node, parent = {}) => {
node.queue = [];
let p = parent;
let q = parent.queue;
while (p.type !== 'brace' && p.type !== 'root' && p.parent) {
p = p.parent;
q = p.queue;
}
if (node.invalid || node.dollar) {
q.push(append(q.pop(), stringify(node, options)));
return;
}
if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {
q.push(append(q.pop(), ['{}']));
return;
}
if (node.nodes && node.ranges > 0) {
const args = utils.reduce(node.nodes);
if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
}
let range = fill(...args, options);
if (range.length === 0) {
range = stringify(node, options);
}
q.push(append(q.pop(), range));
node.nodes = [];
return;
}
const enclose = utils.encloseBrace(node);
let queue = node.queue;
let block = node;
while (block.type !== 'brace' && block.type !== 'root' && block.parent) {
block = block.parent;
queue = block.queue;
}
for (let i = 0; i < node.nodes.length; i++) {
const child = node.nodes[i];
if (child.type === 'comma' && node.type === 'brace') {
if (i === 1) queue.push('');
queue.push('');
continue;
}
if (child.type === 'close') {
q.push(append(q.pop(), queue, enclose));
continue;
}
if (child.value && child.type !== 'open') {
queue.push(append(queue.pop(), child.value));
continue;
}
if (child.nodes) {
walk(child, node);
}
}
return queue;
};
return utils.flatten(walk(ast));
};
module.exports = expand;
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,oBAAoB,CAAC,+DAAyD,CAAC;AACnG","sources":["packages/@react-aria/menu/intl/da-DK.json"],"sourcesContent":["{\n \"longPressMessage\": \"Langt tryk eller tryk på Alt + pil ned for at åbne menuen\"\n}\n"],"names":[],"version":3,"file":"da-DK.main.js.map"}
@@ -0,0 +1,18 @@
'use strict';
var format = require('./format');
/*
* function label (info)
* Returns a new instance of the label Format which adds the specified
* `opts.label` before the message. This was previously exposed as
* { label: 'my label' } to transports in `winston < 3.0.0`.
*/
module.exports = format(function (info, opts) {
if (opts.message) {
info.message = "[".concat(opts.label, "] ").concat(info.message);
return info;
}
info.label = opts.label;
return info;
});
@@ -0,0 +1 @@
{"version":3,"file":"export-map.js","sourceRoot":"","sources":["../../src/utils/export-map.ts"],"names":[],"mappings":"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 truncated
@@ -0,0 +1,2 @@
import 'reflect-metadata';
//# sourceMappingURL=plan.int.spec.d.ts.map
@@ -0,0 +1,234 @@
import {RootView as $ad1d98aa8f0c31b4$export$e21886a4eef6b29a} from "./ReusableView.mjs";
import {isSetEqual as $fc36f9a046a9ce79$export$a8d0d0c8d1c5df64} from "./utils.mjs";
import {OverscanManager as $364191b3decf3697$export$4455ee6afb38dcbb} from "./OverscanManager.mjs";
import {Rect as $60423f92c7f9ad87$export$c79fc6492f3af13d} from "./Rect.mjs";
import {Size as $ee1bfa90a957fb8a$export$cb6da89c6af1a8ec} from "./Size.mjs";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
class $38b9490c1cca8fc4$export$89be5a243e59c4b2 {
/** Returns whether the given key, or an ancestor, is persisted. */ isPersistedKey(key) {
// Quick check if the key is directly in the set of persisted keys.
if (this.persistedKeys.has(key)) return true;
// If not, check if the key is an ancestor of any of the persisted keys.
for (let k of this.persistedKeys)while(k != null){
let layoutInfo = this.layout.getLayoutInfo(k);
if (!layoutInfo || layoutInfo.parentKey == null) break;
k = layoutInfo.parentKey;
if (k === key) return true;
}
return false;
}
getParentView(layoutInfo) {
return layoutInfo.parentKey != null ? this._visibleViews.get(layoutInfo.parentKey) : this._rootView;
}
getReusableView(layoutInfo) {
let parentView = this.getParentView(layoutInfo);
let view = parentView.getReusableView(layoutInfo.type);
view.layoutInfo = layoutInfo;
this._renderView(view);
return view;
}
_renderView(reusableView) {
if (reusableView.layoutInfo) {
let { type: type, key: key, content: content } = reusableView.layoutInfo;
reusableView.content = content || this.collection.getItem(key);
reusableView.rendered = this._renderContent(type, reusableView.content);
}
}
_renderContent(type, content) {
let cached = content != null ? this._renderedContent.get(content) : null;
if (cached != null) return cached;
let rendered = this.delegate.renderView(type, content);
if (content) this._renderedContent.set(content, rendered);
return rendered;
}
/**
* Returns the key for the item view currently at the given point.
*/ keyAtPoint(point) {
let rect = new (0, $60423f92c7f9ad87$export$c79fc6492f3af13d)(point.x, point.y, 1, 1);
let layoutInfos = rect.area === 0 ? [] : this.layout.getVisibleLayoutInfos(rect);
// Layout may return multiple layout infos in the case of
// persisted keys, so find the first one that actually intersects.
for (let layoutInfo of layoutInfos){
if (layoutInfo.rect.intersects(rect)) return layoutInfo.key;
}
return null;
}
relayout(context = {}) {
// Update the layout
this.layout.update(context);
this.contentSize = this.layout.getContentSize();
// Constrain scroll position.
// If the content changed, scroll to the top.
let visibleRect = this.visibleRect;
let contentOffsetX = context.contentChanged ? 0 : visibleRect.x;
let contentOffsetY = context.contentChanged ? 0 : visibleRect.y;
contentOffsetX = Math.max(0, Math.min(this.contentSize.width - visibleRect.width, contentOffsetX));
contentOffsetY = Math.max(0, Math.min(this.contentSize.height - visibleRect.height, contentOffsetY));
if (contentOffsetX !== visibleRect.x || contentOffsetY !== visibleRect.y) {
// If the offset changed, trigger a new re-render.
let rect = new (0, $60423f92c7f9ad87$export$c79fc6492f3af13d)(contentOffsetX, contentOffsetY, visibleRect.width, visibleRect.height);
this.delegate.setVisibleRect(rect);
} else this.updateSubviews();
}
getVisibleLayoutInfos() {
let isTestEnv = process.env.NODE_ENV === 'test' && !process.env.VIRT_ON;
let isClientWidthMocked = isTestEnv && typeof HTMLElement !== 'undefined' && Object.getOwnPropertyNames(HTMLElement.prototype).includes('clientWidth');
let isClientHeightMocked = isTestEnv && typeof HTMLElement !== 'undefined' && Object.getOwnPropertyNames(HTMLElement.prototype).includes('clientHeight');
let rect;
if (isTestEnv && !(isClientWidthMocked && isClientHeightMocked)) rect = new (0, $60423f92c7f9ad87$export$c79fc6492f3af13d)(0, 0, this.contentSize.width, this.contentSize.height);
else rect = this._overscanManager.getOverscannedRect();
let layoutInfos = this.layout.getVisibleLayoutInfos(rect);
let map = new Map;
for (let layoutInfo of layoutInfos)map.set(layoutInfo.key, layoutInfo);
return map;
}
updateSubviews() {
let visibleLayoutInfos = this.getVisibleLayoutInfos();
let removed = new Set();
for (let [key, view] of this._visibleViews){
let layoutInfo = visibleLayoutInfos.get(key);
// If a view's parent changed, treat it as a delete and re-create in the new parent.
if (!layoutInfo || view.parent !== this.getParentView(layoutInfo)) {
this._visibleViews.delete(key);
view.parent.reuseChild(view);
removed.add(view); // Defer removing in case we reuse this view.
}
}
for (let [key, layoutInfo] of visibleLayoutInfos){
let view = this._visibleViews.get(key);
if (!view) {
view = this.getReusableView(layoutInfo);
view.parent.children.add(view);
this._visibleViews.set(key, view);
removed.delete(view);
} else {
view.layoutInfo = layoutInfo;
let item = this.collection.getItem(layoutInfo.key);
if (view.content !== item) {
if (view.content != null) this._renderedContent.delete(view.content);
this._renderView(view);
}
}
}
// The remaining views in `removed` were not reused to render new items.
// They should be removed from the DOM. We also clear the reusable view queue
// here since there's no point holding onto views that have been removed.
// Doing so hurts performance in the future when reusing elements due to FIFO order.
for (let view of removed){
view.parent.children.delete(view);
view.parent.reusableViews.clear();
}
// Reordering DOM nodes is costly, so we defer this until scrolling stops.
// DOM order does not affect visual order (due to absolute positioning),
// but does matter for assistive technology users.
if (!this._isScrolling) // Layout infos must be in topological order (parents before children).
for (let key of visibleLayoutInfos.keys()){
let view = this._visibleViews.get(key);
view.parent.children.delete(view);
view.parent.children.add(view);
}
}
/** Performs layout and updates visible views as needed. */ render(opts) {
let mutableThis = this;
let needsLayout = false;
let offsetChanged = false;
let sizeChanged = false;
let itemSizeChanged = false;
let layoutOptionsChanged = false;
let needsUpdate = false;
if (opts.collection !== this.collection) {
mutableThis.collection = opts.collection;
needsLayout = true;
}
if (opts.layout !== this.layout || this.layout.virtualizer !== this) {
if (this.layout) this.layout.virtualizer = null;
opts.layout.virtualizer = this;
mutableThis.layout = opts.layout;
needsLayout = true;
}
if (opts.persistedKeys && !(0, $fc36f9a046a9ce79$export$a8d0d0c8d1c5df64)(opts.persistedKeys, this.persistedKeys)) {
mutableThis.persistedKeys = opts.persistedKeys;
needsUpdate = true;
}
if (!this.visibleRect.equals(opts.visibleRect)) {
this._overscanManager.setVisibleRect(opts.visibleRect);
let shouldInvalidate = this.layout.shouldInvalidate(opts.visibleRect, this.visibleRect);
if (shouldInvalidate) {
offsetChanged = !opts.visibleRect.pointEquals(this.visibleRect);
sizeChanged = !opts.visibleRect.sizeEquals(this.visibleRect);
needsLayout = true;
} else needsUpdate = true;
mutableThis.visibleRect = opts.visibleRect;
}
if (opts.invalidationContext !== this._invalidationContext) {
if (opts.invalidationContext) {
sizeChanged || (sizeChanged = opts.invalidationContext.sizeChanged || false);
offsetChanged || (offsetChanged = opts.invalidationContext.offsetChanged || false);
itemSizeChanged || (itemSizeChanged = opts.invalidationContext.itemSizeChanged || false);
layoutOptionsChanged || (layoutOptionsChanged = opts.invalidationContext.layoutOptions != null && this._invalidationContext.layoutOptions != null && opts.invalidationContext.layoutOptions !== this._invalidationContext.layoutOptions && this.layout.shouldInvalidateLayoutOptions(opts.invalidationContext.layoutOptions, this._invalidationContext.layoutOptions));
needsLayout || (needsLayout = itemSizeChanged || sizeChanged || offsetChanged || layoutOptionsChanged);
}
this._invalidationContext = opts.invalidationContext;
}
if (opts.isScrolling !== this._isScrolling) {
this._isScrolling = opts.isScrolling;
if (!opts.isScrolling) // Update to fix the DOM order after scrolling.
needsUpdate = true;
}
if (needsLayout) this.relayout({
offsetChanged: offsetChanged,
sizeChanged: sizeChanged,
itemSizeChanged: itemSizeChanged,
layoutOptionsChanged: layoutOptionsChanged,
layoutOptions: this._invalidationContext.layoutOptions
});
else if (needsUpdate) this.updateSubviews();
return Array.from(this._rootView.children);
}
getVisibleView(key) {
return this._visibleViews.get(key);
}
invalidate(context) {
this.delegate.invalidate(context);
}
updateItemSize(key, size) {
if (!this.layout.updateItemSize) return;
let changed = this.layout.updateItemSize(key, size);
if (changed) this.invalidate({
itemSizeChanged: true
});
}
constructor(options){
this.delegate = options.delegate;
this.collection = options.collection;
this.layout = options.layout;
this.contentSize = new (0, $ee1bfa90a957fb8a$export$cb6da89c6af1a8ec);
this.visibleRect = new (0, $60423f92c7f9ad87$export$c79fc6492f3af13d);
this.persistedKeys = new Set();
this._visibleViews = new Map();
this._renderedContent = new WeakMap();
this._rootView = new (0, $ad1d98aa8f0c31b4$export$e21886a4eef6b29a)(this);
this._isScrolling = false;
this._invalidationContext = {};
this._overscanManager = new (0, $364191b3decf3697$export$4455ee6afb38dcbb)();
}
}
export {$38b9490c1cca8fc4$export$89be5a243e59c4b2 as Virtualizer};
//# sourceMappingURL=Virtualizer.module.js.map
@@ -0,0 +1,41 @@
/**
* Like `Array#splice`, but smarter for giant arrays.
*
* `Array#splice` takes all items to be inserted as individual argument which
* causes a stack overflow in V8 when trying to insert 100k items for instance.
*
* Otherwise, this does not return the removed items, and takes `items` as an
* array instead of rest parameters.
*
* @template {unknown} T
* Item type.
* @param {Array<T>} list
* List to operate on.
* @param {number} start
* Index to remove/insert at (can be negative).
* @param {number} remove
* Number of items to remove.
* @param {Array<T>} items
* Items to inject into `list`.
* @returns {undefined}
* Nothing.
*/
export function splice<T extends unknown>(list: Array<T>, start: number, remove: number, items: Array<T>): undefined;
/**
* Append `items` (an array) at the end of `list` (another array).
* When `list` was empty, returns `items` instead.
*
* This prevents a potentially expensive operation when `list` is empty,
* and adds items in batches to prevent V8 from hanging.
*
* @template {unknown} T
* Item type.
* @param {Array<T>} list
* List to operate on.
* @param {Array<T>} items
* Items to add to `list`.
* @returns {Array<T>}
* Either `list` or `items`.
*/
export function push<T extends unknown>(list: Array<T>, items: Array<T>): Array<T>;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,28 @@
import { ILinkProvider, ILinkProviderService } from 'browser/services/Services';
import { Disposable, toDisposable } from 'common/Lifecycle';
import { IDisposable } from 'common/Types';
export class LinkProviderService extends Disposable implements ILinkProviderService {
declare public serviceBrand: undefined;
public readonly linkProviders: ILinkProvider[] = [];
constructor() {
super();
this.register(toDisposable(() => this.linkProviders.length = 0));
}
public registerLinkProvider(linkProvider: ILinkProvider): IDisposable {
this.linkProviders.push(linkProvider);
return {
dispose: () => {
// Remove the link provider from the list
const providerIndex = this.linkProviders.indexOf(linkProvider);
if (providerIndex !== -1) {
this.linkProviders.splice(providerIndex, 1);
}
}
};
}
}
@@ -0,0 +1 @@
{"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../src/helpers/logging.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,CAGvF"}
@@ -0,0 +1 @@
{"name":"stream-combiner","version":"0.2.2","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532120368,"integrity":"sha512-dmX5Nb438U1dUuNoNr2q5kP5b7M5iSq8w1sJA0nTR22d+bo8/H5gO10hTbrl1aGVHxp7FJd/jzPV23rsrYa/+w==","mode":420,"size":555},".npmignore":{"checkedAt":1794532120368,"integrity":"sha512-/lpMCiIUit6tSsyREgOpKZUVzAxlpewZaeft5py+cVKn/2pS76yYxGCheET8nr6mZ2shYcWx/rtQFGOuWhIPdg==","mode":420,"size":42},"README.md":{"checkedAt":1794532120369,"integrity":"sha512-T9GhPMusuy4voo/7s1I/sg5SQTd2qRlRfoYMTeOhKF5veGNJOteABKMZucc49m+sn0k52hca4gbJqbs7iEKLqg==","mode":420,"size":1420},"LICENSE":{"checkedAt":1794532120369,"integrity":"sha512-2T0vT3YyfrH5LpiUvzvhld5AQUVVsDHhWGz3fl6mMj/B1DtZsuIFqHHkzFI2fL5k31HbPAUCcwXvt1ZAiRaofg==","mode":420,"size":1073},"index.js":{"checkedAt":1794532120369,"integrity":"sha512-2hGUbGMdc6wSEd9zdq+LrU1E0QVMu9fxgg/O8aXBA7sDNpQU1AzqfBQ2s2WgSsbKwf5S4APRXhlCObbU8Tfg8A==","mode":420,"size":1023},".travis.yml":{"checkedAt":1794532102141,"integrity":"sha512-0t5W4F7vWvQdQxTh0QkmYgywpQ2smUiVnAG/bd0H+ItXEzMCjzNT3Xm5FSupiMUn97EPr8VRwAnxtL7cC8lK4w==","mode":420,"size":43},"test/index.js":{"checkedAt":1794532120369,"integrity":"sha512-GdZolC7kerdRL73d2abib5Gt2GzbSPxLaxfwsPTboxMi3+pjUrw5+WvCJ54oGlYwhlQhbgWKHUrTTXVIi7OD+w==","mode":420,"size":1335}}}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;AAWM,SAAS,0CAAc,OAAgC,EAAE,GAAyB;IACvF,CAAA,GAAA,yCAAc,EAAE;QACd,IAAI,WAAW,QAAQ,GAAG,IAAI,KAAK;YACjC,QAAQ,GAAG,CAAC,OAAO,GAAG,IAAI,OAAO;YACjC,OAAO;gBACL,IAAI,QAAQ,GAAG,EACb,QAAQ,GAAG,CAAC,OAAO,GAAG;YAE1B;QACF;IACF;AACF","sources":["packages/@react-aria/utils/src/useSyncRef.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 {MutableRefObject} from 'react';\nimport {RefObject} from '@react-types/shared';\nimport {useLayoutEffect} from './';\n\ninterface ContextValue<T> {\n ref?: MutableRefObject<T | null>\n}\n\n// Syncs ref from context with ref passed to hook\nexport function useSyncRef<T>(context?: ContextValue<T> | null, ref?: RefObject<T | null>) {\n useLayoutEffect(() => {\n if (context && context.ref && ref) {\n context.ref.current = ref.current;\n return () => {\n if (context.ref) {\n context.ref.current = null;\n }\n };\n }\n });\n}\n"],"names":[],"version":3,"file":"useSyncRef.main.js.map"}
@@ -0,0 +1,126 @@
// Copyright 2009 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.
//
// Convience routines to make Brotli I/O classes from some memory containers and
// files.
#include "./streams.h"
#include <assert.h>
#include <string.h>
namespace brotli {
BrotliMemOut::BrotliMemOut(void* buf, int len)
: buf_(buf),
len_(len),
pos_(0) {}
void BrotliMemOut::Reset(void* buf, int len) {
buf_ = buf;
len_ = len;
pos_ = 0;
}
// Brotli output routine: copy n bytes to the output buffer.
bool BrotliMemOut::Write(const void *buf, size_t n) {
if (n + pos_ > len_)
return false;
char* p = reinterpret_cast<char*>(buf_) + pos_;
memcpy(p, buf, n);
pos_ += n;
return true;
}
BrotliStringOut::BrotliStringOut(std::string* buf, int max_size)
: buf_(buf),
max_size_(max_size) {
assert(buf->empty());
}
void BrotliStringOut::Reset(std::string* buf, int max_size) {
buf_ = buf;
max_size_ = max_size;
}
// Brotli output routine: add n bytes to a string.
bool BrotliStringOut::Write(const void *buf, size_t n) {
if (buf_->size() + n > max_size_)
return false;
buf_->append(static_cast<const char*>(buf), n);
return true;
}
BrotliMemIn::BrotliMemIn(const void* buf, int len)
: buf_(buf),
len_(len),
pos_(0) {}
void BrotliMemIn::Reset(const void* buf, int len) {
buf_ = buf;
len_ = len;
pos_ = 0;
}
// Brotli input routine: read the next chunk of memory.
const void* BrotliMemIn::Read(size_t n, size_t* output) {
if (pos_ == len_) {
return NULL;
}
if (n > len_ - pos_)
n = len_ - pos_;
const char* p = reinterpret_cast<const char*>(buf_) + pos_;
pos_ += n;
*output = n;
return p;
}
BrotliFileIn::BrotliFileIn(FILE* f, size_t max_read_size)
: f_(f),
buf_(malloc(max_read_size)),
buf_size_(max_read_size) {}
BrotliFileIn::~BrotliFileIn() {
if (buf_) free(buf_);
}
const void* BrotliFileIn::Read(size_t n, size_t* bytes_read) {
if (buf_ == NULL) {
*bytes_read = 0;
return NULL;
}
if (n > buf_size_) {
n = buf_size_;
} else if (n == 0) {
return feof(f_) ? NULL : buf_;
}
*bytes_read = fread(buf_, 1, n, f_);
if (*bytes_read == 0) {
return NULL;
} else {
return buf_;
}
}
BrotliFileOut::BrotliFileOut(FILE* f) : f_(f) {}
bool BrotliFileOut::Write(const void* buf, size_t n) {
if (fwrite(buf, n, 1, f_) != 1) {
return false;
}
return true;
}
} // namespace brotli
@@ -0,0 +1,154 @@
import {buildOptions,registerCommonValueParsers} from './ParserOptionsBuilder.js';
export default class OutputBuilder{
constructor(builderOptions){
this.options = buildOptions(builderOptions);
this.registeredParsers = registerCommonValueParsers(this.options);
}
registerValueParser(name,parserInstance){//existing name will override the parser without warning
this.registeredParsers[name] = parserInstance;
}
getInstance(parserOptions){
return new JsObjBuilder(parserOptions, this.options, this.registeredParsers);
}
}
import BaseOutputBuilder from './BaseOutputBuilder.js';
const rootName = '^';
class JsObjBuilder extends BaseOutputBuilder{
constructor(parserOptions, builderOptions,registeredParsers) {
super();
//hold the raw detail of a tag and sequence with reference to the output
this.tagsStack = [];
this.parserOptions = parserOptions;
this.options = builderOptions;
this.registeredParsers = registeredParsers;
this.root = {};
this.parent = this.root;
this.tagName = rootName;
this.value = {};
this.textValue = "";
this.attributes = {};
}
addTag(tag){
let value = "";
if( !isEmpty(this.attributes)){
value = {};
if(this.options.attributes.groupBy){
value[this.options.attributes.groupBy] = this.attributes;
}else{
value = this.attributes;
}
}
this.tagsStack.push([this.tagName, this.textValue, this.value]); //parent tag, parent text value, parent tag value (jsobj)
this.tagName = tag.name;
this.value = value;
this.textValue = "";
this.attributes = {};
}
/**
* Check if the node should be added by checking user's preference
* @param {Node} node
* @returns boolean: true if the node should not be added
*/
closeTag(){
const tagName = this.tagName;
let value = this.value;
let textValue = this.textValue;
//update tag text value
if(typeof value !== "object" && !Array.isArray(value)){
value = this.parseValue(textValue.trim(), this.options.tags.valueParsers);
}else if(textValue.length > 0){
value[this.options.nameFor.text] = this.parseValue(textValue.trim(), this.options.tags.valueParsers);
}
let resultTag= {
tagName: tagName,
value: value
};
if(this.options.onTagClose !== undefined){
//TODO TagPathMatcher
resultTag = this.options.onClose(tagName, value, this.textValue, new TagPathMatcher(this.tagsStack,node));
if(!resultTag) return;
}
//set parent node in scope
let arr = this.tagsStack.pop();
let parentTag = arr[2];
parentTag=this._addChildTo(resultTag.tagName, resultTag.value, parentTag);
this.tagName = arr[0];
this.textValue = arr[1];
this.value = parentTag;
}
_addChild(key, val){
if(typeof this.value === "string"){
this.value = { [this.options.nameFor.text] : this.value };
}
this._addChildTo(key, val, this.value);
// this.currentNode.leafType = false;
this.attributes = {};
}
_addChildTo(key, val, node){
if(typeof node === 'string') node = {};
if(!node[key]){
node[key] = val;
}else{ //Repeated
if(!Array.isArray(node[key])){ //but not stored as array
node[key] = [node[key]];
}
node[key].push(val);
}
return node;
}
/**
* Add text value child node
* @param {string} text
*/
addValue(text){
//TODO: use bytes join
if(this.textValue.length > 0) this.textValue += " " + text;
else this.textValue = text;
}
addPi(name){
let value = "";
if( !isEmpty(this.attributes)){
value = {};
if(this.options.attributes.groupBy){
value[this.options.attributes.groupBy] = this.attributes;
}else{
value = this.attributes;
}
}
this._addChild(name, value);
}
getOutput(){
return this.value;
}
}
function isEmpty(obj) {
return Object.keys(obj).length === 0;
}
@@ -0,0 +1,8 @@
var $ac91fc9fe02f71f6$exports = {};
$ac91fc9fe02f71f6$exports = {
"dismiss": `\u{9589}\u{3058}\u{308B}`
};
export {$ac91fc9fe02f71f6$exports as default};
//# sourceMappingURL=ja-JP.module.js.map
@@ -0,0 +1,8 @@
repos:
- repo: https://github.com/cpplint/cpplint
rev: 2.0.0
hooks:
- id: cpplint
args:
- --filter=-whitespace/indent_namespace,-whitespace/parens
- --linelength=88
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = compound2simple;
/**
* @file 复合字形设置轮廓,转化为简单字形
* @author mengke01(kekee000@gmail.com)
*/
/**
* 复合字形转简单字形
*
* @param {Object} glyf glyf对象
* @param {Array} contours 轮廓数组
* @return {Object} 转换后对象
*/
function compound2simple(glyf, contours) {
glyf.contours = contours;
delete glyf.compound;
delete glyf.glyfs;
// 这里hinting信息会失效,删除hinting信息
delete glyf.instructions;
return glyf;
}
@@ -0,0 +1 @@
module.exports={C:{"115":0.27172,"128":0.04383,"140":0.07012,"142":0.0263,"143":4.81199,"144":2.42791,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 125 126 127 129 130 131 132 133 134 135 136 137 138 139 141 145 146 147 3.5 3.6"},D:{"87":0.0263,"88":0.04383,"103":0.15777,"109":0.14024,"114":0.07012,"116":0.11395,"122":1.11316,"138":1.34105,"139":0.45578,"140":13.76105,"141":25.13802,"142":0.0263,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 83 84 85 86 89 90 91 92 93 94 95 96 97 98 99 100 101 102 104 105 106 107 108 110 111 112 113 115 117 118 119 120 121 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 143 144 145"},F:{"120":0.0263,"122":0.0263,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.14024,"109":0.08765,"136":0.0263,"140":4.62792,"141":27.82011,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 137 138 139 142"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 14.1 15.1 15.2-15.3 15.4 16.0 16.1 16.2 16.3 16.4 16.5 16.6 17.0 17.2 17.3 17.4 17.5 18.0 18.1 18.2 18.3 26.1 26.2","13.1":0.0263,"15.5":0.0263,"15.6":0.04383,"17.1":0.0263,"17.6":0.15777,"18.4":0.95539,"18.5-18.6":0.0263,"26.0":0.14024},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00027,"5.0-5.1":0,"6.0-6.1":0.00109,"7.0-7.1":0.00082,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00246,"10.0-10.2":0.00027,"10.3":0.00464,"11.0-11.2":0.06881,"11.3-11.4":0.00164,"12.0-12.1":0.00055,"12.2-12.5":0.01338,"13.0-13.1":0,"13.2":0.00137,"13.3":0.00055,"13.4-13.7":0.00218,"14.0-14.4":0.00464,"14.5-14.8":0.00492,"15.0-15.1":0.00464,"15.2-15.3":0.00355,"15.4":0.0041,"15.5":0.00464,"15.6-15.8":0.06062,"16.0":0.00819,"16.1":0.01529,"16.2":0.00792,"16.3":0.0142,"16.4":0.00355,"16.5":0.00628,"16.6-16.7":0.0811,"17.0":0.00573,"17.1":0.00874,"17.2":0.00628,"17.3":0.00928,"17.4":0.01638,"17.5":0.02813,"17.6-17.7":0.071,"18.0":0.01611,"18.1":0.03331,"18.2":0.01802,"18.3":0.05789,"18.4":0.02976,"18.5-18.6":1.51766,"26.0":0.18759,"26.1":0.00683},P:{"28":0.42879,"29":0.02199,_:"4 20 21 22 23 24 25 26 27 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":0,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.04383,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.0247},Q:{_:"14.9"},O:{_:"0"},H:{"0":0},L:{"0":9.3212}};
@@ -0,0 +1,2 @@
import "./use-isomorphic-layout-effect.cjs.js";
export { _default as default } from "./use-isomorphic-layout-effect.cjs.default.js";
@@ -0,0 +1,37 @@
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.eq(object, object);
* // => true
*
* _.eq(object, other);
* // => false
*
* _.eq('a', 'a');
* // => true
*
* _.eq('a', Object('a'));
* // => false
*
* _.eq(NaN, NaN);
* // => true
*/
function eq(value, other) {
return value === other || (value !== value && other !== other);
}
export default eq;
@@ -0,0 +1 @@
exports._default = require("./react-textarea-autosize.development.edge-light.cjs.js").default;
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('pullAt', require('../pullAt'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
{"name":"promise-inflight","version":"1.0.1","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532121560,"integrity":"sha512-m0Vtg/1xJ2v4ZeJJlbWQZc3zGNfPPbweaLRNPgnTHzvYPSoT/YsrPJNvDjJutUFXJ9prZG9envBbAjIzhr9UlQ==","mode":420,"size":669},"README.md":{"checkedAt":1794532121561,"integrity":"sha512-GmIVls9gTDrx5uNibN6WMRIPx7W4zrQprg6YrBZMeFRdFjo3yJ3r6QPxU56po/IhaT1OUebnNgIKf6ulV4KyKw==","mode":420,"size":782},"LICENSE":{"checkedAt":1794532121561,"integrity":"sha512-ATq3zPYWUIOCNzQC+reqyqBdTS722S3FuzjVuiJwECKS66PIbjKOQqOHdz1yfgcjIsSOaTTgTaIZr0bYilJZaw==","mode":420,"size":752},"inflight.js":{"checkedAt":1794532121561,"integrity":"sha512-bIYBAxkQL+2efLPTTi+ief7Yj5HniKnTvuTNa0iRZlOJEzKlhEfqmQMXDqOpTK8SMzB+W/dlpSTcKd3k22tzVQ==","mode":420,"size":842}}}
@@ -0,0 +1,14 @@
import { FriendV2, Group, GroupFileInfoUpdateParamType, GroupMember, SelfInfo, NTSex } from '../../napcat-core';
import { OB11Group, OB11GroupFile, OB11GroupFileFolder, OB11GroupMember, OB11GroupMemberRole, OB11User, OB11UserSex } from '../types';
export declare class OB11Construct {
static selfInfo(selfInfo: SelfInfo): OB11User;
static friends(friends: FriendV2[]): OB11User[];
static friend(friends: FriendV2): OB11User;
static groupMemberRole(role: number): OB11GroupMemberRole | undefined;
static sex(sex?: NTSex): OB11UserSex;
static groupMember(group_id: string, member: GroupMember): OB11GroupMember;
static group(group: Group): OB11Group;
static groups(groups: Group[]): OB11Group[];
static file(peerId: string, file: Exclude<GroupFileInfoUpdateParamType['item'][0]['fileInfo'], undefined>): OB11GroupFile;
static folder(peerId: string, folder: Exclude<GroupFileInfoUpdateParamType['item'][0]['folderInfo'], undefined>): OB11GroupFileFolder;
}
@@ -0,0 +1,225 @@
/*
* 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.
*/
// Portions of the code in this file are based on code from ICU.
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
import {AnyCalendarDate, Calendar} from '../types';
import {CalendarDate} from '../CalendarDate';
const CIVIL_EPOC = 1948440; // CE 622 July 16 Friday (Julian calendar) / CE 622 July 19 (Gregorian calendar)
const ASTRONOMICAL_EPOC = 1948439; // CE 622 July 15 Thursday (Julian calendar)
const UMALQURA_YEAR_START = 1300;
const UMALQURA_YEAR_END = 1600;
const UMALQURA_START_DAYS = 460322;
function islamicToJulianDay(epoch: number, year: number, month: number, day: number): number {
return day +
Math.ceil(29.5 * (month - 1)) +
(year - 1) * 354 +
Math.floor((3 + 11 * year) / 30) +
epoch - 1;
}
function julianDayToIslamic(calendar: Calendar, epoch: number, jd: number) {
let year = Math.floor((30 * (jd - epoch) + 10646) / 10631);
let month = Math.min(12, Math.ceil((jd - (29 + islamicToJulianDay(epoch, year, 1, 1))) / 29.5) + 1);
let day = jd - islamicToJulianDay(epoch, year, month, 1) + 1;
return new CalendarDate(calendar, year, month, day);
}
function isLeapYear(year: number): boolean {
return (14 + 11 * year) % 30 < 11;
}
/**
* The Islamic calendar, also known as the "Hijri" calendar, is used throughout much of the Arab world.
* The civil variant uses simple arithmetic rules rather than astronomical calculations to approximate
* the traditional calendar, which is based on sighting of the crescent moon. It uses Friday, July 16 622 CE (Julian) as the epoch.
* Each year has 12 months, with either 354 or 355 days depending on whether it is a leap year.
* Learn more about the available Islamic calendars [here](https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types).
*/
export class IslamicCivilCalendar implements Calendar {
identifier = 'islamic-civil';
fromJulianDay(jd: number): CalendarDate {
return julianDayToIslamic(this, CIVIL_EPOC, jd);
}
toJulianDay(date: AnyCalendarDate) {
return islamicToJulianDay(CIVIL_EPOC, date.year, date.month, date.day);
}
getDaysInMonth(date: AnyCalendarDate): number {
let length = 29 + date.month % 2;
if (date.month === 12 && isLeapYear(date.year)) {
length++;
}
return length;
}
getMonthsInYear(): number {
return 12;
}
getDaysInYear(date: AnyCalendarDate): number {
return isLeapYear(date.year) ? 355 : 354;
}
getYearsInEra(): number {
// 9999 gregorian
return 9665;
}
getEras() {
return ['AH'];
}
}
/**
* The Islamic calendar, also known as the "Hijri" calendar, is used throughout much of the Arab world.
* The tabular variant uses simple arithmetic rules rather than astronomical calculations to approximate
* the traditional calendar, which is based on sighting of the crescent moon. It uses Thursday, July 15 622 CE (Julian) as the epoch.
* Each year has 12 months, with either 354 or 355 days depending on whether it is a leap year.
* Learn more about the available Islamic calendars [here](https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types).
*/
export class IslamicTabularCalendar extends IslamicCivilCalendar {
identifier = 'islamic-tbla';
fromJulianDay(jd: number): CalendarDate {
return julianDayToIslamic(this, ASTRONOMICAL_EPOC, jd);
}
toJulianDay(date: AnyCalendarDate) {
return islamicToJulianDay(ASTRONOMICAL_EPOC, date.year, date.month, date.day);
}
}
// Generated by scripts/generate-umalqura.js
const UMALQURA_DATA = 'qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=';
let UMALQURA_MONTHLENGTH: Uint16Array;
let UMALQURA_YEAR_START_TABLE: Uint32Array;
function umalquraYearStart(year: number): number {
return UMALQURA_START_DAYS + UMALQURA_YEAR_START_TABLE[year - UMALQURA_YEAR_START];
}
function umalquraMonthLength(year: number, month: number): number {
let idx = (year - UMALQURA_YEAR_START);
let mask = (0x01 << (11 - (month - 1)));
if ((UMALQURA_MONTHLENGTH[idx] & mask) === 0) {
return 29;
} else {
return 30;
}
}
function umalquraMonthStart(year: number, month: number): number {
let day = umalquraYearStart(year);
for (let i = 1; i < month; i++) {
day += umalquraMonthLength(year, i);
}
return day;
}
function umalquraYearLength(year: number): number {
return UMALQURA_YEAR_START_TABLE[year + 1 - UMALQURA_YEAR_START] - UMALQURA_YEAR_START_TABLE[year - UMALQURA_YEAR_START];
}
/**
* The Islamic calendar, also known as the "Hijri" calendar, is used throughout much of the Arab world.
* The Umalqura variant is primarily used in Saudi Arabia. It is a lunar calendar, based on astronomical
* calculations that predict the sighting of a crescent moon. Month and year lengths vary between years
* depending on these calculations.
* Learn more about the available Islamic calendars [here](https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types).
*/
export class IslamicUmalquraCalendar extends IslamicCivilCalendar {
identifier = 'islamic-umalqura';
constructor() {
super();
if (!UMALQURA_MONTHLENGTH) {
UMALQURA_MONTHLENGTH = new Uint16Array(Uint8Array.from(atob(UMALQURA_DATA), c => c.charCodeAt(0)).buffer);
}
if (!UMALQURA_YEAR_START_TABLE) {
UMALQURA_YEAR_START_TABLE = new Uint32Array(UMALQURA_YEAR_END - UMALQURA_YEAR_START + 1);
let yearStart = 0;
for (let year = UMALQURA_YEAR_START; year <= UMALQURA_YEAR_END; year++) {
UMALQURA_YEAR_START_TABLE[year - UMALQURA_YEAR_START] = yearStart;
for (let i = 1; i <= 12; i++) {
yearStart += umalquraMonthLength(year, i);
}
}
}
}
fromJulianDay(jd: number): CalendarDate {
let days = jd - CIVIL_EPOC;
let startDays = umalquraYearStart(UMALQURA_YEAR_START);
let endDays = umalquraYearStart(UMALQURA_YEAR_END);
if (days < startDays || days > endDays) {
return super.fromJulianDay(jd);
} else {
let y = UMALQURA_YEAR_START - 1;
let m = 1;
let d = 1;
while (d > 0) {
y++;
d = days - umalquraYearStart(y) + 1;
let yearLength = umalquraYearLength(y);
if (d === yearLength) {
m = 12;
break;
} else if (d < yearLength) {
let monthLength = umalquraMonthLength(y, m);
m = 1;
while (d > monthLength) {
d -= monthLength;
m++;
monthLength = umalquraMonthLength(y, m);
}
break;
}
}
return new CalendarDate(this, y, m, (days - umalquraMonthStart(y, m) + 1));
}
}
toJulianDay(date: AnyCalendarDate): number {
if (date.year < UMALQURA_YEAR_START || date.year > UMALQURA_YEAR_END) {
return super.toJulianDay(date);
}
return CIVIL_EPOC + umalquraMonthStart(date.year, date.month) + (date.day - 1);
}
getDaysInMonth(date: AnyCalendarDate): number {
if (date.year < UMALQURA_YEAR_START || date.year > UMALQURA_YEAR_END) {
return super.getDaysInMonth(date);
}
return umalquraMonthLength(date.year, date.month);
}
getDaysInYear(date: AnyCalendarDate): number {
if (date.year < UMALQURA_YEAR_START || date.year > UMALQURA_YEAR_END) {
return super.getDaysInYear(date);
}
return umalquraYearLength(date.year);
}
}
@@ -0,0 +1,37 @@
{
"name": "tslib",
"author": "Microsoft Corp.",
"homepage": "https://www.typescriptlang.org/",
"version": "1.14.1",
"license": "0BSD",
"description": "Runtime library for TypeScript helper functions",
"keywords": [
"TypeScript",
"Microsoft",
"compiler",
"language",
"javascript",
"tslib",
"runtime"
],
"bugs": {
"url": "https://github.com/Microsoft/TypeScript/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/tslib.git"
},
"main": "tslib.js",
"module": "tslib.es6.js",
"jsnext:main": "tslib.es6.js",
"typings": "tslib.d.ts",
"sideEffects": false,
"exports": {
".": {
"module": "./tslib.es6.js",
"import": "./modules/index.js",
"default": "./tslib.js"
},
"./": "./"
}
}
@@ -0,0 +1,45 @@
'use strict';
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var ToIndex = require('./ToIndex');
var isTypedArray = require('is-typed-array');
var typedArrayByteOffset = require('typed-array-byte-offset');
var typedArrayLength = require('typed-array-length');
var whichTypedArray = require('which-typed-array');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/12.0/#sec-validateatomicaccess
module.exports = function ValidateAtomicAccess(typedArray, requestIndex) {
if (!isTypedArray(typedArray)) {
throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); // step 1
}
var length = typedArrayLength(typedArray); // step 2
var accessIndex = ToIndex(requestIndex); // step 3
/*
// this assertion can never be reached
if (!(accessIndex >= 0)) {
throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4
}
*/
if (accessIndex >= length) {
throw new $RangeError('index out of range'); // step 5
}
var arrayTypeName = whichTypedArray(typedArray); // step 6
var taType = tableTAO.name['$' + arrayTypeName];
var elementSize = tableTAO.size['$' + taType]; // step 7
var offset = typedArrayByteOffset(typedArray); // step 8
return (accessIndex * elementSize) + offset; // step 9
};
@@ -0,0 +1,27 @@
import * as _heroui_system from '@heroui/system';
import { GridNode } from '@react-types/grid';
import { TableRowProps as TableRowProps$1 } from './base/table-row.mjs';
import { ValuesType } from './use-table.mjs';
import '@react-types/table';
import 'react';
import '@heroui/theme';
import '@react-stately/virtualizer';
import '@react-types/shared';
import '@react-stately/table';
import '@react-aria/table';
import '@heroui/react-utils';
import '@heroui/checkbox';
interface TableRowProps<T = object> extends Omit<TableRowProps$1, "children"> {
/**
* The table row.
*/
node: GridNode<T>;
slots: ValuesType["slots"];
state: ValuesType["state"];
isSelectable?: ValuesType["isSelectable"];
classNames?: ValuesType["classNames"];
}
declare const TableRow: _heroui_system.InternalForwardRefRenderFunction<"tr", TableRowProps<object>, never>;
export { type TableRowProps, TableRow as default };
@@ -0,0 +1,237 @@
# tsconfck
[![npm version](https://img.shields.io/npm/v/tsconfck)](https://www.npmjs.com/package/tsconfck)
[![CI](https://github.com/dominikg/tsconfck/actions/workflows/test.yml/badge.svg)](https://github.com/dominikg/tsconfck/actions/workflows/test.yml)
A utility to find and parse tsconfig files without depending on typescript
# Why
Because no simple official api exists and tsconfig isn't actual json.
# Features
- [x] find closest tsconfig (tsconfig.json or jsconfig.json)
- [x] convert tsconfig to actual json and parse it
- [x] resolve "extends"
- [x] resolve "references" of solution-style tsconfig
- [x] optional caching for improved performance
- [x] optional findNative and parseNative to use official typescript api
- [x] zero dependencies (typescript optional)
- [x] extensive testsuite
- [x] completely async and optimized (it's [fast](https://github.com/dominikg/tsconfck/blob/main/docs/benchmark.md))
- [x] tiny [4.8KB gzip](https://pkg-size.dev/tsconfck)
- [x] unbundled esm js, no sourcemaps needed
- [x] [types](https://github.com/dominikg/tsconfck/blob/main/packages/tsconfck/types/index.d.ts) generated with [dts-buddy](https://github.com/Rich-Harris/dts-buddy)
# Users
Used by [vite](https://github.com/vitejs/vite)\*, [vite-tsconfig-paths](https://github.com/aleclarson/vite-tsconfig-paths), [astro](https://github.com/withastro/astro) and [many more](https://github.com/dominikg/tsconfck/network/dependents)
> (\*) vite bundles tsconfck so it is listed as a devDependency
# Install
```shell
npm install --save-dev tsconfck # or pnpm, yarn
```
# Usage
## without typescript installed
```js
import { parse } from 'tsconfck';
const {
tsconfigFile, // full path to found tsconfig
tsconfig, // tsconfig object including merged values from extended configs
extended, // separate unmerged results of all tsconfig files that contributed to tsconfig
solution, // solution result if tsconfig is part of a solution
referenced // referenced tsconfig results if tsconfig is a solution
} = await parse('foo/bar.ts');
```
## with typescript
```js
import { parseNative } from 'tsconfck';
const {
tsconfigFile, // full path to found tsconfig
tsconfig, // tsconfig object including merged values from extended configs, normalized
result, // output of ts.parseJsonConfigFileContent
solution, // solution result if tsconfig is part of a solution
referenced // referenced tsconfig results if tsconfig is a solution
} = await parseNative('foo/bar.ts');
```
## API
see [API-DOCS](docs/api.md)
## Advanced
### ignoring tsconfig for files inside node_modules
esbuild ignores node_modules so when you want to use tsconfck with esbuild, you can set `ignoreNodeModules: true`
```js
import { find, parse } from 'tsconfck';
// returns some-lib/tsconfig.json
const fooTSConfig = await find('node_modules/some-lib/src/foo.ts');
// returns null
const fooTSConfigIgnored = await find('node_modules/some-lib/src/foo.ts', {
ignoreNodeModules: true
});
// returns empty config
const { tsconfig } = await parse('node_modules/some-lib/src/foo.ts', { ignoreNodeModules: true });
```
### caching
a TSConfckCache instance can be created and passed to find and parse functions to reduce overhead when they are called often within the same project
```js
import { find, parse, TSCOnfckCache } from 'tsconfck';
// 1. create cache instance
const cache = new TSCOnfckCache();
// 2. pass cache instance in options
const fooTSConfig = await find(('src/foo.ts', { cache })); // stores tsconfig for src in cache
const barTSConfig = await find(('src/bar.ts', { cache })); // reuses tsconfig result for src without fs call
const fooResult = await parse('src/foo.ts', { cache }); // uses cached path for tsconfig, stores parse result in cache
const barResult = await parse('src/bar.ts', { cache }); // uses cached parse result without fs call or resolving
```
#### cache invalidation
You are responsible for clearing the cache if tsconfig files are added/removed/changed after reading them during the cache lifetime.
Call `cache.clear()` and also discard all previous compilation results based previously cached configs.
#### cache mutation
Returned results are direct cache objects. If you want to modify them, deep-clone first.
#### cache reuse
Never use the same cache instance for mixed calls of find/findNative or parse/parseNative as result structures are different
### root
This option can be used to limit finding tsconfig files outside of a root directory
```js
import { parse, TSConfckCache } from 'tsconfck';
const root = '.';
const parseOptions = { root };
// these calls are not going to look for tsconfig files outside root
const fooResult = await find('src/foo.ts', parseOptions);
const barResult = await parse('src/bar.ts', parseOptions);
```
> Using the root option can lead to errors if there is no tsconfig found inside root.
### error handling
find and parse reject for errors they encounter, but return null or empty result if no config was found
If you want them to error instead, test the result and throw
```js
import { parse } from 'tsconfck';
find('some/path/without/tsconfig/foo.ts').then((result) => {
if (result === null) {
throw new Error('not found');
}
return result;
});
parse('some/path/without/tsconfig/foo.ts').then((result) => {
if (result.tsconfigFile === null) {
throw new Error('not found');
}
return result;
});
```
### TSConfig type (optional, requires typescript as devDependency)
```ts
import type { TSConfig } from 'pkg-types';
```
Check out https://github.com/unjs/pkg-types
### cli
A simple cli wrapper is included, you can use it like this
#### find
```shell
# prints /path/to/tsconfig.json on stdout
tsconfck find src/index.ts
```
#### find-all
```shell
# prints all tsconfig.json in dir on stdout
tsconfck find-all src/
```
#### parse
```shell
# print content of ParseResult.tsconfig on stdout
tsconfck parse src/index.ts
# print to file
tsconfck parse src/index.ts > output.json
```
#### parse-result
```shell
# print content of ParseResult on stdout
tsconfck parse-result src/index.ts
# print to file
tsconfck parse-result src/index.ts > output.json
```
#### help
```shell
# print usage
tsconfck -h # or --help, -?, help
```
# Links
- [changelog](CHANGELOG.md)
# Develop
This repo uses
- [pnpm](https://pnpm.io)
- [changesets](https://github.com/changesets/changesets)
In every PR you have to add a changeset by running `pnpm changeset` and following the prompts
PRs are going to be squash-merged
```shell
# install dependencies
pnpm install
# run tests
pnpm test
#run tests in watch mode (doesn't require dev in parallel)
pnpm test:watch
```
# License
[MIT](./LICENSE)
@@ -0,0 +1,19 @@
export { default as Modal, ModalProps } from './modal.js';
export { default as ModalContent, ModalContentProps } from './modal-content.js';
export { default as ModalHeader, ModalHeaderProps } from './modal-header.js';
export { default as ModalBody, ModalBodyProps } from './modal-body.js';
export { default as ModalFooter, ModalFooterProps } from './modal-footer.js';
export { UseDisclosureProps, useDisclosure } from '@heroui/use-disclosure';
export { useModal } from './use-modal.js';
export { useDraggable } from '@heroui/use-draggable';
export { ModalProvider, useModalContext } from './modal-context.js';
import '@heroui/system';
import 'react';
import 'react/jsx-runtime';
import '@react-aria/dialog';
import '@heroui/react-utils';
import 'tailwind-variants';
import '@heroui/theme';
import 'framer-motion';
import '@react-aria/overlays';
import '@react-stately/overlays';
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _iterableToArray;
function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
return Array.from(iter);
}
}
//# sourceMappingURL=iterableToArray.js.map
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=Binding.js.map
@@ -0,0 +1 @@
{"name":"@types/resolve","version":"1.20.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532090102,"integrity":"sha512-HQaIQk9pwOcyKutyDk4o2a87WnotwYuLGYFW43emGm4FvIJFKPyg+OYaw5sTegKAKf+C5SKa1ACjzCLivbaHrQ==","mode":511,"size":1141},"README.md":{"checkedAt":1794532090102,"integrity":"sha512-uQaU37JuV47206xlgkwd4XtM1dC+9tMRci+Y+8POEiFv1eFY1SVeZevI3ACc/V4jfHpDt1Mny8dl3M6FpCBmDw==","mode":511,"size":586},"index.d.ts":{"checkedAt":1794532090103,"integrity":"sha512-UNic+GcqUWe5IK+NQpumVEs7fBva15VZpme2Jdbkt8M9Oe0ryKnwnNj+A/k3asDGdumf5KCkKUm9wX/hacTrpQ==","mode":511,"size":7078},"package.json":{"checkedAt":1794532090103,"integrity":"sha512-P10dmYYfUjL9birc4gMtjI6ME8BrfuZO5NbgnQkkg3k69UGgH8hzxX7k88p95mAUkLWiBv/fy/1ntZhD4RyUFQ==","mode":511,"size":1080}}}
@@ -0,0 +1,912 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getClassNameFromSelector: function() {
return getClassNameFromSelector;
},
resolveMatches: function() {
return resolveMatches;
},
generateRules: function() {
return generateRules;
}
});
const _postcss = /*#__PURE__*/ _interop_require_default(require("postcss"));
const _postcssselectorparser = /*#__PURE__*/ _interop_require_default(require("postcss-selector-parser"));
const _parseObjectStyles = /*#__PURE__*/ _interop_require_default(require("../util/parseObjectStyles"));
const _isPlainObject = /*#__PURE__*/ _interop_require_default(require("../util/isPlainObject"));
const _prefixSelector = /*#__PURE__*/ _interop_require_default(require("../util/prefixSelector"));
const _pluginUtils = require("../util/pluginUtils");
const _log = /*#__PURE__*/ _interop_require_default(require("../util/log"));
const _sharedState = /*#__PURE__*/ _interop_require_wildcard(require("./sharedState"));
const _formatVariantSelector = require("../util/formatVariantSelector");
const _nameClass = require("../util/nameClass");
const _dataTypes = require("../util/dataTypes");
const _setupContextUtils = require("./setupContextUtils");
const _isSyntacticallyValidPropertyValue = /*#__PURE__*/ _interop_require_default(require("../util/isSyntacticallyValidPropertyValue"));
const _splitAtTopLevelOnly = require("../util/splitAtTopLevelOnly.js");
const _featureFlags = require("../featureFlags");
const _applyImportantSelector = require("../util/applyImportantSelector");
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _getRequireWildcardCache(nodeInterop) {
if (typeof WeakMap !== "function") return null;
var cacheBabelInterop = new WeakMap();
var cacheNodeInterop = new WeakMap();
return (_getRequireWildcardCache = function(nodeInterop) {
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
})(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
if (!nodeInterop && obj && obj.__esModule) {
return obj;
}
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
return {
default: obj
};
}
var cache = _getRequireWildcardCache(nodeInterop);
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
for(var key in obj){
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
let classNameParser = (0, _postcssselectorparser.default)((selectors)=>{
return selectors.first.filter(({ type })=>type === "class").pop().value;
});
function getClassNameFromSelector(selector) {
return classNameParser.transformSync(selector);
}
// Generate match permutations for a class candidate, like:
// ['ring-offset-blue', '100']
// ['ring-offset', 'blue-100']
// ['ring', 'offset-blue-100']
// Example with dynamic classes:
// ['grid-cols', '[[linename],1fr,auto]']
// ['grid', 'cols-[[linename],1fr,auto]']
function* candidatePermutations(candidate) {
let lastIndex = Infinity;
while(lastIndex >= 0){
let dashIdx;
let wasSlash = false;
if (lastIndex === Infinity && candidate.endsWith("]")) {
let bracketIdx = candidate.indexOf("[");
// If character before `[` isn't a dash or a slash, this isn't a dynamic class
// eg. string[]
if (candidate[bracketIdx - 1] === "-") {
dashIdx = bracketIdx - 1;
} else if (candidate[bracketIdx - 1] === "/") {
dashIdx = bracketIdx - 1;
wasSlash = true;
} else {
dashIdx = -1;
}
} else if (lastIndex === Infinity && candidate.includes("/")) {
dashIdx = candidate.lastIndexOf("/");
wasSlash = true;
} else {
dashIdx = candidate.lastIndexOf("-", lastIndex);
}
if (dashIdx < 0) {
break;
}
let prefix = candidate.slice(0, dashIdx);
let modifier = candidate.slice(wasSlash ? dashIdx : dashIdx + 1);
lastIndex = dashIdx - 1;
// TODO: This feels a bit hacky
if (prefix === "" || modifier === "/") {
continue;
}
yield [
prefix,
modifier
];
}
}
function applyPrefix(matches, context) {
if (matches.length === 0 || context.tailwindConfig.prefix === "") {
return matches;
}
for (let match of matches){
let [meta] = match;
if (meta.options.respectPrefix) {
let container = _postcss.default.root({
nodes: [
match[1].clone()
]
});
let classCandidate = match[1].raws.tailwind.classCandidate;
container.walkRules((r)=>{
// If this is a negative utility with a dash *before* the prefix we
// have to ensure that the generated selector matches the candidate
// Not doing this will cause `-tw-top-1` to generate the class `.tw--top-1`
// The disconnect between candidate <-> class can cause @apply to hard crash.
let shouldPrependNegative = classCandidate.startsWith("-");
r.selector = (0, _prefixSelector.default)(context.tailwindConfig.prefix, r.selector, shouldPrependNegative);
});
match[1] = container.nodes[0];
}
}
return matches;
}
function applyImportant(matches, classCandidate) {
if (matches.length === 0) {
return matches;
}
let result = [];
function isInKeyframes(rule) {
return rule.parent && rule.parent.type === "atrule" && rule.parent.name === "keyframes";
}
for (let [meta, rule] of matches){
let container = _postcss.default.root({
nodes: [
rule.clone()
]
});
container.walkRules((r)=>{
// Declarations inside keyframes cannot be marked as important
// They will be ignored by the browser
if (isInKeyframes(r)) {
return;
}
let ast = (0, _postcssselectorparser.default)().astSync(r.selector);
// Remove extraneous selectors that do not include the base candidate
ast.each((sel)=>(0, _formatVariantSelector.eliminateIrrelevantSelectors)(sel, classCandidate));
// Update all instances of the base candidate to include the important marker
(0, _pluginUtils.updateAllClasses)(ast, (className)=>className === classCandidate ? `!${className}` : className);
let newSelector = ast.toString();
if (newSelector.trim() === "") {
r.remove();
return;
}
r.selector = newSelector;
r.walkDecls((d)=>d.important = true);
});
result.push([
{
...meta,
important: true
},
container.nodes[0]
]);
}
return result;
}
// Takes a list of rule tuples and applies a variant like `hover`, sm`,
// whatever to it. We used to do some extra caching here to avoid generating
// a variant of the same rule more than once, but this was never hit because
// we cache at the entire selector level further up the tree.
//
// Technically you can get a cache hit if you have `hover:focus:text-center`
// and `focus:hover:text-center` in the same project, but it doesn't feel
// worth the complexity for that case.
function applyVariant(variant, matches, context) {
if (matches.length === 0) {
return matches;
}
/** @type {{modifier: string | null, value: string | null}} */ let args = {
modifier: null,
value: _sharedState.NONE
};
// Retrieve "modifier"
{
let [baseVariant, ...modifiers] = (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(variant, "/");
// This is a hack to support variants with `/` in them, like `ar-1/10/20:text-red-500`
// In this case 1/10 is a value but /20 is a modifier
if (modifiers.length > 1) {
baseVariant = baseVariant + "/" + modifiers.slice(0, -1).join("/");
modifiers = modifiers.slice(-1);
}
if (modifiers.length && !context.variantMap.has(variant)) {
variant = baseVariant;
args.modifier = modifiers[0];
if (!(0, _featureFlags.flagEnabled)(context.tailwindConfig, "generalizedModifiers")) {
return [];
}
}
}
// Retrieve "arbitrary value"
if (variant.endsWith("]") && !variant.startsWith("[")) {
// We either have:
// @[200px]
// group-[:hover]
//
// But we don't want:
// @-[200px] (`-` is incorrect)
// group[:hover] (`-` is missing)
let match = /(.)(-?)\[(.*)\]/g.exec(variant);
if (match) {
let [, char, separator, value] = match;
// @-[200px] case
if (char === "@" && separator === "-") return [];
// group[:hover] case
if (char !== "@" && separator === "") return [];
variant = variant.replace(`${separator}[${value}]`, "");
args.value = value;
}
}
// Register arbitrary variants
if (isArbitraryValue(variant) && !context.variantMap.has(variant)) {
let sort = context.offsets.recordVariant(variant);
let selector = (0, _dataTypes.normalize)(variant.slice(1, -1));
let selectors = (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(selector, ",");
// We do not support multiple selectors for arbitrary variants
if (selectors.length > 1) {
return [];
}
if (!selectors.every(_setupContextUtils.isValidVariantFormatString)) {
return [];
}
let records = selectors.map((sel, idx)=>[
context.offsets.applyParallelOffset(sort, idx),
(0, _setupContextUtils.parseVariant)(sel.trim())
]);
context.variantMap.set(variant, records);
}
if (context.variantMap.has(variant)) {
var _context_variantOptions_get;
let isArbitraryVariant = isArbitraryValue(variant);
var _context_variantOptions_get_INTERNAL_FEATURES;
let internalFeatures = (_context_variantOptions_get_INTERNAL_FEATURES = (_context_variantOptions_get = context.variantOptions.get(variant)) === null || _context_variantOptions_get === void 0 ? void 0 : _context_variantOptions_get[_setupContextUtils.INTERNAL_FEATURES]) !== null && _context_variantOptions_get_INTERNAL_FEATURES !== void 0 ? _context_variantOptions_get_INTERNAL_FEATURES : {};
let variantFunctionTuples = context.variantMap.get(variant).slice();
let result = [];
let respectPrefix = (()=>{
if (isArbitraryVariant) return false;
if (internalFeatures.respectPrefix === false) return false;
return true;
})();
for (let [meta, rule] of matches){
// Don't generate variants for user css
if (meta.layer === "user") {
continue;
}
let container = _postcss.default.root({
nodes: [
rule.clone()
]
});
for (let [variantSort, variantFunction, containerFromArray] of variantFunctionTuples){
let clone = (containerFromArray !== null && containerFromArray !== void 0 ? containerFromArray : container).clone();
let collectedFormats = [];
function prepareBackup() {
// Already prepared, chicken out
if (clone.raws.neededBackup) {
return;
}
clone.raws.neededBackup = true;
clone.walkRules((rule)=>rule.raws.originalSelector = rule.selector);
}
function modifySelectors(modifierFunction) {
prepareBackup();
clone.each((rule)=>{
if (rule.type !== "rule") {
return;
}
rule.selectors = rule.selectors.map((selector)=>{
return modifierFunction({
get className () {
return getClassNameFromSelector(selector);
},
selector
});
});
});
return clone;
}
let ruleWithVariant = variantFunction({
// Public API
get container () {
prepareBackup();
return clone;
},
separator: context.tailwindConfig.separator,
modifySelectors,
// Private API for now
wrap (wrapper) {
let nodes = clone.nodes;
clone.removeAll();
wrapper.append(nodes);
clone.append(wrapper);
},
format (selectorFormat) {
collectedFormats.push({
format: selectorFormat,
respectPrefix
});
},
args
});
// It can happen that a list of format strings is returned from within the function. In that
// case, we have to process them as well. We can use the existing `variantSort`.
if (Array.isArray(ruleWithVariant)) {
for (let [idx, variantFunction] of ruleWithVariant.entries()){
// This is a little bit scary since we are pushing to an array of items that we are
// currently looping over. However, you can also think of it like a processing queue
// where you keep handling jobs until everything is done and each job can queue more
// jobs if needed.
variantFunctionTuples.push([
context.offsets.applyParallelOffset(variantSort, idx),
variantFunction,
// If the clone has been modified we have to pass that back
// though so each rule can use the modified container
clone.clone()
]);
}
continue;
}
if (typeof ruleWithVariant === "string") {
collectedFormats.push({
format: ruleWithVariant,
respectPrefix
});
}
if (ruleWithVariant === null) {
continue;
}
// We had to backup selectors, therefore we assume that somebody touched
// `container` or `modifySelectors`. Let's see if they did, so that we
// can restore the selectors, and collect the format strings.
if (clone.raws.neededBackup) {
delete clone.raws.neededBackup;
clone.walkRules((rule)=>{
let before = rule.raws.originalSelector;
if (!before) return;
delete rule.raws.originalSelector;
if (before === rule.selector) return; // No mutation happened
let modified = rule.selector;
// Rebuild the base selector, this is what plugin authors would do
// as well. E.g.: `${variant}${separator}${className}`.
// However, plugin authors probably also prepend or append certain
// classes, pseudos, ids, ...
let rebuiltBase = (0, _postcssselectorparser.default)((selectors)=>{
selectors.walkClasses((classNode)=>{
classNode.value = `${variant}${context.tailwindConfig.separator}${classNode.value}`;
});
}).processSync(before);
// Now that we know the original selector, the new selector, and
// the rebuild part in between, we can replace the part that plugin
// authors need to rebuild with `&`, and eventually store it in the
// collectedFormats. Similar to what `format('...')` would do.
//
// E.g.:
// variant: foo
// selector: .markdown > p
// modified (by plugin): .foo .foo\\:markdown > p
// rebuiltBase (internal): .foo\\:markdown > p
// format: .foo &
collectedFormats.push({
format: modified.replace(rebuiltBase, "&"),
respectPrefix
});
rule.selector = before;
});
}
// This tracks the originating layer for the variant
// For example:
// .sm:underline {} is a variant of something in the utilities layer
// .sm:container {} is a variant of the container component
clone.nodes[0].raws.tailwind = {
...clone.nodes[0].raws.tailwind,
parentLayer: meta.layer
};
var _meta_collectedFormats;
let withOffset = [
{
...meta,
sort: context.offsets.applyVariantOffset(meta.sort, variantSort, Object.assign(args, context.variantOptions.get(variant))),
collectedFormats: ((_meta_collectedFormats = meta.collectedFormats) !== null && _meta_collectedFormats !== void 0 ? _meta_collectedFormats : []).concat(collectedFormats)
},
clone.nodes[0]
];
result.push(withOffset);
}
}
return result;
}
return [];
}
function parseRules(rule, cache, options = {}) {
// PostCSS node
if (!(0, _isPlainObject.default)(rule) && !Array.isArray(rule)) {
return [
[
rule
],
options
];
}
// Tuple
if (Array.isArray(rule)) {
return parseRules(rule[0], cache, rule[1]);
}
// Simple object
if (!cache.has(rule)) {
cache.set(rule, (0, _parseObjectStyles.default)(rule));
}
return [
cache.get(rule),
options
];
}
const IS_VALID_PROPERTY_NAME = /^[a-z_-]/;
function isValidPropName(name) {
return IS_VALID_PROPERTY_NAME.test(name);
}
/**
* @param {string} declaration
* @returns {boolean}
*/ function looksLikeUri(declaration) {
// Quick bailout for obvious non-urls
// This doesn't support schemes that don't use a leading // but that's unlikely to be a problem
if (!declaration.includes("://")) {
return false;
}
try {
const url = new URL(declaration);
return url.scheme !== "" && url.host !== "";
} catch (err) {
// Definitely not a valid url
return false;
}
}
function isParsableNode(node) {
let isParsable = true;
node.walkDecls((decl)=>{
if (!isParsableCssValue(decl.prop, decl.value)) {
isParsable = false;
return false;
}
});
return isParsable;
}
function isParsableCssValue(property, value) {
// We don't want to to treat [https://example.com] as a custom property
// Even though, according to the CSS grammar, it's a totally valid CSS declaration
// So we short-circuit here by checking if the custom property looks like a url
if (looksLikeUri(`${property}:${value}`)) {
return false;
}
try {
_postcss.default.parse(`a{${property}:${value}}`).toResult();
return true;
} catch (err) {
return false;
}
}
function extractArbitraryProperty(classCandidate, context) {
var _classCandidate_match;
let [, property, value] = (_classCandidate_match = classCandidate.match(/^\[([a-zA-Z0-9-_]+):(\S+)\]$/)) !== null && _classCandidate_match !== void 0 ? _classCandidate_match : [];
if (value === undefined) {
return null;
}
if (!isValidPropName(property)) {
return null;
}
if (!(0, _isSyntacticallyValidPropertyValue.default)(value)) {
return null;
}
let normalized = (0, _dataTypes.normalize)(value, {
property
});
if (!isParsableCssValue(property, normalized)) {
return null;
}
let sort = context.offsets.arbitraryProperty(classCandidate);
return [
[
{
sort,
layer: "utilities",
options: {
respectImportant: true
}
},
()=>({
[(0, _nameClass.asClass)(classCandidate)]: {
[property]: normalized
}
})
]
];
}
function* resolveMatchedPlugins(classCandidate, context) {
if (context.candidateRuleMap.has(classCandidate)) {
yield [
context.candidateRuleMap.get(classCandidate),
"DEFAULT"
];
}
yield* function*(arbitraryPropertyRule) {
if (arbitraryPropertyRule !== null) {
yield [
arbitraryPropertyRule,
"DEFAULT"
];
}
}(extractArbitraryProperty(classCandidate, context));
let candidatePrefix = classCandidate;
let negative = false;
const twConfigPrefix = context.tailwindConfig.prefix;
const twConfigPrefixLen = twConfigPrefix.length;
const hasMatchingPrefix = candidatePrefix.startsWith(twConfigPrefix) || candidatePrefix.startsWith(`-${twConfigPrefix}`);
if (candidatePrefix[twConfigPrefixLen] === "-" && hasMatchingPrefix) {
negative = true;
candidatePrefix = twConfigPrefix + candidatePrefix.slice(twConfigPrefixLen + 1);
}
if (negative && context.candidateRuleMap.has(candidatePrefix)) {
yield [
context.candidateRuleMap.get(candidatePrefix),
"-DEFAULT"
];
}
for (let [prefix, modifier] of candidatePermutations(candidatePrefix)){
if (context.candidateRuleMap.has(prefix)) {
yield [
context.candidateRuleMap.get(prefix),
negative ? `-${modifier}` : modifier
];
}
}
}
function splitWithSeparator(input, separator) {
if (input === _sharedState.NOT_ON_DEMAND) {
return [
_sharedState.NOT_ON_DEMAND
];
}
return (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(input, separator);
}
function* recordCandidates(matches, classCandidate) {
for (const match of matches){
var _match__options;
var _match__options_preserveSource;
match[1].raws.tailwind = {
...match[1].raws.tailwind,
classCandidate,
preserveSource: (_match__options_preserveSource = (_match__options = match[0].options) === null || _match__options === void 0 ? void 0 : _match__options.preserveSource) !== null && _match__options_preserveSource !== void 0 ? _match__options_preserveSource : false
};
yield match;
}
}
function* resolveMatches(candidate, context) {
let separator = context.tailwindConfig.separator;
let [classCandidate, ...variants] = splitWithSeparator(candidate, separator).reverse();
let important = false;
if (classCandidate.startsWith("!")) {
important = true;
classCandidate = classCandidate.slice(1);
}
// TODO: Reintroduce this in ways that doesn't break on false positives
// function sortAgainst(toSort, against) {
// return toSort.slice().sort((a, z) => {
// return bigSign(against.get(a)[0] - against.get(z)[0])
// })
// }
// let sorted = sortAgainst(variants, context.variantMap)
// if (sorted.toString() !== variants.toString()) {
// let corrected = sorted.reverse().concat(classCandidate).join(':')
// throw new Error(`Class ${candidate} should be written as ${corrected}`)
// }
for (let matchedPlugins of resolveMatchedPlugins(classCandidate, context)){
let matches = [];
let typesByMatches = new Map();
let [plugins, modifier] = matchedPlugins;
let isOnlyPlugin = plugins.length === 1;
for (let [sort, plugin] of plugins){
let matchesPerPlugin = [];
if (typeof plugin === "function") {
for (let ruleSet of [].concat(plugin(modifier, {
isOnlyPlugin
}))){
let [rules, options] = parseRules(ruleSet, context.postCssNodeCache);
for (let rule of rules){
matchesPerPlugin.push([
{
...sort,
options: {
...sort.options,
...options
}
},
rule
]);
}
}
} else if (modifier === "DEFAULT" || modifier === "-DEFAULT") {
let ruleSet = plugin;
let [rules, options] = parseRules(ruleSet, context.postCssNodeCache);
for (let rule of rules){
matchesPerPlugin.push([
{
...sort,
options: {
...sort.options,
...options
}
},
rule
]);
}
}
if (matchesPerPlugin.length > 0) {
var _sort_options;
var _sort_options_types, _sort_options1;
let matchingTypes = Array.from((0, _pluginUtils.getMatchingTypes)((_sort_options_types = (_sort_options = sort.options) === null || _sort_options === void 0 ? void 0 : _sort_options.types) !== null && _sort_options_types !== void 0 ? _sort_options_types : [], modifier, (_sort_options1 = sort.options) !== null && _sort_options1 !== void 0 ? _sort_options1 : {}, context.tailwindConfig)).map(([_, type])=>type);
if (matchingTypes.length > 0) {
typesByMatches.set(matchesPerPlugin, matchingTypes);
}
matches.push(matchesPerPlugin);
}
}
if (isArbitraryValue(modifier)) {
if (matches.length > 1) {
// Partition plugins in 2 categories so that we can start searching in the plugins that
// don't have `any` as a type first.
let [withAny, withoutAny] = matches.reduce((group, plugin)=>{
let hasAnyType = plugin.some(([{ options }])=>options.types.some(({ type })=>type === "any"));
if (hasAnyType) {
group[0].push(plugin);
} else {
group[1].push(plugin);
}
return group;
}, [
[],
[]
]);
function findFallback(matches) {
// If only a single plugin matches, let's take that one
if (matches.length === 1) {
return matches[0];
}
// Otherwise, find the plugin that creates a valid rule given the arbitrary value, and
// also has the correct type which preferOnConflicts the plugin in case of clashes.
return matches.find((rules)=>{
let matchingTypes = typesByMatches.get(rules);
return rules.some(([{ options }, rule])=>{
if (!isParsableNode(rule)) {
return false;
}
return options.types.some(({ type , preferOnConflict })=>matchingTypes.includes(type) && preferOnConflict);
});
});
}
var _findFallback;
// Try to find a fallback plugin, because we already know that multiple plugins matched for
// the given arbitrary value.
let fallback = (_findFallback = findFallback(withoutAny)) !== null && _findFallback !== void 0 ? _findFallback : findFallback(withAny);
if (fallback) {
matches = [
fallback
];
} else {
var _typesByMatches_get;
let typesPerPlugin = matches.map((match)=>new Set([
...(_typesByMatches_get = typesByMatches.get(match)) !== null && _typesByMatches_get !== void 0 ? _typesByMatches_get : []
]));
// Remove duplicates, so that we can detect proper unique types for each plugin.
for (let pluginTypes of typesPerPlugin){
for (let type of pluginTypes){
let removeFromOwnGroup = false;
for (let otherGroup of typesPerPlugin){
if (pluginTypes === otherGroup) continue;
if (otherGroup.has(type)) {
otherGroup.delete(type);
removeFromOwnGroup = true;
}
}
if (removeFromOwnGroup) pluginTypes.delete(type);
}
}
let messages = [];
for (let [idx, group] of typesPerPlugin.entries()){
for (let type of group){
let rules = matches[idx].map(([, rule])=>rule).flat().map((rule)=>rule.toString().split("\n").slice(1, -1) // Remove selector and closing '}'
.map((line)=>line.trim()).map((x)=>` ${x}`) // Re-indent
.join("\n")).join("\n\n");
messages.push(` Use \`${candidate.replace("[", `[${type}:`)}\` for \`${rules.trim()}\``);
break;
}
}
_log.default.warn([
`The class \`${candidate}\` is ambiguous and matches multiple utilities.`,
...messages,
`If this is content and not a class, replace it with \`${candidate.replace("[", "&lsqb;").replace("]", "&rsqb;")}\` to silence this warning.`
]);
continue;
}
}
matches = matches.map((list)=>list.filter((match)=>isParsableNode(match[1])));
}
matches = matches.flat();
matches = Array.from(recordCandidates(matches, classCandidate));
matches = applyPrefix(matches, context);
if (important) {
matches = applyImportant(matches, classCandidate);
}
for (let variant of variants){
matches = applyVariant(variant, matches, context);
}
for (let match of matches){
match[1].raws.tailwind = {
...match[1].raws.tailwind,
candidate
};
// Apply final format selector
match = applyFinalFormat(match, {
context,
candidate
});
// Skip rules with invalid selectors
// This will cause the candidate to be added to the "not class"
// cache skipping it entirely for future builds
if (match === null) {
continue;
}
yield match;
}
}
}
function applyFinalFormat(match, { context , candidate }) {
if (!match[0].collectedFormats) {
return match;
}
let isValid = true;
let finalFormat;
try {
finalFormat = (0, _formatVariantSelector.formatVariantSelector)(match[0].collectedFormats, {
context,
candidate
});
} catch {
// The format selector we produced is invalid
// This could be because:
// - A bug exists
// - A plugin introduced an invalid variant selector (ex: `addVariant('foo', '&;foo')`)
// - The user used an invalid arbitrary variant (ex: `[&;foo]:underline`)
// Either way the build will fail because of this
// We would rather that the build pass "silently" given that this could
// happen because of picking up invalid things when scanning content
// So we'll throw out the candidate instead
return null;
}
let container = _postcss.default.root({
nodes: [
match[1].clone()
]
});
container.walkRules((rule)=>{
if (inKeyframes(rule)) {
return;
}
try {
let selector = (0, _formatVariantSelector.finalizeSelector)(rule.selector, finalFormat, {
candidate,
context
});
// Finalize Selector determined that this candidate is irrelevant
// TODO: This elimination should happen earlier so this never happens
if (selector === null) {
rule.remove();
return;
}
rule.selector = selector;
} catch {
// If this selector is invalid we also want to skip it
// But it's likely that being invalid here means there's a bug in a plugin rather than too loosely matching content
isValid = false;
return false;
}
});
if (!isValid) {
return null;
}
// If all rules have been eliminated we can skip this candidate entirely
if (container.nodes.length === 0) {
return null;
}
match[1] = container.nodes[0];
return match;
}
function inKeyframes(rule) {
return rule.parent && rule.parent.type === "atrule" && rule.parent.name === "keyframes";
}
function getImportantStrategy(important) {
if (important === true) {
return (rule)=>{
if (inKeyframes(rule)) {
return;
}
rule.walkDecls((d)=>{
if (d.parent.type === "rule" && !inKeyframes(d.parent)) {
d.important = true;
}
});
};
}
if (typeof important === "string") {
return (rule)=>{
if (inKeyframes(rule)) {
return;
}
rule.selectors = rule.selectors.map((selector)=>{
return (0, _applyImportantSelector.applyImportantSelector)(selector, important);
});
};
}
}
function generateRules(candidates, context, isSorting = false) {
let allRules = [];
let strategy = getImportantStrategy(context.tailwindConfig.important);
for (let candidate of candidates){
if (context.notClassCache.has(candidate)) {
continue;
}
if (context.candidateRuleCache.has(candidate)) {
allRules = allRules.concat(Array.from(context.candidateRuleCache.get(candidate)));
continue;
}
let matches = Array.from(resolveMatches(candidate, context));
if (matches.length === 0) {
context.notClassCache.add(candidate);
continue;
}
context.classCache.set(candidate, matches);
var _context_candidateRuleCache_get;
let rules = (_context_candidateRuleCache_get = context.candidateRuleCache.get(candidate)) !== null && _context_candidateRuleCache_get !== void 0 ? _context_candidateRuleCache_get : new Set();
context.candidateRuleCache.set(candidate, rules);
for (const match of matches){
let [{ sort , options }, rule] = match;
if (options.respectImportant && strategy) {
let container = _postcss.default.root({
nodes: [
rule.clone()
]
});
container.walkRules(strategy);
rule = container.nodes[0];
}
// Note: We have to clone rules during sorting
// so we eliminate some shared mutable state
let newEntry = [
sort,
isSorting ? rule.clone() : rule
];
rules.add(newEntry);
context.ruleCache.add(newEntry);
allRules.push(newEntry);
}
}
return allRules;
}
function isArbitraryValue(input) {
return input.startsWith("[") && input.endsWith("]");
}
@@ -0,0 +1,5 @@
import { Intrinsic } from './intrinsic.mjs';
/** `[Json]` Intrinsic function to Capitalize LiteralString types */
export function Capitalize(T, options = {}) {
return Intrinsic(T, 'Capitalize', options);
}
@@ -0,0 +1,398 @@
## 6.12.1 (2025-12-22)
### Bug fixes
Improve finding inner language in syntax tree when the nested parse has been marked as bracketed.
## 6.11.3 (2025-08-15)
### Bug fixes
Make the stream parser user 4 times smaller chunks to reduce the amount of re-parsed code on changes.
## 6.11.2 (2025-06-27)
### Bug fixes
Make sure folded ranges open when backspacing or deleting into them.
## 6.11.1 (2025-06-02)
### Bug fixes
Fix an issue where indentation would sometimes miss nodes in mixed-language situations.
## 6.11.0 (2025-03-13)
### New features
Stream parsers now support a `mergeTokens` option that can be used to turn off automatic merging of adjacent tokens.
## 6.10.8 (2024-12-23)
### Bug fixes
Fix a regression introduced 6.10.7 that caused indention to sometimes crash on nested language boundaries.
## 6.10.7 (2024-12-17)
### Bug fixes
Fix an issue where indentation for a stream language would fail to work when the parse covered only part of the document, far from the start.
Make sure the inner mode gets a chance to indent when indenting right at the end of a nested language section.
## 6.10.6 (2024-11-29)
### Bug fixes
Fix a crash in `StreamLanguage` when the input range is entirely before the editor viewport.
## 6.10.5 (2024-11-27)
### Bug fixes
Fix an issue where a `StreamLanguage` could get confused when trying to reuse existing parse data when the parsed range changed.
## 6.10.4 (2024-11-24)
### Bug fixes
Join adjacent tokens of the same type into a single token in .
Call stream language indent functions even when the language is used as a nested parser.
Fix a crash in `StreamParser` when a parse was resumed with different input ranges.
## 6.10.3 (2024-09-19)
### Bug fixes
Fix a TypeScript error when using `HighlightStyle` with the `exactOptionalPropertyTypes` typechecking option enabled.
Make `delimitedIndent` align to spaces after the opening token.
## 6.10.2 (2024-06-03)
### Bug fixes
Fix an infinite loop that could occur when enabling `bidiIsolates` in documents with both bidirectional text and very long lines.
## 6.10.1 (2024-02-02)
### Bug fixes
Fix an issue where, when a lot of code is visible in the initial editor, the bottom bit of code is shown without highlighting for one frame.
## 6.10.0 (2023-12-28)
### New features
The new `bidiIsolates` extension can be used to wrap syntactic elements where this is appropriate in an element that isolates their text direction, avoiding weird ordering of neutral characters on direction boundaries.
## 6.9.3 (2023-11-27)
### Bug fixes
Fix an issue in `StreamLanguage` where it ran out of node type ids if you repeatedly redefined a language with the same token table.
## 6.9.2 (2023-10-24)
### Bug fixes
Allow `StreamParser` tokens get multiple highlighting tags.
## 6.9.1 (2023-09-20)
### Bug fixes
Indentation now works a lot better in mixed-language documents that interleave the languages in a complex way.
Code folding is now able to pick the right foldable syntax node when the line end falls in a mixed-parsing language that doesn't match the target node.
## 6.9.0 (2023-08-16)
### Bug fixes
Make `getIndentation` return null, rather than 0, when there is no syntax tree available.
### New features
The new `preparePlaceholder` option to `codeFolding` makes it possible to display contextual information in a folded range placeholder widget.
## 6.8.0 (2023-06-12)
### New features
The new `baseIndentFor` method in `TreeIndentContext` can be used to find the base indentation for an arbitrary node.
## 6.7.0 (2023-05-19)
### New features
Export `DocInput` class for feeding editor documents to a Lezer parser.
## 6.6.0 (2023-02-13)
### New features
Syntax-driven language data queries now support sublanguages, which make it possible to return different data for specific parts of the tree produced by a single language.
## 6.5.0 (2023-02-07)
### Bug fixes
Make indentation for stream languages more reliable by having `StringStream.indentation` return overridden indentations from the indent context.
### New features
The `toggleFold` command folds or unfolds depending on whether there's an existing folded range on the current line.
`indentUnit` now accepts any (repeated) whitespace character, not just spaces and tabs.
## 6.4.0 (2023-01-12)
### New features
The `bracketMatchingHandle` node prop can now be used to limit bracket matching behavior for larger nodes to a single subnode (for example the tag name of an HTML tag).
## 6.3.2 (2022-12-16)
### Bug fixes
Fix a bug that caused `ensureSyntaxTree` to return incomplete trees when using a viewport-aware parser like `StreamLanguage`.
## 6.3.1 (2022-11-14)
### Bug fixes
Make syntax-based folding include syntax nodes that start right at the end of a line as potential fold targets.
Fix the `indentService` protocol to allow a distinction between declining to handle the indentation and returning null to indicate the line has no definite indentation.
## 6.3.0 (2022-10-24)
### New features
`HighlightStyle` objects now have a `specs` property holding the tag styles that were used to define them.
`Language` objects now have a `name` field holding the language name.
## 6.2.1 (2022-07-21)
### Bug fixes
Fix a bug where `bracketMatching` would incorrectly match nested brackets in syntax trees that put multiple pairs of brackets in the same parent node.
Fix a bug that could cause `indentRange` to loop infinitely.
## 6.2.0 (2022-06-30)
### Bug fixes
Fix a bug that prevented bracket matching to recognize plain brackets inside a language parsed as an overlay.
### New features
The `indentRange` function provides an easy way to programatically auto-indent a range of the document.
## 6.1.0 (2022-06-20)
### New features
The `foldState` field is now public, and can be used to serialize and deserialize the fold state.
## 6.0.0 (2022-06-08)
### New features
The `foldingChanged` option to `foldGutter` can now be used to trigger a recomputation of the fold markers.
## 0.20.2 (2022-05-20)
### Bug fixes
List style-mod as a dependency.
## 0.20.1 (2022-05-18)
### Bug fixes
Make sure `all` styles in the CSS generated for a `HighlightStyle` have a lower precedence than the other rules defined for the style. Use a shorthand property
## 0.20.0 (2022-04-20)
### Breaking changes
`HighlightStyle.get` is now called `highlightingFor`.
`HighlightStyles` no longer function as extensions (to improve tree shaking), and must be wrapped with `syntaxHighlighting` to add to an editor configuration.
`Language` objects no longer have a `topNode` property.
### New features
`HighlightStyle` and `defaultHighlightStyle` from the now-removed @codemirror/highlight package now live in this package.
The new `forceParsing` function can be used to run the parser forward on an editor view.
The exports that used to live in @codemirror/matchbrackets are now exported from this package.
The @codemirror/fold package has been merged into this one.
The exports from the old @codemirror/stream-parser package now live in this package.
## 0.19.10 (2022-03-31)
### Bug fixes
Autocompletion may now also trigger automatic indentation on input.
## 0.19.9 (2022-03-30)
### Bug fixes
Make sure nodes that end at the end of a partial parse aren't treated as valid fold targets.
Fix an issue where the parser sometimes wouldn't reuse parsing work done in the background on transactions.
## 0.19.8 (2022-03-03)
### Bug fixes
Fix an issue that could cause indentation logic to use the wrong line content when indenting multiple lines at once.
## 0.19.7 (2021-12-02)
### Bug fixes
Fix an issue where the parse worker could incorrectly stop working when the parse tree has skipped gaps in it.
## 0.19.6 (2021-11-26)
### Bug fixes
Fixes an issue where the background parse work would be scheduled too aggressively, degrading responsiveness on a newly-created editor with a large document.
Improve initial highlight for mixed-language editors and limit the amount of parsing done on state creation for faster startup.
## 0.19.5 (2021-11-17)
### New features
The new function `syntaxTreeAvailable` can be used to check if a fully-parsed syntax tree is available up to a given document position.
The module now exports `syntaxParserRunning`, which tells you whether the background parser is still planning to do more work for a given editor view.
## 0.19.4 (2021-11-13)
### New features
`LanguageDescription.of` now takes an optional already-loaded extension.
## 0.19.3 (2021-09-13)
### Bug fixes
Fix an issue where a parse that skipped content with `skipUntilInView` would in some cases not be restarted when the range came into view.
## 0.19.2 (2021-08-11)
### Bug fixes
Fix a bug that caused `indentOnInput` to fire for the wrong kinds of transactions.
Fix a bug that could cause `indentOnInput` to apply its changes incorrectly.
## 0.19.1 (2021-08-11)
### Bug fixes
Fix incorrect versions for @lezer dependencies.
## 0.19.0 (2021-08-11)
### Breaking changes
CodeMirror now uses lezer 0.15, which means different package names (scoped with @lezer) and some breaking changes in the library.
`EditorParseContext` is now called `ParseContext`. It is no longer passed to parsers, but must be retrieved with `ParseContext.get`.
`IndentContext.lineIndent` now takes a position, not a `Line` object, as argument.
`LezerLanguage` was renamed to `LRLanguage` (because all languages must emit Lezer-style trees, the name was misleading).
`Language.parseString` no longer exists. You can just call `.parser.parse(...)` instead.
### New features
New `IndentContext.lineAt` method to access lines in a way that is aware of simulated line breaks.
`IndentContext` now provides a `simulatedBreak` property through which client code can query whether the context has a simulated line break.
## 0.18.2 (2021-06-01)
### Bug fixes
Fix an issue where asynchronous re-parsing (with dynamically loaded languages) sometimes failed to fully happen.
## 0.18.1 (2021-03-31)
### Breaking changes
`EditorParseContext.getSkippingParser` now replaces `EditorParseContext.skippingParser` and allows you to provide a promise that'll cause parsing to start again. (The old property remains available until the next major release.)
### Bug fixes
Fix an issue where nested parsers could see past the end of the nested region.
## 0.18.0 (2021-03-03)
### Breaking changes
Update dependencies to 0.18.
### Breaking changes
The `Language` constructor takes an additional argument that provides the top node type.
### New features
`Language` instances now have a `topNode` property giving their top node type.
`TreeIndentContext` now has a `continue` method that allows an indenter to defer to the indentation of the parent nodes.
## 0.17.5 (2021-02-19)
### New features
This package now exports a `foldInside` helper function, a fold function that should work for most delimited node types.
## 0.17.4 (2021-01-15)
## 0.17.3 (2021-01-15)
### Bug fixes
Parse scheduling has been improved to reduce the likelyhood of the user looking at unparsed code in big documents.
Prevent parser from running too far past the current viewport in huge documents.
## 0.17.2 (2021-01-06)
### New features
The package now also exports a CommonJS module.
## 0.17.1 (2020-12-30)
### Bug fixes
Fix a bug where changing the editor configuration wouldn't update the language parser used.
## 0.17.0 (2020-12-29)
### Breaking changes
First numbered release.
@@ -0,0 +1,94 @@
"use strict"
module.exports = require('./loader')(global, loadImplementation);
/**
* Node.js version of loadImplementation.
*
* Requires the given implementation and returns the registration
* containing {Promise, implementation}
*
* If implementation is undefined or global.Promise, loads it
* Otherwise uses require
*/
function loadImplementation(implementation){
var impl = null
if(shouldPreferGlobalPromise(implementation)){
// if no implementation or env specified use global.Promise
impl = {
Promise: global.Promise,
implementation: 'global.Promise'
}
} else if(implementation){
// if implementation specified, require it
var lib = require(implementation)
impl = {
Promise: lib.Promise || lib,
implementation: implementation
}
} else {
// try to auto detect implementation. This is non-deterministic
// and should prefer other branches, but this is our last chance
// to load something without throwing error
impl = tryAutoDetect()
}
if(impl === null){
throw new Error('Cannot find any-promise implementation nor'+
' global.Promise. You must install polyfill or call'+
' require("any-promise/register") with your preferred'+
' implementation, e.g. require("any-promise/register/bluebird")'+
' on application load prior to any require("any-promise").')
}
return impl
}
/**
* Determines if the global.Promise should be preferred if an implementation
* has not been registered.
*/
function shouldPreferGlobalPromise(implementation){
if(implementation){
return implementation === 'global.Promise'
} else if(typeof global.Promise !== 'undefined'){
// Load global promise if implementation not specified
// Versions < 0.11 did not have global Promise
// Do not use for version < 0.12 as version 0.11 contained buggy versions
var version = (/v(\d+)\.(\d+)\.(\d+)/).exec(process.version)
return !(version && +version[1] == 0 && +version[2] < 12)
}
// do not have global.Promise or another implementation was specified
return false
}
/**
* Look for common libs as last resort there is no guarantee that
* this will return a desired implementation or even be deterministic.
* The priority is also nearly arbitrary. We are only doing this
* for older versions of Node.js <0.12 that do not have a reasonable
* global.Promise implementation and we the user has not registered
* the preference. This preserves the behavior of any-promise <= 0.1
* and may be deprecated or removed in the future
*/
function tryAutoDetect(){
var libs = [
"es6-promise",
"promise",
"native-promise-only",
"bluebird",
"rsvp",
"when",
"q",
"pinkie",
"lie",
"vow"]
var i = 0, len = libs.length
for(; i < len; i++){
try {
return loadImplementation(libs[i])
} catch(e){}
}
return null
}
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,QAAQ,CAAC;AACzC","sources":["packages/@react-aria/overlays/intl/pl-PL.json"],"sourcesContent":["{\n \"dismiss\": \"Zignoruj\"\n}\n"],"names":[],"version":3,"file":"pl-PL.module.js.map"}
@@ -0,0 +1,11 @@
import ES5 from './es5';
import ES6 from './es6';
import ES2015 from './es2015';
declare const ToPrimitive: typeof ES2015 & {
readonly ES5: typeof ES5;
/** @deprecated */
readonly ES6: typeof ES6;
readonly ES2015: typeof ES2015;
};
export = ToPrimitive;
@@ -0,0 +1,266 @@
/*!
* type-is
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module dependencies.
* @private
*/
var typer = require('media-typer')
var mime = require('mime-types')
/**
* Module exports.
* @public
*/
module.exports = typeofrequest
module.exports.is = typeis
module.exports.hasBody = hasbody
module.exports.normalize = normalize
module.exports.match = mimeMatch
/**
* Compare a `value` content-type with `types`.
* Each `type` can be an extension like `html`,
* a special shortcut like `multipart` or `urlencoded`,
* or a mime type.
*
* If no types match, `false` is returned.
* Otherwise, the first `type` that matches is returned.
*
* @param {String} value
* @param {Array} types
* @public
*/
function typeis (value, types_) {
var i
var types = types_
// remove parameters and normalize
var val = tryNormalizeType(value)
// no type or invalid
if (!val) {
return false
}
// support flattened arguments
if (types && !Array.isArray(types)) {
types = new Array(arguments.length - 1)
for (i = 0; i < types.length; i++) {
types[i] = arguments[i + 1]
}
}
// no types, return the content type
if (!types || !types.length) {
return val
}
var type
for (i = 0; i < types.length; i++) {
if (mimeMatch(normalize(type = types[i]), val)) {
return type[0] === '+' || type.indexOf('*') !== -1
? val
: type
}
}
// no matches
return false
}
/**
* Check if a request has a request body.
* A request with a body __must__ either have `transfer-encoding`
* or `content-length` headers set.
* http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3
*
* @param {Object} request
* @return {Boolean}
* @public
*/
function hasbody (req) {
return req.headers['transfer-encoding'] !== undefined ||
!isNaN(req.headers['content-length'])
}
/**
* Check if the incoming request contains the "Content-Type"
* header field, and it contains any of the give mime `type`s.
* If there is no request body, `null` is returned.
* If there is no content type, `false` is returned.
* Otherwise, it returns the first `type` that matches.
*
* Examples:
*
* // With Content-Type: text/html; charset=utf-8
* this.is('html'); // => 'html'
* this.is('text/html'); // => 'text/html'
* this.is('text/*', 'application/json'); // => 'text/html'
*
* // When Content-Type is application/json
* this.is('json', 'urlencoded'); // => 'json'
* this.is('application/json'); // => 'application/json'
* this.is('html', 'application/*'); // => 'application/json'
*
* this.is('html'); // => false
*
* @param {String|Array} types...
* @return {String|false|null}
* @public
*/
function typeofrequest (req, types_) {
var types = types_
// no body
if (!hasbody(req)) {
return null
}
// support flattened arguments
if (arguments.length > 2) {
types = new Array(arguments.length - 1)
for (var i = 0; i < types.length; i++) {
types[i] = arguments[i + 1]
}
}
// request content type
var value = req.headers['content-type']
return typeis(value, types)
}
/**
* Normalize a mime type.
* If it's a shorthand, expand it to a valid mime type.
*
* In general, you probably want:
*
* var type = is(req, ['urlencoded', 'json', 'multipart']);
*
* Then use the appropriate body parsers.
* These three are the most common request body types
* and are thus ensured to work.
*
* @param {String} type
* @private
*/
function normalize (type) {
if (typeof type !== 'string') {
// invalid type
return false
}
switch (type) {
case 'urlencoded':
return 'application/x-www-form-urlencoded'
case 'multipart':
return 'multipart/*'
}
if (type[0] === '+') {
// "+json" -> "*/*+json" expando
return '*/*' + type
}
return type.indexOf('/') === -1
? mime.lookup(type)
: type
}
/**
* Check if `expected` mime type
* matches `actual` mime type with
* wildcard and +suffix support.
*
* @param {String} expected
* @param {String} actual
* @return {Boolean}
* @private
*/
function mimeMatch (expected, actual) {
// invalid type
if (expected === false) {
return false
}
// split types
var actualParts = actual.split('/')
var expectedParts = expected.split('/')
// invalid format
if (actualParts.length !== 2 || expectedParts.length !== 2) {
return false
}
// validate type
if (expectedParts[0] !== '*' && expectedParts[0] !== actualParts[0]) {
return false
}
// validate suffix wildcard
if (expectedParts[1].substr(0, 2) === '*+') {
return expectedParts[1].length <= actualParts[1].length + 1 &&
expectedParts[1].substr(1) === actualParts[1].substr(1 - expectedParts[1].length)
}
// validate subtype
if (expectedParts[1] !== '*' && expectedParts[1] !== actualParts[1]) {
return false
}
return true
}
/**
* Normalize a type and remove parameters.
*
* @param {string} value
* @return {string}
* @private
*/
function normalizeType (value) {
// parse the type
var type = typer.parse(value)
// remove the parameters
type.parameters = undefined
// reformat it
return typer.format(type)
}
/**
* Try to normalize a type and remove parameters.
*
* @param {string} value
* @return {string}
* @private
*/
function tryNormalizeType (value) {
if (!value) {
return null
}
try {
return normalizeType(value)
} catch (err) {
return null
}
}
@@ -0,0 +1,6 @@
import {
red
} from "../chunk-YZYGFPNK.mjs";
export {
red
};
@@ -0,0 +1 @@
{"name":"serve-static","version":"2.2.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532089971,"integrity":"sha512-cEbepm4DpaqIqMBliCTv0X6H+rjxhM4v2a+WIJYf0ucurI29fQ/3D66ZQz1Re1zZJ8EhfjYmIPGZFinK8b0shA==","mode":420,"size":1189},"index.js":{"checkedAt":1794532089971,"integrity":"sha512-ZmWSGmZRwLWxma5yqrgZIvo6VHU2xOsAFkBW98Yws79jJAiXcqQ2mY6vcwB2cSAB8Qt4xAdQ0w7UdPDvfCOTVQ==","mode":420,"size":4489},"package.json":{"checkedAt":1794532089971,"integrity":"sha512-D7XMDGB6aIZ1lqbyrvtVFsbj/uiSimaZ83KktRq/iwXnk4nKzhJYHjjfubOUoE7LVXSTq8oEYbgKvhlaPTEWkA==","mode":420,"size":1113},"HISTORY.md":{"checkedAt":1794532089971,"integrity":"sha512-5rX3uq1i9di33sy4gbduGl5mP/4B0FMDnjLC+kW/Z00l2l5YeREewFpww4UR/FE7pVesUepjNvulFbDYPm/U6Q==","mode":420,"size":11431},"README.md":{"checkedAt":1794532089972,"integrity":"sha512-7nZCRn5x9Aw1IPhCEloRj6G1GaUoHw6JTei8XGVqSbmeerS8Cvjj/A6aEnzLJXTCRCbPde3MaicYSvV/2xGgEA==","mode":420,"size":7450}}}
@@ -0,0 +1,22 @@
var _typeof = require("./typeof.js")["default"];
function _interopRequireWildcard(e, t) {
if ("function" == typeof WeakMap) var r = new WeakMap(),
n = new WeakMap();
return (module.exports = _interopRequireWildcard = function _interopRequireWildcard(e, t) {
if (!t && e && e.__esModule) return e;
var o,
i,
f = {
__proto__: null,
"default": e
};
if (null === e || "object" != _typeof(e) && "function" != typeof e) return f;
if (o = t ? n : r) {
if (o.has(e)) return o.get(e);
o.set(e, f);
}
for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]);
return f;
}, module.exports.__esModule = true, module.exports["default"] = module.exports)(e, t);
}
module.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,22 @@
var createMathOperation = require('./_createMathOperation');
/**
* Multiply two numbers.
*
* @static
* @memberOf _
* @since 4.7.0
* @category Math
* @param {number} multiplier The first number in a multiplication.
* @param {number} multiplicand The second number in a multiplication.
* @returns {number} Returns the product.
* @example
*
* _.multiply(6, 4);
* // => 24
*/
var multiply = createMathOperation(function(multiplier, multiplicand) {
return multiplier * multiplicand;
}, 1);
module.exports = multiply;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"N O P","2":"C L M","260":"G","513":"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:{"1":"0 1 2 3 4 5 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB 0C 1C","194":"xB yB zB"},D:{"1":"3B UC 4B VC 5B 6B 7B","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","260":"wB xB yB zB 0B 1B 2B","513":"0 1 2 3 4 5 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"1":"L M G OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B C 2C ZC 3C 4C 5C 6C aC NC"},F:{"1":"qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B","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 FD GD HD ID NC uC JD OC","260":"jB kB lB mB nB oB pB","513":"0 1 2 3 4 5 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"},G:{"1":"WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD"},H:{"2":"hD"},I:{"2":"TC J iD jD kD lD vC mD nD","513":"I"},J:{"2":"D A"},K:{"2":"A B C NC uC OC","513":"H"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB qD rD sD aC tD uD vD wD xD QC RC SC yD","2":"J","260":"oD pD"},Q:{"513":"zD"},R:{"1":"0D"},S:{"1":"2D","2":"1D"}},B:5,C:"IntersectionObserver",D:true};
@@ -0,0 +1 @@
require("../dist/register").registerTSLegacyModuleInterop();
@@ -0,0 +1,41 @@
/**
* @import {ConstructName, Unsafe} from 'mdast-util-to-markdown'
*/
/**
* @param {Array<ConstructName>} stack
* @param {Unsafe} pattern
* @returns {boolean}
*/
export function patternInScope(stack, pattern) {
return (
listInScope(stack, pattern.inConstruct, true) &&
!listInScope(stack, pattern.notInConstruct, false)
)
}
/**
* @param {Array<ConstructName>} stack
* @param {Unsafe['inConstruct']} list
* @param {boolean} none
* @returns {boolean}
*/
function listInScope(stack, list, none) {
if (typeof list === 'string') {
list = [list]
}
if (!list || list.length === 0) {
return none
}
let index = -1
while (++index < list.length) {
if (stack.includes(list[index])) {
return true
}
}
return false
}
@@ -0,0 +1,197 @@
/**
* The `node:trace_events` module provides a mechanism to centralize tracing information
* generated by V8, Node.js core, and userspace code.
*
* Tracing can be enabled with the `--trace-event-categories` command-line flag
* or by using the `trace_events` module. The `--trace-event-categories` flag
* accepts a list of comma-separated category names.
*
* The available categories are:
*
* * `node`: An empty placeholder.
* * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html) trace data.
* The [`async_hooks`](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html) events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property.
* * `node.bootstrap`: Enables capture of Node.js bootstrap milestones.
* * `node.console`: Enables capture of `console.time()` and `console.count()` output.
* * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
* * `node.threadpoolwork.async`: Enables capture of trace data for threadpool asynchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
* * `node.dns.native`: Enables capture of trace data for DNS queries.
* * `node.net.native`: Enables capture of trace data for network.
* * `node.environment`: Enables capture of Node.js Environment milestones.
* * `node.fs.sync`: Enables capture of trace data for file system sync methods.
* * `node.fs_dir.sync`: Enables capture of trace data for file system sync directory methods.
* * `node.fs.async`: Enables capture of trace data for file system async methods.
* * `node.fs_dir.async`: Enables capture of trace data for file system async directory methods.
* * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-v22.x/api/perf_hooks.html) measurements.
* * `node.perf.usertiming`: Enables capture of only Performance API User Timing
* measures and marks.
* * `node.perf.timerify`: Enables capture of only Performance API timerify
* measurements.
* * `node.promises.rejections`: Enables capture of trace data tracking the number
* of unhandled Promise rejections and handled-after-rejections.
* * `node.vm.script`: Enables capture of trace data for the `node:vm` module's `runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
* * `v8`: The [V8](https://nodejs.org/docs/latest-v22.x/api/v8.html) events are GC, compiling, and execution related.
* * `node.http`: Enables capture of trace data for http request / response.
*
* By default the `node`, `node.async_hooks`, and `v8` categories are enabled.
*
* ```bash
* node --trace-event-categories v8,node,node.async_hooks server.js
* ```
*
* Prior versions of Node.js required the use of the `--trace-events-enabled` flag to enable trace events. This requirement has been removed. However, the `--trace-events-enabled` flag _may_ still be
* used and will enable the `node`, `node.async_hooks`, and `v8` trace event categories by default.
*
* ```bash
* node --trace-events-enabled
*
* # is equivalent to
*
* node --trace-event-categories v8,node,node.async_hooks
* ```
*
* Alternatively, trace events may be enabled using the `node:trace_events` module:
*
* ```js
* import trace_events from 'node:trace_events';
* const tracing = trace_events.createTracing({ categories: ['node.perf'] });
* tracing.enable(); // Enable trace event capture for the 'node.perf' category
*
* // do work
*
* tracing.disable(); // Disable trace event capture for the 'node.perf' category
* ```
*
* Running Node.js with tracing enabled will produce log files that can be opened
* in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome.
*
* The logging file is by default called `node_trace.${rotation}.log`, where `${rotation}` is an incrementing log-rotation id. The filepath pattern can
* be specified with `--trace-event-file-pattern` that accepts a template
* string that supports `${rotation}` and `${pid}`:
*
* ```bash
* node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js
* ```
*
* To guarantee that the log file is properly generated after signal events like `SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers
* in your code, such as:
*
* ```js
* process.on('SIGINT', function onSigint() {
* console.info('Received SIGINT.');
* process.exit(130); // Or applicable exit code depending on OS and signal
* });
* ```
*
* The tracing system uses the same time source
* as the one used by `process.hrtime()`.
* However the trace-event timestamps are expressed in microseconds,
* unlike `process.hrtime()` which returns nanoseconds.
*
* The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html#class-worker) threads.
* @experimental
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/trace_events.js)
*/
declare module "trace_events" {
/**
* The `Tracing` object is used to enable or disable tracing for sets of
* categories. Instances are created using the
* `trace_events.createTracing()` method.
*
* When created, the `Tracing` object is disabled. Calling the
* `tracing.enable()` method adds the categories to the set of enabled trace
* event categories. Calling `tracing.disable()` will remove the categories
* from the set of enabled trace event categories.
*/
interface Tracing {
/**
* A comma-separated list of the trace event categories covered by this
* `Tracing` object.
* @since v10.0.0
*/
readonly categories: string;
/**
* Disables this `Tracing` object.
*
* Only trace event categories _not_ covered by other enabled `Tracing`
* objects and _not_ specified by the `--trace-event-categories` flag
* will be disabled.
*
* ```js
* import trace_events from 'node:trace_events';
* const t1 = trace_events.createTracing({ categories: ['node', 'v8'] });
* const t2 = trace_events.createTracing({ categories: ['node.perf', 'node'] });
* t1.enable();
* t2.enable();
*
* // Prints 'node,node.perf,v8'
* console.log(trace_events.getEnabledCategories());
*
* t2.disable(); // Will only disable emission of the 'node.perf' category
*
* // Prints 'node,v8'
* console.log(trace_events.getEnabledCategories());
* ```
* @since v10.0.0
*/
disable(): void;
/**
* Enables this `Tracing` object for the set of categories covered by
* the `Tracing` object.
* @since v10.0.0
*/
enable(): void;
/**
* `true` only if the `Tracing` object has been enabled.
* @since v10.0.0
*/
readonly enabled: boolean;
}
interface CreateTracingOptions {
/**
* An array of trace category names. Values included in the array are
* coerced to a string when possible. An error will be thrown if the
* value cannot be coerced.
*/
categories: string[];
}
/**
* Creates and returns a `Tracing` object for the given set of `categories`.
*
* ```js
* import trace_events from 'node:trace_events';
* const categories = ['node.perf', 'node.async_hooks'];
* const tracing = trace_events.createTracing({ categories });
* tracing.enable();
* // do stuff
* tracing.disable();
* ```
* @since v10.0.0
*/
function createTracing(options: CreateTracingOptions): Tracing;
/**
* Returns a comma-separated list of all currently-enabled trace event
* categories. The current set of enabled trace event categories is determined
* by the _union_ of all currently-enabled `Tracing` objects and any categories
* enabled using the `--trace-event-categories` flag.
*
* Given the file `test.js` below, the command `node --trace-event-categories node.perf test.js` will print `'node.async_hooks,node.perf'` to the console.
*
* ```js
* import trace_events from 'node:trace_events';
* const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] });
* const t2 = trace_events.createTracing({ categories: ['node.perf'] });
* const t3 = trace_events.createTracing({ categories: ['v8'] });
*
* t1.enable();
* t2.enable();
*
* console.log(trace_events.getEnabledCategories());
* ```
* @since v10.0.0
*/
function getEnabledCategories(): string | undefined;
}
declare module "node:trace_events" {
export * from "trace_events";
}
@@ -0,0 +1,324 @@
import { isAction } from './reduxImports'
import type {
IsUnknownOrNonInferrable,
IfMaybeUndefined,
IfVoid,
IsAny,
} from './tsHelpers'
import { hasMatchFunction } from './tsHelpers'
/**
* An action with a string type and an associated payload. This is the
* type of action returned by `createAction()` action creators.
*
* @template P The type of the action's payload.
* @template T the type used for the action type.
* @template M The type of the action's meta (optional)
* @template E The type of the action's error (optional)
*
* @public
*/
export type PayloadAction<
P = void,
T extends string = string,
M = never,
E = never,
> = {
payload: P
type: T
} & ([M] extends [never]
? {}
: {
meta: M
}) &
([E] extends [never]
? {}
: {
error: E
})
/**
* A "prepare" method to be used as the second parameter of `createAction`.
* Takes any number of arguments and returns a Flux Standard Action without
* type (will be added later) that *must* contain a payload (might be undefined).
*
* @public
*/
export type PrepareAction<P> =
| ((...args: any[]) => { payload: P })
| ((...args: any[]) => { payload: P; meta: any })
| ((...args: any[]) => { payload: P; error: any })
| ((...args: any[]) => { payload: P; meta: any; error: any })
/**
* Internal version of `ActionCreatorWithPreparedPayload`. Not to be used externally.
*
* @internal
*/
export type _ActionCreatorWithPreparedPayload<
PA extends PrepareAction<any> | void,
T extends string = string,
> =
PA extends PrepareAction<infer P>
? ActionCreatorWithPreparedPayload<
Parameters<PA>,
P,
T,
ReturnType<PA> extends {
error: infer E
}
? E
: never,
ReturnType<PA> extends {
meta: infer M
}
? M
: never
>
: void
/**
* Basic type for all action creators.
*
* @inheritdoc {redux#ActionCreator}
*/
export type BaseActionCreator<P, T extends string, M = never, E = never> = {
type: T
match: (action: unknown) => action is PayloadAction<P, T, M, E>
}
/**
* An action creator that takes multiple arguments that are passed
* to a `PrepareAction` method to create the final Action.
* @typeParam Args arguments for the action creator function
* @typeParam P `payload` type
* @typeParam T `type` name
* @typeParam E optional `error` type
* @typeParam M optional `meta` type
*
* @inheritdoc {redux#ActionCreator}
*
* @public
*/
export interface ActionCreatorWithPreparedPayload<
Args extends unknown[],
P,
T extends string = string,
E = never,
M = never,
> extends BaseActionCreator<P, T, M, E> {
/**
* Calling this {@link redux#ActionCreator} with `Args` will return
* an Action with a payload of type `P` and (depending on the `PrepareAction`
* method used) a `meta`- and `error` property of types `M` and `E` respectively.
*/
(...args: Args): PayloadAction<P, T, M, E>
}
/**
* An action creator of type `T` that takes an optional payload of type `P`.
*
* @inheritdoc {redux#ActionCreator}
*
* @public
*/
export interface ActionCreatorWithOptionalPayload<P, T extends string = string>
extends BaseActionCreator<P, T> {
/**
* Calling this {@link redux#ActionCreator} with an argument will
* return a {@link PayloadAction} of type `T` with a payload of `P`.
* Calling it without an argument will return a PayloadAction with a payload of `undefined`.
*/
(payload?: P): PayloadAction<P, T>
}
/**
* An action creator of type `T` that takes no payload.
*
* @inheritdoc {redux#ActionCreator}
*
* @public
*/
export interface ActionCreatorWithoutPayload<T extends string = string>
extends BaseActionCreator<undefined, T> {
/**
* Calling this {@link redux#ActionCreator} will
* return a {@link PayloadAction} of type `T` with a payload of `undefined`
*/
(noArgument: void): PayloadAction<undefined, T>
}
/**
* An action creator of type `T` that requires a payload of type P.
*
* @inheritdoc {redux#ActionCreator}
*
* @public
*/
export interface ActionCreatorWithPayload<P, T extends string = string>
extends BaseActionCreator<P, T> {
/**
* Calling this {@link redux#ActionCreator} with an argument will
* return a {@link PayloadAction} of type `T` with a payload of `P`
*/
(payload: P): PayloadAction<P, T>
}
/**
* An action creator of type `T` whose `payload` type could not be inferred. Accepts everything as `payload`.
*
* @inheritdoc {redux#ActionCreator}
*
* @public
*/
export interface ActionCreatorWithNonInferrablePayload<
T extends string = string,
> extends BaseActionCreator<unknown, T> {
/**
* Calling this {@link redux#ActionCreator} with an argument will
* return a {@link PayloadAction} of type `T` with a payload
* of exactly the type of the argument.
*/
<PT extends unknown>(payload: PT): PayloadAction<PT, T>
}
/**
* An action creator that produces actions with a `payload` attribute.
*
* @typeParam P the `payload` type
* @typeParam T the `type` of the resulting action
* @typeParam PA if the resulting action is preprocessed by a `prepare` method, the signature of said method.
*
* @public
*/
export type PayloadActionCreator<
P = void,
T extends string = string,
PA extends PrepareAction<P> | void = void,
> = IfPrepareActionMethodProvided<
PA,
_ActionCreatorWithPreparedPayload<PA, T>,
// else
IsAny<
P,
ActionCreatorWithPayload<any, T>,
IsUnknownOrNonInferrable<
P,
ActionCreatorWithNonInferrablePayload<T>,
// else
IfVoid<
P,
ActionCreatorWithoutPayload<T>,
// else
IfMaybeUndefined<
P,
ActionCreatorWithOptionalPayload<P, T>,
// else
ActionCreatorWithPayload<P, T>
>
>
>
>
>
/**
* A utility function to create an action creator for the given action type
* string. The action creator accepts a single argument, which will be included
* in the action object as a field called payload. The action creator function
* will also have its toString() overridden so that it returns the action type.
*
* @param type The action type to use for created actions.
* @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.
* If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.
*
* @public
*/
export function createAction<P = void, T extends string = string>(
type: T,
): PayloadActionCreator<P, T>
/**
* A utility function to create an action creator for the given action type
* string. The action creator accepts a single argument, which will be included
* in the action object as a field called payload. The action creator function
* will also have its toString() overridden so that it returns the action type.
*
* @param type The action type to use for created actions.
* @param prepare (optional) a method that takes any number of arguments and returns { payload } or { payload, meta }.
* If this is given, the resulting action creator will pass its arguments to this method to calculate payload & meta.
*
* @public
*/
export function createAction<
PA extends PrepareAction<any>,
T extends string = string,
>(
type: T,
prepareAction: PA,
): PayloadActionCreator<ReturnType<PA>['payload'], T, PA>
export function createAction(type: string, prepareAction?: Function): any {
function actionCreator(...args: any[]) {
if (prepareAction) {
let prepared = prepareAction(...args)
if (!prepared) {
throw new Error('prepareAction did not return an object')
}
return {
type,
payload: prepared.payload,
...('meta' in prepared && { meta: prepared.meta }),
...('error' in prepared && { error: prepared.error }),
}
}
return { type, payload: args[0] }
}
actionCreator.toString = () => `${type}`
actionCreator.type = type
actionCreator.match = (action: unknown): action is PayloadAction =>
isAction(action) && action.type === type
return actionCreator
}
/**
* Returns true if value is an RTK-like action creator, with a static type property and match method.
*/
export function isActionCreator(
action: unknown,
): action is BaseActionCreator<unknown, string> & Function {
return (
typeof action === 'function' &&
'type' in action &&
// hasMatchFunction only wants Matchers but I don't see the point in rewriting it
hasMatchFunction(action as any)
)
}
/**
* Returns true if value is an action with a string type and valid Flux Standard Action keys.
*/
export function isFSA(action: unknown): action is {
type: string
payload?: unknown
error?: unknown
meta?: unknown
} {
return isAction(action) && Object.keys(action).every(isValidKey)
}
function isValidKey(key: string) {
return ['type', 'payload', 'error', 'meta'].indexOf(key) > -1
}
// helper types for more readable typings
type IfPrepareActionMethodProvided<
PA extends PrepareAction<any> | void,
True,
False,
> = PA extends (...args: any[]) => any ? True : False
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"wC","8":"K D E F A B"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","8":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC","8":"6 7 8 9 TC J ZB K D E F A B C L M G N O P aB AB 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"J ZB K D E F A B C L","8":"M G N O P aB"},E:{"1":"K D E F A B C L M G 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"2C ZC","8":"J ZB 3C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F B FD GD HD ID","8":"C NC uC JD OC"},G:{"1":"E MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC","8":"KD vC LD"},H:{"2":"hD"},I:{"1":"I mD nD","8":"TC J iD jD kD lD vC"},J:{"1":"A","8":"D"},K:{"1":"H","2":"A B","8":"C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"8":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"srcdoc attribute for iframes",D:true};
@@ -0,0 +1,9 @@
import type { TSchema, SchemaOptions } from '../schema/index';
import { Kind } from '../symbols/index';
export interface TUndefined extends TSchema {
[Kind]: 'Undefined';
static: undefined;
type: 'undefined';
}
/** `[JavaScript]` Creates a Undefined type */
export declare function Undefined(options?: SchemaOptions): TUndefined;
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=self-closing-comp.d.ts.map
@@ -0,0 +1,54 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
useMeasure: () => useMeasure
});
module.exports = __toCommonJS(index_exports);
var import_react = require("react");
function useMeasure() {
const [dimensions, setDimensions] = (0, import_react.useState)({
width: null,
height: null
});
const previousObserver = (0, import_react.useRef)(null);
const customRef = (0, import_react.useCallback)((node) => {
if (previousObserver.current) {
previousObserver.current.disconnect();
previousObserver.current = null;
}
if ((node == null ? void 0 : node.nodeType) === Node.ELEMENT_NODE) {
const observer = new ResizeObserver(([entry]) => {
if (entry && entry.borderBoxSize) {
const { inlineSize: width, blockSize: height } = entry.borderBoxSize[0];
setDimensions({ width, height });
}
});
observer.observe(node);
previousObserver.current = observer;
}
}, []);
return [customRef, dimensions];
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
useMeasure
});
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_array_without_holes.cjs",
"module": "../../esm/_array_without_holes.js"
}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var documentRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {},
relatedConcepts: [{
concept: {
name: 'Device Independence Delivery Unit'
}
}, {
concept: {
name: 'html'
},
module: 'HTML'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure']]
};
var _default = exports.default = documentRole;
@@ -0,0 +1,10 @@
import InjectionToken from "../providers/injection-token";
/**
* Parameter decorator factory that allows for interface information to be stored in the constructor's metadata
*
* @return {Function} The parameter decorator
*/
declare function injectAll(token: InjectionToken<any>, options?: {
isOptional?: boolean;
}): (target: any, propertyKey: string | symbol | undefined, parameterIndex: number) => any;
export default injectAll;
@@ -0,0 +1,11 @@
"use strict";
/**
* Copyright (c) 2020, Microsoft Corporation (MIT License).
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getWorkerPipeName = void 0;
function getWorkerPipeName(conoutPipeName) {
return conoutPipeName + "-worker";
}
exports.getWorkerPipeName = getWorkerPipeName;
//# sourceMappingURL=conout.js.map
@@ -0,0 +1,132 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'non-nullable-type-assertion-style',
meta: {
type: 'suggestion',
docs: {
description: 'Enforce non-null assertions over explicit type assertions',
recommended: 'stylistic',
requiresTypeChecking: true,
},
fixable: 'code',
messages: {
preferNonNullAssertion: 'Use a ! assertion to more succinctly remove null and undefined from the type.',
},
schema: [],
},
defaultOptions: [],
create(context) {
const services = (0, util_1.getParserServices)(context);
const getTypesIfNotLoose = (node) => {
const type = services.getTypeAtLocation(node);
if (tsutils.isTypeFlagSet(type, ts.TypeFlags.Any | ts.TypeFlags.Unknown)) {
return undefined;
}
return tsutils.unionConstituents(type);
};
const couldBeNullish = (type) => {
if (type.flags & ts.TypeFlags.TypeParameter) {
const constraint = type.getConstraint();
return constraint == null || couldBeNullish(constraint);
}
if (tsutils.isUnionType(type)) {
for (const part of type.types) {
if (couldBeNullish(part)) {
return true;
}
}
return false;
}
return (type.flags & (ts.TypeFlags.Null | ts.TypeFlags.Undefined)) !== 0;
};
const sameTypeWithoutNullish = (assertedTypes, originalTypes) => {
const nonNullishOriginalTypes = originalTypes.filter(type => (type.flags & (ts.TypeFlags.Null | ts.TypeFlags.Undefined)) === 0);
if (nonNullishOriginalTypes.length === originalTypes.length) {
return false;
}
for (const assertedType of assertedTypes) {
if (couldBeNullish(assertedType) ||
!nonNullishOriginalTypes.includes(assertedType)) {
return false;
}
}
for (const originalType of nonNullishOriginalTypes) {
if (!assertedTypes.includes(originalType)) {
return false;
}
}
return true;
};
const isConstAssertion = (node) => {
return (node.typeAnnotation.type === utils_1.AST_NODE_TYPES.TSTypeReference &&
node.typeAnnotation.typeName.type === utils_1.AST_NODE_TYPES.Identifier &&
node.typeAnnotation.typeName.name === 'const');
};
return {
'TSAsExpression, TSTypeAssertion'(node) {
if (isConstAssertion(node)) {
return;
}
const originalTypes = getTypesIfNotLoose(node.expression);
if (!originalTypes) {
return;
}
const assertedTypes = getTypesIfNotLoose(node.typeAnnotation);
if (!assertedTypes) {
return;
}
if (sameTypeWithoutNullish(assertedTypes, originalTypes)) {
const expressionSourceCode = context.sourceCode.getText(node.expression);
const higherPrecedenceThanUnary = (0, util_1.getOperatorPrecedence)(services.esTreeNodeToTSNodeMap.get(node.expression).kind, ts.SyntaxKind.Unknown) > util_1.OperatorPrecedence.Unary;
context.report({
node,
messageId: 'preferNonNullAssertion',
fix(fixer) {
return fixer.replaceText(node, higherPrecedenceThanUnary
? `${expressionSourceCode}!`
: `(${expressionSourceCode})!`);
},
});
}
},
};
},
});
@@ -0,0 +1,40 @@
{
"name": "@react-stately/overlays",
"version": "3.6.20",
"description": "Spectrum UI components in React",
"license": "Apache-2.0",
"main": "dist/main.js",
"module": "dist/module.js",
"exports": {
"source": "./src/index.ts",
"types": [
"./dist/types.d.ts",
"./src/index.ts"
],
"import": "./dist/import.mjs",
"require": "./dist/main.js"
},
"types": "dist/types.d.ts",
"source": "src/index.ts",
"files": [
"dist",
"src"
],
"sideEffects": false,
"repository": {
"type": "git",
"url": "https://github.com/adobe/react-spectrum"
},
"dependencies": {
"@react-stately/utils": "^3.10.8",
"@react-types/overlays": "^3.9.2",
"@swc/helpers": "^0.5.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
},
"publishConfig": {
"access": "public"
},
"gitHead": "0bda51183baa23306342af32a82012ea0fe0f2dc"
}
@@ -0,0 +1,8 @@
'use strict';
var call = Function.prototype.call;
var $hasOwn = Object.prototype.hasOwnProperty;
var bind = require('function-bind');
/** @type {import('.')} */
module.exports = bind.call(call, $hasOwn);
@@ -0,0 +1,6 @@
export interface Opts {
algorithm: 'lookup' | 'best fit';
}
export declare function match(requestedLocales: readonly string[], availableLocales: readonly string[], defaultLocale: string, opts?: Opts): string;
export { LookupSupportedLocales } from './abstract/LookupSupportedLocales';
export { ResolveLocale } from './abstract/ResolveLocale';
@@ -0,0 +1,12 @@
/**
* DON'T EDIT THIS FILE.
* This file was generated by "scripts/update-lib-configs.js" script.
*/
"use strict"
module.exports = {
extends: [
require.resolve("./no-new-in-es2023-intl-api"),
require.resolve("./no-new-in-es2022-intl-api"),
],
}
@@ -0,0 +1,44 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { getRegExpCalls } = require("../utils")
module.exports = {
meta: {
docs: {
description: "disallow RegExp `u` flag.",
category: "ES2015",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-regexp-u-flag.html",
},
fixable: null,
messages: {
forbidden: "ES2015 RegExp 'u' flag is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Literal[regex]"(node) {
if (node.regex.flags.includes("u")) {
context.report({ node, messageId: "forbidden" })
}
},
"Program:exit"() {
const scope = context.getScope()
for (const { node, flags } of getRegExpCalls(scope)) {
if (flags && flags.includes("u")) {
context.report({ node, messageId: "forbidden" })
}
}
},
}
},
}
@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (C) 2014 Jordan Harband
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":"injectable.js","sourceRoot":"","sources":["../../../../src/metadata/decorators/injectable.ts"],"names":[],"mappings":";;AASA,gCAmBC;AA5BD,gFAA+E;AAG/E,gGAA6F;AAC7F,wEAAqE;AACrE,gIAA6H;AAC7H,qFAAkF;AAGlF,SAAgB,UAAU,CAAC,KAAoB;IAC7C,sEAAsE;IACtE,OAAO,CAAC,MAAgB,EAAQ,EAAE;QAChC,IAAA,yCAAmB,EAAC,MAAM,CAAC,CAAC;QAE5B,IAAA,iGAA+C,EAAC,MAAM,CAAC,CAAC;QAExD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,IAAA,iDAAwB,EACtB,MAAM,EACN,iDAAuB,EACvB,iDAAuB,EACvB,CAAC,QAA4B,EAAE,EAAE,CAAC,CAAC;gBACjC,GAAG,QAAQ;gBACX,KAAK;aACN,CAAC,CACH,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
{"version":3,"file":"import-type.js","sourceRoot":"","sources":["../../src/utils/import-type.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/env.ts","../src/utils/errors.ts","../src/utils/common.ts","../src/utils/plugins.ts","../src/core/scope.ts","../src/core/finalize.ts","../src/core/proxy.ts","../src/core/immerClass.ts","../src/core/current.ts","../src/plugins/patches.ts","../src/plugins/mapset.ts","../src/immer.ts"],"sourcesContent":["// Should be no imports here!\n\n/**\n * The sentinel value returned by producers to replace the draft with undefined.\n */\nexport const NOTHING: unique symbol = Symbol.for(\"immer-nothing\")\n\n/**\n * To let Immer treat your class instances as plain immutable objects\n * (albeit with a custom prototype), you must define either an instance property\n * or a static property on each of your custom classes.\n *\n * Otherwise, your class instance will never be drafted, which means it won't be\n * safe to mutate in a produce callback.\n */\nexport const DRAFTABLE: unique symbol = Symbol.for(\"immer-draftable\")\n\nexport const DRAFT_STATE: unique symbol = Symbol.for(\"immer-state\")\n","export const errors =\n\tprocess.env.NODE_ENV !== \"production\"\n\t\t? [\n\t\t\t\t// All error codes, starting by 0:\n\t\t\t\tfunction(plugin: string) {\n\t\t\t\t\treturn `The plugin for '${plugin}' has not been loaded into Immer. To enable the plugin, import and call \\`enable${plugin}()\\` when initializing your application.`\n\t\t\t\t},\n\t\t\t\tfunction(thing: string) {\n\t\t\t\t\treturn `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${thing}'`\n\t\t\t\t},\n\t\t\t\t\"This object has been frozen and should not be mutated\",\n\t\t\t\tfunction(data: any) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? \" +\n\t\t\t\t\t\tdata\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t\t\"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.\",\n\t\t\t\t\"Immer forbids circular references\",\n\t\t\t\t\"The first or second argument to `produce` must be a function\",\n\t\t\t\t\"The third argument to `produce` must be a function or undefined\",\n\t\t\t\t\"First argument to `createDraft` must be a plain object, an array, or an immerable object\",\n\t\t\t\t\"First argument to `finishDraft` must be a draft returned by `createDraft`\",\n\t\t\t\tfunction(thing: string) {\n\t\t\t\t\treturn `'current' expects a draft, got: ${thing}`\n\t\t\t\t},\n\t\t\t\t\"Object.defineProperty() cannot be used on an Immer draft\",\n\t\t\t\t\"Object.setPrototypeOf() cannot be used on an Immer draft\",\n\t\t\t\t\"Immer only supports deleting array indices\",\n\t\t\t\t\"Immer only supports setting array indices and the 'length' property\",\n\t\t\t\tfunction(thing: string) {\n\t\t\t\t\treturn `'original' expects a draft, got: ${thing}`\n\t\t\t\t}\n\t\t\t\t// Note: if more errors are added, the errorOffset in Patches.ts should be increased\n\t\t\t\t// See Patches.ts for additional errors\n\t\t ]\n\t\t: []\n\nexport function die(error: number, ...args: any[]): never {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst e = errors[error]\n\t\tconst msg = typeof e === \"function\" ? e.apply(null, args as any) : e\n\t\tthrow new Error(`[Immer] ${msg}`)\n\t}\n\tthrow new Error(\n\t\t`[Immer] minified error nr: ${error}. Full error at: https://bit.ly/3cXEKWf`\n\t)\n}\n","import {\n\tDRAFT_STATE,\n\tDRAFTABLE,\n\tObjectish,\n\tDrafted,\n\tAnyObject,\n\tAnyMap,\n\tAnySet,\n\tImmerState,\n\tArchType,\n\tdie,\n\tStrictMode\n} from \"../internal\"\n\nexport const getPrototypeOf = Object.getPrototypeOf\n\n/** Returns true if the given value is an Immer draft */\n/*#__PURE__*/\nexport function isDraft(value: any): boolean {\n\treturn !!value && !!value[DRAFT_STATE]\n}\n\n/** Returns true if the given value can be drafted by Immer */\n/*#__PURE__*/\nexport function isDraftable(value: any): boolean {\n\tif (!value) return false\n\treturn (\n\t\tisPlainObject(value) ||\n\t\tArray.isArray(value) ||\n\t\t!!value[DRAFTABLE] ||\n\t\t!!value.constructor?.[DRAFTABLE] ||\n\t\tisMap(value) ||\n\t\tisSet(value)\n\t)\n}\n\nconst objectCtorString = Object.prototype.constructor.toString()\nconst cachedCtorStrings = new WeakMap()\n/*#__PURE__*/\nexport function isPlainObject(value: any): boolean {\n\tif (!value || typeof value !== \"object\") return false\n\tconst proto = Object.getPrototypeOf(value)\n\tif (proto === null || proto === Object.prototype) return true\n\n\tconst Ctor =\n\t\tObject.hasOwnProperty.call(proto, \"constructor\") && proto.constructor\n\tif (Ctor === Object) return true\n\n\tif (typeof Ctor !== \"function\") return false\n\n\tlet ctorString = cachedCtorStrings.get(Ctor)\n\tif (ctorString === undefined) {\n\t\tctorString = Function.toString.call(Ctor)\n\t\tcachedCtorStrings.set(Ctor, ctorString)\n\t}\n\n\treturn ctorString === objectCtorString\n}\n\n/** Get the underlying object that is rLine truncated
@@ -0,0 +1,51 @@
import arraySome from './_arraySome.js';
import baseIteratee from './_baseIteratee.js';
import baseSome from './_baseSome.js';
import isArray from './isArray.js';
import isIterateeCall from './_isIterateeCall.js';
/**
* Checks if `predicate` returns truthy for **any** element of `collection`.
* Iteration is stopped once `predicate` returns truthy. The predicate is
* invoked with three arguments: (value, index|key, collection).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`.
* @example
*
* _.some([null, 0, 'yes', false], Boolean);
* // => true
*
* var users = [
* { 'user': 'barney', 'active': true },
* { 'user': 'fred', 'active': false }
* ];
*
* // The `_.matches` iteratee shorthand.
* _.some(users, { 'user': 'barney', 'active': false });
* // => false
*
* // The `_.matchesProperty` iteratee shorthand.
* _.some(users, ['active', false]);
* // => true
*
* // The `_.property` iteratee shorthand.
* _.some(users, 'active');
* // => true
*/
function some(collection, predicate, guard) {
var func = isArray(collection) ? arraySome : baseSome;
if (guard && isIterateeCall(collection, predicate, guard)) {
predicate = undefined;
}
return func(collection, baseIteratee(predicate, 3));
}
export default some;
@@ -0,0 +1,12 @@
import * as _heroui_system from '@heroui/system';
import { UseScrollShadowProps } from './use-scroll-shadow.js';
import '@heroui/use-data-scroll-overflow';
import 'react';
import '@heroui/theme';
import '@heroui/react-utils';
interface ScrollShadowProps extends UseScrollShadowProps {
}
declare const ScrollShadow: _heroui_system.InternalForwardRefRenderFunction<"div", ScrollShadowProps, never>;
export { ScrollShadowProps, ScrollShadow as default };
@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/env.ts","../src/utils/errors.ts","../src/utils/common.ts","../src/utils/plugins.ts","../src/core/scope.ts","../src/core/finalize.ts","../src/core/proxy.ts","../src/core/immerClass.ts","../src/core/current.ts","../src/plugins/patches.ts","../src/plugins/mapset.ts","../src/immer.ts"],"sourcesContent":["// Should be no imports here!\n\n/**\n * The sentinel value returned by producers to replace the draft with undefined.\n */\nexport const NOTHING: unique symbol = Symbol.for(\"immer-nothing\")\n\n/**\n * To let Immer treat your class instances as plain immutable objects\n * (albeit with a custom prototype), you must define either an instance property\n * or a static property on each of your custom classes.\n *\n * Otherwise, your class instance will never be drafted, which means it won't be\n * safe to mutate in a produce callback.\n */\nexport const DRAFTABLE: unique symbol = Symbol.for(\"immer-draftable\")\n\nexport const DRAFT_STATE: unique symbol = Symbol.for(\"immer-state\")\n","export const errors =\n\tprocess.env.NODE_ENV !== \"production\"\n\t\t? [\n\t\t\t\t// All error codes, starting by 0:\n\t\t\t\tfunction(plugin: string) {\n\t\t\t\t\treturn `The plugin for '${plugin}' has not been loaded into Immer. To enable the plugin, import and call \\`enable${plugin}()\\` when initializing your application.`\n\t\t\t\t},\n\t\t\t\tfunction(thing: string) {\n\t\t\t\t\treturn `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${thing}'`\n\t\t\t\t},\n\t\t\t\t\"This object has been frozen and should not be mutated\",\n\t\t\t\tfunction(data: any) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? \" +\n\t\t\t\t\t\tdata\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t\t\"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.\",\n\t\t\t\t\"Immer forbids circular references\",\n\t\t\t\t\"The first or second argument to `produce` must be a function\",\n\t\t\t\t\"The third argument to `produce` must be a function or undefined\",\n\t\t\t\t\"First argument to `createDraft` must be a plain object, an array, or an immerable object\",\n\t\t\t\t\"First argument to `finishDraft` must be a draft returned by `createDraft`\",\n\t\t\t\tfunction(thing: string) {\n\t\t\t\t\treturn `'current' expects a draft, got: ${thing}`\n\t\t\t\t},\n\t\t\t\t\"Object.defineProperty() cannot be used on an Immer draft\",\n\t\t\t\t\"Object.setPrototypeOf() cannot be used on an Immer draft\",\n\t\t\t\t\"Immer only supports deleting array indices\",\n\t\t\t\t\"Immer only supports setting array indices and the 'length' property\",\n\t\t\t\tfunction(thing: string) {\n\t\t\t\t\treturn `'original' expects a draft, got: ${thing}`\n\t\t\t\t}\n\t\t\t\t// Note: if more errors are added, the errorOffset in Patches.ts should be increased\n\t\t\t\t// See Patches.ts for additional errors\n\t\t ]\n\t\t: []\n\nexport function die(error: number, ...args: any[]): never {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst e = errors[error]\n\t\tconst msg = typeof e === \"function\" ? e.apply(null, args as any) : e\n\t\tthrow new Error(`[Immer] ${msg}`)\n\t}\n\tthrow new Error(\n\t\t`[Immer] minified error nr: ${error}. Full error at: https://bit.ly/3cXEKWf`\n\t)\n}\n","import {\n\tDRAFT_STATE,\n\tDRAFTABLE,\n\tObjectish,\n\tDrafted,\n\tAnyObject,\n\tAnyMap,\n\tAnySet,\n\tImmerState,\n\tArchType,\n\tdie,\n\tStrictMode\n} from \"../internal\"\n\nexport const getPrototypeOf = Object.getPrototypeOf\n\n/** Returns true if the given value is an Immer draft */\n/*#__PURE__*/\nexport function isDraft(value: any): boolean {\n\treturn !!value && !!value[DRAFT_STATE]\n}\n\n/** Returns true if the given value can be drafted by Immer */\n/*#__PURE__*/\nexport function isDraftable(value: any): boolean {\n\tif (!value) return false\n\treturn (\n\t\tisPlainObject(value) ||\n\t\tArray.isArray(value) ||\n\t\t!!value[DRAFTABLE] ||\n\t\t!!value.constructor?.[DRAFTABLE] ||\n\t\tisMap(value) ||\n\t\tisSet(value)\n\t)\n}\n\nconst objectCtorString = Object.prototype.constructor.toString()\nconst cachedCtorStrings = new WeakMap()\n/*#__PURE__*/\nexport function isPlainObject(value: any): boolean {\n\tif (!value || typeof value !== \"object\") return false\n\tconst proto = Object.getPrototypeOf(value)\n\tif (proto === null || proto === Object.prototype) return true\n\n\tconst Ctor =\n\t\tObject.hasOwnProperty.call(proto, \"constructor\") && proto.constructor\n\tif (Ctor === Object) return true\n\n\tif (typeof Ctor !== \"function\") return false\n\n\tlet ctorString = cachedCtorStrings.get(Ctor)\n\tif (ctorString === undefined) {\n\t\tctorString = Function.toString.call(Ctor)\n\t\tcachedCtorStrings.set(Ctor, ctorString)\n\t}\n\n\treturn ctorString === objectCtorString\n}\n\n/** Get the underlying object that is rLine truncated
@@ -0,0 +1,41 @@
import type {Root} from 'mdast'
import type {Options as ToMarkdownExtension} from 'mdast-util-to-markdown'
import type {Plugin} from 'unified'
import type {Options} from './lib/index.js'
export type {Options} from './lib/index.js'
/**
* Add support for serializing to markdown.
*
* @this
* Unified processor.
* @param
* Configuration (optional).
* @returns
* Nothing.
*/
declare const remarkStringify: Plugin<
[(Readonly<Options> | null | undefined)?],
Root,
string
>
export default remarkStringify
// Add custom settings supported when `remark-stringify` is added.
declare module 'unified' {
interface Settings extends Options {}
interface Data {
/**
* List of `mdast-util-to-markdown` extensions to use.
*
* This type is registered by `remark-stringify`.
* Values can be registered by remark plugins that extend
* `mdast-util-to-markdown`.
* See {@link ToMarkdownExtension | `Options`} from
* {@link https://github.com/syntax-tree/mdast-util-to-markdown#options | `mdast-util-to-markdown`}.
*/
toMarkdownExtensions?: ToMarkdownExtension[]
}
}
@@ -0,0 +1,210 @@
/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var React = require("react");
function formatProdErrorMessage(code) {
var url = "https://react.dev/errors/" + code;
if (1 < arguments.length) {
url += "?args[]=" + encodeURIComponent(arguments[1]);
for (var i = 2; i < arguments.length; i++)
url += "&args[]=" + encodeURIComponent(arguments[i]);
}
return (
"Minified React error #" +
code +
"; visit " +
url +
" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
);
}
function noop() {}
var Internals = {
d: {
f: noop,
r: function () {
throw Error(formatProdErrorMessage(522));
},
D: noop,
C: noop,
L: noop,
m: noop,
X: noop,
S: noop,
M: noop
},
p: 0,
findDOMNode: null
},
REACT_PORTAL_TYPE = Symbol.for("react.portal");
function createPortal$1(children, containerInfo, implementation) {
var key =
3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
return {
$$typeof: REACT_PORTAL_TYPE,
key: null == key ? null : "" + key,
children: children,
containerInfo: containerInfo,
implementation: implementation
};
}
var ReactSharedInternals =
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
function getCrossOriginStringAs(as, input) {
if ("font" === as) return "";
if ("string" === typeof input)
return "use-credentials" === input ? input : "";
}
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
Internals;
exports.createPortal = function (children, container) {
var key =
2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
if (
!container ||
(1 !== container.nodeType &&
9 !== container.nodeType &&
11 !== container.nodeType)
)
throw Error(formatProdErrorMessage(299));
return createPortal$1(children, container, null, key);
};
exports.flushSync = function (fn) {
var previousTransition = ReactSharedInternals.T,
previousUpdatePriority = Internals.p;
try {
if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn();
} finally {
(ReactSharedInternals.T = previousTransition),
(Internals.p = previousUpdatePriority),
Internals.d.f();
}
};
exports.preconnect = function (href, options) {
"string" === typeof href &&
(options
? ((options = options.crossOrigin),
(options =
"string" === typeof options
? "use-credentials" === options
? options
: ""
: void 0))
: (options = null),
Internals.d.C(href, options));
};
exports.prefetchDNS = function (href) {
"string" === typeof href && Internals.d.D(href);
};
exports.preinit = function (href, options) {
if ("string" === typeof href && options && "string" === typeof options.as) {
var as = options.as,
crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
integrity =
"string" === typeof options.integrity ? options.integrity : void 0,
fetchPriority =
"string" === typeof options.fetchPriority
? options.fetchPriority
: void 0;
"style" === as
? Internals.d.S(
href,
"string" === typeof options.precedence ? options.precedence : void 0,
{
crossOrigin: crossOrigin,
integrity: integrity,
fetchPriority: fetchPriority
}
)
: "script" === as &&
Internals.d.X(href, {
crossOrigin: crossOrigin,
integrity: integrity,
fetchPriority: fetchPriority,
nonce: "string" === typeof options.nonce ? options.nonce : void 0
});
}
};
exports.preinitModule = function (href, options) {
if ("string" === typeof href)
if ("object" === typeof options && null !== options) {
if (null == options.as || "script" === options.as) {
var crossOrigin = getCrossOriginStringAs(
options.as,
options.crossOrigin
);
Internals.d.M(href, {
crossOrigin: crossOrigin,
integrity:
"string" === typeof options.integrity ? options.integrity : void 0,
nonce: "string" === typeof options.nonce ? options.nonce : void 0
});
}
} else null == options && Internals.d.M(href);
};
exports.preload = function (href, options) {
if (
"string" === typeof href &&
"object" === typeof options &&
null !== options &&
"string" === typeof options.as
) {
var as = options.as,
crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
Internals.d.L(href, as, {
crossOrigin: crossOrigin,
integrity:
"string" === typeof options.integrity ? options.integrity : void 0,
nonce: "string" === typeof options.nonce ? options.nonce : void 0,
type: "string" === typeof options.type ? options.type : void 0,
fetchPriority:
"string" === typeof options.fetchPriority
? options.fetchPriority
: void 0,
referrerPolicy:
"string" === typeof options.referrerPolicy
? options.referrerPolicy
: void 0,
imageSrcSet:
"string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
imageSizes:
"string" === typeof options.imageSizes ? options.imageSizes : void 0,
media: "string" === typeof options.media ? options.media : void 0
});
}
};
exports.preloadModule = function (href, options) {
if ("string" === typeof href)
if (options) {
var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
Internals.d.m(href, {
as:
"string" === typeof options.as && "script" !== options.as
? options.as
: void 0,
crossOrigin: crossOrigin,
integrity:
"string" === typeof options.integrity ? options.integrity : void 0
});
} else Internals.d.m(href);
};
exports.requestFormReset = function (form) {
Internals.d.r(form);
};
exports.unstable_batchedUpdates = function (fn, a) {
return fn(a);
};
exports.useFormState = function (action, initialState, permalink) {
return ReactSharedInternals.H.useFormState(action, initialState, permalink);
};
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0";
@@ -0,0 +1,2 @@
export default function dayOfYear(date: Date): number;
export default function dayOfYear(date: Date, val: number): Date;
@@ -0,0 +1,3 @@
# @react-stately/form
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
@@ -0,0 +1,434 @@
flf2a$ 4 4 99 0 20
Bulbhead by Jef Poskanzer, 23jun94
Figlet release 2.0 -- August 5, 1993
____ __ __ __ ____ _ _ ____ __ ____
( _ \( )( )( ) ( _ \( )_( )( ___) /__\ ( _ \
) _ < )(__)( )(__ ) _ < ) _ ( )___) /(__)\ )(_) )
(____/(______)(____)(____/(_) (_)(____)(__)(__)(____/
Update February 12, 2002 by Markus Gebhard markus@jave.de
Added german umlauts
Explanation of first line:
flf2 - "magic number" for file identification
a - should always be `a', for now
$ - the "hardblank" -- prints as a blank, but can't be smushed
4 - height of a character
4 - height of a character, not including descenders
99 - max line length (excluding comment lines) + a fudge factor
0 - default smushmode for this font (like "-m 0" on command line)
13 - number of comment lines
$$@
$$@
$$@
$$@@
/\@
)(@
\/@
()@@
||@
@
@
@@
| | @
-|-|-@
-|-|-@
| | @@
_|_ @
/ |_)@
\_| \@
(_|_/@@
_ _ @
(_)/ ) @
/ /_ @
(_/(_)@@
_ @
( ) @
/_\/@
(__/\@@
/@
@
@
@@
_ @
/ )@
( ( @
\_)@@
_ @
( \ @
) )@
(_/ @@
@
\|/@
/|\@
@@
_ @
_| |_ @
(_ _)@
|_| @@
@
@
()@
/ @@
@
___ @
(___)@
@@
@
@
@
()@@
_ @
/ )@
/ / @
(_/ @@
___ @
/ _ \ @
( (_) )@
\___/ @@
__ @
/ )@
)( @
(__)@@
___ @
(__ \ @
/ _/ @
(____)@@
___ @
(__ )@
(_ \@
(___/@@
__ @
/. | @
(_ _)@
(_) @@
___ @
| __)@
|__ \@
(___/@@
_ @
/ ) @
/ _ \@
\___/@@
___ @
(__ )@
/ / @
(_/ @@
___ @
( _ )@
/ _ \@
\___/@@
___ @
/ _ \@
\_ /@
(_/ @@
@
()@
@
()@@
()@
@
()@
/ @@
__@
/ /@
< < @
\_\@@
___ @
(___)@
___ @
(___)@@
__ @
\ \ @
> >@
/_/ @@
___ @
(__ )@
(_/ @
(_) @@
__ @
/ \@
| ()/@
\__ @@
__ @
/__\ @
/(__)\ @
(__)(__)@@
____ @
( _ \@
) _ <@
(____/@@
___ @
/ __)@
( (__ @
\___)@@
____ @
( _ \ @
)(_) )@
(____/ @@
____ @
( ___)@
)__) @
(____)@@
____ @
( ___)@
)__) @
(__) @@
___ @
/ __)@
( (_-.@
\___/@@
_ _ @
( )_( )@
) _ ( @
(_) (_)@@
____ @
(_ _)@
_)(_ @
(____)@@
____ @
(_ _)@
.-_)( @
\____) @@
_ _ @
( )/ )@
) ( @
(_)\_)@@
__ @
( ) @
)(__ @
(____)@@
__ __ @
( \/ )@
) ( @
(_/\/\_)@@
_ _ @
( \( )@
) ( @
(_)\_)@@
_____ @
( _ )@
)(_)( @
(_____)@@
____ @
( _ \@
)___/@
(__) @@
_____ @
( _ )@
)(_)( @
(___/\\@@
____ @
( _ \@
) /@
(_)\_)@@
___ @
/ __)@
\__ \@
(___/@@
____ @
(_ _)@
)( @
(__) @@
__ __ @
( )( )@
)(__)( @
(______)@@
_ _ @
( \/ )@
\ / @
\/ @@
_ _ @
( \/\/ )@
) ( @
(__/\__)@@
_ _ @
( \/ )@
) ( @
(_/\_)@@
_ _ @
( \/ )@
\ / @
(__) @@
____ @
(_ )@
/ /_ @
(____)@@
__@
| @
| @
|__@@
_ @
( \ @
\ \ @
\_)@@
__ @
|@
|@
__|@@
/ \ @
(_^_)@
@
@@
@
@
___ @
(___)@@
\@
@
@
@@
__ @
/__\ @
/(__)\ @
(__)(__)@@
____ @
( _ \@
) _ <@
(____/@@
___ @
/ __)@
( (__ @
\___)@@
____ @
( _ \ @
)(_) )@
(____/ @@
____ @
( ___)@
)__) @
(____)@@
____ @
( ___)@
)__) @
(__) @@
___ @
/ __)@
( (_-.@
\___/@@
_ _ @
( )_( )@
) _ ( @
(_) (_)@@
____ @
(_ _)@
_)(_ @
(____)@@
____ @
(_ _)@
.-_)( @
\____) @@
_ _ @
( )/ )@
) ( @
(_)\_)@@
__ @
( ) @
)(__ @
(____)@@
__ __ @
( \/ )@
) ( @
(_/\/\_)@@
_ _ @
( \( )@
) ( @
(_)\_)@@
_____ @
( _ )@
)(_)( @
(_____)@@
____ @
( _ \@
)___/@
(__) @@
_____ @
( _ )@
)(_)( @
(___/\\@@
____ @
( _ \@
) /@
(_)\_)@@
___ @
/ __)@
\__ \@
(___/@@
____ @
(_ _)@
)( @
(__) @@
__ __ @
( )( )@
)(__)( @
(______)@@
_ _ @
( \/ )@
\ / @
\/ @@
_ _ @
( \/\/ )@
) ( @
(__/\__)@@
_ _ @
( \/ )@
) ( @
(_/\_)@@
_ _ @
( \/ )@
\ / @
(__) @@
____ @
(_ )@
/ /_ @
(____)@@
,-@
_| @
| @
`-@@
/\@
||@
||@
\/@@
-. @
|_@
| @
-' @@
@
/\/@
@
@@
(_)(_) @
/__\ @
/(__)\ @
(__)(__)@@
(_)_(_)@
( _ )@
)(_)( @
(_____)@@
(_)(_) @
( )( )@
)(__)( @
(______)@@
(_)(_) @
/__\ @
/(__)\ @
(__)(__)@@
(_)_(_)@
( _ )@
)(_)( @
(_____)@@
(_)(_) @
( )( )@
)(__)( @
(______)@@
___ @
/ _ )@
| _ \@
| __/@@
160 NO-BREAK SPACE
$@
$@
$@
$@@
@@ -0,0 +1 @@
{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,EAAE,MAAiC,CAAC;AAW5D,eAAO,MAAM,YAAY,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAWoB,CAAC;AAE9E;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA0B/C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,EAAE,OAAO,SAAqB,CAAC;AAqClD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAG1C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAQ3C,CAAC;AAEN;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAQ1C,CAAC"}
@@ -0,0 +1 @@
{"name":"to-regex-range","version":"5.0.1","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532095975,"integrity":"sha512-zlZYLSMJ/76S9XdGAr7U0yMS0qBIjjxB7XhmAiClnZKrYluV9TxI0kBcO1facwkzd0z3ODxnE9Un+mMw3lQtOQ==","mode":420,"size":1782},"index.js":{"checkedAt":1794532095975,"integrity":"sha512-JMYr5eOrhipP/PRAjNzQr5uzafHqVsnTfk+BKQaAl+mLjFQOdTX87XPpWCZ+gro5jzaS/f2yuehmFRcXqZHFsg==","mode":420,"size":6481},"LICENSE":{"checkedAt":1794532095975,"integrity":"sha512-Vdy8f/8awcR1X0y/JLoh4NyuBiyALT25N9K2GC9FVN2F0UUpoMlojqyCWjRbY6uLLl12meK+BxeN9buKByI16w==","mode":420,"size":1091},"README.md":{"checkedAt":1794532095975,"integrity":"sha512-1eNfRl/cJscHQ+kapjKxPBsM395iFEyox/IV54fJlmUmd9Xm7ihwFzViWgMa+j/SXfIK5oBDm6f9jSyxHm860A==","mode":420,"size":13585}}}
@@ -0,0 +1,59 @@
# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute)
> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com)
## Install
```
$ npm install --save path-is-absolute
```
## Usage
```js
const pathIsAbsolute = require('path-is-absolute');
// Running on Linux
pathIsAbsolute('/home/foo');
//=> true
pathIsAbsolute('C:/Users/foo');
//=> false
// Running on Windows
pathIsAbsolute('C:/Users/foo');
//=> true
pathIsAbsolute('/home/foo');
//=> false
// Running on any OS
pathIsAbsolute.posix('/home/foo');
//=> true
pathIsAbsolute.posix('C:/Users/foo');
//=> false
pathIsAbsolute.win32('C:/Users/foo');
//=> true
pathIsAbsolute.win32('/home/foo');
//=> false
```
## API
See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path).
### pathIsAbsolute(path)
### pathIsAbsolute.posix(path)
POSIX specific version.
### pathIsAbsolute.win32(path)
Windows specific version.
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)
@@ -0,0 +1 @@
{"version":3,"file":"getRuleValue.d.ts","sourceRoot":"","sources":["../../src/logic/getRuleValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,sBAAsB,EACvB,MAAM,UAAU,CAAC;yBAKF,CAAC,SAAS,eAAe,EACvC,OAAO,cAAc,CAAC,CAAC,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC;AADtD,wBAWe"}
@@ -0,0 +1,150 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __asyncValues = (this && this.__asyncValues) || function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.replaceAliasString = exports.replaceAlias = exports.importReplacers = void 0;
const fs_1 = require("fs");
const mylas_1 = require("mylas");
const path_1 = require("path");
const utils_1 = require("../utils");
const normalizePath = require("normalize-path");
function importReplacers(config, replacers, cmdReplacers) {
var _a, e_1, _b, _c;
var _d;
return __awaiter(this, void 0, void 0, function* () {
var _e;
config.output.debug('Started loading replacers');
const dir = process.cwd();
const node_modules = mylas_1.Dir.nodeModules({ cwd: dir });
config.output.debug('Found node_modules:', node_modules);
const defaultReplacers = {
default: {
enabled: true
},
'base-url': {
enabled: !!config.baseUrl
}
};
let merged = Object.assign(Object.assign({}, defaultReplacers), replacers);
config.output.debug('Added replacers to list from command-line filepaths:', cmdReplacers);
cmdReplacers === null || cmdReplacers === void 0 ? void 0 : cmdReplacers.forEach((v) => {
merged[v] = {
enabled: true,
file: v
};
});
config.output.debug('Reading replacers config');
const entries = Object.entries(merged);
try {
for (var _f = true, entries_1 = __asyncValues(entries), entries_1_1; entries_1_1 = yield entries_1.next(), _a = entries_1_1.done, !_a;) {
_c = entries_1_1.value;
_f = false;
try {
const replacer = _c;
if (replacer[1].enabled) {
if (Object.keys(defaultReplacers).includes(replacer[0])) {
config.output.debug('Loading default replacer:', replacer);
const replacerModule = yield (_e = `../replacers/${replacer[0]}.replacer`, Promise.resolve().then(() => require(_e)));
config.replacers.push(replacerModule.default);
}
const file = (_d = replacer[1]) === null || _d === void 0 ? void 0 : _d.file;
if (!file) {
config.output.debug('Replacer has no file:', replacer);
continue;
}
const tryImportReplacer = (targetPath) => __awaiter(this, void 0, void 0, function* () {
var _j;
const replacerModule = yield (_j = targetPath, Promise.resolve().then(() => require(_j)));
config.output.debug('Imported replacerModule:', replacerModule);
const replacerFunction = replacerModule.default;
if (typeof replacerFunction == 'function') {
config.replacers.push(replacerFunction);
config.output.info(`Added replacer "${file}"`);
}
else {
config.output.error(`Failed to import replacer "${file}", not in replacer format.`);
}
});
const isRelativePath = !(0, path_1.isAbsolute)(file);
const path = isRelativePath ? normalizePath((0, path_1.join)(dir, file)) : file;
if ((0, fs_1.existsSync)(path)) {
try {
yield tryImportReplacer(path);
config.output.debug('Imported replacer:', path);
continue;
}
catch (_g) { }
}
if (isRelativePath) {
for (const targetPath of node_modules.map((v) => (0, path_1.join)(dir, v, file))) {
try {
yield tryImportReplacer(targetPath);
config.output.debug('Imported replacer:', targetPath);
continue;
}
catch (_h) { }
}
}
config.output.error(`Failed to import replacer "${file}"`);
}
}
finally {
_f = true;
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (!_f && !_a && (_b = entries_1.return)) yield _b.call(entries_1);
}
finally { if (e_1) throw e_1.error; }
}
config.output.debug('Loaded replacers:', config.replacers);
});
}
exports.importReplacers = importReplacers;
function replaceAlias(config, file, resolveFullPath, resolveFullExtension) {
return __awaiter(this, void 0, void 0, function* () {
config.output.debug('Starting to replace file:', file);
const code = yield fs_1.promises.readFile(file, 'utf8');
const tempCode = replaceAliasString(config, file, code, resolveFullPath, resolveFullExtension);
if (code !== tempCode) {
config.output.debug('replaced file with changes:', file);
yield fs_1.promises.writeFile(file, tempCode, 'utf8');
return true;
}
config.output.debug('replaced file without changes:', file);
return false;
});
}
exports.replaceAlias = replaceAlias;
function replaceAliasString(config, file, code, resolveFullPath, resolveFullExtension) {
config.replacers.forEach((replacer) => {
code = (0, utils_1.replaceSourceImportPaths)(code, file, (orig) => replacer({
orig,
file,
config
}));
});
if (resolveFullPath) {
code = (0, utils_1.resolveFullImportPaths)(code, file, resolveFullExtension);
}
return code;
}
exports.replaceAliasString = replaceAliasString;
//# sourceMappingURL=replacers.js.map
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more