@storybook/addon-docs 8.0.0-alpha.10 → 8.0.0-alpha.12
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/dist/mdx-loader.d.ts +141 -549
- package/dist/mdx-loader.js +22 -22
- package/dist/mdx-loader.mjs +21 -21
- package/dist/preset.js +24 -24
- package/package.json +14 -14
- package/preview.js +0 -1
package/dist/mdx-loader.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { transformAsync } from '@babel/core';
|
|
2
2
|
import * as unist from 'unist';
|
|
3
|
-
import { Node as Node$
|
|
3
|
+
import { Node as Node$3, Data as Data$7 } from 'unist';
|
|
4
4
|
import * as hast from 'hast';
|
|
5
|
-
import { ElementContent as ElementContent$1, Properties, Literal, Data as Data$
|
|
5
|
+
import { ElementContent as ElementContent$1, Properties, Literal, Data as Data$5, Parent as Parent$1 } from 'hast';
|
|
6
6
|
import * as mdast from 'mdast';
|
|
7
|
-
import { Parent, BlockContent, DefinitionContent, Data as Data$
|
|
7
|
+
import { Parent, BlockContent, DefinitionContent, Data as Data$6, PhrasingContent, Literal as Literal$1 } from 'mdast';
|
|
8
8
|
import { Program } from 'estree-jsx';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -12,7 +12,7 @@ import { Program } from 'estree-jsx';
|
|
|
12
12
|
*
|
|
13
13
|
* Can either be text or a `Uint8Array` structure.
|
|
14
14
|
*/
|
|
15
|
-
type Value$
|
|
15
|
+
type Value$3 = Uint8Array | string
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* This map registers the type of the `data` key of a `VFile`.
|
|
@@ -29,39 +29,39 @@ type Value$5 = Uint8Array | string
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions, @typescript-eslint/no-empty-interface
|
|
32
|
-
interface DataMap
|
|
32
|
+
interface DataMap {}
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Custom information.
|
|
36
36
|
*
|
|
37
37
|
* Known attributes can be added to @see {@link DataMap}
|
|
38
38
|
*/
|
|
39
|
-
type Data$
|
|
39
|
+
type Data$4 = Record<string, unknown> & Partial<DataMap>
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Message.
|
|
43
43
|
*/
|
|
44
44
|
declare class VFileMessage extends Error {
|
|
45
|
-
constructor(reason: string, options?: Options$
|
|
45
|
+
constructor(reason: string, options?: Options$5 | null | undefined)
|
|
46
46
|
constructor(
|
|
47
47
|
reason: string,
|
|
48
|
-
parent: Node$
|
|
48
|
+
parent: Node$2 | NodeLike$1 | null | undefined,
|
|
49
49
|
origin?: string | null | undefined
|
|
50
50
|
)
|
|
51
51
|
constructor(
|
|
52
52
|
reason: string,
|
|
53
|
-
place: Point$
|
|
53
|
+
place: Point$2 | Position$2 | null | undefined,
|
|
54
54
|
origin?: string | null | undefined
|
|
55
55
|
)
|
|
56
56
|
constructor(reason: string, origin?: string | null | undefined)
|
|
57
57
|
constructor(
|
|
58
58
|
cause: Error | VFileMessage,
|
|
59
|
-
parent: Node$
|
|
59
|
+
parent: Node$2 | NodeLike$1 | null | undefined,
|
|
60
60
|
origin?: string | null | undefined
|
|
61
61
|
)
|
|
62
62
|
constructor(
|
|
63
63
|
cause: Error | VFileMessage,
|
|
64
|
-
place: Point$
|
|
64
|
+
place: Point$2 | Position$2 | null | undefined,
|
|
65
65
|
origin?: string | null | undefined
|
|
66
66
|
)
|
|
67
67
|
constructor(cause: Error | VFileMessage, origin?: string | null | undefined)
|
|
@@ -70,7 +70,7 @@ declare class VFileMessage extends Error {
|
|
|
70
70
|
*
|
|
71
71
|
* @type {Array<Node> | undefined}
|
|
72
72
|
*/
|
|
73
|
-
ancestors: Array<Node$
|
|
73
|
+
ancestors: Array<Node$2> | undefined
|
|
74
74
|
/**
|
|
75
75
|
* Starting column of message.
|
|
76
76
|
*
|
|
@@ -104,7 +104,7 @@ declare class VFileMessage extends Error {
|
|
|
104
104
|
*
|
|
105
105
|
* @type {Point | Position | undefined}
|
|
106
106
|
*/
|
|
107
|
-
place: Point$
|
|
107
|
+
place: Point$2 | Position$2 | undefined
|
|
108
108
|
/**
|
|
109
109
|
* Reason for message, should use markdown.
|
|
110
110
|
*
|
|
@@ -152,21 +152,21 @@ declare class VFileMessage extends Error {
|
|
|
152
152
|
*/
|
|
153
153
|
url: string | undefined
|
|
154
154
|
}
|
|
155
|
-
type Node$
|
|
156
|
-
type Point$
|
|
157
|
-
type Position$
|
|
158
|
-
type NodeLike$
|
|
155
|
+
type Node$2 = unist.Node
|
|
156
|
+
type Point$2 = unist.Point
|
|
157
|
+
type Position$2 = unist.Position
|
|
158
|
+
type NodeLike$1 = object & {
|
|
159
159
|
type: string
|
|
160
|
-
position?: Position$
|
|
160
|
+
position?: Position$2 | undefined
|
|
161
161
|
}
|
|
162
162
|
/**
|
|
163
163
|
* Configuration.
|
|
164
164
|
*/
|
|
165
|
-
type Options$
|
|
165
|
+
type Options$5 = {
|
|
166
166
|
/**
|
|
167
167
|
* Stack of (inclusive) ancestor nodes surrounding the message (optional).
|
|
168
168
|
*/
|
|
169
|
-
ancestors?: Array<Node$
|
|
169
|
+
ancestors?: Array<Node$2> | null | undefined
|
|
170
170
|
/**
|
|
171
171
|
* Original error cause of the message (optional).
|
|
172
172
|
*/
|
|
@@ -174,7 +174,7 @@ type Options$6 = {
|
|
|
174
174
|
/**
|
|
175
175
|
* Place of message (optional).
|
|
176
176
|
*/
|
|
177
|
-
place?: Point$
|
|
177
|
+
place?: Point$2 | Position$2 | null | undefined
|
|
178
178
|
/**
|
|
179
179
|
* Category of message (optional, example: `'my-rule'`).
|
|
180
180
|
*/
|
|
@@ -185,9 +185,9 @@ type Options$6 = {
|
|
|
185
185
|
source?: string | null | undefined
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
type Options$
|
|
188
|
+
type Options$4 = Options$5
|
|
189
189
|
|
|
190
|
-
declare class VFile$
|
|
190
|
+
declare class VFile$1 {
|
|
191
191
|
/**
|
|
192
192
|
* Create a new virtual file.
|
|
193
193
|
*
|
|
@@ -210,7 +210,7 @@ declare class VFile$2 {
|
|
|
210
210
|
* @returns
|
|
211
211
|
* New instance.
|
|
212
212
|
*/
|
|
213
|
-
constructor(value?: Compatible$
|
|
213
|
+
constructor(value?: Compatible$2 | null | undefined)
|
|
214
214
|
/**
|
|
215
215
|
* Base of `path` (default: `process.cwd()` or `'/'` in browsers).
|
|
216
216
|
*
|
|
@@ -225,7 +225,7 @@ declare class VFile$2 {
|
|
|
225
225
|
*
|
|
226
226
|
* @type {Data}
|
|
227
227
|
*/
|
|
228
|
-
data: Data$
|
|
228
|
+
data: Data$3
|
|
229
229
|
/**
|
|
230
230
|
* List of file paths the file moved between.
|
|
231
231
|
*
|
|
@@ -245,7 +245,7 @@ declare class VFile$2 {
|
|
|
245
245
|
*
|
|
246
246
|
* @type {Value}
|
|
247
247
|
*/
|
|
248
|
-
value: Value$
|
|
248
|
+
value: Value$2
|
|
249
249
|
/**
|
|
250
250
|
* Source map.
|
|
251
251
|
*
|
|
@@ -254,7 +254,7 @@ declare class VFile$2 {
|
|
|
254
254
|
*
|
|
255
255
|
* @type {Map | null | undefined}
|
|
256
256
|
*/
|
|
257
|
-
map: Map$
|
|
257
|
+
map: Map$1 | null | undefined
|
|
258
258
|
/**
|
|
259
259
|
* Custom, non-string, compiled, representation.
|
|
260
260
|
*
|
|
@@ -370,52 +370,52 @@ declare class VFile$2 {
|
|
|
370
370
|
* Stem.
|
|
371
371
|
*/
|
|
372
372
|
get stem(): string | undefined
|
|
373
|
-
fail(reason: string, options?: MessageOptions
|
|
373
|
+
fail(reason: string, options?: MessageOptions | null | undefined): never
|
|
374
374
|
fail(
|
|
375
375
|
reason: string,
|
|
376
|
-
parent: Node$
|
|
376
|
+
parent: Node$1 | NodeLike | null | undefined,
|
|
377
377
|
origin?: string | null | undefined
|
|
378
378
|
): never
|
|
379
379
|
fail(
|
|
380
380
|
reason: string,
|
|
381
|
-
place: Point$
|
|
381
|
+
place: Point$1 | Position$1 | null | undefined,
|
|
382
382
|
origin?: string | null | undefined
|
|
383
383
|
): never
|
|
384
384
|
fail(reason: string, origin?: string | null | undefined): never
|
|
385
385
|
fail(
|
|
386
386
|
cause: Error | VFileMessage,
|
|
387
|
-
parent: Node$
|
|
387
|
+
parent: Node$1 | NodeLike | null | undefined,
|
|
388
388
|
origin?: string | null | undefined
|
|
389
389
|
): never
|
|
390
390
|
fail(
|
|
391
391
|
cause: Error | VFileMessage,
|
|
392
|
-
place: Point$
|
|
392
|
+
place: Point$1 | Position$1 | null | undefined,
|
|
393
393
|
origin?: string | null | undefined
|
|
394
394
|
): never
|
|
395
395
|
fail(cause: Error | VFileMessage, origin?: string | null | undefined): never
|
|
396
396
|
info(
|
|
397
397
|
reason: string,
|
|
398
|
-
options?: MessageOptions
|
|
398
|
+
options?: MessageOptions | null | undefined
|
|
399
399
|
): VFileMessage
|
|
400
400
|
info(
|
|
401
401
|
reason: string,
|
|
402
|
-
parent: Node$
|
|
402
|
+
parent: Node$1 | NodeLike | null | undefined,
|
|
403
403
|
origin?: string | null | undefined
|
|
404
404
|
): VFileMessage
|
|
405
405
|
info(
|
|
406
406
|
reason: string,
|
|
407
|
-
place: Point$
|
|
407
|
+
place: Point$1 | Position$1 | null | undefined,
|
|
408
408
|
origin?: string | null | undefined
|
|
409
409
|
): VFileMessage
|
|
410
410
|
info(reason: string, origin?: string | null | undefined): VFileMessage
|
|
411
411
|
info(
|
|
412
412
|
cause: Error | VFileMessage,
|
|
413
|
-
parent: Node$
|
|
413
|
+
parent: Node$1 | NodeLike | null | undefined,
|
|
414
414
|
origin?: string | null | undefined
|
|
415
415
|
): VFileMessage
|
|
416
416
|
info(
|
|
417
417
|
cause: Error | VFileMessage,
|
|
418
|
-
place: Point$
|
|
418
|
+
place: Point$1 | Position$1 | null | undefined,
|
|
419
419
|
origin?: string | null | undefined
|
|
420
420
|
): VFileMessage
|
|
421
421
|
info(
|
|
@@ -424,27 +424,27 @@ declare class VFile$2 {
|
|
|
424
424
|
): VFileMessage
|
|
425
425
|
message(
|
|
426
426
|
reason: string,
|
|
427
|
-
options?: MessageOptions
|
|
427
|
+
options?: MessageOptions | null | undefined
|
|
428
428
|
): VFileMessage
|
|
429
429
|
message(
|
|
430
430
|
reason: string,
|
|
431
|
-
parent: Node$
|
|
431
|
+
parent: Node$1 | NodeLike | null | undefined,
|
|
432
432
|
origin?: string | null | undefined
|
|
433
433
|
): VFileMessage
|
|
434
434
|
message(
|
|
435
435
|
reason: string,
|
|
436
|
-
place: Point$
|
|
436
|
+
place: Point$1 | Position$1 | null | undefined,
|
|
437
437
|
origin?: string | null | undefined
|
|
438
438
|
): VFileMessage
|
|
439
439
|
message(reason: string, origin?: string | null | undefined): VFileMessage
|
|
440
440
|
message(
|
|
441
441
|
cause: Error | VFileMessage,
|
|
442
|
-
parent: Node$
|
|
442
|
+
parent: Node$1 | NodeLike | null | undefined,
|
|
443
443
|
origin?: string | null | undefined
|
|
444
444
|
): VFileMessage
|
|
445
445
|
message(
|
|
446
446
|
cause: Error | VFileMessage,
|
|
447
|
-
place: Point$
|
|
447
|
+
place: Point$1 | Position$1 | null | undefined,
|
|
448
448
|
origin?: string | null | undefined
|
|
449
449
|
): VFileMessage
|
|
450
450
|
message(
|
|
@@ -466,24 +466,24 @@ declare class VFile$2 {
|
|
|
466
466
|
*/
|
|
467
467
|
toString(encoding?: string | null | undefined): string
|
|
468
468
|
}
|
|
469
|
-
type Node$
|
|
470
|
-
type Point$
|
|
471
|
-
type Position$
|
|
472
|
-
type MessageOptions
|
|
473
|
-
type Data$
|
|
474
|
-
type Value$
|
|
475
|
-
type NodeLike
|
|
469
|
+
type Node$1 = unist.Node
|
|
470
|
+
type Point$1 = unist.Point
|
|
471
|
+
type Position$1 = unist.Position
|
|
472
|
+
type MessageOptions = Options$4
|
|
473
|
+
type Data$3 = Data$4
|
|
474
|
+
type Value$2 = Value$3
|
|
475
|
+
type NodeLike = object & {
|
|
476
476
|
type: string
|
|
477
|
-
position?: Position$
|
|
477
|
+
position?: Position$1 | undefined
|
|
478
478
|
}
|
|
479
479
|
/**
|
|
480
480
|
* Things that can be passed to the constructor.
|
|
481
481
|
*/
|
|
482
|
-
type Compatible$
|
|
482
|
+
type Compatible$2 = Options$3 | URL | VFile$1 | Value$2
|
|
483
483
|
/**
|
|
484
484
|
* Set multiple values.
|
|
485
485
|
*/
|
|
486
|
-
type VFileCoreOptions
|
|
486
|
+
type VFileCoreOptions = {
|
|
487
487
|
/**
|
|
488
488
|
* Set `basename` (name).
|
|
489
489
|
*/
|
|
@@ -495,7 +495,7 @@ type VFileCoreOptions$1 = {
|
|
|
495
495
|
/**
|
|
496
496
|
* Set `data` (associated info).
|
|
497
497
|
*/
|
|
498
|
-
data?: Data$
|
|
498
|
+
data?: Data$3 | null | undefined
|
|
499
499
|
/**
|
|
500
500
|
* Set `dirname` (path w/o basename).
|
|
501
501
|
*/
|
|
@@ -519,7 +519,7 @@ type VFileCoreOptions$1 = {
|
|
|
519
519
|
/**
|
|
520
520
|
* Set `value` (the contents of the file).
|
|
521
521
|
*/
|
|
522
|
-
value?: Value$
|
|
522
|
+
value?: Value$2 | null | undefined
|
|
523
523
|
}
|
|
524
524
|
/**
|
|
525
525
|
* Raw source map.
|
|
@@ -527,7 +527,7 @@ type VFileCoreOptions$1 = {
|
|
|
527
527
|
* See:
|
|
528
528
|
* <https://github.com/mozilla/source-map/blob/60adcb0/source-map.d.ts#L15-L23>.
|
|
529
529
|
*/
|
|
530
|
-
type Map$
|
|
530
|
+
type Map$1 = {
|
|
531
531
|
/**
|
|
532
532
|
* Which version of the source map spec this map is following.
|
|
533
533
|
*/
|
|
@@ -562,14 +562,14 @@ type Map$2 = {
|
|
|
562
562
|
*
|
|
563
563
|
* A bunch of keys that will be shallow copied over to the new file.
|
|
564
564
|
*/
|
|
565
|
-
type Options$
|
|
565
|
+
type Options$3 = Record<string, unknown> & VFileCoreOptions
|
|
566
566
|
|
|
567
567
|
/**
|
|
568
568
|
* Contents of the file.
|
|
569
569
|
*
|
|
570
570
|
* Can either be text or a `Uint8Array` structure.
|
|
571
571
|
*/
|
|
572
|
-
type Value$
|
|
572
|
+
type Value$1 = Uint8Array | string
|
|
573
573
|
|
|
574
574
|
// See: <https://github.com/sindresorhus/type-fest/blob/main/source/empty-object.d.ts>
|
|
575
575
|
declare const emptyObjectSymbol$1: unique symbol
|
|
@@ -622,7 +622,7 @@ interface CompileResultMap$1 {
|
|
|
622
622
|
* export {} // You may not need this, but it makes sure the file is a module.
|
|
623
623
|
* ```
|
|
624
624
|
*/
|
|
625
|
-
interface Data$
|
|
625
|
+
interface Data$2 {
|
|
626
626
|
settings?: Settings$2 | undefined
|
|
627
627
|
}
|
|
628
628
|
|
|
@@ -704,7 +704,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
704
704
|
* undefined
|
|
705
705
|
* )}
|
|
706
706
|
*/
|
|
707
|
-
Compiler: (Compiler<CompileTree extends undefined ? Node
|
|
707
|
+
Compiler: (Compiler<CompileTree extends undefined ? Node : CompileTree, CompileResult extends undefined ? CompileResults : CompileResult> | undefined);
|
|
708
708
|
/**
|
|
709
709
|
* Parser to use (deprecated).
|
|
710
710
|
*
|
|
@@ -715,7 +715,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
715
715
|
* undefined
|
|
716
716
|
* )}
|
|
717
717
|
*/
|
|
718
|
-
Parser: (Parser<ParseTree extends undefined ? Node
|
|
718
|
+
Parser: (Parser<ParseTree extends undefined ? Node : ParseTree> | undefined);
|
|
719
719
|
/**
|
|
720
720
|
* Internal list of configured plugins.
|
|
721
721
|
*
|
|
@@ -735,7 +735,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
735
735
|
* undefined
|
|
736
736
|
* )}
|
|
737
737
|
*/
|
|
738
|
-
compiler: (Compiler<CompileTree extends undefined ? Node
|
|
738
|
+
compiler: (Compiler<CompileTree extends undefined ? Node : CompileTree, CompileResult extends undefined ? CompileResults : CompileResult> | undefined);
|
|
739
739
|
/**
|
|
740
740
|
* Internal state to track where we are while freezing.
|
|
741
741
|
*
|
|
@@ -759,7 +759,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
759
759
|
* This is a private internal property and should not be used.
|
|
760
760
|
* @type {Data}
|
|
761
761
|
*/
|
|
762
|
-
namespace: Data$
|
|
762
|
+
namespace: Data$1;
|
|
763
763
|
/**
|
|
764
764
|
* Parser to use.
|
|
765
765
|
*
|
|
@@ -768,7 +768,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
768
768
|
* undefined
|
|
769
769
|
* )}
|
|
770
770
|
*/
|
|
771
|
-
parser: (Parser<ParseTree extends undefined ? Node
|
|
771
|
+
parser: (Parser<ParseTree extends undefined ? Node : ParseTree> | undefined);
|
|
772
772
|
/**
|
|
773
773
|
* Internal list of configured transformers.
|
|
774
774
|
*
|
|
@@ -848,7 +848,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
848
848
|
* The current processor when setting, the value at `key` when getting, or
|
|
849
849
|
* the entire dataset when getting without key.
|
|
850
850
|
*/
|
|
851
|
-
data<Key extends keyof Data
|
|
851
|
+
data<Key extends keyof Data>(): Data$1;
|
|
852
852
|
/**
|
|
853
853
|
* Configure the processor with info available to all plugins.
|
|
854
854
|
* Information is stored in an object.
|
|
@@ -908,7 +908,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
908
908
|
* The current processor when setting, the value at `key` when getting, or
|
|
909
909
|
* the entire dataset when getting without key.
|
|
910
910
|
*/
|
|
911
|
-
data<Key extends keyof Data
|
|
911
|
+
data<Key extends keyof Data>(dataset: Data$1): Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>;
|
|
912
912
|
/**
|
|
913
913
|
* Configure the processor with info available to all plugins.
|
|
914
914
|
* Information is stored in an object.
|
|
@@ -968,7 +968,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
968
968
|
* The current processor when setting, the value at `key` when getting, or
|
|
969
969
|
* the entire dataset when getting without key.
|
|
970
970
|
*/
|
|
971
|
-
data<Key extends keyof Data
|
|
971
|
+
data<Key extends keyof Data>(key: Key): Data[Key];
|
|
972
972
|
/**
|
|
973
973
|
* Configure the processor with info available to all plugins.
|
|
974
974
|
* Information is stored in an object.
|
|
@@ -1028,7 +1028,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
1028
1028
|
* The current processor when setting, the value at `key` when getting, or
|
|
1029
1029
|
* the entire dataset when getting without key.
|
|
1030
1030
|
*/
|
|
1031
|
-
data<Key extends keyof Data
|
|
1031
|
+
data<Key extends keyof Data>(key: Key, value: Data[Key]): Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>;
|
|
1032
1032
|
/**
|
|
1033
1033
|
* Freeze a processor.
|
|
1034
1034
|
*
|
|
@@ -1061,7 +1061,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
1061
1061
|
* @returns {ParseTree extends undefined ? Node : ParseTree}
|
|
1062
1062
|
* Syntax tree representing `file`.
|
|
1063
1063
|
*/
|
|
1064
|
-
parse(file?: Compatible$
|
|
1064
|
+
parse(file?: Compatible$1 | undefined): ParseTree extends undefined ? Node : ParseTree;
|
|
1065
1065
|
/**
|
|
1066
1066
|
* Process the given file as configured on the processor.
|
|
1067
1067
|
*
|
|
@@ -1104,7 +1104,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
1104
1104
|
*
|
|
1105
1105
|
* [rehype-react]: https://github.com/rehypejs/rehype-react
|
|
1106
1106
|
*/
|
|
1107
|
-
process(file: Compatible$
|
|
1107
|
+
process(file: Compatible$1 | undefined, done: ProcessCallback<VFileWithOutput<CompileResult>>): undefined;
|
|
1108
1108
|
/**
|
|
1109
1109
|
* Process the given file as configured on the processor.
|
|
1110
1110
|
*
|
|
@@ -1147,7 +1147,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
1147
1147
|
*
|
|
1148
1148
|
* [rehype-react]: https://github.com/rehypejs/rehype-react
|
|
1149
1149
|
*/
|
|
1150
|
-
process(file?: Compatible$
|
|
1150
|
+
process(file?: Compatible$1 | undefined): Promise<VFileWithOutput<CompileResult>>;
|
|
1151
1151
|
/**
|
|
1152
1152
|
* Process the given file as configured on the processor.
|
|
1153
1153
|
*
|
|
@@ -1179,7 +1179,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
1179
1179
|
*
|
|
1180
1180
|
* [rehype-react]: https://github.com/rehypejs/rehype-react
|
|
1181
1181
|
*/
|
|
1182
|
-
processSync(file?: Compatible$
|
|
1182
|
+
processSync(file?: Compatible$1 | undefined): VFileWithOutput<CompileResult>;
|
|
1183
1183
|
/**
|
|
1184
1184
|
* Run *transformers* on a syntax tree.
|
|
1185
1185
|
*
|
|
@@ -1218,7 +1218,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
1218
1218
|
* Otherwise, a promise rejected with a fatal error or resolved with the
|
|
1219
1219
|
* transformed tree.
|
|
1220
1220
|
*/
|
|
1221
|
-
run(tree: HeadTree extends undefined ? Node
|
|
1221
|
+
run(tree: HeadTree extends undefined ? Node : HeadTree, done: RunCallback<TailTree extends undefined ? Node : TailTree>): undefined;
|
|
1222
1222
|
/**
|
|
1223
1223
|
* Run *transformers* on a syntax tree.
|
|
1224
1224
|
*
|
|
@@ -1257,7 +1257,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
1257
1257
|
* Otherwise, a promise rejected with a fatal error or resolved with the
|
|
1258
1258
|
* transformed tree.
|
|
1259
1259
|
*/
|
|
1260
|
-
run(tree: HeadTree extends undefined ? Node
|
|
1260
|
+
run(tree: HeadTree extends undefined ? Node : HeadTree, file: Compatible$1 | undefined, done: RunCallback<TailTree extends undefined ? Node : TailTree>): undefined;
|
|
1261
1261
|
/**
|
|
1262
1262
|
* Run *transformers* on a syntax tree.
|
|
1263
1263
|
*
|
|
@@ -1296,7 +1296,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
1296
1296
|
* Otherwise, a promise rejected with a fatal error or resolved with the
|
|
1297
1297
|
* transformed tree.
|
|
1298
1298
|
*/
|
|
1299
|
-
run(tree: HeadTree extends undefined ? Node
|
|
1299
|
+
run(tree: HeadTree extends undefined ? Node : HeadTree, file?: Compatible$1 | undefined): Promise<TailTree extends undefined ? Node : TailTree>;
|
|
1300
1300
|
/**
|
|
1301
1301
|
* Run *transformers* on a syntax tree.
|
|
1302
1302
|
*
|
|
@@ -1314,7 +1314,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
1314
1314
|
* @returns {TailTree extends undefined ? Node : TailTree}
|
|
1315
1315
|
* Transformed tree.
|
|
1316
1316
|
*/
|
|
1317
|
-
runSync(tree: HeadTree extends undefined ? Node
|
|
1317
|
+
runSync(tree: HeadTree extends undefined ? Node : HeadTree, file?: Compatible$1 | undefined): TailTree extends undefined ? Node : TailTree;
|
|
1318
1318
|
/**
|
|
1319
1319
|
* Compile a syntax tree.
|
|
1320
1320
|
*
|
|
@@ -1344,7 +1344,7 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
1344
1344
|
*
|
|
1345
1345
|
* [rehype-react]: https://github.com/rehypejs/rehype-react
|
|
1346
1346
|
*/
|
|
1347
|
-
stringify(tree: CompileTree extends undefined ? Node
|
|
1347
|
+
stringify(tree: CompileTree extends undefined ? Node : CompileTree, file?: Compatible$1 | undefined): CompileResult extends undefined ? Value : CompileResult;
|
|
1348
1348
|
/**
|
|
1349
1349
|
* Configure the processor to use a plugin, a list of usable values, or a
|
|
1350
1350
|
* preset.
|
|
@@ -1521,11 +1521,11 @@ declare class Processor<ParseTree extends unist.Node | undefined = undefined, He
|
|
|
1521
1521
|
use<Parameters_2 extends unknown[] = [], Input extends string | unist.Node | undefined = undefined, Output = Input>(plugin: Plugin<Parameters_2, Input, Output>, ...parameters: Parameters_2 | [boolean]): UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>;
|
|
1522
1522
|
}
|
|
1523
1523
|
type Pipeline = Pipeline$1;
|
|
1524
|
-
type Node
|
|
1525
|
-
type Compatible$
|
|
1526
|
-
type Value
|
|
1524
|
+
type Node = unist.Node;
|
|
1525
|
+
type Compatible$1 = Compatible$2;
|
|
1526
|
+
type Value = Value$1;
|
|
1527
1527
|
type CompileResultMap = CompileResultMap$1;
|
|
1528
|
-
type Data$
|
|
1528
|
+
type Data$1 = Data$2;
|
|
1529
1529
|
type Settings$1 = Settings$2;
|
|
1530
1530
|
/**
|
|
1531
1531
|
* Acceptable results from compilers.
|
|
@@ -1556,7 +1556,7 @@ type CompileResults = CompileResultMap[keyof CompileResultMap];
|
|
|
1556
1556
|
*
|
|
1557
1557
|
* [rehype-react]: https://github.com/rehypejs/rehype-react
|
|
1558
1558
|
*/
|
|
1559
|
-
type Compiler<Tree extends unist.Node = unist.Node, Result extends CompileResults = CompileResults> = (tree: Tree, file: VFile$
|
|
1559
|
+
type Compiler<Tree extends unist.Node = unist.Node, Result extends CompileResults = CompileResults> = (tree: Tree, file: VFile$1) => Result;
|
|
1560
1560
|
/**
|
|
1561
1561
|
* A **parser** handles the parsing of text to a syntax tree.
|
|
1562
1562
|
*
|
|
@@ -1565,7 +1565,7 @@ type Compiler<Tree extends unist.Node = unist.Node, Result extends CompileResult
|
|
|
1565
1565
|
* It must return the syntax tree representation of the given file
|
|
1566
1566
|
* ({@link Node `Node`}).
|
|
1567
1567
|
*/
|
|
1568
|
-
type Parser<Tree extends unist.Node = unist.Node> = (document: string, file: VFile$
|
|
1568
|
+
type Parser<Tree extends unist.Node = unist.Node> = (document: string, file: VFile$1) => Tree;
|
|
1569
1569
|
/**
|
|
1570
1570
|
* Union of the different ways to add plugins and settings.
|
|
1571
1571
|
*/
|
|
@@ -1590,7 +1590,7 @@ type PluggableList = Array<Pluggable>;
|
|
|
1590
1590
|
* > 👉 **Note**: plugins are called when the processor is *frozen*, not when
|
|
1591
1591
|
* > they are applied.
|
|
1592
1592
|
*/
|
|
1593
|
-
type Plugin<PluginParameters extends unknown[] = [], Input extends string | unist.Node | undefined = unist.Node, Output = Input> = (this: Processor, ...parameters: PluginParameters) => Input extends string ? Output extends Node
|
|
1593
|
+
type Plugin<PluginParameters extends unknown[] = [], Input extends string | unist.Node | undefined = unist.Node, Output = Input> = (this: Processor, ...parameters: PluginParameters) => Input extends string ? Output extends Node | undefined ? undefined | void : never : Output extends CompileResults ? Input extends Node | undefined ? undefined | void : never : Transformer<Input extends Node ? Input : Node, Output extends Node ? Output : Node> | undefined | void;
|
|
1594
1594
|
/**
|
|
1595
1595
|
* Tuple of a plugin and its configuration.
|
|
1596
1596
|
*
|
|
@@ -1620,20 +1620,20 @@ type Preset = {
|
|
|
1620
1620
|
*
|
|
1621
1621
|
* Called with either an error or a result.
|
|
1622
1622
|
*/
|
|
1623
|
-
type ProcessCallback<File extends VFile$
|
|
1623
|
+
type ProcessCallback<File extends VFile$1 = VFile$1> = (error?: Error | undefined, file?: File | undefined) => undefined;
|
|
1624
1624
|
/**
|
|
1625
1625
|
* Callback called when transformers are done.
|
|
1626
1626
|
*
|
|
1627
1627
|
* Called with either an error or results.
|
|
1628
1628
|
*/
|
|
1629
|
-
type RunCallback<Tree extends unist.Node = unist.Node> = (error?: Error | undefined, tree?: Tree | undefined, file?: VFile$
|
|
1629
|
+
type RunCallback<Tree extends unist.Node = unist.Node> = (error?: Error | undefined, tree?: Tree | undefined, file?: VFile$1 | undefined) => undefined;
|
|
1630
1630
|
/**
|
|
1631
1631
|
* Callback passed to transforms.
|
|
1632
1632
|
*
|
|
1633
1633
|
* If the signature of a `transformer` accepts a third argument, the
|
|
1634
1634
|
* transformer may perform asynchronous operations, and must call it.
|
|
1635
1635
|
*/
|
|
1636
|
-
type TransformCallback<Output extends unist.Node = unist.Node> = (error?: Error | undefined, tree?: Output | undefined, file?: VFile$
|
|
1636
|
+
type TransformCallback<Output extends unist.Node = unist.Node> = (error?: Error | undefined, tree?: Output | undefined, file?: VFile$1 | undefined) => undefined;
|
|
1637
1637
|
/**
|
|
1638
1638
|
* Transformers handle syntax trees and files.
|
|
1639
1639
|
*
|
|
@@ -1651,19 +1651,19 @@ type TransformCallback<Output extends unist.Node = unist.Node> = (error?: Error
|
|
|
1651
1651
|
*
|
|
1652
1652
|
* [trough]: https://github.com/wooorm/trough#function-fninput-next
|
|
1653
1653
|
*/
|
|
1654
|
-
type Transformer<Input extends unist.Node = unist.Node, Output extends unist.Node = Input> = (tree: Input, file: VFile$
|
|
1654
|
+
type Transformer<Input extends unist.Node = unist.Node, Output extends unist.Node = Input> = (tree: Input, file: VFile$1, next: TransformCallback<Output>) => (Promise<Output | undefined | void> | Promise<never> | // For some reason this is needed separately.
|
|
1655
1655
|
Output | Error | undefined | void);
|
|
1656
1656
|
/**
|
|
1657
1657
|
* Create a processor based on the input/output of a {@link Plugin plugin}.
|
|
1658
1658
|
*/
|
|
1659
|
-
type UsePlugin<ParseTree extends unist.Node | undefined, HeadTree extends unist.Node | undefined, TailTree extends unist.Node | undefined, CompileTree extends unist.Node | undefined, CompileResult extends CompileResults | undefined, Input extends string | unist.Node | undefined, Output> = (Input extends string ? Output extends Node
|
|
1659
|
+
type UsePlugin<ParseTree extends unist.Node | undefined, HeadTree extends unist.Node | undefined, TailTree extends unist.Node | undefined, CompileTree extends unist.Node | undefined, CompileResult extends CompileResults | undefined, Input extends string | unist.Node | undefined, Output> = (Input extends string ? Output extends Node | undefined ? Processor<Output extends undefined ? ParseTree : Output, HeadTree, TailTree, CompileTree, CompileResult> : Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult> : Output extends CompileResults ? Input extends Node | undefined ? Processor<ParseTree, HeadTree, TailTree, Input extends undefined ? CompileTree : Input, Output extends undefined ? CompileResult : Output> : Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult> : Input extends Node | undefined ? Output extends Node | undefined ? Processor<ParseTree, HeadTree extends undefined ? Input : HeadTree, Output extends undefined ? TailTree : Output, CompileTree, CompileResult> : Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult> : Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>);
|
|
1660
1660
|
/**
|
|
1661
1661
|
* Type to generate a {@link VFile `VFile`} corresponding to a compiler result.
|
|
1662
1662
|
*
|
|
1663
1663
|
* If a result that is not acceptable on a `VFile` is used, that will
|
|
1664
1664
|
* be stored on the `result` field of {@link VFile `VFile`}.
|
|
1665
1665
|
*/
|
|
1666
|
-
type VFileWithOutput<Result extends CompileResults | undefined> = (Result extends Value
|
|
1666
|
+
type VFileWithOutput<Result extends CompileResults | undefined> = (Result extends Value | undefined ? VFile$1 : VFile$1 & {
|
|
1667
1667
|
result: Result;
|
|
1668
1668
|
});
|
|
1669
1669
|
|
|
@@ -1690,7 +1690,7 @@ declare const emptyObjectSymbol: unique symbol
|
|
|
1690
1690
|
* export {} // You may not need this, but it makes sure the file is a module.
|
|
1691
1691
|
* ```
|
|
1692
1692
|
*/
|
|
1693
|
-
interface Data
|
|
1693
|
+
interface Data {
|
|
1694
1694
|
settings?: Settings | undefined
|
|
1695
1695
|
}
|
|
1696
1696
|
|
|
@@ -1752,11 +1752,11 @@ interface RawIndexMap extends StartOfSourceMap {
|
|
|
1752
1752
|
}
|
|
1753
1753
|
|
|
1754
1754
|
interface RawSection {
|
|
1755
|
-
offset: Position
|
|
1755
|
+
offset: Position;
|
|
1756
1756
|
map: RawSourceMap;
|
|
1757
1757
|
}
|
|
1758
1758
|
|
|
1759
|
-
interface Position
|
|
1759
|
+
interface Position {
|
|
1760
1760
|
line: number;
|
|
1761
1761
|
column: number;
|
|
1762
1762
|
}
|
|
@@ -1791,8 +1791,8 @@ interface MappingItem {
|
|
|
1791
1791
|
}
|
|
1792
1792
|
|
|
1793
1793
|
interface Mapping {
|
|
1794
|
-
generated: Position
|
|
1795
|
-
original: Position
|
|
1794
|
+
generated: Position;
|
|
1795
|
+
original: Position;
|
|
1796
1796
|
source: string;
|
|
1797
1797
|
name?: string;
|
|
1798
1798
|
}
|
|
@@ -1877,7 +1877,7 @@ interface SourceMapConsumer {
|
|
|
1877
1877
|
* - column: The column number in the original source, or null.
|
|
1878
1878
|
* - name: The original identifier, or null.
|
|
1879
1879
|
*/
|
|
1880
|
-
originalPositionFor(generatedPosition: Position
|
|
1880
|
+
originalPositionFor(generatedPosition: Position & { bias?: number }): NullableMappedPosition;
|
|
1881
1881
|
|
|
1882
1882
|
/**
|
|
1883
1883
|
* Returns the generated line and column information for the original source,
|
|
@@ -2065,7 +2065,7 @@ type Handlers = Partial<Record<MdastNodes['type'], Handler>>;
|
|
|
2065
2065
|
/**
|
|
2066
2066
|
* Configuration (optional).
|
|
2067
2067
|
*/
|
|
2068
|
-
type Options$
|
|
2068
|
+
type Options$2 = {
|
|
2069
2069
|
/**
|
|
2070
2070
|
* Whether to persist raw HTML in markdown in the hast tree (default:
|
|
2071
2071
|
* `false`).
|
|
@@ -2235,7 +2235,7 @@ type State$1 = {
|
|
|
2235
2235
|
/**
|
|
2236
2236
|
* Configuration.
|
|
2237
2237
|
*/
|
|
2238
|
-
options: Options$
|
|
2238
|
+
options: Options$2;
|
|
2239
2239
|
/**
|
|
2240
2240
|
* Copy a node’s positional info.
|
|
2241
2241
|
*/
|
|
@@ -2310,7 +2310,7 @@ interface Raw$1 extends Literal {
|
|
|
2310
2310
|
/**
|
|
2311
2311
|
* Info associated with hast raw nodes by the ecosystem.
|
|
2312
2312
|
*/
|
|
2313
|
-
interface RawData$1 extends Data$
|
|
2313
|
+
interface RawData$1 extends Data$5 {}
|
|
2314
2314
|
|
|
2315
2315
|
// Register nodes in content.
|
|
2316
2316
|
declare module 'hast' {
|
|
@@ -2379,7 +2379,7 @@ interface Raw extends Literal {
|
|
|
2379
2379
|
/**
|
|
2380
2380
|
* Info associated with hast raw nodes by the ecosystem.
|
|
2381
2381
|
*/
|
|
2382
|
-
interface RawData extends Data$
|
|
2382
|
+
interface RawData extends Data$5 {}
|
|
2383
2383
|
|
|
2384
2384
|
// Register nodes in content.
|
|
2385
2385
|
declare module 'hast' {
|
|
@@ -2430,10 +2430,10 @@ declare module 'mdast' {
|
|
|
2430
2430
|
}
|
|
2431
2431
|
}
|
|
2432
2432
|
|
|
2433
|
-
type Options$2 = Options$3;
|
|
2434
|
-
|
|
2435
2433
|
type Options$1 = Options$2;
|
|
2436
2434
|
|
|
2435
|
+
type Options = Options$1;
|
|
2436
|
+
|
|
2437
2437
|
// Expose node types.
|
|
2438
2438
|
/**
|
|
2439
2439
|
* MDX JSX attribute value set to an expression.
|
|
@@ -2443,7 +2443,7 @@ type Options$1 = Options$2;
|
|
|
2443
2443
|
* ^^^
|
|
2444
2444
|
* ```
|
|
2445
2445
|
*/
|
|
2446
|
-
interface MdxJsxAttributeValueExpression$1 extends Node$
|
|
2446
|
+
interface MdxJsxAttributeValueExpression$1 extends Node$3 {
|
|
2447
2447
|
/**
|
|
2448
2448
|
* Node type.
|
|
2449
2449
|
*/
|
|
@@ -2464,7 +2464,7 @@ interface MdxJsxAttributeValueExpression$1 extends Node$4 {
|
|
|
2464
2464
|
* Info associated with mdast MDX JSX attribute value expression nodes by the
|
|
2465
2465
|
* ecosystem.
|
|
2466
2466
|
*/
|
|
2467
|
-
interface MdxJsxAttributeValueExpressionData$1 extends Data$
|
|
2467
|
+
interface MdxJsxAttributeValueExpressionData$1 extends Data$7 {
|
|
2468
2468
|
/**
|
|
2469
2469
|
* Program node from estree.
|
|
2470
2470
|
*/
|
|
@@ -2479,7 +2479,7 @@ interface MdxJsxAttributeValueExpressionData$1 extends Data$9 {
|
|
|
2479
2479
|
* ^^^^^^
|
|
2480
2480
|
* ```
|
|
2481
2481
|
*/
|
|
2482
|
-
interface MdxJsxExpressionAttribute$2 extends Node$
|
|
2482
|
+
interface MdxJsxExpressionAttribute$2 extends Node$3 {
|
|
2483
2483
|
/**
|
|
2484
2484
|
* Node type.
|
|
2485
2485
|
*/
|
|
@@ -2500,7 +2500,7 @@ interface MdxJsxExpressionAttribute$2 extends Node$4 {
|
|
|
2500
2500
|
* Info associated with mdast MDX JSX expression attribute nodes by the
|
|
2501
2501
|
* ecosystem.
|
|
2502
2502
|
*/
|
|
2503
|
-
interface MdxJsxExpressionAttributeData$1 extends Data$
|
|
2503
|
+
interface MdxJsxExpressionAttributeData$1 extends Data$7 {
|
|
2504
2504
|
/**
|
|
2505
2505
|
* Program node from estree.
|
|
2506
2506
|
*/
|
|
@@ -2515,7 +2515,7 @@ interface MdxJsxExpressionAttributeData$1 extends Data$9 {
|
|
|
2515
2515
|
* ^^^^^
|
|
2516
2516
|
* ```
|
|
2517
2517
|
*/
|
|
2518
|
-
interface MdxJsxAttribute$2 extends Node$
|
|
2518
|
+
interface MdxJsxAttribute$2 extends Node$3 {
|
|
2519
2519
|
/**
|
|
2520
2520
|
* Node type.
|
|
2521
2521
|
*/
|
|
@@ -2538,7 +2538,7 @@ interface MdxJsxAttribute$2 extends Node$4 {
|
|
|
2538
2538
|
* Info associated with mdast MDX JSX attribute nodes by the
|
|
2539
2539
|
* ecosystem.
|
|
2540
2540
|
*/
|
|
2541
|
-
interface MdxJsxAttributeData$1 extends Data$
|
|
2541
|
+
interface MdxJsxAttributeData$1 extends Data$7 {}
|
|
2542
2542
|
|
|
2543
2543
|
/**
|
|
2544
2544
|
* MDX JSX element node, occurring in flow (block).
|
|
@@ -2570,7 +2570,7 @@ interface MdxJsxFlowElement$1 extends Parent {
|
|
|
2570
2570
|
* Info associated with mdast MDX JSX element (flow) nodes by the
|
|
2571
2571
|
* ecosystem.
|
|
2572
2572
|
*/
|
|
2573
|
-
interface MdxJsxFlowElementData$1 extends Data$
|
|
2573
|
+
interface MdxJsxFlowElementData$1 extends Data$6 {}
|
|
2574
2574
|
|
|
2575
2575
|
/**
|
|
2576
2576
|
* MDX JSX element node, occurring in text (phrasing).
|
|
@@ -2602,7 +2602,7 @@ interface MdxJsxTextElement$1 extends Parent {
|
|
|
2602
2602
|
* Info associated with mdast MDX JSX element (text) nodes by the
|
|
2603
2603
|
* ecosystem.
|
|
2604
2604
|
*/
|
|
2605
|
-
interface MdxJsxTextElementData$1 extends Data$
|
|
2605
|
+
interface MdxJsxTextElementData$1 extends Data$6 {}
|
|
2606
2606
|
|
|
2607
2607
|
/**
|
|
2608
2608
|
* MDX JSX element node, occurring in flow (block), for hast.
|
|
@@ -2634,7 +2634,7 @@ interface MdxJsxFlowElementHast$1 extends Parent$1 {
|
|
|
2634
2634
|
* Info associated with hast MDX JSX element (flow) nodes by the
|
|
2635
2635
|
* ecosystem.
|
|
2636
2636
|
*/
|
|
2637
|
-
interface MdxJsxFlowElementHastData$1 extends Data$
|
|
2637
|
+
interface MdxJsxFlowElementHastData$1 extends Data$5 {}
|
|
2638
2638
|
|
|
2639
2639
|
/**
|
|
2640
2640
|
* MDX JSX element node, occurring in text (phrasing), for hast.
|
|
@@ -2666,7 +2666,7 @@ interface MdxJsxTextElementHast$1 extends Parent$1 {
|
|
|
2666
2666
|
* Info associated with hast MDX JSX element (text) nodes by the
|
|
2667
2667
|
* ecosystem.
|
|
2668
2668
|
*/
|
|
2669
|
-
interface MdxJsxTextElementHastData$1 extends Data$
|
|
2669
|
+
interface MdxJsxTextElementHastData$1 extends Data$5 {}
|
|
2670
2670
|
|
|
2671
2671
|
// Add nodes to mdast content.
|
|
2672
2672
|
declare module 'mdast' {
|
|
@@ -2850,7 +2850,7 @@ type ContentType = 'content' | 'document' | 'flow' | 'string' | 'text'
|
|
|
2850
2850
|
* The interface for the location in the document comes from unist `Point`:
|
|
2851
2851
|
* <https://github.com/syntax-tree/unist#point>
|
|
2852
2852
|
*/
|
|
2853
|
-
type Point
|
|
2853
|
+
type Point = {
|
|
2854
2854
|
/**
|
|
2855
2855
|
* Position in a string chunk (or `-1` when pointing to a numeric chunk).
|
|
2856
2856
|
*/
|
|
@@ -2916,12 +2916,12 @@ interface Token$2 {
|
|
|
2916
2916
|
/**
|
|
2917
2917
|
* Point where the token starts.
|
|
2918
2918
|
*/
|
|
2919
|
-
start: Point
|
|
2919
|
+
start: Point
|
|
2920
2920
|
|
|
2921
2921
|
/**
|
|
2922
2922
|
* Point where the token ends.
|
|
2923
2923
|
*/
|
|
2924
|
-
end: Point
|
|
2924
|
+
end: Point
|
|
2925
2925
|
|
|
2926
2926
|
/**
|
|
2927
2927
|
* The previous token in a list of linked tokens.
|
|
@@ -3428,7 +3428,7 @@ interface TokenizeContext {
|
|
|
3428
3428
|
* @returns
|
|
3429
3429
|
* Current point.
|
|
3430
3430
|
*/
|
|
3431
|
-
now: () => Point
|
|
3431
|
+
now: () => Point
|
|
3432
3432
|
|
|
3433
3433
|
/**
|
|
3434
3434
|
* Define a skip
|
|
@@ -3444,7 +3444,7 @@ interface TokenizeContext {
|
|
|
3444
3444
|
* @returns
|
|
3445
3445
|
* Nothing.
|
|
3446
3446
|
*/
|
|
3447
|
-
defineSkip: (point: Point
|
|
3447
|
+
defineSkip: (point: Point) => undefined
|
|
3448
3448
|
|
|
3449
3449
|
/**
|
|
3450
3450
|
* Write a slice of chunks.
|
|
@@ -3526,7 +3526,7 @@ type FullNormalizedExtension = {
|
|
|
3526
3526
|
* Context.
|
|
3527
3527
|
*/
|
|
3528
3528
|
type Create = (
|
|
3529
|
-
from?: Omit<Point
|
|
3529
|
+
from?: Omit<Point, '_bufferIndex' | '_index'> | undefined
|
|
3530
3530
|
) => TokenizeContext
|
|
3531
3531
|
|
|
3532
3532
|
/**
|
|
@@ -3761,7 +3761,7 @@ type Tag = {
|
|
|
3761
3761
|
* ^^^
|
|
3762
3762
|
* ```
|
|
3763
3763
|
*/
|
|
3764
|
-
interface MdxJsxAttributeValueExpression extends Node$
|
|
3764
|
+
interface MdxJsxAttributeValueExpression extends Node$3 {
|
|
3765
3765
|
/**
|
|
3766
3766
|
* Node type.
|
|
3767
3767
|
*/
|
|
@@ -3782,7 +3782,7 @@ interface MdxJsxAttributeValueExpression extends Node$4 {
|
|
|
3782
3782
|
* Info associated with mdast MDX JSX attribute value expression nodes by the
|
|
3783
3783
|
* ecosystem.
|
|
3784
3784
|
*/
|
|
3785
|
-
interface MdxJsxAttributeValueExpressionData extends Data$
|
|
3785
|
+
interface MdxJsxAttributeValueExpressionData extends Data$7 {
|
|
3786
3786
|
/**
|
|
3787
3787
|
* Program node from estree.
|
|
3788
3788
|
*/
|
|
@@ -3797,7 +3797,7 @@ interface MdxJsxAttributeValueExpressionData extends Data$9 {
|
|
|
3797
3797
|
* ^^^^^^
|
|
3798
3798
|
* ```
|
|
3799
3799
|
*/
|
|
3800
|
-
interface MdxJsxExpressionAttribute extends Node$
|
|
3800
|
+
interface MdxJsxExpressionAttribute extends Node$3 {
|
|
3801
3801
|
/**
|
|
3802
3802
|
* Node type.
|
|
3803
3803
|
*/
|
|
@@ -3818,7 +3818,7 @@ interface MdxJsxExpressionAttribute extends Node$4 {
|
|
|
3818
3818
|
* Info associated with mdast MDX JSX expression attribute nodes by the
|
|
3819
3819
|
* ecosystem.
|
|
3820
3820
|
*/
|
|
3821
|
-
interface MdxJsxExpressionAttributeData extends Data$
|
|
3821
|
+
interface MdxJsxExpressionAttributeData extends Data$7 {
|
|
3822
3822
|
/**
|
|
3823
3823
|
* Program node from estree.
|
|
3824
3824
|
*/
|
|
@@ -3833,7 +3833,7 @@ interface MdxJsxExpressionAttributeData extends Data$9 {
|
|
|
3833
3833
|
* ^^^^^
|
|
3834
3834
|
* ```
|
|
3835
3835
|
*/
|
|
3836
|
-
interface MdxJsxAttribute extends Node$
|
|
3836
|
+
interface MdxJsxAttribute extends Node$3 {
|
|
3837
3837
|
/**
|
|
3838
3838
|
* Node type.
|
|
3839
3839
|
*/
|
|
@@ -3856,7 +3856,7 @@ interface MdxJsxAttribute extends Node$4 {
|
|
|
3856
3856
|
* Info associated with mdast MDX JSX attribute nodes by the
|
|
3857
3857
|
* ecosystem.
|
|
3858
3858
|
*/
|
|
3859
|
-
interface MdxJsxAttributeData extends Data$
|
|
3859
|
+
interface MdxJsxAttributeData extends Data$7 {}
|
|
3860
3860
|
|
|
3861
3861
|
/**
|
|
3862
3862
|
* MDX JSX element node, occurring in flow (block).
|
|
@@ -3888,7 +3888,7 @@ interface MdxJsxFlowElement extends Parent {
|
|
|
3888
3888
|
* Info associated with mdast MDX JSX element (flow) nodes by the
|
|
3889
3889
|
* ecosystem.
|
|
3890
3890
|
*/
|
|
3891
|
-
interface MdxJsxFlowElementData extends Data$
|
|
3891
|
+
interface MdxJsxFlowElementData extends Data$6 {}
|
|
3892
3892
|
|
|
3893
3893
|
/**
|
|
3894
3894
|
* MDX JSX element node, occurring in text (phrasing).
|
|
@@ -3920,7 +3920,7 @@ interface MdxJsxTextElement extends Parent {
|
|
|
3920
3920
|
* Info associated with mdast MDX JSX element (text) nodes by the
|
|
3921
3921
|
* ecosystem.
|
|
3922
3922
|
*/
|
|
3923
|
-
interface MdxJsxTextElementData extends Data$
|
|
3923
|
+
interface MdxJsxTextElementData extends Data$6 {}
|
|
3924
3924
|
|
|
3925
3925
|
/**
|
|
3926
3926
|
* MDX JSX element node, occurring in flow (block), for hast.
|
|
@@ -3952,7 +3952,7 @@ interface MdxJsxFlowElementHast extends Parent$1 {
|
|
|
3952
3952
|
* Info associated with hast MDX JSX element (flow) nodes by the
|
|
3953
3953
|
* ecosystem.
|
|
3954
3954
|
*/
|
|
3955
|
-
interface MdxJsxFlowElementHastData extends Data$
|
|
3955
|
+
interface MdxJsxFlowElementHastData extends Data$5 {}
|
|
3956
3956
|
|
|
3957
3957
|
/**
|
|
3958
3958
|
* MDX JSX element node, occurring in text (phrasing), for hast.
|
|
@@ -3984,7 +3984,7 @@ interface MdxJsxTextElementHast extends Parent$1 {
|
|
|
3984
3984
|
* Info associated with hast MDX JSX element (text) nodes by the
|
|
3985
3985
|
* ecosystem.
|
|
3986
3986
|
*/
|
|
3987
|
-
interface MdxJsxTextElementHastData extends Data$
|
|
3987
|
+
interface MdxJsxTextElementHastData extends Data$5 {}
|
|
3988
3988
|
|
|
3989
3989
|
// Add nodes to mdast content.
|
|
3990
3990
|
declare module 'mdast' {
|
|
@@ -4112,7 +4112,7 @@ interface MdxFlowExpression$1 extends Literal$1 {
|
|
|
4112
4112
|
/**
|
|
4113
4113
|
* Info associated with mdast MDX expression (flow) nodes by the ecosystem.
|
|
4114
4114
|
*/
|
|
4115
|
-
interface MdxFlowExpressionData$1 extends Data$
|
|
4115
|
+
interface MdxFlowExpressionData$1 extends Data$6 {
|
|
4116
4116
|
/**
|
|
4117
4117
|
* Program node from estree.
|
|
4118
4118
|
*/
|
|
@@ -4137,7 +4137,7 @@ interface MdxTextExpression$1 extends Literal$1 {
|
|
|
4137
4137
|
/**
|
|
4138
4138
|
* Info associated with mdast MDX expression (text) nodes by the ecosystem.
|
|
4139
4139
|
*/
|
|
4140
|
-
interface MdxTextExpressionData$1 extends Data$
|
|
4140
|
+
interface MdxTextExpressionData$1 extends Data$6 {
|
|
4141
4141
|
/**
|
|
4142
4142
|
* Program node from estree.
|
|
4143
4143
|
*/
|
|
@@ -4162,7 +4162,7 @@ interface MdxFlowExpressionHast$1 extends Literal {
|
|
|
4162
4162
|
/**
|
|
4163
4163
|
* Info associated with hast MDX expression (flow) nodes by the ecosystem.
|
|
4164
4164
|
*/
|
|
4165
|
-
interface MdxFlowExpressionHastData$1 extends Data$
|
|
4165
|
+
interface MdxFlowExpressionHastData$1 extends Data$5 {
|
|
4166
4166
|
/**
|
|
4167
4167
|
* Program node from estree.
|
|
4168
4168
|
*/
|
|
@@ -4187,7 +4187,7 @@ interface MdxTextExpressionHast$1 extends Literal {
|
|
|
4187
4187
|
/**
|
|
4188
4188
|
* Info associated with hast MDX expression (text) nodes by the ecosystem.
|
|
4189
4189
|
*/
|
|
4190
|
-
interface MdxTextExpressionHastData$1 extends Data$
|
|
4190
|
+
interface MdxTextExpressionHastData$1 extends Data$5 {
|
|
4191
4191
|
/**
|
|
4192
4192
|
* Program node from estree.
|
|
4193
4193
|
*/
|
|
@@ -4265,7 +4265,7 @@ interface MdxFlowExpression extends Literal$1 {
|
|
|
4265
4265
|
/**
|
|
4266
4266
|
* Info associated with mdast MDX expression (flow) nodes by the ecosystem.
|
|
4267
4267
|
*/
|
|
4268
|
-
interface MdxFlowExpressionData extends Data$
|
|
4268
|
+
interface MdxFlowExpressionData extends Data$6 {
|
|
4269
4269
|
/**
|
|
4270
4270
|
* Program node from estree.
|
|
4271
4271
|
*/
|
|
@@ -4290,7 +4290,7 @@ interface MdxTextExpression extends Literal$1 {
|
|
|
4290
4290
|
/**
|
|
4291
4291
|
* Info associated with mdast MDX expression (text) nodes by the ecosystem.
|
|
4292
4292
|
*/
|
|
4293
|
-
interface MdxTextExpressionData extends Data$
|
|
4293
|
+
interface MdxTextExpressionData extends Data$6 {
|
|
4294
4294
|
/**
|
|
4295
4295
|
* Program node from estree.
|
|
4296
4296
|
*/
|
|
@@ -4315,7 +4315,7 @@ interface MdxFlowExpressionHast extends Literal {
|
|
|
4315
4315
|
/**
|
|
4316
4316
|
* Info associated with hast MDX expression (flow) nodes by the ecosystem.
|
|
4317
4317
|
*/
|
|
4318
|
-
interface MdxFlowExpressionHastData extends Data$
|
|
4318
|
+
interface MdxFlowExpressionHastData extends Data$5 {
|
|
4319
4319
|
/**
|
|
4320
4320
|
* Program node from estree.
|
|
4321
4321
|
*/
|
|
@@ -4340,7 +4340,7 @@ interface MdxTextExpressionHast extends Literal {
|
|
|
4340
4340
|
/**
|
|
4341
4341
|
* Info associated with hast MDX expression (text) nodes by the ecosystem.
|
|
4342
4342
|
*/
|
|
4343
|
-
interface MdxTextExpressionHastData extends Data$
|
|
4343
|
+
interface MdxTextExpressionHastData extends Data$5 {
|
|
4344
4344
|
/**
|
|
4345
4345
|
* Program node from estree.
|
|
4346
4346
|
*/
|
|
@@ -4418,7 +4418,7 @@ interface MdxjsEsm$1 extends Literal$1 {
|
|
|
4418
4418
|
/**
|
|
4419
4419
|
* Info associated with mdast MDX.js ESM nodes by the ecosystem.
|
|
4420
4420
|
*/
|
|
4421
|
-
interface MdxjsEsmData$1 extends Data$
|
|
4421
|
+
interface MdxjsEsmData$1 extends Data$6 {
|
|
4422
4422
|
/**
|
|
4423
4423
|
* Program node from estree.
|
|
4424
4424
|
*/
|
|
@@ -4443,7 +4443,7 @@ interface MdxjsEsmHast$1 extends Literal {
|
|
|
4443
4443
|
/**
|
|
4444
4444
|
* Info associated with hast MDX.js ESM nodes by the ecosystem.
|
|
4445
4445
|
*/
|
|
4446
|
-
interface MdxjsEsmHastData$1 extends Data$
|
|
4446
|
+
interface MdxjsEsmHastData$1 extends Data$5 {
|
|
4447
4447
|
/**
|
|
4448
4448
|
* Program node from estree.
|
|
4449
4449
|
*/
|
|
@@ -4495,7 +4495,7 @@ interface MdxjsEsm extends Literal$1 {
|
|
|
4495
4495
|
/**
|
|
4496
4496
|
* Info associated with mdast MDX.js ESM nodes by the ecosystem.
|
|
4497
4497
|
*/
|
|
4498
|
-
interface MdxjsEsmData extends Data$
|
|
4498
|
+
interface MdxjsEsmData extends Data$6 {
|
|
4499
4499
|
/**
|
|
4500
4500
|
* Program node from estree.
|
|
4501
4501
|
*/
|
|
@@ -4520,7 +4520,7 @@ interface MdxjsEsmHast extends Literal {
|
|
|
4520
4520
|
/**
|
|
4521
4521
|
* Info associated with hast MDX.js ESM nodes by the ecosystem.
|
|
4522
4522
|
*/
|
|
4523
|
-
interface MdxjsEsmHastData extends Data$
|
|
4523
|
+
interface MdxjsEsmHastData extends Data$5 {
|
|
4524
4524
|
/**
|
|
4525
4525
|
* Program node from estree.
|
|
4526
4526
|
*/
|
|
@@ -4559,7 +4559,7 @@ type StylePropertyNameCase$1 = StylePropertyNameCase$2;
|
|
|
4559
4559
|
|
|
4560
4560
|
type ElementAttributeNameCase = ElementAttributeNameCase$1;
|
|
4561
4561
|
type StylePropertyNameCase = StylePropertyNameCase$1;
|
|
4562
|
-
type RemarkRehypeOptions = Options
|
|
4562
|
+
type RemarkRehypeOptions = Options;
|
|
4563
4563
|
type SourceMapGenerator = typeof SourceMapGenerator$1;
|
|
4564
4564
|
/**
|
|
4565
4565
|
* Configuration for `createProcessor`.
|
|
@@ -4720,414 +4720,6 @@ type ProcessorOptions$1 = {
|
|
|
4720
4720
|
tableCellAlignToStyle?: boolean | null | undefined;
|
|
4721
4721
|
};
|
|
4722
4722
|
|
|
4723
|
-
/**
|
|
4724
|
-
* Contents of the file.
|
|
4725
|
-
*
|
|
4726
|
-
* Can either be text or a `Uint8Array` structure.
|
|
4727
|
-
*/
|
|
4728
|
-
type Value$1 = Uint8Array | string
|
|
4729
|
-
|
|
4730
|
-
/**
|
|
4731
|
-
* This map registers the type of the `data` key of a `VFile`.
|
|
4732
|
-
*
|
|
4733
|
-
* This type can be augmented to register custom `data` types.
|
|
4734
|
-
*
|
|
4735
|
-
* @example
|
|
4736
|
-
* declare module 'vfile' {
|
|
4737
|
-
* interface DataMap {
|
|
4738
|
-
* // `file.data.name` is typed as `string`
|
|
4739
|
-
* name: string
|
|
4740
|
-
* }
|
|
4741
|
-
* }
|
|
4742
|
-
*/
|
|
4743
|
-
|
|
4744
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions, @typescript-eslint/no-empty-interface
|
|
4745
|
-
interface DataMap {}
|
|
4746
|
-
|
|
4747
|
-
/**
|
|
4748
|
-
* Custom information.
|
|
4749
|
-
*
|
|
4750
|
-
* Known attributes can be added to @see {@link DataMap}
|
|
4751
|
-
*/
|
|
4752
|
-
type Data$1 = Record<string, unknown> & Partial<DataMap>
|
|
4753
|
-
|
|
4754
|
-
declare class VFile$1 {
|
|
4755
|
-
/**
|
|
4756
|
-
* Create a new virtual file.
|
|
4757
|
-
*
|
|
4758
|
-
* `options` is treated as:
|
|
4759
|
-
*
|
|
4760
|
-
* * `string` or `Uint8Array` — `{value: options}`
|
|
4761
|
-
* * `URL` — `{path: options}`
|
|
4762
|
-
* * `VFile` — shallow copies its data over to the new file
|
|
4763
|
-
* * `object` — all fields are shallow copied over to the new file
|
|
4764
|
-
*
|
|
4765
|
-
* Path related fields are set in the following order (least specific to
|
|
4766
|
-
* most specific): `history`, `path`, `basename`, `stem`, `extname`,
|
|
4767
|
-
* `dirname`.
|
|
4768
|
-
*
|
|
4769
|
-
* You cannot set `dirname` or `extname` without setting either `history`,
|
|
4770
|
-
* `path`, `basename`, or `stem` too.
|
|
4771
|
-
*
|
|
4772
|
-
* @param {Compatible | null | undefined} [value]
|
|
4773
|
-
* File value.
|
|
4774
|
-
* @returns
|
|
4775
|
-
* New instance.
|
|
4776
|
-
*/
|
|
4777
|
-
constructor(value?: Compatible$1 | null | undefined)
|
|
4778
|
-
/**
|
|
4779
|
-
* Base of `path` (default: `process.cwd()` or `'/'` in browsers).
|
|
4780
|
-
*
|
|
4781
|
-
* @type {string}
|
|
4782
|
-
*/
|
|
4783
|
-
cwd: string
|
|
4784
|
-
/**
|
|
4785
|
-
* Place to store custom info (default: `{}`).
|
|
4786
|
-
*
|
|
4787
|
-
* It’s OK to store custom data directly on the file but moving it to
|
|
4788
|
-
* `data` is recommended.
|
|
4789
|
-
*
|
|
4790
|
-
* @type {Data}
|
|
4791
|
-
*/
|
|
4792
|
-
data: Data
|
|
4793
|
-
/**
|
|
4794
|
-
* List of file paths the file moved between.
|
|
4795
|
-
*
|
|
4796
|
-
* The first is the original path and the last is the current path.
|
|
4797
|
-
*
|
|
4798
|
-
* @type {Array<string>}
|
|
4799
|
-
*/
|
|
4800
|
-
history: Array<string>
|
|
4801
|
-
/**
|
|
4802
|
-
* List of messages associated with the file.
|
|
4803
|
-
*
|
|
4804
|
-
* @type {Array<VFileMessage>}
|
|
4805
|
-
*/
|
|
4806
|
-
messages: Array<VFileMessage>
|
|
4807
|
-
/**
|
|
4808
|
-
* Raw value.
|
|
4809
|
-
*
|
|
4810
|
-
* @type {Value}
|
|
4811
|
-
*/
|
|
4812
|
-
value: Value
|
|
4813
|
-
/**
|
|
4814
|
-
* Source map.
|
|
4815
|
-
*
|
|
4816
|
-
* This type is equivalent to the `RawSourceMap` type from the `source-map`
|
|
4817
|
-
* module.
|
|
4818
|
-
*
|
|
4819
|
-
* @type {Map | null | undefined}
|
|
4820
|
-
*/
|
|
4821
|
-
map: Map$1 | null | undefined
|
|
4822
|
-
/**
|
|
4823
|
-
* Custom, non-string, compiled, representation.
|
|
4824
|
-
*
|
|
4825
|
-
* This is used by unified to store non-string results.
|
|
4826
|
-
* One example is when turning markdown into React nodes.
|
|
4827
|
-
*
|
|
4828
|
-
* @type {unknown}
|
|
4829
|
-
*/
|
|
4830
|
-
result: unknown
|
|
4831
|
-
/**
|
|
4832
|
-
* Whether a file was saved to disk.
|
|
4833
|
-
*
|
|
4834
|
-
* This is used by vfile reporters.
|
|
4835
|
-
*
|
|
4836
|
-
* @type {boolean}
|
|
4837
|
-
*/
|
|
4838
|
-
stored: boolean
|
|
4839
|
-
/**
|
|
4840
|
-
* Set basename (including extname) (`'index.min.js'`).
|
|
4841
|
-
*
|
|
4842
|
-
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
4843
|
-
* on windows).
|
|
4844
|
-
* Cannot be nullified (use `file.path = file.dirname` instead).
|
|
4845
|
-
*
|
|
4846
|
-
* @param {string} basename
|
|
4847
|
-
* Basename.
|
|
4848
|
-
* @returns {undefined}
|
|
4849
|
-
* Nothing.
|
|
4850
|
-
*/
|
|
4851
|
-
set basename(arg: string | undefined)
|
|
4852
|
-
/**
|
|
4853
|
-
* Get the basename (including extname) (example: `'index.min.js'`).
|
|
4854
|
-
*
|
|
4855
|
-
* @returns {string | undefined}
|
|
4856
|
-
* Basename.
|
|
4857
|
-
*/
|
|
4858
|
-
get basename(): string | undefined
|
|
4859
|
-
/**
|
|
4860
|
-
* Set the full path (example: `'~/index.min.js'`).
|
|
4861
|
-
*
|
|
4862
|
-
* Cannot be nullified.
|
|
4863
|
-
* You can set a file URL (a `URL` object with a `file:` protocol) which will
|
|
4864
|
-
* be turned into a path with `url.fileURLToPath`.
|
|
4865
|
-
*
|
|
4866
|
-
* @param {URL | string} path
|
|
4867
|
-
* Path.
|
|
4868
|
-
* @returns {undefined}
|
|
4869
|
-
* Nothing.
|
|
4870
|
-
*/
|
|
4871
|
-
set path(arg: string)
|
|
4872
|
-
/**
|
|
4873
|
-
* Get the full path (example: `'~/index.min.js'`).
|
|
4874
|
-
*
|
|
4875
|
-
* @returns {string}
|
|
4876
|
-
* Path.
|
|
4877
|
-
*/
|
|
4878
|
-
get path(): string
|
|
4879
|
-
/**
|
|
4880
|
-
* Set the parent path (example: `'~'`).
|
|
4881
|
-
*
|
|
4882
|
-
* Cannot be set if there’s no `path` yet.
|
|
4883
|
-
*
|
|
4884
|
-
* @param {string | undefined} dirname
|
|
4885
|
-
* Dirname.
|
|
4886
|
-
* @returns {undefined}
|
|
4887
|
-
* Nothing.
|
|
4888
|
-
*/
|
|
4889
|
-
set dirname(arg: string | undefined)
|
|
4890
|
-
/**
|
|
4891
|
-
* Get the parent path (example: `'~'`).
|
|
4892
|
-
*
|
|
4893
|
-
* @returns {string | undefined}
|
|
4894
|
-
* Dirname.
|
|
4895
|
-
*/
|
|
4896
|
-
get dirname(): string | undefined
|
|
4897
|
-
/**
|
|
4898
|
-
* Set the extname (including dot) (example: `'.js'`).
|
|
4899
|
-
*
|
|
4900
|
-
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
4901
|
-
* on windows).
|
|
4902
|
-
* Cannot be set if there’s no `path` yet.
|
|
4903
|
-
*
|
|
4904
|
-
* @param {string | undefined} extname
|
|
4905
|
-
* Extname.
|
|
4906
|
-
* @returns {undefined}
|
|
4907
|
-
* Nothing.
|
|
4908
|
-
*/
|
|
4909
|
-
set extname(arg: string | undefined)
|
|
4910
|
-
/**
|
|
4911
|
-
* Get the extname (including dot) (example: `'.js'`).
|
|
4912
|
-
*
|
|
4913
|
-
* @returns {string | undefined}
|
|
4914
|
-
* Extname.
|
|
4915
|
-
*/
|
|
4916
|
-
get extname(): string | undefined
|
|
4917
|
-
/**
|
|
4918
|
-
* Set the stem (basename w/o extname) (example: `'index.min'`).
|
|
4919
|
-
*
|
|
4920
|
-
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
4921
|
-
* on windows).
|
|
4922
|
-
* Cannot be nullified (use `file.path = file.dirname` instead).
|
|
4923
|
-
*
|
|
4924
|
-
* @param {string} stem
|
|
4925
|
-
* Stem.
|
|
4926
|
-
* @returns {undefined}
|
|
4927
|
-
* Nothing.
|
|
4928
|
-
*/
|
|
4929
|
-
set stem(arg: string | undefined)
|
|
4930
|
-
/**
|
|
4931
|
-
* Get the stem (basename w/o extname) (example: `'index.min'`).
|
|
4932
|
-
*
|
|
4933
|
-
* @returns {string | undefined}
|
|
4934
|
-
* Stem.
|
|
4935
|
-
*/
|
|
4936
|
-
get stem(): string | undefined
|
|
4937
|
-
fail(reason: string, options?: MessageOptions | null | undefined): never
|
|
4938
|
-
fail(
|
|
4939
|
-
reason: string,
|
|
4940
|
-
parent: Node | NodeLike | null | undefined,
|
|
4941
|
-
origin?: string | null | undefined
|
|
4942
|
-
): never
|
|
4943
|
-
fail(
|
|
4944
|
-
reason: string,
|
|
4945
|
-
place: Point | Position | null | undefined,
|
|
4946
|
-
origin?: string | null | undefined
|
|
4947
|
-
): never
|
|
4948
|
-
fail(reason: string, origin?: string | null | undefined): never
|
|
4949
|
-
fail(
|
|
4950
|
-
cause: Error | VFileMessage,
|
|
4951
|
-
parent: Node | NodeLike | null | undefined,
|
|
4952
|
-
origin?: string | null | undefined
|
|
4953
|
-
): never
|
|
4954
|
-
fail(
|
|
4955
|
-
cause: Error | VFileMessage,
|
|
4956
|
-
place: Point | Position | null | undefined,
|
|
4957
|
-
origin?: string | null | undefined
|
|
4958
|
-
): never
|
|
4959
|
-
fail(cause: Error | VFileMessage, origin?: string | null | undefined): never
|
|
4960
|
-
info(
|
|
4961
|
-
reason: string,
|
|
4962
|
-
options?: MessageOptions | null | undefined
|
|
4963
|
-
): VFileMessage
|
|
4964
|
-
info(
|
|
4965
|
-
reason: string,
|
|
4966
|
-
parent: Node | NodeLike | null | undefined,
|
|
4967
|
-
origin?: string | null | undefined
|
|
4968
|
-
): VFileMessage
|
|
4969
|
-
info(
|
|
4970
|
-
reason: string,
|
|
4971
|
-
place: Point | Position | null | undefined,
|
|
4972
|
-
origin?: string | null | undefined
|
|
4973
|
-
): VFileMessage
|
|
4974
|
-
info(reason: string, origin?: string | null | undefined): VFileMessage
|
|
4975
|
-
info(
|
|
4976
|
-
cause: Error | VFileMessage,
|
|
4977
|
-
parent: Node | NodeLike | null | undefined,
|
|
4978
|
-
origin?: string | null | undefined
|
|
4979
|
-
): VFileMessage
|
|
4980
|
-
info(
|
|
4981
|
-
cause: Error | VFileMessage,
|
|
4982
|
-
place: Point | Position | null | undefined,
|
|
4983
|
-
origin?: string | null | undefined
|
|
4984
|
-
): VFileMessage
|
|
4985
|
-
info(
|
|
4986
|
-
cause: Error | VFileMessage,
|
|
4987
|
-
origin?: string | null | undefined
|
|
4988
|
-
): VFileMessage
|
|
4989
|
-
message(
|
|
4990
|
-
reason: string,
|
|
4991
|
-
options?: MessageOptions | null | undefined
|
|
4992
|
-
): VFileMessage
|
|
4993
|
-
message(
|
|
4994
|
-
reason: string,
|
|
4995
|
-
parent: Node | NodeLike | null | undefined,
|
|
4996
|
-
origin?: string | null | undefined
|
|
4997
|
-
): VFileMessage
|
|
4998
|
-
message(
|
|
4999
|
-
reason: string,
|
|
5000
|
-
place: Point | Position | null | undefined,
|
|
5001
|
-
origin?: string | null | undefined
|
|
5002
|
-
): VFileMessage
|
|
5003
|
-
message(reason: string, origin?: string | null | undefined): VFileMessage
|
|
5004
|
-
message(
|
|
5005
|
-
cause: Error | VFileMessage,
|
|
5006
|
-
parent: Node | NodeLike | null | undefined,
|
|
5007
|
-
origin?: string | null | undefined
|
|
5008
|
-
): VFileMessage
|
|
5009
|
-
message(
|
|
5010
|
-
cause: Error | VFileMessage,
|
|
5011
|
-
place: Point | Position | null | undefined,
|
|
5012
|
-
origin?: string | null | undefined
|
|
5013
|
-
): VFileMessage
|
|
5014
|
-
message(
|
|
5015
|
-
cause: Error | VFileMessage,
|
|
5016
|
-
origin?: string | null | undefined
|
|
5017
|
-
): VFileMessage
|
|
5018
|
-
/**
|
|
5019
|
-
* Serialize the file.
|
|
5020
|
-
*
|
|
5021
|
-
* > **Note**: which encodings are supported depends on the engine.
|
|
5022
|
-
* > For info on Node.js, see:
|
|
5023
|
-
* > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.
|
|
5024
|
-
*
|
|
5025
|
-
* @param {string | null | undefined} [encoding='utf8']
|
|
5026
|
-
* Character encoding to understand `value` as when it’s a `Uint8Array`
|
|
5027
|
-
* (default: `'utf-8'`).
|
|
5028
|
-
* @returns {string}
|
|
5029
|
-
* Serialized file.
|
|
5030
|
-
*/
|
|
5031
|
-
toString(encoding?: string | null | undefined): string
|
|
5032
|
-
}
|
|
5033
|
-
type Node = unist.Node
|
|
5034
|
-
type Point = unist.Point
|
|
5035
|
-
type Position = unist.Position
|
|
5036
|
-
type MessageOptions = Options$5
|
|
5037
|
-
type Data = Data$1
|
|
5038
|
-
type Value = Value$1
|
|
5039
|
-
type NodeLike = object & {
|
|
5040
|
-
type: string
|
|
5041
|
-
position?: Position | undefined
|
|
5042
|
-
}
|
|
5043
|
-
/**
|
|
5044
|
-
* Things that can be passed to the constructor.
|
|
5045
|
-
*/
|
|
5046
|
-
type Compatible$1 = Options | URL | VFile$1 | Value
|
|
5047
|
-
/**
|
|
5048
|
-
* Set multiple values.
|
|
5049
|
-
*/
|
|
5050
|
-
type VFileCoreOptions = {
|
|
5051
|
-
/**
|
|
5052
|
-
* Set `basename` (name).
|
|
5053
|
-
*/
|
|
5054
|
-
basename?: string | null | undefined
|
|
5055
|
-
/**
|
|
5056
|
-
* Set `cwd` (working directory).
|
|
5057
|
-
*/
|
|
5058
|
-
cwd?: string | null | undefined
|
|
5059
|
-
/**
|
|
5060
|
-
* Set `data` (associated info).
|
|
5061
|
-
*/
|
|
5062
|
-
data?: Data | null | undefined
|
|
5063
|
-
/**
|
|
5064
|
-
* Set `dirname` (path w/o basename).
|
|
5065
|
-
*/
|
|
5066
|
-
dirname?: string | null | undefined
|
|
5067
|
-
/**
|
|
5068
|
-
* Set `extname` (extension with dot).
|
|
5069
|
-
*/
|
|
5070
|
-
extname?: string | null | undefined
|
|
5071
|
-
/**
|
|
5072
|
-
* Set `history` (paths the file moved between).
|
|
5073
|
-
*/
|
|
5074
|
-
history?: Array<string> | null | undefined
|
|
5075
|
-
/**
|
|
5076
|
-
* Set `path` (current path).
|
|
5077
|
-
*/
|
|
5078
|
-
path?: URL | string | null | undefined
|
|
5079
|
-
/**
|
|
5080
|
-
* Set `stem` (name without extension).
|
|
5081
|
-
*/
|
|
5082
|
-
stem?: string | null | undefined
|
|
5083
|
-
/**
|
|
5084
|
-
* Set `value` (the contents of the file).
|
|
5085
|
-
*/
|
|
5086
|
-
value?: Value | null | undefined
|
|
5087
|
-
}
|
|
5088
|
-
/**
|
|
5089
|
-
* Raw source map.
|
|
5090
|
-
*
|
|
5091
|
-
* See:
|
|
5092
|
-
* <https://github.com/mozilla/source-map/blob/60adcb0/source-map.d.ts#L15-L23>.
|
|
5093
|
-
*/
|
|
5094
|
-
type Map$1 = {
|
|
5095
|
-
/**
|
|
5096
|
-
* Which version of the source map spec this map is following.
|
|
5097
|
-
*/
|
|
5098
|
-
version: number
|
|
5099
|
-
/**
|
|
5100
|
-
* An array of URLs to the original source files.
|
|
5101
|
-
*/
|
|
5102
|
-
sources: Array<string>
|
|
5103
|
-
/**
|
|
5104
|
-
* An array of identifiers which can be referenced by individual mappings.
|
|
5105
|
-
*/
|
|
5106
|
-
names: Array<string>
|
|
5107
|
-
/**
|
|
5108
|
-
* The URL root from which all sources are relative.
|
|
5109
|
-
*/
|
|
5110
|
-
sourceRoot?: string | undefined
|
|
5111
|
-
/**
|
|
5112
|
-
* An array of contents of the original source files.
|
|
5113
|
-
*/
|
|
5114
|
-
sourcesContent?: Array<string> | undefined
|
|
5115
|
-
/**
|
|
5116
|
-
* A string of base64 VLQs which contain the actual mappings.
|
|
5117
|
-
*/
|
|
5118
|
-
mappings: string
|
|
5119
|
-
/**
|
|
5120
|
-
* The generated file this source map is associated with.
|
|
5121
|
-
*/
|
|
5122
|
-
file: string
|
|
5123
|
-
}
|
|
5124
|
-
/**
|
|
5125
|
-
* Configuration.
|
|
5126
|
-
*
|
|
5127
|
-
* A bunch of keys that will be shallow copied over to the new file.
|
|
5128
|
-
*/
|
|
5129
|
-
type Options = Record<string, unknown> & VFileCoreOptions
|
|
5130
|
-
|
|
5131
4723
|
/**
|
|
5132
4724
|
* Compile MDX to JS.
|
|
5133
4725
|
*
|
|
@@ -5140,7 +4732,7 @@ type Options = Record<string, unknown> & VFileCoreOptions
|
|
|
5140
4732
|
*/
|
|
5141
4733
|
declare function compile(vfileCompatible: Readonly<Compatible>, compileOptions?: Readonly<CompileOptions$1> | null | undefined): Promise<VFile>;
|
|
5142
4734
|
type VFile = VFile$1;
|
|
5143
|
-
type Compatible = Compatible$
|
|
4735
|
+
type Compatible = Compatible$2;
|
|
5144
4736
|
type ProcessorOptions = ProcessorOptions$1;
|
|
5145
4737
|
/**
|
|
5146
4738
|
* Core configuration.
|