mdat 1.2.0 β 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +1541 -1
- package/dist/index.js +1535 -0
- package/package.json +9 -9
- package/dist/.DS_Store +0 -0
package/bin/cli.js
CHANGED
|
@@ -242,6 +242,65 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
242
242
|
//#endregion
|
|
243
243
|
//#region node_modules/.pnpm/to-vfile@8.0.0/node_modules/to-vfile/lib/index.js
|
|
244
244
|
/**
|
|
245
|
+
* @typedef {import('vfile').VFileOptions} Options
|
|
246
|
+
* @typedef {import('vfile').VFileValue} Value
|
|
247
|
+
*/
|
|
248
|
+
/**
|
|
249
|
+
* @typedef {'ascii' | 'base64' | 'base64url' | 'binary' | 'hex' | 'latin1' | 'ucs-2' | 'ucs2' | 'utf-8' | 'utf16le' | 'utf8'} BufferEncoding
|
|
250
|
+
* Encodings supported by the buffer class.
|
|
251
|
+
*
|
|
252
|
+
* This is a copy of the types from Node, copied to prevent Node globals from
|
|
253
|
+
* being needed.
|
|
254
|
+
* Copied from: <https://github.com/DefinitelyTyped/DefinitelyTyped/blob/1761eec/types/node/buffer.d.ts#L223>.
|
|
255
|
+
*
|
|
256
|
+
* @typedef ReadOptions
|
|
257
|
+
* Configuration for `fs.readFile`.
|
|
258
|
+
* @property {BufferEncoding | null | undefined} [encoding]
|
|
259
|
+
* Encoding to read file as, will turn `file.value` into a string if passed.
|
|
260
|
+
* @property {string | undefined} [flag]
|
|
261
|
+
* File system flags to use.
|
|
262
|
+
*
|
|
263
|
+
* @typedef WriteOptions
|
|
264
|
+
* Configuration for `fs.writeFile`.
|
|
265
|
+
* @property {BufferEncoding | null | undefined} [encoding]
|
|
266
|
+
* Encoding to write file as.
|
|
267
|
+
* @property {string | undefined} [flag]
|
|
268
|
+
* File system flags to use.
|
|
269
|
+
* @property {number | string | undefined} [mode]
|
|
270
|
+
* File mode (permission and sticky bits) if the file was newly created.
|
|
271
|
+
*
|
|
272
|
+
* @typedef {URL | Value} Path
|
|
273
|
+
* URL to file or path to file.
|
|
274
|
+
*
|
|
275
|
+
* > π **Note**: `Value` is used here because itβs a smarter `Buffer`
|
|
276
|
+
* @typedef {Options | Path | VFile} Compatible
|
|
277
|
+
* URL to file, path to file, options for file, or actual file.
|
|
278
|
+
*/
|
|
279
|
+
/**
|
|
280
|
+
* @callback Callback
|
|
281
|
+
* Callback called after reading or writing a file.
|
|
282
|
+
* @param {NodeJS.ErrnoException | undefined} error
|
|
283
|
+
* Error when reading or writing was not successful.
|
|
284
|
+
* @param {VFile | null | undefined} file
|
|
285
|
+
* File when reading or writing was successful.
|
|
286
|
+
* @returns {undefined}
|
|
287
|
+
* Nothing.
|
|
288
|
+
*
|
|
289
|
+
* @callback Resolve
|
|
290
|
+
* @param {VFile} result
|
|
291
|
+
* File.
|
|
292
|
+
* @returns {void}
|
|
293
|
+
* Nothing (note: has to be `void` for TSs `Promise` interface).
|
|
294
|
+
*
|
|
295
|
+
* @callback Reject
|
|
296
|
+
* @param {NodeJS.ErrnoException} error
|
|
297
|
+
* Error.
|
|
298
|
+
* @param {VFile | undefined} [result]
|
|
299
|
+
* File.
|
|
300
|
+
* @returns {void}
|
|
301
|
+
* Nothing (note: has to be `void` for TSs `Promise` interface).
|
|
302
|
+
*/
|
|
303
|
+
/**
|
|
245
304
|
* Create a virtual file and read it in, async.
|
|
246
305
|
*
|
|
247
306
|
* @overload
|
|
@@ -771,6 +830,11 @@ var DefaultValuesForTypeKey;
|
|
|
771
830
|
|
|
772
831
|
//#endregion
|
|
773
832
|
//#region node_modules/.pnpm/yargs-parser@21.1.1/node_modules/yargs-parser/build/lib/yargs-parser.js
|
|
833
|
+
/**
|
|
834
|
+
* @license
|
|
835
|
+
* Copyright (c) 2016, Contributors
|
|
836
|
+
* SPDX-License-Identifier: ISC
|
|
837
|
+
*/
|
|
774
838
|
let mixin;
|
|
775
839
|
var YargsParser = class {
|
|
776
840
|
constructor(_mixin) {
|
|
@@ -4541,7 +4605,7 @@ var yargs_default = Yargs;
|
|
|
4541
4605
|
|
|
4542
4606
|
//#endregion
|
|
4543
4607
|
//#region package.json
|
|
4544
|
-
var version = "1.2.
|
|
4608
|
+
var version = "1.2.2";
|
|
4545
4609
|
|
|
4546
4610
|
//#endregion
|
|
4547
4611
|
//#region node_modules/.pnpm/irregular-plurals@4.2.0/node_modules/irregular-plurals/irregular-plurals.json
|
|
@@ -11124,6 +11188,14 @@ function push(list$3, items) {
|
|
|
11124
11188
|
|
|
11125
11189
|
//#endregion
|
|
11126
11190
|
//#region node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.js
|
|
11191
|
+
/**
|
|
11192
|
+
* @import {
|
|
11193
|
+
* Extension,
|
|
11194
|
+
* Handles,
|
|
11195
|
+
* HtmlExtension,
|
|
11196
|
+
* NormalizedExtension
|
|
11197
|
+
* } from 'micromark-util-types'
|
|
11198
|
+
*/
|
|
11127
11199
|
const hasOwnProperty = {}.hasOwnProperty;
|
|
11128
11200
|
/**
|
|
11129
11201
|
* Combine multiple syntax extensions into one.
|
|
@@ -11465,6 +11537,9 @@ function regexCheck(regex$1) {
|
|
|
11465
11537
|
//#endregion
|
|
11466
11538
|
//#region node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.js
|
|
11467
11539
|
/**
|
|
11540
|
+
* @import {Effects, State, TokenType} from 'micromark-util-types'
|
|
11541
|
+
*/
|
|
11542
|
+
/**
|
|
11468
11543
|
* Parse spaces and tabs.
|
|
11469
11544
|
*
|
|
11470
11545
|
* There is no `nok` parameter:
|
|
@@ -11521,6 +11596,15 @@ function factorySpace(effects, ok$2, type, max) {
|
|
|
11521
11596
|
|
|
11522
11597
|
//#endregion
|
|
11523
11598
|
//#region node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.js
|
|
11599
|
+
/**
|
|
11600
|
+
* @import {
|
|
11601
|
+
* InitialConstruct,
|
|
11602
|
+
* Initializer,
|
|
11603
|
+
* State,
|
|
11604
|
+
* TokenizeContext,
|
|
11605
|
+
* Token
|
|
11606
|
+
* } from 'micromark-util-types'
|
|
11607
|
+
*/
|
|
11524
11608
|
/** @type {InitialConstruct} */
|
|
11525
11609
|
const content = { tokenize: initializeContent };
|
|
11526
11610
|
/**
|
|
@@ -11580,6 +11664,23 @@ function initializeContent(effects) {
|
|
|
11580
11664
|
|
|
11581
11665
|
//#endregion
|
|
11582
11666
|
//#region node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.js
|
|
11667
|
+
/**
|
|
11668
|
+
* @import {
|
|
11669
|
+
* Construct,
|
|
11670
|
+
* ContainerState,
|
|
11671
|
+
* InitialConstruct,
|
|
11672
|
+
* Initializer,
|
|
11673
|
+
* Point,
|
|
11674
|
+
* State,
|
|
11675
|
+
* TokenizeContext,
|
|
11676
|
+
* Tokenizer,
|
|
11677
|
+
* Token
|
|
11678
|
+
* } from 'micromark-util-types'
|
|
11679
|
+
*/
|
|
11680
|
+
/**
|
|
11681
|
+
* @typedef {[Construct, ContainerState]} StackItem
|
|
11682
|
+
* Construct and its state.
|
|
11683
|
+
*/
|
|
11583
11684
|
/** @type {InitialConstruct} */
|
|
11584
11685
|
const document = { tokenize: initializeDocument };
|
|
11585
11686
|
/** @type {Construct} */
|
|
@@ -11781,6 +11882,9 @@ function tokenizeContainer(effects, ok$2, nok) {
|
|
|
11781
11882
|
//#endregion
|
|
11782
11883
|
//#region node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.js
|
|
11783
11884
|
/**
|
|
11885
|
+
* @import {Code} from 'micromark-util-types'
|
|
11886
|
+
*/
|
|
11887
|
+
/**
|
|
11784
11888
|
* Classify whether a code represents whitespace, punctuation, or something
|
|
11785
11889
|
* else.
|
|
11786
11890
|
*
|
|
@@ -11832,6 +11936,19 @@ function resolveAll(constructs$1, events, context) {
|
|
|
11832
11936
|
|
|
11833
11937
|
//#endregion
|
|
11834
11938
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.js
|
|
11939
|
+
/**
|
|
11940
|
+
* @import {
|
|
11941
|
+
* Code,
|
|
11942
|
+
* Construct,
|
|
11943
|
+
* Event,
|
|
11944
|
+
* Point,
|
|
11945
|
+
* Resolver,
|
|
11946
|
+
* State,
|
|
11947
|
+
* TokenizeContext,
|
|
11948
|
+
* Tokenizer,
|
|
11949
|
+
* Token
|
|
11950
|
+
* } from 'micromark-util-types'
|
|
11951
|
+
*/
|
|
11835
11952
|
/** @type {Construct} */
|
|
11836
11953
|
const attention = {
|
|
11837
11954
|
name: "attention",
|
|
@@ -12040,6 +12157,14 @@ function movePoint(point$2, offset) {
|
|
|
12040
12157
|
|
|
12041
12158
|
//#endregion
|
|
12042
12159
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.js
|
|
12160
|
+
/**
|
|
12161
|
+
* @import {
|
|
12162
|
+
* Construct,
|
|
12163
|
+
* State,
|
|
12164
|
+
* TokenizeContext,
|
|
12165
|
+
* Tokenizer
|
|
12166
|
+
* } from 'micromark-util-types'
|
|
12167
|
+
*/
|
|
12043
12168
|
/** @type {Construct} */
|
|
12044
12169
|
const autolink = {
|
|
12045
12170
|
name: "autolink",
|
|
@@ -12244,6 +12369,14 @@ function tokenizeAutolink(effects, ok$2, nok) {
|
|
|
12244
12369
|
|
|
12245
12370
|
//#endregion
|
|
12246
12371
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.js
|
|
12372
|
+
/**
|
|
12373
|
+
* @import {
|
|
12374
|
+
* Construct,
|
|
12375
|
+
* State,
|
|
12376
|
+
* TokenizeContext,
|
|
12377
|
+
* Tokenizer
|
|
12378
|
+
* } from 'micromark-util-types'
|
|
12379
|
+
*/
|
|
12247
12380
|
/** @type {Construct} */
|
|
12248
12381
|
const blankLine = {
|
|
12249
12382
|
partial: true,
|
|
@@ -12294,6 +12427,15 @@ function tokenizeBlankLine(effects, ok$2, nok) {
|
|
|
12294
12427
|
|
|
12295
12428
|
//#endregion
|
|
12296
12429
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.js
|
|
12430
|
+
/**
|
|
12431
|
+
* @import {
|
|
12432
|
+
* Construct,
|
|
12433
|
+
* Exiter,
|
|
12434
|
+
* State,
|
|
12435
|
+
* TokenizeContext,
|
|
12436
|
+
* Tokenizer
|
|
12437
|
+
* } from 'micromark-util-types'
|
|
12438
|
+
*/
|
|
12297
12439
|
/** @type {Construct} */
|
|
12298
12440
|
const blockQuote = {
|
|
12299
12441
|
continuation: { tokenize: tokenizeBlockQuoteContinuation },
|
|
@@ -12413,6 +12555,14 @@ function exit$1(effects) {
|
|
|
12413
12555
|
|
|
12414
12556
|
//#endregion
|
|
12415
12557
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.js
|
|
12558
|
+
/**
|
|
12559
|
+
* @import {
|
|
12560
|
+
* Construct,
|
|
12561
|
+
* State,
|
|
12562
|
+
* TokenizeContext,
|
|
12563
|
+
* Tokenizer
|
|
12564
|
+
* } from 'micromark-util-types'
|
|
12565
|
+
*/
|
|
12416
12566
|
/** @type {Construct} */
|
|
12417
12567
|
const characterEscape = {
|
|
12418
12568
|
name: "characterEscape",
|
|
@@ -12466,6 +12616,15 @@ function tokenizeCharacterEscape(effects, ok$2, nok) {
|
|
|
12466
12616
|
|
|
12467
12617
|
//#endregion
|
|
12468
12618
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.js
|
|
12619
|
+
/**
|
|
12620
|
+
* @import {
|
|
12621
|
+
* Code,
|
|
12622
|
+
* Construct,
|
|
12623
|
+
* State,
|
|
12624
|
+
* TokenizeContext,
|
|
12625
|
+
* Tokenizer
|
|
12626
|
+
* } from 'micromark-util-types'
|
|
12627
|
+
*/
|
|
12469
12628
|
/** @type {Construct} */
|
|
12470
12629
|
const characterReference = {
|
|
12471
12630
|
name: "characterReference",
|
|
@@ -12596,6 +12755,15 @@ function tokenizeCharacterReference(effects, ok$2, nok) {
|
|
|
12596
12755
|
|
|
12597
12756
|
//#endregion
|
|
12598
12757
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-fenced.js
|
|
12758
|
+
/**
|
|
12759
|
+
* @import {
|
|
12760
|
+
* Code,
|
|
12761
|
+
* Construct,
|
|
12762
|
+
* State,
|
|
12763
|
+
* TokenizeContext,
|
|
12764
|
+
* Tokenizer
|
|
12765
|
+
* } from 'micromark-util-types'
|
|
12766
|
+
*/
|
|
12599
12767
|
/** @type {Construct} */
|
|
12600
12768
|
const nonLazyContinuation = {
|
|
12601
12769
|
partial: true,
|
|
@@ -13003,6 +13171,14 @@ function tokenizeNonLazyContinuation(effects, ok$2, nok) {
|
|
|
13003
13171
|
|
|
13004
13172
|
//#endregion
|
|
13005
13173
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-indented.js
|
|
13174
|
+
/**
|
|
13175
|
+
* @import {
|
|
13176
|
+
* Construct,
|
|
13177
|
+
* State,
|
|
13178
|
+
* TokenizeContext,
|
|
13179
|
+
* Tokenizer
|
|
13180
|
+
* } from 'micromark-util-types'
|
|
13181
|
+
*/
|
|
13006
13182
|
/** @type {Construct} */
|
|
13007
13183
|
const codeIndented = {
|
|
13008
13184
|
name: "codeIndented",
|
|
@@ -13140,6 +13316,17 @@ function tokenizeFurtherStart(effects, ok$2, nok) {
|
|
|
13140
13316
|
|
|
13141
13317
|
//#endregion
|
|
13142
13318
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-text.js
|
|
13319
|
+
/**
|
|
13320
|
+
* @import {
|
|
13321
|
+
* Construct,
|
|
13322
|
+
* Previous,
|
|
13323
|
+
* Resolver,
|
|
13324
|
+
* State,
|
|
13325
|
+
* TokenizeContext,
|
|
13326
|
+
* Tokenizer,
|
|
13327
|
+
* Token
|
|
13328
|
+
* } from 'micromark-util-types'
|
|
13329
|
+
*/
|
|
13143
13330
|
/** @type {Construct} */
|
|
13144
13331
|
const codeText = {
|
|
13145
13332
|
name: "codeText",
|
|
@@ -13547,6 +13734,9 @@ function chunkedPush(list$3, right$1) {
|
|
|
13547
13734
|
//#endregion
|
|
13548
13735
|
//#region node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/index.js
|
|
13549
13736
|
/**
|
|
13737
|
+
* @import {Chunk, Event, Token} from 'micromark-util-types'
|
|
13738
|
+
*/
|
|
13739
|
+
/**
|
|
13550
13740
|
* Tokenize subcontent.
|
|
13551
13741
|
*
|
|
13552
13742
|
* @param {Array<Event>} eventsArray
|
|
@@ -13700,6 +13890,16 @@ function subcontent(events, eventIndex) {
|
|
|
13700
13890
|
//#endregion
|
|
13701
13891
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/content.js
|
|
13702
13892
|
/**
|
|
13893
|
+
* @import {
|
|
13894
|
+
* Construct,
|
|
13895
|
+
* Resolver,
|
|
13896
|
+
* State,
|
|
13897
|
+
* TokenizeContext,
|
|
13898
|
+
* Tokenizer,
|
|
13899
|
+
* Token
|
|
13900
|
+
* } from 'micromark-util-types'
|
|
13901
|
+
*/
|
|
13902
|
+
/**
|
|
13703
13903
|
* No name because it must not be turned off.
|
|
13704
13904
|
* @type {Construct}
|
|
13705
13905
|
*/
|
|
@@ -13824,6 +14024,9 @@ function tokenizeContinuation(effects, ok$2, nok) {
|
|
|
13824
14024
|
//#endregion
|
|
13825
14025
|
//#region node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/index.js
|
|
13826
14026
|
/**
|
|
14027
|
+
* @import {Effects, State, TokenType} from 'micromark-util-types'
|
|
14028
|
+
*/
|
|
14029
|
+
/**
|
|
13827
14030
|
* Parse destinations.
|
|
13828
14031
|
*
|
|
13829
14032
|
* ###### Examples
|
|
@@ -14006,6 +14209,14 @@ function factoryDestination(effects, ok$2, nok, type, literalType$1, literalMark
|
|
|
14006
14209
|
//#endregion
|
|
14007
14210
|
//#region node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/index.js
|
|
14008
14211
|
/**
|
|
14212
|
+
* @import {
|
|
14213
|
+
* Effects,
|
|
14214
|
+
* State,
|
|
14215
|
+
* TokenizeContext,
|
|
14216
|
+
* TokenType
|
|
14217
|
+
* } from 'micromark-util-types'
|
|
14218
|
+
*/
|
|
14219
|
+
/**
|
|
14009
14220
|
* Parse labels.
|
|
14010
14221
|
*
|
|
14011
14222
|
* > π **Note**: labels in markdown are capped at 999 characters in the string.
|
|
@@ -14131,6 +14342,14 @@ function factoryLabel(effects, ok$2, nok, type, markerType, stringType$1) {
|
|
|
14131
14342
|
//#endregion
|
|
14132
14343
|
//#region node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/index.js
|
|
14133
14344
|
/**
|
|
14345
|
+
* @import {
|
|
14346
|
+
* Code,
|
|
14347
|
+
* Effects,
|
|
14348
|
+
* State,
|
|
14349
|
+
* TokenType
|
|
14350
|
+
* } from 'micromark-util-types'
|
|
14351
|
+
*/
|
|
14352
|
+
/**
|
|
14134
14353
|
* Parse titles.
|
|
14135
14354
|
*
|
|
14136
14355
|
* ###### Examples
|
|
@@ -14269,6 +14488,9 @@ function factoryTitle(effects, ok$2, nok, type, markerType, stringType$1) {
|
|
|
14269
14488
|
//#endregion
|
|
14270
14489
|
//#region node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/index.js
|
|
14271
14490
|
/**
|
|
14491
|
+
* @import {Effects, State} from 'micromark-util-types'
|
|
14492
|
+
*/
|
|
14493
|
+
/**
|
|
14272
14494
|
* Parse spaces and tabs.
|
|
14273
14495
|
*
|
|
14274
14496
|
* There is no `nok` parameter:
|
|
@@ -14306,6 +14528,14 @@ function factoryWhitespace(effects, ok$2) {
|
|
|
14306
14528
|
|
|
14307
14529
|
//#endregion
|
|
14308
14530
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.js
|
|
14531
|
+
/**
|
|
14532
|
+
* @import {
|
|
14533
|
+
* Construct,
|
|
14534
|
+
* State,
|
|
14535
|
+
* TokenizeContext,
|
|
14536
|
+
* Tokenizer
|
|
14537
|
+
* } from 'micromark-util-types'
|
|
14538
|
+
*/
|
|
14309
14539
|
/** @type {Construct} */
|
|
14310
14540
|
const definition$1 = {
|
|
14311
14541
|
name: "definition",
|
|
@@ -14514,6 +14744,14 @@ function tokenizeTitleBefore(effects, ok$2, nok) {
|
|
|
14514
14744
|
|
|
14515
14745
|
//#endregion
|
|
14516
14746
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/hard-break-escape.js
|
|
14747
|
+
/**
|
|
14748
|
+
* @import {
|
|
14749
|
+
* Construct,
|
|
14750
|
+
* State,
|
|
14751
|
+
* TokenizeContext,
|
|
14752
|
+
* Tokenizer
|
|
14753
|
+
* } from 'micromark-util-types'
|
|
14754
|
+
*/
|
|
14517
14755
|
/** @type {Construct} */
|
|
14518
14756
|
const hardBreakEscape = {
|
|
14519
14757
|
name: "hardBreakEscape",
|
|
@@ -14564,6 +14802,16 @@ function tokenizeHardBreakEscape(effects, ok$2, nok) {
|
|
|
14564
14802
|
|
|
14565
14803
|
//#endregion
|
|
14566
14804
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/heading-atx.js
|
|
14805
|
+
/**
|
|
14806
|
+
* @import {
|
|
14807
|
+
* Construct,
|
|
14808
|
+
* Resolver,
|
|
14809
|
+
* State,
|
|
14810
|
+
* TokenizeContext,
|
|
14811
|
+
* Tokenizer,
|
|
14812
|
+
* Token
|
|
14813
|
+
* } from 'micromark-util-types'
|
|
14814
|
+
*/
|
|
14567
14815
|
/** @type {Construct} */
|
|
14568
14816
|
const headingAtx = {
|
|
14569
14817
|
name: "headingAtx",
|
|
@@ -14840,6 +15088,16 @@ const htmlRawNames = [
|
|
|
14840
15088
|
|
|
14841
15089
|
//#endregion
|
|
14842
15090
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-flow.js
|
|
15091
|
+
/**
|
|
15092
|
+
* @import {
|
|
15093
|
+
* Code,
|
|
15094
|
+
* Construct,
|
|
15095
|
+
* Resolver,
|
|
15096
|
+
* State,
|
|
15097
|
+
* TokenizeContext,
|
|
15098
|
+
* Tokenizer
|
|
15099
|
+
* } from 'micromark-util-types'
|
|
15100
|
+
*/
|
|
14843
15101
|
/** @type {Construct} */
|
|
14844
15102
|
const htmlFlow = {
|
|
14845
15103
|
concrete: true,
|
|
@@ -15604,6 +15862,15 @@ function tokenizeBlankLineBefore(effects, ok$2, nok) {
|
|
|
15604
15862
|
|
|
15605
15863
|
//#endregion
|
|
15606
15864
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-text.js
|
|
15865
|
+
/**
|
|
15866
|
+
* @import {
|
|
15867
|
+
* Code,
|
|
15868
|
+
* Construct,
|
|
15869
|
+
* State,
|
|
15870
|
+
* TokenizeContext,
|
|
15871
|
+
* Tokenizer
|
|
15872
|
+
* } from 'micromark-util-types'
|
|
15873
|
+
*/
|
|
15607
15874
|
/** @type {Construct} */
|
|
15608
15875
|
const htmlText = {
|
|
15609
15876
|
name: "htmlText",
|
|
@@ -16210,6 +16477,17 @@ function tokenizeHtmlText(effects, ok$2, nok) {
|
|
|
16210
16477
|
|
|
16211
16478
|
//#endregion
|
|
16212
16479
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-end.js
|
|
16480
|
+
/**
|
|
16481
|
+
* @import {
|
|
16482
|
+
* Construct,
|
|
16483
|
+
* Event,
|
|
16484
|
+
* Resolver,
|
|
16485
|
+
* State,
|
|
16486
|
+
* TokenizeContext,
|
|
16487
|
+
* Tokenizer,
|
|
16488
|
+
* Token
|
|
16489
|
+
* } from 'micromark-util-types'
|
|
16490
|
+
*/
|
|
16213
16491
|
/** @type {Construct} */
|
|
16214
16492
|
const labelEnd = {
|
|
16215
16493
|
name: "labelEnd",
|
|
@@ -16670,6 +16948,14 @@ function tokenizeReferenceCollapsed(effects, ok$2, nok) {
|
|
|
16670
16948
|
|
|
16671
16949
|
//#endregion
|
|
16672
16950
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-image.js
|
|
16951
|
+
/**
|
|
16952
|
+
* @import {
|
|
16953
|
+
* Construct,
|
|
16954
|
+
* State,
|
|
16955
|
+
* TokenizeContext,
|
|
16956
|
+
* Tokenizer
|
|
16957
|
+
* } from 'micromark-util-types'
|
|
16958
|
+
*/
|
|
16673
16959
|
/** @type {Construct} */
|
|
16674
16960
|
const labelStartImage = {
|
|
16675
16961
|
name: "labelStartImage",
|
|
@@ -16756,6 +17042,14 @@ function tokenizeLabelStartImage(effects, ok$2, nok) {
|
|
|
16756
17042
|
|
|
16757
17043
|
//#endregion
|
|
16758
17044
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-link.js
|
|
17045
|
+
/**
|
|
17046
|
+
* @import {
|
|
17047
|
+
* Construct,
|
|
17048
|
+
* State,
|
|
17049
|
+
* TokenizeContext,
|
|
17050
|
+
* Tokenizer
|
|
17051
|
+
* } from 'micromark-util-types'
|
|
17052
|
+
*/
|
|
16759
17053
|
/** @type {Construct} */
|
|
16760
17054
|
const labelStartLink = {
|
|
16761
17055
|
name: "labelStartLink",
|
|
@@ -16797,6 +17091,14 @@ function tokenizeLabelStartLink(effects, ok$2, nok) {
|
|
|
16797
17091
|
|
|
16798
17092
|
//#endregion
|
|
16799
17093
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/line-ending.js
|
|
17094
|
+
/**
|
|
17095
|
+
* @import {
|
|
17096
|
+
* Construct,
|
|
17097
|
+
* State,
|
|
17098
|
+
* TokenizeContext,
|
|
17099
|
+
* Tokenizer
|
|
17100
|
+
* } from 'micromark-util-types'
|
|
17101
|
+
*/
|
|
16800
17102
|
/** @type {Construct} */
|
|
16801
17103
|
const lineEnding = {
|
|
16802
17104
|
name: "lineEnding",
|
|
@@ -16820,6 +17122,15 @@ function tokenizeLineEnding(effects, ok$2) {
|
|
|
16820
17122
|
|
|
16821
17123
|
//#endregion
|
|
16822
17124
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/thematic-break.js
|
|
17125
|
+
/**
|
|
17126
|
+
* @import {
|
|
17127
|
+
* Code,
|
|
17128
|
+
* Construct,
|
|
17129
|
+
* State,
|
|
17130
|
+
* TokenizeContext,
|
|
17131
|
+
* Tokenizer
|
|
17132
|
+
* } from 'micromark-util-types'
|
|
17133
|
+
*/
|
|
16823
17134
|
/** @type {Construct} */
|
|
16824
17135
|
const thematicBreak$1 = {
|
|
16825
17136
|
name: "thematicBreak",
|
|
@@ -16907,6 +17218,16 @@ function tokenizeThematicBreak(effects, ok$2, nok) {
|
|
|
16907
17218
|
|
|
16908
17219
|
//#endregion
|
|
16909
17220
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/list.js
|
|
17221
|
+
/**
|
|
17222
|
+
* @import {
|
|
17223
|
+
* Code,
|
|
17224
|
+
* Construct,
|
|
17225
|
+
* Exiter,
|
|
17226
|
+
* State,
|
|
17227
|
+
* TokenizeContext,
|
|
17228
|
+
* Tokenizer
|
|
17229
|
+
* } from 'micromark-util-types'
|
|
17230
|
+
*/
|
|
16910
17231
|
/** @type {Construct} */
|
|
16911
17232
|
const list$2 = {
|
|
16912
17233
|
continuation: { tokenize: tokenizeListContinuation },
|
|
@@ -17070,6 +17391,16 @@ function tokenizeListItemPrefixWhitespace(effects, ok$2, nok) {
|
|
|
17070
17391
|
|
|
17071
17392
|
//#endregion
|
|
17072
17393
|
//#region node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/setext-underline.js
|
|
17394
|
+
/**
|
|
17395
|
+
* @import {
|
|
17396
|
+
* Code,
|
|
17397
|
+
* Construct,
|
|
17398
|
+
* Resolver,
|
|
17399
|
+
* State,
|
|
17400
|
+
* TokenizeContext,
|
|
17401
|
+
* Tokenizer
|
|
17402
|
+
* } from 'micromark-util-types'
|
|
17403
|
+
*/
|
|
17073
17404
|
/** @type {Construct} */
|
|
17074
17405
|
const setextUnderline = {
|
|
17075
17406
|
name: "setextUnderline",
|
|
@@ -17213,6 +17544,14 @@ function tokenizeSetextUnderline(effects, ok$2, nok) {
|
|
|
17213
17544
|
|
|
17214
17545
|
//#endregion
|
|
17215
17546
|
//#region node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/flow.js
|
|
17547
|
+
/**
|
|
17548
|
+
* @import {
|
|
17549
|
+
* InitialConstruct,
|
|
17550
|
+
* Initializer,
|
|
17551
|
+
* State,
|
|
17552
|
+
* TokenizeContext
|
|
17553
|
+
* } from 'micromark-util-types'
|
|
17554
|
+
*/
|
|
17216
17555
|
/** @type {InitialConstruct} */
|
|
17217
17556
|
const flow = { tokenize: initializeFlow };
|
|
17218
17557
|
/**
|
|
@@ -17431,6 +17770,9 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
17431
17770
|
|
|
17432
17771
|
//#endregion
|
|
17433
17772
|
//#region node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/constructs.js
|
|
17773
|
+
/**
|
|
17774
|
+
* @import {Extension} from 'micromark-util-types'
|
|
17775
|
+
*/
|
|
17434
17776
|
var constructs_exports = /* @__PURE__ */ __export({
|
|
17435
17777
|
attentionMarkers: () => attentionMarkers,
|
|
17436
17778
|
contentInitial: () => contentInitial,
|
|
@@ -17508,6 +17850,43 @@ const disable = { null: [] };
|
|
|
17508
17850
|
//#endregion
|
|
17509
17851
|
//#region node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/create-tokenizer.js
|
|
17510
17852
|
/**
|
|
17853
|
+
* @import {
|
|
17854
|
+
* Chunk,
|
|
17855
|
+
* Code,
|
|
17856
|
+
* ConstructRecord,
|
|
17857
|
+
* Construct,
|
|
17858
|
+
* Effects,
|
|
17859
|
+
* InitialConstruct,
|
|
17860
|
+
* ParseContext,
|
|
17861
|
+
* Point,
|
|
17862
|
+
* State,
|
|
17863
|
+
* TokenizeContext,
|
|
17864
|
+
* Token
|
|
17865
|
+
* } from 'micromark-util-types'
|
|
17866
|
+
*/
|
|
17867
|
+
/**
|
|
17868
|
+
* @callback Restore
|
|
17869
|
+
* Restore the state.
|
|
17870
|
+
* @returns {undefined}
|
|
17871
|
+
* Nothing.
|
|
17872
|
+
*
|
|
17873
|
+
* @typedef Info
|
|
17874
|
+
* Info.
|
|
17875
|
+
* @property {Restore} restore
|
|
17876
|
+
* Restore.
|
|
17877
|
+
* @property {number} from
|
|
17878
|
+
* From.
|
|
17879
|
+
*
|
|
17880
|
+
* @callback ReturnHandle
|
|
17881
|
+
* Handle a successful run.
|
|
17882
|
+
* @param {Construct} construct
|
|
17883
|
+
* Construct.
|
|
17884
|
+
* @param {Info} info
|
|
17885
|
+
* Info.
|
|
17886
|
+
* @returns {undefined}
|
|
17887
|
+
* Nothing.
|
|
17888
|
+
*/
|
|
17889
|
+
/**
|
|
17511
17890
|
* Create a tokenizer.
|
|
17512
17891
|
* Tokenizers deal with one type of data (e.g., containers, flow, text).
|
|
17513
17892
|
* The parser is the object dealing with it all.
|
|
@@ -17941,6 +18320,15 @@ function serializeChunks(chunks, expandTabs) {
|
|
|
17941
18320
|
//#endregion
|
|
17942
18321
|
//#region node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/parse.js
|
|
17943
18322
|
/**
|
|
18323
|
+
* @import {
|
|
18324
|
+
* Create,
|
|
18325
|
+
* FullNormalizedExtension,
|
|
18326
|
+
* InitialConstruct,
|
|
18327
|
+
* ParseContext,
|
|
18328
|
+
* ParseOptions
|
|
18329
|
+
* } from 'micromark-util-types'
|
|
18330
|
+
*/
|
|
18331
|
+
/**
|
|
17944
18332
|
* @param {ParseOptions | null | undefined} [options]
|
|
17945
18333
|
* Configuration (optional).
|
|
17946
18334
|
* @returns {ParseContext}
|
|
@@ -17977,6 +18365,9 @@ function parse(options) {
|
|
|
17977
18365
|
//#endregion
|
|
17978
18366
|
//#region node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/postprocess.js
|
|
17979
18367
|
/**
|
|
18368
|
+
* @import {Event} from 'micromark-util-types'
|
|
18369
|
+
*/
|
|
18370
|
+
/**
|
|
17980
18371
|
* @param {Array<Event>} events
|
|
17981
18372
|
* Events.
|
|
17982
18373
|
* @returns {Array<Event>}
|
|
@@ -18194,6 +18585,46 @@ function index(value) {
|
|
|
18194
18585
|
|
|
18195
18586
|
//#endregion
|
|
18196
18587
|
//#region node_modules/.pnpm/mdast-util-from-markdown@2.0.2/node_modules/mdast-util-from-markdown/lib/index.js
|
|
18588
|
+
/**
|
|
18589
|
+
* @import {
|
|
18590
|
+
* Break,
|
|
18591
|
+
* Blockquote,
|
|
18592
|
+
* Code,
|
|
18593
|
+
* Definition,
|
|
18594
|
+
* Emphasis,
|
|
18595
|
+
* Heading,
|
|
18596
|
+
* Html,
|
|
18597
|
+
* Image,
|
|
18598
|
+
* InlineCode,
|
|
18599
|
+
* Link,
|
|
18600
|
+
* ListItem,
|
|
18601
|
+
* List,
|
|
18602
|
+
* Nodes,
|
|
18603
|
+
* Paragraph,
|
|
18604
|
+
* PhrasingContent,
|
|
18605
|
+
* ReferenceType,
|
|
18606
|
+
* Root,
|
|
18607
|
+
* Strong,
|
|
18608
|
+
* Text,
|
|
18609
|
+
* ThematicBreak
|
|
18610
|
+
* } from 'mdast'
|
|
18611
|
+
* @import {
|
|
18612
|
+
* Encoding,
|
|
18613
|
+
* Event,
|
|
18614
|
+
* Token,
|
|
18615
|
+
* Value
|
|
18616
|
+
* } from 'micromark-util-types'
|
|
18617
|
+
* @import {Point} from 'unist'
|
|
18618
|
+
* @import {
|
|
18619
|
+
* CompileContext,
|
|
18620
|
+
* CompileData,
|
|
18621
|
+
* Config,
|
|
18622
|
+
* Extension,
|
|
18623
|
+
* Handle,
|
|
18624
|
+
* OnEnterError,
|
|
18625
|
+
* Options
|
|
18626
|
+
* } from './types.js'
|
|
18627
|
+
*/
|
|
18197
18628
|
const own$4 = {}.hasOwnProperty;
|
|
18198
18629
|
/**
|
|
18199
18630
|
* Turn markdown into a syntax tree.
|
|
@@ -19122,6 +19553,15 @@ function defaultOnError(left$1, right$1) {
|
|
|
19122
19553
|
//#endregion
|
|
19123
19554
|
//#region node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.js
|
|
19124
19555
|
/**
|
|
19556
|
+
* @typedef {import('mdast').Root} Root
|
|
19557
|
+
* @typedef {import('mdast-util-from-markdown').Options} FromMarkdownOptions
|
|
19558
|
+
* @typedef {import('unified').Parser<Root>} Parser
|
|
19559
|
+
* @typedef {import('unified').Processor<Root>} Processor
|
|
19560
|
+
*/
|
|
19561
|
+
/**
|
|
19562
|
+
* @typedef {Omit<FromMarkdownOptions, 'extensions' | 'mdastExtensions'>} Options
|
|
19563
|
+
*/
|
|
19564
|
+
/**
|
|
19125
19565
|
* Aadd support for parsing from markdown.
|
|
19126
19566
|
*
|
|
19127
19567
|
* @param {Readonly<Options> | null | undefined} [options]
|
|
@@ -19357,6 +19797,10 @@ function listInScope(stack, list$3, none) {
|
|
|
19357
19797
|
//#endregion
|
|
19358
19798
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/break.js
|
|
19359
19799
|
/**
|
|
19800
|
+
* @import {Break, Parents} from 'mdast'
|
|
19801
|
+
* @import {Info, State} from 'mdast-util-to-markdown'
|
|
19802
|
+
*/
|
|
19803
|
+
/**
|
|
19360
19804
|
* @param {Break} _
|
|
19361
19805
|
* @param {Parents | undefined} _1
|
|
19362
19806
|
* @param {State} state
|
|
@@ -19431,6 +19875,10 @@ function checkFence(state) {
|
|
|
19431
19875
|
//#endregion
|
|
19432
19876
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/code.js
|
|
19433
19877
|
/**
|
|
19878
|
+
* @import {Info, Map, State} from 'mdast-util-to-markdown'
|
|
19879
|
+
* @import {Code, Parents} from 'mdast'
|
|
19880
|
+
*/
|
|
19881
|
+
/**
|
|
19434
19882
|
* @param {Code} node
|
|
19435
19883
|
* @param {Parents | undefined} _
|
|
19436
19884
|
* @param {State} state
|
|
@@ -19501,6 +19949,10 @@ function checkQuote(state) {
|
|
|
19501
19949
|
//#endregion
|
|
19502
19950
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/definition.js
|
|
19503
19951
|
/**
|
|
19952
|
+
* @import {Info, State} from 'mdast-util-to-markdown'
|
|
19953
|
+
* @import {Definition, Parents} from 'mdast'
|
|
19954
|
+
*/
|
|
19955
|
+
/**
|
|
19504
19956
|
* @param {Definition} node
|
|
19505
19957
|
* @param {Parents | undefined} _
|
|
19506
19958
|
* @param {State} state
|
|
@@ -19586,6 +20038,9 @@ function encodeCharacterReference(code$2) {
|
|
|
19586
20038
|
//#endregion
|
|
19587
20039
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-info.js
|
|
19588
20040
|
/**
|
|
20041
|
+
* @import {EncodeSides} from '../types.js'
|
|
20042
|
+
*/
|
|
20043
|
+
/**
|
|
19589
20044
|
* Check whether to encode (as a character reference) the characters
|
|
19590
20045
|
* surrounding an attention run.
|
|
19591
20046
|
*
|
|
@@ -19655,6 +20110,10 @@ function encodeInfo(outside, inside, marker) {
|
|
|
19655
20110
|
|
|
19656
20111
|
//#endregion
|
|
19657
20112
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js
|
|
20113
|
+
/**
|
|
20114
|
+
* @import {Info, State} from 'mdast-util-to-markdown'
|
|
20115
|
+
* @import {Emphasis, Parents} from 'mdast'
|
|
20116
|
+
*/
|
|
19658
20117
|
emphasis.peek = emphasisPeek;
|
|
19659
20118
|
/**
|
|
19660
20119
|
* @param {Emphasis} node
|
|
@@ -19819,6 +20278,211 @@ function color(d) {
|
|
|
19819
20278
|
|
|
19820
20279
|
//#endregion
|
|
19821
20280
|
//#region node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.js
|
|
20281
|
+
/**
|
|
20282
|
+
* @import {Node as UnistNode, Parent as UnistParent} from 'unist'
|
|
20283
|
+
*/
|
|
20284
|
+
/**
|
|
20285
|
+
* @typedef {Exclude<import('unist-util-is').Test, undefined> | undefined} Test
|
|
20286
|
+
* Test from `unist-util-is`.
|
|
20287
|
+
*
|
|
20288
|
+
* Note: we have remove and add `undefined`, because otherwise when generating
|
|
20289
|
+
* automatic `.d.ts` files, TS tries to flatten paths from a local perspective,
|
|
20290
|
+
* which doesnβt work when publishing on npm.
|
|
20291
|
+
*/
|
|
20292
|
+
/**
|
|
20293
|
+
* @typedef {(
|
|
20294
|
+
* Fn extends (value: any) => value is infer Thing
|
|
20295
|
+
* ? Thing
|
|
20296
|
+
* : Fallback
|
|
20297
|
+
* )} Predicate
|
|
20298
|
+
* Get the value of a type guard `Fn`.
|
|
20299
|
+
* @template Fn
|
|
20300
|
+
* Value; typically function that is a type guard (such as `(x): x is Y`).
|
|
20301
|
+
* @template Fallback
|
|
20302
|
+
* Value to yield if `Fn` is not a type guard.
|
|
20303
|
+
*/
|
|
20304
|
+
/**
|
|
20305
|
+
* @typedef {(
|
|
20306
|
+
* Check extends null | undefined // No test.
|
|
20307
|
+
* ? Value
|
|
20308
|
+
* : Value extends {type: Check} // String (type) test.
|
|
20309
|
+
* ? Value
|
|
20310
|
+
* : Value extends Check // Partial test.
|
|
20311
|
+
* ? Value
|
|
20312
|
+
* : Check extends Function // Function test.
|
|
20313
|
+
* ? Predicate<Check, Value> extends Value
|
|
20314
|
+
* ? Predicate<Check, Value>
|
|
20315
|
+
* : never
|
|
20316
|
+
* : never // Some other test?
|
|
20317
|
+
* )} MatchesOne
|
|
20318
|
+
* Check whether a node matches a primitive check in the type system.
|
|
20319
|
+
* @template Value
|
|
20320
|
+
* Value; typically unist `Node`.
|
|
20321
|
+
* @template Check
|
|
20322
|
+
* Value; typically `unist-util-is`-compatible test, but not arrays.
|
|
20323
|
+
*/
|
|
20324
|
+
/**
|
|
20325
|
+
* @typedef {(
|
|
20326
|
+
* Check extends ReadonlyArray<infer T>
|
|
20327
|
+
* ? MatchesOne<Value, T>
|
|
20328
|
+
* : Check extends Array<infer T>
|
|
20329
|
+
* ? MatchesOne<Value, T>
|
|
20330
|
+
* : MatchesOne<Value, Check>
|
|
20331
|
+
* )} Matches
|
|
20332
|
+
* Check whether a node matches a check in the type system.
|
|
20333
|
+
* @template Value
|
|
20334
|
+
* Value; typically unist `Node`.
|
|
20335
|
+
* @template Check
|
|
20336
|
+
* Value; typically `unist-util-is`-compatible test.
|
|
20337
|
+
*/
|
|
20338
|
+
/**
|
|
20339
|
+
* @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint
|
|
20340
|
+
* Number; capped reasonably.
|
|
20341
|
+
*/
|
|
20342
|
+
/**
|
|
20343
|
+
* @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment
|
|
20344
|
+
* Increment a number in the type system.
|
|
20345
|
+
* @template {Uint} [I=0]
|
|
20346
|
+
* Index.
|
|
20347
|
+
*/
|
|
20348
|
+
/**
|
|
20349
|
+
* @typedef {(
|
|
20350
|
+
* Node extends UnistParent
|
|
20351
|
+
* ? Node extends {children: Array<infer Children>}
|
|
20352
|
+
* ? Child extends Children ? Node : never
|
|
20353
|
+
* : never
|
|
20354
|
+
* : never
|
|
20355
|
+
* )} InternalParent
|
|
20356
|
+
* Collect nodes that can be parents of `Child`.
|
|
20357
|
+
* @template {UnistNode} Node
|
|
20358
|
+
* All node types in a tree.
|
|
20359
|
+
* @template {UnistNode} Child
|
|
20360
|
+
* Node to search for.
|
|
20361
|
+
*/
|
|
20362
|
+
/**
|
|
20363
|
+
* @typedef {InternalParent<InclusiveDescendant<Tree>, Child>} Parent
|
|
20364
|
+
* Collect nodes in `Tree` that can be parents of `Child`.
|
|
20365
|
+
* @template {UnistNode} Tree
|
|
20366
|
+
* All node types in a tree.
|
|
20367
|
+
* @template {UnistNode} Child
|
|
20368
|
+
* Node to search for.
|
|
20369
|
+
*/
|
|
20370
|
+
/**
|
|
20371
|
+
* @typedef {(
|
|
20372
|
+
* Depth extends Max
|
|
20373
|
+
* ? never
|
|
20374
|
+
* :
|
|
20375
|
+
* | InternalParent<Node, Child>
|
|
20376
|
+
* | InternalAncestor<Node, InternalParent<Node, Child>, Max, Increment<Depth>>
|
|
20377
|
+
* )} InternalAncestor
|
|
20378
|
+
* Collect nodes in `Tree` that can be ancestors of `Child`.
|
|
20379
|
+
* @template {UnistNode} Node
|
|
20380
|
+
* All node types in a tree.
|
|
20381
|
+
* @template {UnistNode} Child
|
|
20382
|
+
* Node to search for.
|
|
20383
|
+
* @template {Uint} [Max=10]
|
|
20384
|
+
* Max; searches up to this depth.
|
|
20385
|
+
* @template {Uint} [Depth=0]
|
|
20386
|
+
* Current depth.
|
|
20387
|
+
*/
|
|
20388
|
+
/**
|
|
20389
|
+
* @typedef {InternalAncestor<InclusiveDescendant<Tree>, Child>} Ancestor
|
|
20390
|
+
* Collect nodes in `Tree` that can be ancestors of `Child`.
|
|
20391
|
+
* @template {UnistNode} Tree
|
|
20392
|
+
* All node types in a tree.
|
|
20393
|
+
* @template {UnistNode} Child
|
|
20394
|
+
* Node to search for.
|
|
20395
|
+
*/
|
|
20396
|
+
/**
|
|
20397
|
+
* @typedef {(
|
|
20398
|
+
* Tree extends UnistParent
|
|
20399
|
+
* ? Depth extends Max
|
|
20400
|
+
* ? Tree
|
|
20401
|
+
* : Tree | InclusiveDescendant<Tree['children'][number], Max, Increment<Depth>>
|
|
20402
|
+
* : Tree
|
|
20403
|
+
* )} InclusiveDescendant
|
|
20404
|
+
* Collect all (inclusive) descendants of `Tree`.
|
|
20405
|
+
*
|
|
20406
|
+
* > π **Note**: for performance reasons, this seems to be the fastest way to
|
|
20407
|
+
* > recurse without actually running into an infinite loop, which the
|
|
20408
|
+
* > previous version did.
|
|
20409
|
+
* >
|
|
20410
|
+
* > Practically, a max of `2` is typically enough assuming a `Root` is
|
|
20411
|
+
* > passed, but it doesnβt improve performance.
|
|
20412
|
+
* > It gets higher with `List > ListItem > Table > TableRow > TableCell`.
|
|
20413
|
+
* > Using up to `10` doesnβt hurt or help either.
|
|
20414
|
+
* @template {UnistNode} Tree
|
|
20415
|
+
* Tree type.
|
|
20416
|
+
* @template {Uint} [Max=10]
|
|
20417
|
+
* Max; searches up to this depth.
|
|
20418
|
+
* @template {Uint} [Depth=0]
|
|
20419
|
+
* Current depth.
|
|
20420
|
+
*/
|
|
20421
|
+
/**
|
|
20422
|
+
* @typedef {'skip' | boolean} Action
|
|
20423
|
+
* Union of the action types.
|
|
20424
|
+
*
|
|
20425
|
+
* @typedef {number} Index
|
|
20426
|
+
* Move to the sibling at `index` next (after node itself is completely
|
|
20427
|
+
* traversed).
|
|
20428
|
+
*
|
|
20429
|
+
* Useful if mutating the tree, such as removing the node the visitor is
|
|
20430
|
+
* currently on, or any of its previous siblings.
|
|
20431
|
+
* Results less than 0 or greater than or equal to `children.length` stop
|
|
20432
|
+
* traversing the parent.
|
|
20433
|
+
*
|
|
20434
|
+
* @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple
|
|
20435
|
+
* List with one or two values, the first an action, the second an index.
|
|
20436
|
+
*
|
|
20437
|
+
* @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult
|
|
20438
|
+
* Any value that can be returned from a visitor.
|
|
20439
|
+
*/
|
|
20440
|
+
/**
|
|
20441
|
+
* @callback Visitor
|
|
20442
|
+
* Handle a node (matching `test`, if given).
|
|
20443
|
+
*
|
|
20444
|
+
* Visitors are free to transform `node`.
|
|
20445
|
+
* They can also transform the parent of node (the last of `ancestors`).
|
|
20446
|
+
*
|
|
20447
|
+
* Replacing `node` itself, if `SKIP` is not returned, still causes its
|
|
20448
|
+
* descendants to be walked (which is a bug).
|
|
20449
|
+
*
|
|
20450
|
+
* When adding or removing previous siblings of `node` (or next siblings, in
|
|
20451
|
+
* case of reverse), the `Visitor` should return a new `Index` to specify the
|
|
20452
|
+
* sibling to traverse after `node` is traversed.
|
|
20453
|
+
* Adding or removing next siblings of `node` (or previous siblings, in case
|
|
20454
|
+
* of reverse) is handled as expected without needing to return a new `Index`.
|
|
20455
|
+
*
|
|
20456
|
+
* Removing the children property of an ancestor still results in them being
|
|
20457
|
+
* traversed.
|
|
20458
|
+
* @param {Visited} node
|
|
20459
|
+
* Found node.
|
|
20460
|
+
* @param {Array<VisitedParents>} ancestors
|
|
20461
|
+
* Ancestors of `node`.
|
|
20462
|
+
* @returns {VisitorResult}
|
|
20463
|
+
* What to do next.
|
|
20464
|
+
*
|
|
20465
|
+
* An `Index` is treated as a tuple of `[CONTINUE, Index]`.
|
|
20466
|
+
* An `Action` is treated as a tuple of `[Action]`.
|
|
20467
|
+
*
|
|
20468
|
+
* Passing a tuple back only makes sense if the `Action` is `SKIP`.
|
|
20469
|
+
* When the `Action` is `EXIT`, that action can be returned.
|
|
20470
|
+
* When the `Action` is `CONTINUE`, `Index` can be returned.
|
|
20471
|
+
* @template {UnistNode} [Visited=UnistNode]
|
|
20472
|
+
* Visited node type.
|
|
20473
|
+
* @template {UnistParent} [VisitedParents=UnistParent]
|
|
20474
|
+
* Ancestor type.
|
|
20475
|
+
*/
|
|
20476
|
+
/**
|
|
20477
|
+
* @typedef {Visitor<Matches<InclusiveDescendant<Tree>, Check>, Ancestor<Tree, Matches<InclusiveDescendant<Tree>, Check>>>} BuildVisitor
|
|
20478
|
+
* Build a typed `Visitor` function from a tree and a test.
|
|
20479
|
+
*
|
|
20480
|
+
* It will infer which values are passed as `node` and which as `parents`.
|
|
20481
|
+
* @template {UnistNode} [Tree=UnistNode]
|
|
20482
|
+
* Tree type.
|
|
20483
|
+
* @template {Test} [Check=Test]
|
|
20484
|
+
* Test type.
|
|
20485
|
+
*/
|
|
19822
20486
|
/** @type {Readonly<ActionTuple>} */
|
|
19823
20487
|
const empty = [];
|
|
19824
20488
|
/**
|
|
@@ -19949,6 +20613,216 @@ function toResult(value) {
|
|
|
19949
20613
|
//#endregion
|
|
19950
20614
|
//#region node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/lib/index.js
|
|
19951
20615
|
/**
|
|
20616
|
+
* @typedef {import('unist').Node} UnistNode
|
|
20617
|
+
* @typedef {import('unist').Parent} UnistParent
|
|
20618
|
+
* @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult
|
|
20619
|
+
*/
|
|
20620
|
+
/**
|
|
20621
|
+
* @typedef {Exclude<import('unist-util-is').Test, undefined> | undefined} Test
|
|
20622
|
+
* Test from `unist-util-is`.
|
|
20623
|
+
*
|
|
20624
|
+
* Note: we have remove and add `undefined`, because otherwise when generating
|
|
20625
|
+
* automatic `.d.ts` files, TS tries to flatten paths from a local perspective,
|
|
20626
|
+
* which doesnβt work when publishing on npm.
|
|
20627
|
+
*/
|
|
20628
|
+
/**
|
|
20629
|
+
* @typedef {(
|
|
20630
|
+
* Fn extends (value: any) => value is infer Thing
|
|
20631
|
+
* ? Thing
|
|
20632
|
+
* : Fallback
|
|
20633
|
+
* )} Predicate
|
|
20634
|
+
* Get the value of a type guard `Fn`.
|
|
20635
|
+
* @template Fn
|
|
20636
|
+
* Value; typically function that is a type guard (such as `(x): x is Y`).
|
|
20637
|
+
* @template Fallback
|
|
20638
|
+
* Value to yield if `Fn` is not a type guard.
|
|
20639
|
+
*/
|
|
20640
|
+
/**
|
|
20641
|
+
* @typedef {(
|
|
20642
|
+
* Check extends null | undefined // No test.
|
|
20643
|
+
* ? Value
|
|
20644
|
+
* : Value extends {type: Check} // String (type) test.
|
|
20645
|
+
* ? Value
|
|
20646
|
+
* : Value extends Check // Partial test.
|
|
20647
|
+
* ? Value
|
|
20648
|
+
* : Check extends Function // Function test.
|
|
20649
|
+
* ? Predicate<Check, Value> extends Value
|
|
20650
|
+
* ? Predicate<Check, Value>
|
|
20651
|
+
* : never
|
|
20652
|
+
* : never // Some other test?
|
|
20653
|
+
* )} MatchesOne
|
|
20654
|
+
* Check whether a node matches a primitive check in the type system.
|
|
20655
|
+
* @template Value
|
|
20656
|
+
* Value; typically unist `Node`.
|
|
20657
|
+
* @template Check
|
|
20658
|
+
* Value; typically `unist-util-is`-compatible test, but not arrays.
|
|
20659
|
+
*/
|
|
20660
|
+
/**
|
|
20661
|
+
* @typedef {(
|
|
20662
|
+
* Check extends Array<any>
|
|
20663
|
+
* ? MatchesOne<Value, Check[keyof Check]>
|
|
20664
|
+
* : MatchesOne<Value, Check>
|
|
20665
|
+
* )} Matches
|
|
20666
|
+
* Check whether a node matches a check in the type system.
|
|
20667
|
+
* @template Value
|
|
20668
|
+
* Value; typically unist `Node`.
|
|
20669
|
+
* @template Check
|
|
20670
|
+
* Value; typically `unist-util-is`-compatible test.
|
|
20671
|
+
*/
|
|
20672
|
+
/**
|
|
20673
|
+
* @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint
|
|
20674
|
+
* Number; capped reasonably.
|
|
20675
|
+
*/
|
|
20676
|
+
/**
|
|
20677
|
+
* @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment
|
|
20678
|
+
* Increment a number in the type system.
|
|
20679
|
+
* @template {Uint} [I=0]
|
|
20680
|
+
* Index.
|
|
20681
|
+
*/
|
|
20682
|
+
/**
|
|
20683
|
+
* @typedef {(
|
|
20684
|
+
* Node extends UnistParent
|
|
20685
|
+
* ? Node extends {children: Array<infer Children>}
|
|
20686
|
+
* ? Child extends Children ? Node : never
|
|
20687
|
+
* : never
|
|
20688
|
+
* : never
|
|
20689
|
+
* )} InternalParent
|
|
20690
|
+
* Collect nodes that can be parents of `Child`.
|
|
20691
|
+
* @template {UnistNode} Node
|
|
20692
|
+
* All node types in a tree.
|
|
20693
|
+
* @template {UnistNode} Child
|
|
20694
|
+
* Node to search for.
|
|
20695
|
+
*/
|
|
20696
|
+
/**
|
|
20697
|
+
* @typedef {InternalParent<InclusiveDescendant<Tree>, Child>} Parent
|
|
20698
|
+
* Collect nodes in `Tree` that can be parents of `Child`.
|
|
20699
|
+
* @template {UnistNode} Tree
|
|
20700
|
+
* All node types in a tree.
|
|
20701
|
+
* @template {UnistNode} Child
|
|
20702
|
+
* Node to search for.
|
|
20703
|
+
*/
|
|
20704
|
+
/**
|
|
20705
|
+
* @typedef {(
|
|
20706
|
+
* Depth extends Max
|
|
20707
|
+
* ? never
|
|
20708
|
+
* :
|
|
20709
|
+
* | InternalParent<Node, Child>
|
|
20710
|
+
* | InternalAncestor<Node, InternalParent<Node, Child>, Max, Increment<Depth>>
|
|
20711
|
+
* )} InternalAncestor
|
|
20712
|
+
* Collect nodes in `Tree` that can be ancestors of `Child`.
|
|
20713
|
+
* @template {UnistNode} Node
|
|
20714
|
+
* All node types in a tree.
|
|
20715
|
+
* @template {UnistNode} Child
|
|
20716
|
+
* Node to search for.
|
|
20717
|
+
* @template {Uint} [Max=10]
|
|
20718
|
+
* Max; searches up to this depth.
|
|
20719
|
+
* @template {Uint} [Depth=0]
|
|
20720
|
+
* Current depth.
|
|
20721
|
+
*/
|
|
20722
|
+
/**
|
|
20723
|
+
* @typedef {(
|
|
20724
|
+
* Tree extends UnistParent
|
|
20725
|
+
* ? Depth extends Max
|
|
20726
|
+
* ? Tree
|
|
20727
|
+
* : Tree | InclusiveDescendant<Tree['children'][number], Max, Increment<Depth>>
|
|
20728
|
+
* : Tree
|
|
20729
|
+
* )} InclusiveDescendant
|
|
20730
|
+
* Collect all (inclusive) descendants of `Tree`.
|
|
20731
|
+
*
|
|
20732
|
+
* > π **Note**: for performance reasons, this seems to be the fastest way to
|
|
20733
|
+
* > recurse without actually running into an infinite loop, which the
|
|
20734
|
+
* > previous version did.
|
|
20735
|
+
* >
|
|
20736
|
+
* > Practically, a max of `2` is typically enough assuming a `Root` is
|
|
20737
|
+
* > passed, but it doesnβt improve performance.
|
|
20738
|
+
* > It gets higher with `List > ListItem > Table > TableRow > TableCell`.
|
|
20739
|
+
* > Using up to `10` doesnβt hurt or help either.
|
|
20740
|
+
* @template {UnistNode} Tree
|
|
20741
|
+
* Tree type.
|
|
20742
|
+
* @template {Uint} [Max=10]
|
|
20743
|
+
* Max; searches up to this depth.
|
|
20744
|
+
* @template {Uint} [Depth=0]
|
|
20745
|
+
* Current depth.
|
|
20746
|
+
*/
|
|
20747
|
+
/**
|
|
20748
|
+
* @callback Visitor
|
|
20749
|
+
* Handle a node (matching `test`, if given).
|
|
20750
|
+
*
|
|
20751
|
+
* Visitors are free to transform `node`.
|
|
20752
|
+
* They can also transform `parent`.
|
|
20753
|
+
*
|
|
20754
|
+
* Replacing `node` itself, if `SKIP` is not returned, still causes its
|
|
20755
|
+
* descendants to be walked (which is a bug).
|
|
20756
|
+
*
|
|
20757
|
+
* When adding or removing previous siblings of `node` (or next siblings, in
|
|
20758
|
+
* case of reverse), the `Visitor` should return a new `Index` to specify the
|
|
20759
|
+
* sibling to traverse after `node` is traversed.
|
|
20760
|
+
* Adding or removing next siblings of `node` (or previous siblings, in case
|
|
20761
|
+
* of reverse) is handled as expected without needing to return a new `Index`.
|
|
20762
|
+
*
|
|
20763
|
+
* Removing the children property of `parent` still results in them being
|
|
20764
|
+
* traversed.
|
|
20765
|
+
* @param {Visited} node
|
|
20766
|
+
* Found node.
|
|
20767
|
+
* @param {Visited extends UnistNode ? number | undefined : never} index
|
|
20768
|
+
* Index of `node` in `parent`.
|
|
20769
|
+
* @param {Ancestor extends UnistParent ? Ancestor | undefined : never} parent
|
|
20770
|
+
* Parent of `node`.
|
|
20771
|
+
* @returns {VisitorResult}
|
|
20772
|
+
* What to do next.
|
|
20773
|
+
*
|
|
20774
|
+
* An `Index` is treated as a tuple of `[CONTINUE, Index]`.
|
|
20775
|
+
* An `Action` is treated as a tuple of `[Action]`.
|
|
20776
|
+
*
|
|
20777
|
+
* Passing a tuple back only makes sense if the `Action` is `SKIP`.
|
|
20778
|
+
* When the `Action` is `EXIT`, that action can be returned.
|
|
20779
|
+
* When the `Action` is `CONTINUE`, `Index` can be returned.
|
|
20780
|
+
* @template {UnistNode} [Visited=UnistNode]
|
|
20781
|
+
* Visited node type.
|
|
20782
|
+
* @template {UnistParent} [Ancestor=UnistParent]
|
|
20783
|
+
* Ancestor type.
|
|
20784
|
+
*/
|
|
20785
|
+
/**
|
|
20786
|
+
* @typedef {Visitor<Visited, Parent<Ancestor, Visited>>} BuildVisitorFromMatch
|
|
20787
|
+
* Build a typed `Visitor` function from a node and all possible parents.
|
|
20788
|
+
*
|
|
20789
|
+
* It will infer which values are passed as `node` and which as `parent`.
|
|
20790
|
+
* @template {UnistNode} Visited
|
|
20791
|
+
* Node type.
|
|
20792
|
+
* @template {UnistParent} Ancestor
|
|
20793
|
+
* Parent type.
|
|
20794
|
+
*/
|
|
20795
|
+
/**
|
|
20796
|
+
* @typedef {(
|
|
20797
|
+
* BuildVisitorFromMatch<
|
|
20798
|
+
* Matches<Descendant, Check>,
|
|
20799
|
+
* Extract<Descendant, UnistParent>
|
|
20800
|
+
* >
|
|
20801
|
+
* )} BuildVisitorFromDescendants
|
|
20802
|
+
* Build a typed `Visitor` function from a list of descendants and a test.
|
|
20803
|
+
*
|
|
20804
|
+
* It will infer which values are passed as `node` and which as `parent`.
|
|
20805
|
+
* @template {UnistNode} Descendant
|
|
20806
|
+
* Node type.
|
|
20807
|
+
* @template {Test} Check
|
|
20808
|
+
* Test type.
|
|
20809
|
+
*/
|
|
20810
|
+
/**
|
|
20811
|
+
* @typedef {(
|
|
20812
|
+
* BuildVisitorFromDescendants<
|
|
20813
|
+
* InclusiveDescendant<Tree>,
|
|
20814
|
+
* Check
|
|
20815
|
+
* >
|
|
20816
|
+
* )} BuildVisitor
|
|
20817
|
+
* Build a typed `Visitor` function from a tree and a test.
|
|
20818
|
+
*
|
|
20819
|
+
* It will infer which values are passed as `node` and which as `parent`.
|
|
20820
|
+
* @template {UnistNode} [Tree=UnistNode]
|
|
20821
|
+
* Node type.
|
|
20822
|
+
* @template {Test} [Check=Test]
|
|
20823
|
+
* Test type.
|
|
20824
|
+
*/
|
|
20825
|
+
/**
|
|
19952
20826
|
* Visit nodes.
|
|
19953
20827
|
*
|
|
19954
20828
|
* This algorithm performs *depth-first* *tree traversal* in *preorder*
|
|
@@ -20026,6 +20900,10 @@ function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
|
|
|
20026
20900
|
//#endregion
|
|
20027
20901
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js
|
|
20028
20902
|
/**
|
|
20903
|
+
* @import {State} from 'mdast-util-to-markdown'
|
|
20904
|
+
* @import {Heading} from 'mdast'
|
|
20905
|
+
*/
|
|
20906
|
+
/**
|
|
20029
20907
|
* @param {Heading} node
|
|
20030
20908
|
* @param {State} state
|
|
20031
20909
|
* @returns {boolean}
|
|
@@ -20044,6 +20922,10 @@ function formatHeadingAsSetext(node$1, state) {
|
|
|
20044
20922
|
//#endregion
|
|
20045
20923
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/heading.js
|
|
20046
20924
|
/**
|
|
20925
|
+
* @import {Info, State} from 'mdast-util-to-markdown'
|
|
20926
|
+
* @import {Heading, Parents} from 'mdast'
|
|
20927
|
+
*/
|
|
20928
|
+
/**
|
|
20047
20929
|
* @param {Heading} node
|
|
20048
20930
|
* @param {Parents | undefined} _
|
|
20049
20931
|
* @param {State} state
|
|
@@ -20104,6 +20986,10 @@ function htmlPeek() {
|
|
|
20104
20986
|
|
|
20105
20987
|
//#endregion
|
|
20106
20988
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image.js
|
|
20989
|
+
/**
|
|
20990
|
+
* @import {Info, State} from 'mdast-util-to-markdown'
|
|
20991
|
+
* @import {Image, Parents} from 'mdast'
|
|
20992
|
+
*/
|
|
20107
20993
|
image.peek = imagePeek;
|
|
20108
20994
|
/**
|
|
20109
20995
|
* @param {Image} node
|
|
@@ -20259,6 +21145,10 @@ function inlineCodePeek() {
|
|
|
20259
21145
|
//#endregion
|
|
20260
21146
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js
|
|
20261
21147
|
/**
|
|
21148
|
+
* @import {State} from 'mdast-util-to-markdown'
|
|
21149
|
+
* @import {Link} from 'mdast'
|
|
21150
|
+
*/
|
|
21151
|
+
/**
|
|
20262
21152
|
* @param {Link} node
|
|
20263
21153
|
* @param {State} state
|
|
20264
21154
|
* @returns {boolean}
|
|
@@ -20270,6 +21160,11 @@ function formatLinkAsAutolink(node$1, state) {
|
|
|
20270
21160
|
|
|
20271
21161
|
//#endregion
|
|
20272
21162
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link.js
|
|
21163
|
+
/**
|
|
21164
|
+
* @import {Info, State} from 'mdast-util-to-markdown'
|
|
21165
|
+
* @import {Link, Parents} from 'mdast'
|
|
21166
|
+
* @import {Exit} from '../types.js'
|
|
21167
|
+
*/
|
|
20273
21168
|
link.peek = linkPeek;
|
|
20274
21169
|
/**
|
|
20275
21170
|
* @param {Link} node
|
|
@@ -20422,6 +21317,9 @@ function checkBullet(state) {
|
|
|
20422
21317
|
//#endregion
|
|
20423
21318
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js
|
|
20424
21319
|
/**
|
|
21320
|
+
* @import {Options, State} from 'mdast-util-to-markdown'
|
|
21321
|
+
*/
|
|
21322
|
+
/**
|
|
20425
21323
|
* @param {State} state
|
|
20426
21324
|
* @returns {Exclude<Options['bullet'], null | undefined>}
|
|
20427
21325
|
*/
|
|
@@ -20467,6 +21365,10 @@ function checkRule(state) {
|
|
|
20467
21365
|
//#endregion
|
|
20468
21366
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list.js
|
|
20469
21367
|
/**
|
|
21368
|
+
* @import {Info, State} from 'mdast-util-to-markdown'
|
|
21369
|
+
* @import {List, Parents} from 'mdast'
|
|
21370
|
+
*/
|
|
21371
|
+
/**
|
|
20470
21372
|
* @param {List} node
|
|
20471
21373
|
* @param {Parents | undefined} parent
|
|
20472
21374
|
* @param {State} state
|
|
@@ -20522,6 +21424,10 @@ function checkListItemIndent(state) {
|
|
|
20522
21424
|
//#endregion
|
|
20523
21425
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list-item.js
|
|
20524
21426
|
/**
|
|
21427
|
+
* @import {Info, Map, State} from 'mdast-util-to-markdown'
|
|
21428
|
+
* @import {ListItem, Parents} from 'mdast'
|
|
21429
|
+
*/
|
|
21430
|
+
/**
|
|
20525
21431
|
* @param {ListItem} node
|
|
20526
21432
|
* @param {Parents | undefined} parent
|
|
20527
21433
|
* @param {State} state
|
|
@@ -20573,6 +21479,10 @@ function paragraph(node$1, _, state, info) {
|
|
|
20573
21479
|
//#endregion
|
|
20574
21480
|
//#region node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules/mdast-util-phrasing/lib/index.js
|
|
20575
21481
|
/**
|
|
21482
|
+
* @typedef {import('mdast').Html} Html
|
|
21483
|
+
* @typedef {import('mdast').PhrasingContent} PhrasingContent
|
|
21484
|
+
*/
|
|
21485
|
+
/**
|
|
20576
21486
|
* Check if the given value is *phrasing content*.
|
|
20577
21487
|
*
|
|
20578
21488
|
* > π **Note**: Excludes `html`, which can be both phrasing or flow.
|
|
@@ -20604,6 +21514,10 @@ const phrasing = convert([
|
|
|
20604
21514
|
//#endregion
|
|
20605
21515
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/root.js
|
|
20606
21516
|
/**
|
|
21517
|
+
* @import {Info, State} from 'mdast-util-to-markdown'
|
|
21518
|
+
* @import {Parents, Root} from 'mdast'
|
|
21519
|
+
*/
|
|
21520
|
+
/**
|
|
20607
21521
|
* @param {Root} node
|
|
20608
21522
|
* @param {Parents | undefined} _
|
|
20609
21523
|
* @param {State} state
|
|
@@ -20633,6 +21547,10 @@ function checkStrong(state) {
|
|
|
20633
21547
|
|
|
20634
21548
|
//#endregion
|
|
20635
21549
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/strong.js
|
|
21550
|
+
/**
|
|
21551
|
+
* @import {Info, State} from 'mdast-util-to-markdown'
|
|
21552
|
+
* @import {Parents, Strong} from 'mdast'
|
|
21553
|
+
*/
|
|
20636
21554
|
strong.peek = strongPeek;
|
|
20637
21555
|
/**
|
|
20638
21556
|
* @param {Strong} node
|
|
@@ -20710,6 +21628,10 @@ function checkRuleRepetition(state) {
|
|
|
20710
21628
|
//#endregion
|
|
20711
21629
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js
|
|
20712
21630
|
/**
|
|
21631
|
+
* @import {State} from 'mdast-util-to-markdown'
|
|
21632
|
+
* @import {Parents, ThematicBreak} from 'mdast'
|
|
21633
|
+
*/
|
|
21634
|
+
/**
|
|
20713
21635
|
* @param {ThematicBreak} _
|
|
20714
21636
|
* @param {Parents | undefined} _1
|
|
20715
21637
|
* @param {State} state
|
|
@@ -20750,6 +21672,9 @@ const handle = {
|
|
|
20750
21672
|
|
|
20751
21673
|
//#endregion
|
|
20752
21674
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/join.js
|
|
21675
|
+
/**
|
|
21676
|
+
* @import {Join} from 'mdast-util-to-markdown'
|
|
21677
|
+
*/
|
|
20753
21678
|
/** @type {Array<Join>} */
|
|
20754
21679
|
const join = [joinDefaults];
|
|
20755
21680
|
/** @type {Join} */
|
|
@@ -20987,6 +21912,9 @@ const unsafe = [
|
|
|
20987
21912
|
//#endregion
|
|
20988
21913
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/association.js
|
|
20989
21914
|
/**
|
|
21915
|
+
* @import {AssociationId} from '../types.js'
|
|
21916
|
+
*/
|
|
21917
|
+
/**
|
|
20990
21918
|
* Get an identifier from an association to match it to others.
|
|
20991
21919
|
*
|
|
20992
21920
|
* Associations are nodes that match to something else through an ID:
|
|
@@ -21030,6 +21958,10 @@ function compilePattern(pattern) {
|
|
|
21030
21958
|
//#endregion
|
|
21031
21959
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js
|
|
21032
21960
|
/**
|
|
21961
|
+
* @import {Handle, Info, State} from 'mdast-util-to-markdown'
|
|
21962
|
+
* @import {PhrasingParents} from '../types.js'
|
|
21963
|
+
*/
|
|
21964
|
+
/**
|
|
21033
21965
|
* Serialize the children of a parent that contains phrasing children.
|
|
21034
21966
|
*
|
|
21035
21967
|
* These children will be joined flush together.
|
|
@@ -21188,6 +22120,9 @@ function indentLines(value, map$3) {
|
|
|
21188
22120
|
//#endregion
|
|
21189
22121
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/safe.js
|
|
21190
22122
|
/**
|
|
22123
|
+
* @import {SafeConfig, State} from 'mdast-util-to-markdown'
|
|
22124
|
+
*/
|
|
22125
|
+
/**
|
|
21191
22126
|
* Make a string safe for embedding in markdown constructs.
|
|
21192
22127
|
*
|
|
21193
22128
|
* In markdown, almost all punctuation characters can, in certain cases,
|
|
@@ -21358,6 +22293,11 @@ function track(config$1) {
|
|
|
21358
22293
|
//#endregion
|
|
21359
22294
|
//#region node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/index.js
|
|
21360
22295
|
/**
|
|
22296
|
+
* @import {Info, Join, Options, SafeConfig, State} from 'mdast-util-to-markdown'
|
|
22297
|
+
* @import {Nodes} from 'mdast'
|
|
22298
|
+
* @import {Enter, FlowParents, PhrasingParents, TrackFields} from './types.js'
|
|
22299
|
+
*/
|
|
22300
|
+
/**
|
|
21361
22301
|
* Turn an mdast syntax tree into markdown.
|
|
21362
22302
|
*
|
|
21363
22303
|
* @param {Nodes} tree
|
|
@@ -21503,6 +22443,15 @@ function safeBound(value, config$1) {
|
|
|
21503
22443
|
//#endregion
|
|
21504
22444
|
//#region node_modules/.pnpm/remark-stringify@11.0.0/node_modules/remark-stringify/lib/index.js
|
|
21505
22445
|
/**
|
|
22446
|
+
* @typedef {import('mdast').Root} Root
|
|
22447
|
+
* @typedef {import('mdast-util-to-markdown').Options} ToMarkdownOptions
|
|
22448
|
+
* @typedef {import('unified').Compiler<Root, string>} Compiler
|
|
22449
|
+
* @typedef {import('unified').Processor<undefined, undefined, undefined, Root, string>} Processor
|
|
22450
|
+
*/
|
|
22451
|
+
/**
|
|
22452
|
+
* @typedef {Omit<ToMarkdownOptions, 'extensions'>} Options
|
|
22453
|
+
*/
|
|
22454
|
+
/**
|
|
21506
22455
|
* Add support for serializing to markdown.
|
|
21507
22456
|
*
|
|
21508
22457
|
* @param {Readonly<Options> | null | undefined} [options]
|
|
@@ -21797,6 +22746,337 @@ const CallableInstance = (function(property) {
|
|
|
21797
22746
|
|
|
21798
22747
|
//#endregion
|
|
21799
22748
|
//#region node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.js
|
|
22749
|
+
/**
|
|
22750
|
+
* @typedef {import('trough').Pipeline} Pipeline
|
|
22751
|
+
*
|
|
22752
|
+
* @typedef {import('unist').Node} Node
|
|
22753
|
+
*
|
|
22754
|
+
* @typedef {import('vfile').Compatible} Compatible
|
|
22755
|
+
* @typedef {import('vfile').Value} Value
|
|
22756
|
+
*
|
|
22757
|
+
* @typedef {import('../index.js').CompileResultMap} CompileResultMap
|
|
22758
|
+
* @typedef {import('../index.js').Data} Data
|
|
22759
|
+
* @typedef {import('../index.js').Settings} Settings
|
|
22760
|
+
*/
|
|
22761
|
+
/**
|
|
22762
|
+
* @typedef {CompileResultMap[keyof CompileResultMap]} CompileResults
|
|
22763
|
+
* Acceptable results from compilers.
|
|
22764
|
+
*
|
|
22765
|
+
* To register custom results, add them to
|
|
22766
|
+
* {@linkcode CompileResultMap}.
|
|
22767
|
+
*/
|
|
22768
|
+
/**
|
|
22769
|
+
* @template {Node} [Tree=Node]
|
|
22770
|
+
* The node that the compiler receives (default: `Node`).
|
|
22771
|
+
* @template {CompileResults} [Result=CompileResults]
|
|
22772
|
+
* The thing that the compiler yields (default: `CompileResults`).
|
|
22773
|
+
* @callback Compiler
|
|
22774
|
+
* A **compiler** handles the compiling of a syntax tree to something else
|
|
22775
|
+
* (in most cases, text) (TypeScript type).
|
|
22776
|
+
*
|
|
22777
|
+
* It is used in the stringify phase and called with a {@linkcode Node}
|
|
22778
|
+
* and {@linkcode VFile} representation of the document to compile.
|
|
22779
|
+
* It should return the textual representation of the given tree (typically
|
|
22780
|
+
* `string`).
|
|
22781
|
+
*
|
|
22782
|
+
* > **Note**: unified typically compiles by serializing: most compilers
|
|
22783
|
+
* > return `string` (or `Uint8Array`).
|
|
22784
|
+
* > Some compilers, such as the one configured with
|
|
22785
|
+
* > [`rehype-react`][rehype-react], return other values (in this case, a
|
|
22786
|
+
* > React tree).
|
|
22787
|
+
* > If youβre using a compiler that doesnβt serialize, expect different
|
|
22788
|
+
* > result values.
|
|
22789
|
+
* >
|
|
22790
|
+
* > To register custom results in TypeScript, add them to
|
|
22791
|
+
* > {@linkcode CompileResultMap}.
|
|
22792
|
+
*
|
|
22793
|
+
* [rehype-react]: https://github.com/rehypejs/rehype-react
|
|
22794
|
+
* @param {Tree} tree
|
|
22795
|
+
* Tree to compile.
|
|
22796
|
+
* @param {VFile} file
|
|
22797
|
+
* File associated with `tree`.
|
|
22798
|
+
* @returns {Result}
|
|
22799
|
+
* New content: compiled text (`string` or `Uint8Array`, for `file.value`) or
|
|
22800
|
+
* something else (for `file.result`).
|
|
22801
|
+
*/
|
|
22802
|
+
/**
|
|
22803
|
+
* @template {Node} [Tree=Node]
|
|
22804
|
+
* The node that the parser yields (default: `Node`)
|
|
22805
|
+
* @callback Parser
|
|
22806
|
+
* A **parser** handles the parsing of text to a syntax tree.
|
|
22807
|
+
*
|
|
22808
|
+
* It is used in the parse phase and is called with a `string` and
|
|
22809
|
+
* {@linkcode VFile} of the document to parse.
|
|
22810
|
+
* It must return the syntax tree representation of the given file
|
|
22811
|
+
* ({@linkcode Node}).
|
|
22812
|
+
* @param {string} document
|
|
22813
|
+
* Document to parse.
|
|
22814
|
+
* @param {VFile} file
|
|
22815
|
+
* File associated with `document`.
|
|
22816
|
+
* @returns {Tree}
|
|
22817
|
+
* Node representing the given file.
|
|
22818
|
+
*/
|
|
22819
|
+
/**
|
|
22820
|
+
* @typedef {(
|
|
22821
|
+
* Plugin<Array<any>, any, any> |
|
|
22822
|
+
* PluginTuple<Array<any>, any, any> |
|
|
22823
|
+
* Preset
|
|
22824
|
+
* )} Pluggable
|
|
22825
|
+
* Union of the different ways to add plugins and settings.
|
|
22826
|
+
*/
|
|
22827
|
+
/**
|
|
22828
|
+
* @typedef {Array<Pluggable>} PluggableList
|
|
22829
|
+
* List of plugins and presets.
|
|
22830
|
+
*/
|
|
22831
|
+
/**
|
|
22832
|
+
* @template {Array<unknown>} [PluginParameters=[]]
|
|
22833
|
+
* Arguments passed to the plugin (default: `[]`, the empty tuple).
|
|
22834
|
+
* @template {Node | string | undefined} [Input=Node]
|
|
22835
|
+
* Value that is expected as input (default: `Node`).
|
|
22836
|
+
*
|
|
22837
|
+
* * If the plugin returns a {@linkcode Transformer}, this
|
|
22838
|
+
* should be the node it expects.
|
|
22839
|
+
* * If the plugin sets a {@linkcode Parser}, this should be
|
|
22840
|
+
* `string`.
|
|
22841
|
+
* * If the plugin sets a {@linkcode Compiler}, this should be the
|
|
22842
|
+
* node it expects.
|
|
22843
|
+
* @template [Output=Input]
|
|
22844
|
+
* Value that is yielded as output (default: `Input`).
|
|
22845
|
+
*
|
|
22846
|
+
* * If the plugin returns a {@linkcode Transformer}, this
|
|
22847
|
+
* should be the node that that yields.
|
|
22848
|
+
* * If the plugin sets a {@linkcode Parser}, this should be the
|
|
22849
|
+
* node that it yields.
|
|
22850
|
+
* * If the plugin sets a {@linkcode Compiler}, this should be
|
|
22851
|
+
* result it yields.
|
|
22852
|
+
* @typedef {(
|
|
22853
|
+
* (this: Processor, ...parameters: PluginParameters) =>
|
|
22854
|
+
* Input extends string ? // Parser.
|
|
22855
|
+
* Output extends Node | undefined ? undefined | void : never :
|
|
22856
|
+
* Output extends CompileResults ? // Compiler.
|
|
22857
|
+
* Input extends Node | undefined ? undefined | void : never :
|
|
22858
|
+
* Transformer<
|
|
22859
|
+
* Input extends Node ? Input : Node,
|
|
22860
|
+
* Output extends Node ? Output : Node
|
|
22861
|
+
* > | undefined | void
|
|
22862
|
+
* )} Plugin
|
|
22863
|
+
* Single plugin.
|
|
22864
|
+
*
|
|
22865
|
+
* Plugins configure the processors they are applied on in the following
|
|
22866
|
+
* ways:
|
|
22867
|
+
*
|
|
22868
|
+
* * they change the processor, such as the parser, the compiler, or by
|
|
22869
|
+
* configuring data
|
|
22870
|
+
* * they specify how to handle trees and files
|
|
22871
|
+
*
|
|
22872
|
+
* In practice, they are functions that can receive options and configure the
|
|
22873
|
+
* processor (`this`).
|
|
22874
|
+
*
|
|
22875
|
+
* > **Note**: plugins are called when the processor is *frozen*, not when
|
|
22876
|
+
* > they are applied.
|
|
22877
|
+
*/
|
|
22878
|
+
/**
|
|
22879
|
+
* Tuple of a plugin and its configuration.
|
|
22880
|
+
*
|
|
22881
|
+
* The first item is a plugin, the rest are its parameters.
|
|
22882
|
+
*
|
|
22883
|
+
* @template {Array<unknown>} [TupleParameters=[]]
|
|
22884
|
+
* Arguments passed to the plugin (default: `[]`, the empty tuple).
|
|
22885
|
+
* @template {Node | string | undefined} [Input=undefined]
|
|
22886
|
+
* Value that is expected as input (optional).
|
|
22887
|
+
*
|
|
22888
|
+
* * If the plugin returns a {@linkcode Transformer}, this
|
|
22889
|
+
* should be the node it expects.
|
|
22890
|
+
* * If the plugin sets a {@linkcode Parser}, this should be
|
|
22891
|
+
* `string`.
|
|
22892
|
+
* * If the plugin sets a {@linkcode Compiler}, this should be the
|
|
22893
|
+
* node it expects.
|
|
22894
|
+
* @template [Output=undefined] (optional).
|
|
22895
|
+
* Value that is yielded as output.
|
|
22896
|
+
*
|
|
22897
|
+
* * If the plugin returns a {@linkcode Transformer}, this
|
|
22898
|
+
* should be the node that that yields.
|
|
22899
|
+
* * If the plugin sets a {@linkcode Parser}, this should be the
|
|
22900
|
+
* node that it yields.
|
|
22901
|
+
* * If the plugin sets a {@linkcode Compiler}, this should be
|
|
22902
|
+
* result it yields.
|
|
22903
|
+
* @typedef {(
|
|
22904
|
+
* [
|
|
22905
|
+
* plugin: Plugin<TupleParameters, Input, Output>,
|
|
22906
|
+
* ...parameters: TupleParameters
|
|
22907
|
+
* ]
|
|
22908
|
+
* )} PluginTuple
|
|
22909
|
+
*/
|
|
22910
|
+
/**
|
|
22911
|
+
* @typedef Preset
|
|
22912
|
+
* Sharable configuration.
|
|
22913
|
+
*
|
|
22914
|
+
* They can contain plugins and settings.
|
|
22915
|
+
* @property {PluggableList | undefined} [plugins]
|
|
22916
|
+
* List of plugins and presets (optional).
|
|
22917
|
+
* @property {Settings | undefined} [settings]
|
|
22918
|
+
* Shared settings for parsers and compilers (optional).
|
|
22919
|
+
*/
|
|
22920
|
+
/**
|
|
22921
|
+
* @template {VFile} [File=VFile]
|
|
22922
|
+
* The file that the callback receives (default: `VFile`).
|
|
22923
|
+
* @callback ProcessCallback
|
|
22924
|
+
* Callback called when the process is done.
|
|
22925
|
+
*
|
|
22926
|
+
* Called with either an error or a result.
|
|
22927
|
+
* @param {Error | undefined} [error]
|
|
22928
|
+
* Fatal error (optional).
|
|
22929
|
+
* @param {File | undefined} [file]
|
|
22930
|
+
* Processed file (optional).
|
|
22931
|
+
* @returns {undefined}
|
|
22932
|
+
* Nothing.
|
|
22933
|
+
*/
|
|
22934
|
+
/**
|
|
22935
|
+
* @template {Node} [Tree=Node]
|
|
22936
|
+
* The tree that the callback receives (default: `Node`).
|
|
22937
|
+
* @callback RunCallback
|
|
22938
|
+
* Callback called when transformers are done.
|
|
22939
|
+
*
|
|
22940
|
+
* Called with either an error or results.
|
|
22941
|
+
* @param {Error | undefined} [error]
|
|
22942
|
+
* Fatal error (optional).
|
|
22943
|
+
* @param {Tree | undefined} [tree]
|
|
22944
|
+
* Transformed tree (optional).
|
|
22945
|
+
* @param {VFile | undefined} [file]
|
|
22946
|
+
* File (optional).
|
|
22947
|
+
* @returns {undefined}
|
|
22948
|
+
* Nothing.
|
|
22949
|
+
*/
|
|
22950
|
+
/**
|
|
22951
|
+
* @template {Node} [Output=Node]
|
|
22952
|
+
* Node type that the transformer yields (default: `Node`).
|
|
22953
|
+
* @callback TransformCallback
|
|
22954
|
+
* Callback passed to transforms.
|
|
22955
|
+
*
|
|
22956
|
+
* If the signature of a `transformer` accepts a third argument, the
|
|
22957
|
+
* transformer may perform asynchronous operations, and must call it.
|
|
22958
|
+
* @param {Error | undefined} [error]
|
|
22959
|
+
* Fatal error to stop the process (optional).
|
|
22960
|
+
* @param {Output | undefined} [tree]
|
|
22961
|
+
* New, changed, tree (optional).
|
|
22962
|
+
* @param {VFile | undefined} [file]
|
|
22963
|
+
* New, changed, file (optional).
|
|
22964
|
+
* @returns {undefined}
|
|
22965
|
+
* Nothing.
|
|
22966
|
+
*/
|
|
22967
|
+
/**
|
|
22968
|
+
* @template {Node} [Input=Node]
|
|
22969
|
+
* Node type that the transformer expects (default: `Node`).
|
|
22970
|
+
* @template {Node} [Output=Input]
|
|
22971
|
+
* Node type that the transformer yields (default: `Input`).
|
|
22972
|
+
* @callback Transformer
|
|
22973
|
+
* Transformers handle syntax trees and files.
|
|
22974
|
+
*
|
|
22975
|
+
* They are functions that are called each time a syntax tree and file are
|
|
22976
|
+
* passed through the run phase.
|
|
22977
|
+
* When an error occurs in them (either because itβs thrown, returned,
|
|
22978
|
+
* rejected, or passed to `next`), the process stops.
|
|
22979
|
+
*
|
|
22980
|
+
* The run phase is handled by [`trough`][trough], see its documentation for
|
|
22981
|
+
* the exact semantics of these functions.
|
|
22982
|
+
*
|
|
22983
|
+
* > **Note**: you should likely ignore `next`: donβt accept it.
|
|
22984
|
+
* > it supports callback-style async work.
|
|
22985
|
+
* > But promises are likely easier to reason about.
|
|
22986
|
+
*
|
|
22987
|
+
* [trough]: https://github.com/wooorm/trough#function-fninput-next
|
|
22988
|
+
* @param {Input} tree
|
|
22989
|
+
* Tree to handle.
|
|
22990
|
+
* @param {VFile} file
|
|
22991
|
+
* File to handle.
|
|
22992
|
+
* @param {TransformCallback<Output>} next
|
|
22993
|
+
* Callback.
|
|
22994
|
+
* @returns {(
|
|
22995
|
+
* Promise<Output | undefined | void> |
|
|
22996
|
+
* Promise<never> | // For some reason this is needed separately.
|
|
22997
|
+
* Output |
|
|
22998
|
+
* Error |
|
|
22999
|
+
* undefined |
|
|
23000
|
+
* void
|
|
23001
|
+
* )}
|
|
23002
|
+
* If you accept `next`, nothing.
|
|
23003
|
+
* Otherwise:
|
|
23004
|
+
*
|
|
23005
|
+
* * `Error` β fatal error to stop the process
|
|
23006
|
+
* * `Promise<undefined>` or `undefined` β the next transformer keeps using
|
|
23007
|
+
* same tree
|
|
23008
|
+
* * `Promise<Node>` or `Node` β new, changed, tree
|
|
23009
|
+
*/
|
|
23010
|
+
/**
|
|
23011
|
+
* @template {Node | undefined} ParseTree
|
|
23012
|
+
* Output of `parse`.
|
|
23013
|
+
* @template {Node | undefined} HeadTree
|
|
23014
|
+
* Input for `run`.
|
|
23015
|
+
* @template {Node | undefined} TailTree
|
|
23016
|
+
* Output for `run`.
|
|
23017
|
+
* @template {Node | undefined} CompileTree
|
|
23018
|
+
* Input of `stringify`.
|
|
23019
|
+
* @template {CompileResults | undefined} CompileResult
|
|
23020
|
+
* Output of `stringify`.
|
|
23021
|
+
* @template {Node | string | undefined} Input
|
|
23022
|
+
* Input of plugin.
|
|
23023
|
+
* @template Output
|
|
23024
|
+
* Output of plugin (optional).
|
|
23025
|
+
* @typedef {(
|
|
23026
|
+
* Input extends string
|
|
23027
|
+
* ? Output extends Node | undefined
|
|
23028
|
+
* ? // Parser.
|
|
23029
|
+
* Processor<
|
|
23030
|
+
* Output extends undefined ? ParseTree : Output,
|
|
23031
|
+
* HeadTree,
|
|
23032
|
+
* TailTree,
|
|
23033
|
+
* CompileTree,
|
|
23034
|
+
* CompileResult
|
|
23035
|
+
* >
|
|
23036
|
+
* : // Unknown.
|
|
23037
|
+
* Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>
|
|
23038
|
+
* : Output extends CompileResults
|
|
23039
|
+
* ? Input extends Node | undefined
|
|
23040
|
+
* ? // Compiler.
|
|
23041
|
+
* Processor<
|
|
23042
|
+
* ParseTree,
|
|
23043
|
+
* HeadTree,
|
|
23044
|
+
* TailTree,
|
|
23045
|
+
* Input extends undefined ? CompileTree : Input,
|
|
23046
|
+
* Output extends undefined ? CompileResult : Output
|
|
23047
|
+
* >
|
|
23048
|
+
* : // Unknown.
|
|
23049
|
+
* Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>
|
|
23050
|
+
* : Input extends Node | undefined
|
|
23051
|
+
* ? Output extends Node | undefined
|
|
23052
|
+
* ? // Transform.
|
|
23053
|
+
* Processor<
|
|
23054
|
+
* ParseTree,
|
|
23055
|
+
* HeadTree extends undefined ? Input : HeadTree,
|
|
23056
|
+
* Output extends undefined ? TailTree : Output,
|
|
23057
|
+
* CompileTree,
|
|
23058
|
+
* CompileResult
|
|
23059
|
+
* >
|
|
23060
|
+
* : // Unknown.
|
|
23061
|
+
* Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>
|
|
23062
|
+
* : // Unknown.
|
|
23063
|
+
* Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>
|
|
23064
|
+
* )} UsePlugin
|
|
23065
|
+
* Create a processor based on the input/output of a {@link Plugin plugin}.
|
|
23066
|
+
*/
|
|
23067
|
+
/**
|
|
23068
|
+
* @template {CompileResults | undefined} Result
|
|
23069
|
+
* Node type that the transformer yields.
|
|
23070
|
+
* @typedef {(
|
|
23071
|
+
* Result extends Value | undefined ?
|
|
23072
|
+
* VFile :
|
|
23073
|
+
* VFile & {result: Result}
|
|
23074
|
+
* )} VFileWithOutput
|
|
23075
|
+
* Type to generate a {@linkcode VFile} corresponding to a compiler result.
|
|
23076
|
+
*
|
|
23077
|
+
* If a result that is not acceptable on a `VFile` is used, that will
|
|
23078
|
+
* be stored on the `result` field of {@linkcode VFile}.
|
|
23079
|
+
*/
|
|
21800
23080
|
var import_extend = /* @__PURE__ */ __toESM(require_extend(), 1);
|
|
21801
23081
|
const own$1 = {}.hasOwnProperty;
|
|
21802
23082
|
/**
|
|
@@ -22609,6 +23889,61 @@ function escapeStringRegexp(string$2) {
|
|
|
22609
23889
|
//#endregion
|
|
22610
23890
|
//#region node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.js
|
|
22611
23891
|
/**
|
|
23892
|
+
* @import {Nodes, Parents, PhrasingContent, Root, Text} from 'mdast'
|
|
23893
|
+
* @import {BuildVisitor, Test, VisitorResult} from 'unist-util-visit-parents'
|
|
23894
|
+
*/
|
|
23895
|
+
/**
|
|
23896
|
+
* @typedef RegExpMatchObject
|
|
23897
|
+
* Info on the match.
|
|
23898
|
+
* @property {number} index
|
|
23899
|
+
* The index of the search at which the result was found.
|
|
23900
|
+
* @property {string} input
|
|
23901
|
+
* A copy of the search string in the text node.
|
|
23902
|
+
* @property {[...Array<Parents>, Text]} stack
|
|
23903
|
+
* All ancestors of the text node, where the last node is the text itself.
|
|
23904
|
+
*
|
|
23905
|
+
* @typedef {RegExp | string} Find
|
|
23906
|
+
* Pattern to find.
|
|
23907
|
+
*
|
|
23908
|
+
* Strings are escaped and then turned into global expressions.
|
|
23909
|
+
*
|
|
23910
|
+
* @typedef {Array<FindAndReplaceTuple>} FindAndReplaceList
|
|
23911
|
+
* Several find and replaces, in array form.
|
|
23912
|
+
*
|
|
23913
|
+
* @typedef {[Find, Replace?]} FindAndReplaceTuple
|
|
23914
|
+
* Find and replace in tuple form.
|
|
23915
|
+
*
|
|
23916
|
+
* @typedef {ReplaceFunction | string | null | undefined} Replace
|
|
23917
|
+
* Thing to replace with.
|
|
23918
|
+
*
|
|
23919
|
+
* @callback ReplaceFunction
|
|
23920
|
+
* Callback called when a search matches.
|
|
23921
|
+
* @param {...any} parameters
|
|
23922
|
+
* The parameters are the result of corresponding search expression:
|
|
23923
|
+
*
|
|
23924
|
+
* * `value` (`string`) β whole match
|
|
23925
|
+
* * `...capture` (`Array<string>`) β matches from regex capture groups
|
|
23926
|
+
* * `match` (`RegExpMatchObject`) β info on the match
|
|
23927
|
+
* @returns {Array<PhrasingContent> | PhrasingContent | string | false | null | undefined}
|
|
23928
|
+
* Thing to replace with.
|
|
23929
|
+
*
|
|
23930
|
+
* * when `null`, `undefined`, `''`, remove the match
|
|
23931
|
+
* * β¦or when `false`, do not replace at all
|
|
23932
|
+
* * β¦or when `string`, replace with a text node of that value
|
|
23933
|
+
* * β¦or when `Node` or `Array<Node>`, replace with those nodes
|
|
23934
|
+
*
|
|
23935
|
+
* @typedef {[RegExp, ReplaceFunction]} Pair
|
|
23936
|
+
* Normalized find and replace.
|
|
23937
|
+
*
|
|
23938
|
+
* @typedef {Array<Pair>} Pairs
|
|
23939
|
+
* All find and replaced.
|
|
23940
|
+
*
|
|
23941
|
+
* @typedef Options
|
|
23942
|
+
* Configuration.
|
|
23943
|
+
* @property {Test | null | undefined} [ignore]
|
|
23944
|
+
* Test for which nodes to ignore (optional).
|
|
23945
|
+
*/
|
|
23946
|
+
/**
|
|
22612
23947
|
* Find patterns in a tree and replace them.
|
|
22613
23948
|
*
|
|
22614
23949
|
* The algorithm searches the tree in *preorder* for complete values in `Text`
|
|
@@ -22749,6 +24084,12 @@ function toFunction(replace$1) {
|
|
|
22749
24084
|
|
|
22750
24085
|
//#endregion
|
|
22751
24086
|
//#region node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.js
|
|
24087
|
+
/**
|
|
24088
|
+
* @import {RegExpMatchObject, ReplaceFunction} from 'mdast-util-find-and-replace'
|
|
24089
|
+
* @import {CompileContext, Extension as FromMarkdownExtension, Handle as FromMarkdownHandle, Transform as FromMarkdownTransform} from 'mdast-util-from-markdown'
|
|
24090
|
+
* @import {ConstructName, Options as ToMarkdownExtension} from 'mdast-util-to-markdown'
|
|
24091
|
+
* @import {Link, PhrasingContent} from 'mdast'
|
|
24092
|
+
*/
|
|
22752
24093
|
/** @type {ConstructName} */
|
|
22753
24094
|
const inConstruct = "phrasing";
|
|
22754
24095
|
/** @type {Array<ConstructName>} */
|
|
@@ -22965,6 +24306,20 @@ function previous(match, email) {
|
|
|
22965
24306
|
|
|
22966
24307
|
//#endregion
|
|
22967
24308
|
//#region node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.js
|
|
24309
|
+
/**
|
|
24310
|
+
* @import {
|
|
24311
|
+
* CompileContext,
|
|
24312
|
+
* Extension as FromMarkdownExtension,
|
|
24313
|
+
* Handle as FromMarkdownHandle
|
|
24314
|
+
* } from 'mdast-util-from-markdown'
|
|
24315
|
+
* @import {ToMarkdownOptions} from 'mdast-util-gfm-footnote'
|
|
24316
|
+
* @import {
|
|
24317
|
+
* Handle as ToMarkdownHandle,
|
|
24318
|
+
* Map,
|
|
24319
|
+
* Options as ToMarkdownExtension
|
|
24320
|
+
* } from 'mdast-util-to-markdown'
|
|
24321
|
+
* @import {FootnoteDefinition, FootnoteReference} from 'mdast'
|
|
24322
|
+
*/
|
|
22968
24323
|
footnoteReference.peek = footnoteReferencePeek;
|
|
22969
24324
|
/**
|
|
22970
24325
|
* @this {CompileContext}
|
|
@@ -23536,6 +24891,35 @@ function toAlignment(value) {
|
|
|
23536
24891
|
//#endregion
|
|
23537
24892
|
//#region node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.js
|
|
23538
24893
|
/**
|
|
24894
|
+
* @typedef {import('mdast').InlineCode} InlineCode
|
|
24895
|
+
* @typedef {import('mdast').Table} Table
|
|
24896
|
+
* @typedef {import('mdast').TableCell} TableCell
|
|
24897
|
+
* @typedef {import('mdast').TableRow} TableRow
|
|
24898
|
+
*
|
|
24899
|
+
* @typedef {import('markdown-table').Options} MarkdownTableOptions
|
|
24900
|
+
*
|
|
24901
|
+
* @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext
|
|
24902
|
+
* @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension
|
|
24903
|
+
* @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle
|
|
24904
|
+
*
|
|
24905
|
+
* @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension
|
|
24906
|
+
* @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle
|
|
24907
|
+
* @typedef {import('mdast-util-to-markdown').State} State
|
|
24908
|
+
* @typedef {import('mdast-util-to-markdown').Info} Info
|
|
24909
|
+
*/
|
|
24910
|
+
/**
|
|
24911
|
+
* @typedef Options
|
|
24912
|
+
* Configuration.
|
|
24913
|
+
* @property {boolean | null | undefined} [tableCellPadding=true]
|
|
24914
|
+
* Whether to add a space of padding between delimiters and cells (default:
|
|
24915
|
+
* `true`).
|
|
24916
|
+
* @property {boolean | null | undefined} [tablePipeAlign=true]
|
|
24917
|
+
* Whether to align the delimiters (default: `true`).
|
|
24918
|
+
* @property {MarkdownTableOptions['stringLength'] | null | undefined} [stringLength]
|
|
24919
|
+
* Function to detect the length of table cell content, used when aligning
|
|
24920
|
+
* the delimiters between cells (optional).
|
|
24921
|
+
*/
|
|
24922
|
+
/**
|
|
23539
24923
|
* Create an extension for `mdast-util-from-markdown` to enable GFM tables in
|
|
23540
24924
|
* markdown.
|
|
23541
24925
|
*
|
|
@@ -23773,6 +25157,15 @@ function gfmTableToMarkdown(options) {
|
|
|
23773
25157
|
//#endregion
|
|
23774
25158
|
//#region node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/lib/index.js
|
|
23775
25159
|
/**
|
|
25160
|
+
* @typedef {import('mdast').ListItem} ListItem
|
|
25161
|
+
* @typedef {import('mdast').Paragraph} Paragraph
|
|
25162
|
+
* @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext
|
|
25163
|
+
* @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension
|
|
25164
|
+
* @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle
|
|
25165
|
+
* @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension
|
|
25166
|
+
* @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle
|
|
25167
|
+
*/
|
|
25168
|
+
/**
|
|
23776
25169
|
* Create an extension for `mdast-util-from-markdown` to enable GFM task
|
|
23777
25170
|
* list items in markdown.
|
|
23778
25171
|
*
|
|
@@ -23875,6 +25268,11 @@ function listItemWithTaskListItem(node$1, parent, state, info) {
|
|
|
23875
25268
|
//#endregion
|
|
23876
25269
|
//#region node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.js
|
|
23877
25270
|
/**
|
|
25271
|
+
* @import {Extension as FromMarkdownExtension} from 'mdast-util-from-markdown'
|
|
25272
|
+
* @import {Options} from 'mdast-util-gfm'
|
|
25273
|
+
* @import {Options as ToMarkdownExtension} from 'mdast-util-to-markdown'
|
|
25274
|
+
*/
|
|
25275
|
+
/**
|
|
23878
25276
|
* Create an extension for `mdast-util-from-markdown` to enable GFM (autolink
|
|
23879
25277
|
* literals, footnotes, strikethrough, tables, tasklists).
|
|
23880
25278
|
*
|
|
@@ -23913,6 +25311,9 @@ function gfmToMarkdown(options) {
|
|
|
23913
25311
|
|
|
23914
25312
|
//#endregion
|
|
23915
25313
|
//#region node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js
|
|
25314
|
+
/**
|
|
25315
|
+
* @import {Code, ConstructRecord, Event, Extension, Previous, State, TokenizeContext, Tokenizer} from 'micromark-util-types'
|
|
25316
|
+
*/
|
|
23916
25317
|
const wwwPrefix = {
|
|
23917
25318
|
tokenize: tokenizeWwwPrefix,
|
|
23918
25319
|
partial: true
|
|
@@ -24612,6 +26013,9 @@ function previousUnbalanced(events) {
|
|
|
24612
26013
|
|
|
24613
26014
|
//#endregion
|
|
24614
26015
|
//#region node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/lib/syntax.js
|
|
26016
|
+
/**
|
|
26017
|
+
* @import {Event, Exiter, Extension, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'
|
|
26018
|
+
*/
|
|
24615
26019
|
const indent = {
|
|
24616
26020
|
tokenize: tokenizeIndent,
|
|
24617
26021
|
partial: true
|
|
@@ -25030,6 +26434,10 @@ function tokenizeIndent(effects, ok$2, nok) {
|
|
|
25030
26434
|
//#endregion
|
|
25031
26435
|
//#region node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js
|
|
25032
26436
|
/**
|
|
26437
|
+
* @import {Options} from 'micromark-extension-gfm-strikethrough'
|
|
26438
|
+
* @import {Event, Extension, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'
|
|
26439
|
+
*/
|
|
26440
|
+
/**
|
|
25033
26441
|
* Create an extension for `micromark` to enable GFM strikethrough syntax.
|
|
25034
26442
|
*
|
|
25035
26443
|
* @param {Options | null | undefined} [options={}]
|
|
@@ -25300,6 +26708,16 @@ function gfmTableAlign(events, index$2) {
|
|
|
25300
26708
|
//#endregion
|
|
25301
26709
|
//#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/syntax.js
|
|
25302
26710
|
/**
|
|
26711
|
+
* @import {Event, Extension, Point, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'
|
|
26712
|
+
*/
|
|
26713
|
+
/**
|
|
26714
|
+
* @typedef {[number, number, number, number]} Range
|
|
26715
|
+
* Cell info.
|
|
26716
|
+
*
|
|
26717
|
+
* @typedef {0 | 1 | 2 | 3} RowKind
|
|
26718
|
+
* Where we are: `1` for head row, `2` for delimiter row, `3` for body row.
|
|
26719
|
+
*/
|
|
26720
|
+
/**
|
|
25303
26721
|
* Create an HTML extension for `micromark` to support GitHub tables syntax.
|
|
25304
26722
|
*
|
|
25305
26723
|
* @returns {Extension}
|
|
@@ -25984,6 +27402,9 @@ function getPoint(events, index$2) {
|
|
|
25984
27402
|
|
|
25985
27403
|
//#endregion
|
|
25986
27404
|
//#region node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js
|
|
27405
|
+
/**
|
|
27406
|
+
* @import {Extension, State, TokenizeContext, Tokenizer} from 'micromark-util-types'
|
|
27407
|
+
*/
|
|
25987
27408
|
const tasklistCheck = {
|
|
25988
27409
|
name: "tasklistCheck",
|
|
25989
27410
|
tokenize: tokenizeTasklistCheck
|
|
@@ -26102,6 +27523,12 @@ function spaceThenNonSpace(effects, ok$2, nok) {
|
|
|
26102
27523
|
//#endregion
|
|
26103
27524
|
//#region node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.js
|
|
26104
27525
|
/**
|
|
27526
|
+
* @typedef {import('micromark-extension-gfm-footnote').HtmlOptions} HtmlOptions
|
|
27527
|
+
* @typedef {import('micromark-extension-gfm-strikethrough').Options} Options
|
|
27528
|
+
* @typedef {import('micromark-util-types').Extension} Extension
|
|
27529
|
+
* @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension
|
|
27530
|
+
*/
|
|
27531
|
+
/**
|
|
26105
27532
|
* Create an extension for `micromark` to enable GFM syntax.
|
|
26106
27533
|
*
|
|
26107
27534
|
* @param {Options | null | undefined} [options]
|
|
@@ -26124,6 +27551,13 @@ function gfm(options) {
|
|
|
26124
27551
|
|
|
26125
27552
|
//#endregion
|
|
26126
27553
|
//#region node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js
|
|
27554
|
+
/**
|
|
27555
|
+
* @import {Root} from 'mdast'
|
|
27556
|
+
* @import {Options} from 'remark-gfm'
|
|
27557
|
+
* @import {} from 'remark-parse'
|
|
27558
|
+
* @import {} from 'remark-stringify'
|
|
27559
|
+
* @import {Processor} from 'unified'
|
|
27560
|
+
*/
|
|
26127
27561
|
/** @type {Options} */
|
|
26128
27562
|
const emptyOptions = {};
|
|
26129
27563
|
/**
|
|
@@ -26737,6 +28171,61 @@ function toExpression(value) {
|
|
|
26737
28171
|
|
|
26738
28172
|
//#endregion
|
|
26739
28173
|
//#region node_modules/.pnpm/mdast-util-toc@7.1.0/node_modules/mdast-util-toc/lib/search.js
|
|
28174
|
+
/**
|
|
28175
|
+
* @typedef {import('mdast').Heading} Heading
|
|
28176
|
+
* @typedef {import('mdast').Nodes} Nodes
|
|
28177
|
+
* @typedef {import('mdast').PhrasingContent} PhrasingContent
|
|
28178
|
+
* @typedef {import('unist-util-is').Test} Test
|
|
28179
|
+
*/
|
|
28180
|
+
/**
|
|
28181
|
+
* @typedef {Heading['depth']} Rank
|
|
28182
|
+
*
|
|
28183
|
+
*/
|
|
28184
|
+
/**
|
|
28185
|
+
* @typedef SearchOptions
|
|
28186
|
+
* Search configuration.
|
|
28187
|
+
* @property {Rank | null | undefined} [maxDepth=6]
|
|
28188
|
+
* Maximum heading depth to include in the table of contents (default: `6`).
|
|
28189
|
+
*
|
|
28190
|
+
* This is inclusive: when set to `3`, level three headings are included
|
|
28191
|
+
* (those with three hashes, `###`).
|
|
28192
|
+
* @property {Rank | null | undefined} [minDepth=1]
|
|
28193
|
+
* Minimum heading depth to include in the table of contents (default: `1`).
|
|
28194
|
+
*
|
|
28195
|
+
* This is inclusive: when set to `3`, level three headings are included
|
|
28196
|
+
* (those with three hashes, `###`).
|
|
28197
|
+
* @property {string | null | undefined} [skip]
|
|
28198
|
+
* Headings to skip, wrapped in `new RegExp('^(' + value + ')$', 'i')`
|
|
28199
|
+
* (default: `undefined`).
|
|
28200
|
+
*
|
|
28201
|
+
* Any heading matching this expression will not be present in the table of
|
|
28202
|
+
* contents.
|
|
28203
|
+
* @property {Test} [parents]
|
|
28204
|
+
* Allow headings to be children of certain node types (default: the to `toc`
|
|
28205
|
+
* given `tree`, to only allow top-level headings) (default:
|
|
28206
|
+
* `d => d === tree`).
|
|
28207
|
+
*
|
|
28208
|
+
* Internally, uses `unist-util-is` to check, so `parents` can be any
|
|
28209
|
+
* `is`-compatible test.
|
|
28210
|
+
*
|
|
28211
|
+
* @typedef SearchEntry
|
|
28212
|
+
* Entry.
|
|
28213
|
+
* @property {string} id
|
|
28214
|
+
* ID of entry.
|
|
28215
|
+
* @property {Array<PhrasingContent>} children
|
|
28216
|
+
* Contents of entry.
|
|
28217
|
+
* @property {Rank} depth
|
|
28218
|
+
* Rank of entry.
|
|
28219
|
+
*
|
|
28220
|
+
* @typedef SearchResult
|
|
28221
|
+
* Results.
|
|
28222
|
+
* @property {number} index
|
|
28223
|
+
* Where the contents section starts, if looking for a heading.
|
|
28224
|
+
* @property {number} endIndex
|
|
28225
|
+
* Where the contents section ends, if looking for a heading.
|
|
28226
|
+
* @property {Array<SearchEntry>} map
|
|
28227
|
+
* List of entries.
|
|
28228
|
+
*/
|
|
26740
28229
|
const slugs = new BananaSlug();
|
|
26741
28230
|
/**
|
|
26742
28231
|
* Search a node for a toc.
|
|
@@ -27001,6 +28490,27 @@ var esm_default = typeof structuredClone === "function" ? (any, options) => opti
|
|
|
27001
28490
|
//#endregion
|
|
27002
28491
|
//#region node_modules/.pnpm/mdast-util-toc@7.1.0/node_modules/mdast-util-toc/lib/contents.js
|
|
27003
28492
|
/**
|
|
28493
|
+
* @typedef {import('mdast').List} List
|
|
28494
|
+
* @typedef {import('mdast').ListItem} ListItem
|
|
28495
|
+
* @typedef {import('mdast').PhrasingContent} PhrasingContent
|
|
28496
|
+
* @typedef {import('./search.js').SearchEntry} SearchEntry
|
|
28497
|
+
*/
|
|
28498
|
+
/**
|
|
28499
|
+
* @typedef ContentsOptions
|
|
28500
|
+
* Build configuration.
|
|
28501
|
+
* @property {boolean | null | undefined} [tight=false]
|
|
28502
|
+
* Whether to compile list items tightly (default: `false`).
|
|
28503
|
+
* @property {boolean | null | undefined} [ordered=false]
|
|
28504
|
+
* Whether to compile list items as an ordered list, otherwise they are
|
|
28505
|
+
* unordered (default: `false`).
|
|
28506
|
+
* @property {string | null | undefined} [prefix=undefined]
|
|
28507
|
+
* Add a prefix to links to headings in the table of contents (default:
|
|
28508
|
+
* `undefined`).
|
|
28509
|
+
*
|
|
28510
|
+
* Useful for example when later going from mdast to hast and sanitizing with
|
|
28511
|
+
* `hast-util-sanitize`.
|
|
28512
|
+
*/
|
|
28513
|
+
/**
|
|
27004
28514
|
* Transform a list of heading objects to a markdown list.
|
|
27005
28515
|
*
|
|
27006
28516
|
* @param {Array<SearchEntry>} map
|
|
@@ -27120,6 +28630,36 @@ function one(node$1) {
|
|
|
27120
28630
|
//#endregion
|
|
27121
28631
|
//#region node_modules/.pnpm/mdast-util-toc@7.1.0/node_modules/mdast-util-toc/lib/index.js
|
|
27122
28632
|
/**
|
|
28633
|
+
* @typedef {import('mdast').List} List
|
|
28634
|
+
* @typedef {import('mdast').Nodes} Nodes
|
|
28635
|
+
* @typedef {import('./search.js').SearchOptions} SearchOptions
|
|
28636
|
+
* @typedef {import('./contents.js').ContentsOptions} ContentsOptions
|
|
28637
|
+
*/
|
|
28638
|
+
/**
|
|
28639
|
+
* @typedef {ContentsOptions & ExtraOptions & SearchOptions} Options
|
|
28640
|
+
*
|
|
28641
|
+
* @typedef ExtraOptions
|
|
28642
|
+
* Extra configuration fields.
|
|
28643
|
+
* @property {string | null | undefined} [heading]
|
|
28644
|
+
* Heading to look for, wrapped in `new RegExp('^(' + value + ')$', 'i')`
|
|
28645
|
+
* (default: `undefined`).
|
|
28646
|
+
*
|
|
28647
|
+
* @typedef Result
|
|
28648
|
+
* Results.
|
|
28649
|
+
* @property {number | undefined} index
|
|
28650
|
+
* Index of the node right after the table of contents heading, `-1` if no
|
|
28651
|
+
* heading was found, `undefined` if no `heading` was given.
|
|
28652
|
+
* @property {number | undefined} endIndex
|
|
28653
|
+
* Index of the first node after `heading` that is not part of its section,
|
|
28654
|
+
* `-1` if no heading was found, `undefined` if no `heading` was given, same
|
|
28655
|
+
* as `index` if there are no nodes between `heading` and the first heading
|
|
28656
|
+
* in the table of contents.
|
|
28657
|
+
* @property {List | undefined} map
|
|
28658
|
+
* List representing the generated table of contents, `undefined` if no table
|
|
28659
|
+
* of contents could be created, either because no heading was found or
|
|
28660
|
+
* because no following headings were found.
|
|
28661
|
+
*/
|
|
28662
|
+
/**
|
|
27123
28663
|
* Generate a table of contents from `tree`.
|
|
27124
28664
|
*
|
|
27125
28665
|
* Looks for the first heading matching `options.heading` (case insensitive) and
|