first commit
This commit is contained in:
21
node_modules/@types/estree/LICENSE
generated
vendored
Normal file
21
node_modules/@types/estree/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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
|
||||
15
node_modules/@types/estree/README.md
generated
vendored
Normal file
15
node_modules/@types/estree/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/estree`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for estree (https://github.com/estree/estree).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Fri, 06 Jun 2025 00:04:33 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [RReverser](https://github.com/RReverser).
|
||||
167
node_modules/@types/estree/flow.d.ts
generated
vendored
Normal file
167
node_modules/@types/estree/flow.d.ts
generated
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
declare namespace ESTree {
|
||||
interface FlowTypeAnnotation extends Node {}
|
||||
|
||||
interface FlowBaseTypeAnnotation extends FlowTypeAnnotation {}
|
||||
|
||||
interface FlowLiteralTypeAnnotation extends FlowTypeAnnotation, Literal {}
|
||||
|
||||
interface FlowDeclaration extends Declaration {}
|
||||
|
||||
interface AnyTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface ArrayTypeAnnotation extends FlowTypeAnnotation {
|
||||
elementType: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface BooleanLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
|
||||
|
||||
interface BooleanTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface ClassImplements extends Node {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterInstantiation | null;
|
||||
}
|
||||
|
||||
interface ClassProperty {
|
||||
key: Expression;
|
||||
value?: Expression | null;
|
||||
typeAnnotation?: TypeAnnotation | null;
|
||||
computed: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface DeclareClass extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
body: ObjectTypeAnnotation;
|
||||
extends: InterfaceExtends[];
|
||||
}
|
||||
|
||||
interface DeclareFunction extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
interface DeclareModule extends FlowDeclaration {
|
||||
id: Literal | Identifier;
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
interface DeclareVariable extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
interface FunctionTypeAnnotation extends FlowTypeAnnotation {
|
||||
params: FunctionTypeParam[];
|
||||
returnType: FlowTypeAnnotation;
|
||||
rest?: FunctionTypeParam | null;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
}
|
||||
|
||||
interface FunctionTypeParam {
|
||||
name: Identifier;
|
||||
typeAnnotation: FlowTypeAnnotation;
|
||||
optional: boolean;
|
||||
}
|
||||
|
||||
interface GenericTypeAnnotation extends FlowTypeAnnotation {
|
||||
id: Identifier | QualifiedTypeIdentifier;
|
||||
typeParameters?: TypeParameterInstantiation | null;
|
||||
}
|
||||
|
||||
interface InterfaceExtends extends Node {
|
||||
id: Identifier | QualifiedTypeIdentifier;
|
||||
typeParameters?: TypeParameterInstantiation | null;
|
||||
}
|
||||
|
||||
interface InterfaceDeclaration extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
extends: InterfaceExtends[];
|
||||
body: ObjectTypeAnnotation;
|
||||
}
|
||||
|
||||
interface IntersectionTypeAnnotation extends FlowTypeAnnotation {
|
||||
types: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface NullableTypeAnnotation extends FlowTypeAnnotation {
|
||||
typeAnnotation: TypeAnnotation;
|
||||
}
|
||||
|
||||
interface NumberLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
|
||||
|
||||
interface NumberTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface StringLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
|
||||
|
||||
interface StringTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface TupleTypeAnnotation extends FlowTypeAnnotation {
|
||||
types: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface TypeofTypeAnnotation extends FlowTypeAnnotation {
|
||||
argument: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeAlias extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
right: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeAnnotation extends Node {
|
||||
typeAnnotation: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeCastExpression extends Expression {
|
||||
expression: Expression;
|
||||
typeAnnotation: TypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeParameterDeclaration extends Node {
|
||||
params: Identifier[];
|
||||
}
|
||||
|
||||
interface TypeParameterInstantiation extends Node {
|
||||
params: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface ObjectTypeAnnotation extends FlowTypeAnnotation {
|
||||
properties: ObjectTypeProperty[];
|
||||
indexers: ObjectTypeIndexer[];
|
||||
callProperties: ObjectTypeCallProperty[];
|
||||
}
|
||||
|
||||
interface ObjectTypeCallProperty extends Node {
|
||||
value: FunctionTypeAnnotation;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface ObjectTypeIndexer extends Node {
|
||||
id: Identifier;
|
||||
key: FlowTypeAnnotation;
|
||||
value: FlowTypeAnnotation;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface ObjectTypeProperty extends Node {
|
||||
key: Expression;
|
||||
value: FlowTypeAnnotation;
|
||||
optional: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface QualifiedTypeIdentifier extends Node {
|
||||
qualification: Identifier | QualifiedTypeIdentifier;
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
interface UnionTypeAnnotation extends FlowTypeAnnotation {
|
||||
types: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
}
|
||||
694
node_modules/@types/estree/index.d.ts
generated
vendored
Normal file
694
node_modules/@types/estree/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,694 @@
|
||||
// This definition file follows a somewhat unusual format. ESTree allows
|
||||
// runtime type checks based on the `type` parameter. In order to explain this
|
||||
// to typescript we want to use discriminated union types:
|
||||
// https://github.com/Microsoft/TypeScript/pull/9163
|
||||
//
|
||||
// For ESTree this is a bit tricky because the high level interfaces like
|
||||
// Node or Function are pulling double duty. We want to pass common fields down
|
||||
// to the interfaces that extend them (like Identifier or
|
||||
// ArrowFunctionExpression), but you can't extend a type union or enforce
|
||||
// common fields on them. So we've split the high level interfaces into two
|
||||
// types, a base type which passes down inherited fields, and a type union of
|
||||
// all types which extend the base type. Only the type union is exported, and
|
||||
// the union is how other types refer to the collection of inheriting types.
|
||||
//
|
||||
// This makes the definitions file here somewhat more difficult to maintain,
|
||||
// but it has the notable advantage of making ESTree much easier to use as
|
||||
// an end user.
|
||||
|
||||
export interface BaseNodeWithoutComments {
|
||||
// Every leaf interface that extends BaseNode must specify a type property.
|
||||
// The type property should be a string literal. For example, Identifier
|
||||
// has: `type: "Identifier"`
|
||||
type: string;
|
||||
loc?: SourceLocation | null | undefined;
|
||||
range?: [number, number] | undefined;
|
||||
}
|
||||
|
||||
export interface BaseNode extends BaseNodeWithoutComments {
|
||||
leadingComments?: Comment[] | undefined;
|
||||
trailingComments?: Comment[] | undefined;
|
||||
}
|
||||
|
||||
export interface NodeMap {
|
||||
AssignmentProperty: AssignmentProperty;
|
||||
CatchClause: CatchClause;
|
||||
Class: Class;
|
||||
ClassBody: ClassBody;
|
||||
Expression: Expression;
|
||||
Function: Function;
|
||||
Identifier: Identifier;
|
||||
Literal: Literal;
|
||||
MethodDefinition: MethodDefinition;
|
||||
ModuleDeclaration: ModuleDeclaration;
|
||||
ModuleSpecifier: ModuleSpecifier;
|
||||
Pattern: Pattern;
|
||||
PrivateIdentifier: PrivateIdentifier;
|
||||
Program: Program;
|
||||
Property: Property;
|
||||
PropertyDefinition: PropertyDefinition;
|
||||
SpreadElement: SpreadElement;
|
||||
Statement: Statement;
|
||||
Super: Super;
|
||||
SwitchCase: SwitchCase;
|
||||
TemplateElement: TemplateElement;
|
||||
VariableDeclarator: VariableDeclarator;
|
||||
}
|
||||
|
||||
export type Node = NodeMap[keyof NodeMap];
|
||||
|
||||
export interface Comment extends BaseNodeWithoutComments {
|
||||
type: "Line" | "Block";
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface SourceLocation {
|
||||
source?: string | null | undefined;
|
||||
start: Position;
|
||||
end: Position;
|
||||
}
|
||||
|
||||
export interface Position {
|
||||
/** >= 1 */
|
||||
line: number;
|
||||
/** >= 0 */
|
||||
column: number;
|
||||
}
|
||||
|
||||
export interface Program extends BaseNode {
|
||||
type: "Program";
|
||||
sourceType: "script" | "module";
|
||||
body: Array<Directive | Statement | ModuleDeclaration>;
|
||||
comments?: Comment[] | undefined;
|
||||
}
|
||||
|
||||
export interface Directive extends BaseNode {
|
||||
type: "ExpressionStatement";
|
||||
expression: Literal;
|
||||
directive: string;
|
||||
}
|
||||
|
||||
export interface BaseFunction extends BaseNode {
|
||||
params: Pattern[];
|
||||
generator?: boolean | undefined;
|
||||
async?: boolean | undefined;
|
||||
// The body is either BlockStatement or Expression because arrow functions
|
||||
// can have a body that's either. FunctionDeclarations and
|
||||
// FunctionExpressions have only BlockStatement bodies.
|
||||
body: BlockStatement | Expression;
|
||||
}
|
||||
|
||||
export type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
|
||||
|
||||
export type Statement =
|
||||
| ExpressionStatement
|
||||
| BlockStatement
|
||||
| StaticBlock
|
||||
| EmptyStatement
|
||||
| DebuggerStatement
|
||||
| WithStatement
|
||||
| ReturnStatement
|
||||
| LabeledStatement
|
||||
| BreakStatement
|
||||
| ContinueStatement
|
||||
| IfStatement
|
||||
| SwitchStatement
|
||||
| ThrowStatement
|
||||
| TryStatement
|
||||
| WhileStatement
|
||||
| DoWhileStatement
|
||||
| ForStatement
|
||||
| ForInStatement
|
||||
| ForOfStatement
|
||||
| Declaration;
|
||||
|
||||
export interface BaseStatement extends BaseNode {}
|
||||
|
||||
export interface EmptyStatement extends BaseStatement {
|
||||
type: "EmptyStatement";
|
||||
}
|
||||
|
||||
export interface BlockStatement extends BaseStatement {
|
||||
type: "BlockStatement";
|
||||
body: Statement[];
|
||||
innerComments?: Comment[] | undefined;
|
||||
}
|
||||
|
||||
export interface StaticBlock extends Omit<BlockStatement, "type"> {
|
||||
type: "StaticBlock";
|
||||
}
|
||||
|
||||
export interface ExpressionStatement extends BaseStatement {
|
||||
type: "ExpressionStatement";
|
||||
expression: Expression;
|
||||
}
|
||||
|
||||
export interface IfStatement extends BaseStatement {
|
||||
type: "IfStatement";
|
||||
test: Expression;
|
||||
consequent: Statement;
|
||||
alternate?: Statement | null | undefined;
|
||||
}
|
||||
|
||||
export interface LabeledStatement extends BaseStatement {
|
||||
type: "LabeledStatement";
|
||||
label: Identifier;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface BreakStatement extends BaseStatement {
|
||||
type: "BreakStatement";
|
||||
label?: Identifier | null | undefined;
|
||||
}
|
||||
|
||||
export interface ContinueStatement extends BaseStatement {
|
||||
type: "ContinueStatement";
|
||||
label?: Identifier | null | undefined;
|
||||
}
|
||||
|
||||
export interface WithStatement extends BaseStatement {
|
||||
type: "WithStatement";
|
||||
object: Expression;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface SwitchStatement extends BaseStatement {
|
||||
type: "SwitchStatement";
|
||||
discriminant: Expression;
|
||||
cases: SwitchCase[];
|
||||
}
|
||||
|
||||
export interface ReturnStatement extends BaseStatement {
|
||||
type: "ReturnStatement";
|
||||
argument?: Expression | null | undefined;
|
||||
}
|
||||
|
||||
export interface ThrowStatement extends BaseStatement {
|
||||
type: "ThrowStatement";
|
||||
argument: Expression;
|
||||
}
|
||||
|
||||
export interface TryStatement extends BaseStatement {
|
||||
type: "TryStatement";
|
||||
block: BlockStatement;
|
||||
handler?: CatchClause | null | undefined;
|
||||
finalizer?: BlockStatement | null | undefined;
|
||||
}
|
||||
|
||||
export interface WhileStatement extends BaseStatement {
|
||||
type: "WhileStatement";
|
||||
test: Expression;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface DoWhileStatement extends BaseStatement {
|
||||
type: "DoWhileStatement";
|
||||
body: Statement;
|
||||
test: Expression;
|
||||
}
|
||||
|
||||
export interface ForStatement extends BaseStatement {
|
||||
type: "ForStatement";
|
||||
init?: VariableDeclaration | Expression | null | undefined;
|
||||
test?: Expression | null | undefined;
|
||||
update?: Expression | null | undefined;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface BaseForXStatement extends BaseStatement {
|
||||
left: VariableDeclaration | Pattern;
|
||||
right: Expression;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface ForInStatement extends BaseForXStatement {
|
||||
type: "ForInStatement";
|
||||
}
|
||||
|
||||
export interface DebuggerStatement extends BaseStatement {
|
||||
type: "DebuggerStatement";
|
||||
}
|
||||
|
||||
export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
|
||||
|
||||
export interface BaseDeclaration extends BaseStatement {}
|
||||
|
||||
export interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration {
|
||||
type: "FunctionDeclaration";
|
||||
/** It is null when a function declaration is a part of the `export default function` statement */
|
||||
id: Identifier | null;
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
export interface FunctionDeclaration extends MaybeNamedFunctionDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
export interface VariableDeclaration extends BaseDeclaration {
|
||||
type: "VariableDeclaration";
|
||||
declarations: VariableDeclarator[];
|
||||
kind: "var" | "let" | "const" | "using" | "await using";
|
||||
}
|
||||
|
||||
export interface VariableDeclarator extends BaseNode {
|
||||
type: "VariableDeclarator";
|
||||
id: Pattern;
|
||||
init?: Expression | null | undefined;
|
||||
}
|
||||
|
||||
export interface ExpressionMap {
|
||||
ArrayExpression: ArrayExpression;
|
||||
ArrowFunctionExpression: ArrowFunctionExpression;
|
||||
AssignmentExpression: AssignmentExpression;
|
||||
AwaitExpression: AwaitExpression;
|
||||
BinaryExpression: BinaryExpression;
|
||||
CallExpression: CallExpression;
|
||||
ChainExpression: ChainExpression;
|
||||
ClassExpression: ClassExpression;
|
||||
ConditionalExpression: ConditionalExpression;
|
||||
FunctionExpression: FunctionExpression;
|
||||
Identifier: Identifier;
|
||||
ImportExpression: ImportExpression;
|
||||
Literal: Literal;
|
||||
LogicalExpression: LogicalExpression;
|
||||
MemberExpression: MemberExpression;
|
||||
MetaProperty: MetaProperty;
|
||||
NewExpression: NewExpression;
|
||||
ObjectExpression: ObjectExpression;
|
||||
SequenceExpression: SequenceExpression;
|
||||
TaggedTemplateExpression: TaggedTemplateExpression;
|
||||
TemplateLiteral: TemplateLiteral;
|
||||
ThisExpression: ThisExpression;
|
||||
UnaryExpression: UnaryExpression;
|
||||
UpdateExpression: UpdateExpression;
|
||||
YieldExpression: YieldExpression;
|
||||
}
|
||||
|
||||
export type Expression = ExpressionMap[keyof ExpressionMap];
|
||||
|
||||
export interface BaseExpression extends BaseNode {}
|
||||
|
||||
export type ChainElement = SimpleCallExpression | MemberExpression;
|
||||
|
||||
export interface ChainExpression extends BaseExpression {
|
||||
type: "ChainExpression";
|
||||
expression: ChainElement;
|
||||
}
|
||||
|
||||
export interface ThisExpression extends BaseExpression {
|
||||
type: "ThisExpression";
|
||||
}
|
||||
|
||||
export interface ArrayExpression extends BaseExpression {
|
||||
type: "ArrayExpression";
|
||||
elements: Array<Expression | SpreadElement | null>;
|
||||
}
|
||||
|
||||
export interface ObjectExpression extends BaseExpression {
|
||||
type: "ObjectExpression";
|
||||
properties: Array<Property | SpreadElement>;
|
||||
}
|
||||
|
||||
export interface PrivateIdentifier extends BaseNode {
|
||||
type: "PrivateIdentifier";
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface Property extends BaseNode {
|
||||
type: "Property";
|
||||
key: Expression | PrivateIdentifier;
|
||||
value: Expression | Pattern; // Could be an AssignmentProperty
|
||||
kind: "init" | "get" | "set";
|
||||
method: boolean;
|
||||
shorthand: boolean;
|
||||
computed: boolean;
|
||||
}
|
||||
|
||||
export interface PropertyDefinition extends BaseNode {
|
||||
type: "PropertyDefinition";
|
||||
key: Expression | PrivateIdentifier;
|
||||
value?: Expression | null | undefined;
|
||||
computed: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
export interface FunctionExpression extends BaseFunction, BaseExpression {
|
||||
id?: Identifier | null | undefined;
|
||||
type: "FunctionExpression";
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
export interface SequenceExpression extends BaseExpression {
|
||||
type: "SequenceExpression";
|
||||
expressions: Expression[];
|
||||
}
|
||||
|
||||
export interface UnaryExpression extends BaseExpression {
|
||||
type: "UnaryExpression";
|
||||
operator: UnaryOperator;
|
||||
prefix: true;
|
||||
argument: Expression;
|
||||
}
|
||||
|
||||
export interface BinaryExpression extends BaseExpression {
|
||||
type: "BinaryExpression";
|
||||
operator: BinaryOperator;
|
||||
left: Expression | PrivateIdentifier;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export interface AssignmentExpression extends BaseExpression {
|
||||
type: "AssignmentExpression";
|
||||
operator: AssignmentOperator;
|
||||
left: Pattern | MemberExpression;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export interface UpdateExpression extends BaseExpression {
|
||||
type: "UpdateExpression";
|
||||
operator: UpdateOperator;
|
||||
argument: Expression;
|
||||
prefix: boolean;
|
||||
}
|
||||
|
||||
export interface LogicalExpression extends BaseExpression {
|
||||
type: "LogicalExpression";
|
||||
operator: LogicalOperator;
|
||||
left: Expression;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export interface ConditionalExpression extends BaseExpression {
|
||||
type: "ConditionalExpression";
|
||||
test: Expression;
|
||||
alternate: Expression;
|
||||
consequent: Expression;
|
||||
}
|
||||
|
||||
export interface BaseCallExpression extends BaseExpression {
|
||||
callee: Expression | Super;
|
||||
arguments: Array<Expression | SpreadElement>;
|
||||
}
|
||||
export type CallExpression = SimpleCallExpression | NewExpression;
|
||||
|
||||
export interface SimpleCallExpression extends BaseCallExpression {
|
||||
type: "CallExpression";
|
||||
optional: boolean;
|
||||
}
|
||||
|
||||
export interface NewExpression extends BaseCallExpression {
|
||||
type: "NewExpression";
|
||||
}
|
||||
|
||||
export interface MemberExpression extends BaseExpression, BasePattern {
|
||||
type: "MemberExpression";
|
||||
object: Expression | Super;
|
||||
property: Expression | PrivateIdentifier;
|
||||
computed: boolean;
|
||||
optional: boolean;
|
||||
}
|
||||
|
||||
export type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression;
|
||||
|
||||
export interface BasePattern extends BaseNode {}
|
||||
|
||||
export interface SwitchCase extends BaseNode {
|
||||
type: "SwitchCase";
|
||||
test?: Expression | null | undefined;
|
||||
consequent: Statement[];
|
||||
}
|
||||
|
||||
export interface CatchClause extends BaseNode {
|
||||
type: "CatchClause";
|
||||
param: Pattern | null;
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
export interface Identifier extends BaseNode, BaseExpression, BasePattern {
|
||||
type: "Identifier";
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
|
||||
|
||||
export interface SimpleLiteral extends BaseNode, BaseExpression {
|
||||
type: "Literal";
|
||||
value: string | boolean | number | null;
|
||||
raw?: string | undefined;
|
||||
}
|
||||
|
||||
export interface RegExpLiteral extends BaseNode, BaseExpression {
|
||||
type: "Literal";
|
||||
value?: RegExp | null | undefined;
|
||||
regex: {
|
||||
pattern: string;
|
||||
flags: string;
|
||||
};
|
||||
raw?: string | undefined;
|
||||
}
|
||||
|
||||
export interface BigIntLiteral extends BaseNode, BaseExpression {
|
||||
type: "Literal";
|
||||
value?: bigint | null | undefined;
|
||||
bigint: string;
|
||||
raw?: string | undefined;
|
||||
}
|
||||
|
||||
export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
|
||||
|
||||
export type BinaryOperator =
|
||||
| "=="
|
||||
| "!="
|
||||
| "==="
|
||||
| "!=="
|
||||
| "<"
|
||||
| "<="
|
||||
| ">"
|
||||
| ">="
|
||||
| "<<"
|
||||
| ">>"
|
||||
| ">>>"
|
||||
| "+"
|
||||
| "-"
|
||||
| "*"
|
||||
| "/"
|
||||
| "%"
|
||||
| "**"
|
||||
| "|"
|
||||
| "^"
|
||||
| "&"
|
||||
| "in"
|
||||
| "instanceof";
|
||||
|
||||
export type LogicalOperator = "||" | "&&" | "??";
|
||||
|
||||
export type AssignmentOperator =
|
||||
| "="
|
||||
| "+="
|
||||
| "-="
|
||||
| "*="
|
||||
| "/="
|
||||
| "%="
|
||||
| "**="
|
||||
| "<<="
|
||||
| ">>="
|
||||
| ">>>="
|
||||
| "|="
|
||||
| "^="
|
||||
| "&="
|
||||
| "||="
|
||||
| "&&="
|
||||
| "??=";
|
||||
|
||||
export type UpdateOperator = "++" | "--";
|
||||
|
||||
export interface ForOfStatement extends BaseForXStatement {
|
||||
type: "ForOfStatement";
|
||||
await: boolean;
|
||||
}
|
||||
|
||||
export interface Super extends BaseNode {
|
||||
type: "Super";
|
||||
}
|
||||
|
||||
export interface SpreadElement extends BaseNode {
|
||||
type: "SpreadElement";
|
||||
argument: Expression;
|
||||
}
|
||||
|
||||
export interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
|
||||
type: "ArrowFunctionExpression";
|
||||
expression: boolean;
|
||||
body: BlockStatement | Expression;
|
||||
}
|
||||
|
||||
export interface YieldExpression extends BaseExpression {
|
||||
type: "YieldExpression";
|
||||
argument?: Expression | null | undefined;
|
||||
delegate: boolean;
|
||||
}
|
||||
|
||||
export interface TemplateLiteral extends BaseExpression {
|
||||
type: "TemplateLiteral";
|
||||
quasis: TemplateElement[];
|
||||
expressions: Expression[];
|
||||
}
|
||||
|
||||
export interface TaggedTemplateExpression extends BaseExpression {
|
||||
type: "TaggedTemplateExpression";
|
||||
tag: Expression;
|
||||
quasi: TemplateLiteral;
|
||||
}
|
||||
|
||||
export interface TemplateElement extends BaseNode {
|
||||
type: "TemplateElement";
|
||||
tail: boolean;
|
||||
value: {
|
||||
/** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */
|
||||
cooked?: string | null | undefined;
|
||||
raw: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface AssignmentProperty extends Property {
|
||||
value: Pattern;
|
||||
kind: "init";
|
||||
method: boolean; // false
|
||||
}
|
||||
|
||||
export interface ObjectPattern extends BasePattern {
|
||||
type: "ObjectPattern";
|
||||
properties: Array<AssignmentProperty | RestElement>;
|
||||
}
|
||||
|
||||
export interface ArrayPattern extends BasePattern {
|
||||
type: "ArrayPattern";
|
||||
elements: Array<Pattern | null>;
|
||||
}
|
||||
|
||||
export interface RestElement extends BasePattern {
|
||||
type: "RestElement";
|
||||
argument: Pattern;
|
||||
}
|
||||
|
||||
export interface AssignmentPattern extends BasePattern {
|
||||
type: "AssignmentPattern";
|
||||
left: Pattern;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export type Class = ClassDeclaration | ClassExpression;
|
||||
export interface BaseClass extends BaseNode {
|
||||
superClass?: Expression | null | undefined;
|
||||
body: ClassBody;
|
||||
}
|
||||
|
||||
export interface ClassBody extends BaseNode {
|
||||
type: "ClassBody";
|
||||
body: Array<MethodDefinition | PropertyDefinition | StaticBlock>;
|
||||
}
|
||||
|
||||
export interface MethodDefinition extends BaseNode {
|
||||
type: "MethodDefinition";
|
||||
key: Expression | PrivateIdentifier;
|
||||
value: FunctionExpression;
|
||||
kind: "constructor" | "method" | "get" | "set";
|
||||
computed: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
export interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration {
|
||||
type: "ClassDeclaration";
|
||||
/** It is null when a class declaration is a part of the `export default class` statement */
|
||||
id: Identifier | null;
|
||||
}
|
||||
|
||||
export interface ClassDeclaration extends MaybeNamedClassDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
export interface ClassExpression extends BaseClass, BaseExpression {
|
||||
type: "ClassExpression";
|
||||
id?: Identifier | null | undefined;
|
||||
}
|
||||
|
||||
export interface MetaProperty extends BaseExpression {
|
||||
type: "MetaProperty";
|
||||
meta: Identifier;
|
||||
property: Identifier;
|
||||
}
|
||||
|
||||
export type ModuleDeclaration =
|
||||
| ImportDeclaration
|
||||
| ExportNamedDeclaration
|
||||
| ExportDefaultDeclaration
|
||||
| ExportAllDeclaration;
|
||||
export interface BaseModuleDeclaration extends BaseNode {}
|
||||
|
||||
export type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier;
|
||||
export interface BaseModuleSpecifier extends BaseNode {
|
||||
local: Identifier;
|
||||
}
|
||||
|
||||
export interface ImportDeclaration extends BaseModuleDeclaration {
|
||||
type: "ImportDeclaration";
|
||||
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
|
||||
attributes: ImportAttribute[];
|
||||
source: Literal;
|
||||
}
|
||||
|
||||
export interface ImportSpecifier extends BaseModuleSpecifier {
|
||||
type: "ImportSpecifier";
|
||||
imported: Identifier | Literal;
|
||||
}
|
||||
|
||||
export interface ImportAttribute extends BaseNode {
|
||||
type: "ImportAttribute";
|
||||
key: Identifier | Literal;
|
||||
value: Literal;
|
||||
}
|
||||
|
||||
export interface ImportExpression extends BaseExpression {
|
||||
type: "ImportExpression";
|
||||
source: Expression;
|
||||
options?: Expression | null | undefined;
|
||||
}
|
||||
|
||||
export interface ImportDefaultSpecifier extends BaseModuleSpecifier {
|
||||
type: "ImportDefaultSpecifier";
|
||||
}
|
||||
|
||||
export interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
|
||||
type: "ImportNamespaceSpecifier";
|
||||
}
|
||||
|
||||
export interface ExportNamedDeclaration extends BaseModuleDeclaration {
|
||||
type: "ExportNamedDeclaration";
|
||||
declaration?: Declaration | null | undefined;
|
||||
specifiers: ExportSpecifier[];
|
||||
attributes: ImportAttribute[];
|
||||
source?: Literal | null | undefined;
|
||||
}
|
||||
|
||||
export interface ExportSpecifier extends Omit<BaseModuleSpecifier, "local"> {
|
||||
type: "ExportSpecifier";
|
||||
local: Identifier | Literal;
|
||||
exported: Identifier | Literal;
|
||||
}
|
||||
|
||||
export interface ExportDefaultDeclaration extends BaseModuleDeclaration {
|
||||
type: "ExportDefaultDeclaration";
|
||||
declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression;
|
||||
}
|
||||
|
||||
export interface ExportAllDeclaration extends BaseModuleDeclaration {
|
||||
type: "ExportAllDeclaration";
|
||||
exported: Identifier | Literal | null;
|
||||
attributes: ImportAttribute[];
|
||||
source: Literal;
|
||||
}
|
||||
|
||||
export interface AwaitExpression extends BaseExpression {
|
||||
type: "AwaitExpression";
|
||||
argument: Expression;
|
||||
}
|
||||
27
node_modules/@types/estree/package.json
generated
vendored
Normal file
27
node_modules/@types/estree/package.json
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "@types/estree",
|
||||
"version": "1.0.8",
|
||||
"description": "TypeScript definitions for estree",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "RReverser",
|
||||
"githubUsername": "RReverser",
|
||||
"url": "https://github.com/RReverser"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/estree"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "7a167b6e4a4d9f6e9a2cb9fd3fc45c885f89cbdeb44b3e5961bb057a45c082fd",
|
||||
"typeScriptVersion": "5.1",
|
||||
"nonNpm": true
|
||||
}
|
||||
21
node_modules/@types/hast/LICENSE
generated
vendored
Normal file
21
node_modules/@types/hast/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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
|
||||
15
node_modules/@types/hast/README.md
generated
vendored
Normal file
15
node_modules/@types/hast/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/hast`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for hast (https://github.com/syntax-tree/hast).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hast.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 30 Jan 2024 21:35:45 GMT
|
||||
* Dependencies: [@types/unist](https://npmjs.com/package/@types/unist)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [lukeggchapman](https://github.com/lukeggchapman), [Junyoung Choi](https://github.com/rokt33r), [Christian Murphy](https://github.com/ChristianMurphy), and [Remco Haszing](https://github.com/remcohaszing).
|
||||
282
node_modules/@types/hast/index.d.ts
generated
vendored
Normal file
282
node_modules/@types/hast/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,282 @@
|
||||
import type { Data as UnistData, Literal as UnistLiteral, Node as UnistNode, Parent as UnistParent } from "unist";
|
||||
|
||||
// ## Interfaces
|
||||
|
||||
/**
|
||||
* Info associated with hast nodes by the ecosystem.
|
||||
*
|
||||
* This space is guaranteed to never be specified by unist or hast.
|
||||
* But you can use it in utilities and plugins to store data.
|
||||
*
|
||||
* This type can be augmented to register custom data.
|
||||
* For example:
|
||||
*
|
||||
* ```ts
|
||||
* declare module 'hast' {
|
||||
* interface Data {
|
||||
* // `someNode.data.myId` is typed as `number | undefined`
|
||||
* myId?: number | undefined
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export interface Data extends UnistData {}
|
||||
|
||||
/**
|
||||
* Info associated with an element.
|
||||
*/
|
||||
export interface Properties {
|
||||
[PropertyName: string]: boolean | number | string | null | undefined | Array<string | number>;
|
||||
}
|
||||
|
||||
// ## Content maps
|
||||
|
||||
/**
|
||||
* Union of registered hast nodes that can occur in {@link Element}.
|
||||
*
|
||||
* To register mote custom hast nodes, add them to {@link ElementContentMap}.
|
||||
* They will be automatically added here.
|
||||
*/
|
||||
export type ElementContent = ElementContentMap[keyof ElementContentMap];
|
||||
|
||||
/**
|
||||
* Registry of all hast nodes that can occur as children of {@link Element}.
|
||||
*
|
||||
* For a union of all {@link Element} children, see {@link ElementContent}.
|
||||
*/
|
||||
export interface ElementContentMap {
|
||||
comment: Comment;
|
||||
element: Element;
|
||||
text: Text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Union of registered hast nodes that can occur in {@link Root}.
|
||||
*
|
||||
* To register custom hast nodes, add them to {@link RootContentMap}.
|
||||
* They will be automatically added here.
|
||||
*/
|
||||
export type RootContent = RootContentMap[keyof RootContentMap];
|
||||
|
||||
/**
|
||||
* Registry of all hast nodes that can occur as children of {@link Root}.
|
||||
*
|
||||
* > 👉 **Note**: {@link Root} does not need to be an entire document.
|
||||
* > it can also be a fragment.
|
||||
*
|
||||
* For a union of all {@link Root} children, see {@link RootContent}.
|
||||
*/
|
||||
export interface RootContentMap {
|
||||
comment: Comment;
|
||||
doctype: Doctype;
|
||||
element: Element;
|
||||
text: Text;
|
||||
}
|
||||
|
||||
// ### Special content types
|
||||
|
||||
/**
|
||||
* Union of registered hast nodes that can occur in {@link Root}.
|
||||
*
|
||||
* @deprecated Use {@link RootContent} instead.
|
||||
*/
|
||||
export type Content = RootContent;
|
||||
|
||||
/**
|
||||
* Union of registered hast literals.
|
||||
*
|
||||
* To register custom hast nodes, add them to {@link RootContentMap} and other
|
||||
* places where relevant.
|
||||
* They will be automatically added here.
|
||||
*/
|
||||
export type Literals = Extract<Nodes, UnistLiteral>;
|
||||
|
||||
/**
|
||||
* Union of registered hast nodes.
|
||||
*
|
||||
* To register custom hast nodes, add them to {@link RootContentMap} and other
|
||||
* places where relevant.
|
||||
* They will be automatically added here.
|
||||
*/
|
||||
export type Nodes = Root | RootContent;
|
||||
|
||||
/**
|
||||
* Union of registered hast parents.
|
||||
*
|
||||
* To register custom hast nodes, add them to {@link RootContentMap} and other
|
||||
* places where relevant.
|
||||
* They will be automatically added here.
|
||||
*/
|
||||
export type Parents = Extract<Nodes, UnistParent>;
|
||||
|
||||
// ## Abstract nodes
|
||||
|
||||
/**
|
||||
* Abstract hast node.
|
||||
*
|
||||
* This interface is supposed to be extended.
|
||||
* If you can use {@link Literal} or {@link Parent}, you should.
|
||||
* But for example in HTML, a `Doctype` is neither literal nor parent, but
|
||||
* still a node.
|
||||
*
|
||||
* To register custom hast nodes, add them to {@link RootContentMap} and other
|
||||
* places where relevant (such as {@link ElementContentMap}).
|
||||
*
|
||||
* For a union of all registered hast nodes, see {@link Nodes}.
|
||||
*/
|
||||
export interface Node extends UnistNode {
|
||||
/**
|
||||
* Info from the ecosystem.
|
||||
*/
|
||||
data?: Data | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract hast node that contains the smallest possible value.
|
||||
*
|
||||
* This interface is supposed to be extended if you make custom hast nodes.
|
||||
*
|
||||
* For a union of all registered hast literals, see {@link Literals}.
|
||||
*/
|
||||
export interface Literal extends Node {
|
||||
/**
|
||||
* Plain-text value.
|
||||
*/
|
||||
value: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract hast node that contains other hast nodes (*children*).
|
||||
*
|
||||
* This interface is supposed to be extended if you make custom hast nodes.
|
||||
*
|
||||
* For a union of all registered hast parents, see {@link Parents}.
|
||||
*/
|
||||
export interface Parent extends Node {
|
||||
/**
|
||||
* List of children.
|
||||
*/
|
||||
children: RootContent[];
|
||||
}
|
||||
|
||||
// ## Concrete nodes
|
||||
|
||||
/**
|
||||
* HTML comment.
|
||||
*/
|
||||
export interface Comment extends Literal {
|
||||
/**
|
||||
* Node type of HTML comments in hast.
|
||||
*/
|
||||
type: "comment";
|
||||
/**
|
||||
* Data associated with the comment.
|
||||
*/
|
||||
data?: CommentData | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Info associated with hast comments by the ecosystem.
|
||||
*/
|
||||
export interface CommentData extends Data {}
|
||||
|
||||
/**
|
||||
* HTML document type.
|
||||
*/
|
||||
export interface Doctype extends UnistNode {
|
||||
/**
|
||||
* Node type of HTML document types in hast.
|
||||
*/
|
||||
type: "doctype";
|
||||
/**
|
||||
* Data associated with the doctype.
|
||||
*/
|
||||
data?: DoctypeData | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Info associated with hast doctypes by the ecosystem.
|
||||
*/
|
||||
export interface DoctypeData extends Data {}
|
||||
|
||||
/**
|
||||
* HTML element.
|
||||
*/
|
||||
export interface Element extends Parent {
|
||||
/**
|
||||
* Node type of elements.
|
||||
*/
|
||||
type: "element";
|
||||
/**
|
||||
* Tag name (such as `'body'`) of the element.
|
||||
*/
|
||||
tagName: string;
|
||||
/**
|
||||
* Info associated with the element.
|
||||
*/
|
||||
properties: Properties;
|
||||
/**
|
||||
* Children of element.
|
||||
*/
|
||||
children: ElementContent[];
|
||||
/**
|
||||
* When the `tagName` field is `'template'`, a `content` field can be
|
||||
* present.
|
||||
*/
|
||||
content?: Root | undefined;
|
||||
/**
|
||||
* Data associated with the element.
|
||||
*/
|
||||
data?: ElementData | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Info associated with hast elements by the ecosystem.
|
||||
*/
|
||||
export interface ElementData extends Data {}
|
||||
|
||||
/**
|
||||
* Document fragment or a whole document.
|
||||
*
|
||||
* Should be used as the root of a tree and must not be used as a child.
|
||||
*
|
||||
* Can also be used as the value for the content field on a `'template'` element.
|
||||
*/
|
||||
export interface Root extends Parent {
|
||||
/**
|
||||
* Node type of hast root.
|
||||
*/
|
||||
type: "root";
|
||||
/**
|
||||
* Children of root.
|
||||
*/
|
||||
children: RootContent[];
|
||||
/**
|
||||
* Data associated with the hast root.
|
||||
*/
|
||||
data?: RootData | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Info associated with hast root nodes by the ecosystem.
|
||||
*/
|
||||
export interface RootData extends Data {}
|
||||
|
||||
/**
|
||||
* HTML character data (plain text).
|
||||
*/
|
||||
export interface Text extends Literal {
|
||||
/**
|
||||
* Node type of HTML character data (plain text) in hast.
|
||||
*/
|
||||
type: "text";
|
||||
/**
|
||||
* Data associated with the text.
|
||||
*/
|
||||
data?: TextData | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Info associated with hast texts by the ecosystem.
|
||||
*/
|
||||
export interface TextData extends Data {}
|
||||
42
node_modules/@types/hast/package.json
generated
vendored
Normal file
42
node_modules/@types/hast/package.json
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "@types/hast",
|
||||
"version": "3.0.4",
|
||||
"description": "TypeScript definitions for hast",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hast",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "lukeggchapman",
|
||||
"githubUsername": "lukeggchapman",
|
||||
"url": "https://github.com/lukeggchapman"
|
||||
},
|
||||
{
|
||||
"name": "Junyoung Choi",
|
||||
"githubUsername": "rokt33r",
|
||||
"url": "https://github.com/rokt33r"
|
||||
},
|
||||
{
|
||||
"name": "Christian Murphy",
|
||||
"githubUsername": "ChristianMurphy",
|
||||
"url": "https://github.com/ChristianMurphy"
|
||||
},
|
||||
{
|
||||
"name": "Remco Haszing",
|
||||
"githubUsername": "remcohaszing",
|
||||
"url": "https://github.com/remcohaszing"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/hast"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/unist": "*"
|
||||
},
|
||||
"typesPublisherContentHash": "3f3f73826d79157c12087f5bb36195319c6f435b9e218fa7a8de88d1cc64d097",
|
||||
"typeScriptVersion": "4.6"
|
||||
}
|
||||
21
node_modules/@types/linkify-it/LICENSE
generated
vendored
Normal file
21
node_modules/@types/linkify-it/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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
|
||||
15
node_modules/@types/linkify-it/README.md
generated
vendored
Normal file
15
node_modules/@types/linkify-it/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/linkify-it`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for linkify-it (https://github.com/markdown-it/linkify-it).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/linkify-it.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Wed, 01 May 2024 18:07:45 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Lindsey Smith](https://github.com/praxxis), [Robert Coie](https://github.com/rapropos/typed-linkify-it), [Alex Plumb](https://github.com/alexplumb), and [Rafa Gares](https://github.com/ragafus).
|
||||
178
node_modules/@types/linkify-it/build/index.cjs.d.ts
generated
vendored
Normal file
178
node_modules/@types/linkify-it/build/index.cjs.d.ts
generated
vendored
Normal file
@@ -0,0 +1,178 @@
|
||||
/**
|
||||
* Match result. Single element of array, returned by {@link LinkifyIt#match}.
|
||||
*/
|
||||
declare class Match {
|
||||
constructor(self: LinkifyIt, shift: number);
|
||||
|
||||
/**
|
||||
* First position of matched string.
|
||||
*/
|
||||
index: number;
|
||||
/**
|
||||
* Next position after matched string.
|
||||
*/
|
||||
lastIndex: number;
|
||||
/**
|
||||
* Matched string.
|
||||
*/
|
||||
raw: string;
|
||||
/**
|
||||
* Prefix (protocol) for matched string.
|
||||
*/
|
||||
schema: string;
|
||||
/**
|
||||
* Normalized text of matched string.
|
||||
*/
|
||||
text: string;
|
||||
/**
|
||||
* Normalized url of matched string.
|
||||
*/
|
||||
url: string;
|
||||
}
|
||||
|
||||
type Match_ = Match;
|
||||
|
||||
declare namespace LinkifyIt {
|
||||
type Validate = (text: string, pos: number, self: LinkifyIt) => number | boolean;
|
||||
|
||||
interface FullRule {
|
||||
validate: string | RegExp | Validate;
|
||||
normalize?: ((match: Match) => void) | undefined;
|
||||
}
|
||||
|
||||
type Rule = string | FullRule;
|
||||
|
||||
/**
|
||||
* An object, where each key/value describes protocol/rule:
|
||||
*
|
||||
* - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`
|
||||
* for example). `linkify-it` makes sure that prefix is not preceded with
|
||||
* alphanumeric char and symbols. Only whitespaces and punctuation allowed.
|
||||
* - __value__ - rule to check tail after link prefix
|
||||
* - _String_ - just alias to existing rule
|
||||
* - _Object_
|
||||
* - _validate_ - validator function (should return matched length on success),
|
||||
* or `RegExp`.
|
||||
* - _normalize_ - optional function to normalize text & url of matched result
|
||||
* (for example, for `@twitter` mentions).
|
||||
*/
|
||||
interface SchemaRules {
|
||||
[schema: string]: Rule;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
/**
|
||||
* recognize URL-s without `http(s):` prefix. Default `true`.
|
||||
*/
|
||||
fuzzyLink?: boolean | undefined;
|
||||
/**
|
||||
* allow IPs in fuzzy links above. Can conflict with some texts
|
||||
* like version numbers. Default `false`.
|
||||
*/
|
||||
fuzzyIP?: boolean | undefined;
|
||||
/**
|
||||
* recognize emails without `mailto:` prefix. Default `true`.
|
||||
*/
|
||||
fuzzyEmail?: boolean | undefined;
|
||||
}
|
||||
|
||||
type Match = Match_;
|
||||
}
|
||||
|
||||
declare class LinkifyIt {
|
||||
/**
|
||||
* new LinkifyIt(schemas, options)
|
||||
* - schemas (Object): Optional. Additional schemas to validate (prefix/validator)
|
||||
* - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
|
||||
*
|
||||
* Creates new linkifier instance with optional additional schemas.
|
||||
* Can be called without `new` keyword for convenience.
|
||||
*
|
||||
* By default understands:
|
||||
*
|
||||
* - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links
|
||||
* - "fuzzy" links and emails (example.com, foo@bar.com).
|
||||
*/
|
||||
constructor(schemas?: LinkifyIt.SchemaRules | LinkifyIt.Options, options?: LinkifyIt.Options);
|
||||
|
||||
// Use overloads to provide contextual typing to `FullRule.normalize`, which is ambiguous with string.normalize
|
||||
/**
|
||||
* Add new rule definition. See constructor description for details.
|
||||
*
|
||||
* @param schema rule name (fixed pattern prefix)
|
||||
* @param definition schema definition
|
||||
*/
|
||||
add(schema: string, definition: string): this;
|
||||
add(schema: string, definition: LinkifyIt.FullRule | null): this;
|
||||
|
||||
/**
|
||||
* Set recognition options for links without schema.
|
||||
*/
|
||||
set(options: LinkifyIt.Options): this;
|
||||
|
||||
/**
|
||||
* Searches linkifiable pattern and returns `true` on success or `false` on fail.
|
||||
*/
|
||||
test(text: string): boolean;
|
||||
|
||||
/**
|
||||
* Very quick check, that can give false positives. Returns true if link MAY BE
|
||||
* can exists. Can be used for speed optimization, when you need to check that
|
||||
* link NOT exists.
|
||||
*/
|
||||
pretest(text: string): boolean;
|
||||
|
||||
/**
|
||||
* Similar to {@link LinkifyIt#test} but checks only specific protocol tail exactly
|
||||
* at given position. Returns length of found pattern (0 on fail).
|
||||
*
|
||||
* @param text text to scan
|
||||
* @param schema rule (schema) name
|
||||
* @param pos text offset to check from
|
||||
*/
|
||||
testSchemaAt(text: string, schema: string, pos: number): number;
|
||||
|
||||
/**
|
||||
* Returns array of found link descriptions or `null` on fail. We strongly
|
||||
* recommend to use {@link LinkifyIt#test} first, for best speed.
|
||||
*/
|
||||
match(text: string): LinkifyIt.Match[] | null;
|
||||
|
||||
/**
|
||||
* Returns fully-formed (not fuzzy) link if it starts at the beginning
|
||||
* of the string, and null otherwise.
|
||||
*/
|
||||
matchAtStart(text: string): LinkifyIt.Match | null;
|
||||
|
||||
/**
|
||||
* Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)
|
||||
* to avoid false positives. By default this algorythm used:
|
||||
*
|
||||
* - hostname with any 2-letter root zones are ok.
|
||||
* - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф
|
||||
* are ok.
|
||||
* - encoded (`xn--...`) root zones are ok.
|
||||
*
|
||||
* If list is replaced, then exact match for 2-chars root zones will be checked.
|
||||
*
|
||||
* @param list list of tlds
|
||||
* @param keepOld merge with current list if `true` (`false` by default)
|
||||
*/
|
||||
tlds(list: string | string[], keepOld?: boolean): this;
|
||||
|
||||
/**
|
||||
* Default normalizer (if schema does not define it's own).
|
||||
*/
|
||||
normalize(match: LinkifyIt.Match): void;
|
||||
|
||||
/**
|
||||
* Override to modify basic RegExp-s.
|
||||
*/
|
||||
onCompile(): void;
|
||||
|
||||
re: {
|
||||
[key: string]: RegExp;
|
||||
};
|
||||
}
|
||||
|
||||
export = LinkifyIt;
|
||||
174
node_modules/@types/linkify-it/index.d.mts
generated
vendored
Normal file
174
node_modules/@types/linkify-it/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
export type Validate = (text: string, pos: number, self: LinkifyIt) => number | boolean;
|
||||
|
||||
export interface FullRule {
|
||||
validate: string | RegExp | Validate;
|
||||
normalize?: ((match: Match) => void) | undefined;
|
||||
}
|
||||
|
||||
export type Rule = string | FullRule;
|
||||
|
||||
/**
|
||||
* An object, where each key/value describes protocol/rule:
|
||||
*
|
||||
* - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`
|
||||
* for example). `linkify-it` makes sure that prefix is not preceded with
|
||||
* alphanumeric char and symbols. Only whitespaces and punctuation allowed.
|
||||
* - __value__ - rule to check tail after link prefix
|
||||
* - _String_ - just alias to existing rule
|
||||
* - _Object_
|
||||
* - _validate_ - validator function (should return matched length on success),
|
||||
* or `RegExp`.
|
||||
* - _normalize_ - optional function to normalize text & url of matched result
|
||||
* (for example, for `@twitter` mentions).
|
||||
*/
|
||||
export interface SchemaRules {
|
||||
[schema: string]: Rule;
|
||||
}
|
||||
|
||||
export interface Options {
|
||||
/**
|
||||
* recognize URL-s without `http(s):` prefix. Default `true`.
|
||||
*/
|
||||
fuzzyLink?: boolean | undefined;
|
||||
/**
|
||||
* allow IPs in fuzzy links above. Can conflict with some texts
|
||||
* like version numbers. Default `false`.
|
||||
*/
|
||||
fuzzyIP?: boolean | undefined;
|
||||
/**
|
||||
* recognize emails without `mailto:` prefix. Default `true`.
|
||||
*/
|
||||
fuzzyEmail?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Match result. Single element of array, returned by {@link LinkifyIt#match}.
|
||||
*/
|
||||
declare class Match {
|
||||
constructor(self: LinkifyIt, shift: number);
|
||||
|
||||
/**
|
||||
* First position of matched string.
|
||||
*/
|
||||
index: number;
|
||||
/**
|
||||
* Next position after matched string.
|
||||
*/
|
||||
lastIndex: number;
|
||||
/**
|
||||
* Matched string.
|
||||
*/
|
||||
raw: string;
|
||||
/**
|
||||
* Prefix (protocol) for matched string.
|
||||
*/
|
||||
schema: string;
|
||||
/**
|
||||
* Normalized text of matched string.
|
||||
*/
|
||||
text: string;
|
||||
/**
|
||||
* Normalized url of matched string.
|
||||
*/
|
||||
url: string;
|
||||
}
|
||||
|
||||
export type { Match };
|
||||
|
||||
declare class LinkifyIt {
|
||||
/**
|
||||
* new LinkifyIt(schemas, options)
|
||||
* - schemas (Object): Optional. Additional schemas to validate (prefix/validator)
|
||||
* - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }
|
||||
*
|
||||
* Creates new linkifier instance with optional additional schemas.
|
||||
* Can be called without `new` keyword for convenience.
|
||||
*
|
||||
* By default understands:
|
||||
*
|
||||
* - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links
|
||||
* - "fuzzy" links and emails (example.com, foo@bar.com).
|
||||
*/
|
||||
constructor(schemas?: SchemaRules | Options, options?: Options);
|
||||
|
||||
// Use overloads to provide contextual typing to `FullRule.normalize`, which is ambiguous with string.normalize
|
||||
/**
|
||||
* Add new rule definition. See constructor description for details.
|
||||
*
|
||||
* @param schema rule name (fixed pattern prefix)
|
||||
* @param definition schema definition
|
||||
*/
|
||||
add(schema: string, definition: string): this;
|
||||
add(schema: string, definition: FullRule | null): this;
|
||||
|
||||
/**
|
||||
* Set recognition options for links without schema.
|
||||
*/
|
||||
set(options: Options): this;
|
||||
|
||||
/**
|
||||
* Searches linkifiable pattern and returns `true` on success or `false` on fail.
|
||||
*/
|
||||
test(text: string): boolean;
|
||||
|
||||
/**
|
||||
* Very quick check, that can give false positives. Returns true if link MAY BE
|
||||
* can exists. Can be used for speed optimization, when you need to check that
|
||||
* link NOT exists.
|
||||
*/
|
||||
pretest(text: string): boolean;
|
||||
|
||||
/**
|
||||
* Similar to {@link LinkifyIt#test} but checks only specific protocol tail exactly
|
||||
* at given position. Returns length of found pattern (0 on fail).
|
||||
*
|
||||
* @param text text to scan
|
||||
* @param schema rule (schema) name
|
||||
* @param pos text offset to check from
|
||||
*/
|
||||
testSchemaAt(text: string, schema: string, pos: number): number;
|
||||
|
||||
/**
|
||||
* Returns array of found link descriptions or `null` on fail. We strongly
|
||||
* recommend to use {@link LinkifyIt#test} first, for best speed.
|
||||
*/
|
||||
match(text: string): Match[] | null;
|
||||
|
||||
/**
|
||||
* Returns fully-formed (not fuzzy) link if it starts at the beginning
|
||||
* of the string, and null otherwise.
|
||||
*/
|
||||
matchAtStart(text: string): Match | null;
|
||||
|
||||
/**
|
||||
* Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)
|
||||
* to avoid false positives. By default this algorythm used:
|
||||
*
|
||||
* - hostname with any 2-letter root zones are ok.
|
||||
* - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф
|
||||
* are ok.
|
||||
* - encoded (`xn--...`) root zones are ok.
|
||||
*
|
||||
* If list is replaced, then exact match for 2-chars root zones will be checked.
|
||||
*
|
||||
* @param list list of tlds
|
||||
* @param keepOld merge with current list if `true` (`false` by default)
|
||||
*/
|
||||
tlds(list: string | string[], keepOld?: boolean): this;
|
||||
|
||||
/**
|
||||
* Default normalizer (if schema does not define it's own).
|
||||
*/
|
||||
normalize(match: Match): void;
|
||||
|
||||
/**
|
||||
* Override to modify basic RegExp-s.
|
||||
*/
|
||||
onCompile(): void;
|
||||
|
||||
re: {
|
||||
[key: string]: RegExp;
|
||||
};
|
||||
}
|
||||
|
||||
export default LinkifyIt;
|
||||
3
node_modules/@types/linkify-it/index.d.ts
generated
vendored
Normal file
3
node_modules/@types/linkify-it/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import LinkifyIt = require("./build/index.cjs.js");
|
||||
|
||||
export = LinkifyIt;
|
||||
50
node_modules/@types/linkify-it/package.json
generated
vendored
Normal file
50
node_modules/@types/linkify-it/package.json
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "@types/linkify-it",
|
||||
"version": "5.0.0",
|
||||
"description": "TypeScript definitions for linkify-it",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/linkify-it",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Lindsey Smith",
|
||||
"githubUsername": "praxxis",
|
||||
"url": "https://github.com/praxxis"
|
||||
},
|
||||
{
|
||||
"name": "Robert Coie",
|
||||
"url": "https://github.com/rapropos/typed-linkify-it"
|
||||
},
|
||||
{
|
||||
"name": "Alex Plumb",
|
||||
"githubUsername": "alexplumb",
|
||||
"url": "https://github.com/alexplumb"
|
||||
},
|
||||
{
|
||||
"name": "Rafa Gares",
|
||||
"githubUsername": "ragafus",
|
||||
"url": "https://github.com/ragafus"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./index.d.mts",
|
||||
"require": "./build/index.cjs.d.ts"
|
||||
},
|
||||
"./*": {
|
||||
"import": "./*",
|
||||
"require": "./*"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/linkify-it"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "884f8e9f827ff23c410016d9edc6e2410efbd2555c6e9e6c0ed734edd4145036",
|
||||
"typeScriptVersion": "4.7"
|
||||
}
|
||||
21
node_modules/@types/markdown-it/LICENSE
generated
vendored
Normal file
21
node_modules/@types/markdown-it/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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
|
||||
15
node_modules/@types/markdown-it/README.md
generated
vendored
Normal file
15
node_modules/@types/markdown-it/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/markdown-it`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for markdown-it (https://github.com/markdown-it/markdown-it).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/markdown-it.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Thu, 25 Jul 2024 05:07:29 GMT
|
||||
* Dependencies: [@types/linkify-it](https://npmjs.com/package/@types/linkify-it), [@types/mdurl](https://npmjs.com/package/@types/mdurl)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [York Yao](https://github.com/plantain-00), [Robert Coie](https://github.com/rapropos), [duduluu](https://github.com/duduluu), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
|
||||
1236
node_modules/@types/markdown-it/dist/index.cjs.d.ts
generated
vendored
Normal file
1236
node_modules/@types/markdown-it/dist/index.cjs.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5
node_modules/@types/markdown-it/dist/markdown-it.d.ts
generated
vendored
Normal file
5
node_modules/@types/markdown-it/dist/markdown-it.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import MarkdownIt = require("./index.cjs.js");
|
||||
|
||||
export as namespace markdownit;
|
||||
|
||||
export = MarkdownIt;
|
||||
5
node_modules/@types/markdown-it/dist/markdown-it.min.d.ts
generated
vendored
Normal file
5
node_modules/@types/markdown-it/dist/markdown-it.min.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import MarkdownIt = require("./index.cjs.js");
|
||||
|
||||
export as namespace markdownit;
|
||||
|
||||
export = MarkdownIt;
|
||||
1
node_modules/@types/markdown-it/index.d.mts
generated
vendored
Normal file
1
node_modules/@types/markdown-it/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { default, Options, PluginSimple, PluginWithOptions, PluginWithParams, PresetName } from "./lib/index.mjs";
|
||||
3
node_modules/@types/markdown-it/index.d.ts
generated
vendored
Normal file
3
node_modules/@types/markdown-it/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import MarkdownIt = require("./dist/index.cjs.js");
|
||||
|
||||
export = MarkdownIt;
|
||||
7
node_modules/@types/markdown-it/lib/common/html_blocks.d.mts
generated
vendored
Normal file
7
node_modules/@types/markdown-it/lib/common/html_blocks.d.mts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* List of valid html blocks names, according to commonmark spec
|
||||
* @see https://spec.commonmark.org/0.30/#html-blocks
|
||||
*/
|
||||
declare const htmlBlocks: string[];
|
||||
|
||||
export default htmlBlocks;
|
||||
2
node_modules/@types/markdown-it/lib/common/html_re.d.mts
generated
vendored
Normal file
2
node_modules/@types/markdown-it/lib/common/html_re.d.mts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export const HTML_TAG_RE: RegExp;
|
||||
export const HTML_OPEN_CLOSE_TAG_RE: RegExp;
|
||||
62
node_modules/@types/markdown-it/lib/common/utils.d.mts
generated
vendored
Normal file
62
node_modules/@types/markdown-it/lib/common/utils.d.mts
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
import * as mdurl from "mdurl";
|
||||
// import * as ucmicro from "uc.micro";
|
||||
|
||||
export const lib: {
|
||||
mdurl: typeof mdurl;
|
||||
ucmicro: any;
|
||||
};
|
||||
|
||||
/**
|
||||
* Merge objects
|
||||
*/
|
||||
export function assign(obj: any, ...from: any[]): any;
|
||||
|
||||
export function isString(obj: any): obj is string;
|
||||
|
||||
export function has(obj: any, key: keyof any): boolean;
|
||||
|
||||
export function unescapeMd(str: string): string;
|
||||
|
||||
export function unescapeAll(str: string): string;
|
||||
|
||||
export function isValidEntityCode(c: number): boolean;
|
||||
|
||||
export function fromCodePoint(c: number): string;
|
||||
|
||||
export function escapeHtml(str: string): string;
|
||||
|
||||
/**
|
||||
* Remove element from array and put another array at those position.
|
||||
* Useful for some operations with tokens
|
||||
*/
|
||||
export function arrayReplaceAt<T>(src: T[], pos: number, newElements: T[]): T[];
|
||||
|
||||
export function isSpace(code: number): boolean;
|
||||
|
||||
/**
|
||||
* Zs (unicode class) || [\t\f\v\r\n]
|
||||
*/
|
||||
export function isWhiteSpace(code: number): boolean;
|
||||
|
||||
/**
|
||||
* Markdown ASCII punctuation characters.
|
||||
*
|
||||
* !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
|
||||
*
|
||||
* Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.
|
||||
*
|
||||
* @see http://spec.commonmark.org/0.15/#ascii-punctuation-character
|
||||
*/
|
||||
export function isMdAsciiPunct(code: number): boolean;
|
||||
|
||||
/**
|
||||
* Currently without astral characters support.
|
||||
*/
|
||||
export function isPunctChar(ch: string): boolean;
|
||||
|
||||
export function escapeRE(str: string): string;
|
||||
|
||||
/**
|
||||
* Helper to unify [reference labels].
|
||||
*/
|
||||
export function normalizeReference(str: string): string;
|
||||
5
node_modules/@types/markdown-it/lib/helpers/index.d.mts
generated
vendored
Normal file
5
node_modules/@types/markdown-it/lib/helpers/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import parseLinkDestination from "./parse_link_destination.mjs";
|
||||
import parseLinkLabel from "./parse_link_label.mjs";
|
||||
import parseLinkTitle from "./parse_link_title.mjs";
|
||||
|
||||
export { parseLinkDestination, parseLinkLabel, parseLinkTitle };
|
||||
7
node_modules/@types/markdown-it/lib/helpers/parse_link_destination.d.mts
generated
vendored
Normal file
7
node_modules/@types/markdown-it/lib/helpers/parse_link_destination.d.mts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export interface ParseLinkDestinationResult {
|
||||
ok: boolean;
|
||||
pos: number;
|
||||
str: string;
|
||||
}
|
||||
|
||||
export default function parseLinkDestination(str: string, start: number, max: number): ParseLinkDestinationResult;
|
||||
3
node_modules/@types/markdown-it/lib/helpers/parse_link_label.d.mts
generated
vendored
Normal file
3
node_modules/@types/markdown-it/lib/helpers/parse_link_label.d.mts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import StateInline from "../rules_inline/state_inline.mjs";
|
||||
|
||||
export default function parseLinkLabel(state: StateInline, start: number, disableNested?: boolean): number;
|
||||
29
node_modules/@types/markdown-it/lib/helpers/parse_link_title.d.mts
generated
vendored
Normal file
29
node_modules/@types/markdown-it/lib/helpers/parse_link_title.d.mts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
export interface ParseLinkTitleResult {
|
||||
/**
|
||||
* if `true`, this is a valid link title
|
||||
*/
|
||||
ok: boolean;
|
||||
/**
|
||||
* if `true`, this link can be continued on the next line
|
||||
*/
|
||||
can_continue: boolean;
|
||||
/**
|
||||
* if `ok`, it's the position of the first character after the closing marker
|
||||
*/
|
||||
pos: number;
|
||||
/**
|
||||
* if `ok`, it's the unescaped title
|
||||
*/
|
||||
str: string;
|
||||
/**
|
||||
* expected closing marker character code
|
||||
*/
|
||||
marker: number;
|
||||
}
|
||||
|
||||
export default function parseLinkTitle(
|
||||
str: string,
|
||||
start: number,
|
||||
max: number,
|
||||
prev_state?: ParseLinkTitleResult,
|
||||
): ParseLinkTitleResult;
|
||||
404
node_modules/@types/markdown-it/lib/index.d.mts
generated
vendored
Normal file
404
node_modules/@types/markdown-it/lib/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,404 @@
|
||||
import LinkifyIt from "linkify-it";
|
||||
|
||||
import * as utils from "./common/utils.mjs";
|
||||
import * as helpers from "./helpers/index.mjs";
|
||||
import ParserBlock from "./parser_block.mjs";
|
||||
import ParserCore from "./parser_core.mjs";
|
||||
import ParserInline from "./parser_inline.mjs";
|
||||
import Renderer from "./renderer.mjs";
|
||||
import Token from "./token.mjs";
|
||||
|
||||
/**
|
||||
* MarkdownIt provides named presets as a convenience to quickly
|
||||
* enable/disable active syntax rules and options for common use cases.
|
||||
*
|
||||
* - ["commonmark"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js) -
|
||||
* configures parser to strict [CommonMark](http://commonmark.org/) mode.
|
||||
* - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -
|
||||
* similar to GFM, used when no preset name given. Enables all available rules,
|
||||
* but still without html, typographer & autolinker.
|
||||
* - ["zero"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -
|
||||
* all rules disabled. Useful to quickly setup your config via `.enable()`.
|
||||
* For example, when you need only `bold` and `italic` markup and nothing else.
|
||||
*/
|
||||
export type PresetName = "default" | "zero" | "commonmark";
|
||||
|
||||
export interface Options {
|
||||
/**
|
||||
* Set `true` to enable HTML tags in source. Be careful!
|
||||
* That's not safe! You may need external sanitizer to protect output from XSS.
|
||||
* It's better to extend features via plugins, instead of enabling HTML.
|
||||
* @default false
|
||||
*/
|
||||
html?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Set `true` to add '/' when closing single tags
|
||||
* (`<br />`). This is needed only for full CommonMark compatibility. In real
|
||||
* world you will need HTML output.
|
||||
* @default false
|
||||
*/
|
||||
xhtmlOut?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Set `true` to convert `\n` in paragraphs into `<br>`.
|
||||
* @default false
|
||||
*/
|
||||
breaks?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* CSS language class prefix for fenced blocks.
|
||||
* Can be useful for external highlighters.
|
||||
* @default 'language-'
|
||||
*/
|
||||
langPrefix?: string | undefined;
|
||||
|
||||
/**
|
||||
* Set `true` to autoconvert URL-like text to links.
|
||||
* @default false
|
||||
*/
|
||||
linkify?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Set `true` to enable [some language-neutral replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js) +
|
||||
* quotes beautification (smartquotes).
|
||||
* @default false
|
||||
*/
|
||||
typographer?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Double + single quotes replacement
|
||||
* pairs, when typographer enabled and smartquotes on. For example, you can
|
||||
* use `'«»„“'` for Russian, `'„“‚‘'` for German, and
|
||||
* `['«\xA0', '\xA0»', '‹\xA0', '\xA0›']` for French (including nbsp).
|
||||
* @default '“”‘’'
|
||||
*/
|
||||
quotes?: string | string[];
|
||||
|
||||
/**
|
||||
* Highlighter function for fenced code blocks.
|
||||
* Highlighter `function (str, lang, attrs)` should return escaped HTML. It can
|
||||
* also return empty string if the source was not changed and should be escaped
|
||||
* externally. If result starts with <pre... internal wrapper is skipped.
|
||||
* @default null
|
||||
*/
|
||||
highlight?: ((str: string, lang: string, attrs: string) => string) | null | undefined;
|
||||
}
|
||||
|
||||
export type PluginSimple = (md: MarkdownIt) => void;
|
||||
export type PluginWithOptions<T = any> = (md: MarkdownIt, options?: T) => void;
|
||||
export type PluginWithParams = (md: MarkdownIt, ...params: any[]) => void;
|
||||
|
||||
interface MarkdownItConstructor {
|
||||
new(): MarkdownIt;
|
||||
new(presetName: PresetName, options?: Options): MarkdownIt;
|
||||
new(options: Options): MarkdownIt;
|
||||
(): MarkdownIt;
|
||||
(presetName: PresetName, options?: Options): MarkdownIt;
|
||||
(options: Options): MarkdownIt;
|
||||
}
|
||||
|
||||
interface MarkdownIt {
|
||||
/**
|
||||
* Instance of {@link ParserInline}. You may need it to add new rules when
|
||||
* writing plugins. For simple rules control use {@link MarkdownIt.disable} and
|
||||
* {@link MarkdownIt.enable}.
|
||||
*/
|
||||
readonly inline: ParserInline;
|
||||
|
||||
/**
|
||||
* Instance of {@link ParserBlock}. You may need it to add new rules when
|
||||
* writing plugins. For simple rules control use {@link MarkdownIt.disable} and
|
||||
* {@link MarkdownIt.enable}.
|
||||
*/
|
||||
readonly block: ParserBlock;
|
||||
|
||||
/**
|
||||
* Instance of {@link Core} chain executor. You may need it to add new rules when
|
||||
* writing plugins. For simple rules control use {@link MarkdownIt.disable} and
|
||||
* {@link MarkdownIt.enable}.
|
||||
*/
|
||||
readonly core: ParserCore;
|
||||
|
||||
/**
|
||||
* Instance of {@link Renderer}. Use it to modify output look. Or to add rendering
|
||||
* rules for new token types, generated by plugins.
|
||||
*
|
||||
* ##### Example
|
||||
*
|
||||
* ```javascript
|
||||
* var md = require('markdown-it')();
|
||||
*
|
||||
* function myToken(tokens, idx, options, env, self) {
|
||||
* //...
|
||||
* return result;
|
||||
* };
|
||||
*
|
||||
* md.renderer.rules['my_token'] = myToken
|
||||
* ```
|
||||
*
|
||||
* See {@link Renderer} docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).
|
||||
*/
|
||||
readonly renderer: Renderer;
|
||||
|
||||
/**
|
||||
* [linkify-it](https://github.com/markdown-it/linkify-it) instance.
|
||||
* Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)
|
||||
* rule.
|
||||
*/
|
||||
readonly linkify: LinkifyIt;
|
||||
|
||||
/**
|
||||
* Link validation function. CommonMark allows too much in links. By default
|
||||
* we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas
|
||||
* except some embedded image types.
|
||||
*
|
||||
* You can change this behaviour:
|
||||
*
|
||||
* ```javascript
|
||||
* var md = require('markdown-it')();
|
||||
* // enable everything
|
||||
* md.validateLink = function () { return true; }
|
||||
* ```
|
||||
*/
|
||||
validateLink(url: string): boolean;
|
||||
|
||||
/**
|
||||
* Function used to encode link url to a machine-readable format,
|
||||
* which includes url-encoding, punycode, etc.
|
||||
*/
|
||||
normalizeLink(url: string): string;
|
||||
|
||||
/**
|
||||
* Function used to decode link url to a human-readable format`
|
||||
*/
|
||||
normalizeLinkText(url: string): string;
|
||||
|
||||
readonly utils: typeof utils;
|
||||
|
||||
readonly helpers: typeof helpers;
|
||||
|
||||
readonly options: Options;
|
||||
|
||||
/**
|
||||
* *chainable*
|
||||
*
|
||||
* Set parser options (in the same format as in constructor). Probably, you
|
||||
* will never need it, but you can change options after constructor call.
|
||||
*
|
||||
* ##### Example
|
||||
*
|
||||
* ```javascript
|
||||
* var md = require('markdown-it')()
|
||||
* .set({ html: true, breaks: true })
|
||||
* .set({ typographer: true });
|
||||
* ```
|
||||
*
|
||||
* __Note:__ To achieve the best possible performance, don't modify a
|
||||
* `markdown-it` instance options on the fly. If you need multiple configurations
|
||||
* it's best to create multiple instances and initialize each with separate
|
||||
* config.
|
||||
*/
|
||||
set(options: Options): this;
|
||||
|
||||
/**
|
||||
* *chainable*, *internal*
|
||||
*
|
||||
* Batch load of all options and compenent settings. This is internal method,
|
||||
* and you probably will not need it. But if you with - see available presets
|
||||
* and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)
|
||||
*
|
||||
* We strongly recommend to use presets instead of direct config loads. That
|
||||
* will give better compatibility with next versions.
|
||||
*/
|
||||
configure(presets: PresetName): this;
|
||||
|
||||
/**
|
||||
* *chainable*
|
||||
*
|
||||
* Enable list or rules. It will automatically find appropriate components,
|
||||
* containing rules with given names. If rule not found, and `ignoreInvalid`
|
||||
* not set - throws exception.
|
||||
*
|
||||
* ##### Example
|
||||
*
|
||||
* ```javascript
|
||||
* var md = require('markdown-it')()
|
||||
* .enable(['sub', 'sup'])
|
||||
* .disable('smartquotes');
|
||||
* ```
|
||||
*
|
||||
* @param list rule name or list of rule names to enable
|
||||
* @param ignoreInvalid set `true` to ignore errors when rule not found.
|
||||
*/
|
||||
enable(list: string | string[], ignoreInvalid?: boolean): this;
|
||||
|
||||
/**
|
||||
* *chainable*
|
||||
*
|
||||
* The same as {@link MarkdownIt.enable}, but turn specified rules off.
|
||||
*
|
||||
* @param list rule name or list of rule names to disable.
|
||||
* @param ignoreInvalid set `true` to ignore errors when rule not found.
|
||||
*/
|
||||
disable(list: string | string[], ignoreInvalid?: boolean): this;
|
||||
|
||||
/**
|
||||
* *chainable*
|
||||
*
|
||||
* Load specified plugin with given params into current parser instance.
|
||||
* It's just a sugar to call `plugin(md, params)` with curring.
|
||||
*
|
||||
* ##### Example
|
||||
*
|
||||
* ```javascript
|
||||
* var iterator = require('markdown-it-for-inline');
|
||||
* var md = require('markdown-it')()
|
||||
* .use(iterator, 'foo_replace', 'text', function (tokens, idx) {
|
||||
* tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
use(plugin: PluginSimple): this;
|
||||
use<T = any>(plugin: PluginWithOptions<T>, options?: T): this;
|
||||
use(plugin: PluginWithParams, ...params: any[]): this;
|
||||
|
||||
/**
|
||||
* *internal*
|
||||
*
|
||||
* Parse input string and returns list of block tokens (special token type
|
||||
* "inline" will contain list of inline tokens). You should not call this
|
||||
* method directly, until you write custom renderer (for example, to produce
|
||||
* AST).
|
||||
*
|
||||
* `env` is used to pass data between "distributed" rules and return additional
|
||||
* metadata like reference info, needed for the renderer. It also can be used to
|
||||
* inject data in specific cases. Usually, you will be ok to pass `{}`,
|
||||
* and then pass updated object to renderer.
|
||||
*
|
||||
* @param src source string
|
||||
* @param env environment sandbox
|
||||
*/
|
||||
parse(src: string, env: any): Token[];
|
||||
|
||||
/**
|
||||
* Render markdown string into html. It does all magic for you :).
|
||||
*
|
||||
* `env` can be used to inject additional metadata (`{}` by default).
|
||||
* But you will not need it with high probability. See also comment
|
||||
* in {@link MarkdownIt.parse}.
|
||||
*
|
||||
* @param src source string
|
||||
* @param env environment sandbox
|
||||
*/
|
||||
render(src: string, env?: any): string;
|
||||
|
||||
/**
|
||||
* *internal*
|
||||
*
|
||||
* The same as {@link MarkdownIt.parse} but skip all block rules. It returns the
|
||||
* block tokens list with the single `inline` element, containing parsed inline
|
||||
* tokens in `children` property. Also updates `env` object.
|
||||
*
|
||||
* @param src source string
|
||||
* @param env environment sandbox
|
||||
*/
|
||||
parseInline(src: string, env: any): Token[];
|
||||
|
||||
/**
|
||||
* Similar to {@link MarkdownIt.render} but for single paragraph content. Result
|
||||
* will NOT be wrapped into `<p>` tags.
|
||||
*
|
||||
* @param src source string
|
||||
* @param env environment sandbox
|
||||
*/
|
||||
renderInline(src: string, env?: any): string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Main parser/renderer class.
|
||||
*
|
||||
* ##### Usage
|
||||
*
|
||||
* ```javascript
|
||||
* // node.js, "classic" way:
|
||||
* var MarkdownIt = require('markdown-it'),
|
||||
* md = new MarkdownIt();
|
||||
* var result = md.render('# markdown-it rulezz!');
|
||||
*
|
||||
* // node.js, the same, but with sugar:
|
||||
* var md = require('markdown-it')();
|
||||
* var result = md.render('# markdown-it rulezz!');
|
||||
*
|
||||
* // browser without AMD, added to "window" on script load
|
||||
* // Note, there are no dash.
|
||||
* var md = window.markdownit();
|
||||
* var result = md.render('# markdown-it rulezz!');
|
||||
* ```
|
||||
*
|
||||
* Single line rendering, without paragraph wrap:
|
||||
*
|
||||
* ```javascript
|
||||
* var md = require('markdown-it')();
|
||||
* var result = md.renderInline('__markdown-it__ rulezz!');
|
||||
* ```
|
||||
*
|
||||
* ##### Example
|
||||
*
|
||||
* ```javascript
|
||||
* // commonmark mode
|
||||
* var md = require('markdown-it')('commonmark');
|
||||
*
|
||||
* // default mode
|
||||
* var md = require('markdown-it')();
|
||||
*
|
||||
* // enable everything
|
||||
* var md = require('markdown-it')({
|
||||
* html: true,
|
||||
* linkify: true,
|
||||
* typographer: true
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* ##### Syntax highlighting
|
||||
*
|
||||
* ```js
|
||||
* var hljs = require('highlight.js') // https://highlightjs.org/
|
||||
*
|
||||
* var md = require('markdown-it')({
|
||||
* highlight: function (str, lang) {
|
||||
* if (lang && hljs.getLanguage(lang)) {
|
||||
* try {
|
||||
* return hljs.highlight(lang, str, true).value;
|
||||
* } catch (__) {}
|
||||
* }
|
||||
*
|
||||
* return ''; // use external default escaping
|
||||
* }
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* Or with full wrapper override (if you need assign class to `<pre>`):
|
||||
*
|
||||
* ```javascript
|
||||
* var hljs = require('highlight.js') // https://highlightjs.org/
|
||||
*
|
||||
* // Actual default values
|
||||
* var md = require('markdown-it')({
|
||||
* highlight: function (str, lang) {
|
||||
* if (lang && hljs.getLanguage(lang)) {
|
||||
* try {
|
||||
* return '<pre class="hljs"><code>' +
|
||||
* hljs.highlight(lang, str, true).value +
|
||||
* '</code></pre>';
|
||||
* } catch (__) {}
|
||||
* }
|
||||
*
|
||||
* return '<pre class="hljs"><code>' + md.utils.escapeHtml(str) + '</code></pre>';
|
||||
* }
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
declare const MarkdownIt: MarkdownItConstructor;
|
||||
|
||||
export default MarkdownIt;
|
||||
25
node_modules/@types/markdown-it/lib/parser_block.d.mts
generated
vendored
Normal file
25
node_modules/@types/markdown-it/lib/parser_block.d.mts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import MarkdownIt from "./index.mjs";
|
||||
import Ruler from "./ruler.mjs";
|
||||
import StateBlock from "./rules_block/state_block.mjs";
|
||||
import Token from "./token.mjs";
|
||||
|
||||
export type RuleBlock = (state: StateBlock, startLine: number, endLine: number, silent: boolean) => boolean;
|
||||
|
||||
export default class ParserBlock {
|
||||
/**
|
||||
* {@link Ruler} instance. Keep configuration of block rules.
|
||||
*/
|
||||
ruler: Ruler<RuleBlock>;
|
||||
|
||||
/**
|
||||
* Generate tokens for input range
|
||||
*/
|
||||
tokenize(state: StateBlock, startLine: number, endLine: number): void;
|
||||
|
||||
/**
|
||||
* Process input string and push block tokens into `outTokens`
|
||||
*/
|
||||
parse(str: string, md: MarkdownIt, env: any, outTokens: Token[]): void;
|
||||
|
||||
State: typeof StateBlock;
|
||||
}
|
||||
18
node_modules/@types/markdown-it/lib/parser_core.d.mts
generated
vendored
Normal file
18
node_modules/@types/markdown-it/lib/parser_core.d.mts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import Ruler from "./ruler.mjs";
|
||||
import StateCore from "./rules_core/state_core.mjs";
|
||||
|
||||
export type RuleCore = (state: StateCore) => void;
|
||||
|
||||
export default class Core {
|
||||
/**
|
||||
* {@link Ruler} instance. Keep configuration of core rules.
|
||||
*/
|
||||
ruler: Ruler<RuleCore>;
|
||||
|
||||
/**
|
||||
* Executes core chain rules.
|
||||
*/
|
||||
process(state: StateCore): void;
|
||||
|
||||
State: typeof StateCore;
|
||||
}
|
||||
38
node_modules/@types/markdown-it/lib/parser_inline.d.mts
generated
vendored
Normal file
38
node_modules/@types/markdown-it/lib/parser_inline.d.mts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import MarkdownIt from "./index.mjs";
|
||||
import Ruler from "./ruler.mjs";
|
||||
import StateInline from "./rules_inline/state_inline.mjs";
|
||||
import Token from "./token.mjs";
|
||||
|
||||
export type RuleInline = (state: StateInline, silent: boolean) => boolean;
|
||||
export type RuleInline2 = (state: StateInline) => boolean;
|
||||
|
||||
export default class ParserInline {
|
||||
/**
|
||||
* {@link Ruler} instance. Keep configuration of inline rules.
|
||||
*/
|
||||
ruler: Ruler<RuleInline>;
|
||||
|
||||
/**
|
||||
* {@link Ruler} instance. Second ruler used for post-processing
|
||||
* (e.g. in emphasis-like rules).
|
||||
*/
|
||||
ruler2: Ruler<RuleInline2>;
|
||||
|
||||
/**
|
||||
* Skip single token by running all rules in validation mode;
|
||||
* returns `true` if any rule reported success
|
||||
*/
|
||||
skipToken(state: StateInline): void;
|
||||
|
||||
/**
|
||||
* Generate tokens for input range
|
||||
*/
|
||||
tokenize(state: StateInline): void;
|
||||
|
||||
/**
|
||||
* Process input string and push inline tokens into `outTokens`
|
||||
*/
|
||||
parse(str: string, md: MarkdownIt, env: any, outTokens: Token[]): void;
|
||||
|
||||
State: typeof StateInline;
|
||||
}
|
||||
96
node_modules/@types/markdown-it/lib/renderer.d.mts
generated
vendored
Normal file
96
node_modules/@types/markdown-it/lib/renderer.d.mts
generated
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
import { Options } from "./index.mjs";
|
||||
import Token from "./token.mjs";
|
||||
|
||||
export type RenderRule = (tokens: Token[], idx: number, options: Options, env: any, self: Renderer) => string;
|
||||
|
||||
export interface RenderRuleRecord {
|
||||
[type: string]: RenderRule | undefined;
|
||||
code_inline?: RenderRule | undefined;
|
||||
code_block?: RenderRule | undefined;
|
||||
fence?: RenderRule | undefined;
|
||||
image?: RenderRule | undefined;
|
||||
hardbreak?: RenderRule | undefined;
|
||||
softbreak?: RenderRule | undefined;
|
||||
text?: RenderRule | undefined;
|
||||
html_block?: RenderRule | undefined;
|
||||
html_inline?: RenderRule | undefined;
|
||||
}
|
||||
|
||||
export default class Renderer {
|
||||
/**
|
||||
* Creates new {@link Renderer} instance and fill {@link Renderer#rules} with defaults.
|
||||
*/
|
||||
constructor();
|
||||
|
||||
/**
|
||||
* Contains render rules for tokens. Can be updated and extended.
|
||||
*
|
||||
* ##### Example
|
||||
*
|
||||
* ```javascript
|
||||
* var md = require('markdown-it')();
|
||||
*
|
||||
* md.renderer.rules.strong_open = function () { return '<b>'; };
|
||||
* md.renderer.rules.strong_close = function () { return '</b>'; };
|
||||
*
|
||||
* var result = md.renderInline(...);
|
||||
* ```
|
||||
*
|
||||
* Each rule is called as independent static function with fixed signature:
|
||||
*
|
||||
* ```javascript
|
||||
* function my_token_render(tokens, idx, options, env, renderer) {
|
||||
* // ...
|
||||
* return renderedHTML;
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @see https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs
|
||||
*/
|
||||
rules: RenderRuleRecord;
|
||||
|
||||
/**
|
||||
* Render token attributes to string.
|
||||
*/
|
||||
renderAttrs(token: Token): string;
|
||||
|
||||
/**
|
||||
* Default token renderer. Can be overriden by custom function
|
||||
* in {@link Renderer#rules}.
|
||||
*
|
||||
* @param tokens list of tokens
|
||||
* @param idx token index to render
|
||||
* @param options params of parser instance
|
||||
*/
|
||||
renderToken(tokens: Token[], idx: number, options: Options): string;
|
||||
|
||||
/**
|
||||
* The same as {@link Renderer.render}, but for single token of `inline` type.
|
||||
*
|
||||
* @param tokens list of block tokens to render
|
||||
* @param options params of parser instance
|
||||
* @param env additional data from parsed input (references, for example)
|
||||
*/
|
||||
renderInline(tokens: Token[], options: Options, env: any): string;
|
||||
|
||||
/**
|
||||
* Special kludge for image `alt` attributes to conform CommonMark spec.
|
||||
* Don't try to use it! Spec requires to show `alt` content with stripped markup,
|
||||
* instead of simple escaping.
|
||||
*
|
||||
* @param tokens list of block tokens to render
|
||||
* @param options params of parser instance
|
||||
* @param env additional data from parsed input (references, for example)
|
||||
*/
|
||||
renderInlineAsText(tokens: Token[], options: Options, env: any): string;
|
||||
|
||||
/**
|
||||
* Takes token stream and generates HTML. Probably, you will never need to call
|
||||
* this method directly.
|
||||
*
|
||||
* @param tokens list of block tokens to render
|
||||
* @param options params of parser instance
|
||||
* @param env additional data from parsed input (references, for example)
|
||||
*/
|
||||
render(tokens: Token[], options: Options, env: any): string;
|
||||
}
|
||||
158
node_modules/@types/markdown-it/lib/ruler.d.mts
generated
vendored
Normal file
158
node_modules/@types/markdown-it/lib/ruler.d.mts
generated
vendored
Normal file
@@ -0,0 +1,158 @@
|
||||
export interface RuleOptions {
|
||||
/**
|
||||
* array with names of "alternate" chains.
|
||||
*/
|
||||
alt: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper class, used by {@link MarkdownIt#core}, {@link MarkdownIt#block} and
|
||||
* {@link MarkdownIt#inline} to manage sequences of functions (rules):
|
||||
*
|
||||
* - keep rules in defined order
|
||||
* - assign the name to each rule
|
||||
* - enable/disable rules
|
||||
* - add/replace rules
|
||||
* - allow assign rules to additional named chains (in the same)
|
||||
* - caching lists of active rules
|
||||
*
|
||||
* You will not need use this class directly until write plugins. For simple
|
||||
* rules control use {@link MarkdownIt.disable}, {@link MarkdownIt.enable} and
|
||||
* {@link MarkdownIt.use}.
|
||||
*/
|
||||
export default class Ruler<T> {
|
||||
constructor();
|
||||
|
||||
/**
|
||||
* Replace rule by name with new function & options. Throws error if name not
|
||||
* found.
|
||||
*
|
||||
* ##### Example
|
||||
*
|
||||
* Replace existing typographer replacement rule with new one:
|
||||
*
|
||||
* ```javascript
|
||||
* var md = require('markdown-it')();
|
||||
*
|
||||
* md.core.ruler.at('replacements', function replace(state) {
|
||||
* //...
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @param name rule name to replace.
|
||||
* @param fn new rule function.
|
||||
* @param options new rule options (not mandatory).
|
||||
*/
|
||||
at(name: string, fn: T, options?: RuleOptions): void;
|
||||
|
||||
/**
|
||||
* Add new rule to chain before one with given name.
|
||||
*
|
||||
* ##### Example
|
||||
*
|
||||
* ```javascript
|
||||
* var md = require('markdown-it')();
|
||||
*
|
||||
* md.block.ruler.before('paragraph', 'my_rule', function replace(state) {
|
||||
* //...
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @see {@link Ruler.after}, {@link Ruler.push}
|
||||
*
|
||||
* @param beforeName new rule will be added before this one.
|
||||
* @param ruleName name of added rule.
|
||||
* @param fn rule function.
|
||||
* @param options rule options (not mandatory).
|
||||
*/
|
||||
before(beforeName: string, ruleName: string, fn: T, options?: RuleOptions): void;
|
||||
|
||||
/**
|
||||
* Add new rule to chain after one with given name.
|
||||
*
|
||||
* ##### Example
|
||||
*
|
||||
* ```javascript
|
||||
* var md = require('markdown-it')();
|
||||
*
|
||||
* md.inline.ruler.after('text', 'my_rule', function replace(state) {
|
||||
* //...
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @see {@link Ruler.before}, {@link Ruler.push}
|
||||
*
|
||||
* @param afterName new rule will be added after this one.
|
||||
* @param ruleName name of added rule.
|
||||
* @param fn rule function.
|
||||
* @param options rule options (not mandatory).
|
||||
*/
|
||||
after(afterName: string, ruleName: string, fn: T, options?: RuleOptions): void;
|
||||
|
||||
/**
|
||||
* Push new rule to the end of chain.
|
||||
*
|
||||
* ##### Example
|
||||
*
|
||||
* ```javascript
|
||||
* var md = require('markdown-it')();
|
||||
*
|
||||
* md.core.ruler.push('my_rule', function replace(state) {
|
||||
* //...
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @see {@link Ruler.before}, {@link Ruler.after}
|
||||
*
|
||||
* @param ruleName name of added rule.
|
||||
* @param fn rule function.
|
||||
* @param options rule options (not mandatory).
|
||||
*/
|
||||
push(ruleName: string, fn: T, options?: RuleOptions): void;
|
||||
|
||||
/**
|
||||
* Enable rules with given names. If any rule name not found - throw Error.
|
||||
* Errors can be disabled by second param.
|
||||
*
|
||||
* Returns list of found rule names (if no exception happened).
|
||||
*
|
||||
* @see {@link Ruler.disable}, {@link Ruler.enableOnly}
|
||||
*
|
||||
* @param list list of rule names to enable.
|
||||
* @param ignoreInvalid set `true` to ignore errors when rule not found.
|
||||
*/
|
||||
enable(list: string | string[], ignoreInvalid?: boolean): string[];
|
||||
|
||||
/**
|
||||
* Enable rules with given names, and disable everything else. If any rule name
|
||||
* not found - throw Error. Errors can be disabled by second param.
|
||||
*
|
||||
* @see {@link Ruler.disable}, {@link Ruler.enable}
|
||||
*
|
||||
* @param list list of rule names to enable (whitelist).
|
||||
* @param ignoreInvalid set `true` to ignore errors when rule not found.
|
||||
*/
|
||||
enableOnly(list: string | string[], ignoreInvalid?: boolean): void;
|
||||
|
||||
/**
|
||||
* Disable rules with given names. If any rule name not found - throw Error.
|
||||
* Errors can be disabled by second param.
|
||||
*
|
||||
* Returns list of found rule names (if no exception happened).
|
||||
*
|
||||
* @see {@link Ruler.enable}, {@link Ruler.enableOnly}
|
||||
*
|
||||
* @param list list of rule names to disable.
|
||||
* @param ignoreInvalid set `true` to ignore errors when rule not found.
|
||||
*/
|
||||
disable(list: string | string[], ignoreInvalid?: boolean): string[];
|
||||
|
||||
/**
|
||||
* Return array of active functions (rules) for given chain name. It analyzes
|
||||
* rules configuration, compiles caches if not exists and returns result.
|
||||
*
|
||||
* Default chain name is `''` (empty string). It can't be skipped. That's
|
||||
* done intentionally, to keep signature monomorphic for high speed.
|
||||
*/
|
||||
getRules(chainName: string): T[];
|
||||
}
|
||||
124
node_modules/@types/markdown-it/lib/rules_block/state_block.d.mts
generated
vendored
Normal file
124
node_modules/@types/markdown-it/lib/rules_block/state_block.d.mts
generated
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
import MarkdownIt from "../index.mjs";
|
||||
import Token, { Nesting } from "../token.mjs";
|
||||
|
||||
export type ParentType = "blockquote" | "list" | "root" | "paragraph" | "reference";
|
||||
|
||||
export default class StateBlock {
|
||||
constructor(src: string, md: MarkdownIt, env: any, tokens: Token[]);
|
||||
|
||||
src: string;
|
||||
|
||||
/**
|
||||
* link to parser instance
|
||||
*/
|
||||
md: MarkdownIt;
|
||||
|
||||
env: any;
|
||||
|
||||
//
|
||||
// Internal state vartiables
|
||||
//
|
||||
|
||||
tokens: Token[];
|
||||
|
||||
/**
|
||||
* line begin offsets for fast jumps
|
||||
*/
|
||||
bMarks: number[];
|
||||
/**
|
||||
* line end offsets for fast jumps
|
||||
*/
|
||||
eMarks: number[];
|
||||
/**
|
||||
* offsets of the first non-space characters (tabs not expanded)
|
||||
*/
|
||||
tShift: number[];
|
||||
/**
|
||||
* indents for each line (tabs expanded)
|
||||
*/
|
||||
sCount: number[];
|
||||
|
||||
/**
|
||||
* An amount of virtual spaces (tabs expanded) between beginning
|
||||
* of each line (bMarks) and real beginning of that line.
|
||||
*
|
||||
* It exists only as a hack because blockquotes override bMarks
|
||||
* losing information in the process.
|
||||
*
|
||||
* It's used only when expanding tabs, you can think about it as
|
||||
* an initial tab length, e.g. bsCount=21 applied to string `\t123`
|
||||
* means first tab should be expanded to 4-21%4 === 3 spaces.
|
||||
*/
|
||||
bsCount: number[];
|
||||
|
||||
// block parser variables
|
||||
|
||||
/**
|
||||
* required block content indent (for example, if we are
|
||||
* inside a list, it would be positioned after list marker)
|
||||
*/
|
||||
blkIndent: number;
|
||||
/**
|
||||
* line index in src
|
||||
*/
|
||||
line: number;
|
||||
/**
|
||||
* lines count
|
||||
*/
|
||||
lineMax: number;
|
||||
/**
|
||||
* loose/tight mode for lists
|
||||
*/
|
||||
tight: boolean;
|
||||
/**
|
||||
* indent of the current dd block (-1 if there isn't any)
|
||||
*/
|
||||
ddIndent: number;
|
||||
/**
|
||||
* indent of the current list block (-1 if there isn't any)
|
||||
*/
|
||||
listIndent: number;
|
||||
|
||||
/**
|
||||
* used in lists to determine if they interrupt a paragraph
|
||||
*/
|
||||
parentType: ParentType;
|
||||
|
||||
level: number;
|
||||
|
||||
/**
|
||||
* Push new token to "stream".
|
||||
*/
|
||||
push(type: string, tag: string, nesting: Nesting): Token;
|
||||
|
||||
isEmpty(line: number): boolean;
|
||||
|
||||
skipEmptyLines(from: number): number;
|
||||
|
||||
/**
|
||||
* Skip spaces from given position.
|
||||
*/
|
||||
skipSpaces(pos: number): number;
|
||||
|
||||
/**
|
||||
* Skip spaces from given position in reverse.
|
||||
*/
|
||||
skipSpacesBack(pos: number, min: number): number;
|
||||
|
||||
/**
|
||||
* Skip char codes from given position
|
||||
*/
|
||||
skipChars(pos: number, code: number): number;
|
||||
|
||||
/**
|
||||
* Skip char codes reverse from given position - 1
|
||||
*/
|
||||
skipCharsBack(pos: number, code: number, min: number): number;
|
||||
|
||||
/**
|
||||
* cut lines range from source.
|
||||
*/
|
||||
getLines(begin: number, end: number, indent: number, keepLastLF: boolean): string;
|
||||
|
||||
Token: typeof Token;
|
||||
}
|
||||
18
node_modules/@types/markdown-it/lib/rules_core/state_core.d.mts
generated
vendored
Normal file
18
node_modules/@types/markdown-it/lib/rules_core/state_core.d.mts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import MarkdownIt from "../index.mjs";
|
||||
import Token from "../token.mjs";
|
||||
|
||||
export default class StateCore {
|
||||
constructor(src: string, md: MarkdownIt, env: any);
|
||||
|
||||
src: string;
|
||||
env: any;
|
||||
tokens: Token[];
|
||||
inlineMode: boolean;
|
||||
|
||||
/**
|
||||
* link to parser instance
|
||||
*/
|
||||
md: MarkdownIt;
|
||||
|
||||
Token: typeof Token;
|
||||
}
|
||||
73
node_modules/@types/markdown-it/lib/rules_inline/state_inline.d.mts
generated
vendored
Normal file
73
node_modules/@types/markdown-it/lib/rules_inline/state_inline.d.mts
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
import MarkdownIt from "../index.mjs";
|
||||
import Token, { Nesting } from "../token.mjs";
|
||||
|
||||
export interface Scanned {
|
||||
can_open: boolean;
|
||||
can_close: boolean;
|
||||
length: number;
|
||||
}
|
||||
|
||||
export interface Delimiter {
|
||||
marker: number;
|
||||
length: number;
|
||||
token: number;
|
||||
end: number;
|
||||
open: boolean;
|
||||
close: boolean;
|
||||
}
|
||||
|
||||
export interface TokenMeta {
|
||||
delimiters: Delimiter[];
|
||||
}
|
||||
|
||||
export default class StateInline {
|
||||
constructor(src: string, md: MarkdownIt, env: any, outTokens: Token[]);
|
||||
|
||||
src: string;
|
||||
env: any;
|
||||
md: MarkdownIt;
|
||||
tokens: Token[];
|
||||
tokens_meta: Array<TokenMeta | null>;
|
||||
|
||||
pos: number;
|
||||
posMax: number;
|
||||
level: number;
|
||||
pending: string;
|
||||
pendingLevel: number;
|
||||
|
||||
/**
|
||||
* Stores { start: end } pairs. Useful for backtrack
|
||||
* optimization of pairs parse (emphasis, strikes).
|
||||
*/
|
||||
cache: any;
|
||||
|
||||
/**
|
||||
* List of emphasis-like delimiters for current tag
|
||||
*/
|
||||
delimiters: Delimiter[];
|
||||
|
||||
// Stack of delimiter lists for upper level tags
|
||||
// _prev_delimiters: StateInline.Delimiter[][];
|
||||
|
||||
/**
|
||||
* Flush pending text
|
||||
*/
|
||||
pushPending(): Token;
|
||||
|
||||
/**
|
||||
* Push new token to "stream".
|
||||
* If pending text exists - flush it as text token
|
||||
*/
|
||||
push(type: string, tag: string, nesting: Nesting): Token;
|
||||
|
||||
/**
|
||||
* Scan a sequence of emphasis-like markers, and determine whether
|
||||
* it can start an emphasis sequence or end an emphasis sequence.
|
||||
*
|
||||
* @param start position to scan from (it should point at a valid marker)
|
||||
* @param canSplitWord determine if these markers can be found inside a word
|
||||
*/
|
||||
scanDelims(start: number, canSplitWord: boolean): Scanned;
|
||||
|
||||
Token: typeof Token;
|
||||
}
|
||||
108
node_modules/@types/markdown-it/lib/token.d.mts
generated
vendored
Normal file
108
node_modules/@types/markdown-it/lib/token.d.mts
generated
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
export type Nesting = 1 | 0 | -1;
|
||||
|
||||
export default class Token {
|
||||
/**
|
||||
* Create new token and fill passed properties.
|
||||
*/
|
||||
constructor(type: string, tag: string, nesting: Nesting);
|
||||
|
||||
/**
|
||||
* Type of the token, e.g. "paragraph_open"
|
||||
*/
|
||||
type: string;
|
||||
|
||||
/**
|
||||
* HTML tag name, e.g. "p"
|
||||
*/
|
||||
tag: string;
|
||||
|
||||
/**
|
||||
* HTML attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`
|
||||
*/
|
||||
attrs: Array<[string, string]> | null;
|
||||
|
||||
/**
|
||||
* Source map info. Format: `[ line_begin, line_end ]`
|
||||
*/
|
||||
map: [number, number] | null;
|
||||
|
||||
/**
|
||||
* Level change (number in {-1, 0, 1} set), where:
|
||||
*
|
||||
* - `1` means the tag is opening
|
||||
* - `0` means the tag is self-closing
|
||||
* - `-1` means the tag is closing
|
||||
*/
|
||||
nesting: Nesting;
|
||||
|
||||
/**
|
||||
* Nesting level, the same as `state.level`
|
||||
*/
|
||||
level: number;
|
||||
|
||||
/**
|
||||
* An array of child nodes (inline and img tokens)
|
||||
*/
|
||||
children: Token[] | null;
|
||||
|
||||
/**
|
||||
* In a case of self-closing tag (code, html, fence, etc.),
|
||||
* it has contents of this tag.
|
||||
*/
|
||||
content: string;
|
||||
|
||||
/**
|
||||
* '*' or '_' for emphasis, fence string for fence, etc.
|
||||
*/
|
||||
markup: string;
|
||||
|
||||
/**
|
||||
* - Info string for "fence" tokens
|
||||
* - The value "auto" for autolink "link_open" and "link_close" tokens
|
||||
* - The string value of the item marker for ordered-list "list_item_open" tokens
|
||||
*/
|
||||
info: string;
|
||||
|
||||
/**
|
||||
* A place for plugins to store an arbitrary data
|
||||
*/
|
||||
meta: any;
|
||||
|
||||
/**
|
||||
* True for block-level tokens, false for inline tokens.
|
||||
* Used in renderer to calculate line breaks
|
||||
*/
|
||||
block: boolean;
|
||||
|
||||
/**
|
||||
* If it's true, ignore this element when rendering. Used for tight lists
|
||||
* to hide paragraphs.
|
||||
*/
|
||||
hidden: boolean;
|
||||
|
||||
/**
|
||||
* Search attribute index by name.
|
||||
*/
|
||||
attrIndex(name: string): number;
|
||||
|
||||
/**
|
||||
* Add `[ name, value ]` attribute to list. Init attrs if necessary
|
||||
*/
|
||||
attrPush(attrData: [string, string]): void;
|
||||
|
||||
/**
|
||||
* Set `name` attribute to `value`. Override old value if exists.
|
||||
*/
|
||||
attrSet(name: string, value: string): void;
|
||||
|
||||
/**
|
||||
* Get the value of attribute `name`, or null if it does not exist.
|
||||
*/
|
||||
attrGet(name: string): string | null;
|
||||
|
||||
/**
|
||||
* Join value to existing attribute via space. Or create new attribute if not
|
||||
* exists. Useful to operate with token classes.
|
||||
*/
|
||||
attrJoin(name: string, value: string): void;
|
||||
}
|
||||
54
node_modules/@types/markdown-it/package.json
generated
vendored
Normal file
54
node_modules/@types/markdown-it/package.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"name": "@types/markdown-it",
|
||||
"version": "14.1.2",
|
||||
"description": "TypeScript definitions for markdown-it",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/markdown-it",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "York Yao",
|
||||
"githubUsername": "plantain-00",
|
||||
"url": "https://github.com/plantain-00"
|
||||
},
|
||||
{
|
||||
"name": "Robert Coie",
|
||||
"githubUsername": "rapropos",
|
||||
"url": "https://github.com/rapropos"
|
||||
},
|
||||
{
|
||||
"name": "duduluu",
|
||||
"githubUsername": "duduluu",
|
||||
"url": "https://github.com/duduluu"
|
||||
},
|
||||
{
|
||||
"name": "Piotr Błażejewicz",
|
||||
"githubUsername": "peterblazejewicz",
|
||||
"url": "https://github.com/peterblazejewicz"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./index.d.mts",
|
||||
"require": "./dist/index.cjs.d.ts"
|
||||
},
|
||||
"./*": {
|
||||
"import": "./*",
|
||||
"require": "./*"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/markdown-it"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/linkify-it": "^5",
|
||||
"@types/mdurl": "^2"
|
||||
},
|
||||
"typesPublisherContentHash": "72b750af20eb4973f000b8b6a751de43787503125afcd200798f88f096b221e7",
|
||||
"typeScriptVersion": "4.8"
|
||||
}
|
||||
21
node_modules/@types/mdast/LICENSE
generated
vendored
Normal file
21
node_modules/@types/mdast/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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
|
||||
15
node_modules/@types/mdast/README.md
generated
vendored
Normal file
15
node_modules/@types/mdast/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/mdast`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for mdast (https://github.com/syntax-tree/mdast).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mdast.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 14 May 2024 07:35:36 GMT
|
||||
* Dependencies: [@types/unist](https://npmjs.com/package/@types/unist)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Christian Murphy](https://github.com/ChristianMurphy), [Jun Lu](https://github.com/lujun2), [Remco Haszing](https://github.com/remcohaszing), [Titus Wormer](https://github.com/wooorm), and [Remco Haszing](https://github.com/remcohaszing).
|
||||
1123
node_modules/@types/mdast/index.d.ts
generated
vendored
Normal file
1123
node_modules/@types/mdast/index.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
47
node_modules/@types/mdast/package.json
generated
vendored
Normal file
47
node_modules/@types/mdast/package.json
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "@types/mdast",
|
||||
"version": "4.0.4",
|
||||
"description": "TypeScript definitions for mdast",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mdast",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Christian Murphy",
|
||||
"githubUsername": "ChristianMurphy",
|
||||
"url": "https://github.com/ChristianMurphy"
|
||||
},
|
||||
{
|
||||
"name": "Jun Lu",
|
||||
"githubUsername": "lujun2",
|
||||
"url": "https://github.com/lujun2"
|
||||
},
|
||||
{
|
||||
"name": "Remco Haszing",
|
||||
"githubUsername": "remcohaszing",
|
||||
"url": "https://github.com/remcohaszing"
|
||||
},
|
||||
{
|
||||
"name": "Titus Wormer",
|
||||
"githubUsername": "wooorm",
|
||||
"url": "https://github.com/wooorm"
|
||||
},
|
||||
{
|
||||
"name": "Remco Haszing",
|
||||
"githubUsername": "remcohaszing",
|
||||
"url": "https://github.com/remcohaszing"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/mdast"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/unist": "*"
|
||||
},
|
||||
"typesPublisherContentHash": "1599d3ca45533e9d9248231c90843306b49c07fe13ad94ebf7345da44d8fd4bd",
|
||||
"typeScriptVersion": "4.7"
|
||||
}
|
||||
21
node_modules/@types/mdurl/LICENSE
generated
vendored
Normal file
21
node_modules/@types/mdurl/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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
|
||||
15
node_modules/@types/mdurl/README.md
generated
vendored
Normal file
15
node_modules/@types/mdurl/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/mdurl`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for mdurl (https://github.com/markdown-it/mdurl#readme).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mdurl.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Wed, 01 May 2024 18:07:45 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Junyoung Choi](https://github.com/rokt33r).
|
||||
52
node_modules/@types/mdurl/build/index.cjs.d.ts
generated
vendored
Normal file
52
node_modules/@types/mdurl/build/index.cjs.d.ts
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
declare class Url {
|
||||
protocol: string;
|
||||
slashes: string;
|
||||
auth: string;
|
||||
port: string;
|
||||
hostname: string;
|
||||
hash: string;
|
||||
search: string;
|
||||
pathname: string;
|
||||
|
||||
constructor();
|
||||
|
||||
parse(url: string, slashesDenoteHost?: boolean): this;
|
||||
parseHost(host: string): void;
|
||||
}
|
||||
|
||||
type Url_ = Url;
|
||||
|
||||
declare namespace mdurl {
|
||||
type Url = Url_;
|
||||
}
|
||||
|
||||
declare const mdurl: {
|
||||
decode: {
|
||||
defaultChars: string;
|
||||
componentChars: string;
|
||||
/**
|
||||
* Decode percent-encoded string.
|
||||
*/
|
||||
(str: string, exclude?: string): string;
|
||||
};
|
||||
|
||||
encode: {
|
||||
defaultChars: string;
|
||||
componentChars: string;
|
||||
/**
|
||||
* Encode unsafe characters with percent-encoding, skipping already
|
||||
* encoded sequences.
|
||||
*
|
||||
* @param str string to encode
|
||||
* @param exclude list of characters to ignore (in addition to a-zA-Z0-9)
|
||||
* @param keepEscaped don't encode '%' in a correct escape sequence (default: true)
|
||||
*/
|
||||
(str: string, exclude?: string, keepEscaped?: boolean): string;
|
||||
};
|
||||
|
||||
format(url: Omit<mdurl.Url, "parse" | "parseHost">): string;
|
||||
|
||||
parse(url: string | mdurl.Url, slashesDenoteHost?: boolean): mdurl.Url;
|
||||
};
|
||||
|
||||
export = mdurl;
|
||||
6
node_modules/@types/mdurl/index.d.mts
generated
vendored
Normal file
6
node_modules/@types/mdurl/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import decode from "./lib/decode.mjs";
|
||||
import encode from "./lib/encode.mjs";
|
||||
import format from "./lib/format.mjs";
|
||||
import parse, { Url } from "./lib/parse.mjs";
|
||||
|
||||
export { decode, encode, format, parse, Url };
|
||||
3
node_modules/@types/mdurl/index.d.ts
generated
vendored
Normal file
3
node_modules/@types/mdurl/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import mdurl = require("./build/index.cjs.js");
|
||||
|
||||
export = mdurl;
|
||||
10
node_modules/@types/mdurl/lib/decode.d.mts
generated
vendored
Normal file
10
node_modules/@types/mdurl/lib/decode.d.mts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
declare const decode: {
|
||||
defaultChars: string;
|
||||
componentChars: string;
|
||||
/**
|
||||
* Decode percent-encoded string.
|
||||
*/
|
||||
(str: string, exclude?: string): string;
|
||||
};
|
||||
|
||||
export default decode;
|
||||
15
node_modules/@types/mdurl/lib/encode.d.mts
generated
vendored
Normal file
15
node_modules/@types/mdurl/lib/encode.d.mts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
declare const encode: {
|
||||
defaultChars: string;
|
||||
componentChars: string;
|
||||
/**
|
||||
* Encode unsafe characters with percent-encoding, skipping already
|
||||
* encoded sequences.
|
||||
*
|
||||
* @param str string to encode
|
||||
* @param exclude list of characters to ignore (in addition to a-zA-Z0-9)
|
||||
* @param keepEscaped don't encode '%' in a correct escape sequence (default: true)
|
||||
*/
|
||||
(str: string, exclude?: string, keepEscaped?: boolean): string;
|
||||
};
|
||||
|
||||
export default encode;
|
||||
3
node_modules/@types/mdurl/lib/format.d.mts
generated
vendored
Normal file
3
node_modules/@types/mdurl/lib/format.d.mts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { Url } from "./parse.mjs";
|
||||
|
||||
export default function format(url: Omit<Url, "parse" | "parseHost">): string;
|
||||
18
node_modules/@types/mdurl/lib/parse.d.mts
generated
vendored
Normal file
18
node_modules/@types/mdurl/lib/parse.d.mts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
declare class Url {
|
||||
protocol: string;
|
||||
slashes: string;
|
||||
auth: string;
|
||||
port: string;
|
||||
hostname: string;
|
||||
hash: string;
|
||||
search: string;
|
||||
pathname: string;
|
||||
|
||||
constructor();
|
||||
|
||||
parse(url: string, slashesDenoteHost?: boolean): this;
|
||||
parseHost(host: string): void;
|
||||
}
|
||||
|
||||
export default function parse(url: string | Url, slashesDenoteHost?: boolean): Url;
|
||||
export type { Url };
|
||||
36
node_modules/@types/mdurl/package.json
generated
vendored
Normal file
36
node_modules/@types/mdurl/package.json
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "@types/mdurl",
|
||||
"version": "2.0.0",
|
||||
"description": "TypeScript definitions for mdurl",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mdurl",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Junyoung Choi",
|
||||
"githubUsername": "rokt33r",
|
||||
"url": "https://github.com/rokt33r"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./index.d.mts",
|
||||
"require": "./build/index.cjs.d.ts"
|
||||
},
|
||||
"./*": {
|
||||
"import": "./*",
|
||||
"require": "./*"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/mdurl"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "3dc3a8535d7207c6d737adfe2aac315c7f6546b2372bd343794994106ee251a5",
|
||||
"typeScriptVersion": "4.7"
|
||||
}
|
||||
21
node_modules/@types/unist/LICENSE
generated
vendored
Normal file
21
node_modules/@types/unist/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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
|
||||
15
node_modules/@types/unist/README.md
generated
vendored
Normal file
15
node_modules/@types/unist/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/unist`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for unist (https://github.com/syntax-tree/unist).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unist.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Thu, 15 Aug 2024 02:18:53 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [bizen241](https://github.com/bizen241), [Jun Lu](https://github.com/lujun2), [Hernan Rajchert](https://github.com/hrajchert), [Titus Wormer](https://github.com/wooorm), [Junyoung Choi](https://github.com/rokt33r), [Ben Moon](https://github.com/GuiltyDolphin), [JounQin](https://github.com/JounQin), and [Remco Haszing](https://github.com/remcohaszing).
|
||||
119
node_modules/@types/unist/index.d.ts
generated
vendored
Normal file
119
node_modules/@types/unist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
// ## Interfaces
|
||||
|
||||
/**
|
||||
* Info associated with nodes by the ecosystem.
|
||||
*
|
||||
* This space is guaranteed to never be specified by unist or specifications
|
||||
* implementing unist.
|
||||
* But you can use it in utilities and plugins to store data.
|
||||
*
|
||||
* This type can be augmented to register custom data.
|
||||
* For example:
|
||||
*
|
||||
* ```ts
|
||||
* declare module 'unist' {
|
||||
* interface Data {
|
||||
* // `someNode.data.myId` is typed as `number | undefined`
|
||||
* myId?: number | undefined
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export interface Data {}
|
||||
|
||||
/**
|
||||
* One place in a source file.
|
||||
*/
|
||||
export interface Point {
|
||||
/**
|
||||
* Line in a source file (1-indexed integer).
|
||||
*/
|
||||
line: number;
|
||||
|
||||
/**
|
||||
* Column in a source file (1-indexed integer).
|
||||
*/
|
||||
column: number;
|
||||
/**
|
||||
* Character in a source file (0-indexed integer).
|
||||
*/
|
||||
offset?: number | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Position of a node in a source document.
|
||||
*
|
||||
* A position is a range between two points.
|
||||
*/
|
||||
export interface Position {
|
||||
/**
|
||||
* Place of the first character of the parsed source region.
|
||||
*/
|
||||
start: Point;
|
||||
|
||||
/**
|
||||
* Place of the first character after the parsed source region.
|
||||
*/
|
||||
end: Point;
|
||||
}
|
||||
|
||||
// ## Abstract nodes
|
||||
|
||||
/**
|
||||
* Abstract unist node that contains the smallest possible value.
|
||||
*
|
||||
* This interface is supposed to be extended.
|
||||
*
|
||||
* For example, in HTML, a `text` node is a leaf that contains text.
|
||||
*/
|
||||
export interface Literal extends Node {
|
||||
/**
|
||||
* Plain value.
|
||||
*/
|
||||
value: unknown;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract unist node.
|
||||
*
|
||||
* The syntactic unit in unist syntax trees are called nodes.
|
||||
*
|
||||
* This interface is supposed to be extended.
|
||||
* If you can use {@link Literal} or {@link Parent}, you should.
|
||||
* But for example in markdown, a `thematicBreak` (`***`), is neither literal
|
||||
* nor parent, but still a node.
|
||||
*/
|
||||
export interface Node {
|
||||
/**
|
||||
* Node type.
|
||||
*/
|
||||
type: string;
|
||||
|
||||
/**
|
||||
* Info from the ecosystem.
|
||||
*/
|
||||
data?: Data | undefined;
|
||||
|
||||
/**
|
||||
* Position of a node in a source document.
|
||||
*
|
||||
* Nodes that are generated (not in the original source document) must not
|
||||
* have a position.
|
||||
*/
|
||||
position?: Position | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract unist node that contains other nodes (*children*).
|
||||
*
|
||||
* This interface is supposed to be extended.
|
||||
*
|
||||
* For example, in XML, an element is a parent of different things, such as
|
||||
* comments, text, and further elements.
|
||||
*/
|
||||
export interface Parent extends Node {
|
||||
/**
|
||||
* List of children.
|
||||
*/
|
||||
children: Node[];
|
||||
}
|
||||
60
node_modules/@types/unist/package.json
generated
vendored
Normal file
60
node_modules/@types/unist/package.json
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"name": "@types/unist",
|
||||
"version": "3.0.3",
|
||||
"description": "TypeScript definitions for unist",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unist",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "bizen241",
|
||||
"githubUsername": "bizen241",
|
||||
"url": "https://github.com/bizen241"
|
||||
},
|
||||
{
|
||||
"name": "Jun Lu",
|
||||
"githubUsername": "lujun2",
|
||||
"url": "https://github.com/lujun2"
|
||||
},
|
||||
{
|
||||
"name": "Hernan Rajchert",
|
||||
"githubUsername": "hrajchert",
|
||||
"url": "https://github.com/hrajchert"
|
||||
},
|
||||
{
|
||||
"name": "Titus Wormer",
|
||||
"githubUsername": "wooorm",
|
||||
"url": "https://github.com/wooorm"
|
||||
},
|
||||
{
|
||||
"name": "Junyoung Choi",
|
||||
"githubUsername": "rokt33r",
|
||||
"url": "https://github.com/rokt33r"
|
||||
},
|
||||
{
|
||||
"name": "Ben Moon",
|
||||
"githubUsername": "GuiltyDolphin",
|
||||
"url": "https://github.com/GuiltyDolphin"
|
||||
},
|
||||
{
|
||||
"name": "JounQin",
|
||||
"githubUsername": "JounQin",
|
||||
"url": "https://github.com/JounQin"
|
||||
},
|
||||
{
|
||||
"name": "Remco Haszing",
|
||||
"githubUsername": "remcohaszing",
|
||||
"url": "https://github.com/remcohaszing"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/unist"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "7f3d5ce8d56003f3583a5317f98d444bdc99910c7b486c6b10af4f38694e61fe",
|
||||
"typeScriptVersion": "4.8"
|
||||
}
|
||||
21
node_modules/@types/web-bluetooth/LICENSE
generated
vendored
Normal file
21
node_modules/@types/web-bluetooth/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
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
|
||||
15
node_modules/@types/web-bluetooth/README.md
generated
vendored
Normal file
15
node_modules/@types/web-bluetooth/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/web-bluetooth`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for web-bluetooth (https://webbluetoothcg.github.io/web-bluetooth/).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/web-bluetooth.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Fri, 28 Feb 2025 23:32:04 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Uri Shaked](https://github.com/urish), [Xavier Lozinguez](https://github.com/xlozinguez), [Rob Moran](https://github.com/thegecko), [David Bjerremose](https://github.com/DaBs), and [Nathan Rajlich](https://github.com/TooTallNate).
|
||||
265
node_modules/@types/web-bluetooth/index.d.ts
generated
vendored
Normal file
265
node_modules/@types/web-bluetooth/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,265 @@
|
||||
type BluetoothServiceUUID = number | string;
|
||||
type BluetoothCharacteristicUUID = number | string;
|
||||
type BluetoothDescriptorUUID = number | string;
|
||||
|
||||
type BluetoothManufacturerData = Map<number, DataView>;
|
||||
type BluetoothServiceData = Map<BluetoothServiceUUID, DataView>;
|
||||
|
||||
interface BluetoothDataFilter {
|
||||
readonly dataPrefix?: BufferSource | undefined;
|
||||
readonly mask?: BufferSource | undefined;
|
||||
}
|
||||
|
||||
interface BluetoothManufacturerDataFilter extends BluetoothDataFilter {
|
||||
companyIdentifier: number;
|
||||
}
|
||||
|
||||
interface BluetoothServiceDataFilter extends BluetoothDataFilter {
|
||||
service: BluetoothServiceUUID;
|
||||
}
|
||||
|
||||
interface BluetoothLEScanFilter {
|
||||
readonly name?: string | undefined;
|
||||
readonly namePrefix?: string | undefined;
|
||||
readonly services?: BluetoothServiceUUID[] | undefined;
|
||||
readonly manufacturerData?: BluetoothManufacturerDataFilter[] | undefined;
|
||||
readonly serviceData?: BluetoothServiceDataFilter[] | undefined;
|
||||
}
|
||||
|
||||
interface BluetoothLEScanOptions {
|
||||
readonly filters?: BluetoothLEScanFilter[] | undefined;
|
||||
readonly keepRepeatedDevices?: boolean | undefined;
|
||||
readonly acceptAllAdvertisements?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface BluetoothLEScan extends BluetoothLEScanOptions {
|
||||
active: boolean;
|
||||
stop: () => void;
|
||||
}
|
||||
|
||||
type RequestDeviceOptions = {
|
||||
filters: BluetoothLEScanFilter[];
|
||||
optionalServices?: BluetoothServiceUUID[] | undefined;
|
||||
optionalManufacturerData?: number[] | undefined;
|
||||
} | {
|
||||
acceptAllDevices: boolean;
|
||||
optionalServices?: BluetoothServiceUUID[] | undefined;
|
||||
optionalManufacturerData?: number[] | undefined;
|
||||
};
|
||||
|
||||
interface BluetoothAdvertisingEvent extends Event {
|
||||
readonly device: BluetoothDevice;
|
||||
readonly uuids: BluetoothServiceUUID[];
|
||||
readonly manufacturerData: BluetoothManufacturerData;
|
||||
readonly serviceData: BluetoothServiceData;
|
||||
readonly name?: string | undefined;
|
||||
readonly appearance?: number | undefined;
|
||||
readonly rssi?: number | undefined;
|
||||
readonly txPower?: number | undefined;
|
||||
}
|
||||
|
||||
interface BluetoothRemoteGATTDescriptor {
|
||||
readonly characteristic: BluetoothRemoteGATTCharacteristic;
|
||||
readonly uuid: string;
|
||||
readonly value?: DataView | undefined;
|
||||
readValue(): Promise<DataView>;
|
||||
writeValue(value: BufferSource): Promise<void>;
|
||||
}
|
||||
|
||||
interface BluetoothCharacteristicProperties {
|
||||
readonly broadcast: boolean;
|
||||
readonly read: boolean;
|
||||
readonly writeWithoutResponse: boolean;
|
||||
readonly write: boolean;
|
||||
readonly notify: boolean;
|
||||
readonly indicate: boolean;
|
||||
readonly authenticatedSignedWrites: boolean;
|
||||
readonly reliableWrite: boolean;
|
||||
readonly writableAuxiliaries: boolean;
|
||||
}
|
||||
|
||||
interface CharacteristicEventHandlers {
|
||||
oncharacteristicvaluechanged: (this: this, ev: Event) => any;
|
||||
}
|
||||
|
||||
interface BluetoothRemoteGATTCharacteristicEventMap {
|
||||
"characteristicvaluechanged": Event;
|
||||
}
|
||||
|
||||
interface BluetoothRemoteGATTCharacteristic extends EventTarget, CharacteristicEventHandlers {
|
||||
readonly service: BluetoothRemoteGATTService;
|
||||
readonly uuid: string;
|
||||
readonly properties: BluetoothCharacteristicProperties;
|
||||
readonly value?: DataView | undefined;
|
||||
getDescriptor(descriptor: BluetoothDescriptorUUID): Promise<BluetoothRemoteGATTDescriptor>;
|
||||
getDescriptors(descriptor?: BluetoothDescriptorUUID): Promise<BluetoothRemoteGATTDescriptor[]>;
|
||||
readValue(): Promise<DataView>;
|
||||
writeValue(value: BufferSource): Promise<void>;
|
||||
writeValueWithResponse(value: BufferSource): Promise<void>;
|
||||
writeValueWithoutResponse(value: BufferSource): Promise<void>;
|
||||
startNotifications(): Promise<BluetoothRemoteGATTCharacteristic>;
|
||||
stopNotifications(): Promise<BluetoothRemoteGATTCharacteristic>;
|
||||
addEventListener<K extends keyof BluetoothRemoteGATTCharacteristicEventMap>(
|
||||
type: K,
|
||||
listener: (this: BluetoothRemoteGATTCharacteristic, ev: BluetoothRemoteGATTCharacteristicEventMap[K]) => any,
|
||||
options?: boolean | AddEventListenerOptions,
|
||||
): void;
|
||||
addEventListener(
|
||||
type: string,
|
||||
listener: EventListenerOrEventListenerObject,
|
||||
options?: boolean | AddEventListenerOptions,
|
||||
): void;
|
||||
removeEventListener<K extends keyof BluetoothRemoteGATTCharacteristicEventMap>(
|
||||
type: K,
|
||||
listener: (this: BluetoothRemoteGATTCharacteristic, ev: BluetoothRemoteGATTCharacteristicEventMap[K]) => any,
|
||||
options?: boolean | EventListenerOptions,
|
||||
): void;
|
||||
removeEventListener(
|
||||
type: string,
|
||||
listener: EventListenerOrEventListenerObject,
|
||||
options?: boolean | EventListenerOptions,
|
||||
): void;
|
||||
}
|
||||
|
||||
interface ServiceEventHandlers {
|
||||
onserviceadded: (this: this, ev: Event) => any;
|
||||
onservicechanged: (this: this, ev: Event) => any;
|
||||
onserviceremoved: (this: this, ev: Event) => any;
|
||||
}
|
||||
|
||||
interface BluetoothRemoteGATTServiceEventMap {
|
||||
"serviceadded": Event;
|
||||
"servicechanged": Event;
|
||||
"serviceremoved": Event;
|
||||
}
|
||||
|
||||
interface BluetoothRemoteGATTService extends EventTarget, CharacteristicEventHandlers, ServiceEventHandlers {
|
||||
readonly device: BluetoothDevice;
|
||||
readonly uuid: string;
|
||||
readonly isPrimary: boolean;
|
||||
getCharacteristic(characteristic: BluetoothCharacteristicUUID): Promise<BluetoothRemoteGATTCharacteristic>;
|
||||
getCharacteristics(characteristic?: BluetoothCharacteristicUUID): Promise<BluetoothRemoteGATTCharacteristic[]>;
|
||||
getIncludedService(service: BluetoothServiceUUID): Promise<BluetoothRemoteGATTService>;
|
||||
getIncludedServices(service?: BluetoothServiceUUID): Promise<BluetoothRemoteGATTService[]>;
|
||||
addEventListener<K extends keyof BluetoothRemoteGATTServiceEventMap>(
|
||||
type: K,
|
||||
listener: (this: BluetoothRemoteGATTService, ev: BluetoothRemoteGATTServiceEventMap[K]) => any,
|
||||
options?: boolean | AddEventListenerOptions,
|
||||
): void;
|
||||
addEventListener(
|
||||
type: string,
|
||||
listener: EventListenerOrEventListenerObject,
|
||||
options?: boolean | AddEventListenerOptions,
|
||||
): void;
|
||||
removeEventListener<K extends keyof BluetoothRemoteGATTServiceEventMap>(
|
||||
type: K,
|
||||
listener: (this: BluetoothRemoteGATTService, ev: BluetoothRemoteGATTServiceEventMap[K]) => any,
|
||||
options?: boolean | EventListenerOptions,
|
||||
): void;
|
||||
removeEventListener(
|
||||
type: string,
|
||||
listener: EventListenerOrEventListenerObject,
|
||||
options?: boolean | EventListenerOptions,
|
||||
): void;
|
||||
}
|
||||
|
||||
interface BluetoothRemoteGATTServer {
|
||||
readonly device: BluetoothDevice;
|
||||
readonly connected: boolean;
|
||||
connect(): Promise<BluetoothRemoteGATTServer>;
|
||||
disconnect(): void;
|
||||
getPrimaryService(service: BluetoothServiceUUID): Promise<BluetoothRemoteGATTService>;
|
||||
getPrimaryServices(service?: BluetoothServiceUUID): Promise<BluetoothRemoteGATTService[]>;
|
||||
}
|
||||
|
||||
interface BluetoothDeviceEventHandlers {
|
||||
onadvertisementreceived: (this: this, ev: BluetoothAdvertisingEvent) => any;
|
||||
ongattserverdisconnected: (this: this, ev: Event) => any;
|
||||
}
|
||||
|
||||
interface WatchAdvertisementsOptions {
|
||||
signal?: AbortSignal;
|
||||
}
|
||||
|
||||
interface BluetoothDeviceEventMap {
|
||||
"advertisementreceived": BluetoothAdvertisingEvent;
|
||||
"gattserverdisconnected": Event;
|
||||
}
|
||||
|
||||
interface BluetoothDevice
|
||||
extends EventTarget, BluetoothDeviceEventHandlers, CharacteristicEventHandlers, ServiceEventHandlers
|
||||
{
|
||||
readonly id: string;
|
||||
readonly name?: string | undefined;
|
||||
readonly gatt?: BluetoothRemoteGATTServer | undefined;
|
||||
forget(): Promise<void>;
|
||||
watchAdvertisements(options?: WatchAdvertisementsOptions): Promise<void>;
|
||||
readonly watchingAdvertisements: boolean;
|
||||
addEventListener<K extends keyof BluetoothDeviceEventMap>(
|
||||
type: K,
|
||||
listener: (this: BluetoothDevice, ev: BluetoothDeviceEventMap[K]) => any,
|
||||
options?: boolean | AddEventListenerOptions,
|
||||
): void;
|
||||
addEventListener(
|
||||
type: string,
|
||||
listener: EventListenerOrEventListenerObject,
|
||||
options?: boolean | AddEventListenerOptions,
|
||||
): void;
|
||||
removeEventListener<K extends keyof BluetoothDeviceEventMap>(
|
||||
type: K,
|
||||
listener: (this: BluetoothDevice, ev: BluetoothDeviceEventMap[K]) => any,
|
||||
options?: boolean | EventListenerOptions,
|
||||
): void;
|
||||
removeEventListener(
|
||||
type: string,
|
||||
listener: EventListenerOrEventListenerObject,
|
||||
options?: boolean | EventListenerOptions,
|
||||
): void;
|
||||
}
|
||||
|
||||
interface BluetoothEventMap {
|
||||
"availabilitychanged": Event;
|
||||
"advertisementreceived": BluetoothAdvertisingEvent;
|
||||
}
|
||||
|
||||
interface Bluetooth
|
||||
extends EventTarget, BluetoothDeviceEventHandlers, CharacteristicEventHandlers, ServiceEventHandlers
|
||||
{
|
||||
getDevices(): Promise<BluetoothDevice[]>;
|
||||
getAvailability(): Promise<boolean>;
|
||||
onavailabilitychanged: (this: this, ev: Event) => any;
|
||||
readonly referringDevice?: BluetoothDevice | undefined;
|
||||
requestDevice(options?: RequestDeviceOptions): Promise<BluetoothDevice>;
|
||||
requestLEScan(options?: BluetoothLEScanOptions): Promise<BluetoothLEScan>;
|
||||
addEventListener<K extends keyof BluetoothEventMap>(
|
||||
type: K,
|
||||
listener: (this: Bluetooth, ev: BluetoothEventMap[K]) => any,
|
||||
options?: boolean | AddEventListenerOptions,
|
||||
): void;
|
||||
addEventListener(
|
||||
type: string,
|
||||
listener: EventListenerOrEventListenerObject,
|
||||
options?: boolean | AddEventListenerOptions,
|
||||
): void;
|
||||
removeEventListener<K extends keyof BluetoothEventMap>(
|
||||
type: K,
|
||||
listener: (this: Bluetooth, ev: BluetoothEventMap[K]) => any,
|
||||
options?: boolean | EventListenerOptions,
|
||||
): void;
|
||||
removeEventListener(
|
||||
type: string,
|
||||
listener: EventListenerOrEventListenerObject,
|
||||
options?: boolean | EventListenerOptions,
|
||||
): void;
|
||||
}
|
||||
|
||||
declare namespace BluetoothUUID {
|
||||
function getService(name: string | number): string;
|
||||
function getCharacteristic(name: string | number): string;
|
||||
function getDescriptor(name: string | number): string;
|
||||
function canonicalUUID(alias: string | number): string;
|
||||
}
|
||||
|
||||
interface Navigator {
|
||||
bluetooth: Bluetooth;
|
||||
}
|
||||
46
node_modules/@types/web-bluetooth/package.json
generated
vendored
Normal file
46
node_modules/@types/web-bluetooth/package.json
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "@types/web-bluetooth",
|
||||
"version": "0.0.21",
|
||||
"description": "TypeScript definitions for web-bluetooth",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/web-bluetooth",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Uri Shaked",
|
||||
"githubUsername": "urish",
|
||||
"url": "https://github.com/urish"
|
||||
},
|
||||
{
|
||||
"name": "Xavier Lozinguez",
|
||||
"githubUsername": "xlozinguez",
|
||||
"url": "https://github.com/xlozinguez"
|
||||
},
|
||||
{
|
||||
"name": "Rob Moran",
|
||||
"githubUsername": "thegecko",
|
||||
"url": "https://github.com/thegecko"
|
||||
},
|
||||
{
|
||||
"name": "David Bjerremose",
|
||||
"githubUsername": "DaBs",
|
||||
"url": "https://github.com/DaBs"
|
||||
},
|
||||
{
|
||||
"name": "Nathan Rajlich",
|
||||
"githubUsername": "TooTallNate",
|
||||
"url": "https://github.com/TooTallNate"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/web-bluetooth"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "404bf844de289dadba3d26226789890c4d08fa51d5a57811442223118e3a9fa2",
|
||||
"typeScriptVersion": "5.0"
|
||||
}
|
||||
Reference in New Issue
Block a user