Vitepress

This commit is contained in:
Robert Jelic
2025-02-10 06:53:23 +01:00
parent 3818128521
commit b0a4a6da9c
2428 changed files with 1005324 additions and 0 deletions

21
node_modules/@types/linkify-it/LICENSE generated vendored Normal file
View 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

89
node_modules/@types/linkify-it/README.md generated vendored Normal file
View File

@@ -0,0 +1,89 @@
# 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.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/linkify-it/index.d.ts)
````ts
// Type definitions for linkify-it 3.0.2
// Project: https://github.com/markdown-it/linkify-it
// Definitions by: Lindsey Smith <https://github.com/praxxis>
// Robert Coie <https://github.com/rapropos/typed-linkify-it>
// Alex Plumb <https://github.com/alexplumb>
// Rafa Gares <https://github.com/ragafus>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
declare const LinkifyIt: {
(
schemas?: LinkifyIt.SchemaRules | LinkifyIt.Options,
options?: LinkifyIt.Options,
): LinkifyIt.LinkifyIt;
new(
schemas?: LinkifyIt.SchemaRules | LinkifyIt.Options,
options?: LinkifyIt.Options,
): LinkifyIt.LinkifyIt;
};
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;
interface SchemaRules {
[schema: string]: Rule;
}
interface Options {
fuzzyLink?: boolean | undefined;
fuzzyIP?: boolean | undefined;
fuzzyEmail?: boolean | undefined;
}
interface Match {
index: number;
lastIndex: number;
raw: string;
schema: string;
text: string;
url: string;
}
interface LinkifyIt {
// Use overloads to provide contextual typing to `FullRule.normalize`, which is ambiguous with string.normalize
// This appears unneeded to the unified-signatures lint rule.
add(schema: string, rule: string): LinkifyIt;
// tslint:disable-next-line: unified-signatures
add(schema: string, rule: FullRule | null): LinkifyIt;
match(text: string): Match[] | null;
normalize(raw: string): string;
pretest(text: string): boolean;
set(options: Options): LinkifyIt;
test(text: string): boolean;
testSchemaAt(text: string, schemaName: string, pos: number): number;
tlds(list: string | string[], keepOld?: boolean): LinkifyIt;
re: {
[key: string]: RegExp;
};
}
}
export = LinkifyIt;
````
### Additional Details
* Last updated: Wed, 30 Aug 2023 19:35:08 GMT
* Dependencies: none
* Global values: 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).

69
node_modules/@types/linkify-it/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,69 @@
// Type definitions for linkify-it 3.0.2
// Project: https://github.com/markdown-it/linkify-it
// Definitions by: Lindsey Smith <https://github.com/praxxis>
// Robert Coie <https://github.com/rapropos/typed-linkify-it>
// Alex Plumb <https://github.com/alexplumb>
// Rafa Gares <https://github.com/ragafus>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
declare const LinkifyIt: {
(
schemas?: LinkifyIt.SchemaRules | LinkifyIt.Options,
options?: LinkifyIt.Options,
): LinkifyIt.LinkifyIt;
new(
schemas?: LinkifyIt.SchemaRules | LinkifyIt.Options,
options?: LinkifyIt.Options,
): LinkifyIt.LinkifyIt;
};
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;
interface SchemaRules {
[schema: string]: Rule;
}
interface Options {
fuzzyLink?: boolean | undefined;
fuzzyIP?: boolean | undefined;
fuzzyEmail?: boolean | undefined;
}
interface Match {
index: number;
lastIndex: number;
raw: string;
schema: string;
text: string;
url: string;
}
interface LinkifyIt {
// Use overloads to provide contextual typing to `FullRule.normalize`, which is ambiguous with string.normalize
// This appears unneeded to the unified-signatures lint rule.
add(schema: string, rule: string): LinkifyIt;
// tslint:disable-next-line: unified-signatures
add(schema: string, rule: FullRule | null): LinkifyIt;
match(text: string): Match[] | null;
normalize(raw: string): string;
pretest(text: string): boolean;
set(options: Options): LinkifyIt;
test(text: string): boolean;
testSchemaAt(text: string, schemaName: string, pos: number): number;
tlds(list: string | string[], keepOld?: boolean): LinkifyIt;
re: {
[key: string]: RegExp;
};
}
}
export = LinkifyIt;

