first commit

This commit is contained in:
2026-01-09 23:05:52 -05:00
commit dec0c8e4e4
4203 changed files with 824454 additions and 0 deletions

27
node_modules/oniguruma-to-es/dist/esm/generate.d.ts generated vendored Normal file
View File

@@ -0,0 +1,27 @@
/**
@import {ToRegExpOptions} from './index.js';
@import {RegexPlusAst} from './transform.js';
@import {AlternativeNode, AssertionNode, BackreferenceNode, CapturingGroupNode, CharacterClassNode, CharacterClassRangeNode, CharacterNode, CharacterSetNode, FlagsNode, GroupNode, LookaroundAssertionNode, Node, QuantifierNode, SubroutineNode} from 'oniguruma-parser/parser';
@import {Visitor} from 'oniguruma-parser/traverser';
*/
/**
Generates a Regex+ compatible `pattern`, `flags`, and `options` from a Regex+ AST.
@param {RegexPlusAst} ast
@param {ToRegExpOptions} [options]
@returns {{
pattern: string;
flags: string;
options: Object;
_captureTransfers: Map<number, Array<number>>;
_hiddenCaptures: Array<number>;
}}
*/
export function generate(ast: RegexPlusAst, options?: ToRegExpOptions): {
pattern: string;
flags: string;
options: any;
_captureTransfers: Map<number, Array<number>>;
_hiddenCaptures: Array<number>;
};
import type { RegexPlusAst } from './transform.js';
import type { ToRegExpOptions } from './index.js';

64
node_modules/oniguruma-to-es/dist/esm/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,64 @@
export type ToRegExpOptions = {
accuracy?: "default" | "strict";
avoidSubclass?: boolean;
flags?: string;
global?: boolean;
hasIndices?: boolean;
lazyCompileLength?: number;
rules?: {
allowOrphanBackrefs?: boolean;
asciiWordBoundaries?: boolean;
captureGroup?: boolean;
recursionLimit?: number;
singleline?: boolean;
};
target?: "auto" | "ES2025" | "ES2024" | "ES2018";
verbose?: boolean;
};
import { EmulatedRegExp } from './subclass.js';
/**
@import {EmulatedRegExpOptions} from './subclass.js';
*/
/**
@typedef {{
accuracy?: keyof Accuracy;
avoidSubclass?: boolean;
flags?: string;
global?: boolean;
hasIndices?: boolean;
lazyCompileLength?: number;
rules?: {
allowOrphanBackrefs?: boolean;
asciiWordBoundaries?: boolean;
captureGroup?: boolean;
recursionLimit?: number;
singleline?: boolean;
};
target?: keyof Target;
verbose?: boolean;
}} ToRegExpOptions
*/
/**
Accepts an Oniguruma pattern and returns an equivalent JavaScript `RegExp`.
@param {string} pattern Oniguruma regex pattern.
@param {ToRegExpOptions} [options]
@returns {RegExp | EmulatedRegExp}
*/
export function toRegExp(pattern: string, options?: ToRegExpOptions): RegExp | EmulatedRegExp;
/**
Accepts an Oniguruma pattern and returns the details for an equivalent JavaScript `RegExp`.
@param {string} pattern Oniguruma regex pattern.
@param {ToRegExpOptions} [options]
@returns {{
pattern: string;
flags: string;
options?: EmulatedRegExpOptions;
}}
*/
export function toRegExpDetails(pattern: string, options?: ToRegExpOptions): {
pattern: string;
flags: string;
options?: EmulatedRegExpOptions;
};
import type { EmulatedRegExpOptions } from './subclass.js';
export { EmulatedRegExp };

1876
node_modules/oniguruma-to-es/dist/esm/index.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

7
node_modules/oniguruma-to-es/dist/esm/index.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

26
node_modules/oniguruma-to-es/dist/esm/options.d.ts generated vendored Normal file
View File

@@ -0,0 +1,26 @@
export namespace Accuracy {
let _default: "default";
export { _default as default };
export let strict: "strict";
}
export namespace EsVersion {
let ES2025: number;
let ES2024: number;
let ES2018: number;
}
/**
Returns a complete set of options, with default values set for options that weren't provided.
@param {ToRegExpOptions} [options]
@returns {Required<ToRegExpOptions>}
*/
export function getOptions(options?: ToRegExpOptions): Required<ToRegExpOptions>;
export namespace Target {
export let auto: "auto";
let ES2025_1: "ES2025";
export { ES2025_1 as ES2025 };
let ES2024_1: "ES2024";
export { ES2024_1 as ES2024 };
let ES2018_1: "ES2018";
export { ES2018_1 as ES2018 };
}
import type { ToRegExpOptions } from './index.js';

1
node_modules/oniguruma-to-es/dist/esm/package.json generated vendored Normal file
View File

