vantage-md 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.d.ts CHANGED
@@ -131,51 +131,6 @@ export declare const DocumentStatusChip: React.NamedExoticComponent<{
131
131
  status: DocStatus;
132
132
  }>;
133
133
  //#endregion
134
- //#region src/renderMarkdown.d.ts
135
- /**
136
- * Framework-agnostic markdown -> HTML rendering pipeline.
137
- * Uses the same remark/rehype chain as the Vantage viewer.
138
- */
139
- interface RenderOptions {
140
- /** Enable GFM tables, strikethrough, task lists (default: true) */
141
- gfm?: boolean;
142
- /** Enable KaTeX math rendering (default: true) */
143
- math?: boolean;
144
- /** Enable syntax highlighting (default: true) */
145
- highlight?: boolean;
146
- /** Add data-source-line attributes for line anchors (default: true) */
147
- sourceLines?: boolean;
148
- /** Enable XSS sanitization (default: true) */
149
- sanitize?: boolean;
150
- /** Parse and strip frontmatter (default: true) */
151
- frontmatter?: boolean;
152
- }
153
- interface RenderResult {
154
- /** The rendered HTML string */
155
- html: string;
156
- /** Parsed frontmatter (empty object if none or disabled) */
157
- frontmatter: Record<string, unknown>;
158
- /** The markdown body with frontmatter stripped */
159
- body: string;
160
- }
161
- /**
162
- * Render a markdown string to HTML using the full Vantage pipeline.
163
- *
164
- * Features (all enabled by default):
165
- * - GitHub Flavored Markdown (tables, strikethrough, task lists)
166
- * - KaTeX math rendering, inline and block ($$...$$ only; single $ is not a delimiter)
167
- * - Syntax highlighting via highlight.js
168
- * - `data-source-line` attributes for line anchors
169
- * - XSS sanitization
170
- * - Heading slugs/anchors
171
- * - YAML/TOML frontmatter parsing
172
- *
173
- * Mermaid diagrams are NOT rendered server-side (they require a browser).
174
- * Mermaid code blocks are preserved as `<pre><code class="language-mermaid">`.
175
- * Use the React `<MarkdownViewer>` component for client-side mermaid rendering.
176
- */
177
- export declare function renderMarkdown(content: string, options?: RenderOptions): Promise<RenderResult>;
178
- //#endregion
179
134
  //#region ../../node_modules/@types/unist/index.d.ts
180
135
  // ## Interfaces
181
136
  /**
@@ -197,7 +152,7 @@ export declare function renderMarkdown(content: string, options?: RenderOptions)
197
152
  * }
198
153
  * ```
199
154
  */
200
- interface Data$1 {}
155
+ interface Data$2 {}
201
156
  /**
202
157
  * One place in a source file.
203
158
  */
