@storybook/addon-docs 8.0.0-alpha.8 → 8.0.0-beta.0

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.
@@ -50,7 +50,7 @@ declare class VFileMessage extends Error {
50
50
  )
51
51
  constructor(
52
52
  reason: string,
53
- place: Point$3 | Position$2 | null | undefined,
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)
@@ -61,7 +61,7 @@ declare class VFileMessage extends Error {
61
61
  )
62
62
  constructor(
63
63
  cause: Error | VFileMessage,
64
- place: Point$3 | Position$2 | null | undefined,
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)
@@ -104,7 +104,7 @@ declare class VFileMessage extends Error {
104
104
  *
105
105
  * @type {Point | Position | undefined}
106
106
  */
107
- place: Point$3 | Position$2 | undefined
107
+ place: Point$2 | Position$2 | undefined
108
108
  /**
109
109
  * Reason for message, should use markdown.
110
110
  *
@@ -153,7 +153,7 @@ declare class VFileMessage extends Error {
153
153
  url: string | undefined
154
154
  }
155
155
  type Node$2 = unist.Node
156
- type Point$3 = unist.Point
156
+ type Point$2 = unist.Point
157
157
  type Position$2 = unist.Position
158
158
  type NodeLike$1 = object & {
159
159
  type: string
@@ -174,7 +174,7 @@ type Options$5 = {
174
174
  /**
175
175
  * Place of message (optional).
176
176
  */
177
- place?: Point$3 | Position$2 | null | undefined
177
+ place?: Point$2 | Position$2 | null | undefined
178
178
  /**
179
179
  * Category of message (optional, example: `'my-rule'`).
180
180
  */
@@ -378,7 +378,7 @@ declare class VFile$1 {
378
378
  ): never
379
379
  fail(
380
380
  reason: string,
381
- place: Point$2 | Position$1 | null | undefined,
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
@@ -389,7 +389,7 @@ declare class VFile$1 {
389
389
  ): never
390
390
  fail(
391
391
  cause: Error | VFileMessage,
392
- place: Point$2 | Position$1 | null | undefined,
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
@@ -404,7 +404,7 @@ declare class VFile$1 {
404
404
  ): VFileMessage
405
405
  info(
406
406
  reason: string,
407
- place: Point$2 | Position$1 | null | undefined,
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
@@ -415,7 +415,7 @@ declare class VFile$1 {
415
415
  ): VFileMessage
416
416
  info(
417
417
  cause: Error | VFileMessage,
418
- place: Point$2 | Position$1 | null | undefined,
418
+ place: Point$1 | Position$1 | null | undefined,
419
419
  origin?: string | null | undefined
420
420
  ): VFileMessage
421
421
  info(
@@ -433,7 +433,7 @@ declare class VFile$1 {
433
433
  ): VFileMessage
434
434
  message(
435
435
  reason: string,
436
- place: Point$2 | Position$1 | null | undefined,
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
@@ -444,7 +444,7 @@ declare class VFile$1 {
444
444
  ): VFileMessage
445
445
  message(
446
446
  cause: Error | VFileMessage,
447
- place: Point$2 | Position$1 | null | undefined,
447
+ place: Point$1 | Position$1 | null | undefined,
448
448
  origin?: string | null | undefined
449
449
  ): VFileMessage
450
450
  message(
@@ -467,7 +467,7 @@ declare class VFile$1 {
467
467
  toString(encoding?: string | null | undefined): string
468
468
  }
469
469
  type Node$1 = unist.Node
470
- type Point$2 = unist.Point
470
+ type Point$1 = unist.Point
471
471
  type Position$1 = unist.Position
472
472
  type MessageOptions = Options$4
473
473
  type Data$3 = Data$4
@@ -2057,7 +2057,7 @@ type FootnoteBackLabelTemplate$1 = FootnoteBackLabelTemplate;
2057
2057
  /**
2058
2058
  * Handle a node.
2059
2059
  */
2060
- type Handler = (state: State$2, node: any, parent: MdastParents | undefined) => Array<HastElementContent> | HastElementContent | undefined;
2060
+ type Handler = (state: State$1, node: any, parent: MdastParents | undefined) => Array<HastElementContent> | HastElementContent | undefined;
2061
2061
  /**
2062
2062
  * Handle nodes.
2063
2063
  */
@@ -2199,7 +2199,7 @@ type Options$2 = {
2199
2199
  /**
2200
2200
  * Info passed around.
2201
2201
  */
2202
- type State$2 = {
2202
+ type State$1 = {
2203
2203
  /**
2204
2204
  * Transform the children of an mdast parent to hast.
2205
2205
  */
@@ -2443,7 +2443,7 @@ type Options = Options$1;
2443
2443
  * ^^^
2444
2444
  * ```
2445
2445
  */
2446
- interface MdxJsxAttributeValueExpression$3 extends Node$3 {
2446
+ interface MdxJsxAttributeValueExpression$1 extends Node$3 {
2447
2447
  /**
2448
2448
  * Node type.
2449
2449
  */
@@ -2457,14 +2457,14 @@ interface MdxJsxAttributeValueExpression$3 extends Node$3 {
2457
2457
  /**
2458
2458
  * Data associated with the mdast MDX JSX attribute value expression.
2459
2459
  */
2460
- data?: MdxJsxAttributeValueExpressionData$3 | undefined
2460
+ data?: MdxJsxAttributeValueExpressionData$1 | undefined
2461
2461
  }
2462
2462
 
2463
2463
  /**
2464
2464
  * Info associated with mdast MDX JSX attribute value expression nodes by the
2465
2465
  * ecosystem.
2466
2466
  */
2467
- interface MdxJsxAttributeValueExpressionData$3 extends Data$7 {
2467
+ interface MdxJsxAttributeValueExpressionData$1 extends Data$7 {
2468
2468
  /**
2469
2469
  * Program node from estree.
2470
2470
  */
@@ -2479,7 +2479,7 @@ interface MdxJsxAttributeValueExpressionData$3 extends Data$7 {
2479
2479
  * ^^^^^^
2480
2480
  * ```
2481
2481
  */
2482
- interface MdxJsxExpressionAttribute$5 extends Node$3 {
2482
+ interface MdxJsxExpressionAttribute$2 extends Node$3 {
2483
2483
  /**
2484
2484
  * Node type.
2485
2485
  */
@@ -2493,14 +2493,14 @@ interface MdxJsxExpressionAttribute$5 extends Node$3 {
2493
2493
  /**
2494
2494
  * Data associated with the mdast MDX JSX expression attributes.
2495
2495
  */
2496
- data?: MdxJsxExpressionAttributeData$3 | undefined
2496
+ data?: MdxJsxExpressionAttributeData$1 | undefined
2497
2497
  }
2498
2498
 
2499
2499
  /**
2500
2500
  * Info associated with mdast MDX JSX expression attribute nodes by the
2501
2501
  * ecosystem.
2502
2502
  */
2503
- interface MdxJsxExpressionAttributeData$3 extends Data$7 {
2503
+ interface MdxJsxExpressionAttributeData$1 extends Data$7 {
2504
2504
  /**
2505
2505
  * Program node from estree.
2506
2506
  */
@@ -2515,7 +2515,7 @@ interface MdxJsxExpressionAttributeData$3 extends Data$7 {
2515
2515
  * ^^^^^
2516
2516
  * ```
2517
2517
  */
2518
- interface MdxJsxAttribute$5 extends Node$3 {
2518
+ interface MdxJsxAttribute$2 extends Node$3 {
2519
2519
  /**
2520
2520
  * Node type.
2521
2521
  */
@@ -2527,23 +2527,23 @@ interface MdxJsxAttribute$5 extends Node$3 {
2527
2527
  /**
2528
2528
  * Attribute value.
2529
2529
  */
2530
- value?: MdxJsxAttributeValueExpression$3 | string | null | undefined
2530
+ value?: MdxJsxAttributeValueExpression$1 | string | null | undefined
2531
2531
  /**
2532
2532
  * Data associated with the mdast MDX JSX attribute.
2533
2533
  */
2534
- data?: MdxJsxAttributeData$3 | undefined
2534
+ data?: MdxJsxAttributeData$1 | undefined
2535
2535
  }
2536
2536
 
2537
2537
  /**
2538
2538
  * Info associated with mdast MDX JSX attribute nodes by the
2539
2539
  * ecosystem.
2540
2540
  */
2541
- interface MdxJsxAttributeData$3 extends Data$7 {}
2541
+ interface MdxJsxAttributeData$1 extends Data$7 {}
2542
2542
 
2543
2543
  /**
2544
2544
  * MDX JSX element node, occurring in flow (block).
2545
2545
  */
2546
- interface MdxJsxFlowElement$3 extends Parent {
2546
+ interface MdxJsxFlowElement$1 extends Parent {
2547
2547
  /**
2548
2548
  * Node type.
2549
2549
  */
@@ -2555,7 +2555,7 @@ interface MdxJsxFlowElement$3 extends Parent {
2555
2555
  /**
2556
2556
  * MDX JSX element attributes.
2557
2557
  */
2558
- attributes: Array<MdxJsxAttribute$5 | MdxJsxExpressionAttribute$5>
2558
+ attributes: Array<MdxJsxAttribute$2 | MdxJsxExpressionAttribute$2>
2559
2559
  /**
2560
2560
  * Content.
2561
2561
  */
@@ -2563,19 +2563,19 @@ interface MdxJsxFlowElement$3 extends Parent {
2563
2563
  /**
2564
2564
  * Data associated with the mdast MDX JSX elements (flow).
2565
2565
  */
2566
- data?: MdxJsxFlowElementData$3 | undefined
2566
+ data?: MdxJsxFlowElementData$1 | undefined
2567
2567
  }
2568
2568
 
2569
2569
  /**
2570
2570
  * Info associated with mdast MDX JSX element (flow) nodes by the
2571
2571
  * ecosystem.
2572
2572
  */
2573
- interface MdxJsxFlowElementData$3 extends Data$6 {}
2573
+ interface MdxJsxFlowElementData$1 extends Data$6 {}
2574
2574
 
2575
2575
  /**
2576
2576
  * MDX JSX element node, occurring in text (phrasing).
2577
2577
  */
2578
- interface MdxJsxTextElement$3 extends Parent {
2578
+ interface MdxJsxTextElement$1 extends Parent {
2579
2579
  /**
2580
2580
  * Node type.
2581
2581
  */
@@ -2587,7 +2587,7 @@ interface MdxJsxTextElement$3 extends Parent {
2587
2587
  /**
2588
2588
  * MDX JSX element attributes.
2589
2589
  */
2590
- attributes: Array<MdxJsxAttribute$5 | MdxJsxExpressionAttribute$5>
2590
+ attributes: Array<MdxJsxAttribute$2 | MdxJsxExpressionAttribute$2>
2591
2591
  /**
2592
2592
  * Content.
2593
2593
  */
@@ -2595,19 +2595,19 @@ interface MdxJsxTextElement$3 extends Parent {
2595
2595
  /**
2596
2596
  * Data associated with the mdast MDX JSX elements (text).
2597
2597
  */
2598
- data?: MdxJsxTextElementData$3 | undefined
2598
+ data?: MdxJsxTextElementData$1 | undefined
2599
2599
  }
2600
2600
 
2601
2601
  /**
2602
2602
  * Info associated with mdast MDX JSX element (text) nodes by the
2603
2603
  * ecosystem.
2604
2604
  */
2605
- interface MdxJsxTextElementData$3 extends Data$6 {}
2605
+ interface MdxJsxTextElementData$1 extends Data$6 {}
2606
2606
 
2607
2607
  /**
2608
2608
  * MDX JSX element node, occurring in flow (block), for hast.
2609
2609
  */
2610
- interface MdxJsxFlowElementHast$3 extends Parent$1 {
2610
+ interface MdxJsxFlowElementHast$1 extends Parent$1 {
2611
2611
  /**
2612
2612
  * Node type.
2613
2613
  */
@@ -2619,7 +2619,7 @@ interface MdxJsxFlowElementHast$3 extends Parent$1 {
2619
2619
  /**
2620
2620
  * MDX JSX element attributes.
2621
2621
  */
2622
- attributes: Array<MdxJsxAttribute$5 | MdxJsxExpressionAttribute$5>
2622
+ attributes: Array<MdxJsxAttribute$2 | MdxJsxExpressionAttribute$2>
2623
2623
  /**
2624
2624
  * Content.
2625
2625
  */
@@ -2627,19 +2627,19 @@ interface MdxJsxFlowElementHast$3 extends Parent$1 {
2627
2627
  /**
2628
2628
  * Data associated with the hast MDX JSX elements (flow).
2629
2629
  */
2630
- data?: MdxJsxFlowElementHastData$3 | undefined
2630
+ data?: MdxJsxFlowElementHastData$1 | undefined
2631
2631
  }
2632
2632
 
2633
2633
  /**
2634
2634
  * Info associated with hast MDX JSX element (flow) nodes by the
2635
2635
  * ecosystem.
2636
2636
  */
2637
- interface MdxJsxFlowElementHastData$3 extends Data$5 {}
2637
+ interface MdxJsxFlowElementHastData$1 extends Data$5 {}
2638
2638
 
2639
2639
  /**
2640
2640
  * MDX JSX element node, occurring in text (phrasing), for hast.
2641
2641
  */
2642
- interface MdxJsxTextElementHast$3 extends Parent$1 {
2642
+ interface MdxJsxTextElementHast$1 extends Parent$1 {
2643
2643
  /**
2644
2644
  * Node type.
2645
2645
  */
@@ -2651,7 +2651,7 @@ interface MdxJsxTextElementHast$3 extends Parent$1 {
2651
2651
  /**
2652
2652
  * MDX JSX element attributes.
2653
2653
  */
2654
- attributes: Array<MdxJsxAttribute$5 | MdxJsxExpressionAttribute$5>
2654
+ attributes: Array<MdxJsxAttribute$2 | MdxJsxExpressionAttribute$2>
2655
2655
  /**
2656
2656
  * Content.
2657
2657
  */
@@ -2659,14 +2659,14 @@ interface MdxJsxTextElementHast$3 extends Parent$1 {
2659
2659
  /**
2660
2660
  * Data associated with the hast MDX JSX elements (text).
2661
2661
  */
2662
- data?: MdxJsxTextElementHastData$3 | undefined
2662
+ data?: MdxJsxTextElementHastData$1 | undefined
2663
2663
  }
2664
2664
 
2665
2665
  /**
2666
2666
  * Info associated with hast MDX JSX element (text) nodes by the
2667
2667
  * ecosystem.
2668
2668
  */
2669
- interface MdxJsxTextElementHastData$3 extends Data$5 {}
2669
+ interface MdxJsxTextElementHastData$1 extends Data$5 {}
2670
2670
 
2671
2671
  // Add nodes to mdast content.
2672
2672
  declare module 'mdast' {
@@ -2674,25 +2674,25 @@ declare module 'mdast' {
2674
2674
  /**
2675
2675
  * MDX JSX element node, occurring in flow (block).
2676
2676
  */
2677
- mdxJsxFlowElement: MdxJsxFlowElement$3
2677
+ mdxJsxFlowElement: MdxJsxFlowElement$1
2678
2678
  }
2679
2679
 
2680
2680
  interface PhrasingContentMap {
2681
2681
  /**
2682
2682
  * MDX JSX element node, occurring in text (phrasing).
2683
2683
  */
2684
- mdxJsxTextElement: MdxJsxTextElement$3
2684
+ mdxJsxTextElement: MdxJsxTextElement$1
2685
2685
  }
2686
2686
 
2687
2687
  interface RootContentMap {
2688
2688
  /**
2689
2689
  * MDX JSX element node, occurring in flow (block).
2690
2690
  */
2691
- mdxJsxFlowElement: MdxJsxFlowElement$3
2691
+ mdxJsxFlowElement: MdxJsxFlowElement$1
2692
2692
  /**
2693
2693
  * MDX JSX element node, occurring in text (phrasing).
2694
2694
  */
2695
- mdxJsxTextElement: MdxJsxTextElement$3
2695
+ mdxJsxTextElement: MdxJsxTextElement$1
2696
2696
  }
2697
2697
  }
2698
2698
 
@@ -2702,22 +2702,22 @@ declare module 'hast' {
2702
2702
  /**
2703
2703
  * MDX JSX element node, occurring in text (phrasing).
2704
2704
  */
2705
- mdxJsxTextElement: MdxJsxTextElementHast$3
2705
+ mdxJsxTextElement: MdxJsxTextElementHast$1
2706
2706
  /**
2707
2707
  * MDX JSX element node, occurring in flow (block).
2708
2708
  */
2709
- mdxJsxFlowElement: MdxJsxFlowElementHast$3
2709
+ mdxJsxFlowElement: MdxJsxFlowElementHast$1
2710
2710
  }
2711
2711
 
2712
2712
  interface RootContentMap {
2713
2713
  /**
2714
2714
  * MDX JSX element node, occurring in text (phrasing).
2715
2715
  */
2716
- mdxJsxTextElement: MdxJsxTextElementHast$3
2716
+ mdxJsxTextElement: MdxJsxTextElementHast$1
2717
2717
  /**
2718
2718
  * MDX JSX element node, occurring in flow (block).
2719
2719
  */
2720
- mdxJsxFlowElement: MdxJsxFlowElementHast$3
2720
+ mdxJsxFlowElement: MdxJsxFlowElementHast$1
2721
2721
  }
2722
2722
  }
2723
2723
 
@@ -2727,12 +2727,12 @@ declare module 'mdast-util-from-markdown' {
2727
2727
  /**
2728
2728
  * Current MDX JSX tag.
2729
2729
  */
2730
- mdxJsxTag?: Tag$1 | undefined
2730
+ mdxJsxTag?: Tag | undefined
2731
2731
 
2732
2732
  /**
2733
2733
  * Current stack of open MDX JSX tags.
2734
2734
  */
2735
- mdxJsxTagStack?: Tag$1[] | undefined
2735
+ mdxJsxTagStack?: Tag[] | undefined
2736
2736
  }
2737
2737
  }
2738
2738
 
@@ -2783,7 +2783,7 @@ declare module 'micromark-util-types' {
2783
2783
  * Negative integers are used instead of certain sequences of characters (such
2784
2784
  * as line endings and tabs).
2785
2785
  */
2786
- type Code$1 = number | null
2786
+ type Code = number | null
2787
2787
 
2788
2788
  /**
2789
2789
  * A chunk is either a character code or a slice of a buffer in the form of a
@@ -2792,7 +2792,7 @@ type Code$1 = number | null
2792
2792
  * Chunks are used because strings are more efficient storage that character
2793
2793
  * codes, but limited in what they can represent.
2794
2794
  */
2795
- type Chunk$1 = Code$1 | string
2795
+ type Chunk = Code | string
2796
2796
 
2797
2797
  /**
2798
2798
  * Enumeration of the content types.
@@ -2838,7 +2838,7 @@ type Chunk$1 = Code$1 | string
2838
2838
  * It exists in things such as identifiers (media references, definitions),
2839
2839
  * titles, or URLs.
2840
2840
  */
2841
- type ContentType$1 = 'content' | 'document' | 'flow' | 'string' | 'text'
2841
+ type ContentType = 'content' | 'document' | 'flow' | 'string' | 'text'
2842
2842
 
2843
2843
  /**
2844
2844
  * A location in the document (`line`/`column`/`offset`) and chunk (`_index`,
@@ -2850,7 +2850,7 @@ type ContentType$1 = '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$1 = {
2853
+ type Point = {
2854
2854
  /**
2855
2855
  * Position in a string chunk (or `-1` when pointing to a numeric chunk).
2856
2856
  */
@@ -2907,36 +2907,36 @@ type Point$1 = {
2907
2907
  * The two `chunkFlow` tokens are linked together.
2908
2908
  * The chunks they span are then passed through the flow tokenizer.
2909
2909
  */
2910
- interface Token$5 {
2910
+ interface Token$2 {
2911
2911
  /**
2912
2912
  * Token type.
2913
2913
  */
2914
- type: TokenType$1
2914
+ type: TokenType
2915
2915
 
2916
2916
  /**
2917
2917
  * Point where the token starts.
2918
2918
  */
2919
- start: Point$1
2919
+ start: Point
2920
2920
 
2921
2921
  /**
2922
2922
  * Point where the token ends.
2923
2923
  */
2924
- end: Point$1
2924
+ end: Point
2925
2925
 
2926
2926
  /**
2927
2927
  * The previous token in a list of linked tokens.
2928
2928
  */
2929
- previous?: Token$5 | undefined
2929
+ previous?: Token$2 | undefined
2930
2930
 
2931
2931
  /**
2932
2932
  * The next token in a list of linked tokens.
2933
2933
  */
2934
- next?: Token$5 | undefined
2934
+ next?: Token$2 | undefined
2935
2935
 
2936
2936
  /**
2937
2937
  * Declares a token as having content of a certain type.
2938
2938
  */
2939
- contentType?: ContentType$1 | undefined
2939
+ contentType?: ContentType | undefined
2940
2940
 
2941
2941
  /**
2942
2942
  * Connected tokenizer.
@@ -2945,7 +2945,7 @@ interface Token$5 {
2945
2945
  * A child tokenizer is needed to tokenize them, which is stored on those
2946
2946
  * tokens.
2947
2947
  */
2948
- _tokenizer?: TokenizeContext$1 | undefined
2948
+ _tokenizer?: TokenizeContext | undefined
2949
2949
 
2950
2950
  /**
2951
2951
  * Field to help parse attention.
@@ -3009,7 +3009,7 @@ interface Token$5 {
3009
3009
  * Tokens can “contain” other tokens, even though they are stored in a flat
3010
3010
  * list, through `enter`ing before them, and `exit`ing after them.
3011
3011
  */
3012
- type Event$1 = ['enter' | 'exit', Token$5, TokenizeContext$1]
3012
+ type Event = ['enter' | 'exit', Token$2, TokenizeContext]
3013
3013
 
3014
3014
  /**
3015
3015
  * Open a token.
@@ -3021,10 +3021,10 @@ type Event$1 = ['enter' | 'exit', Token$5, TokenizeContext$1]
3021
3021
  * @returns {Token}
3022
3022
  * Token.
3023
3023
  */
3024
- type Enter$1 = (
3025
- type: TokenType$1,
3026
- fields?: Omit<Partial<Token$5>, 'type'> | undefined
3027
- ) => Token$5
3024
+ type Enter = (
3025
+ type: TokenType,
3026
+ fields?: Omit<Partial<Token$2>, 'type'> | undefined
3027
+ ) => Token$2
3028
3028
 
3029
3029
  /**
3030
3030
  * Close a token.
@@ -3034,7 +3034,7 @@ type Enter$1 = (
3034
3034
  * @returns
3035
3035
  * Token.
3036
3036
  */
3037
- type Exit$1 = (type: TokenType$1) => Token$5
3037
+ type Exit = (type: TokenType) => Token$2
3038
3038
 
3039
3039
  /**
3040
3040
  * Deal with the character and move to the next.
@@ -3042,7 +3042,7 @@ type Exit$1 = (type: TokenType$1) => Token$5
3042
3042
  * @param code
3043
3043
  * Current code.
3044
3044
  */
3045
- type Consume$1 = (code: Code$1) => undefined
3045
+ type Consume = (code: Code) => undefined
3046
3046
 
3047
3047
  /**
3048
3048
  * Attempt deals with several values, and tries to parse according to those
@@ -3062,45 +3062,45 @@ type Consume$1 = (code: Code$1) => undefined
3062
3062
  * @returns
3063
3063
  * Next state.
3064
3064
  */
3065
- type Attempt$1 = (
3066
- construct: Array<Construct$1> | Construct$1 | ConstructRecord$1,
3067
- ok: State$1,
3068
- nok?: State$1 | undefined
3069
- ) => State$1
3065
+ type Attempt = (
3066
+ construct: Array<Construct> | Construct | ConstructRecord,
3067
+ ok: State,
3068
+ nok?: State | undefined
3069
+ ) => State
3070
3070
 
3071
3071
  /**
3072
3072
  * A context object to transition the state machine.
3073
3073
  */
3074
- type Effects$1 = {
3074
+ type Effects = {
3075
3075
  /**
3076
3076
  * Start a new token.
3077
3077
  */
3078
- enter: Enter$1
3078
+ enter: Enter
3079
3079
 
3080
3080
  /**
3081
3081
  * End a started token.
3082
3082
  */
3083
- exit: Exit$1
3083
+ exit: Exit
3084
3084
 
3085
3085
  /**
3086
3086
  * Deal with the character and move to the next.
3087
3087
  */
3088
- consume: Consume$1
3088
+ consume: Consume
3089
3089
 
3090
3090
  /**
3091
3091
  * Try to tokenize a construct.
3092
3092
  */
3093
- attempt: Attempt$1
3093
+ attempt: Attempt
3094
3094
 
3095
3095
  /**
3096
3096
  * Interrupt is used for stuff right after a line of content.
3097
3097
  */
3098
- interrupt: Attempt$1
3098
+ interrupt: Attempt
3099
3099
 
3100
3100
  /**
3101
3101
  * Attempt, then revert.
3102
3102
  */
3103
- check: Attempt$1
3103
+ check: Attempt
3104
3104
  }
3105
3105
 
3106
3106
  /**
@@ -3123,7 +3123,7 @@ type Effects$1 = {
3123
3123
  * @returns
3124
3124
  * Next state.
3125
3125
  */
3126
- type State$1 = (code: Code$1) => State$1 | undefined
3126
+ type State = (code: Code) => State | undefined
3127
3127
 
3128
3128
  /**
3129
3129
  * A resolver handles and cleans events coming from `tokenize`.
@@ -3135,10 +3135,10 @@ type State$1 = (code: Code$1) => State$1 | undefined
3135
3135
  * @returns
3136
3136
  * The given, modified, events.
3137
3137
  */
3138
- type Resolver$1 = (
3139
- events: Array<Event$1>,
3140
- context: TokenizeContext$1
3141
- ) => Array<Event$1>
3138
+ type Resolver = (
3139
+ events: Array<Event>,
3140
+ context: TokenizeContext
3141
+ ) => Array<Event>
3142
3142
 
3143
3143
  /**
3144
3144
  * A tokenize function sets up a state machine to handle character codes streaming in.
@@ -3154,12 +3154,12 @@ type Resolver$1 = (
3154
3154
  * @returns
3155
3155
  * First state.
3156
3156
  */
3157
- type Tokenizer$1 = (
3158
- this: TokenizeContext$1,
3159
- effects: Effects$1,
3160
- ok: State$1,
3161
- nok: State$1
3162
- ) => State$1
3157
+ type Tokenizer = (
3158
+ this: TokenizeContext,
3159
+ effects: Effects,
3160
+ ok: State,
3161
+ nok: State
3162
+ ) => State
3163
3163
 
3164
3164
  /**
3165
3165
  * Like a tokenizer, but without `ok` or `nok`, and returning `undefined`.
@@ -3173,7 +3173,7 @@ type Tokenizer$1 = (
3173
3173
  * @returns
3174
3174
  * Nothing.
3175
3175
  */
3176
- type Exiter$1 = (this: TokenizeContext$1, effects: Effects$1) => undefined
3176
+ type Exiter = (this: TokenizeContext, effects: Effects) => undefined
3177
3177
 
3178
3178
  /**
3179
3179
  * Guard whether `code` can come before the construct.
@@ -3189,31 +3189,31 @@ type Exiter$1 = (this: TokenizeContext$1, effects: Effects$1) => undefined
3189
3189
  * @returns
3190
3190
  * Whether `code` is allowed before.
3191
3191
  */
3192
- type Previous$1 = (this: TokenizeContext$1, code: Code$1) => boolean
3192
+ type Previous = (this: TokenizeContext, code: Code) => boolean
3193
3193
 
3194
3194
  /**
3195
3195
  * An object describing how to parse a markdown construct.
3196
3196
  */
3197
- type Construct$1 = {
3197
+ type Construct = {
3198
3198
  /**
3199
3199
  * Set up a state machine to handle character codes streaming in.
3200
3200
  */
3201
- tokenize: Tokenizer$1
3201
+ tokenize: Tokenizer
3202
3202
 
3203
3203
  /**
3204
3204
  * Guard whether the previous character can come before the construct.
3205
3205
  */
3206
- previous?: Previous$1 | undefined
3206
+ previous?: Previous | undefined
3207
3207
 
3208
3208
  /**
3209
3209
  * For containers, a continuation construct.
3210
3210
  */
3211
- continuation?: Construct$1 | undefined
3211
+ continuation?: Construct | undefined
3212
3212
 
3213
3213
  /**
3214
3214
  * For containers, a final hook.
3215
3215
  */
3216
- exit?: Exiter$1 | undefined
3216
+ exit?: Exiter | undefined
3217
3217
 
3218
3218
  /**
3219
3219
  * Name of the construct, used to toggle constructs off.
@@ -3237,7 +3237,7 @@ type Construct$1 = {
3237
3237
  * ranging from the start to the end of a character reference each time one is
3238
3238
  * found.
3239
3239
  */
3240
- resolve?: Resolver$1 | undefined
3240
+ resolve?: Resolver | undefined
3241
3241
 
3242
3242
  /**
3243
3243
  * Resolve the events from the start of the content (which includes other
@@ -3248,7 +3248,7 @@ type Construct$1 = {
3248
3248
  * ranging from the start of the link title to the end of a character
3249
3249
  * reference each time one is found.
3250
3250
  */
3251
- resolveTo?: Resolver$1 | undefined
3251
+ resolveTo?: Resolver | undefined
3252
3252
 
3253
3253
  /**
3254
3254
  * Resolve all events when the content is complete, from the start to the end.
@@ -3259,7 +3259,7 @@ type Construct$1 = {
3259
3259
  * character reference is found, ranging from the start to the end of the link
3260
3260
  * title to the end.
3261
3261
  */
3262
- resolveAll?: Resolver$1 | undefined
3262
+ resolveAll?: Resolver | undefined
3263
3263
 
3264
3264
  /**
3265
3265
  * Concrete constructs cannot be interrupted by more containers.
@@ -3298,15 +3298,15 @@ type Construct$1 = {
3298
3298
  /**
3299
3299
  * Several constructs, mapped from their initial codes.
3300
3300
  */
3301
- type ConstructRecord$1 = Record<
3301
+ type ConstructRecord = Record<
3302
3302
  string,
3303
- Array<Construct$1> | Construct$1 | undefined
3303
+ Array<Construct> | Construct | undefined
3304
3304
  >
3305
3305
 
3306
3306
  /**
3307
3307
  * State shared between container calls.
3308
3308
  */
3309
- interface ContainerState$1 {
3309
+ interface ContainerState {
3310
3310
  /**
3311
3311
  * Special field to close the current flow (or containers).
3312
3312
  */
@@ -3320,12 +3320,12 @@ interface ContainerState$1 {
3320
3320
  /**
3321
3321
  * Current marker, used by lists.
3322
3322
  */
3323
- marker?: Code$1 | undefined
3323
+ marker?: Code | undefined
3324
3324
 
3325
3325
  /**
3326
3326
  * Current token type, used by lists.
3327
3327
  */
3328
- type?: TokenType$1 | undefined
3328
+ type?: TokenType | undefined
3329
3329
 
3330
3330
  /**
3331
3331
  * Current size, used by lists.
@@ -3346,16 +3346,16 @@ interface ContainerState$1 {
3346
3346
  /**
3347
3347
  * A context object that helps w/ tokenizing markdown constructs.
3348
3348
  */
3349
- interface TokenizeContext$1 {
3349
+ interface TokenizeContext {
3350
3350
  /**
3351
3351
  * The previous code.
3352
3352
  */
3353
- previous: Code$1
3353
+ previous: Code
3354
3354
 
3355
3355
  /**
3356
3356
  * Current code.
3357
3357
  */
3358
- code: Code$1
3358
+ code: Code
3359
3359
 
3360
3360
  /**
3361
3361
  * Whether we’re currently interrupting.
@@ -3376,7 +3376,7 @@ interface TokenizeContext$1 {
3376
3376
  *
3377
3377
  * Constructs that are not `partial` are set here.
3378
3378
  */
3379
- currentConstruct?: Construct$1 | undefined
3379
+ currentConstruct?: Construct | undefined
3380
3380
 
3381
3381
  /**
3382
3382
  * share state set when parsing containers.
@@ -3385,17 +3385,17 @@ interface TokenizeContext$1 {
3385
3385
  * continued lines (`continuation.tokenize`), and finally `exit`.
3386
3386
  * This record can be used to store some information between these hooks.
3387
3387
  */
3388
- containerState?: ContainerState$1 | undefined
3388
+ containerState?: ContainerState | undefined
3389
3389
 
3390
3390
  /**
3391
3391
  * Current list of events.
3392
3392
  */
3393
- events: Array<Event$1>
3393
+ events: Array<Event>
3394
3394
 
3395
3395
  /**
3396
3396
  * The relevant parsing context.
3397
3397
  */
3398
- parser: ParseContext$1
3398
+ parser: ParseContext
3399
3399
 
3400
3400
  /**
3401
3401
  * Get the chunks that span a token (or location).
@@ -3405,7 +3405,7 @@ interface TokenizeContext$1 {
3405
3405
  * @returns
3406
3406
  * List of chunks.
3407
3407
  */
3408
- sliceStream: (token: Pick<Token$5, 'end' | 'start'>) => Array<Chunk$1>
3408
+ sliceStream: (token: Pick<Token$2, 'end' | 'start'>) => Array<Chunk>
3409
3409
 
3410
3410
  /**
3411
3411
  * Get the source text that spans a token (or location).
@@ -3418,7 +3418,7 @@ interface TokenizeContext$1 {
3418
3418
  * Serialized chunks.
3419
3419
  */
3420
3420
  sliceSerialize: (
3421
- token: Pick<Token$5, 'end' | 'start'>,
3421
+ token: Pick<Token$2, 'end' | 'start'>,
3422
3422
  expandTabs?: boolean | undefined
3423
3423
  ) => string
3424
3424
 
@@ -3428,7 +3428,7 @@ interface TokenizeContext$1 {
3428
3428
  * @returns
3429
3429
  * Current point.
3430
3430
  */
3431
- now: () => Point$1
3431
+ now: () => Point
3432
3432
 
3433
3433
  /**
3434
3434
  * Define a skip
@@ -3444,7 +3444,7 @@ interface TokenizeContext$1 {
3444
3444
  * @returns
3445
3445
  * Nothing.
3446
3446
  */
3447
- defineSkip: (point: Point$1) => undefined
3447
+ defineSkip: (point: Point) => undefined
3448
3448
 
3449
3449
  /**
3450
3450
  * Write a slice of chunks.
@@ -3456,7 +3456,7 @@ interface TokenizeContext$1 {
3456
3456
  * @returns
3457
3457
  * Events.
3458
3458
  */
3459
- write: (slice: Array<Chunk$1>) => Array<Event$1>
3459
+ write: (slice: Array<Chunk>) => Array<Event>
3460
3460
 
3461
3461
  /**
3462
3462
  * Internal boolean shared with `micromark-extension-gfm-task-list-item` to
@@ -3496,25 +3496,25 @@ interface TokenizeContext$1 {
3496
3496
  *
3497
3497
  * See: <https://github.com/micromark/micromark#syntaxextension>
3498
3498
  */
3499
- interface Extension$1 {
3500
- document?: ConstructRecord$1 | undefined
3501
- contentInitial?: ConstructRecord$1 | undefined
3502
- flowInitial?: ConstructRecord$1 | undefined
3503
- flow?: ConstructRecord$1 | undefined
3504
- string?: ConstructRecord$1 | undefined
3505
- text?: ConstructRecord$1 | undefined
3499
+ interface Extension {
3500
+ document?: ConstructRecord | undefined
3501
+ contentInitial?: ConstructRecord | undefined
3502
+ flowInitial?: ConstructRecord | undefined
3503
+ flow?: ConstructRecord | undefined
3504
+ string?: ConstructRecord | undefined
3505
+ text?: ConstructRecord | undefined
3506
3506
  disable?: {null?: Array<string> | undefined} | undefined
3507
3507
  insideSpan?:
3508
- | {null?: Array<Pick<Construct$1, 'resolveAll'>> | undefined}
3508
+ | {null?: Array<Pick<Construct, 'resolveAll'>> | undefined}
3509
3509
  | undefined
3510
- attentionMarkers?: {null?: Array<Code$1> | undefined} | undefined
3510
+ attentionMarkers?: {null?: Array<Code> | undefined} | undefined
3511
3511
  }
3512
3512
 
3513
3513
  /**
3514
3514
  * A full, filtereed, normalized, extension.
3515
3515
  */
3516
- type FullNormalizedExtension$1 = {
3517
- [Key in keyof Extension$1]-?: Exclude<Extension$1[Key], undefined>
3516
+ type FullNormalizedExtension = {
3517
+ [Key in keyof Extension]-?: Exclude<Extension[Key], undefined>
3518
3518
  }
3519
3519
 
3520
3520
  /**
@@ -3525,43 +3525,43 @@ type FullNormalizedExtension$1 = {
3525
3525
  * @returns
3526
3526
  * Context.
3527
3527
  */
3528
- type Create$1 = (
3529
- from?: Omit<Point$1, '_bufferIndex' | '_index'> | undefined
3530
- ) => TokenizeContext$1
3528
+ type Create = (
3529
+ from?: Omit<Point, '_bufferIndex' | '_index'> | undefined
3530
+ ) => TokenizeContext
3531
3531
 
3532
3532
  /**
3533
3533
  * A context object that helps w/ parsing markdown.
3534
3534
  */
3535
- interface ParseContext$1 {
3535
+ interface ParseContext {
3536
3536
  /**
3537
3537
  * All constructs.
3538
3538
  */
3539
- constructs: FullNormalizedExtension$1
3539
+ constructs: FullNormalizedExtension
3540
3540
 
3541
3541
  /**
3542
3542
  * Create a content tokenizer.
3543
3543
  */
3544
- content: Create$1
3544
+ content: Create
3545
3545
 
3546
3546
  /**
3547
3547
  * Create a document tokenizer.
3548
3548
  */
3549
- document: Create$1
3549
+ document: Create
3550
3550
 
3551
3551
  /**
3552
3552
  * Create a flow tokenizer.
3553
3553
  */
3554
- flow: Create$1
3554
+ flow: Create
3555
3555
 
3556
3556
  /**
3557
3557
  * Create a string tokenizer.
3558
3558
  */
3559
- string: Create$1
3559
+ string: Create
3560
3560
 
3561
3561
  /**
3562
3562
  * Create a text tokenizer.
3563
3563
  */
3564
- text: Create$1
3564
+ text: Create
3565
3565
 
3566
3566
  /**
3567
3567
  * List of defined identifiers.
@@ -3586,14 +3586,14 @@ interface ParseContext$1 {
3586
3586
  /**
3587
3587
  * Enum of allowed token types.
3588
3588
  */
3589
- type TokenType$1 = keyof TokenTypeMap$1
3589
+ type TokenType = keyof TokenTypeMap
3590
3590
 
3591
3591
  // Note: when changing the next interface, you likely also have to change
3592
3592
  // `micromark-util-symbol`.
3593
3593
  /**
3594
3594
  * Map of allowed token types.
3595
3595
  */
3596
- interface TokenTypeMap$1 {
3596
+ interface TokenTypeMap {
3597
3597
  // Note: these are compiled away.
3598
3598
  attentionSequence: 'attentionSequence' // To do: remove.
3599
3599
  space: 'space' // To do: remove.
@@ -3703,7 +3703,7 @@ interface TokenTypeMap$1 {
3703
3703
  chunkString: 'chunkString'
3704
3704
  }
3705
3705
 
3706
- type Token$4 = Token$5
3706
+ type Token$1 = Token$2
3707
3707
 
3708
3708
  declare module 'micromark-util-types' {
3709
3709
  interface TokenTypeMap {
@@ -3715,14 +3715,14 @@ declare module 'micromark-util-types' {
3715
3715
  }
3716
3716
  }
3717
3717
 
3718
- type Token$3 = Token$4
3719
- type MdxJsxAttribute$4 = MdxJsxAttribute$5
3720
- type MdxJsxExpressionAttribute$4 =
3721
- MdxJsxExpressionAttribute$5
3718
+ type Token = Token$1
3719
+ type MdxJsxAttribute$1 = MdxJsxAttribute$2
3720
+ type MdxJsxExpressionAttribute$1 =
3721
+ MdxJsxExpressionAttribute$2
3722
3722
  /**
3723
3723
  * Single tag.
3724
3724
  */
3725
- type Tag$1 = {
3725
+ type Tag = {
3726
3726
  /**
3727
3727
  * Name of tag, or `undefined` for fragment.
3728
3728
  *
@@ -3733,7 +3733,7 @@ type Tag$1 = {
3733
3733
  /**
3734
3734
  * Attributes.
3735
3735
  */
3736
- attributes: Array<MdxJsxAttribute$4 | MdxJsxExpressionAttribute$4>
3736
+ attributes: Array<MdxJsxAttribute$1 | MdxJsxExpressionAttribute$1>
3737
3737
  /**
3738
3738
  * Whether the tag is closing (`</x>`).
3739
3739
  */
@@ -3745,11 +3745,11 @@ type Tag$1 = {
3745
3745
  /**
3746
3746
  * Start point.
3747
3747
  */
3748
- start: Token$3['start']
3748
+ start: Token['start']
3749
3749
  /**
3750
3750
  * End point.
3751
3751
  */
3752
- end: Token$3['start']
3752
+ end: Token['start']
3753
3753
  }
3754
3754
 
3755
3755
  // Expose node types.
@@ -3761,7 +3761,7 @@ type Tag$1 = {
3761
3761
  * ^^^
3762
3762
  * ```
3763
3763
  */
3764
- interface MdxJsxAttributeValueExpression$2 extends Node$3 {
3764
+ interface MdxJsxAttributeValueExpression extends Node$3 {
3765
3765
  /**
3766
3766
  * Node type.
3767
3767
  */
@@ -3775,14 +3775,14 @@ interface MdxJsxAttributeValueExpression$2 extends Node$3 {
3775
3775
  /**
3776
3776
  * Data associated with the mdast MDX JSX attribute value expression.
3777
3777
  */
3778
- data?: MdxJsxAttributeValueExpressionData$2 | undefined
3778
+ data?: MdxJsxAttributeValueExpressionData | undefined
3779
3779
  }
3780
3780
 
3781
3781
  /**
3782
3782
  * Info associated with mdast MDX JSX attribute value expression nodes by the
3783
3783
  * ecosystem.
3784
3784
  */
3785
- interface MdxJsxAttributeValueExpressionData$2 extends Data$7 {
3785
+ interface MdxJsxAttributeValueExpressionData extends Data$7 {
3786
3786
  /**
3787
3787
  * Program node from estree.
3788
3788
  */
@@ -3797,7 +3797,7 @@ interface MdxJsxAttributeValueExpressionData$2 extends Data$7 {
3797
3797
  * ^^^^^^
3798
3798
  * ```
3799
3799
  */
3800
- interface MdxJsxExpressionAttribute$3 extends Node$3 {
3800
+ interface MdxJsxExpressionAttribute extends Node$3 {
3801
3801
  /**
3802
3802
  * Node type.
3803
3803
  */
@@ -3811,14 +3811,14 @@ interface MdxJsxExpressionAttribute$3 extends Node$3 {
3811
3811
  /**
3812
3812
  * Data associated with the mdast MDX JSX expression attributes.
3813
3813
  */
3814
- data?: MdxJsxExpressionAttributeData$2 | undefined
3814
+ data?: MdxJsxExpressionAttributeData | undefined
3815
3815
  }
3816
3816
 
3817
3817
  /**
3818
3818
  * Info associated with mdast MDX JSX expression attribute nodes by the
3819
3819
  * ecosystem.
3820
3820
  */
3821
- interface MdxJsxExpressionAttributeData$2 extends Data$7 {
3821
+ interface MdxJsxExpressionAttributeData extends Data$7 {
3822
3822
  /**
3823
3823
  * Program node from estree.
3824
3824
  */
@@ -3833,7 +3833,7 @@ interface MdxJsxExpressionAttributeData$2 extends Data$7 {
3833
3833
  * ^^^^^
3834
3834
  * ```
3835
3835
  */
3836
- interface MdxJsxAttribute$3 extends Node$3 {
3836
+ interface MdxJsxAttribute extends Node$3 {
3837
3837
  /**
3838
3838
  * Node type.
3839
3839
  */
@@ -3845,23 +3845,23 @@ interface MdxJsxAttribute$3 extends Node$3 {
3845
3845
  /**
3846
3846
  * Attribute value.
3847
3847
  */
3848
- value?: MdxJsxAttributeValueExpression$2 | string | null | undefined
3848
+ value?: MdxJsxAttributeValueExpression | string | null | undefined
3849
3849
  /**
3850
3850
  * Data associated with the mdast MDX JSX attribute.
3851
3851
  */
3852
- data?: MdxJsxAttributeData$2 | undefined
3852
+ data?: MdxJsxAttributeData | undefined
3853
3853
  }
3854
3854
 
3855
3855
  /**
3856
3856
  * Info associated with mdast MDX JSX attribute nodes by the
3857
3857
  * ecosystem.
3858
3858
  */
3859
- interface MdxJsxAttributeData$2 extends Data$7 {}
3859
+ interface MdxJsxAttributeData extends Data$7 {}
3860
3860
 
3861
3861
  /**
3862
3862
  * MDX JSX element node, occurring in flow (block).
3863
3863
  */
3864
- interface MdxJsxFlowElement$2 extends Parent {
3864
+ interface MdxJsxFlowElement extends Parent {
3865
3865
  /**
3866
3866
  * Node type.
3867
3867
  */
@@ -3873,7 +3873,7 @@ interface MdxJsxFlowElement$2 extends Parent {
3873
3873
  /**
3874
3874
  * MDX JSX element attributes.
3875
3875
  */
3876
- attributes: Array<MdxJsxAttribute$3 | MdxJsxExpressionAttribute$3>
3876
+ attributes: Array<MdxJsxAttribute | MdxJsxExpressionAttribute>
3877
3877
  /**
3878
3878
  * Content.
3879
3879
  */
@@ -3881,19 +3881,19 @@ interface MdxJsxFlowElement$2 extends Parent {
3881
3881
  /**
3882
3882
  * Data associated with the mdast MDX JSX elements (flow).
3883
3883
  */
3884
- data?: MdxJsxFlowElementData$2 | undefined
3884
+ data?: MdxJsxFlowElementData | undefined
3885
3885
  }
3886
3886
 
3887
3887
  /**
3888
3888
  * Info associated with mdast MDX JSX element (flow) nodes by the
3889
3889
  * ecosystem.
3890
3890
  */
3891
- interface MdxJsxFlowElementData$2 extends Data$6 {}
3891
+ interface MdxJsxFlowElementData extends Data$6 {}
3892
3892
 
3893
3893
  /**
3894
3894
  * MDX JSX element node, occurring in text (phrasing).
3895
3895
  */
3896
- interface MdxJsxTextElement$2 extends Parent {
3896
+ interface MdxJsxTextElement extends Parent {
3897
3897
  /**
3898
3898
  * Node type.
3899
3899
  */
@@ -3905,7 +3905,7 @@ interface MdxJsxTextElement$2 extends Parent {
3905
3905
  /**
3906
3906
  * MDX JSX element attributes.
3907
3907
  */
3908
- attributes: Array<MdxJsxAttribute$3 | MdxJsxExpressionAttribute$3>
3908
+ attributes: Array<MdxJsxAttribute | MdxJsxExpressionAttribute>
3909
3909
  /**
3910
3910
  * Content.
3911
3911
  */
@@ -3913,19 +3913,19 @@ interface MdxJsxTextElement$2 extends Parent {
3913
3913
  /**
3914
3914
  * Data associated with the mdast MDX JSX elements (text).
3915
3915
  */
3916
- data?: MdxJsxTextElementData$2 | undefined
3916
+ data?: MdxJsxTextElementData | undefined
3917
3917
  }
3918
3918
 
3919
3919
  /**
3920
3920
  * Info associated with mdast MDX JSX element (text) nodes by the
3921
3921
  * ecosystem.
3922
3922
  */
3923
- interface MdxJsxTextElementData$2 extends Data$6 {}
3923
+ interface MdxJsxTextElementData extends Data$6 {}
3924
3924
 
3925
3925
  /**
3926
3926
  * MDX JSX element node, occurring in flow (block), for hast.
3927
3927
  */
3928
- interface MdxJsxFlowElementHast$2 extends Parent$1 {
3928
+ interface MdxJsxFlowElementHast extends Parent$1 {
3929
3929
  /**
3930
3930
  * Node type.
3931
3931
  */
@@ -3937,7 +3937,7 @@ interface MdxJsxFlowElementHast$2 extends Parent$1 {
3937
3937
  /**
3938
3938
  * MDX JSX element attributes.
3939
3939
  */
3940
- attributes: Array<MdxJsxAttribute$3 | MdxJsxExpressionAttribute$3>
3940
+ attributes: Array<MdxJsxAttribute | MdxJsxExpressionAttribute>
3941
3941
  /**
3942
3942
  * Content.
3943
3943
  */
@@ -3945,19 +3945,19 @@ interface MdxJsxFlowElementHast$2 extends Parent$1 {
3945
3945
  /**
3946
3946
  * Data associated with the hast MDX JSX elements (flow).
3947
3947
  */
3948
- data?: MdxJsxFlowElementHastData$2 | undefined
3948
+ data?: MdxJsxFlowElementHastData | undefined
3949
3949
  }
3950
3950
 
3951
3951
  /**
3952
3952
  * Info associated with hast MDX JSX element (flow) nodes by the
3953
3953
  * ecosystem.
3954
3954
  */
3955
- interface MdxJsxFlowElementHastData$2 extends Data$5 {}
3955
+ interface MdxJsxFlowElementHastData extends Data$5 {}
3956
3956
 
3957
3957
  /**
3958
3958
  * MDX JSX element node, occurring in text (phrasing), for hast.
3959
3959
  */
3960
- interface MdxJsxTextElementHast$2 extends Parent$1 {
3960
+ interface MdxJsxTextElementHast extends Parent$1 {
3961
3961
  /**
3962
3962
  * Node type.
3963
3963
  */
@@ -3969,7 +3969,7 @@ interface MdxJsxTextElementHast$2 extends Parent$1 {
3969
3969
  /**
3970
3970
  * MDX JSX element attributes.
3971
3971
  */
3972
- attributes: Array<MdxJsxAttribute$3 | MdxJsxExpressionAttribute$3>
3972
+ attributes: Array<MdxJsxAttribute | MdxJsxExpressionAttribute>
3973
3973
  /**
3974
3974
  * Content.
3975
3975
  */
@@ -3977,14 +3977,14 @@ interface MdxJsxTextElementHast$2 extends Parent$1 {
3977
3977
  /**
3978
3978
  * Data associated with the hast MDX JSX elements (text).
3979
3979
  */
3980
- data?: MdxJsxTextElementHastData$2 | undefined
3980
+ data?: MdxJsxTextElementHastData | undefined
3981
3981
  }
3982
3982
 
3983
3983
  /**
3984
3984
  * Info associated with hast MDX JSX element (text) nodes by the
3985
3985
  * ecosystem.
3986
3986
  */
3987
- interface MdxJsxTextElementHastData$2 extends Data$5 {}
3987
+ interface MdxJsxTextElementHastData extends Data$5 {}
3988
3988
 
3989
3989
  // Add nodes to mdast content.
3990
3990
  declare module 'mdast' {
@@ -3992,25 +3992,25 @@ declare module 'mdast' {
3992
3992
  /**
3993
3993
  * MDX JSX element node, occurring in flow (block).
3994
3994
  */
3995
- mdxJsxFlowElement: MdxJsxFlowElement$2
3995
+ mdxJsxFlowElement: MdxJsxFlowElement
3996
3996
  }
3997
3997
 
3998
3998
  interface PhrasingContentMap {
3999
3999
  /**
4000
4000
  * MDX JSX element node, occurring in text (phrasing).
4001
4001
  */
4002
- mdxJsxTextElement: MdxJsxTextElement$2
4002
+ mdxJsxTextElement: MdxJsxTextElement
4003
4003
  }
4004
4004
 
4005
4005
  interface RootContentMap {
4006
4006
  /**
4007
4007
  * MDX JSX element node, occurring in flow (block).
4008
4008
  */
4009
- mdxJsxFlowElement: MdxJsxFlowElement$2
4009
+ mdxJsxFlowElement: MdxJsxFlowElement
4010
4010
  /**
4011
4011
  * MDX JSX element node, occurring in text (phrasing).
4012
4012
  */
4013
- mdxJsxTextElement: MdxJsxTextElement$2
4013
+ mdxJsxTextElement: MdxJsxTextElement
4014
4014
  }
4015
4015
  }
4016
4016
 
@@ -4020,22 +4020,22 @@ declare module 'hast' {
4020
4020
  /**
4021
4021
  * MDX JSX element node, occurring in text (phrasing).
4022
4022
  */
4023
- mdxJsxTextElement: MdxJsxTextElementHast$2
4023
+ mdxJsxTextElement: MdxJsxTextElementHast
4024
4024
  /**
4025
4025
  * MDX JSX element node, occurring in flow (block).
4026
4026
  */
4027
- mdxJsxFlowElement: MdxJsxFlowElementHast$2
4027
+ mdxJsxFlowElement: MdxJsxFlowElementHast
4028
4028
  }
4029
4029
 
4030
4030
  interface RootContentMap {
4031
4031
  /**
4032
4032
  * MDX JSX element node, occurring in text (phrasing).
4033
4033
  */
4034
- mdxJsxTextElement: MdxJsxTextElementHast$2
4034
+ mdxJsxTextElement: MdxJsxTextElementHast
4035
4035
  /**
4036
4036
  * MDX JSX element node, occurring in flow (block).
4037
4037
  */
4038
- mdxJsxFlowElement: MdxJsxFlowElementHast$2
4038
+ mdxJsxFlowElement: MdxJsxFlowElementHast
4039
4039
  }
4040
4040
  }
4041
4041
 
@@ -4045,12 +4045,12 @@ declare module 'mdast-util-from-markdown' {
4045
4045
  /**
4046
4046
  * Current MDX JSX tag.
4047
4047
  */
4048
- mdxJsxTag?: Tag$1 | undefined
4048
+ mdxJsxTag?: Tag | undefined
4049
4049
 
4050
4050
  /**
4051
4051
  * Current stack of open MDX JSX tags.
4052
4052
  */
4053
- mdxJsxTagStack?: Tag$1[] | undefined
4053
+ mdxJsxTagStack?: Tag[] | undefined
4054
4054
  }
4055
4055
  }
4056
4056
 
@@ -4247,26 +4247,6 @@ declare module 'hast' {
4247
4247
  }
4248
4248
  }
4249
4249
 
4250
- declare module 'micromark-util-types' {
4251
- interface TokenTypeMap {
4252
- listItem: 'listItem'
4253
- }
4254
-
4255
- interface Token {
4256
- _spread?: boolean
4257
- }
4258
- }
4259
-
4260
- declare module 'micromark-util-types' {
4261
- interface TokenTypeMap {
4262
- listItem: 'listItem'
4263
- }
4264
-
4265
- interface Token {
4266
- _spread?: boolean
4267
- }
4268
- }
4269
-
4270
4250
  /**
4271
4251
  * MDX expression node, occurring in flow (block).
4272
4252
  */
@@ -4423,7 +4403,7 @@ declare module 'hast' {
4423
4403
  /**
4424
4404
  * MDX ESM (import/export) node.
4425
4405
  */
4426
- interface MdxjsEsm$3 extends Literal$1 {
4406
+ interface MdxjsEsm$1 extends Literal$1 {
4427
4407
  /**
4428
4408
  * Node type.
4429
4409
  */
@@ -4432,13 +4412,13 @@ interface MdxjsEsm$3 extends Literal$1 {
4432
4412
  /**
4433
4413
  * Data associated with mdast MDX.js ESM.
4434
4414
  */
4435
- data?: MdxjsEsmData$3 | undefined
4415
+ data?: MdxjsEsmData$1 | undefined
4436
4416
  }
4437
4417
 
4438
4418
  /**
4439
4419
  * Info associated with mdast MDX.js ESM nodes by the ecosystem.
4440
4420
  */
4441
- interface MdxjsEsmData$3 extends Data$6 {
4421
+ interface MdxjsEsmData$1 extends Data$6 {
4442
4422
  /**
4443
4423
  * Program node from estree.
4444
4424
  */
@@ -4448,7 +4428,7 @@ interface MdxjsEsmData$3 extends Data$6 {
4448
4428
  /**
4449
4429
  * MDX ESM (import/export) node (for hast).
4450
4430
  */
4451
- interface MdxjsEsmHast$3 extends Literal {
4431
+ interface MdxjsEsmHast$1 extends Literal {
4452
4432
  /**
4453
4433
  * Node type.
4454
4434
  */
@@ -4457,13 +4437,13 @@ interface MdxjsEsmHast$3 extends Literal {
4457
4437
  /**
4458
4438
  * Data associated with hast MDX.js ESM.
4459
4439
  */
4460
- data?: MdxjsEsmHastData$3 | undefined
4440
+ data?: MdxjsEsmHastData$1 | undefined
4461
4441
  }
4462
4442
 
4463
4443
  /**
4464
4444
  * Info associated with hast MDX.js ESM nodes by the ecosystem.
4465
4445
  */
4466
- interface MdxjsEsmHastData$3 extends Data$5 {
4446
+ interface MdxjsEsmHastData$1 extends Data$5 {
4467
4447
  /**
4468
4448
  * Program node from estree.
4469
4449
  */
@@ -4476,14 +4456,14 @@ declare module 'mdast' {
4476
4456
  /**
4477
4457
  * MDX ESM.
4478
4458
  */
4479
- mdxjsEsm: MdxjsEsm$3
4459
+ mdxjsEsm: MdxjsEsm$1
4480
4460
  }
4481
4461
 
4482
4462
  interface RootContentMap {
4483
4463
  /**
4484
4464
  * MDX ESM.
4485
4465
  */
4486
- mdxjsEsm: MdxjsEsm$3
4466
+ mdxjsEsm: MdxjsEsm$1
4487
4467
  }
4488
4468
  }
4489
4469
 
@@ -4493,14 +4473,14 @@ declare module 'hast' {
4493
4473
  /**
4494
4474
  * MDX ESM.
4495
4475
  */
4496
- mdxjsEsm: MdxjsEsmHast$3
4476
+ mdxjsEsm: MdxjsEsmHast$1
4497
4477
  }
4498
4478
  }
4499
4479
 
4500
4480
  /**
4501
4481
  * MDX ESM (import/export) node.
4502
4482
  */
4503
- interface MdxjsEsm$2 extends Literal$1 {
4483
+ interface MdxjsEsm extends Literal$1 {
4504
4484
  /**
4505
4485
  * Node type.
4506
4486
  */
@@ -4509,13 +4489,13 @@ interface MdxjsEsm$2 extends Literal$1 {
4509
4489
  /**
4510
4490
  * Data associated with mdast MDX.js ESM.
4511
4491
  */
4512
- data?: MdxjsEsmData$2 | undefined
4492
+ data?: MdxjsEsmData | undefined
4513
4493
  }
4514
4494
 
4515
4495
  /**
4516
4496
  * Info associated with mdast MDX.js ESM nodes by the ecosystem.
4517
4497
  */
4518
- interface MdxjsEsmData$2 extends Data$6 {
4498
+ interface MdxjsEsmData extends Data$6 {
4519
4499
  /**
4520
4500
  * Program node from estree.
4521
4501
  */
@@ -4525,7 +4505,7 @@ interface MdxjsEsmData$2 extends Data$6 {
4525
4505
  /**
4526
4506
  * MDX ESM (import/export) node (for hast).
4527
4507
  */
4528
- interface MdxjsEsmHast$2 extends Literal {
4508
+ interface MdxjsEsmHast extends Literal {
4529
4509
  /**
4530
4510
  * Node type.
4531
4511
  */
@@ -4534,13 +4514,13 @@ interface MdxjsEsmHast$2 extends Literal {
4534
4514
  /**
4535
4515
  * Data associated with hast MDX.js ESM.
4536
4516
  */
4537
- data?: MdxjsEsmHastData$2 | undefined
4517
+ data?: MdxjsEsmHastData | undefined
4538
4518
  }
4539
4519
 
4540
4520
  /**
4541
4521
  * Info associated with hast MDX.js ESM nodes by the ecosystem.
4542
4522
  */
4543
- interface MdxjsEsmHastData$2 extends Data$5 {
4523
+ interface MdxjsEsmHastData extends Data$5 {
4544
4524
  /**
4545
4525
  * Program node from estree.
4546
4526
  */
@@ -4553,14 +4533,14 @@ declare module 'mdast' {
4553
4533
  /**
4554
4534
  * MDX ESM.
4555
4535
  */
4556
- mdxjsEsm: MdxjsEsm$2
4536
+ mdxjsEsm: MdxjsEsm
4557
4537
  }
4558
4538
 
4559
4539
  interface RootContentMap {
4560
4540
  /**
4561
4541
  * MDX ESM.
4562
4542
  */
4563
- mdxjsEsm: MdxjsEsm$2
4543
+ mdxjsEsm: MdxjsEsm
4564
4544
  }
4565
4545
  }
4566
4546
 
@@ -4570,7 +4550,7 @@ declare module 'hast' {
4570
4550
  /**
4571
4551
  * MDX ESM.
4572
4552
  */
4573
- mdxjsEsm: MdxjsEsmHast$2
4553
+ mdxjsEsm: MdxjsEsmHast
4574
4554
  }
4575
4555
  }
4576
4556
 
@@ -4777,1805 +4757,6 @@ type ExtraOptions = {
4777
4757
  */
4778
4758
  type CompileOptions$1 = CoreProcessorOptions & ExtraOptions;
4779
4759
 
4780
- /**
4781
- * MDX ESM (import/export) node.
4782
- */
4783
- interface MdxjsEsm$1 extends Literal$1 {
4784
- /**
4785
- * Node type.
4786
- */
4787
- type: 'mdxjsEsm'
4788
-
4789
- /**
4790
- * Data associated with mdast MDX.js ESM.
4791
- */
4792
- data?: MdxjsEsmData$1 | undefined
4793
- }
4794
-
4795
- /**
4796
- * Info associated with mdast MDX.js ESM nodes by the ecosystem.
4797
- */
4798
- interface MdxjsEsmData$1 extends Data$6 {
4799
- /**
4800
- * Program node from estree.
4801
- */
4802
- estree?: Program | null | undefined
4803
- }
4804
-
4805
- /**
4806
- * MDX ESM (import/export) node (for hast).
4807
- */
4808
- interface MdxjsEsmHast$1 extends Literal {
4809
- /**
4810
- * Node type.
4811
- */
4812
- type: 'mdxjsEsm'
4813
-
4814
- /**
4815
- * Data associated with hast MDX.js ESM.
4816
- */
4817
- data?: MdxjsEsmHastData$1 | undefined
4818
- }
4819
-
4820
- /**
4821
- * Info associated with hast MDX.js ESM nodes by the ecosystem.
4822
- */
4823
- interface MdxjsEsmHastData$1 extends Data$5 {
4824
- /**
4825
- * Program node from estree.
4826
- */
4827
- estree?: Program | null | undefined
4828
- }
4829
-
4830
- // Add nodes to mdast content.
4831
- declare module 'mdast' {
4832
- interface FrontmatterContentMap {
4833
- /**
4834
- * MDX ESM.
4835
- */
4836
- mdxjsEsm: MdxjsEsm$1
4837
- }
4838
-
4839
- interface RootContentMap {
4840
- /**
4841
- * MDX ESM.
4842
- */
4843
- mdxjsEsm: MdxjsEsm$1
4844
- }
4845
- }
4846
-
4847
- // Add nodes to hast content.
4848
- declare module 'hast' {
4849
- interface RootContentMap {
4850
- /**
4851
- * MDX ESM.
4852
- */
4853
- mdxjsEsm: MdxjsEsmHast$1
4854
- }
4855
- }
4856
-
4857
- declare module 'micromark-util-types' {
4858
- interface TokenTypeMap {
4859
- listItem: 'listItem'
4860
- }
4861
-
4862
- interface Token {
4863
- _spread?: boolean
4864
- }
4865
- }
4866
-
4867
- // Note: this file is authored manually, not generated from `index.js`.
4868
-
4869
- /**
4870
- * A character code.
4871
- *
4872
- * This is often the same as what `String#charCodeAt()` yields but micromark
4873
- * adds meaning to certain other values.
4874
- *
4875
- * `null` represents the end of the input stream (called eof).
4876
- * Negative integers are used instead of certain sequences of characters (such
4877
- * as line endings and tabs).
4878
- */
4879
- type Code = number | null
4880
-
4881
- /**
4882
- * A chunk is either a character code or a slice of a buffer in the form of a
4883
- * string.
4884
- *
4885
- * Chunks are used because strings are more efficient storage that character
4886
- * codes, but limited in what they can represent.
4887
- */
4888
- type Chunk = Code | string
4889
-
4890
- /**
4891
- * Enumeration of the content types.
4892
- *
4893
- * Technically `document` is also a content type, which includes containers
4894
- * (lists, block quotes) and flow.
4895
- * As `ContentType` is used on tokens to define the type of subcontent but
4896
- * `document` is the highest level of content, so it’s not listed here.
4897
- *
4898
- * Containers in markdown come from the margin and include more constructs
4899
- * on the lines that define them.
4900
- * Take for example a block quote with a paragraph inside it (such as
4901
- * `> asd`).
4902
- *
4903
- * `flow` represents the sections, such as headings, code, and content, which
4904
- * is also parsed per line
4905
- * An example is HTML, which has a certain starting condition (such as
4906
- * `<script>` on its own line), then continues for a while, until an end
4907
- * condition is found (such as `</style>`).
4908
- * If that line with an end condition is never found, that flow goes until
4909
- * the end.
4910
- *
4911
- * `content` is zero or more definitions, and then zero or one paragraph.
4912
- * It’s a weird one, and needed to make certain edge cases around definitions
4913
- * spec compliant.
4914
- * Definitions are unlike other things in markdown, in that they behave like
4915
- * `text` in that they can contain arbitrary line endings, but *have* to end
4916
- * at a line ending.
4917
- * If they end in something else, the whole definition instead is seen as a
4918
- * paragraph.
4919
- *
4920
- * The content in markdown first needs to be parsed up to this level to
4921
- * figure out which things are defined, for the whole document, before
4922
- * continuing on with `text`, as whether a link or image reference forms or
4923
- * not depends on whether it’s defined.
4924
- * This unfortunately prevents a true streaming markdown to HTML compiler.
4925
- *
4926
- * `text` contains phrasing content such as attention (emphasis, strong),
4927
- * media (links, images), and actual text.
4928
- *
4929
- * `string` is a limited `text` like content type which only allows character
4930
- * references and character escapes.
4931
- * It exists in things such as identifiers (media references, definitions),
4932
- * titles, or URLs.
4933
- */
4934
- type ContentType = 'content' | 'document' | 'flow' | 'string' | 'text'
4935
-
4936
- /**
4937
- * A location in the document (`line`/`column`/`offset`) and chunk (`_index`,
4938
- * `_bufferIndex`).
4939
- *
4940
- * `_bufferIndex` is `-1` when `_index` points to a code chunk and it’s a
4941
- * non-negative integer when pointing to a string chunk.
4942
- *
4943
- * The interface for the location in the document comes from unist `Point`:
4944
- * <https://github.com/syntax-tree/unist#point>
4945
- */
4946
- type Point = {
4947
- /**
4948
- * Position in a string chunk (or `-1` when pointing to a numeric chunk).
4949
- */
4950
- _bufferIndex: number
4951
-
4952
- /**
4953
- * Position in a list of chunks.
4954
- */
4955
- _index: number
4956
-
4957
- /**
4958
- * 1-indexed column number.
4959
- */
4960
- column: number
4961
-
4962
- /**
4963
- * 1-indexed line number.
4964
- */
4965
- line: number
4966
-
4967
- /**
4968
- * 0-indexed position in the document.
4969
- */
4970
- offset: number
4971
- }
4972
-
4973
- /**
4974
- * A token: a span of chunks.
4975
- *
4976
- * Tokens are what the core of micromark produces: the built in HTML compiler
4977
- * or other tools can turn them into different things.
4978
- *
4979
- * Tokens are essentially names attached to a slice of chunks, such as
4980
- * `lineEndingBlank` for certain line endings, or `codeFenced` for a whole
4981
- * fenced code.
4982
- *
4983
- * Sometimes, more info is attached to tokens, such as `_open` and `_close`
4984
- * by `attention` (strong, emphasis) to signal whether the sequence can open
4985
- * or close an attention run.
4986
- *
4987
- * Linked tokens are used because outer constructs are parsed first.
4988
- * Take for example:
4989
- *
4990
- * ```markdown
4991
- * > *a
4992
- * b*.
4993
- * ```
4994
- *
4995
- * 1. The block quote marker and the space after it is parsed first
4996
- * 2. The rest of the line is a `chunkFlow` token
4997
- * 3. The two spaces on the second line are a `linePrefix`
4998
- * 4. The rest of the line is another `chunkFlow` token
4999
- *
5000
- * The two `chunkFlow` tokens are linked together.
5001
- * The chunks they span are then passed through the flow tokenizer.
5002
- */
5003
- interface Token$2 {
5004
- /**
5005
- * Token type.
5006
- */
5007
- type: TokenType
5008
-
5009
- /**
5010
- * Point where the token starts.
5011
- */
5012
- start: Point
5013
-
5014
- /**
5015
- * Point where the token ends.
5016
- */
5017
- end: Point
5018
-
5019
- /**
5020
- * The previous token in a list of linked tokens.
5021
- */
5022
- previous?: Token$2 | undefined
5023
-
5024
- /**
5025
- * The next token in a list of linked tokens.
5026
- */
5027
- next?: Token$2 | undefined
5028
-
5029
- /**
5030
- * Declares a token as having content of a certain type.
5031
- */
5032
- contentType?: ContentType | undefined
5033
-
5034
- /**
5035
- * Connected tokenizer.
5036
- *
5037
- * Used when dealing with linked tokens.
5038
- * A child tokenizer is needed to tokenize them, which is stored on those
5039
- * tokens.
5040
- */
5041
- _tokenizer?: TokenizeContext | undefined
5042
-
5043
- /**
5044
- * Field to help parse attention.
5045
- *
5046
- * Depending on the character before sequences (`**`), the sequence can open,
5047
- * close, both, or none.
5048
- */
5049
- _open?: boolean | undefined
5050
-
5051
- /**
5052
- * Field to help parse attention.
5053
- *
5054
- * Depending on the character before sequences (`**`), the sequence can open,
5055
- * close, both, or none.
5056
- */
5057
- _close?: boolean | undefined
5058
-
5059
- /**
5060
- * Field to help parse GFM task lists.
5061
- *
5062
- * This boolean is used internally to figure out if a token is in the first
5063
- * content of a list item construct.
5064
- */
5065
- _isInFirstContentOfListItem?: boolean | undefined
5066
-
5067
- /**
5068
- * Field to help parse containers.
5069
- *
5070
- * This boolean is used internally to figure out if a token is a container
5071
- * token.
5072
- */
5073
- _container?: boolean | undefined
5074
-
5075
- /**
5076
- * Field to help parse lists.
5077
- *
5078
- * This boolean is used internally to figure out if a list is loose or not.
5079
- */
5080
- _loose?: boolean | undefined
5081
-
5082
- /**
5083
- * Field to help parse links.
5084
- *
5085
- * This boolean is used internally to figure out if a link opening
5086
- * can’t be used (because links in links are incorrect).
5087
- */
5088
- _inactive?: boolean | undefined
5089
-
5090
- /**
5091
- * Field to help parse links.
5092
- *
5093
- * This boolean is used internally to figure out if a link opening is
5094
- * balanced: it’s not a link opening but has a balanced closing.
5095
- */
5096
- _balanced?: boolean | undefined
5097
- }
5098
-
5099
- /**
5100
- * The start or end of a token amongst other events.
5101
- *
5102
- * Tokens can “contain” other tokens, even though they are stored in a flat
5103
- * list, through `enter`ing before them, and `exit`ing after them.
5104
- */
5105
- type Event = ['enter' | 'exit', Token$2, TokenizeContext]
5106
-
5107
- /**
5108
- * Open a token.
5109
- *
5110
- * @param type
5111
- * Token type.
5112
- * @param fields
5113
- * Extra fields.
5114
- * @returns {Token}
5115
- * Token.
5116
- */
5117
- type Enter = (
5118
- type: TokenType,
5119
- fields?: Omit<Partial<Token$2>, 'type'> | undefined
5120
- ) => Token$2
5121
-
5122
- /**
5123
- * Close a token.
5124
- *
5125
- * @param type
5126
- * Token type.
5127
- * @returns
5128
- * Token.
5129
- */
5130
- type Exit = (type: TokenType) => Token$2
5131
-
5132
- /**
5133
- * Deal with the character and move to the next.
5134
- *
5135
- * @param code
5136
- * Current code.
5137
- */
5138
- type Consume = (code: Code) => undefined
5139
-
5140
- /**
5141
- * Attempt deals with several values, and tries to parse according to those
5142
- * values.
5143
- *
5144
- * If a value resulted in `ok`, it worked, the tokens that were made are used,
5145
- * and `ok` is switched to.
5146
- * If the result is `nok`, the attempt failed, so we revert to the original
5147
- * state, and `nok` is used.
5148
- *
5149
- * @param construct
5150
- * Construct(s) to try.
5151
- * @param ok
5152
- * State to move to when successful.
5153
- * @param nok
5154
- * State to move to when unsuccessful.
5155
- * @returns
5156
- * Next state.
5157
- */
5158
- type Attempt = (
5159
- construct: Array<Construct> | Construct | ConstructRecord,
5160
- ok: State,
5161
- nok?: State | undefined
5162
- ) => State
5163
-
5164
- /**
5165
- * A context object to transition the state machine.
5166
- */
5167
- type Effects = {
5168
- /**
5169
- * Start a new token.
5170
- */
5171
- enter: Enter
5172
-
5173
- /**
5174
- * End a started token.
5175
- */
5176
- exit: Exit
5177
-
5178
- /**
5179
- * Deal with the character and move to the next.
5180
- */
5181
- consume: Consume
5182
-
5183
- /**
5184
- * Try to tokenize a construct.
5185
- */
5186
- attempt: Attempt
5187
-
5188
- /**
5189
- * Interrupt is used for stuff right after a line of content.
5190
- */
5191
- interrupt: Attempt
5192
-
5193
- /**
5194
- * Attempt, then revert.
5195
- */
5196
- check: Attempt
5197
- }
5198
-
5199
- /**
5200
- * The main unit in the state machine: a function that gets a character code
5201
- * and has certain effects.
5202
- *
5203
- * A state function should return another function: the next
5204
- * state-as-a-function to go to.
5205
- *
5206
- * But there is one case where they return `undefined`: for the eof character
5207
- * code (at the end of a value).
5208
- * The reason being: well, there isn’t any state that makes sense, so
5209
- * `undefined` works well.
5210
- * Practically that has also helped: if for some reason it was a mistake, then
5211
- * an exception is throw because there is no next function, meaning it
5212
- * surfaces early.
5213
- *
5214
- * @param code
5215
- * Current code.
5216
- * @returns
5217
- * Next state.
5218
- */
5219
- type State = (code: Code) => State | undefined
5220
-
5221
- /**
5222
- * A resolver handles and cleans events coming from `tokenize`.
5223
- *
5224
- * @param events
5225
- * List of events.
5226
- * @param context
5227
- * Tokenize context.
5228
- * @returns
5229
- * The given, modified, events.
5230
- */
5231
- type Resolver = (
5232
- events: Array<Event>,
5233
- context: TokenizeContext
5234
- ) => Array<Event>
5235
-
5236
- /**
5237
- * A tokenize function sets up a state machine to handle character codes streaming in.
5238
- *
5239
- * @param this
5240
- * Tokenize context.
5241
- * @param effects
5242
- * Effects.
5243
- * @param ok
5244
- * State to go to when successful.
5245
- * @param nok
5246
- * State to go to when unsuccessful.
5247
- * @returns
5248
- * First state.
5249
- */
5250
- type Tokenizer = (
5251
- this: TokenizeContext,
5252
- effects: Effects,
5253
- ok: State,
5254
- nok: State
5255
- ) => State
5256
-
5257
- /**
5258
- * Like a tokenizer, but without `ok` or `nok`, and returning `undefined`.
5259
- *
5260
- * This is the final hook when a container must be closed.
5261
- *
5262
- * @param this
5263
- * Tokenize context.
5264
- * @param effects
5265
- * Effects.
5266
- * @returns
5267
- * Nothing.
5268
- */
5269
- type Exiter = (this: TokenizeContext, effects: Effects) => undefined
5270
-
5271
- /**
5272
- * Guard whether `code` can come before the construct.
5273
- *
5274
- * In certain cases a construct can hook into many potential start characters.
5275
- * Instead of setting up an attempt to parse that construct for most
5276
- * characters, this is a speedy way to reduce that.
5277
- *
5278
- * @param this
5279
- * Tokenize context.
5280
- * @param code
5281
- * Previous code.
5282
- * @returns
5283
- * Whether `code` is allowed before.
5284
- */
5285
- type Previous = (this: TokenizeContext, code: Code) => boolean
5286
-
5287
- /**
5288
- * An object describing how to parse a markdown construct.
5289
- */
5290
- type Construct = {
5291
- /**
5292
- * Set up a state machine to handle character codes streaming in.
5293
- */
5294
- tokenize: Tokenizer
5295
-
5296
- /**
5297
- * Guard whether the previous character can come before the construct.
5298
- */
5299
- previous?: Previous | undefined
5300
-
5301
- /**
5302
- * For containers, a continuation construct.
5303
- */
5304
- continuation?: Construct | undefined
5305
-
5306
- /**
5307
- * For containers, a final hook.
5308
- */
5309
- exit?: Exiter | undefined
5310
-
5311
- /**
5312
- * Name of the construct, used to toggle constructs off.
5313
- *
5314
- * Named constructs must not be `partial`.
5315
- */
5316
- name?: string | undefined
5317
-
5318
- /**
5319
- * Whether this construct represents a partial construct.
5320
- *
5321
- * Partial constructs must not have a `name`.
5322
- */
5323
- partial?: boolean | undefined
5324
-
5325
- /**
5326
- * Resolve the events parsed by `tokenize`.
5327
- *
5328
- * For example, if we’re currently parsing a link title and this construct
5329
- * parses character references, then `resolve` is called with the events
5330
- * ranging from the start to the end of a character reference each time one is
5331
- * found.
5332
- */
5333
- resolve?: Resolver | undefined
5334
-
5335
- /**
5336
- * Resolve the events from the start of the content (which includes other
5337
- * constructs) to the last one parsed by `tokenize`.
5338
- *
5339
- * For example, if we’re currently parsing a link title and this construct
5340
- * parses character references, then `resolveTo` is called with the events
5341
- * ranging from the start of the link title to the end of a character
5342
- * reference each time one is found.
5343
- */
5344
- resolveTo?: Resolver | undefined
5345
-
5346
- /**
5347
- * Resolve all events when the content is complete, from the start to the end.
5348
- * Only used if `tokenize` is successful once in the content.
5349
- *
5350
- * For example, if we’re currently parsing a link title and this construct
5351
- * parses character references, then `resolveAll` is called *if* at least one
5352
- * character reference is found, ranging from the start to the end of the link
5353
- * title to the end.
5354
- */
5355
- resolveAll?: Resolver | undefined
5356
-
5357
- /**
5358
- * Concrete constructs cannot be interrupted by more containers.
5359
- *
5360
- * For example, when parsing the document (containers, such as block quotes
5361
- * and lists) and this construct is parsing fenced code:
5362
- *
5363
- * ````markdown
5364
- * > ```js
5365
- * > - list?
5366
- * ````
5367
- *
5368
- * …then `- list?` cannot form if this fenced code construct is concrete.
5369
- *
5370
- * An example of a construct that is not concrete is a GFM table:
5371
- *
5372
- * ````markdown
5373
- * | a |
5374
- * | - |
5375
- * > | b |
5376
- * ````
5377
- *
5378
- * …`b` is not part of the table.
5379
- */
5380
- concrete?: boolean | undefined
5381
-
5382
- /**
5383
- * Whether the construct, when in a `ConstructRecord`, precedes over existing
5384
- * constructs for the same character code when merged.
5385
- *
5386
- * The default is that new constructs precede over existing ones.
5387
- */
5388
- add?: 'after' | 'before' | undefined
5389
- }
5390
-
5391
- /**
5392
- * Several constructs, mapped from their initial codes.
5393
- */
5394
- type ConstructRecord = Record<
5395
- string,
5396
- Array<Construct> | Construct | undefined
5397
- >
5398
-
5399
- /**
5400
- * State shared between container calls.
5401
- */
5402
- interface ContainerState {
5403
- /**
5404
- * Special field to close the current flow (or containers).
5405
- */
5406
- _closeFlow?: boolean | undefined
5407
-
5408
- /**
5409
- * Used by block quotes.
5410
- */
5411
- open?: boolean | undefined
5412
-
5413
- /**
5414
- * Current marker, used by lists.
5415
- */
5416
- marker?: Code | undefined
5417
-
5418
- /**
5419
- * Current token type, used by lists.
5420
- */
5421
- type?: TokenType | undefined
5422
-
5423
- /**
5424
- * Current size, used by lists.
5425
- */
5426
- size?: number | undefined
5427
-
5428
- /**
5429
- * Whether there first line is blank, used by lists.
5430
- */
5431
- initialBlankLine?: boolean | undefined
5432
-
5433
- /**
5434
- * Whether there are further blank lines, used by lists.
5435
- */
5436
- furtherBlankLines?: boolean | undefined
5437
- }
5438
-
5439
- /**
5440
- * A context object that helps w/ tokenizing markdown constructs.
5441
- */
5442
- interface TokenizeContext {
5443
- /**
5444
- * The previous code.
5445
- */
5446
- previous: Code
5447
-
5448
- /**
5449
- * Current code.
5450
- */
5451
- code: Code
5452
-
5453
- /**
5454
- * Whether we’re currently interrupting.
5455
- *
5456
- * Take for example:
5457
- *
5458
- * ```markdown
5459
- * a
5460
- * # b
5461
- * ```
5462
- *
5463
- * At 2:1, we’re “interrupting”.
5464
- */
5465
- interrupt?: boolean | undefined
5466
-
5467
- /**
5468
- * The current construct.
5469
- *
5470
- * Constructs that are not `partial` are set here.
5471
- */
5472
- currentConstruct?: Construct | undefined
5473
-
5474
- /**
5475
- * share state set when parsing containers.
5476
- *
5477
- * Containers are parsed in separate phases: their first line (`tokenize`),
5478
- * continued lines (`continuation.tokenize`), and finally `exit`.
5479
- * This record can be used to store some information between these hooks.
5480
- */
5481
- containerState?: ContainerState | undefined
5482
-
5483
- /**
5484
- * Current list of events.
5485
- */
5486
- events: Array<Event>
5487
-
5488
- /**
5489
- * The relevant parsing context.
5490
- */
5491
- parser: ParseContext
5492
-
5493
- /**
5494
- * Get the chunks that span a token (or location).
5495
- *
5496
- * @param token
5497
- * Start/end in stream.
5498
- * @returns
5499
- * List of chunks.
5500
- */
5501
- sliceStream: (token: Pick<Token$2, 'end' | 'start'>) => Array<Chunk>
5502
-
5503
- /**
5504
- * Get the source text that spans a token (or location).
5505
- *
5506
- * @param token
5507
- * Start/end in stream.
5508
- * @param expandTabs
5509
- * Whether to expand tabs.
5510
- * @returns
5511
- * Serialized chunks.
5512
- */
5513
- sliceSerialize: (
5514
- token: Pick<Token$2, 'end' | 'start'>,
5515
- expandTabs?: boolean | undefined
5516
- ) => string
5517
-
5518
- /**
5519
- * Get the current place.
5520
- *
5521
- * @returns
5522
- * Current point.
5523
- */
5524
- now: () => Point
5525
-
5526
- /**
5527
- * Define a skip
5528
- *
5529
- * As containers (block quotes, lists), “nibble” a prefix from the margins,
5530
- * where a line starts after that prefix is defined here.
5531
- * When the tokenizers moves after consuming a line ending corresponding to
5532
- * the line number in the given point, the tokenizer shifts past the prefix
5533
- * based on the column in the shifted point.
5534
- *
5535
- * @param point
5536
- * Skip.
5537
- * @returns
5538
- * Nothing.
5539
- */
5540
- defineSkip: (point: Point) => undefined
5541
-
5542
- /**
5543
- * Write a slice of chunks.
5544
- *
5545
- * The eof code (`null`) can be used to signal the end of the stream.
5546
- *
5547
- * @param slice
5548
- * Chunks.
5549
- * @returns
5550
- * Events.
5551
- */
5552
- write: (slice: Array<Chunk>) => Array<Event>
5553
-
5554
- /**
5555
- * Internal boolean shared with `micromark-extension-gfm-task-list-item` to
5556
- * signal whether the tokenizer is tokenizing the first content of a list item
5557
- * construct.
5558
- */
5559
- _gfmTasklistFirstContentOfListItem?: boolean | undefined
5560
-
5561
- // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer
5562
- // needed in micromark-extension-gfm-table@1.0.6).
5563
- /**
5564
- * Internal boolean shared with `micromark-extension-gfm-table` whose body
5565
- * rows are not affected by normal interruption rules.
5566
- * “Normal” rules are, for example, that an empty list item can’t interrupt:
5567
- *
5568
- * ````markdown
5569
- * a
5570
- * *
5571
- * ````
5572
- *
5573
- * The above is one paragraph.
5574
- * These rules don’t apply to table body rows:
5575
- *
5576
- * ````markdown
5577
- * | a |
5578
- * | - |
5579
- * *
5580
- * ````
5581
- *
5582
- * The above list interrupts the table.
5583
- */
5584
- _gfmTableDynamicInterruptHack?: boolean
5585
- }
5586
-
5587
- /**
5588
- * A syntax extension changes how markdown is tokenized.
5589
- *
5590
- * See: <https://github.com/micromark/micromark#syntaxextension>
5591
- */
5592
- interface Extension {
5593
- document?: ConstructRecord | undefined
5594
- contentInitial?: ConstructRecord | undefined
5595
- flowInitial?: ConstructRecord | undefined
5596
- flow?: ConstructRecord | undefined
5597
- string?: ConstructRecord | undefined
5598
- text?: ConstructRecord | undefined
5599
- disable?: {null?: Array<string> | undefined} | undefined
5600
- insideSpan?:
5601
- | {null?: Array<Pick<Construct, 'resolveAll'>> | undefined}
5602
- | undefined
5603
- attentionMarkers?: {null?: Array<Code> | undefined} | undefined
5604
- }
5605
-
5606
- /**
5607
- * A full, filtereed, normalized, extension.
5608
- */
5609
- type FullNormalizedExtension = {
5610
- [Key in keyof Extension]-?: Exclude<Extension[Key], undefined>
5611
- }
5612
-
5613
- /**
5614
- * Create a context.
5615
- *
5616
- * @param from
5617
- * Where to create from.
5618
- * @returns
5619
- * Context.
5620
- */
5621
- type Create = (
5622
- from?: Omit<Point, '_bufferIndex' | '_index'> | undefined
5623
- ) => TokenizeContext
5624
-
5625
- /**
5626
- * A context object that helps w/ parsing markdown.
5627
- */
5628
- interface ParseContext {
5629
- /**
5630
- * All constructs.
5631
- */
5632
- constructs: FullNormalizedExtension
5633
-
5634
- /**
5635
- * Create a content tokenizer.
5636
- */
5637
- content: Create
5638
-
5639
- /**
5640
- * Create a document tokenizer.
5641
- */
5642
- document: Create
5643
-
5644
- /**
5645
- * Create a flow tokenizer.
5646
- */
5647
- flow: Create
5648
-
5649
- /**
5650
- * Create a string tokenizer.
5651
- */
5652
- string: Create
5653
-
5654
- /**
5655
- * Create a text tokenizer.
5656
- */
5657
- text: Create
5658
-
5659
- /**
5660
- * List of defined identifiers.
5661
- */
5662
- defined: Array<string>
5663
-
5664
- /**
5665
- * Map of line numbers to whether they are lazy (as opposed to the line before
5666
- * them).
5667
- * Take for example:
5668
- *
5669
- * ```markdown
5670
- * > a
5671
- * b
5672
- * ```
5673
- *
5674
- * L1 here is not lazy, L2 is.
5675
- */
5676
- lazy: Record<number, boolean>
5677
- }
5678
-
5679
- /**
5680
- * Enum of allowed token types.
5681
- */
5682
- type TokenType = keyof TokenTypeMap
5683
-
5684
- // Note: when changing the next interface, you likely also have to change
5685
- // `micromark-util-symbol`.
5686
- /**
5687
- * Map of allowed token types.
5688
- */
5689
- interface TokenTypeMap {
5690
- // Note: these are compiled away.
5691
- attentionSequence: 'attentionSequence' // To do: remove.
5692
- space: 'space' // To do: remove.
5693
-
5694
- data: 'data'
5695
- whitespace: 'whitespace'
5696
- lineEnding: 'lineEnding'
5697
- lineEndingBlank: 'lineEndingBlank'
5698
- linePrefix: 'linePrefix'
5699
- lineSuffix: 'lineSuffix'
5700
- atxHeading: 'atxHeading'
5701
- atxHeadingSequence: 'atxHeadingSequence'
5702
- atxHeadingText: 'atxHeadingText'
5703
- autolink: 'autolink'
5704
- autolinkEmail: 'autolinkEmail'
5705
- autolinkMarker: 'autolinkMarker'
5706
- autolinkProtocol: 'autolinkProtocol'
5707
- characterEscape: 'characterEscape'
5708
- characterEscapeValue: 'characterEscapeValue'
5709
- characterReference: 'characterReference'
5710
- characterReferenceMarker: 'characterReferenceMarker'
5711
- characterReferenceMarkerNumeric: 'characterReferenceMarkerNumeric'
5712
- characterReferenceMarkerHexadecimal: 'characterReferenceMarkerHexadecimal'
5713
- characterReferenceValue: 'characterReferenceValue'
5714
- codeFenced: 'codeFenced'
5715
- codeFencedFence: 'codeFencedFence'
5716
- codeFencedFenceSequence: 'codeFencedFenceSequence'
5717
- codeFencedFenceInfo: 'codeFencedFenceInfo'
5718
- codeFencedFenceMeta: 'codeFencedFenceMeta'
5719
- codeFlowValue: 'codeFlowValue'
5720
- codeIndented: 'codeIndented'
5721
- codeText: 'codeText'
5722
- codeTextData: 'codeTextData'
5723
- codeTextPadding: 'codeTextPadding'
5724
- codeTextSequence: 'codeTextSequence'
5725
- content: 'content'
5726
- definition: 'definition'
5727
- definitionDestination: 'definitionDestination'
5728
- definitionDestinationLiteral: 'definitionDestinationLiteral'
5729
- definitionDestinationLiteralMarker: 'definitionDestinationLiteralMarker'
5730
- definitionDestinationRaw: 'definitionDestinationRaw'
5731
- definitionDestinationString: 'definitionDestinationString'
5732
- definitionLabel: 'definitionLabel'
5733
- definitionLabelMarker: 'definitionLabelMarker'
5734
- definitionLabelString: 'definitionLabelString'
5735
- definitionMarker: 'definitionMarker'
5736
- definitionTitle: 'definitionTitle'
5737
- definitionTitleMarker: 'definitionTitleMarker'
5738
- definitionTitleString: 'definitionTitleString'
5739
- emphasis: 'emphasis'
5740
- emphasisSequence: 'emphasisSequence'
5741
- emphasisText: 'emphasisText'
5742
- escapeMarker: 'escapeMarker'
5743
- hardBreakEscape: 'hardBreakEscape'
5744
- hardBreakTrailing: 'hardBreakTrailing'
5745
- htmlFlow: 'htmlFlow'
5746
- htmlFlowData: 'htmlFlowData'
5747
- htmlText: 'htmlText'
5748
- htmlTextData: 'htmlTextData'
5749
- image: 'image'
5750
- label: 'label'
5751
- labelText: 'labelText'
5752
- labelLink: 'labelLink'
5753
- labelImage: 'labelImage'
5754
- labelMarker: 'labelMarker'
5755
- labelImageMarker: 'labelImageMarker'
5756
- labelEnd: 'labelEnd'
5757
- link: 'link'
5758
- paragraph: 'paragraph'
5759
- reference: 'reference'
5760
- referenceMarker: 'referenceMarker'
5761
- referenceString: 'referenceString'
5762
- resource: 'resource'
5763
- resourceDestination: 'resourceDestination'
5764
- resourceDestinationLiteral: 'resourceDestinationLiteral'
5765
- resourceDestinationLiteralMarker: 'resourceDestinationLiteralMarker'
5766
- resourceDestinationRaw: 'resourceDestinationRaw'
5767
- resourceDestinationString: 'resourceDestinationString'
5768
- resourceMarker: 'resourceMarker'
5769
- resourceTitle: 'resourceTitle'
5770
- resourceTitleMarker: 'resourceTitleMarker'
5771
- resourceTitleString: 'resourceTitleString'
5772
- setextHeading: 'setextHeading'
5773
- setextHeadingText: 'setextHeadingText'
5774
- setextHeadingLine: 'setextHeadingLine'
5775
- setextHeadingLineSequence: 'setextHeadingLineSequence'
5776
- strong: 'strong'
5777
- strongSequence: 'strongSequence'
5778
- strongText: 'strongText'
5779
- thematicBreak: 'thematicBreak'
5780
- thematicBreakSequence: 'thematicBreakSequence'
5781
- blockQuote: 'blockQuote'
5782
- blockQuotePrefix: 'blockQuotePrefix'
5783
- blockQuoteMarker: 'blockQuoteMarker'
5784
- blockQuotePrefixWhitespace: 'blockQuotePrefixWhitespace'
5785
- listOrdered: 'listOrdered'
5786
- listUnordered: 'listUnordered'
5787
- listItemIndent: 'listItemIndent'
5788
- listItemMarker: 'listItemMarker'
5789
- listItemPrefix: 'listItemPrefix'
5790
- listItemPrefixWhitespace: 'listItemPrefixWhitespace'
5791
- listItemValue: 'listItemValue'
5792
- chunkDocument: 'chunkDocument'
5793
- chunkContent: 'chunkContent'
5794
- chunkFlow: 'chunkFlow'
5795
- chunkText: 'chunkText'
5796
- chunkString: 'chunkString'
5797
- }
5798
-
5799
- type Token$1 = Token$2
5800
-
5801
- declare module 'micromark-util-types' {
5802
- interface TokenTypeMap {
5803
- listItem: 'listItem'
5804
- }
5805
-
5806
- interface Token {
5807
- _spread?: boolean
5808
- }
5809
- }
5810
-
5811
- /**
5812
- * MDX ESM (import/export) node.
5813
- */
5814
- interface MdxjsEsm extends Literal$1 {
5815
- /**
5816
- * Node type.
5817
- */
5818
- type: 'mdxjsEsm'
5819
-
5820
- /**
5821
- * Data associated with mdast MDX.js ESM.
5822
- */
5823
- data?: MdxjsEsmData | undefined
5824
- }
5825
-
5826
- /**
5827
- * Info associated with mdast MDX.js ESM nodes by the ecosystem.
5828
- */
5829
- interface MdxjsEsmData extends Data$6 {
5830
- /**
5831
- * Program node from estree.
5832
- */
5833
- estree?: Program | null | undefined
5834
- }
5835
-
5836
- /**
5837
- * MDX ESM (import/export) node (for hast).
5838
- */
5839
- interface MdxjsEsmHast extends Literal {
5840
- /**
5841
- * Node type.
5842
- */
5843
- type: 'mdxjsEsm'
5844
-
5845
- /**
5846
- * Data associated with hast MDX.js ESM.
5847
- */
5848
- data?: MdxjsEsmHastData | undefined
5849
- }
5850
-
5851
- /**
5852
- * Info associated with hast MDX.js ESM nodes by the ecosystem.
5853
- */
5854
- interface MdxjsEsmHastData extends Data$5 {
5855
- /**
5856
- * Program node from estree.
5857
- */
5858
- estree?: Program | null | undefined
5859
- }
5860
-
5861
- // Add nodes to mdast content.
5862
- declare module 'mdast' {
5863
- interface FrontmatterContentMap {
5864
- /**
5865
- * MDX ESM.
5866
- */
5867
- mdxjsEsm: MdxjsEsm
5868
- }
5869
-
5870
- interface RootContentMap {
5871
- /**
5872
- * MDX ESM.
5873
- */
5874
- mdxjsEsm: MdxjsEsm
5875
- }
5876
- }
5877
-
5878
- // Add nodes to hast content.
5879
- declare module 'hast' {
5880
- interface RootContentMap {
5881
- /**
5882
- * MDX ESM.
5883
- */
5884
- mdxjsEsm: MdxjsEsmHast
5885
- }
5886
- }
5887
-
5888
- // Expose node types.
5889
- /**
5890
- * MDX JSX attribute value set to an expression.
5891
- *
5892
- * ```markdown
5893
- * > | <a b={c} />
5894
- * ^^^
5895
- * ```
5896
- */
5897
- interface MdxJsxAttributeValueExpression$1 extends Node$3 {
5898
- /**
5899
- * Node type.
5900
- */
5901
- type: 'mdxJsxAttributeValueExpression'
5902
-
5903
- /**
5904
- * Value.
5905
- */
5906
- value: string
5907
-
5908
- /**
5909
- * Data associated with the mdast MDX JSX attribute value expression.
5910
- */
5911
- data?: MdxJsxAttributeValueExpressionData$1 | undefined
5912
- }
5913
-
5914
- /**
5915
- * Info associated with mdast MDX JSX attribute value expression nodes by the
5916
- * ecosystem.
5917
- */
5918
- interface MdxJsxAttributeValueExpressionData$1 extends Data$7 {
5919
- /**
5920
- * Program node from estree.
5921
- */
5922
- estree?: Program | null | undefined
5923
- }
5924
-
5925
- /**
5926
- * MDX JSX attribute as an expression.
5927
- *
5928
- * ```markdown
5929
- * > | <a {...b} />
5930
- * ^^^^^^
5931
- * ```
5932
- */
5933
- interface MdxJsxExpressionAttribute$2 extends Node$3 {
5934
- /**
5935
- * Node type.
5936
- */
5937
- type: 'mdxJsxExpressionAttribute'
5938
-
5939
- /**
5940
- * Value.
5941
- */
5942
- value: string
5943
-
5944
- /**
5945
- * Data associated with the mdast MDX JSX expression attributes.
5946
- */
5947
- data?: MdxJsxExpressionAttributeData$1 | undefined
5948
- }
5949
-
5950
- /**
5951
- * Info associated with mdast MDX JSX expression attribute nodes by the
5952
- * ecosystem.
5953
- */
5954
- interface MdxJsxExpressionAttributeData$1 extends Data$7 {
5955
- /**
5956
- * Program node from estree.
5957
- */
5958
- estree?: Program | null | undefined
5959
- }
5960
-
5961
- /**
5962
- * MDX JSX attribute with a key.
5963
- *
5964
- * ```markdown
5965
- * > | <a b="c" />
5966
- * ^^^^^
5967
- * ```
5968
- */
5969
- interface MdxJsxAttribute$2 extends Node$3 {
5970
- /**
5971
- * Node type.
5972
- */
5973
- type: 'mdxJsxAttribute'
5974
- /**
5975
- * Attribute name.
5976
- */
5977
- name: string
5978
- /**
5979
- * Attribute value.
5980
- */
5981
- value?: MdxJsxAttributeValueExpression$1 | string | null | undefined
5982
- /**
5983
- * Data associated with the mdast MDX JSX attribute.
5984
- */
5985
- data?: MdxJsxAttributeData$1 | undefined
5986
- }
5987
-
5988
- /**
5989
- * Info associated with mdast MDX JSX attribute nodes by the
5990
- * ecosystem.
5991
- */
5992
- interface MdxJsxAttributeData$1 extends Data$7 {}
5993
-
5994
- /**
5995
- * MDX JSX element node, occurring in flow (block).
5996
- */
5997
- interface MdxJsxFlowElement$1 extends Parent {
5998
- /**
5999
- * Node type.
6000
- */
6001
- type: 'mdxJsxFlowElement'
6002
- /**
6003
- * MDX JSX element name (`null` for fragments).
6004
- */
6005
- name: string | null
6006
- /**
6007
- * MDX JSX element attributes.
6008
- */
6009
- attributes: Array<MdxJsxAttribute$2 | MdxJsxExpressionAttribute$2>
6010
- /**
6011
- * Content.
6012
- */
6013
- children: Array<BlockContent | DefinitionContent>
6014
- /**
6015
- * Data associated with the mdast MDX JSX elements (flow).
6016
- */
6017
- data?: MdxJsxFlowElementData$1 | undefined
6018
- }
6019
-
6020
- /**
6021
- * Info associated with mdast MDX JSX element (flow) nodes by the
6022
- * ecosystem.
6023
- */
6024
- interface MdxJsxFlowElementData$1 extends Data$6 {}
6025
-
6026
- /**
6027
- * MDX JSX element node, occurring in text (phrasing).
6028
- */
6029
- interface MdxJsxTextElement$1 extends Parent {
6030
- /**
6031
- * Node type.
6032
- */
6033
- type: 'mdxJsxTextElement'
6034
- /**
6035
- * MDX JSX element name (`null` for fragments).
6036
- */
6037
- name: string | null
6038
- /**
6039
- * MDX JSX element attributes.
6040
- */
6041
- attributes: Array<MdxJsxAttribute$2 | MdxJsxExpressionAttribute$2>
6042
- /**
6043
- * Content.
6044
- */
6045
- children: PhrasingContent[]
6046
- /**
6047
- * Data associated with the mdast MDX JSX elements (text).
6048
- */
6049
- data?: MdxJsxTextElementData$1 | undefined
6050
- }
6051
-
6052
- /**
6053
- * Info associated with mdast MDX JSX element (text) nodes by the
6054
- * ecosystem.
6055
- */
6056
- interface MdxJsxTextElementData$1 extends Data$6 {}
6057
-
6058
- /**
6059
- * MDX JSX element node, occurring in flow (block), for hast.
6060
- */
6061
- interface MdxJsxFlowElementHast$1 extends Parent$1 {
6062
- /**
6063
- * Node type.
6064
- */
6065
- type: 'mdxJsxFlowElement'
6066
- /**
6067
- * MDX JSX element name (`null` for fragments).
6068
- */
6069
- name: string | null
6070
- /**
6071
- * MDX JSX element attributes.
6072
- */
6073
- attributes: Array<MdxJsxAttribute$2 | MdxJsxExpressionAttribute$2>
6074
- /**
6075
- * Content.
6076
- */
6077
- children: ElementContent$1[]
6078
- /**
6079
- * Data associated with the hast MDX JSX elements (flow).
6080
- */
6081
- data?: MdxJsxFlowElementHastData$1 | undefined
6082
- }
6083
-
6084
- /**
6085
- * Info associated with hast MDX JSX element (flow) nodes by the
6086
- * ecosystem.
6087
- */
6088
- interface MdxJsxFlowElementHastData$1 extends Data$5 {}
6089
-
6090
- /**
6091
- * MDX JSX element node, occurring in text (phrasing), for hast.
6092
- */
6093
- interface MdxJsxTextElementHast$1 extends Parent$1 {
6094
- /**
6095
- * Node type.
6096
- */
6097
- type: 'mdxJsxTextElement'
6098
- /**
6099
- * MDX JSX element name (`null` for fragments).
6100
- */
6101
- name: string | null
6102
- /**
6103
- * MDX JSX element attributes.
6104
- */
6105
- attributes: Array<MdxJsxAttribute$2 | MdxJsxExpressionAttribute$2>
6106
- /**
6107
- * Content.
6108
- */
6109
- children: ElementContent$1[]
6110
- /**
6111
- * Data associated with the hast MDX JSX elements (text).
6112
- */
6113
- data?: MdxJsxTextElementHastData$1 | undefined
6114
- }
6115
-
6116
- /**
6117
- * Info associated with hast MDX JSX element (text) nodes by the
6118
- * ecosystem.
6119
- */
6120
- interface MdxJsxTextElementHastData$1 extends Data$5 {}
6121
-
6122
- // Add nodes to mdast content.
6123
- declare module 'mdast' {
6124
- interface BlockContentMap {
6125
- /**
6126
- * MDX JSX element node, occurring in flow (block).
6127
- */
6128
- mdxJsxFlowElement: MdxJsxFlowElement$1
6129
- }
6130
-
6131
- interface PhrasingContentMap {
6132
- /**
6133
- * MDX JSX element node, occurring in text (phrasing).
6134
- */
6135
- mdxJsxTextElement: MdxJsxTextElement$1
6136
- }
6137
-
6138
- interface RootContentMap {
6139
- /**
6140
- * MDX JSX element node, occurring in flow (block).
6141
- */
6142
- mdxJsxFlowElement: MdxJsxFlowElement$1
6143
- /**
6144
- * MDX JSX element node, occurring in text (phrasing).
6145
- */
6146
- mdxJsxTextElement: MdxJsxTextElement$1
6147
- }
6148
- }
6149
-
6150
- // Add nodes to hast content.
6151
- declare module 'hast' {
6152
- interface ElementContentMap {
6153
- /**
6154
- * MDX JSX element node, occurring in text (phrasing).
6155
- */
6156
- mdxJsxTextElement: MdxJsxTextElementHast$1
6157
- /**
6158
- * MDX JSX element node, occurring in flow (block).
6159
- */
6160
- mdxJsxFlowElement: MdxJsxFlowElementHast$1
6161
- }
6162
-
6163
- interface RootContentMap {
6164
- /**
6165
- * MDX JSX element node, occurring in text (phrasing).
6166
- */
6167
- mdxJsxTextElement: MdxJsxTextElementHast$1
6168
- /**
6169
- * MDX JSX element node, occurring in flow (block).
6170
- */
6171
- mdxJsxFlowElement: MdxJsxFlowElementHast$1
6172
- }
6173
- }
6174
-
6175
- // Add custom data tracked to turn markdown into a tree.
6176
- declare module 'mdast-util-from-markdown' {
6177
- interface CompileData {
6178
- /**
6179
- * Current MDX JSX tag.
6180
- */
6181
- mdxJsxTag?: Tag | undefined
6182
-
6183
- /**
6184
- * Current stack of open MDX JSX tags.
6185
- */
6186
- mdxJsxTagStack?: Tag[] | undefined
6187
- }
6188
- }
6189
-
6190
- // Add custom data tracked to turn a syntax tree into markdown.
6191
- declare module 'mdast-util-to-markdown' {
6192
- interface ConstructNameMap {
6193
- /**
6194
- * Whole JSX element, in flow.
6195
- *
6196
- * ```markdown
6197
- * > | <a />
6198
- * ^^^^^
6199
- * ```
6200
- */
6201
- mdxJsxFlowElement: 'mdxJsxFlowElement'
6202
-
6203
- /**
6204
- * Whole JSX element, in text.
6205
- *
6206
- * ```markdown
6207
- * > | a <b />.
6208
- * ^^^^^
6209
- * ```
6210
- */
6211
- mdxJsxTextElement: 'mdxJsxTextElement'
6212
- }
6213
- }
6214
-
6215
- type Token = Token$1
6216
- type MdxJsxAttribute$1 = MdxJsxAttribute$2
6217
- type MdxJsxExpressionAttribute$1 =
6218
- MdxJsxExpressionAttribute$2
6219
- /**
6220
- * Single tag.
6221
- */
6222
- type Tag = {
6223
- /**
6224
- * Name of tag, or `undefined` for fragment.
6225
- *
6226
- * > 👉 **Note**: `null` is used in the AST for fragments, as it serializes in
6227
- * > JSON.
6228
- */
6229
- name: string | undefined
6230
- /**
6231
- * Attributes.
6232
- */
6233
- attributes: Array<MdxJsxAttribute$1 | MdxJsxExpressionAttribute$1>
6234
- /**
6235
- * Whether the tag is closing (`</x>`).
6236
- */
6237
- close: boolean
6238
- /**
6239
- * Whether the tag is self-closing (`<x/>`).
6240
- */
6241
- selfClosing: boolean
6242
- /**
6243
- * Start point.
6244
- */
6245
- start: Token['start']
6246
- /**
6247
- * End point.
6248
- */
6249
- end: Token['start']
6250
- }
6251
-
6252
- // Expose node types.
6253
- /**
6254
- * MDX JSX attribute value set to an expression.
6255
- *
6256
- * ```markdown
6257
- * > | <a b={c} />
6258
- * ^^^
6259
- * ```
6260
- */
6261
- interface MdxJsxAttributeValueExpression extends Node$3 {
6262
- /**
6263
- * Node type.
6264
- */
6265
- type: 'mdxJsxAttributeValueExpression'
6266
-
6267
- /**
6268
- * Value.
6269
- */
6270
- value: string
6271
-
6272
- /**
6273
- * Data associated with the mdast MDX JSX attribute value expression.
6274
- */
6275
- data?: MdxJsxAttributeValueExpressionData | undefined
6276
- }
6277
-
6278
- /**
6279
- * Info associated with mdast MDX JSX attribute value expression nodes by the
6280
- * ecosystem.
6281
- */
6282
- interface MdxJsxAttributeValueExpressionData extends Data$7 {
6283
- /**
6284
- * Program node from estree.
6285
- */
6286
- estree?: Program | null | undefined
6287
- }
6288
-
6289
- /**
6290
- * MDX JSX attribute as an expression.
6291
- *
6292
- * ```markdown
6293
- * > | <a {...b} />
6294
- * ^^^^^^
6295
- * ```
6296
- */
6297
- interface MdxJsxExpressionAttribute extends Node$3 {
6298
- /**
6299
- * Node type.
6300
- */
6301
- type: 'mdxJsxExpressionAttribute'
6302
-
6303
- /**
6304
- * Value.
6305
- */
6306
- value: string
6307
-
6308
- /**
6309
- * Data associated with the mdast MDX JSX expression attributes.
6310
- */
6311
- data?: MdxJsxExpressionAttributeData | undefined
6312
- }
6313
-
6314
- /**
6315
- * Info associated with mdast MDX JSX expression attribute nodes by the
6316
- * ecosystem.
6317
- */
6318
- interface MdxJsxExpressionAttributeData extends Data$7 {
6319
- /**
6320
- * Program node from estree.
6321
- */
6322
- estree?: Program | null | undefined
6323
- }
6324
-
6325
- /**
6326
- * MDX JSX attribute with a key.
6327
- *
6328
- * ```markdown
6329
- * > | <a b="c" />
6330
- * ^^^^^
6331
- * ```
6332
- */
6333
- interface MdxJsxAttribute extends Node$3 {
6334
- /**
6335
- * Node type.
6336
- */
6337
- type: 'mdxJsxAttribute'
6338
- /**
6339
- * Attribute name.
6340
- */
6341
- name: string
6342
- /**
6343
- * Attribute value.
6344
- */
6345
- value?: MdxJsxAttributeValueExpression | string | null | undefined
6346
- /**
6347
- * Data associated with the mdast MDX JSX attribute.
6348
- */
6349
- data?: MdxJsxAttributeData | undefined
6350
- }
6351
-
6352
- /**
6353
- * Info associated with mdast MDX JSX attribute nodes by the
6354
- * ecosystem.
6355
- */
6356
- interface MdxJsxAttributeData extends Data$7 {}
6357
-
6358
- /**
6359
- * MDX JSX element node, occurring in flow (block).
6360
- */
6361
- interface MdxJsxFlowElement extends Parent {
6362
- /**
6363
- * Node type.
6364
- */
6365
- type: 'mdxJsxFlowElement'
6366
- /**
6367
- * MDX JSX element name (`null` for fragments).
6368
- */
6369
- name: string | null
6370
- /**
6371
- * MDX JSX element attributes.
6372
- */
6373
- attributes: Array<MdxJsxAttribute | MdxJsxExpressionAttribute>
6374
- /**
6375
- * Content.
6376
- */
6377
- children: Array<BlockContent | DefinitionContent>
6378
- /**
6379
- * Data associated with the mdast MDX JSX elements (flow).
6380
- */
6381
- data?: MdxJsxFlowElementData | undefined
6382
- }
6383
-
6384
- /**
6385
- * Info associated with mdast MDX JSX element (flow) nodes by the
6386
- * ecosystem.
6387
- */
6388
- interface MdxJsxFlowElementData extends Data$6 {}
6389
-
6390
- /**
6391
- * MDX JSX element node, occurring in text (phrasing).
6392
- */
6393
- interface MdxJsxTextElement extends Parent {
6394
- /**
6395
- * Node type.
6396
- */
6397
- type: 'mdxJsxTextElement'
6398
- /**
6399
- * MDX JSX element name (`null` for fragments).
6400
- */
6401
- name: string | null
6402
- /**
6403
- * MDX JSX element attributes.
6404
- */
6405
- attributes: Array<MdxJsxAttribute | MdxJsxExpressionAttribute>
6406
- /**
6407
- * Content.
6408
- */
6409
- children: PhrasingContent[]
6410
- /**
6411
- * Data associated with the mdast MDX JSX elements (text).
6412
- */
6413
- data?: MdxJsxTextElementData | undefined
6414
- }
6415
-
6416
- /**
6417
- * Info associated with mdast MDX JSX element (text) nodes by the
6418
- * ecosystem.
6419
- */
6420
- interface MdxJsxTextElementData extends Data$6 {}
6421
-
6422
- /**
6423
- * MDX JSX element node, occurring in flow (block), for hast.
6424
- */
6425
- interface MdxJsxFlowElementHast extends Parent$1 {
6426
- /**
6427
- * Node type.
6428
- */
6429
- type: 'mdxJsxFlowElement'
6430
- /**
6431
- * MDX JSX element name (`null` for fragments).
6432
- */
6433
- name: string | null
6434
- /**
6435
- * MDX JSX element attributes.
6436
- */
6437
- attributes: Array<MdxJsxAttribute | MdxJsxExpressionAttribute>
6438
- /**
6439
- * Content.
6440
- */
6441
- children: ElementContent$1[]
6442
- /**
6443
- * Data associated with the hast MDX JSX elements (flow).
6444
- */
6445
- data?: MdxJsxFlowElementHastData | undefined
6446
- }
6447
-
6448
- /**
6449
- * Info associated with hast MDX JSX element (flow) nodes by the
6450
- * ecosystem.
6451
- */
6452
- interface MdxJsxFlowElementHastData extends Data$5 {}
6453
-
6454
- /**
6455
- * MDX JSX element node, occurring in text (phrasing), for hast.
6456
- */
6457
- interface MdxJsxTextElementHast extends Parent$1 {
6458
- /**
6459
- * Node type.
6460
- */
6461
- type: 'mdxJsxTextElement'
6462
- /**
6463
- * MDX JSX element name (`null` for fragments).
6464
- */
6465
- name: string | null
6466
- /**
6467
- * MDX JSX element attributes.
6468
- */
6469
- attributes: Array<MdxJsxAttribute | MdxJsxExpressionAttribute>
6470
- /**
6471
- * Content.
6472
- */
6473
- children: ElementContent$1[]
6474
- /**
6475
- * Data associated with the hast MDX JSX elements (text).
6476
- */
6477
- data?: MdxJsxTextElementHastData | undefined
6478
- }
6479
-
6480
- /**
6481
- * Info associated with hast MDX JSX element (text) nodes by the
6482
- * ecosystem.
6483
- */
6484
- interface MdxJsxTextElementHastData extends Data$5 {}
6485
-
6486
- // Add nodes to mdast content.
6487
- declare module 'mdast' {
6488
- interface BlockContentMap {
6489
- /**
6490
- * MDX JSX element node, occurring in flow (block).
6491
- */
6492
- mdxJsxFlowElement: MdxJsxFlowElement
6493
- }
6494
-
6495
- interface PhrasingContentMap {
6496
- /**
6497
- * MDX JSX element node, occurring in text (phrasing).
6498
- */
6499
- mdxJsxTextElement: MdxJsxTextElement
6500
- }
6501
-
6502
- interface RootContentMap {
6503
- /**
6504
- * MDX JSX element node, occurring in flow (block).
6505
- */
6506
- mdxJsxFlowElement: MdxJsxFlowElement
6507
- /**
6508
- * MDX JSX element node, occurring in text (phrasing).
6509
- */
6510
- mdxJsxTextElement: MdxJsxTextElement
6511
- }
6512
- }
6513
-
6514
- // Add nodes to hast content.
6515
- declare module 'hast' {
6516
- interface ElementContentMap {
6517
- /**
6518
- * MDX JSX element node, occurring in text (phrasing).
6519
- */
6520
- mdxJsxTextElement: MdxJsxTextElementHast
6521
- /**
6522
- * MDX JSX element node, occurring in flow (block).
6523
- */
6524
- mdxJsxFlowElement: MdxJsxFlowElementHast
6525
- }
6526
-
6527
- interface RootContentMap {
6528
- /**
6529
- * MDX JSX element node, occurring in text (phrasing).
6530
- */
6531
- mdxJsxTextElement: MdxJsxTextElementHast
6532
- /**
6533
- * MDX JSX element node, occurring in flow (block).
6534
- */
6535
- mdxJsxFlowElement: MdxJsxFlowElementHast
6536
- }
6537
- }
6538
-
6539
- // Add custom data tracked to turn markdown into a tree.
6540
- declare module 'mdast-util-from-markdown' {
6541
- interface CompileData {
6542
- /**
6543
- * Current MDX JSX tag.
6544
- */
6545
- mdxJsxTag?: Tag | undefined
6546
-
6547
- /**
6548
- * Current stack of open MDX JSX tags.
6549
- */
6550
- mdxJsxTagStack?: Tag[] | undefined
6551
- }
6552
- }
6553
-
6554
- // Add custom data tracked to turn a syntax tree into markdown.
6555
- declare module 'mdast-util-to-markdown' {
6556
- interface ConstructNameMap {
6557
- /**
6558
- * Whole JSX element, in flow.
6559
- *
6560
- * ```markdown
6561
- * > | <a />
6562
- * ^^^^^
6563
- * ```
6564
- */
6565
- mdxJsxFlowElement: 'mdxJsxFlowElement'
6566
-
6567
- /**
6568
- * Whole JSX element, in text.
6569
- *
6570
- * ```markdown
6571
- * > | a <b />.
6572
- * ^^^^^
6573
- * ```
6574
- */
6575
- mdxJsxTextElement: 'mdxJsxTextElement'
6576
- }
6577
- }
6578
-
6579
4760
  type MdxCompileOptions = Parameters<typeof compile>[1];
6580
4761
  type BabelOptions = Parameters<typeof transformAsync>[1];
6581
4762
  interface CompileOptions {