39
node_modules/@types/linkify-it/package.json generated vendored Normal file
View File

@@ -0,0 +1,39 @@
{
"name": "@types/linkify-it",
"version": "3.0.3",
"description": "TypeScript definitions for linkify-it",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/linkify-it",
"license": "MIT",
"contributors": [
{
"name": "Lindsey Smith",
"url": "https://github.com/praxxis",
"githubUsername": "praxxis"
},
{
"name": "Robert Coie",
"url": "https://github.com/rapropos/typed-linkify-it"
},
{
"name": "Alex Plumb",
"url": "https://github.com/alexplumb",
"githubUsername": "alexplumb"
},
{
"name": "Rafa Gares",
"url": "https://github.com/ragafus",
"githubUsername": "ragafus"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/linkify-it"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "50331508a8edd85ad891cfeec0d89dba4c9574d76aa41d88354115cc46ea3faf",
"typeScriptVersion": "4.3"
}

21
node_modules/@types/markdown-it/LICENSE generated vendored Normal file
View 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

16
node_modules/@types/markdown-it/README.md generated vendored Normal file
View File

@@ -0,0 +1,16 @@
# 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: Wed, 27 Sep 2023 09:42:15 GMT
* Dependencies: [@types/linkify-it](https://npmjs.com/package/@types/linkify-it), [@types/mdurl](https://npmjs.com/package/@types/mdurl)
* Global values: `markdownit`
# 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).

13
node_modules/@types/markdown-it/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
// Type definitions for markdown-it 13.0
// Project: https://github.com/markdown-it/markdown-it
// Definitions by: York Yao <https://github.com/plantain-00>
// Robert Coie <https://github.com/rapropos>
// duduluu <https://github.com/duduluu>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import MarkdownIt = require("./lib");
export as namespace markdownit;
export = MarkdownIt;

View File

@@ -0,0 +1,7 @@
interface MapType {
[key: string]: string;
}
declare const entities: MapType;
export = entities;

View File

@@ -0,0 +1,3 @@
declare const htmlBlocks: string[];
export = htmlBlocks;

View File

@@ -0,0 +1,8 @@
interface HtmlRE {
HTML_TAG_RE: RegExp;
HTML_OPEN_CLOSE_TAG_RE: RegExp;
}
declare const htmlRE: HtmlRE;
export = htmlRE;

70
node_modules/@types/markdown-it/lib/common/utils.d.ts generated vendored Normal file
View File

@@ -0,0 +1,70 @@
import * as mdurl from "mdurl";
// import ucmicro from 'uc.micro';
interface Utils {
lib: {
mdurl: typeof mdurl;
};
/**
* Merge objects
*/
assign(target: any, ...sources: any[]): any;
/**
* Check if the type is string or not
*/
isString(obj: any): obj is string;
/**
* has own property
*/
has(obj: any, key: keyof any): boolean;
unescapeMd(str: string): string;
unescapeAll(str: string): string;
isValidEntityCode(code: number): boolean;
fromCodePoint(code: number): string;
escapeHtml(str: string): string;
/**
* Remove element from array and put another array at those position.
* Useful for some operations with tokens.
* Return a new array.
*/
arrayReplaceAt<T>(src: T[], pos: number, newElements: T[]): T[];
isSpace(code: number): boolean;
/**
* Zs (unicode class) || [\t\f\v\r\n]
*/
isWhiteSpace(code: number): boolean;
/**
* Markdown ASCII punctuation characters.
*
* !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
* http://spec.commonmark.org/0.15/#ascii-punctuation-character
*
* Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.
*/
isMdAsciiPunct(code: number): boolean;
/**
* Currently without astral characters support.
*/
isPunctChar(ch: string): boolean;
escapeRE(str: string): string;
/**
* Hepler to unify [reference labels].
*/
normalizeReference(str: string): string;
}
declare const utils: Utils;
export = utils;

13
node_modules/@types/markdown-it/lib/helpers/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
import parseLinkLabel = require("./parse_link_label");
import parseLinkDestination = require("./parse_link_destination");
import parseLinkTitle = require("./parse_link_title");
interface Helpers {
parseLinkLabel: typeof parseLinkLabel;
parseLinkDestination: typeof parseLinkDestination;
parseLinkTitle: typeof parseLinkTitle;
}
declare const helpers: Helpers;
export = helpers;

View File

@@ -0,0 +1,12 @@
declare namespace parseLinkDestination {
interface ParseResult {
ok: boolean;
pos: number;
lines: number;
str: string;
}
}
declare function parseLinkDestination(str: string, pos: number, max: number): parseLinkDestination.ParseResult;
export = parseLinkDestination;

View File

@@ -0,0 +1,5 @@
import StateInline = require("../rules_inline/state_inline");
declare function parseLinkLabel(state: StateInline, start: number, disableNested?: boolean): number;
export = parseLinkLabel;

View File

@@ -0,0 +1,5 @@
import Destination = require("./parse_link_destination");
declare function parseLinkTitle(str: string, pos: number, max: number): Destination.ParseResult;
export = parseLinkTitle;

408
node_modules/@types/markdown-it/lib/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,408 @@
import LinkifyIt = require("linkify-it");
import utils = require("./common/utils");
import helpers = require("./helpers");
import ParserBlock = require("./parser_block");
import ParserCore = require("./parser_core");
import ParserInline = require("./parser_inline");
import Renderer = require("./renderer");
import Token = require("./token");
declare namespace MarkdownIt {
type Token = typeof import("./token");
/**
* 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.
*/
type PresetName = "default" | "zero" | "commonmark";
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;
}
type PluginSimple = (md: MarkdownIt) => void;
type PluginWithOptions<T = any> = (md: MarkdownIt, options?: T) => void;
type PluginWithParams = (md: MarkdownIt, ...params: any[]) => void;
}
interface MarkdownItConstructor {
new(): MarkdownIt;
new(presetName: MarkdownIt.PresetName, options?: MarkdownIt.Options): MarkdownIt;
new(options: MarkdownIt.Options): MarkdownIt;
(): MarkdownIt;
(presetName: MarkdownIt.PresetName, options?: MarkdownIt.Options): MarkdownIt;
(options: MarkdownIt.Options): MarkdownIt;
}
interface MarkdownIt {
/**
* Instance of [[ParserInline]]. You may need it to add new rules when
* writing plugins. For simple rules control use [[MarkdownIt.disable]] and
* [[MarkdownIt.enable]].
*/
readonly inline: ParserInline;
/**
* Instance of [[ParserBlock]]. You may need it to add new rules when
* writing plugins. For simple rules control use [[MarkdownIt.disable]] and
* [[MarkdownIt.enable]].
*/
readonly block: ParserBlock;
/**
* Instance of [[Core]] chain executor. You may need it to add new rules when
* writing plugins. For simple rules control use [[MarkdownIt.disable]] and
* [[MarkdownIt.enable]].
*/
readonly core: ParserCore;
/**
* Instance of [[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 [[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.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: MarkdownIt.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: MarkdownIt.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: MarkdownIt.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 [[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: MarkdownIt.PluginSimple): this;
use<T = any>(plugin: MarkdownIt.PluginWithOptions<T>, options?: T): this;
use(plugin: MarkdownIt.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 [[MarkdownIt.parse]].
*
* @param src source string
* @param env environment sandbox
*/
render(src: string, env?: any): string;
/**
* *internal*
*
* The same as [[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 [[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 = MarkdownIt;

29
node_modules/@types/markdown-it/lib/parser_block.d.ts generated vendored Normal file
View File

@@ -0,0 +1,29 @@
import MarkdownIt = require(".");
import Ruler = require("./ruler");
import StateBlock = require("./rules_block/state_block");
import Token = require("./token");
declare namespace ParserBlock {
type RuleBlock = (state: StateBlock, startLine: number, endLine: number, silent: boolean) => boolean;
}
declare class ParserBlock {
/**
* [[Ruler]] instance. Keep configuration of block rules.
*/
ruler: Ruler<ParserBlock.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;
}
export = ParserBlock;

19
node_modules/@types/markdown-it/lib/parser_core.d.ts generated vendored Normal file
View File

@@ -0,0 +1,19 @@
import Ruler = require("./ruler");
import StateCore = require("./rules_core/state_core");
declare namespace Core {
type RuleCore = (state: StateCore) => void;
}
declare class Core {
ruler: Ruler<Core.RuleCore>;
/**
* Executes core chain rules.
*/
process(state: StateCore): void;
State: typeof StateCore;
}
export = Core;

42
node_modules/@types/markdown-it/lib/parser_inline.d.ts generated vendored Normal file
View File

@@ -0,0 +1,42 @@
import MarkdownIt = require(".");
import Ruler = require("./ruler");
import Token = require("./token");
import StateInline = require("./rules_inline/state_inline");
declare namespace ParserInline {
type RuleInline = (state: StateInline, silent: boolean) => boolean;
type RuleInline2 = (state: StateInline) => boolean;
}
declare class ParserInline {
/**
* [[Ruler]] instance. Keep configuration of inline rules.
*/
ruler: Ruler<ParserInline.RuleInline>;
/**
* [[Ruler]] instance. Second ruler used for post-processing
* (e.g. in emphasis-like rules).
*/
ruler2: Ruler<ParserInline.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;
}
export = ParserInline;

96
node_modules/@types/markdown-it/lib/renderer.d.ts generated vendored Normal file
View File

@@ -0,0 +1,96 @@
import MarkdownIt = require(".");
import Token = require("./token");
declare namespace Renderer {
type RenderRule = (tokens: Token[], idx: number, options: MarkdownIt.Options, env: any, self: Renderer) => string;
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;
}
}
declare class Renderer {
/**
* 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 [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js)
* for more details and examples.
*/
rules: Renderer.RenderRuleRecord;
/**
* Render token attributes to string.
*/
renderAttrs(token: Token): string;
/**
* Default token renderer. Can be overriden by custom function
* in [[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: MarkdownIt.Options): string;
/**
* The same as [[Renderer.render]], but for single token of `inline` type.
*
* @param tokens list on block tokens to renter
* @param options params of parser instance
* @param env additional data from parsed input (references, for example)
*/
renderInline(tokens: Token[], options: MarkdownIt.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 on block tokens to renter
* @param options params of parser instance
* @param env additional data from parsed input (references, for example)
*/
renderInlineAsText(tokens: Token[], options: MarkdownIt.Options, env: any): string;
/**
* Takes token stream and generates HTML. Probably, you will never need to call
* this method directly.
*
* @param tokens list on block tokens to renter
* @param options params of parser instance
* @param env additional data from parsed input (references, for example)
*/
render(tokens: Token[], options: MarkdownIt.Options, env: any): string;
}
export = Renderer;

167
node_modules/@types/markdown-it/lib/ruler.d.ts generated vendored Normal file
View File

@@ -0,0 +1,167 @@
declare namespace Ruler {
interface RuleOptions {
/**
* array with names of "alternate" chains.
*/
alt: string[];
}
}
/**
* class Ruler
*
* Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and
* [[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)
* - cacheing lists of active rules
*
* You will not need use this class directly until write plugins. For simple
* rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and
* [[MarkdownIt.use]].
*/
declare class Ruler<T> {
/**
* 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?: Ruler.RuleOptions): void;
/**
* Add new rule to chain before one with given name. See also
* [[Ruler.after]], [[Ruler.push]].
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* md.block.ruler.before('paragraph', 'my_rule', function replace(state) {
* //...
* });
* ```
*
* @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?: Ruler.RuleOptions): void;
/**
* Add new rule to chain after one with given name. See also
* [[Ruler.before]], [[Ruler.push]].
*
* ##### Options:
*
* - __alt__ - array with names of "alternate" chains.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* md.inline.ruler.after('text', 'my_rule', function replace(state) {
* //...
* });
* ```
*
* @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?: Ruler.RuleOptions): void;
/**
* Push new rule to the end of chain. See also
* [[Ruler.before]], [[Ruler.after]].
*
* ##### Options:
*
* - __alt__ - array with names of "alternate" chains.
*
* ##### Example
*
* ```javascript
* var md = require('markdown-it')();
*
* md.core.ruler.push('my_rule', function replace(state) {
* //...
* });
* ```
*
* @param ruleName name of added rule.
* @param fn rule function.
* @param options rule options (not mandatory).
*/
push(ruleName: string, fn: T, options?: Ruler.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 also [[Ruler.disable]], [[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 also [[Ruler.disable]], [[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): string[];
/**
* 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 also [[Ruler.enable]], [[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[];
}
export = Ruler;

View File

@@ -0,0 +1,134 @@
import MarkdownIt = require("..");
import Token = require("../token");
declare namespace StateBlock {
type ParentType = "blockquote" | "list" | "root" | "paragraph" | "reference";
}
declare 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;
/**
* can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'
* used in lists to determine if they interrupt a paragraph
*/
parentType: StateBlock.ParentType;
level: number;
/**
* renderer
*/
result: string;
/**
* Push new token to "stream".
*/
push(type: string, tag: string, nesting: Token.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;
}
export = StateBlock;

View File

@@ -0,0 +1,20 @@
import MarkdownIt = require("..");
import Token = require("../token");
declare 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;
}
export = StateCore;

View File

@@ -0,0 +1,78 @@
import MarkdownIt = require("..");
import Token = require("../token");
declare namespace StateInline {
interface Scanned {
can_open: boolean;
can_close: boolean;
length: number;
}
interface Delimiter {
marker: number;
length: number;
jump: number;
token: number;
end: number;
open: boolean;
close: boolean;
}
interface TokenMata {
delimiters: Delimiter[];
}
}
declare class StateInline {
constructor(src: string, md: MarkdownIt, env: any, outTokens: Token[]);
src: string;
env: any;
md: MarkdownIt;
tokens: Token[];
tokens_meta: Array<StateInline.TokenMata | 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: StateInline.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: Token.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): StateInline.Scanned;
Token: typeof Token;
}
export = StateInline;

110
node_modules/@types/markdown-it/lib/token.d.ts generated vendored Normal file
View File

@@ -0,0 +1,110 @@
declare namespace Token {
type Nesting = 1 | 0 | -1;
}
/**
* Create new token and fill passed properties.
*/
declare class Token {
constructor(type: string, tag: string, nesting: Token.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: [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: 1 | 0 | -1;
/**
* 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;
/**
* Fence info string
*/
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;
}
export = Token;

43
node_modules/@types/markdown-it/package.json generated vendored Normal file
View File

@@ -0,0 +1,43 @@
{
"name": "@types/markdown-it",
"version": "13.0.2",
"description": "TypeScript definitions for markdown-it",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/markdown-it",
"license": "MIT",
"contributors": [
{
"name": "York Yao",
"url": "https://github.com/plantain-00",
"githubUsername": "plantain-00"
},
{
"name": "Robert Coie",
"url": "https://github.com/rapropos",
"githubUsername": "rapropos"
},
{
"name": "duduluu",
"url": "https://github.com/duduluu",
"githubUsername": "duduluu"
},
{
"name": "Piotr Błażejewicz",
"url": "https://github.com/peterblazejewicz",
"githubUsername": "peterblazejewicz"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/markdown-it"
},
"scripts": {},
"dependencies": {
"@types/linkify-it": "*",
"@types/mdurl": "*"
},
"typesPublisherContentHash": "92ce8adb70cda1163d895ebc53ba1d0b2758ec33a9dd4b5190a0c3d7b228d775",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/mdurl/LICENSE generated vendored Normal file
View 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

16
node_modules/@types/mdurl/README.md generated vendored Normal file
View File

@@ -0,0 +1,16 @@
# 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, 27 Sep 2023 09:42:15 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by [Junyoung Choi](https://github.com/rokt33r).

7
node_modules/@types/mdurl/decode.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
declare namespace decode {
const defaultChars: string;
const componentChars: string;
}
declare function decode(input: string, exclude?: string): string;
export = decode;

7
node_modules/@types/mdurl/encode.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
declare namespace encode {
const defaultChars: string;
const componentChars: string;
}
declare function encode(str: string, exclude?: string, keepEscaped?: boolean): string;
export = encode;

5
node_modules/@types/mdurl/format.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import { Url } from "./";
declare function format(url: Url): string;
export = format;

21
node_modules/@types/mdurl/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,21 @@
// Type definitions for mdurl 1.0
// Project: https://github.com/markdown-it/mdurl#readme
// Definitions by: Junyoung Choi <https://github.com/rokt33r>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import encode = require("./encode");
import decode = require("./decode");
import parse = require("./parse");
import format = require("./format");
export interface Url {
protocol: string;
slashes: string;
auth: string;
port: string;
hostname: string;
hash: string;
search: string;
pathname: string;
}
export { decode, encode, format, parse };

25
node_modules/@types/mdurl/package.json generated vendored Normal file
View File

@@ -0,0 +1,25 @@
{
"name": "@types/mdurl",
"version": "1.0.3",
"description": "TypeScript definitions for mdurl",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mdurl",
"license": "MIT",
"contributors": [
{
"name": "Junyoung Choi",
"url": "https://github.com/rokt33r",
"githubUsername": "rokt33r"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/mdurl"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "42f41158cf3b4122feb29c28ecc9f1a1df2dab36529839389a20db480871dc89",
"typeScriptVersion": "4.5"
}

5
node_modules/@types/mdurl/parse.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import { Url } from "./";
declare function parse(input: string, slashesDenoteHost?: boolean): Url;
export = parse;

21
node_modules/@types/web-bluetooth/LICENSE generated vendored Normal file
View 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

16
node_modules/@types/web-bluetooth/README.md generated vendored Normal file
View File

@@ -0,0 +1,16 @@
# 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: Mon, 25 Sep 2023 13:39:06 GMT
* Dependencies: none
* Global values: `BluetoothUUID`
# Credits
These definitions were written by [Uri Shaked](https://github.com/urish), [Xavier Lozinguez](https://github.com/xlozinguez), [Rob Moran](https://github.com/thegecko), and [David Bjerremose](https://github.com/DaBs).

201
node_modules/@types/web-bluetooth/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,201 @@
// Type definitions for Web Bluetooth
// Project: https://webbluetoothcg.github.io/web-bluetooth/
// Definitions 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>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
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 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(
type: "characteristicvaluechanged",
listener: (this: this, ev: Event) => any,
useCapture?: boolean,
): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
interface ServiceEventHandlers {
onserviceadded: (this: this, ev: Event) => any;
onservicechanged: (this: this, ev: Event) => any;
onserviceremoved: (this: this, ev: Event) => any;
}
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(type: "serviceadded", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "servicechanged", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "serviceremoved", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): 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 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(
type: "gattserverdisconnected",
listener: (this: this, ev: Event) => any,
useCapture?: boolean,
): void;
addEventListener(
type: "advertisementreceived",
listener: (this: this, ev: BluetoothAdvertisingEvent) => any,
useCapture?: boolean,
): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
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(type: "availabilitychanged", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(
type: "advertisementreceived",
listener: (this: this, ev: BluetoothAdvertisingEvent) => any,
useCapture?: boolean,
): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): 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;
}

40
node_modules/@types/web-bluetooth/package.json generated vendored Normal file
View File

@@ -0,0 +1,40 @@
{
"name": "@types/web-bluetooth",
"version": "0.0.18",
"description": "TypeScript definitions for Web Bluetooth",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/web-bluetooth",
"license": "MIT",
"contributors": [
{
"name": "Uri Shaked",
"url": "https://github.com/urish",
"githubUsername": "urish"
},
{
"name": "Xavier Lozinguez",
"url": "https://github.com/xlozinguez",
"githubUsername": "xlozinguez"
},
{
"name": "Rob Moran",
"url": "https://github.com/thegecko",
"githubUsername": "thegecko"
},
{
"name": "David Bjerremose",
"url": "https://github.com/DaBs",
"githubUsername": "DaBs"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/web-bluetooth"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "f8714903c001398af17f739a8a4f761b0f4984a1653e425b25a3381a50dfe5cf",
"typeScriptVersion": "4.5"
}