@ox-content/vite-plugin 2.67.0 → 2.69.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.
- package/dist/github.cjs.map +1 -1
- package/dist/github2.mjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +774 -63
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +774 -63
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/media.cjs.map +1 -1
- package/dist/media2.mjs.map +1 -1
- package/dist/mermaid.cjs.map +1 -1
- package/dist/mermaid2.mjs.map +1 -1
- package/dist/ogp.cjs.map +1 -1
- package/dist/ogp2.mjs.map +1 -1
- package/dist/pm.cjs.map +1 -1
- package/dist/pm2.mjs.map +1 -1
- package/dist/youtube.cjs.map +1 -1
- package/dist/youtube2.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -264,15 +264,30 @@ interface GitHubSourceData {
|
|
|
264
264
|
language: string | null;
|
|
265
265
|
}
|
|
266
266
|
interface GitHubOptions {
|
|
267
|
-
/**
|
|
267
|
+
/**
|
|
268
|
+
* GitHub API token used for higher rate limits and private repository access.
|
|
269
|
+
* @default ''
|
|
270
|
+
*/
|
|
268
271
|
token?: string;
|
|
269
|
-
/**
|
|
272
|
+
/**
|
|
273
|
+
* Cache fetched repository and source data in memory for the current process.
|
|
274
|
+
* @default true
|
|
275
|
+
*/
|
|
270
276
|
cache?: boolean;
|
|
271
|
-
/**
|
|
277
|
+
/**
|
|
278
|
+
* Cache TTL in milliseconds.
|
|
279
|
+
* @default 3600000
|
|
280
|
+
*/
|
|
272
281
|
cacheTTL?: number;
|
|
273
|
-
/**
|
|
282
|
+
/**
|
|
283
|
+
* Maximum source file size to inline in bytes.
|
|
284
|
+
* @default 200000
|
|
285
|
+
*/
|
|
274
286
|
maxSourceBytes?: number;
|
|
275
|
-
/**
|
|
287
|
+
/**
|
|
288
|
+
* Maximum source lines to inline when no line range is specified.
|
|
289
|
+
* @default 120
|
|
290
|
+
*/
|
|
276
291
|
maxSourceLines?: number;
|
|
277
292
|
}
|
|
278
293
|
declare function parseGitHubLineRange(value: string | undefined): GitHubLineRange | undefined;
|
|
@@ -322,13 +337,25 @@ interface OgpData {
|
|
|
322
337
|
favicon?: string;
|
|
323
338
|
}
|
|
324
339
|
interface OgpOptions {
|
|
325
|
-
/**
|
|
340
|
+
/**
|
|
341
|
+
* Request timeout in milliseconds.
|
|
342
|
+
* @default 10000
|
|
343
|
+
*/
|
|
326
344
|
timeout?: number;
|
|
327
|
-
/**
|
|
345
|
+
/**
|
|
346
|
+
* Cache fetched Open Graph metadata in memory for the current process.
|
|
347
|
+
* @default true
|
|
348
|
+
*/
|
|
328
349
|
cache?: boolean;
|
|
329
|
-
/**
|
|
350
|
+
/**
|
|
351
|
+
* Cache TTL in milliseconds.
|
|
352
|
+
* @default 3600000
|
|
353
|
+
*/
|
|
330
354
|
cacheTTL?: number;
|
|
331
|
-
/**
|
|
355
|
+
/**
|
|
356
|
+
* User agent sent with metadata fetch requests.
|
|
357
|
+
* @default 'ox-content-ogp-bot/1.0 (compatible; +https://github.com/ubugeeei-prod/ox-content)'
|
|
358
|
+
*/
|
|
332
359
|
userAgent?: string;
|
|
333
360
|
}
|
|
334
361
|
/**
|
|
@@ -371,7 +398,8 @@ interface PmOptions {
|
|
|
371
398
|
* Enable opt-in synced package-manager tab groups. When `true`, a
|
|
372
399
|
* `data-ox-tab-group="pkg-manager"` attribute is emitted so the client runtime
|
|
373
400
|
* syncs the active package manager across every pm group on the page and
|
|
374
|
-
* persists the choice in localStorage.
|
|
401
|
+
* persists the choice in localStorage.
|
|
402
|
+
* @default false
|
|
375
403
|
*/
|
|
376
404
|
sync?: boolean;
|
|
377
405
|
}
|
|
@@ -400,13 +428,25 @@ declare function generateTabsCSS(groupCount: number): string;
|
|
|
400
428
|
* check so pages without a `<youtube>` element never cross the NAPI boundary.
|
|
401
429
|
*/
|
|
402
430
|
interface YouTubeOptions {
|
|
403
|
-
/**
|
|
431
|
+
/**
|
|
432
|
+
* Use privacy-enhanced mode (`youtube-nocookie.com`).
|
|
433
|
+
* @default true
|
|
434
|
+
*/
|
|
404
435
|
privacyEnhanced?: boolean;
|
|
405
|
-
/**
|
|
436
|
+
/**
|
|
437
|
+
* Default iframe aspect ratio.
|
|
438
|
+
* @default '16/9'
|
|
439
|
+
*/
|
|
406
440
|
aspectRatio?: string;
|
|
407
|
-
/**
|
|
441
|
+
/**
|
|
442
|
+
* Allow fullscreen playback.
|
|
443
|
+
* @default true
|
|
444
|
+
*/
|
|
408
445
|
allowFullscreen?: boolean;
|
|
409
|
-
/**
|
|
446
|
+
/**
|
|
447
|
+
* Lazy load the iframe.
|
|
448
|
+
* @default true
|
|
449
|
+
*/
|
|
410
450
|
lazyLoad?: boolean;
|
|
411
451
|
}
|
|
412
452
|
/**
|
|
@@ -427,7 +467,10 @@ declare function transformYouTube(html: string, options?: YouTubeOptions): Promi
|
|
|
427
467
|
* extracts mermaid code blocks from HTML and renders them using mmdc.
|
|
428
468
|
*/
|
|
429
469
|
interface MermaidOptions {
|
|
430
|
-
/**
|
|
470
|
+
/**
|
|
471
|
+
* Mermaid theme used by the CLI renderer.
|
|
472
|
+
* @default 'neutral'
|
|
473
|
+
*/
|
|
431
474
|
theme?: "default" | "dark" | "forest" | "neutral" | "base";
|
|
432
475
|
}
|
|
433
476
|
/**
|
|
@@ -578,42 +621,76 @@ interface SsgNavigationGroup {
|
|
|
578
621
|
items: SsgNavigationItem[];
|
|
579
622
|
}
|
|
580
623
|
/**
|
|
581
|
-
*
|
|
624
|
+
* Static Site Generation options.
|
|
625
|
+
*
|
|
626
|
+
* These options control the HTML files emitted at build time and the matching
|
|
627
|
+
* dev-server preview behavior. Pass `false` to the top-level `ssg` option to
|
|
628
|
+
* disable the whole SSG pipeline, or pass an object to customize the defaults.
|
|
582
629
|
*/
|
|
583
630
|
interface SsgOptions {
|
|
584
631
|
/**
|
|
585
|
-
* Enable SSG
|
|
632
|
+
* Enable the SSG pipeline.
|
|
633
|
+
*
|
|
634
|
+
* Keep this enabled when ox-content owns page rendering. Disable it only when
|
|
635
|
+
* another framework integration will consume the Markdown modules directly.
|
|
636
|
+
*
|
|
586
637
|
* @default true
|
|
587
638
|
*/
|
|
588
639
|
enabled?: boolean;
|
|
589
640
|
/**
|
|
590
|
-
*
|
|
641
|
+
* File extension used for generated routes.
|
|
642
|
+
*
|
|
643
|
+
* The value should include the leading dot. For example, `.html` emits
|
|
644
|
+
* `guide.html`, while an empty string can be used by custom deployments that
|
|
645
|
+
* map extensionless output themselves.
|
|
646
|
+
*
|
|
591
647
|
* @default '.html'
|
|
592
648
|
*/
|
|
593
649
|
extension?: string;
|
|
594
650
|
/**
|
|
595
|
-
*
|
|
651
|
+
* Remove previously generated files from the output directory before writing
|
|
652
|
+
* the new SSG result.
|
|
653
|
+
*
|
|
654
|
+
* Leave this disabled when the output directory also contains assets produced
|
|
655
|
+
* by other Vite plugins or external build steps.
|
|
656
|
+
*
|
|
596
657
|
* @default false
|
|
597
658
|
*/
|
|
598
659
|
clean?: boolean;
|
|
599
660
|
/**
|
|
600
|
-
*
|
|
601
|
-
*
|
|
661
|
+
* Emit bare HTML with only the rendered Markdown body.
|
|
662
|
+
*
|
|
663
|
+
* This skips the default navigation, layout shell, and theme styles. It is
|
|
664
|
+
* mainly useful for benchmarking, fixture generation, or projects that wrap
|
|
665
|
+
* the output in their own shell.
|
|
666
|
+
*
|
|
602
667
|
* @default false
|
|
603
668
|
*/
|
|
604
669
|
bare?: boolean;
|
|
605
670
|
/**
|
|
606
|
-
* Site name
|
|
671
|
+
* Site name shown in the default theme header and title suffix.
|
|
672
|
+
*
|
|
673
|
+
* When omitted, the renderer falls back to project metadata where available.
|
|
674
|
+
*
|
|
675
|
+
* @default undefined
|
|
607
676
|
*/
|
|
608
677
|
siteName?: string;
|
|
609
678
|
/**
|
|
610
|
-
*
|
|
611
|
-
*
|
|
679
|
+
* Static Open Graph image URL used for social sharing.
|
|
680
|
+
*
|
|
681
|
+
* When `generateOgImage` is enabled, this value is still useful as a fallback
|
|
682
|
+
* for pages that cannot produce a generated image.
|
|
683
|
+
*
|
|
684
|
+
* @default undefined
|
|
612
685
|
*/
|
|
613
686
|
ogImage?: string;
|
|
614
687
|
/**
|
|
615
|
-
* Generate
|
|
616
|
-
*
|
|
688
|
+
* Generate one Open Graph image per page.
|
|
689
|
+
*
|
|
690
|
+
* Generated images are written alongside the SSG output and referenced from
|
|
691
|
+
* each page's metadata. Configure rendering details with the top-level
|
|
692
|
+
* `ogImageOptions` option.
|
|
693
|
+
*
|
|
617
694
|
* @default false
|
|
618
695
|
*/
|
|
619
696
|
generateOgImage?: boolean;
|
|
@@ -623,19 +700,36 @@ interface SsgOptions {
|
|
|
623
700
|
*/
|
|
624
701
|
lastUpdated?: boolean;
|
|
625
702
|
/**
|
|
626
|
-
*
|
|
627
|
-
*
|
|
628
|
-
*
|
|
703
|
+
* Absolute site URL used when generating social metadata.
|
|
704
|
+
*
|
|
705
|
+
* Set this when pages need absolute Open Graph image URLs. Include the origin
|
|
706
|
+
* and any deployment base path, without a trailing page path.
|
|
707
|
+
*
|
|
708
|
+
* @example
|
|
709
|
+
* ```ts
|
|
710
|
+
* siteUrl: 'https://example.com/docs'
|
|
711
|
+
* ```
|
|
712
|
+
*
|
|
713
|
+
* @default undefined
|
|
629
714
|
*/
|
|
630
715
|
siteUrl?: string;
|
|
631
716
|
/**
|
|
632
|
-
* Theme configuration for
|
|
633
|
-
*
|
|
717
|
+
* Theme configuration for generated pages.
|
|
718
|
+
*
|
|
719
|
+
* Use `defineTheme()` to build this object so custom theme modules and the
|
|
720
|
+
* default theme extension points keep their expected shape.
|
|
721
|
+
*
|
|
722
|
+
* @default defaultTheme
|
|
634
723
|
*/
|
|
635
724
|
theme?: ThemeConfig;
|
|
636
725
|
/**
|
|
637
|
-
*
|
|
638
|
-
*
|
|
726
|
+
* Sidebar navigation override.
|
|
727
|
+
*
|
|
728
|
+
* When omitted, ox-content derives navigation from the Markdown file tree.
|
|
729
|
+
* Provide this when migrating from systems such as VitePress where navigation
|
|
730
|
+
* is intentionally hand-authored.
|
|
731
|
+
*
|
|
732
|
+
* @default undefined
|
|
639
733
|
*/
|
|
640
734
|
navigation?: SsgNavigationGroup[];
|
|
641
735
|
}
|
|
@@ -656,32 +750,61 @@ interface ResolvedSsgOptions {
|
|
|
656
750
|
navigation?: SsgNavigationGroup[];
|
|
657
751
|
}
|
|
658
752
|
/**
|
|
659
|
-
*
|
|
753
|
+
* Options for the core `oxContent()` Vite plugin.
|
|
754
|
+
*
|
|
755
|
+
* The top-level options describe where content lives, which Markdown features
|
|
756
|
+
* are enabled, and which build-time features should run. Feature toggles that
|
|
757
|
+
* accept `boolean | Options` follow the same convention:
|
|
758
|
+
*
|
|
759
|
+
* - `false` disables the feature.
|
|
760
|
+
* - `true` enables the feature with its documented defaults.
|
|
761
|
+
* - an object enables the feature and overrides only the provided fields.
|
|
660
762
|
*/
|
|
661
763
|
interface OxContentOptions {
|
|
662
764
|
/**
|
|
663
|
-
*
|
|
765
|
+
* Directory containing Markdown source files.
|
|
766
|
+
*
|
|
767
|
+
* The path is resolved from the Vite project root. SSG, search indexing, and
|
|
768
|
+
* dev-server routing all use this directory as the content root.
|
|
769
|
+
*
|
|
664
770
|
* @default 'content'
|
|
665
771
|
*/
|
|
666
772
|
srcDir?: string;
|
|
667
773
|
/**
|
|
668
|
-
*
|
|
774
|
+
* Directory where generated files are written.
|
|
775
|
+
*
|
|
776
|
+
* SSG HTML, search indexes, and generated assets are emitted under this
|
|
777
|
+
* directory during production builds.
|
|
778
|
+
*
|
|
669
779
|
* @default 'dist'
|
|
670
780
|
*/
|
|
671
781
|
outDir?: string;
|
|
672
782
|
/**
|
|
673
|
-
* Base path
|
|
783
|
+
* Base path prepended to generated internal URLs.
|
|
784
|
+
*
|
|
785
|
+
* Use this when the site is deployed below a sub-path, such as GitHub Pages or
|
|
786
|
+
* a documentation route inside a larger application.
|
|
787
|
+
*
|
|
674
788
|
* @default '/'
|
|
675
789
|
*/
|
|
676
790
|
base?: string;
|
|
677
791
|
/**
|
|
678
792
|
* Markdown-like file extensions to process.
|
|
793
|
+
*
|
|
794
|
+
* Extensions are normalized with a leading dot and matched case-insensitively.
|
|
795
|
+
* Add custom extensions when another authoring format is compiled to Markdown
|
|
796
|
+
* before ox-content sees it.
|
|
797
|
+
*
|
|
679
798
|
* @default ['.md', '.markdown', '.mdx']
|
|
680
799
|
*/
|
|
681
800
|
extensions?: string[];
|
|
682
801
|
/**
|
|
683
|
-
*
|
|
684
|
-
*
|
|
802
|
+
* Static Site Generation options.
|
|
803
|
+
*
|
|
804
|
+
* Passing `true` or omitting this option enables SSG with defaults. Passing
|
|
805
|
+
* `false` disables the SSG plugin while still allowing Markdown module
|
|
806
|
+
* transforms to run.
|
|
807
|
+
*
|
|
685
808
|
* @default { enabled: true }
|
|
686
809
|
*/
|
|
687
810
|
ssg?: SsgOptions | boolean;
|
|
@@ -724,47 +847,81 @@ interface OxContentOptions {
|
|
|
724
847
|
* Additional languages for syntax highlighting.
|
|
725
848
|
* Accepts Shiki LanguageRegistration objects (e.g., TextMate grammars).
|
|
726
849
|
* These are loaded alongside the built-in languages.
|
|
850
|
+
* @default []
|
|
727
851
|
*/
|
|
728
852
|
highlightLangs?: LanguageRegistration$1[];
|
|
729
853
|
/**
|
|
730
|
-
*
|
|
854
|
+
* Code block line annotations for fenced code blocks.
|
|
731
855
|
*
|
|
732
|
-
*
|
|
733
|
-
*
|
|
856
|
+
* This feature is opt-in because it changes rendered code-block markup. Pass
|
|
857
|
+
* `true` to enable ox-content's attribute syntax, or pass an options object to
|
|
858
|
+
* change the meta key or enable VitePress-compatible notation.
|
|
734
859
|
*
|
|
735
|
-
*
|
|
736
|
-
*
|
|
860
|
+
* @example
|
|
861
|
+
* ~~~md
|
|
862
|
+
* ```ts annotate="highlight:1,3-4;warning:6;error:7"
|
|
863
|
+
* const value = compute()
|
|
864
|
+
* ```
|
|
865
|
+
* ~~~
|
|
737
866
|
*
|
|
738
867
|
* @default false
|
|
739
868
|
*/
|
|
740
869
|
codeAnnotations?: boolean | CodeAnnotationsOptions;
|
|
741
870
|
/**
|
|
742
871
|
* Expand Obsidian-style `[[page]]` and `[[page|label]]` links.
|
|
872
|
+
*
|
|
873
|
+
* Use this for knowledge-base style content where authors prefer short,
|
|
874
|
+
* document-relative link syntax. Pass an object to override the base URL used
|
|
875
|
+
* when resolving generated hrefs.
|
|
876
|
+
*
|
|
743
877
|
* @default false
|
|
744
878
|
*/
|
|
745
879
|
wikiLinks?: boolean | WikiLinkOptions;
|
|
746
880
|
/**
|
|
747
881
|
* Expand `:shortcode:` emoji aliases to Unicode.
|
|
882
|
+
*
|
|
883
|
+
* Built-in aliases cover common emoji names. Provide `custom` entries for
|
|
884
|
+
* project-specific aliases or to override a built-in mapping.
|
|
885
|
+
*
|
|
748
886
|
* @default false
|
|
749
887
|
*/
|
|
750
888
|
emojiShortcodes?: boolean | EmojiShortcodeOptions;
|
|
751
889
|
/**
|
|
752
890
|
* Enable markdown-it-attrs style `{#id .class key=value}` attributes.
|
|
891
|
+
*
|
|
892
|
+
* Attribute blocks can be attached to headings, paragraphs, links, images, and
|
|
893
|
+
* other supported Markdown nodes depending on parser context.
|
|
894
|
+
*
|
|
753
895
|
* @default false
|
|
754
896
|
*/
|
|
755
897
|
attrs?: boolean | AttrsOptions;
|
|
756
898
|
/**
|
|
757
899
|
* Import source snippets into fences with `<<< @/path/to/file.ts{region}`.
|
|
900
|
+
*
|
|
901
|
+
* This is useful for documentation that must stay synchronized with examples
|
|
902
|
+
* in the repository. Use `rootDir` when snippets should resolve from a
|
|
903
|
+
* directory other than the Vite project root.
|
|
904
|
+
*
|
|
758
905
|
* @default false
|
|
759
906
|
*/
|
|
760
907
|
codeImports?: boolean | CodeImportOptions;
|
|
761
908
|
/**
|
|
762
909
|
* Sanitize rendered HTML with safe defaults or explicit allow lists.
|
|
910
|
+
*
|
|
911
|
+
* Enable this for untrusted Markdown. The default allow lists are conservative;
|
|
912
|
+
* pass an options object only when the content model intentionally needs extra
|
|
913
|
+
* tags, attributes, or URL schemes.
|
|
914
|
+
*
|
|
763
915
|
* @default false
|
|
764
916
|
*/
|
|
765
917
|
sanitize?: boolean | SanitizeOptions;
|
|
766
918
|
/**
|
|
767
919
|
* Append an "edit this page" link to rendered Markdown.
|
|
920
|
+
*
|
|
921
|
+
* The feature is enabled only when `repoUrl` is provided in the options object.
|
|
922
|
+
* Passing `true` keeps the feature disabled because there is not enough
|
|
923
|
+
* repository information to generate valid links.
|
|
924
|
+
*
|
|
768
925
|
* @default false
|
|
769
926
|
*/
|
|
770
927
|
editThisPage?: boolean | EditThisPageOptions;
|
|
@@ -776,16 +933,30 @@ interface OxContentOptions {
|
|
|
776
933
|
cjkEmphasis?: boolean;
|
|
777
934
|
/**
|
|
778
935
|
* Lint fenced code blocks during Markdown transforms.
|
|
936
|
+
*
|
|
937
|
+
* Use this as a lightweight authoring check for missing languages or trailing
|
|
938
|
+
* whitespace inside fences. For project-wide linting, prefer the exported
|
|
939
|
+
* `lintCodeBlocks()` helper or the Markdown lint APIs.
|
|
940
|
+
*
|
|
779
941
|
* @default false
|
|
780
942
|
*/
|
|
781
943
|
codeBlockLint?: boolean | CodeBlockLintOptions;
|
|
782
944
|
/**
|
|
783
945
|
* Type-check TypeScript/TSX code fences via tsgo.
|
|
946
|
+
*
|
|
947
|
+
* By default only fences with explicit opt-in metadata are checked. This keeps
|
|
948
|
+
* incidental examples cheap while allowing docs-as-code snippets to fail the
|
|
949
|
+
* build when configured with `mode: 'error'`.
|
|
950
|
+
*
|
|
784
951
|
* @default false
|
|
785
952
|
*/
|
|
786
953
|
codeBlockTypecheck?: boolean | CodeBlockTypecheckOptions;
|
|
787
954
|
/**
|
|
788
955
|
* Extract runnable fenced examples for Vitest docs-as-tests harnesses.
|
|
956
|
+
*
|
|
957
|
+
* Collected examples can be written by the docs test helpers and executed as
|
|
958
|
+
* part of a normal Vitest suite.
|
|
959
|
+
*
|
|
789
960
|
* @default false
|
|
790
961
|
*/
|
|
791
962
|
docsTests?: boolean | DocsTestOptions;
|
|
@@ -816,10 +987,14 @@ interface OxContentOptions {
|
|
|
816
987
|
ogImage?: boolean;
|
|
817
988
|
/**
|
|
818
989
|
* OG image generation options.
|
|
990
|
+
* Ignored unless `ogImage` or `ssg.generateOgImage` is enabled.
|
|
991
|
+
* @default { vuePlugin: 'vitejs', width: 1200, height: 630, cache: true, concurrency: 1 }
|
|
819
992
|
*/
|
|
820
993
|
ogImageOptions?: OgImageOptions;
|
|
821
994
|
/**
|
|
822
995
|
* Custom AST transformers.
|
|
996
|
+
* Transformers run after parsing and before the final JavaScript module is emitted.
|
|
997
|
+
* @default []
|
|
823
998
|
*/
|
|
824
999
|
transformers?: MarkdownTransformer[];
|
|
825
1000
|
/**
|
|
@@ -969,50 +1144,203 @@ interface ResolvedBuiltinEmbedOptions {
|
|
|
969
1144
|
bluesky: boolean;
|
|
970
1145
|
webContainer: boolean;
|
|
971
1146
|
}
|
|
1147
|
+
/**
|
|
1148
|
+
* Options for expanding Obsidian-style wiki links.
|
|
1149
|
+
*
|
|
1150
|
+
* The transform accepts `[[target]]` and `[[target|label]]` syntax and rewrites
|
|
1151
|
+
* it to regular links before rendering. It is intentionally small: path
|
|
1152
|
+
* resolution is based on the configured base URL rather than a full backlink
|
|
1153
|
+
* graph.
|
|
1154
|
+
*/
|
|
972
1155
|
interface WikiLinkOptions {
|
|
1156
|
+
/**
|
|
1157
|
+
* Base URL prepended to resolved wiki-link targets.
|
|
1158
|
+
*
|
|
1159
|
+
* When omitted, the top-level `base` option is used.
|
|
1160
|
+
*
|
|
1161
|
+
* @default options.base
|
|
1162
|
+
*/
|
|
973
1163
|
baseUrl?: string;
|
|
974
1164
|
}
|
|
1165
|
+
/**
|
|
1166
|
+
* Resolved wiki-link transform options.
|
|
1167
|
+
*/
|
|
975
1168
|
interface ResolvedWikiLinkOptions {
|
|
976
1169
|
enabled: boolean;
|
|
977
1170
|
baseUrl: string;
|
|
978
1171
|
}
|
|
1172
|
+
/**
|
|
1173
|
+
* Options for expanding `:shortcode:` emoji aliases.
|
|
1174
|
+
*
|
|
1175
|
+
* The transform replaces recognized shortcode tokens with their Unicode emoji
|
|
1176
|
+
* equivalents during Markdown transformation. Unknown shortcodes are left
|
|
1177
|
+
* untouched so colon-delimited text can still be used by other tools.
|
|
1178
|
+
*/
|
|
979
1179
|
interface EmojiShortcodeOptions {
|
|
1180
|
+
/**
|
|
1181
|
+
* Custom shortcode map merged with the built-in emoji aliases.
|
|
1182
|
+
*
|
|
1183
|
+
* Keys should omit the surrounding colons.
|
|
1184
|
+
*
|
|
1185
|
+
* @example
|
|
1186
|
+
* ```ts
|
|
1187
|
+
* custom: { shipit: '\u{1F6A2}' }
|
|
1188
|
+
* ```
|
|
1189
|
+
*
|
|
1190
|
+
* @default {}
|
|
1191
|
+
*/
|
|
980
1192
|
custom?: Record<string, string>;
|
|
981
1193
|
}
|
|
1194
|
+
/**
|
|
1195
|
+
* Resolved emoji-shortcode transform options.
|
|
1196
|
+
*/
|
|
982
1197
|
interface ResolvedEmojiShortcodeOptions {
|
|
983
1198
|
enabled: boolean;
|
|
984
1199
|
custom: Record<string, string>;
|
|
985
1200
|
}
|
|
1201
|
+
/**
|
|
1202
|
+
* Options for markdown-it-attrs style attribute blocks.
|
|
1203
|
+
*
|
|
1204
|
+
* Attribute blocks let authors attach IDs, classes, and key/value attributes to
|
|
1205
|
+
* nearby Markdown nodes with syntax such as `{#install .lead}`.
|
|
1206
|
+
*/
|
|
986
1207
|
interface AttrsOptions {
|
|
1208
|
+
/**
|
|
1209
|
+
* Enable the attrs transform when an options object is supplied.
|
|
1210
|
+
*
|
|
1211
|
+
* Set to `false` to keep the object shape while disabling the transform.
|
|
1212
|
+
* This is mainly useful for config merging where callers want to preserve a
|
|
1213
|
+
* stable object structure.
|
|
1214
|
+
*
|
|
1215
|
+
* @default true
|
|
1216
|
+
*/
|
|
987
1217
|
enabled?: boolean;
|
|
988
1218
|
}
|
|
1219
|
+
/**
|
|
1220
|
+
* Resolved attrs transform options.
|
|
1221
|
+
*/
|
|
989
1222
|
interface ResolvedAttrsOptions {
|
|
990
1223
|
enabled: boolean;
|
|
991
1224
|
}
|
|
1225
|
+
/**
|
|
1226
|
+
* Options for importing source snippets into code fences.
|
|
1227
|
+
*
|
|
1228
|
+
* The transform resolves `<<<` imports before code highlighting and other
|
|
1229
|
+
* code-block features run. Imported snippets therefore behave like ordinary
|
|
1230
|
+
* fenced code in later stages.
|
|
1231
|
+
*/
|
|
992
1232
|
interface CodeImportOptions {
|
|
1233
|
+
/**
|
|
1234
|
+
* Directory used to resolve `<<<` imports.
|
|
1235
|
+
*
|
|
1236
|
+
* When omitted, imports resolve from the Vite project root and configured aliases.
|
|
1237
|
+
*
|
|
1238
|
+
* @example
|
|
1239
|
+
* ```ts
|
|
1240
|
+
* rootDir: 'examples'
|
|
1241
|
+
* ```
|
|
1242
|
+
*
|
|
1243
|
+
* @default undefined
|
|
1244
|
+
*/
|
|
993
1245
|
rootDir?: string;
|
|
994
1246
|
}
|
|
1247
|
+
/**
|
|
1248
|
+
* Resolved code-import transform options.
|
|
1249
|
+
*/
|
|
995
1250
|
interface ResolvedCodeImportOptions {
|
|
996
1251
|
enabled: boolean;
|
|
997
1252
|
rootDir?: string;
|
|
998
1253
|
}
|
|
1254
|
+
/**
|
|
1255
|
+
* Options for sanitizing rendered HTML.
|
|
1256
|
+
*
|
|
1257
|
+
* Sanitization happens after Markdown is rendered to HTML. This makes it useful
|
|
1258
|
+
* for user-authored content, but consumers should avoid enabling extra tags or
|
|
1259
|
+
* schemes unless the rendered output explicitly requires them.
|
|
1260
|
+
*/
|
|
999
1261
|
interface SanitizeOptions {
|
|
1262
|
+
/**
|
|
1263
|
+
* Allowed HTML tag names. Omit to use the built-in safe tag allow list.
|
|
1264
|
+
*
|
|
1265
|
+
* Provide a full replacement list, not a list of additions.
|
|
1266
|
+
*
|
|
1267
|
+
* @default undefined
|
|
1268
|
+
*/
|
|
1000
1269
|
allowedTags?: string[];
|
|
1270
|
+
/**
|
|
1271
|
+
* Allowed HTML attribute names. Omit to use the built-in safe attribute allow list.
|
|
1272
|
+
*
|
|
1273
|
+
* Provide a full replacement list, not a list of additions.
|
|
1274
|
+
*
|
|
1275
|
+
* @default undefined
|
|
1276
|
+
*/
|
|
1001
1277
|
allowedAttributes?: string[];
|
|
1278
|
+
/**
|
|
1279
|
+
* Allowed URL schemes for link-like attributes.
|
|
1280
|
+
*
|
|
1281
|
+
* Omit to use the built-in safe scheme allow list.
|
|
1282
|
+
*
|
|
1283
|
+
* @default undefined
|
|
1284
|
+
*/
|
|
1002
1285
|
allowedUrlSchemes?: string[];
|
|
1003
1286
|
}
|
|
1287
|
+
/**
|
|
1288
|
+
* Resolved sanitize transform options.
|
|
1289
|
+
*/
|
|
1004
1290
|
interface ResolvedSanitizeOptions {
|
|
1005
1291
|
enabled: boolean;
|
|
1006
1292
|
allowedTags?: string[];
|
|
1007
1293
|
allowedAttributes?: string[];
|
|
1008
1294
|
allowedUrlSchemes?: string[];
|
|
1009
1295
|
}
|
|
1296
|
+
/**
|
|
1297
|
+
* Options for appending an "edit this page" link.
|
|
1298
|
+
*
|
|
1299
|
+
* The generated link points at the source Markdown file rather than the emitted
|
|
1300
|
+
* HTML route. Configure `branch` and `rootDir` to match the repository layout
|
|
1301
|
+
* users should edit.
|
|
1302
|
+
*/
|
|
1010
1303
|
interface EditThisPageOptions {
|
|
1304
|
+
/**
|
|
1305
|
+
* Repository URL used to build edit links.
|
|
1306
|
+
*
|
|
1307
|
+
* The transform is enabled only when this value is provided.
|
|
1308
|
+
*
|
|
1309
|
+
* @example
|
|
1310
|
+
* ```ts
|
|
1311
|
+
* repoUrl: 'https://github.com/owner/project'
|
|
1312
|
+
* ```
|
|
1313
|
+
*/
|
|
1011
1314
|
repoUrl: string;
|
|
1315
|
+
/**
|
|
1316
|
+
* Branch used in generated edit links.
|
|
1317
|
+
*
|
|
1318
|
+
* Use the branch that accepts documentation changes, not necessarily the
|
|
1319
|
+
* branch that produced the deployed site.
|
|
1320
|
+
*
|
|
1321
|
+
* @default 'main'
|
|
1322
|
+
*/
|
|
1012
1323
|
branch?: string;
|
|
1324
|
+
/**
|
|
1325
|
+
* Source root inside the repository, used before the page path.
|
|
1326
|
+
*
|
|
1327
|
+
* Set this when `srcDir` is nested in a package or docs workspace.
|
|
1328
|
+
*
|
|
1329
|
+
* @default undefined
|
|
1330
|
+
*/
|
|
1013
1331
|
rootDir?: string;
|
|
1332
|
+
/**
|
|
1333
|
+
* Link text rendered in the page footer.
|
|
1334
|
+
*
|
|
1335
|
+
* Keep this short; the default theme renders it as a compact footer action.
|
|
1336
|
+
*
|
|
1337
|
+
* @default 'Edit this page'
|
|
1338
|
+
*/
|
|
1014
1339
|
label?: string;
|
|
1015
1340
|
}
|
|
1341
|
+
/**
|
|
1342
|
+
* Resolved edit-link transform options.
|
|
1343
|
+
*/
|
|
1016
1344
|
interface ResolvedEditThisPageOptions {
|
|
1017
1345
|
enabled: boolean;
|
|
1018
1346
|
repoUrl?: string;
|
|
@@ -1020,12 +1348,51 @@ interface ResolvedEditThisPageOptions {
|
|
|
1020
1348
|
rootDir?: string;
|
|
1021
1349
|
label: string;
|
|
1022
1350
|
}
|
|
1351
|
+
/**
|
|
1352
|
+
* Options for linting fenced code blocks during Markdown transforms.
|
|
1353
|
+
*
|
|
1354
|
+
* These checks are intentionally local to each fence. They do not execute code
|
|
1355
|
+
* or parse a project graph, so they are safe to run during normal Markdown
|
|
1356
|
+
* transformation.
|
|
1357
|
+
*/
|
|
1023
1358
|
interface CodeBlockLintOptions {
|
|
1359
|
+
/**
|
|
1360
|
+
* Languages to lint. Omit to lint every fenced block language.
|
|
1361
|
+
*
|
|
1362
|
+
* Language names are compared case-insensitively.
|
|
1363
|
+
*
|
|
1364
|
+
* @default undefined
|
|
1365
|
+
*/
|
|
1024
1366
|
languages?: string[];
|
|
1367
|
+
/**
|
|
1368
|
+
* Require every fenced code block to declare a language.
|
|
1369
|
+
*
|
|
1370
|
+
* This is helpful for documentation sites where every example should be
|
|
1371
|
+
* highlighted and searchable by language.
|
|
1372
|
+
*
|
|
1373
|
+
* @default false
|
|
1374
|
+
*/
|
|
1025
1375
|
requireLanguage?: boolean;
|
|
1376
|
+
/**
|
|
1377
|
+
* Report trailing whitespace inside fenced code blocks.
|
|
1378
|
+
*
|
|
1379
|
+
* The check reports the exact line and column range inside the fence content.
|
|
1380
|
+
*
|
|
1381
|
+
* @default true
|
|
1382
|
+
*/
|
|
1026
1383
|
trailingSpaces?: boolean;
|
|
1384
|
+
/**
|
|
1385
|
+
* Diagnostic severity for lint failures.
|
|
1386
|
+
*
|
|
1387
|
+
* Use `'error'` when code-block lint failures should fail the build.
|
|
1388
|
+
*
|
|
1389
|
+
* @default 'warn'
|
|
1390
|
+
*/
|
|
1027
1391
|
mode?: "warn" | "error";
|
|
1028
1392
|
}
|
|
1393
|
+
/**
|
|
1394
|
+
* Resolved code-block lint options.
|
|
1395
|
+
*/
|
|
1029
1396
|
interface ResolvedCodeBlockLintOptions {
|
|
1030
1397
|
enabled: boolean;
|
|
1031
1398
|
languages?: string[];
|
|
@@ -1033,12 +1400,51 @@ interface ResolvedCodeBlockLintOptions {
|
|
|
1033
1400
|
trailingSpaces: boolean;
|
|
1034
1401
|
mode: "warn" | "error";
|
|
1035
1402
|
}
|
|
1403
|
+
/**
|
|
1404
|
+
* Options for type-checking TypeScript and TSX fenced code blocks.
|
|
1405
|
+
*
|
|
1406
|
+
* Type-checking writes matching snippets to a temporary directory and invokes
|
|
1407
|
+
* `tsgo`. It is best suited for concise examples that should stay synchronized
|
|
1408
|
+
* with the public TypeScript API.
|
|
1409
|
+
*/
|
|
1036
1410
|
interface CodeBlockTypecheckOptions {
|
|
1411
|
+
/**
|
|
1412
|
+
* Fence languages to type-check.
|
|
1413
|
+
*
|
|
1414
|
+
* Language names are compared case-insensitively.
|
|
1415
|
+
*
|
|
1416
|
+
* @default ['ts', 'tsx']
|
|
1417
|
+
*/
|
|
1037
1418
|
languages?: string[];
|
|
1419
|
+
/**
|
|
1420
|
+
* Require an opt-in fence meta marker before type-checking.
|
|
1421
|
+
*
|
|
1422
|
+
* When enabled, only fences with metadata such as `typecheck` or `twoslash`
|
|
1423
|
+
* are checked.
|
|
1424
|
+
*
|
|
1425
|
+
* @default true
|
|
1426
|
+
*/
|
|
1038
1427
|
requireMeta?: boolean;
|
|
1428
|
+
/**
|
|
1429
|
+
* Command used to run the TypeScript checker.
|
|
1430
|
+
*
|
|
1431
|
+
* Override this for package-manager scripts or workspace-local binaries.
|
|
1432
|
+
*
|
|
1433
|
+
* @default 'tsgo'
|
|
1434
|
+
*/
|
|
1039
1435
|
tsgoCommand?: string;
|
|
1436
|
+
/**
|
|
1437
|
+
* Diagnostic severity for type-check failures.
|
|
1438
|
+
*
|
|
1439
|
+
* Use `'error'` to fail the Markdown transform on broken snippets.
|
|
1440
|
+
*
|
|
1441
|
+
* @default 'warn'
|
|
1442
|
+
*/
|
|
1040
1443
|
mode?: "warn" | "error";
|
|
1041
1444
|
}
|
|
1445
|
+
/**
|
|
1446
|
+
* Resolved code-block type-check options.
|
|
1447
|
+
*/
|
|
1042
1448
|
interface ResolvedCodeBlockTypecheckOptions {
|
|
1043
1449
|
enabled: boolean;
|
|
1044
1450
|
languages: string[];
|
|
@@ -1046,10 +1452,34 @@ interface ResolvedCodeBlockTypecheckOptions {
|
|
|
1046
1452
|
tsgoCommand: string;
|
|
1047
1453
|
mode: "warn" | "error";
|
|
1048
1454
|
}
|
|
1455
|
+
/**
|
|
1456
|
+
* Options for extracting fenced examples into docs-as-tests fixtures.
|
|
1457
|
+
*
|
|
1458
|
+
* The extractor collects code fences that can be written into test files and
|
|
1459
|
+
* executed by the exported docs test harness helpers.
|
|
1460
|
+
*/
|
|
1049
1461
|
interface DocsTestOptions {
|
|
1462
|
+
/**
|
|
1463
|
+
* Fence languages to collect as runnable examples.
|
|
1464
|
+
*
|
|
1465
|
+
* Language names are compared case-insensitively.
|
|
1466
|
+
*
|
|
1467
|
+
* @default ['js', 'jsx', 'ts', 'tsx']
|
|
1468
|
+
*/
|
|
1050
1469
|
languages?: string[];
|
|
1470
|
+
/**
|
|
1471
|
+
* Require an opt-in fence meta marker before collecting an example.
|
|
1472
|
+
*
|
|
1473
|
+
* When enabled, only fences marked with metadata such as `test`, `runnable`,
|
|
1474
|
+
* `vitest`, or `docs-test` are collected.
|
|
1475
|
+
*
|
|
1476
|
+
* @default true
|
|
1477
|
+
*/
|
|
1051
1478
|
requireMeta?: boolean;
|
|
1052
1479
|
}
|
|
1480
|
+
/**
|
|
1481
|
+
* Resolved docs-as-tests extraction options.
|
|
1482
|
+
*/
|
|
1053
1483
|
interface ResolvedDocsTestOptions {
|
|
1054
1484
|
enabled: boolean;
|
|
1055
1485
|
languages: string[];
|
|
@@ -1261,39 +1691,76 @@ interface ResolvedDocsEntryPoint {
|
|
|
1261
1691
|
}
|
|
1262
1692
|
/**
|
|
1263
1693
|
* Options for source documentation generation.
|
|
1694
|
+
*
|
|
1695
|
+
* The generator extracts JSDoc/TSDoc comments from JavaScript and TypeScript
|
|
1696
|
+
* source files, normalizes the declarations, and writes Markdown plus optional
|
|
1697
|
+
* navigation metadata. The defaults are optimized for documenting a package's
|
|
1698
|
+
* public `src` tree without exposing private implementation details.
|
|
1264
1699
|
*/
|
|
1265
1700
|
interface DocsOptions {
|
|
1266
1701
|
/**
|
|
1267
|
-
* Enable
|
|
1268
|
-
*
|
|
1702
|
+
* Enable source documentation generation.
|
|
1703
|
+
*
|
|
1704
|
+
* The top-level `docs` option is opt-out: omitting it enables docs generation
|
|
1705
|
+
* with defaults, while `docs: false` disables the docs plugin entirely.
|
|
1706
|
+
*
|
|
1707
|
+
* @default true
|
|
1269
1708
|
*/
|
|
1270
1709
|
enabled?: boolean;
|
|
1271
1710
|
/**
|
|
1272
1711
|
* Source directories to scan for documentation.
|
|
1712
|
+
*
|
|
1713
|
+
* Paths are resolved from the Vite project root before applying `include` and
|
|
1714
|
+
* `exclude` patterns.
|
|
1715
|
+
*
|
|
1273
1716
|
* @default ['./src']
|
|
1274
1717
|
*/
|
|
1275
1718
|
src?: string[];
|
|
1276
1719
|
/**
|
|
1277
1720
|
* Output directory for generated documentation.
|
|
1721
|
+
*
|
|
1722
|
+
* The path is resolved from the Vite project root. Markdown pages, `docs.json`,
|
|
1723
|
+
* and generated navigation metadata are written under this directory.
|
|
1724
|
+
*
|
|
1278
1725
|
* @default 'docs/api'
|
|
1279
1726
|
*/
|
|
1280
1727
|
out?: string;
|
|
1281
1728
|
/**
|
|
1282
1729
|
* Glob patterns for files to include.
|
|
1730
|
+
*
|
|
1731
|
+
* Patterns are evaluated inside each `src` directory.
|
|
1732
|
+
*
|
|
1283
1733
|
* @default ['**\/*.ts', '**\/*.tsx', '**\/*.js', '**\/*.jsx', '**\/*.mts', '**\/*.mjs', '**\/*.cts', '**\/*.cjs']
|
|
1284
1734
|
*/
|
|
1285
1735
|
include?: string[];
|
|
1286
1736
|
/**
|
|
1287
1737
|
* Glob patterns for files to exclude.
|
|
1738
|
+
*
|
|
1739
|
+
* Excludes run after `include` matching and should cover tests, generated
|
|
1740
|
+
* files, and implementation-only entry points.
|
|
1741
|
+
*
|
|
1288
1742
|
* @default ['**\/*.test.*', '**\/*.spec.*', 'node_modules']
|
|
1289
1743
|
*/
|
|
1290
1744
|
exclude?: string[];
|
|
1291
1745
|
/**
|
|
1292
1746
|
* Public API entry points used to group re-exported docs.
|
|
1747
|
+
*
|
|
1748
|
+
* When omitted, docs are generated from the discovered source files without
|
|
1749
|
+
* entry-point grouping.
|
|
1750
|
+
*
|
|
1751
|
+
* Use entry points when a package exposes a smaller public surface than its
|
|
1752
|
+
* source tree. Re-exported declarations are grouped under the entry point that
|
|
1753
|
+
* exposes them.
|
|
1754
|
+
*
|
|
1755
|
+
* @default undefined
|
|
1293
1756
|
*/
|
|
1294
1757
|
entryPoints?: DocsEntryPoint[];
|
|
1295
1758
|
/**
|
|
1296
1759
|
* Output format.
|
|
1760
|
+
*
|
|
1761
|
+
* `markdown` is the primary supported format. `json` and `html` are reserved
|
|
1762
|
+
* for consumers that want to post-process extracted documentation data.
|
|
1763
|
+
*
|
|
1297
1764
|
* @default 'markdown'
|
|
1298
1765
|
*/
|
|
1299
1766
|
format?: "markdown" | "json" | "html";
|
|
@@ -1309,7 +1776,8 @@ interface DocsOptions {
|
|
|
1309
1776
|
internal?: boolean;
|
|
1310
1777
|
/**
|
|
1311
1778
|
* Generate table of contents for each file.
|
|
1312
|
-
*
|
|
1779
|
+
* Reserved for future use; current generated API pages do not emit this TOC.
|
|
1780
|
+
* @default false
|
|
1313
1781
|
*/
|
|
1314
1782
|
toc?: boolean;
|
|
1315
1783
|
/**
|
|
@@ -1319,22 +1787,41 @@ interface DocsOptions {
|
|
|
1319
1787
|
groupBy?: "file" | "category";
|
|
1320
1788
|
/**
|
|
1321
1789
|
* GitHub repository URL for source code links.
|
|
1322
|
-
*
|
|
1323
|
-
*
|
|
1790
|
+
*
|
|
1791
|
+
* When provided, generated documentation includes links back to the source
|
|
1792
|
+
* declaration lines.
|
|
1793
|
+
*
|
|
1794
|
+
* @example
|
|
1795
|
+
* ```ts
|
|
1796
|
+
* githubUrl: 'https://github.com/ubugeeei-prod/ox-content'
|
|
1797
|
+
* ```
|
|
1798
|
+
*
|
|
1799
|
+
* @default undefined
|
|
1324
1800
|
*/
|
|
1325
1801
|
githubUrl?: string;
|
|
1326
1802
|
/**
|
|
1327
1803
|
* Internal documentation link style.
|
|
1804
|
+
*
|
|
1805
|
+
* Use `markdown` for generated `.md` targets and `clean` for route-style links
|
|
1806
|
+
* consumed by static-site frameworks.
|
|
1807
|
+
*
|
|
1328
1808
|
* @default 'markdown'
|
|
1329
1809
|
*/
|
|
1330
1810
|
linkStyle?: "markdown" | "clean";
|
|
1331
1811
|
/**
|
|
1332
1812
|
* Route prefix used by generated documentation links and nav metadata.
|
|
1333
|
-
*
|
|
1813
|
+
*
|
|
1814
|
+
* Nav metadata falls back to `/api` when this is not set.
|
|
1815
|
+
*
|
|
1816
|
+
* @default undefined
|
|
1334
1817
|
*/
|
|
1335
1818
|
basePath?: string;
|
|
1336
1819
|
/**
|
|
1337
1820
|
* Generated Markdown output path strategy.
|
|
1821
|
+
*
|
|
1822
|
+
* `flat` emits one page per source module or category. `typedoc` emits
|
|
1823
|
+
* TypeDoc-like module, kind, and symbol pages for larger API references.
|
|
1824
|
+
*
|
|
1338
1825
|
* @default 'flat'
|
|
1339
1826
|
*/
|
|
1340
1827
|
pathStrategy?: "flat" | "typedoc";
|
|
@@ -1410,10 +1897,14 @@ interface DocsOptions {
|
|
|
1410
1897
|
renderGeneratedBy?: boolean;
|
|
1411
1898
|
/**
|
|
1412
1899
|
* TypeDoc-style group order for module index sections and nav groups.
|
|
1900
|
+
* Use `*` as the insertion point for unlisted groups.
|
|
1901
|
+
* @default undefined
|
|
1413
1902
|
*/
|
|
1414
1903
|
groupOrder?: string[];
|
|
1415
1904
|
/**
|
|
1416
1905
|
* TypeDoc-style sort strategies applied to entries and members.
|
|
1906
|
+
* Strategies run in order; later strategies break ties from earlier ones.
|
|
1907
|
+
* @default undefined
|
|
1417
1908
|
*/
|
|
1418
1909
|
sort?: DocsSortStrategy[];
|
|
1419
1910
|
/**
|
|
@@ -1423,6 +1914,7 @@ interface DocsOptions {
|
|
|
1423
1914
|
sortEntryPoints?: boolean;
|
|
1424
1915
|
/**
|
|
1425
1916
|
* TypeDoc-style declaration kind ranking for module sections and nav groups.
|
|
1917
|
+
* @default undefined
|
|
1426
1918
|
*/
|
|
1427
1919
|
kindSortOrder?: string[];
|
|
1428
1920
|
/**
|
|
@@ -1480,117 +1972,209 @@ interface ResolvedDocsOptions {
|
|
|
1480
1972
|
}
|
|
1481
1973
|
/**
|
|
1482
1974
|
* A single documentation entry extracted from source.
|
|
1975
|
+
*
|
|
1976
|
+
* Entries represent top-level declarations such as functions, classes,
|
|
1977
|
+
* interfaces, type aliases, enums, variables, and modules. Members of compound
|
|
1978
|
+
* declarations are stored in `members`.
|
|
1483
1979
|
*/
|
|
1484
1980
|
interface DocEntry {
|
|
1981
|
+
/** Exported or declared symbol name. */
|
|
1485
1982
|
name: string;
|
|
1983
|
+
/** Normalized declaration kind used for grouping and rendering. */
|
|
1486
1984
|
kind: "function" | "class" | "interface" | "type" | "enum" | "variable" | "module";
|
|
1985
|
+
/** Main prose extracted from the leading JSDoc/TSDoc block. */
|
|
1487
1986
|
description: string;
|
|
1987
|
+
/** Function, method, or constructor parameter documentation. */
|
|
1488
1988
|
params?: ParamDoc[];
|
|
1989
|
+
/** Return value documentation for callable declarations. */
|
|
1489
1990
|
returns?: ReturnDoc;
|
|
1991
|
+
/** Exceptions/errors documented with `@throws` / `@exception`. */
|
|
1992
|
+
throws?: ThrowsDoc[];
|
|
1993
|
+
/** Code examples collected from `@example` tags. */
|
|
1490
1994
|
examples?: string[];
|
|
1995
|
+
/** Additional tags preserved by tag name after known tags are normalized. */
|
|
1491
1996
|
tags?: Record<string, string>;
|
|
1997
|
+
/** True when the entry is marked private or matched by private filtering. */
|
|
1492
1998
|
private?: boolean;
|
|
1999
|
+
/** Source file path relative to the extraction root when available. */
|
|
1493
2000
|
file: string;
|
|
2001
|
+
/** 1-based start line of the declaration in the source file. */
|
|
1494
2002
|
line: number;
|
|
2003
|
+
/** 1-based end line of the declaration in the source file. */
|
|
1495
2004
|
endLine: number;
|
|
2005
|
+
/** Full declaration signature, when the renderer can extract one. */
|
|
1496
2006
|
signature?: string;
|
|
2007
|
+
/** Members belonging to classes, interfaces, object types, and enums. */
|
|
1497
2008
|
members?: DocMember[];
|
|
1498
2009
|
}
|
|
1499
2010
|
/**
|
|
1500
2011
|
* A member belonging to a class, interface, type alias, or enum entry.
|
|
1501
2012
|
*/
|
|
1502
2013
|
interface DocMember {
|
|
2014
|
+
/** Member name as it appears in the containing declaration. */
|
|
1503
2015
|
name: string;
|
|
2016
|
+
/** Normalized member kind used for rendering and sorting. */
|
|
1504
2017
|
kind: "property" | "method" | "constructor" | "getter" | "setter" | "enumMember";
|
|
2018
|
+
/** Main prose extracted from the member's documentation comment. */
|
|
1505
2019
|
description: string;
|
|
2020
|
+
/** Full member signature, when available. */
|
|
1506
2021
|
signature?: string;
|
|
2022
|
+
/** Rendered TypeScript type text for properties and enum members. */
|
|
1507
2023
|
type?: string;
|
|
2024
|
+
/** Default value extracted from syntax or `@default` tags. */
|
|
1508
2025
|
default?: string;
|
|
2026
|
+
/** Parameter documentation for methods and constructors. */
|
|
1509
2027
|
params?: ParamDoc[];
|
|
2028
|
+
/** Return value documentation for methods and accessors. */
|
|
1510
2029
|
returns?: ReturnDoc;
|
|
2030
|
+
/** Exceptions/errors documented with `@throws` / `@exception`. */
|
|
2031
|
+
throws?: ThrowsDoc[];
|
|
2032
|
+
/** True when the member is optional in the source declaration. */
|
|
1511
2033
|
optional?: boolean;
|
|
2034
|
+
/** True when the member is declared readonly. */
|
|
1512
2035
|
readonly?: boolean;
|
|
2036
|
+
/** True when the member is static. */
|
|
1513
2037
|
static?: boolean;
|
|
2038
|
+
/** True when the member is marked private or matched by private filtering. */
|
|
1514
2039
|
private?: boolean;
|
|
2040
|
+
/** Additional tags preserved by tag name after known tags are normalized. */
|
|
1515
2041
|
tags?: Record<string, string>;
|
|
2042
|
+
/** 1-based start line of the member declaration. */
|
|
1516
2043
|
line: number;
|
|
2044
|
+
/** 1-based end line of the member declaration. */
|
|
1517
2045
|
endLine: number;
|
|
1518
2046
|
}
|
|
1519
2047
|
/**
|
|
1520
2048
|
* Parameter documentation.
|
|
1521
2049
|
*/
|
|
1522
2050
|
interface ParamDoc {
|
|
2051
|
+
/** Parameter name, including dotted names for destructured properties. */
|
|
1523
2052
|
name: string;
|
|
2053
|
+
/** Rendered TypeScript type text. */
|
|
1524
2054
|
type: string;
|
|
2055
|
+
/** Prose extracted from `@param` / `@arg` documentation. */
|
|
1525
2056
|
description: string;
|
|
2057
|
+
/** True when the parameter is optional. */
|
|
1526
2058
|
optional?: boolean;
|
|
2059
|
+
/** Default value extracted from syntax or `@default` tags. */
|
|
1527
2060
|
default?: string;
|
|
1528
2061
|
}
|
|
1529
2062
|
/**
|
|
1530
2063
|
* Return type documentation.
|
|
1531
2064
|
*/
|
|
1532
2065
|
interface ReturnDoc {
|
|
2066
|
+
/** Rendered TypeScript type text for the return value. */
|
|
1533
2067
|
type: string;
|
|
2068
|
+
/** Prose extracted from `@returns` / `@return` documentation. */
|
|
2069
|
+
description: string;
|
|
2070
|
+
}
|
|
2071
|
+
/**
|
|
2072
|
+
* Exception/error documentation.
|
|
2073
|
+
*/
|
|
2074
|
+
interface ThrowsDoc {
|
|
2075
|
+
/** Rendered TypeScript type text for the thrown value, when documented. */
|
|
2076
|
+
type?: string;
|
|
2077
|
+
/** Prose extracted from `@throws` / `@exception` documentation. */
|
|
1534
2078
|
description: string;
|
|
1535
2079
|
}
|
|
1536
2080
|
/**
|
|
1537
2081
|
* Extracted documentation for a single file.
|
|
1538
2082
|
*/
|
|
1539
2083
|
interface ExtractedDocs {
|
|
2084
|
+
/** Source module or file identifier used by generated output. */
|
|
1540
2085
|
file: string;
|
|
2086
|
+
/** Optional module-level description extracted from a file header comment. */
|
|
1541
2087
|
description?: string;
|
|
2088
|
+
/** Absolute source path, when available for source links and diagnostics. */
|
|
1542
2089
|
sourcePath?: string;
|
|
2090
|
+
/** Module-level examples collected from a file header comment. */
|
|
1543
2091
|
examples?: string[];
|
|
2092
|
+
/** Module-level tags preserved by tag name. */
|
|
1544
2093
|
tags?: Record<string, string>;
|
|
2094
|
+
/** Top-level documented declarations found in this module. */
|
|
1545
2095
|
entries: DocEntry[];
|
|
1546
2096
|
}
|
|
1547
2097
|
/**
|
|
1548
2098
|
* Summary counts emitted with generated documentation data.
|
|
1549
2099
|
*/
|
|
1550
2100
|
interface DocsSummary {
|
|
2101
|
+
/** Number of modules included in the generated payload. */
|
|
1551
2102
|
modules: number;
|
|
2103
|
+
/** Number of top-level entries across all modules. */
|
|
1552
2104
|
entries: number;
|
|
2105
|
+
/** Entry counts grouped by normalized declaration kind. */
|
|
1553
2106
|
byKind: Record<string, number>;
|
|
2107
|
+
/** Number of documented parameters. */
|
|
1554
2108
|
params: number;
|
|
2109
|
+
/** Number of documented return values. */
|
|
1555
2110
|
returns: number;
|
|
2111
|
+
/** Number of collected examples. */
|
|
1556
2112
|
examples: number;
|
|
2113
|
+
/** Number of entries or members marked with `@deprecated`. */
|
|
1557
2114
|
deprecated: number;
|
|
1558
2115
|
}
|
|
1559
2116
|
/**
|
|
1560
2117
|
* Machine-readable payload emitted alongside generated docs.
|
|
1561
2118
|
*/
|
|
1562
2119
|
interface GeneratedDocsData {
|
|
2120
|
+
/** Payload schema version. Increment when the JSON shape changes incompatibly. */
|
|
1563
2121
|
version: 1;
|
|
2122
|
+
/** ISO timestamp for the generation run. */
|
|
1564
2123
|
generatedAt: string;
|
|
2124
|
+
/** Aggregate counts useful for dashboards and generated index pages. */
|
|
1565
2125
|
summary: DocsSummary;
|
|
2126
|
+
/** Extracted documentation modules in render order. */
|
|
1566
2127
|
modules: ExtractedDocs[];
|
|
1567
2128
|
}
|
|
1568
2129
|
/**
|
|
1569
2130
|
* Options for full-text search.
|
|
2131
|
+
*
|
|
2132
|
+
* Search indexes are built from Markdown content at build time and loaded by
|
|
2133
|
+
* the client runtime from `search-index.json`. Pass `false` to the top-level
|
|
2134
|
+
* `search` option to disable both index generation and the virtual search
|
|
2135
|
+
* module.
|
|
1570
2136
|
*/
|
|
1571
2137
|
interface SearchOptions {
|
|
1572
2138
|
/**
|
|
1573
2139
|
* Enable search functionality.
|
|
2140
|
+
*
|
|
2141
|
+
* Set this to `false` when config merging requires an object shape but search
|
|
2142
|
+
* should be disabled.
|
|
2143
|
+
*
|
|
1574
2144
|
* @default true
|
|
1575
2145
|
*/
|
|
1576
2146
|
enabled?: boolean;
|
|
1577
2147
|
/**
|
|
1578
2148
|
* Maximum number of search results.
|
|
2149
|
+
*
|
|
2150
|
+
* This controls client-side result truncation, not the number of documents in
|
|
2151
|
+
* the generated index.
|
|
2152
|
+
*
|
|
1579
2153
|
* @default 10
|
|
1580
2154
|
*/
|
|
1581
2155
|
limit?: number;
|
|
1582
2156
|
/**
|
|
1583
2157
|
* Enable prefix matching for autocomplete.
|
|
2158
|
+
*
|
|
2159
|
+
* Prefix matching applies to the final query token, which keeps normal terms
|
|
2160
|
+
* precise while still supporting typeahead-style interactions.
|
|
2161
|
+
*
|
|
1584
2162
|
* @default true
|
|
1585
2163
|
*/
|
|
1586
2164
|
prefix?: boolean;
|
|
1587
2165
|
/**
|
|
1588
2166
|
* Placeholder text for the search input.
|
|
2167
|
+
*
|
|
2168
|
+
* This value is embedded in the virtual search module for UI consumers.
|
|
2169
|
+
*
|
|
1589
2170
|
* @default 'Search documentation...'
|
|
1590
2171
|
*/
|
|
1591
2172
|
placeholder?: string;
|
|
1592
2173
|
/**
|
|
1593
2174
|
* Keyboard shortcut to focus search (without modifier).
|
|
2175
|
+
*
|
|
2176
|
+
* Use an empty string to let the UI opt out of registering a shortcut.
|
|
2177
|
+
*
|
|
1594
2178
|
* @default '/'
|
|
1595
2179
|
*/
|
|
1596
2180
|
hotkey?: string;
|
|
@@ -1609,80 +2193,130 @@ interface ResolvedSearchOptions {
|
|
|
1609
2193
|
* Search document structure.
|
|
1610
2194
|
*/
|
|
1611
2195
|
interface SearchDocument {
|
|
2196
|
+
/** Stable document identifier used by the search index. */
|
|
1612
2197
|
id: string;
|
|
2198
|
+
/** Human-readable document title. */
|
|
1613
2199
|
title: string;
|
|
2200
|
+
/** URL returned to search consumers. */
|
|
1614
2201
|
url: string;
|
|
2202
|
+
/** Plain-text body content used for scoring and snippets. */
|
|
1615
2203
|
body: string;
|
|
2204
|
+
/** Headings extracted from the document. */
|
|
1616
2205
|
headings: string[];
|
|
2206
|
+
/** Code block text extracted from the document. */
|
|
1617
2207
|
code: string[];
|
|
1618
2208
|
}
|
|
1619
2209
|
/**
|
|
1620
2210
|
* Search result structure.
|
|
1621
2211
|
*/
|
|
1622
2212
|
interface SearchResult {
|
|
2213
|
+
/** Matching document identifier. */
|
|
1623
2214
|
id: string;
|
|
2215
|
+
/** Matching document title. */
|
|
1624
2216
|
title: string;
|
|
2217
|
+
/** URL to open when the result is selected. */
|
|
1625
2218
|
url: string;
|
|
2219
|
+
/** Relevance score returned by the BM25 search engine. */
|
|
1626
2220
|
score: number;
|
|
2221
|
+
/** Query terms that matched the document. */
|
|
1627
2222
|
matches: string[];
|
|
2223
|
+
/** Context snippet with highlighted terms when available. */
|
|
1628
2224
|
snippet: string;
|
|
2225
|
+
/** Hierarchical scopes derived from the result URL or document id. */
|
|
1629
2226
|
scopes?: string[];
|
|
1630
2227
|
}
|
|
1631
2228
|
/**
|
|
1632
2229
|
* Parsed search query with optional scope prefixes.
|
|
1633
2230
|
*/
|
|
1634
2231
|
interface ScopedSearchQuery {
|
|
2232
|
+
/** Query text after `@scope` prefixes have been removed. */
|
|
1635
2233
|
text: string;
|
|
2234
|
+
/** Deduplicated lowercase scope prefixes requested by the query. */
|
|
1636
2235
|
scopes: string[];
|
|
1637
2236
|
}
|
|
1638
2237
|
/**
|
|
1639
2238
|
* Locale configuration.
|
|
2239
|
+
*
|
|
2240
|
+
* Locales define the routing and display metadata used by the i18n plugin.
|
|
1640
2241
|
*/
|
|
1641
2242
|
interface LocaleConfig {
|
|
1642
2243
|
/** BCP 47 locale tag (e.g., 'en', 'ja', 'zh-Hans'). */
|
|
1643
2244
|
code: string;
|
|
1644
2245
|
/** Display name for this locale (e.g., 'English', '日本語'). */
|
|
1645
2246
|
name: string;
|
|
1646
|
-
/**
|
|
2247
|
+
/**
|
|
2248
|
+
* Text direction for rendered pages.
|
|
2249
|
+
*
|
|
2250
|
+
* @default 'ltr'
|
|
2251
|
+
*/
|
|
1647
2252
|
dir?: "ltr" | "rtl";
|
|
1648
2253
|
}
|
|
1649
2254
|
/**
|
|
1650
2255
|
* i18n (internationalization) options.
|
|
2256
|
+
*
|
|
2257
|
+
* i18n is opt-in because it changes routing and build-time validation. Set
|
|
2258
|
+
* `enabled: true` and configure at least `defaultLocale` / `locales` when the
|
|
2259
|
+
* same content tree should serve multiple languages.
|
|
1651
2260
|
*/
|
|
1652
2261
|
interface I18nOptions {
|
|
1653
2262
|
/**
|
|
1654
2263
|
* Enable i18n.
|
|
2264
|
+
*
|
|
2265
|
+
* The resolver returns `false` unless this is explicitly set to `true`.
|
|
2266
|
+
*
|
|
1655
2267
|
* @default false
|
|
1656
2268
|
*/
|
|
1657
2269
|
enabled?: boolean;
|
|
1658
2270
|
/**
|
|
1659
2271
|
* Path to i18n dictionary directory (relative to project root).
|
|
2272
|
+
*
|
|
2273
|
+
* Dictionary files are watched in development and checked during builds when
|
|
2274
|
+
* `check` is enabled.
|
|
2275
|
+
*
|
|
1660
2276
|
* @default 'content/i18n'
|
|
1661
2277
|
*/
|
|
1662
2278
|
dir?: string;
|
|
1663
2279
|
/**
|
|
1664
2280
|
* Default locale tag.
|
|
2281
|
+
*
|
|
2282
|
+
* The default locale is added to `locales` automatically when omitted from the
|
|
2283
|
+
* list.
|
|
2284
|
+
*
|
|
1665
2285
|
* @default 'en'
|
|
1666
2286
|
*/
|
|
1667
2287
|
defaultLocale?: string;
|
|
1668
2288
|
/**
|
|
1669
2289
|
* Available locales.
|
|
2290
|
+
*
|
|
2291
|
+
* When omitted, ox-content creates a single locale from `defaultLocale`.
|
|
2292
|
+
*
|
|
2293
|
+
* @default [{ code: defaultLocale, name: defaultLocale }]
|
|
1670
2294
|
*/
|
|
1671
2295
|
locales?: LocaleConfig[];
|
|
1672
2296
|
/**
|
|
1673
2297
|
* Hide default locale prefix in URLs.
|
|
2298
|
+
*
|
|
1674
2299
|
* When true, `/page` serves the default locale and `/ja/page` serves Japanese.
|
|
1675
2300
|
* When false, all locales get prefixed: `/en/page`, `/ja/page`.
|
|
2301
|
+
*
|
|
1676
2302
|
* @default true
|
|
1677
2303
|
*/
|
|
1678
2304
|
hideDefaultLocale?: boolean;
|
|
1679
2305
|
/**
|
|
1680
2306
|
* Run i18n checks during build.
|
|
2307
|
+
*
|
|
2308
|
+
* Checks validate dictionary coverage and translation function usage when the
|
|
2309
|
+
* native i18n checker is available.
|
|
2310
|
+
*
|
|
1681
2311
|
* @default true
|
|
1682
2312
|
*/
|
|
1683
2313
|
check?: boolean;
|
|
1684
2314
|
/**
|
|
1685
2315
|
* Translation function names to detect in source code.
|
|
2316
|
+
*
|
|
2317
|
+
* Add framework-specific wrappers here so build-time checks can find all
|
|
2318
|
+
* translation keys.
|
|
2319
|
+
*
|
|
1686
2320
|
* @default ['t', '$t']
|
|
1687
2321
|
*/
|
|
1688
2322
|
functionNames?: string[];
|
|
@@ -1732,23 +2366,48 @@ interface IncrementalMarkdownParserOptions {
|
|
|
1732
2366
|
* @default true
|
|
1733
2367
|
*/
|
|
1734
2368
|
gfm?: boolean;
|
|
1735
|
-
/**
|
|
2369
|
+
/**
|
|
2370
|
+
* Enable footnotes.
|
|
2371
|
+
* @default true
|
|
2372
|
+
*/
|
|
1736
2373
|
footnotes?: boolean;
|
|
1737
|
-
/**
|
|
2374
|
+
/**
|
|
2375
|
+
* Enable task list items.
|
|
2376
|
+
* @default true
|
|
2377
|
+
*/
|
|
1738
2378
|
taskLists?: boolean;
|
|
1739
|
-
/**
|
|
2379
|
+
/**
|
|
2380
|
+
* Enable GFM tables.
|
|
2381
|
+
* @default true
|
|
2382
|
+
*/
|
|
1740
2383
|
tables?: boolean;
|
|
1741
|
-
/**
|
|
2384
|
+
/**
|
|
2385
|
+
* Enable strikethrough.
|
|
2386
|
+
* @default true
|
|
2387
|
+
*/
|
|
1742
2388
|
strikethrough?: boolean;
|
|
1743
|
-
/**
|
|
2389
|
+
/**
|
|
2390
|
+
* Enable Markdown autolinks.
|
|
2391
|
+
* @default true
|
|
2392
|
+
*/
|
|
1744
2393
|
autolinks?: boolean;
|
|
1745
2394
|
}
|
|
1746
2395
|
interface IncrementalMarkdownParseAppendOptions {
|
|
1747
|
-
/**
|
|
2396
|
+
/**
|
|
2397
|
+
* Commit the current chunk as the final stream input.
|
|
2398
|
+
* @default false
|
|
2399
|
+
*/
|
|
1748
2400
|
final?: boolean;
|
|
1749
|
-
/**
|
|
2401
|
+
/**
|
|
2402
|
+
* Include a provisional AST for the current replaceable tail.
|
|
2403
|
+
* The constructor-level value is reused when omitted on `append`.
|
|
2404
|
+
* @default false
|
|
2405
|
+
*/
|
|
1750
2406
|
includePendingAst?: boolean;
|
|
1751
|
-
/**
|
|
2407
|
+
/**
|
|
2408
|
+
* Temporarily close unmatched inline delimiters in the provisional AST.
|
|
2409
|
+
* @default true
|
|
2410
|
+
*/
|
|
1752
2411
|
completeInline?: boolean;
|
|
1753
2412
|
}
|
|
1754
2413
|
interface IncrementalMarkdownRendererOptions extends IncrementalMarkdownParserOptions {
|
|
@@ -1764,11 +2423,21 @@ interface IncrementalMarkdownRendererOptions extends IncrementalMarkdownParserOp
|
|
|
1764
2423
|
completeInline?: boolean;
|
|
1765
2424
|
}
|
|
1766
2425
|
interface IncrementalMarkdownRenderAppendOptions {
|
|
1767
|
-
/**
|
|
2426
|
+
/**
|
|
2427
|
+
* Commit the current chunk as the final stream input.
|
|
2428
|
+
* @default false
|
|
2429
|
+
*/
|
|
1768
2430
|
final?: boolean;
|
|
1769
|
-
/**
|
|
2431
|
+
/**
|
|
2432
|
+
* Render the unstable tail as replaceable provisional HTML.
|
|
2433
|
+
* The constructor-level value is reused when omitted on `append`.
|
|
2434
|
+
* @default true
|
|
2435
|
+
*/
|
|
1770
2436
|
renderPending?: boolean;
|
|
1771
|
-
/**
|
|
2437
|
+
/**
|
|
2438
|
+
* Temporarily close unmatched inline delimiters in provisional HTML.
|
|
2439
|
+
* @default true
|
|
2440
|
+
*/
|
|
1772
2441
|
completeInline?: boolean;
|
|
1773
2442
|
}
|
|
1774
2443
|
type IncrementalMarkdownRenderResult = _$_ox_content_napi0.IncrementalMarkdownRenderResult;
|
|
@@ -1920,17 +2589,49 @@ interface CodeBlockDiagnostic {
|
|
|
1920
2589
|
language?: string;
|
|
1921
2590
|
}
|
|
1922
2591
|
interface CodeBlockLintOptions$1 {
|
|
2592
|
+
/**
|
|
2593
|
+
* Languages to lint. Omit to lint every fenced block language.
|
|
2594
|
+
* @default undefined
|
|
2595
|
+
*/
|
|
1923
2596
|
languages?: string[];
|
|
2597
|
+
/**
|
|
2598
|
+
* Report fences without a language identifier.
|
|
2599
|
+
* @default false
|
|
2600
|
+
*/
|
|
1924
2601
|
requireLanguage?: boolean;
|
|
2602
|
+
/**
|
|
2603
|
+
* Report trailing whitespace in code block lines.
|
|
2604
|
+
* @default true
|
|
2605
|
+
*/
|
|
1925
2606
|
trailingSpaces?: boolean;
|
|
1926
2607
|
}
|
|
1927
2608
|
interface DocsTestOptions$1 {
|
|
2609
|
+
/**
|
|
2610
|
+
* Fence languages to collect as runnable examples.
|
|
2611
|
+
* @default ['js', 'jsx', 'ts', 'tsx', 'mjs', 'mts']
|
|
2612
|
+
*/
|
|
1928
2613
|
languages?: string[];
|
|
2614
|
+
/**
|
|
2615
|
+
* Require fence meta such as `test`, `runnable`, `vitest`, or `docs-test`.
|
|
2616
|
+
* @default true
|
|
2617
|
+
*/
|
|
1929
2618
|
requireMeta?: boolean;
|
|
1930
2619
|
}
|
|
1931
2620
|
interface TypecheckCodeBlockOptions {
|
|
2621
|
+
/**
|
|
2622
|
+
* Fence languages to type-check.
|
|
2623
|
+
* @default ['ts', 'tsx']
|
|
2624
|
+
*/
|
|
1932
2625
|
languages?: string[];
|
|
2626
|
+
/**
|
|
2627
|
+
* Require fence meta such as `typecheck`, `twoslash`, or `typecheck=...`.
|
|
2628
|
+
* @default true
|
|
2629
|
+
*/
|
|
1933
2630
|
requireMeta?: boolean;
|
|
2631
|
+
/**
|
|
2632
|
+
* Command used to run the TypeScript checker.
|
|
2633
|
+
* @default 'tsgo'
|
|
2634
|
+
*/
|
|
1934
2635
|
tsgoCommand?: string;
|
|
1935
2636
|
}
|
|
1936
2637
|
declare function extractCodeBlocks(source: string): Promise<ExtractedCodeBlock[]>;
|
|
@@ -2172,6 +2873,7 @@ interface MarkdownLintStandardDictionaryOptions {
|
|
|
2172
2873
|
*
|
|
2173
2874
|
* This can point at installed packages like
|
|
2174
2875
|
* `@cspell/dict-fr-fr/cspell-ext.json` or local CSpell config files.
|
|
2876
|
+
* @default []
|
|
2175
2877
|
*/
|
|
2176
2878
|
imports?: string[];
|
|
2177
2879
|
/**
|
|
@@ -2187,14 +2889,17 @@ interface MarkdownLintStandardDictionaryOptions {
|
|
|
2187
2889
|
interface MarkdownLintDictionaryOptions {
|
|
2188
2890
|
/**
|
|
2189
2891
|
* Words ignored across all configured languages.
|
|
2892
|
+
* @default []
|
|
2190
2893
|
*/
|
|
2191
2894
|
words?: string[];
|
|
2192
2895
|
/**
|
|
2193
2896
|
* Extra words to allow per language.
|
|
2897
|
+
* @default {}
|
|
2194
2898
|
*/
|
|
2195
2899
|
byLanguage?: Partial<Record<MarkdownLintLanguage, string[]>>;
|
|
2196
2900
|
/**
|
|
2197
2901
|
* Words that should never produce diagnostics.
|
|
2902
|
+
* @default []
|
|
2198
2903
|
*/
|
|
2199
2904
|
ignoredWords?: string[];
|
|
2200
2905
|
/**
|
|
@@ -2202,6 +2907,7 @@ interface MarkdownLintDictionaryOptions {
|
|
|
2202
2907
|
*
|
|
2203
2908
|
* By default the linter stays on a minimal built-in dictionary. Enable this
|
|
2204
2909
|
* to load larger locale dictionaries from a standard external source.
|
|
2910
|
+
* @default false
|
|
2205
2911
|
*/
|
|
2206
2912
|
standard?: MarkdownLintStandardDictionaryOptions | false;
|
|
2207
2913
|
}
|
|
@@ -2260,10 +2966,13 @@ interface MarkdownLintOptions {
|
|
|
2260
2966
|
languages?: MarkdownLintLanguage[];
|
|
2261
2967
|
/**
|
|
2262
2968
|
* Rule configuration.
|
|
2969
|
+
* Omitted fields use `MarkdownLintRuleOptions` defaults.
|
|
2970
|
+
* @default {}
|
|
2263
2971
|
*/
|
|
2264
2972
|
rules?: MarkdownLintRuleOptions;
|
|
2265
2973
|
/**
|
|
2266
2974
|
* Built-in and opt-in standard dictionary overrides.
|
|
2975
|
+
* @default {}
|
|
2267
2976
|
*/
|
|
2268
2977
|
dictionary?: MarkdownLintDictionaryOptions;
|
|
2269
2978
|
}
|
|
@@ -2364,6 +3073,8 @@ interface MarkdownLintFileOptions extends MarkdownLintOptions {
|
|
|
2364
3073
|
exclude?: string[];
|
|
2365
3074
|
/**
|
|
2366
3075
|
* Alias of `exclude`.
|
|
3076
|
+
* When omitted, only `exclude` is used.
|
|
3077
|
+
* @default undefined
|
|
2367
3078
|
*/
|
|
2368
3079
|
ignore?: string[];
|
|
2369
3080
|
}
|
|
@@ -3135,5 +3846,5 @@ declare function resolveBuiltinEmbedOptions(options: OxContentOptions["embeds"])
|
|
|
3135
3846
|
*/
|
|
3136
3847
|
declare function generateVirtualModule(path: string, options: ResolvedOptions): string;
|
|
3137
3848
|
//#endregion
|
|
3138
|
-
export { type AttrsOptions, type BasePageProps, type BuiltinEmbedOptions, type BuiltinPmOptions, CodeAnnotationKind, type CodeAnnotationSyntax, type CodeAnnotationsOptions, type CodeBlockDiagnostic, type CodeBlockLintOptions, type CodeBlockTypecheckOptions, type CodeImportOptions, type CollectedDocsTest, DEFAULT_HTML_TEMPLATE, DEFAULT_MARKDOWN_EXTENSIONS, DefaultTheme, type DocEntry, DocMember, DocsEntryPoint, type DocsOptions, DocsSortStrategy, DocsSummary, type DocsTestFileOptions, type DocsTestHarnessOptions, type DocsTestOptions, DocsTestRunError, type DocsTestRunResult, type DocsTestSource, type DocsTestWriteResult, type EditThisPageOptions, type EmojiShortcodeOptions, type EntryPageConfig, type ExtractedCodeBlock, type ExtractedDocs, type FeatureConfig, Fragment, type FrontmatterSchema, type GenerateVitePressMigrationConfigOptions, GeneratedDocsData, type GitHubLineRange, type GitHubOptions, type GitHubRepoData, type GitHubSourceData, type GitHubSourceRef, type HeroAction, type HeroConfig, type HeroImage, HeroNotice, type I18nOptions, type IncrementalMarkdownParseAppendOptions, type IncrementalMarkdownParseResult, IncrementalMarkdownParser, type IncrementalMarkdownParserOptions, type IncrementalMarkdownRenderAppendOptions, type IncrementalMarkdownRenderResult, IncrementalMarkdownRenderer, type IncrementalMarkdownRendererOptions, type IslandInfo, type JSXChild, type JSXElementType, type JSXNode, type JSXProps, type LanguageRegistration, type LoadStrategy, type LocaleConfig, type MarkdownChunkSource, type MarkdownDisplayFormat, type MarkdownLintFileDiagnostic as MarkdownLintBatchDiagnostic, type MarkdownLintFileDiagnostic, type MarkdownLintDiagnostic, type MarkdownLintDictionaryOptions, type MarkdownLintFileOptions, type MarkdownLintFileOptions as MarkdownLintProjectOptions, type MarkdownLintFileResult, type MarkdownLintFilesResult, type MarkdownLintLanguage, type MarkdownLintOptions, type MarkdownLintResult, type MarkdownLintRuleOptions, type MarkdownLintSeverity, type MarkdownLintStandardDictionaryOptions, MarkdownNode, MarkdownTransformer, type MermaidOptions, type NavGroup, type NavItem, type OgBrowserSession, type OgImageOptions, type OgImagePageEntry, type OgImageOptions$1 as OgImagePluginOptions, type OgImageResult, type OgImageTemplateFn, type OgImageTemplateProps, type OgpData, type OgpOptions, type OxContentOptions, type PageData, type PageProps, type ParamDoc, type ParseIslandsResult, type RenderContext, type ResolvedAttrsOptions, type ResolvedBuiltinEmbedOptions, type ResolvedCodeAnnotationsOptions, type ResolvedCodeBlockLintOptions, type ResolvedCodeBlockTypecheckOptions, type ResolvedCodeImportOptions, ResolvedDocsEntryPoint, type ResolvedDocsOptions, type ResolvedDocsTestOptions, type ResolvedEditThisPageOptions, type ResolvedEmojiShortcodeOptions, type ResolvedI18nOptions, type ResolvedOgImageOptions, ResolvedOptions, type ResolvedSanitizeOptions, type ResolvedSearchOptions, type ResolvedSsgOptions, type ResolvedThemeConfig, type ResolvedWikiLinkOptions, type ReturnDoc, type RunDocsTestsOptions, type SanitizeOptions, ScopedSearchQuery, type SearchDocument, type SearchOptions, type SearchResult, type SiteConfig, type SocialLinks, type SsgNavigationGroup, type SsgNavigationItem, type SsgOptions, type ThemeColors, type ThemeComponent, type ThemeConfig, type ThemeEmbed, type ThemeEntryPage, type ThemeFonts, type ThemeFooter, type ThemeHeader, type ThemeLayout, type ThemeProps, type ThemeRegistration, type ThemeRenderOptions, TocEntry, type TransformAllOptions, TransformContext, TransformResult, type TypecheckCodeBlockOptions, type VitePressConfig, type VitePressFooter, type VitePressLogo, type VitePressNavItem, type VitePressSidebar, type VitePressSidebarItem, type VitePressSocialLink, type VitePressThemeConfig, type WikiLinkOptions, type WrittenDocsTestFile, type YouTubeOptions, buildSearchIndex, buildSsg, clearRenderContext, collectDocsTests, collectGitHubRepos, collectGitHubSources, collectOgpUrls, convertVitePressNav, convertVitePressSidebar, createI18nPlugin, createIncrementalMarkdownParser, createIncrementalMarkdownRenderer, createMarkdownEnvironment, createTheme, defaultTheme, defineTheme, each, extractCodeBlocks, extractDocs, extractDocsTests, extractIslandInfo, extractVideoId, fetchGitHubSource, fetchOgpData, fetchRepoData, fromVitePressConfig, generateFrontmatterTypes, generateHydrationScript, generateMarkdown, generateOgImages, generateTabsCSS, generateTypes, generateVirtualModule, generateVitePressMigrationConfig, hasIslands, inferType, isMarkdownFilePath, jsx, jsxs, lintCodeBlocks, lintMarkdown, lintMarkdownAsync, lintMarkdownFile, lintMarkdownFiles, mergeThemes, mermaidClientScript, normalizeMarkdownExtensions, normalizeVitePressFrontmatter, oxContent, parseGitHubLineRange, parseGitHubPermalink, prefetchGitHubRepos, prefetchGitHubSources, prefetchOgpData, raw, renderAllPages, renderMarkdownStream, renderPage, renderToString, resolveBuiltinEmbedOptions, resolveDocsOptions, resolveI18nOptions, resolveOgImageOptions, resolveSearchOptions, resolveSsgOptions, resolveTheme, runDocsTests, setRenderContext, shouldLintMarkdownFile, stripMarkdownExtension, transformAllPlugins, transformGitHub, transformIslands, transformMarkdown, transformMermaidStatic, transformOgp, transformTabs, transformYouTube, typecheckCodeBlocks, useIsActive, useNav, usePageProps, useRenderContext, useSiteConfig, when, writeDocs, writeDocsTestFiles, writeSearchIndex };
|
|
3849
|
+
export { type AttrsOptions, type BasePageProps, type BuiltinEmbedOptions, type BuiltinPmOptions, CodeAnnotationKind, type CodeAnnotationSyntax, type CodeAnnotationsOptions, type CodeBlockDiagnostic, type CodeBlockLintOptions, type CodeBlockTypecheckOptions, type CodeImportOptions, type CollectedDocsTest, DEFAULT_HTML_TEMPLATE, DEFAULT_MARKDOWN_EXTENSIONS, DefaultTheme, type DocEntry, DocMember, DocsEntryPoint, type DocsOptions, DocsSortStrategy, DocsSummary, type DocsTestFileOptions, type DocsTestHarnessOptions, type DocsTestOptions, DocsTestRunError, type DocsTestRunResult, type DocsTestSource, type DocsTestWriteResult, type EditThisPageOptions, type EmojiShortcodeOptions, type EntryPageConfig, type ExtractedCodeBlock, type ExtractedDocs, type FeatureConfig, Fragment, type FrontmatterSchema, type GenerateVitePressMigrationConfigOptions, GeneratedDocsData, type GitHubLineRange, type GitHubOptions, type GitHubRepoData, type GitHubSourceData, type GitHubSourceRef, type HeroAction, type HeroConfig, type HeroImage, HeroNotice, type I18nOptions, type IncrementalMarkdownParseAppendOptions, type IncrementalMarkdownParseResult, IncrementalMarkdownParser, type IncrementalMarkdownParserOptions, type IncrementalMarkdownRenderAppendOptions, type IncrementalMarkdownRenderResult, IncrementalMarkdownRenderer, type IncrementalMarkdownRendererOptions, type IslandInfo, type JSXChild, type JSXElementType, type JSXNode, type JSXProps, type LanguageRegistration, type LoadStrategy, type LocaleConfig, type MarkdownChunkSource, type MarkdownDisplayFormat, type MarkdownLintFileDiagnostic as MarkdownLintBatchDiagnostic, type MarkdownLintFileDiagnostic, type MarkdownLintDiagnostic, type MarkdownLintDictionaryOptions, type MarkdownLintFileOptions, type MarkdownLintFileOptions as MarkdownLintProjectOptions, type MarkdownLintFileResult, type MarkdownLintFilesResult, type MarkdownLintLanguage, type MarkdownLintOptions, type MarkdownLintResult, type MarkdownLintRuleOptions, type MarkdownLintSeverity, type MarkdownLintStandardDictionaryOptions, MarkdownNode, MarkdownTransformer, type MermaidOptions, type NavGroup, type NavItem, type OgBrowserSession, type OgImageOptions, type OgImagePageEntry, type OgImageOptions$1 as OgImagePluginOptions, type OgImageResult, type OgImageTemplateFn, type OgImageTemplateProps, type OgpData, type OgpOptions, type OxContentOptions, type PageData, type PageProps, type ParamDoc, type ParseIslandsResult, type RenderContext, type ResolvedAttrsOptions, type ResolvedBuiltinEmbedOptions, type ResolvedCodeAnnotationsOptions, type ResolvedCodeBlockLintOptions, type ResolvedCodeBlockTypecheckOptions, type ResolvedCodeImportOptions, ResolvedDocsEntryPoint, type ResolvedDocsOptions, type ResolvedDocsTestOptions, type ResolvedEditThisPageOptions, type ResolvedEmojiShortcodeOptions, type ResolvedI18nOptions, type ResolvedOgImageOptions, ResolvedOptions, type ResolvedSanitizeOptions, type ResolvedSearchOptions, type ResolvedSsgOptions, type ResolvedThemeConfig, type ResolvedWikiLinkOptions, type ReturnDoc, type RunDocsTestsOptions, type SanitizeOptions, ScopedSearchQuery, type SearchDocument, type SearchOptions, type SearchResult, type SiteConfig, type SocialLinks, type SsgNavigationGroup, type SsgNavigationItem, type SsgOptions, type ThemeColors, type ThemeComponent, type ThemeConfig, type ThemeEmbed, type ThemeEntryPage, type ThemeFonts, type ThemeFooter, type ThemeHeader, type ThemeLayout, type ThemeProps, type ThemeRegistration, type ThemeRenderOptions, ThrowsDoc, TocEntry, type TransformAllOptions, TransformContext, TransformResult, type TypecheckCodeBlockOptions, type VitePressConfig, type VitePressFooter, type VitePressLogo, type VitePressNavItem, type VitePressSidebar, type VitePressSidebarItem, type VitePressSocialLink, type VitePressThemeConfig, type WikiLinkOptions, type WrittenDocsTestFile, type YouTubeOptions, buildSearchIndex, buildSsg, clearRenderContext, collectDocsTests, collectGitHubRepos, collectGitHubSources, collectOgpUrls, convertVitePressNav, convertVitePressSidebar, createI18nPlugin, createIncrementalMarkdownParser, createIncrementalMarkdownRenderer, createMarkdownEnvironment, createTheme, defaultTheme, defineTheme, each, extractCodeBlocks, extractDocs, extractDocsTests, extractIslandInfo, extractVideoId, fetchGitHubSource, fetchOgpData, fetchRepoData, fromVitePressConfig, generateFrontmatterTypes, generateHydrationScript, generateMarkdown, generateOgImages, generateTabsCSS, generateTypes, generateVirtualModule, generateVitePressMigrationConfig, hasIslands, inferType, isMarkdownFilePath, jsx, jsxs, lintCodeBlocks, lintMarkdown, lintMarkdownAsync, lintMarkdownFile, lintMarkdownFiles, mergeThemes, mermaidClientScript, normalizeMarkdownExtensions, normalizeVitePressFrontmatter, oxContent, parseGitHubLineRange, parseGitHubPermalink, prefetchGitHubRepos, prefetchGitHubSources, prefetchOgpData, raw, renderAllPages, renderMarkdownStream, renderPage, renderToString, resolveBuiltinEmbedOptions, resolveDocsOptions, resolveI18nOptions, resolveOgImageOptions, resolveSearchOptions, resolveSsgOptions, resolveTheme, runDocsTests, setRenderContext, shouldLintMarkdownFile, stripMarkdownExtension, transformAllPlugins, transformGitHub, transformIslands, transformMarkdown, transformMermaidStatic, transformOgp, transformTabs, transformYouTube, typecheckCodeBlocks, useIsActive, useNav, usePageProps, useRenderContext, useSiteConfig, when, writeDocs, writeDocsTestFiles, writeSearchIndex };
|
|
3139
3850
|
//# sourceMappingURL=index.d.cts.map
|