@@ -240,7 +195,7 @@ interface Position {
240
195
  * But for example in markdown, a `thematicBreak` (`***`), is neither literal
241
196
  * nor parent, but still a node.
242
197
  */
243
- interface Node$1 {
198
+ interface Node$2 {
244
199
  /**
245
200
  * Node type.
246
201
  */
@@ -248,7 +203,7 @@ interface Node$1 {
248
203
  /**
249
204
  * Info from the ecosystem.
250
205
  */
251
- data?: Data$1 | undefined;
206
+ data?: Data$2 | undefined;
252
207
  /**
253
208
  * Position of a node in a source document.
254
209
  *
@@ -258,6 +213,1016 @@ interface Node$1 {
258
213
  position?: Position | undefined;
259
214
  }
260
215
  //#endregion
216
+ //#region ../../node_modules/@types/mdast/index.d.ts
217
+ // ## Enumeration
218
+ /**
219
+ * How phrasing content is aligned
220
+ * ({@link https://drafts.csswg.org/css-text/ | [CSSTEXT]}).
221
+ *
222
+ * * `'left'`: See the
223
+ * {@link https://drafts.csswg.org/css-text/#valdef-text-align-left | left}
224
+ * value of the `text-align` CSS property
225
+ * * `'right'`: See the
226
+ * {@link https://drafts.csswg.org/css-text/#valdef-text-align-right | right}
227
+ * value of the `text-align` CSS property
228
+ * * `'center'`: See the
229
+ * {@link https://drafts.csswg.org/css-text/#valdef-text-align-center | center}
230
+ * value of the `text-align` CSS property
231
+ * * `null`: phrasing content is aligned as defined by the host environment
232
+ *
233
+ * Used in GFM tables.
234
+ */
235
+ type AlignType = "center" | "left" | "right" | null;
236
+ /**
237
+ * Explicitness of a reference.
238
+ *
239
+ * `'shortcut'`: the reference is implicit, its identifier inferred from its
240
+ * content
241
+ * `'collapsed'`: the reference is explicit, its identifier inferred from its
242
+ * content
243
+ * `'full'`: the reference is explicit, its identifier explicitly set
244
+ */
245
+ type ReferenceType = "shortcut" | "collapsed" | "full";
246
+ // ## Mixin
247
+ /**
248
+ * Node with a fallback.
249
+ */
250
+ interface Alternative {
251
+ /**
252
+ * Equivalent content for environments that cannot represent the node as
253
+ * intended.
254
+ */
255
+ alt?: string | null | undefined;
256
+ }
257
+ /**
258
+ * Internal relation from one node to another.
259
+ *
260
+ * Whether the value of `identifier` is expected to be a unique identifier or
261
+ * not depends on the type of node including the Association.
262
+ * An example of this is that they should be unique on {@link Definition},
263
+ * whereas multiple {@link LinkReference}s can be non-unique to be associated
264
+ * with one definition.
265
+ */
266
+ interface Association {
267
+ /**
268
+ * Relation of association.
269
+ *
270
+ * `identifier` is a source value: character escapes and character
271
+ * references are not parsed.
272
+ *
273
+ * It can match another node.
274
+ *
275
+ * Its value must be normalized.
276
+ * To normalize a value, collapse markdown whitespace (`[\t\n\r ]+`) to a space,
277
+ * trim the optional initial and/or final space, and perform Unicode-aware
278
+ * case-folding.
279
+ */
280
+ identifier: string;
281
+ /**
282
+ * Relation of association, in parsed form.
283
+ *
284
+ * `label` is a `string` value: it works just like `title` on {@link Link}
285
+ * or a `lang` on {@link Code}: character escapes and character references
286
+ * are parsed.
287
+ *
288
+ * It can match another node.
289
+ */
290
+ label?: string | null | undefined;
291
+ }
292
+ /**
293
+ * Marker that is associated to another node.
294
+ */
295
+ interface Reference extends Association {
296
+ /**
297
+ * Explicitness of the reference.
298
+ */
299
+ referenceType: ReferenceType;
300
+ }
301
+ /**
302
+ * Reference to resource.
303
+ */
304
+ interface Resource {
305
+ /**
306
+ * URL to the referenced resource.
307
+ */
308
+ url: string;
309
+ /**
310
+ * Advisory information for the resource, such as would be appropriate for
311
+ * a tooltip.
312
+ */
313
+ title?: string | null | undefined;
314
+ }
315
+ // ## Interfaces
316
+ /**
317
+ * Info associated with mdast nodes by the ecosystem.
318
+ *
319
+ * This space is guaranteed to never be specified by unist or mdast.
320
+ * But you can use it in utilities and plugins to store data.
321
+ *
322
+ * This type can be augmented to register custom data.
323
+ * For example:
324
+ *
325
+ * ```ts
326
+ * declare module 'mdast' {
327
+ * interface Data {
328
+ * // `someNode.data.myId` is typed as `number | undefined`
329
+ * myId?: number | undefined
330
+ * }
331
+ * }
332
+ * ```
333
+ */
334
+ interface Data$1 extends Data$2 {}
335
+ // ## Content maps
336
+ /**
337
+ * Union of registered mdast nodes that can occur where block content is
338
+ * expected.
339
+ *
340
+ * To register custom mdast nodes, add them to {@link BlockContentMap}.
341
+ * They will be automatically added here.
342
+ */
343
+ type BlockContent = BlockContentMap[keyof BlockContentMap];
344
+ /**
345
+ * Registry of all mdast nodes that can occur where {@link BlockContent} is
346
+ * expected.
347
+ *
348
+ * This interface can be augmented to register custom node types:
349
+ *
350
+ * ```ts
351
+ * declare module 'mdast' {
352
+ * interface BlockContentMap {
353
+ * // Allow using MDX ESM nodes defined by `remark-mdx`.
354
+ * mdxjsEsm: MdxjsEsm;
355
+ * }
356
+ * }
357
+ * ```
358
+ *
359
+ * For a union of all block content, see {@link RootContent}.
360
+ */
361
+ interface BlockContentMap {
362
+ blockquote: Blockquote;
363
+ code: Code;
364
+ heading: Heading;
365
+ html: Html;
366
+ list: List;
367
+ paragraph: Paragraph;
368
+ table: Table;
369
+ thematicBreak: ThematicBreak;
370
+ }
371
+ /**
372
+ * Union of registered mdast nodes that can occur where definition content is
373
+ * expected.
374
+ *
375
+ * To register custom mdast nodes, add them to {@link DefinitionContentMap}.
376
+ * They will be automatically added here.
377
+ */
378
+ type DefinitionContent = DefinitionContentMap[keyof DefinitionContentMap];
379
+ /**
380
+ * Registry of all mdast nodes that can occur where {@link DefinitionContent}
381
+ * is expected.
382
+ *
383
+ * This interface can be augmented to register custom node types:
384
+ *
385
+ * ```ts
386
+ * declare module 'mdast' {
387
+ * interface DefinitionContentMap {
388
+ * custom: Custom;
389
+ * }
390
+ * }
391
+ * ```
392
+ *
393
+ * For a union of all definition content, see {@link RootContent}.
394
+ */
395
+ interface DefinitionContentMap {
396
+ definition: Definition;
397
+ footnoteDefinition: FootnoteDefinition;
398
+ }
399
+ /**
400
+ * Union of registered mdast nodes that can occur where list content is
401
+ * expected.
402
+ *
403
+ * To register custom mdast nodes, add them to {@link ListContentMap}.
404
+ * They will be automatically added here.
405
+ */
406
+ type ListContent = ListContentMap[keyof ListContentMap];
407
+ /**
408
+ * Registry of all mdast nodes that can occur where {@link ListContent}
409
+ * is expected.
410
+ *
411
+ * This interface can be augmented to register custom node types:
412
+ *
413
+ * ```ts
414
+ * declare module 'mdast' {
415
+ * interface ListContentMap {
416
+ * custom: Custom;
417
+ * }
418
+ * }
419
+ * ```
420
+ *
421
+ * For a union of all list content, see {@link RootContent}.
422
+ */
423
+ interface ListContentMap {
424
+ listItem: ListItem;
425
+ }
426
+ /**
427
+ * Union of registered mdast nodes that can occur where phrasing content is
428
+ * expected.
429
+ *
430
+ * To register custom mdast nodes, add them to {@link PhrasingContentMap}.
431
+ * They will be automatically added here.
432
+ */
433
+ type PhrasingContent = PhrasingContentMap[keyof PhrasingContentMap];
434
+ /**
435
+ * Registry of all mdast nodes that can occur where {@link PhrasingContent}
436
+ * is expected.
437
+ *
438
+ * This interface can be augmented to register custom node types:
439
+ *
440
+ * ```ts
441
+ * declare module 'mdast' {
442
+ * interface PhrasingContentMap {
443
+ * // Allow using MDX JSX (text) nodes defined by `remark-mdx`.
444
+ * mdxJsxTextElement: MDXJSXTextElement;
445
+ * }
446
+ * }
447
+ * ```
448
+ *
449
+ * For a union of all phrasing content, see {@link RootContent}.
450
+ */
451
+ interface PhrasingContentMap {
452
+ break: Break;
453
+ delete: Delete;
454
+ emphasis: Emphasis;
455
+ footnoteReference: FootnoteReference;
456
+ html: Html;
457
+ image: Image;
458
+ imageReference: ImageReference;
459
+ inlineCode: InlineCode;
460
+ link: Link;
461
+ linkReference: LinkReference;
462
+ strong: Strong;
463
+ text: Text$1;
464
+ }
465
+ /**
466
+ * Union of registered mdast nodes that can occur in {@link Root}.
467
+ *
468
+ * To register custom mdast nodes, add them to {@link RootContentMap}.
469
+ * They will be automatically added here.
470
+ */
471
+ type RootContent$1 = RootContentMap$1[keyof RootContentMap$1];
472
+ /**
473
+ * Registry of all mdast nodes that can occur as children of {@link Root}.
474
+ *
475
+ * > **Note**: {@link Root} does not need to be an entire document.
476
+ * > it can also be a fragment.
477
+ *
478
+ * This interface can be augmented to register custom node types:
479
+ *
480
+ * ```ts
481
+ * declare module 'mdast' {
482
+ * interface RootContentMap {
483
+ * // Allow using toml nodes defined by `remark-frontmatter`.
484
+ * toml: TOML;
485
+ * }
486
+ * }
487
+ * ```
488
+ *
489
+ * For a union of all {@link Root} children, see {@link RootContent}.
490
+ */
491
+ interface RootContentMap$1 {
492
+ blockquote: Blockquote;
493
+ break: Break;
494
+ code: Code;
495
+ definition: Definition;
496
+ delete: Delete;
497
+ emphasis: Emphasis;
498
+ footnoteDefinition: FootnoteDefinition;
499
+ footnoteReference: FootnoteReference;
500
+ heading: Heading;
501
+ html: Html;
502
+ image: Image;
503
+ imageReference: ImageReference;
504
+ inlineCode: InlineCode;
505
+ link: Link;
506
+ linkReference: LinkReference;
507
+ list: List;
508
+ listItem: ListItem;
509
+ paragraph: Paragraph;
510
+ strong: Strong;
511
+ table: Table;
512
+ tableCell: TableCell;
513
+ tableRow: TableRow;
514
+ text: Text$1;
515
+ thematicBreak: ThematicBreak;
516
+ yaml: Yaml;
517
+ }
518
+ /**
519
+ * Union of registered mdast nodes that can occur where row content is
520
+ * expected.
521
+ *
522
+ * To register custom mdast nodes, add them to {@link RowContentMap}.
523
+ * They will be automatically added here.
524
+ */
525
+ type RowContent = RowContentMap[keyof RowContentMap];
526
+ /**
527
+ * Registry of all mdast nodes that can occur where {@link RowContent}
528
+ * is expected.
529
+ *
530
+ * This interface can be augmented to register custom node types:
531
+ *
532
+ * ```ts
533
+ * declare module 'mdast' {
534
+ * interface RowContentMap {
535
+ * custom: Custom;
536
+ * }
537
+ * }
538
+ * ```
539
+ *
540
+ * For a union of all row content, see {@link RootContent}.
541
+ */
542
+ interface RowContentMap {
543
+ tableCell: TableCell;
544
+ }
545
+ /**
546
+ * Union of registered mdast nodes that can occur where table content is
547
+ * expected.
548
+ *
549
+ * To register custom mdast nodes, add them to {@link TableContentMap}.
550
+ * They will be automatically added here.
551
+ */
552
+ type TableContent = TableContentMap[keyof TableContentMap];
553
+ /**
554
+ * Registry of all mdast nodes that can occur where {@link TableContent}
555
+ * is expected.
556
+ *
557
+ * This interface can be augmented to register custom node types:
558
+ *
559
+ * ```ts
560
+ * declare module 'mdast' {
561
+ * interface TableContentMap {
562
+ * custom: Custom;
563
+ * }
564
+ * }
565
+ * ```
566
+ *
567
+ * For a union of all table content, see {@link RootContent}.
568
+ */
569
+ interface TableContentMap {
570
+ tableRow: TableRow;
571
+ }
572
+ // ## Abstract nodes
573
+ /**
574
+ * Abstract mdast node that contains the smallest possible value.
575
+ *
576
+ * This interface is supposed to be extended if you make custom mdast nodes.
577
+ *
578
+ * For a union of all registered mdast literals, see {@link Literals}.
579
+ */
580
+ interface Literal$1 extends Node$1 {
581
+ /**
582
+ * Plain-text value.
583
+ */
584
+ value: string;
585
+ }
586
+ /**
587
+ * Abstract mdast node.
588
+ *
589
+ * This interface is supposed to be extended.
590
+ * If you can use {@link Literal} or {@link Parent}, you should.
591
+ * But for example in markdown, a thematic break (`***`) is neither literal nor
592
+ * parent, but still a node.
593
+ *
594
+ * To register custom mdast nodes, add them to {@link RootContentMap} and other
595
+ * places where relevant (such as {@link ElementContentMap}).
596
+ *
597
+ * For a union of all registered mdast nodes, see {@link Nodes}.
598
+ */
599
+ interface Node$1 extends Node$2 {
600
+ /**
601
+ * Info from the ecosystem.
602
+ */
603
+ data?: Data$1 | undefined;
604
+ }
605
+ /**
606
+ * Abstract mdast node that contains other mdast nodes (*children*).
607
+ *
608
+ * This interface is supposed to be extended if you make custom mdast nodes.
609
+ *
610
+ * For a union of all registered mdast parents, see {@link Parents}.
611
+ */
612
+ interface Parent$1 extends Node$1 {
613
+ /**
614
+ * List of children.
615
+ */
616
+ children: RootContent$1[];
617
+ }
618
+ // ## Concrete nodes
619
+ /**
620
+ * Markdown block quote.
621
+ */
622
+ interface Blockquote extends Parent$1 {
623
+ /**
624
+ * Node type of mdast block quote.
625
+ */
626
+ type: "blockquote";
627
+ /**
628
+ * Children of block quote.
629
+ */
630
+ children: Array<BlockContent | DefinitionContent>;
631
+ /**
632
+ * Data associated with the mdast block quote.
633
+ */
634
+ data?: BlockquoteData | undefined;
635
+ }
636
+ /**
637
+ * Info associated with mdast block quote nodes by the ecosystem.
638
+ */
639
+ interface BlockquoteData extends Data$1 {}
640
+ /**
641
+ * Markdown break.
642
+ */
643
+ interface Break extends Node$1 {
644
+ /**
645
+ * Node type of mdast break.
646
+ */
647
+ type: "break";
648
+ /**
649
+ * Data associated with the mdast break.
650
+ */
651
+ data?: BreakData | undefined;
652
+ }
653
+ /**
654
+ * Info associated with mdast break nodes by the ecosystem.
655
+ */
656
+ interface BreakData extends Data$1 {}
657
+ /**
658
+ * Markdown code (flow) (block).
659
+ */
660
+ interface Code extends Literal$1 {
661
+ /**
662
+ * Node type of mdast code (flow).
663
+ */
664
+ type: "code";
665
+ /**
666
+ * Language of computer code being marked up.
667
+ */
668
+ lang?: string | null | undefined;
669
+ /**
670
+ * Custom information relating to the node.
671
+ *
672
+ * If the lang field is present, a meta field can be present.
673
+ */
674
+ meta?: string | null | undefined;
675
+ /**
676
+ * Data associated with the mdast code (flow).
677
+ */
678
+ data?: CodeData | undefined;
679
+ }
680
+ /**
681
+ * Info associated with mdast code (flow) (block) nodes by the ecosystem.
682
+ */
683
+ interface CodeData extends Data$1 {}
684
+ /**
685
+ * Markdown definition.
686
+ */
687
+ interface Definition extends Node$1, Association, Resource {
688
+ /**
689
+ * Node type of mdast definition.
690
+ */
691
+ type: "definition";
692
+ /**
693
+ * Data associated with the mdast definition.
694
+ */
695
+ data?: DefinitionData | undefined;
696
+ }
697
+ /**
698
+ * Info associated with mdast definition nodes by the ecosystem.
699
+ */
700
+ interface DefinitionData extends Data$1 {}
701
+ /**
702
+ * Markdown GFM delete (strikethrough).
703
+ */
704
+ interface Delete extends Parent$1 {
705
+ /**
706
+ * Node type of mdast GFM delete.
707
+ */
708
+ type: "delete";
709
+ /**
710
+ * Children of GFM delete.
711
+ */
712
+ children: PhrasingContent[];
713
+ /**
714
+ * Data associated with the mdast GFM delete.
715
+ */
716
+ data?: DeleteData | undefined;
717
+ }
718
+ /**
719
+ * Info associated with mdast GFM delete nodes by the ecosystem.
720
+ */
721
+ interface DeleteData extends Data$1 {}
722
+ /**
723
+ * Markdown emphasis.
724
+ */
725
+ interface Emphasis extends Parent$1 {
726
+ /**
727
+ * Node type of mdast emphasis.
728
+ */
729
+ type: "emphasis";
730
+ /**
731
+ * Children of emphasis.
732
+ */
733
+ children: PhrasingContent[];
734
+ /**
735
+ * Data associated with the mdast emphasis.
736
+ */
737
+ data?: EmphasisData | undefined;
738
+ }
739
+ /**
740
+ * Info associated with mdast emphasis nodes by the ecosystem.
741
+ */
742
+ interface EmphasisData extends Data$1 {}
743
+ /**
744
+ * Markdown GFM footnote definition.
745
+ */
746
+ interface FootnoteDefinition extends Parent$1, Association {
747
+ /**
748
+ * Node type of mdast GFM footnote definition.
749
+ */
750
+ type: "footnoteDefinition";
751
+ /**
752
+ * Children of GFM footnote definition.
753
+ */
754
+ children: Array<BlockContent | DefinitionContent>;
755
+ /**
756
+ * Data associated with the mdast GFM footnote definition.
757
+ */
758
+ data?: FootnoteDefinitionData | undefined;
759
+ }
760
+ /**
761
+ * Info associated with mdast GFM footnote definition nodes by the ecosystem.
762
+ */
763
+ interface FootnoteDefinitionData extends Data$1 {}
764
+ /**
765
+ * Markdown GFM footnote reference.
766
+ */
767
+ interface FootnoteReference extends Association, Node$1 {
768
+ /**
769
+ * Node type of mdast GFM footnote reference.
770
+ */
771
+ type: "footnoteReference";
772
+ /**
773
+ * Data associated with the mdast GFM footnote reference.
774
+ */
775
+ data?: FootnoteReferenceData | undefined;
776
+ }
777
+ /**
778
+ * Info associated with mdast GFM footnote reference nodes by the ecosystem.
779
+ */
780
+ interface FootnoteReferenceData extends Data$1 {}
781
+ /**
782
+ * Markdown heading.
783
+ */
784
+ interface Heading extends Parent$1 {
785
+ /**
786
+ * Node type of mdast heading.
787
+ */
788
+ type: "heading";
789
+ /**
790
+ * Heading rank.
791
+ *
792
+ * A value of `1` is said to be the highest rank and `6` the lowest.
793
+ */
794
+ depth: 1 | 2 | 3 | 4 | 5 | 6;
795
+ /**
796
+ * Children of heading.
797
+ */
798
+ children: PhrasingContent[];
799
+ /**
800
+ * Data associated with the mdast heading.
801
+ */
802
+ data?: HeadingData | undefined;
803
+ }
804
+ /**
805
+ * Info associated with mdast heading nodes by the ecosystem.
806
+ */
807
+ interface HeadingData extends Data$1 {}
808
+ /**
809
+ * Markdown HTML.
810
+ */
811
+ interface Html extends Literal$1 {
812
+ /**
813
+ * Node type of mdast HTML.
814
+ */
815
+ type: "html";
816
+ /**
817
+ * Data associated with the mdast HTML.
818
+ */
819
+ data?: HtmlData | undefined;
820
+ }
821
+ /**
822
+ * Info associated with mdast HTML nodes by the ecosystem.
823
+ */
824
+ interface HtmlData extends Data$1 {}
825
+ /**
826
+ * Markdown image.
827
+ */
828
+ interface Image extends Alternative, Node$1, Resource {
829
+ /**
830
+ * Node type of mdast image.
831
+ */
832
+ type: "image";
833
+ /**
834
+ * Data associated with the mdast image.
835
+ */
836
+ data?: ImageData | undefined;
837
+ }
838
+ /**
839
+ * Info associated with mdast image nodes by the ecosystem.
840
+ */
841
+ interface ImageData extends Data$1 {}
842
+ /**
843
+ * Markdown image reference.
844
+ */
845
+ interface ImageReference extends Alternative, Node$1, Reference {
846
+ /**
847
+ * Node type of mdast image reference.
848
+ */
849
+ type: "imageReference";
850
+ /**
851
+ * Data associated with the mdast image reference.
852
+ */
853
+ data?: ImageReferenceData | undefined;
854
+ }
855
+ /**
856
+ * Info associated with mdast image reference nodes by the ecosystem.
857
+ */
858
+ interface ImageReferenceData extends Data$1 {}
859
+ /**
860
+ * Markdown code (text) (inline).
861
+ */
862
+ interface InlineCode extends Literal$1 {
863
+ /**
864
+ * Node type of mdast code (text).
865
+ */
866
+ type: "inlineCode";
867
+ /**
868
+ * Data associated with the mdast code (text).
869
+ */
870
+ data?: InlineCodeData | undefined;
871
+ }
872
+ /**
873
+ * Info associated with mdast code (text) (inline) nodes by the ecosystem.
874
+ */
875
+ interface InlineCodeData extends Data$1 {}
876
+ /**
877
+ * Markdown link.
878
+ */
879
+ interface Link extends Parent$1, Resource {
880
+ /**
881
+ * Node type of mdast link.
882
+ */
883
+ type: "link";
884
+ /**
885
+ * Children of link.
886
+ */
887
+ children: PhrasingContent[];
888
+ /**
889
+ * Data associated with the mdast link.
890
+ */
891
+ data?: LinkData | undefined;
892
+ }
893
+ /**
894
+ * Info associated with mdast link nodes by the ecosystem.
895
+ */
896
+ interface LinkData extends Data$1 {}
897
+ /**
898
+ * Markdown link reference.
899
+ */
900
+ interface LinkReference extends Parent$1, Reference {
901
+ /**
902
+ * Node type of mdast link reference.
903
+ */
904
+ type: "linkReference";
905
+ /**
906
+ * Children of link reference.
907
+ */
908
+ children: PhrasingContent[];
909
+ /**
910
+ * Data associated with the mdast link reference.
911
+ */
912
+ data?: LinkReferenceData | undefined;
913
+ }
914
+ /**
915
+ * Info associated with mdast link reference nodes by the ecosystem.
916
+ */
917
+ interface LinkReferenceData extends Data$1 {}
918
+ /**
919
+ * Markdown list.
920
+ */
921
+ interface List extends Parent$1 {
922
+ /**
923
+ * Node type of mdast list.
924
+ */
925
+ type: "list";
926
+ /**
927
+ * Whether the items have been intentionally ordered (when `true`), or that
928
+ * the order of items is not important (when `false` or not present).
929
+ */
930
+ ordered?: boolean | null | undefined;
931
+ /**
932
+ * The starting number of the list, when the `ordered` field is `true`.
933
+ */
934
+ start?: number | null | undefined;
935
+ /**
936
+ * Whether one or more of the children are separated with a blank line from
937
+ * its siblings (when `true`), or not (when `false` or not present).
938
+ */
939
+ spread?: boolean | null | undefined;
940
+ /**
941
+ * Children of list.
942
+ */
943
+ children: ListContent[];
944
+ /**
945
+ * Data associated with the mdast list.
946
+ */
947
+ data?: ListData | undefined;
948
+ }
949
+ /**
950
+ * Info associated with mdast list nodes by the ecosystem.
951
+ */
952
+ interface ListData extends Data$1 {}
953
+ /**
954
+ * Markdown list item.
955
+ */
956
+ interface ListItem extends Parent$1 {
957
+ /**
958
+ * Node type of mdast list item.
959
+ */
960
+ type: "listItem";
961
+ /**
962
+ * Whether the item is a tasklist item (when `boolean`).
963
+ *
964
+ * When `true`, the item is complete.
965
+ * When `false`, the item is incomplete.
966
+ */
967
+ checked?: boolean | null | undefined;
968
+ /**
969
+ * Whether one or more of the children are separated with a blank line from
970
+ * its siblings (when `true`), or not (when `false` or not present).
971
+ */
972
+ spread?: boolean | null | undefined;
973
+ /**
974
+ * Children of list item.
975
+ */
976
+ children: Array<BlockContent | DefinitionContent>;
977
+ /**
978
+ * Data associated with the mdast list item.
979
+ */
980
+ data?: ListItemData | undefined;
981
+ }
982
+ /**
983
+ * Info associated with mdast list item nodes by the ecosystem.
984
+ */
985
+ interface ListItemData extends Data$1 {}
986
+ /**
987
+ * Markdown paragraph.
988
+ */
989
+ interface Paragraph extends Parent$1 {
990
+ /**
991
+ * Node type of mdast paragraph.
992
+ */
993
+ type: "paragraph";
994
+ /**
995
+ * Children of paragraph.
996
+ */
997
+ children: PhrasingContent[];
998
+ /**
999
+ * Data associated with the mdast paragraph.
1000
+ */
1001
+ data?: ParagraphData | undefined;
1002
+ }
1003
+ /**
1004
+ * Info associated with mdast paragraph nodes by the ecosystem.
1005
+ */
1006
+ interface ParagraphData extends Data$1 {}
1007
+ /**
1008
+ * Document fragment or a whole document.
1009
+ *
1010
+ * Should be used as the root of a tree and must not be used as a child.
1011
+ */
1012
+ interface Root$1 extends Parent$1 {
1013
+ /**
1014
+ * Node type of mdast root.
1015
+ */
1016
+ type: "root";
1017
+ /**
1018
+ * Data associated with the mdast root.
1019
+ */
1020
+ data?: RootData$1 | undefined;
1021
+ }
1022
+ /**
1023
+ * Info associated with mdast root nodes by the ecosystem.
1024
+ */
1025
+ interface RootData$1 extends Data$1 {}
1026
+ /**
1027
+ * Markdown strong.
1028
+ */
1029
+ interface Strong extends Parent$1 {
1030
+ /**
1031
+ * Node type of mdast strong.
1032
+ */
1033
+ type: "strong";
1034
+ /**
1035
+ * Children of strong.
1036
+ */
1037
+ children: PhrasingContent[];
1038
+ /**
1039
+ * Data associated with the mdast strong.
1040
+ */
1041
+ data?: StrongData | undefined;
1042
+ }
1043
+ /**
1044
+ * Info associated with mdast strong nodes by the ecosystem.
1045
+ */
1046
+ interface StrongData extends Data$1 {}
1047
+ /**
1048
+ * Markdown GFM table.
1049
+ */
1050
+ interface Table extends Parent$1 {
1051
+ /**
1052
+ * Node type of mdast GFM table.
1053
+ */
1054
+ type: "table";
1055
+ /**
1056
+ * How cells in columns are aligned.
1057
+ */
1058
+ align?: AlignType[] | null | undefined;
1059
+ /**
1060
+ * Children of GFM table.
1061
+ */
1062
+ children: TableContent[];
1063
+ /**
1064
+ * Data associated with the mdast GFM table.
1065
+ */
1066
+ data?: TableData | undefined;
1067
+ }
1068
+ /**
1069
+ * Info associated with mdast GFM table nodes by the ecosystem.
1070
+ */
1071
+ interface TableData extends Data$1 {}
1072
+ /**
1073
+ * Markdown GFM table row.
1074
+ */
1075
+ interface TableRow extends Parent$1 {
1076
+ /**
1077
+ * Node type of mdast GFM table row.
1078
+ */
1079
+ type: "tableRow";
1080
+ /**
1081
+ * Children of GFM table row.
1082
+ */
1083
+ children: RowContent[];
1084
+ /**
1085
+ * Data associated with the mdast GFM table row.
1086
+ */
1087
+ data?: TableRowData | undefined;
1088
+ }
1089
+ /**
1090
+ * Info associated with mdast GFM table row nodes by the ecosystem.
1091
+ */
1092
+ interface TableRowData extends Data$1 {}
1093
+ /**
1094
+ * Markdown GFM table cell.
1095
+ */
1096
+ interface TableCell extends Parent$1 {
1097
+ /**
1098
+ * Node type of mdast GFM table cell.
1099
+ */
1100
+ type: "tableCell";
1101
+ /**
1102
+ * Children of GFM table cell.
1103
+ */
1104
+ children: PhrasingContent[];
1105
+ /**
1106
+ * Data associated with the mdast GFM table cell.
1107
+ */
1108
+ data?: TableCellData | undefined;
1109
+ }
1110
+ /**
1111
+ * Info associated with mdast GFM table cell nodes by the ecosystem.
1112
+ */
1113
+ interface TableCellData extends Data$1 {}
1114
+ /**
1115
+ * Markdown text.
1116
+ */
1117
+ interface Text$1 extends Literal$1 {
1118
+ /**
1119
+ * Node type of mdast text.
1120
+ */
1121
+ type: "text";
1122
+ /**
1123
+ * Data associated with the mdast text.
1124
+ */
1125
+ data?: TextData$1 | undefined;
1126
+ }
1127
+ /**
1128
+ * Info associated with mdast text nodes by the ecosystem.
1129
+ */
1130
+ interface TextData$1 extends Data$1 {}
1131
+ /**
1132
+ * Markdown thematic break (horizontal rule).
1133
+ */
1134
+ interface ThematicBreak extends Node$1 {
1135
+ /**
1136
+ * Node type of mdast thematic break.
1137
+ */
1138
+ type: "thematicBreak";
1139
+ /**
1140
+ * Data associated with the mdast thematic break.
1141
+ */
1142
+ data?: ThematicBreakData | undefined;
1143
+ }
1144
+ /**
1145
+ * Info associated with mdast thematic break nodes by the ecosystem.
1146
+ */
1147
+ interface ThematicBreakData extends Data$1 {}
1148
+ /**
1149
+ * Markdown YAML.
1150
+ */
1151
+ interface Yaml extends Literal$1 {
1152
+ /**
1153
+ * Node type of mdast YAML.
1154
+ */
1155
+ type: "yaml";
1156
+ /**
1157
+ * Data associated with the mdast YAML.
1158
+ */
1159
+ data?: YamlData | undefined;
1160
+ }
1161
+ /**
1162
+ * Info associated with mdast YAML nodes by the ecosystem.
1163
+ */
1164
+ interface YamlData extends Data$1 {}
1165
+ //#endregion
1166
+ //#region src/renderMarkdown.d.ts
1167
+ interface RenderOptions {
1168
+ /** Enable GFM tables, strikethrough, task lists (default: true) */
1169
+ gfm?: boolean;
1170
+ /** Enable KaTeX math rendering (default: true) */
1171
+ math?: boolean;
1172
+ /** Enable syntax highlighting (default: true) */
1173
+ highlight?: boolean;
1174
+ /** Add data-source-line attributes for line anchors (default: true) */
1175
+ sourceLines?: boolean;
1176
+ /** Enable XSS sanitization (default: true) */
1177
+ sanitize?: boolean;
1178
+ /** Parse and strip frontmatter (default: true) */
1179
+ frontmatter?: boolean;
1180
+ /**
1181
+ * The body's mdast, already parsed — an optimisation, not a second input.
1182
+ *
1183
+ * Parsing is the most expensive step in this function: measured over
1184
+ * `docs/design/`, `remark-parse` with GFM costs about twice what the whole
1185
+ * rehype half costs. A caller that already holds the tree — the CLI checker
1186
+ * does, because every `mdast` rule ran on it before the render rule got its
1187
+ * turn — was paying for the same parse twice.
1188
+ *
1189
+ * The tree must have been parsed by **this package's remark half with these
1190
+ * same options** (`buildRemarkPlugins`, which is exported for exactly that
1191
+ * reason). Anything parsed some other way renders through a chain the viewer
1192
+ * does not use, which is the one thing the shared pipeline exists to prevent,
1193
+ * and nothing here can detect it: a tree is a tree.
1194
+ *
1195
+ * `content` is still read, for its frontmatter. The two have to describe the
1196
+ * same document.
1197
+ */
1198
+ tree?: Root$1;
1199
+ }
1200
+ interface RenderResult {
1201
+ /** The rendered HTML string */
1202
+ html: string;
1203
+ /** Parsed frontmatter (empty object if none or disabled) */
1204
+ frontmatter: Record<string, unknown>;
1205
+ /** The markdown body with frontmatter stripped */
1206
+ body: string;
1207
+ }
1208
+ /**
1209
+ * Render a markdown string to HTML using the full Vantage pipeline.
1210
+ *
1211
+ * Features (all enabled by default):
1212
+ * - GitHub Flavored Markdown (tables, strikethrough, task lists)
1213
+ * - KaTeX math rendering, inline and block ($$...$$ only; single $ is not a delimiter)
1214
+ * - Syntax highlighting via highlight.js
1215
+ * - `data-source-line` attributes for line anchors
1216
+ * - XSS sanitization
1217
+ * - Heading slugs/anchors
1218
+ * - YAML/TOML frontmatter parsing
1219
+ *
1220
+ * Mermaid diagrams are NOT rendered server-side (they require a browser).
1221
+ * Mermaid code blocks are preserved as `<pre><code class="language-mermaid">`.
1222
+ * Use the React `<MarkdownViewer>` component for client-side mermaid rendering.
1223
+ */
1224
+ export declare function renderMarkdown(content: string, options?: RenderOptions): Promise<RenderResult>;
1225
+ //#endregion
261
1226
  //#region ../../node_modules/@types/hast/index.d.ts
262
1227
  // ## Interfaces
263
1228
  /**
@@ -278,7 +1243,7 @@ interface Node$1 {
278
1243
  * }
279
1244
  * ```
280
1245
  */
281
- interface Data extends Data$1 {}
1246
+ interface Data extends Data$2 {}
282
1247
  /**
283
1248
  * Info associated with an element.
284
1249
  */
@@ -980,7 +1945,7 @@ interface RootContentMap {
980
1945
  *
981
1946
  * For a union of all registered hast nodes, see {@link Nodes}.
982
1947
  */
983
- interface Node extends Node$1 {
1948
+ interface Node extends Node$2 {
984
1949
  /**
985
1950
  * Info from the ecosystem.
986
1951
  */
@@ -1033,7 +1998,7 @@ interface CommentData extends Data {}
1033
1998
  /**
1034
1999
  * HTML document type.
1035
2000
  */
1036
- interface Doctype extends Node$1 {
2001
+ interface Doctype extends Node$2 {
1037
2002
  /**
1038
2003
  * Node type of HTML document types in hast.
1039
2004
  */