@@ -0,0 +1 @@
{"type":"module"}

39
node_modules/oniguruma-to-es/dist/esm/subclass.d.ts generated vendored Normal file
View File

@@ -0,0 +1,39 @@
export type EmulatedRegExpOptions = {
hiddenCaptures?: Array<number>;
lazyCompile?: boolean;
strategy?: string | null;
transfers?: Array<[number, Array<number>]>;
};
/**
@typedef {{
hiddenCaptures?: Array<number>;
lazyCompile?: boolean;
strategy?: string | null;
transfers?: Array<[number, Array<number>]>;
}} EmulatedRegExpOptions
*/
/**
Works the same as JavaScript's native `RegExp` constructor in all contexts, but can be given
results from `toRegExpDetails` to produce the same result as `toRegExp`.
*/
export class EmulatedRegExp extends RegExp {
/**
@overload
@param {string} pattern
@param {string} [flags]
@param {EmulatedRegExpOptions} [options]
*/
constructor(pattern: string, flags?: string, options?: EmulatedRegExpOptions);
/**
@overload
@param {EmulatedRegExp} pattern
@param {string} [flags]
*/
constructor(pattern: EmulatedRegExp, flags?: string);
/**
Can be used to serialize the instance.
@type {EmulatedRegExpOptions}
*/
rawOptions: EmulatedRegExpOptions;
#private;
}

52
node_modules/oniguruma-to-es/dist/esm/transform.d.ts generated vendored Normal file
View File

@@ -0,0 +1,52 @@
export type RegexPlusAst = createAlternative & {
options: {
disable: {
[key: string]: boolean;
};
force: {
[key: string]: boolean;
};
};
_originMap: Map<createAlternative, createAlternative>;
_strategy: string | null;
};
/**
@import {CapturingGroupNode, OnigurumaAst, Node} from 'oniguruma-parser/parser';
@import {Visitor} from 'oniguruma-parser/traverser';
*/
/**
@typedef {
OnigurumaAst & {
options: {
disable: {[key: string]: boolean};
force: {[key: string]: boolean};
};
_originMap: Map<CapturingGroupNode, CapturingGroupNode>;
_strategy: string | null;
}
} RegexPlusAst
*/
/**
Transforms an Oniguruma AST in-place to a [Regex+](https://github.com/slevithan/regex) AST.
Assumes target ES2025, expecting the generator to down-convert to the desired JS target version.
Regex+'s syntax and behavior is a strict superset of native JavaScript, so the AST is very close
to representing native ES2025 `RegExp` but with some added features (atomic groups, possessive
quantifiers, recursion). The AST doesn't use some of Regex+'s extended features like flag x or
subroutines because they follow PCRE behavior and work somewhat differently than in Oniguruma. The
AST represents what's needed to precisely reproduce Oniguruma behavior using Regex+.
@param {OnigurumaAst} ast
@param {{
accuracy?: keyof Accuracy;
asciiWordBoundaries?: boolean;
avoidSubclass?: boolean;
bestEffortTarget?: keyof Target;
}} [options]
@returns {RegexPlusAst}
*/
export function transform(ast: createAlternative, options?: {
accuracy?: "default" | "strict";
asciiWordBoundaries?: boolean;
avoidSubclass?: boolean;
bestEffortTarget?: "auto" | "ES2025" | "ES2024" | "ES2018";
}): RegexPlusAst;

6
node_modules/oniguruma-to-es/dist/esm/unicode.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
export const asciiSpaceChar: "[\t-\r ]";
export const defaultWordChar: string;
export function getIgnoreCaseMatchChars(char: any): any[];
export const JsUnicodePropertyMap: Map<any, string>;
export const PosixClassMap: Map<string, string>;
export const UnicodePropertiesWithSpecificCase: Set<string>;

23
node_modules/oniguruma-to-es/dist/esm/utils.d.ts generated vendored Normal file
View File

@@ -0,0 +1,23 @@
export const cp: (...codePoints: number[]) => string;
export namespace envFlags {
let bugFlagVLiteralHyphenIsRange: boolean;
let bugNestedClassIgnoresNegation: boolean;
}
export function getNewCurrentFlags(current: any, { enable, disable }: {
enable: any;
disable: any;
}): {
dotAll: boolean;
ignoreCase: boolean;
};
export function getOrInsert(map: any, key: any, defaultValue: any): any;
/**
@param {keyof Target} target
@param {keyof Target} min
@returns {boolean}
*/
export function isMinTarget(target: "auto" | "ES2025" | "ES2024" | "ES2018", min: "auto" | "ES2025" | "ES2024" | "ES2018"): boolean;
export const r: (template: {
raw: readonly string[] | ArrayLike<string>;
}, ...substitutions: any[]) => string;
export function throwIfNullish(value: any, msg: any): any;