@ox-content/vite-plugin 2.66.0 → 2.68.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/index.d.cts CHANGED
@@ -133,6 +133,7 @@ interface SidebarItem {
133
133
  link?: string;
134
134
  items?: SidebarItem[];
135
135
  collapsed?: boolean;
136
+ stickyCollapsed?: boolean;
136
137
  }
137
138
  /**
138
139
  * Complete theme configuration.
@@ -263,15 +264,30 @@ interface GitHubSourceData {
263
264
  language: string | null;
264
265
  }
265
266
  interface GitHubOptions {
266
- /** GitHub API token for higher rate limits. */
267
+ /**
268
+ * GitHub API token used for higher rate limits and private repository access.
269
+ * @default ''
270
+ */
267
271
  token?: string;
268
- /** Cache fetched data. Default: true */
272
+ /**
273
+ * Cache fetched repository and source data in memory for the current process.
274
+ * @default true
275
+ */
269
276
  cache?: boolean;
270
- /** Cache TTL in milliseconds. Default: 3600000 (1 hour) */
277
+ /**
278
+ * Cache TTL in milliseconds.
279
+ * @default 3600000
280
+ */
271
281
  cacheTTL?: number;
272
- /** Maximum source file size to inline in bytes. Default: 200000 */
282
+ /**
283
+ * Maximum source file size to inline in bytes.
284
+ * @default 200000
285
+ */
273
286
  maxSourceBytes?: number;
274
- /** Maximum source lines to inline when no line range is specified. Default: 120 */
287
+ /**
288
+ * Maximum source lines to inline when no line range is specified.
289
+ * @default 120
290
+ */
275
291
  maxSourceLines?: number;
276
292
  }
277
293
  declare function parseGitHubLineRange(value: string | undefined): GitHubLineRange | undefined;
@@ -321,13 +337,25 @@ interface OgpData {
321
337
  favicon?: string;
322
338
  }
323
339
  interface OgpOptions {
324
- /** Request timeout in milliseconds. Default: 10000 */
340
+ /**
341
+ * Request timeout in milliseconds.
342
+ * @default 10000
343
+ */
325
344
  timeout?: number;
326
- /** Cache fetched data. Default: true */
345
+ /**
346
+ * Cache fetched Open Graph metadata in memory for the current process.
347
+ * @default true
348
+ */
327
349
  cache?: boolean;
328
- /** Cache TTL in milliseconds. Default: 3600000 (1 hour) */
350
+ /**
351
+ * Cache TTL in milliseconds.
352
+ * @default 3600000
353
+ */
329
354
  cacheTTL?: number;
330
- /** User agent for requests */
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
+ */
331
359
  userAgent?: string;
332
360
  }
333
361
  /**
@@ -370,7 +398,8 @@ interface PmOptions {
370
398
  * Enable opt-in synced package-manager tab groups. When `true`, a
371
399
  * `data-ox-tab-group="pkg-manager"` attribute is emitted so the client runtime
372
400
  * syncs the active package manager across every pm group on the page and
373
- * persists the choice in localStorage. Default: false.
401
+ * persists the choice in localStorage.
402
+ * @default false
374
403
  */
375
404
  sync?: boolean;
376
405
  }
@@ -399,13 +428,25 @@ declare function generateTabsCSS(groupCount: number): string;
399
428
  * check so pages without a `<youtube>` element never cross the NAPI boundary.
400
429
  */
401
430
  interface YouTubeOptions {
402
- /** Use privacy-enhanced mode (youtube-nocookie.com). Default: true */
431
+ /**
432
+ * Use privacy-enhanced mode (`youtube-nocookie.com`).
433
+ * @default true
434
+ */
403
435
  privacyEnhanced?: boolean;
404
- /** Default aspect ratio. Default: "16/9" */
436
+ /**
437
+ * Default iframe aspect ratio.
438
+ * @default '16/9'
439
+ */
405
440
  aspectRatio?: string;
406
- /** Allow fullscreen. Default: true */
441
+ /**
442
+ * Allow fullscreen playback.
443
+ * @default true
444
+ */
407
445
  allowFullscreen?: boolean;
408
- /** Lazy load iframe. Default: true */
446
+ /**
447
+ * Lazy load the iframe.
448
+ * @default true
449
+ */
409
450
  lazyLoad?: boolean;
410
451
  }
411
452
  /**
@@ -426,7 +467,10 @@ declare function transformYouTube(html: string, options?: YouTubeOptions): Promi
426
467
  * extracts mermaid code blocks from HTML and renders them using mmdc.
427
468
  */
428
469
  interface MermaidOptions {
429
- /** Mermaid theme. Default: "neutral" */
470
+ /**
471
+ * Mermaid theme used by the CLI renderer.
472
+ * @default 'neutral'
473
+ */
430
474
  theme?: "default" | "dark" | "forest" | "neutral" | "base";
431
475
  }
432
476
  /**
@@ -577,42 +621,76 @@ interface SsgNavigationGroup {
577
621
  items: SsgNavigationItem[];
578
622
  }
579
623
  /**
580
- * SSG (Static Site Generation) options.
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.
581
629
  */
582
630
  interface SsgOptions {
583
631
  /**
584
- * Enable SSG mode.
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
+ *
585
637
  * @default true
586
638
  */
587
639
  enabled?: boolean;
588
640
  /**
589
- * Output file extension.
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
+ *
590
647
  * @default '.html'
591
648
  */
592
649
  extension?: string;
593
650
  /**
594
- * Clean output directory before build.
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
+ *
595
657
  * @default false
596
658
  */
597
659
  clean?: boolean;
598
660
  /**
599
- * Bare HTML output (no navigation, no styles).
600
- * Useful for benchmarking or when using custom layouts.
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
+ *
601
667
  * @default false
602
668
  */
603
669
  bare?: boolean;
604
670
  /**
605
- * Site name for header and title suffix.
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
606
676
  */
607
677
  siteName?: string;
608
678
  /**
609
- * OG image URL for social sharing (static URL).
610
- * If generateOgImage is enabled, this serves as the fallback.
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
611
685
  */
612
686
  ogImage?: string;
613
687
  /**
614
- * Generate OG images per page using Rust-based generator.
615
- * When enabled, each page will have a unique OG image.
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
+ *
616
694
  * @default false
617
695
  */
618
696
  generateOgImage?: boolean;
@@ -622,19 +700,36 @@ interface SsgOptions {
622
700
  */
623
701
  lastUpdated?: boolean;
624
702
  /**
625
- * Site URL for generating absolute OG image URLs.
626
- * Required for proper SNS sharing.
627
- * Example: 'https://example.com'
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
628
714
  */
629
715
  siteUrl?: string;
630
716
  /**
631
- * Theme configuration for customizing the SSG output.
632
- * Use defineTheme() to create a theme configuration.
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
633
723
  */
634
724
  theme?: ThemeConfig;
635
725
  /**
636
- * Override the auto-generated sidebar navigation.
637
- * Useful when migrating from tools with explicit navigation config such as VitePress.
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
638
733
  */
639
734
  navigation?: SsgNavigationGroup[];
640
735
  }
@@ -655,32 +750,61 @@ interface ResolvedSsgOptions {
655
750
  navigation?: SsgNavigationGroup[];
656
751
  }
657
752
  /**
658
- * Plugin options.
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.
659
762
  */
660
763
  interface OxContentOptions {
661
764
  /**
662
- * Source directory for Markdown files.
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
+ *
663
770
  * @default 'content'
664
771
  */
665
772
  srcDir?: string;
666
773
  /**
667
- * Output directory for built files.
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
+ *
668
779
  * @default 'dist'
669
780
  */
670
781
  outDir?: string;
671
782
  /**
672
- * Base path for the site.
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
+ *
673
788
  * @default '/'
674
789
  */
675
790
  base?: string;
676
791
  /**
677
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
+ *
678
798
  * @default ['.md', '.markdown', '.mdx']
679
799
  */
680
800
  extensions?: string[];
681
801
  /**
682
- * SSG (Static Site Generation) options.
683
- * Set to false to disable SSG completely.
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
+ *
684
808
  * @default { enabled: true }
685
809
  */
686
810
  ssg?: SsgOptions | boolean;
@@ -723,47 +847,81 @@ interface OxContentOptions {
723
847
  * Additional languages for syntax highlighting.
724
848
  * Accepts Shiki LanguageRegistration objects (e.g., TextMate grammars).
725
849
  * These are loaded alongside the built-in languages.
850
+ * @default []
726
851
  */
727
852
  highlightLangs?: LanguageRegistration$1[];
728
853
  /**
729
- * Opt-in code block annotations for fenced code blocks.
854
+ * Code block line annotations for fenced code blocks.
730
855
  *
731
- * Supports the configurable attribute syntax by default, and can also opt
732
- * into VitePress-compatible fence metadata and inline notation.
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.
733
859
  *
734
- * Example:
735
- * ` ```ts annotate="highlight:1,3-4;warning:6;error:7" `
860
+ * @example
861
+ * ~~~md
862
+ * ```ts annotate="highlight:1,3-4;warning:6;error:7"
863
+ * const value = compute()
864
+ * ```
865
+ * ~~~
736
866
  *
737
867
  * @default false
738
868
  */
739
869
  codeAnnotations?: boolean | CodeAnnotationsOptions;
740
870
  /**
741
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
+ *
742
877
  * @default false
743
878
  */
744
879
  wikiLinks?: boolean | WikiLinkOptions;
745
880
  /**
746
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
+ *
747
886
  * @default false
748
887
  */
749
888
  emojiShortcodes?: boolean | EmojiShortcodeOptions;
750
889
  /**
751
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
+ *
752
895
  * @default false
753
896
  */
754
897
  attrs?: boolean | AttrsOptions;
755
898
  /**
756
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
+ *
757
905
  * @default false
758
906
  */
759
907
  codeImports?: boolean | CodeImportOptions;
760
908
  /**
761
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
+ *
762
915
  * @default false
763
916
  */
764
917
  sanitize?: boolean | SanitizeOptions;
765
918
  /**
766
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
+ *
767
925
  * @default false
768
926
  */
769
927
  editThisPage?: boolean | EditThisPageOptions;
@@ -775,16 +933,30 @@ interface OxContentOptions {
775
933
  cjkEmphasis?: boolean;
776
934
  /**
777
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
+ *
778
941
  * @default false
779
942
  */
780
943
  codeBlockLint?: boolean | CodeBlockLintOptions;
781
944
  /**
782
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
+ *
783
951
  * @default false
784
952
  */
785
953
  codeBlockTypecheck?: boolean | CodeBlockTypecheckOptions;
786
954
  /**
787
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
+ *
788
960
  * @default false
789
961
  */
790
962
  docsTests?: boolean | DocsTestOptions;
@@ -815,10 +987,14 @@ interface OxContentOptions {
815
987
  ogImage?: boolean;
816
988
  /**
817
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 }
818
992
  */
819
993
  ogImageOptions?: OgImageOptions;
820
994
  /**
821
995
  * Custom AST transformers.
996
+ * Transformers run after parsing and before the final JavaScript module is emitted.
997
+ * @default []
822
998
  */
823
999
  transformers?: MarkdownTransformer[];
824
1000
  /**
@@ -968,50 +1144,203 @@ interface ResolvedBuiltinEmbedOptions {
968
1144
  bluesky: boolean;
969
1145
  webContainer: boolean;
970
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
+ */
971
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
+ */
972
1163
  baseUrl?: string;
973
1164
  }
1165
+ /**
1166
+ * Resolved wiki-link transform options.
1167
+ */
974
1168
  interface ResolvedWikiLinkOptions {
975
1169
  enabled: boolean;
976
1170
  baseUrl: string;
977
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
+ */
978
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
+ */
979
1192
  custom?: Record<string, string>;
980
1193
  }
1194
+ /**
1195
+ * Resolved emoji-shortcode transform options.
1196
+ */
981
1197
  interface ResolvedEmojiShortcodeOptions {
982
1198
  enabled: boolean;
983
1199
  custom: Record<string, string>;
984
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
+ */
985
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
+ */
986
1217
  enabled?: boolean;
987
1218
  }
1219
+ /**
1220
+ * Resolved attrs transform options.
1221
+ */
988
1222
  interface ResolvedAttrsOptions {
989
1223
  enabled: boolean;
990
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
+ */
991
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
+ */
992
1245
  rootDir?: string;
993
1246
  }
1247
+ /**
1248
+ * Resolved code-import transform options.
1249
+ */
994
1250
  interface ResolvedCodeImportOptions {
995
1251
  enabled: boolean;
996
1252
  rootDir?: string;
997
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
+ */
998
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
+ */
999
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
+ */
1000
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
+ */
1001
1285
  allowedUrlSchemes?: string[];
1002
1286
  }
1287
+ /**
1288
+ * Resolved sanitize transform options.
1289
+ */
1003
1290
  interface ResolvedSanitizeOptions {
1004
1291
  enabled: boolean;
1005
1292
  allowedTags?: string[];
1006
1293
  allowedAttributes?: string[];
1007
1294
  allowedUrlSchemes?: string[];
1008
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
+ */
1009
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
+ */
1010
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
+ */
1011
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
+ */
1012
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
+ */
1013
1339
  label?: string;
1014
1340
  }
1341
+ /**
1342
+ * Resolved edit-link transform options.
1343
+ */
1015
1344
  interface ResolvedEditThisPageOptions {
1016
1345
  enabled: boolean;
1017
1346
  repoUrl?: string;
@@ -1019,12 +1348,51 @@ interface ResolvedEditThisPageOptions {
1019
1348
  rootDir?: string;
1020
1349
  label: string;
1021
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
+ */
1022
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
+ */
1023
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
+ */
1024
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
+ */
1025
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
+ */
1026
1391
  mode?: "warn" | "error";
1027
1392
  }
1393
+ /**
1394
+ * Resolved code-block lint options.
1395
+ */
1028
1396
  interface ResolvedCodeBlockLintOptions {
1029
1397
  enabled: boolean;
1030
1398
  languages?: string[];
@@ -1032,12 +1400,51 @@ interface ResolvedCodeBlockLintOptions {
1032
1400
  trailingSpaces: boolean;
1033
1401
  mode: "warn" | "error";
1034
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
+ */
1035
1410
  interface CodeBlockTypecheckOptions {
1411
+ /**
1412
+ * Fence languages to type-check.
1413
+ *
1414
+ * Language names are compared case-insensitively.
1415
+ *
1416
+ * @default ['ts', 'tsx']
1417
+ */
1036
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
+ */
1037
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
+ */
1038
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
+ */
1039
1443
  mode?: "warn" | "error";
1040
1444
  }
1445
+ /**
1446
+ * Resolved code-block type-check options.
1447
+ */
1041
1448
  interface ResolvedCodeBlockTypecheckOptions {
1042
1449
  enabled: boolean;
1043
1450
  languages: string[];
@@ -1045,10 +1452,34 @@ interface ResolvedCodeBlockTypecheckOptions {
1045
1452
  tsgoCommand: string;
1046
1453
  mode: "warn" | "error";
1047
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
+ */
1048
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
+ */
1049
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
+ */
1050
1478
  requireMeta?: boolean;
1051
1479
  }
1480
+ /**
1481
+ * Resolved docs-as-tests extraction options.
1482
+ */
1052
1483
  interface ResolvedDocsTestOptions {
1053
1484
  enabled: boolean;
1054
1485
  languages: string[];
@@ -1260,39 +1691,76 @@ interface ResolvedDocsEntryPoint {
1260
1691
  }
1261
1692
  /**
1262
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.
1263
1699
  */
1264
1700
  interface DocsOptions {
1265
1701
  /**
1266
- * Enable/disable docs generation.
1267
- * @default true (opt-out)
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
1268
1708
  */
1269
1709
  enabled?: boolean;
1270
1710
  /**
1271
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
+ *
1272
1716
  * @default ['./src']
1273
1717
  */
1274
1718
  src?: string[];
1275
1719
  /**
1276
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
+ *
1277
1725
  * @default 'docs/api'
1278
1726
  */
1279
1727
  out?: string;
1280
1728
  /**
1281
1729
  * Glob patterns for files to include.
1730
+ *
1731
+ * Patterns are evaluated inside each `src` directory.
1732
+ *
1282
1733
  * @default ['**\/*.ts', '**\/*.tsx', '**\/*.js', '**\/*.jsx', '**\/*.mts', '**\/*.mjs', '**\/*.cts', '**\/*.cjs']
1283
1734
  */
1284
1735
  include?: string[];
1285
1736
  /**
1286
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
+ *
1287
1742
  * @default ['**\/*.test.*', '**\/*.spec.*', 'node_modules']
1288
1743
  */
1289
1744
  exclude?: string[];
1290
1745
  /**
1291
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
1292
1756
  */
1293
1757
  entryPoints?: DocsEntryPoint[];
1294
1758
  /**
1295
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
+ *
1296
1764
  * @default 'markdown'
1297
1765
  */
1298
1766
  format?: "markdown" | "json" | "html";
@@ -1308,7 +1776,8 @@ interface DocsOptions {
1308
1776
  internal?: boolean;
1309
1777
  /**
1310
1778
  * Generate table of contents for each file.
1311
- * @default true
1779
+ * Reserved for future use; current generated API pages do not emit this TOC.
1780
+ * @default false
1312
1781
  */
1313
1782
  toc?: boolean;
1314
1783
  /**
@@ -1318,22 +1787,41 @@ interface DocsOptions {
1318
1787
  groupBy?: "file" | "category";
1319
1788
  /**
1320
1789
  * GitHub repository URL for source code links.
1321
- * When provided, generated documentation will include links to source code.
1322
- * Example: 'https://github.com/ubugeeei-prod/ox-content'
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
1323
1800
  */
1324
1801
  githubUrl?: string;
1325
1802
  /**
1326
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
+ *
1327
1808
  * @default 'markdown'
1328
1809
  */
1329
1810
  linkStyle?: "markdown" | "clean";
1330
1811
  /**
1331
1812
  * Route prefix used by generated documentation links and nav metadata.
1332
- * Nav metadata falls back to '/api' when this is not set.
1813
+ *
1814
+ * Nav metadata falls back to `/api` when this is not set.
1815
+ *
1816
+ * @default undefined
1333
1817
  */
1334
1818
  basePath?: string;
1335
1819
  /**
1336
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
+ *
1337
1825
  * @default 'flat'
1338
1826
  */
1339
1827
  pathStrategy?: "flat" | "typedoc";
@@ -1409,10 +1897,14 @@ interface DocsOptions {
1409
1897
  renderGeneratedBy?: boolean;
1410
1898
  /**
1411
1899
  * TypeDoc-style group order for module index sections and nav groups.
1900
+ * Use `*` as the insertion point for unlisted groups.
1901
+ * @default undefined
1412
1902
  */
1413
1903
  groupOrder?: string[];
1414
1904
  /**
1415
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
1416
1908
  */
1417
1909
  sort?: DocsSortStrategy[];
1418
1910
  /**
@@ -1422,6 +1914,7 @@ interface DocsOptions {
1422
1914
  sortEntryPoints?: boolean;
1423
1915
  /**
1424
1916
  * TypeDoc-style declaration kind ranking for module sections and nav groups.
1917
+ * @default undefined
1425
1918
  */
1426
1919
  kindSortOrder?: string[];
1427
1920
  /**
@@ -1479,117 +1972,196 @@ interface ResolvedDocsOptions {
1479
1972
  }
1480
1973
  /**
1481
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`.
1482
1979
  */
1483
1980
  interface DocEntry {
1981
+ /** Exported or declared symbol name. */
1484
1982
  name: string;
1983
+ /** Normalized declaration kind used for grouping and rendering. */
1485
1984
  kind: "function" | "class" | "interface" | "type" | "enum" | "variable" | "module";
1985
+ /** Main prose extracted from the leading JSDoc/TSDoc block. */
1486
1986
  description: string;
1987
+ /** Function, method, or constructor parameter documentation. */
1487
1988
  params?: ParamDoc[];
1989
+ /** Return value documentation for callable declarations. */
1488
1990
  returns?: ReturnDoc;
1991
+ /** Code examples collected from `@example` tags. */
1489
1992
  examples?: string[];
1993
+ /** Additional tags preserved by tag name after known tags are normalized. */
1490
1994
  tags?: Record<string, string>;
1995
+ /** True when the entry is marked private or matched by private filtering. */
1491
1996
  private?: boolean;
1997
+ /** Source file path relative to the extraction root when available. */
1492
1998
  file: string;
1999
+ /** 1-based start line of the declaration in the source file. */
1493
2000
  line: number;
2001
+ /** 1-based end line of the declaration in the source file. */
1494
2002
  endLine: number;
2003
+ /** Full declaration signature, when the renderer can extract one. */
1495
2004
  signature?: string;
2005
+ /** Members belonging to classes, interfaces, object types, and enums. */
1496
2006
  members?: DocMember[];
1497
2007
  }
1498
2008
  /**
1499
2009
  * A member belonging to a class, interface, type alias, or enum entry.
1500
2010
  */
1501
2011
  interface DocMember {
2012
+ /** Member name as it appears in the containing declaration. */
1502
2013
  name: string;
2014
+ /** Normalized member kind used for rendering and sorting. */
1503
2015
  kind: "property" | "method" | "constructor" | "getter" | "setter" | "enumMember";
2016
+ /** Main prose extracted from the member's documentation comment. */
1504
2017
  description: string;
2018
+ /** Full member signature, when available. */
1505
2019
  signature?: string;
2020
+ /** Rendered TypeScript type text for properties and enum members. */
1506
2021
  type?: string;
2022
+ /** Default value extracted from syntax or `@default` tags. */
1507
2023
  default?: string;
2024
+ /** Parameter documentation for methods and constructors. */
1508
2025
  params?: ParamDoc[];
2026
+ /** Return value documentation for methods and accessors. */
1509
2027
  returns?: ReturnDoc;
2028
+ /** True when the member is optional in the source declaration. */
1510
2029
  optional?: boolean;
2030
+ /** True when the member is declared readonly. */
1511
2031
  readonly?: boolean;
2032
+ /** True when the member is static. */
1512
2033
  static?: boolean;
2034
+ /** True when the member is marked private or matched by private filtering. */
1513
2035
  private?: boolean;
2036
+ /** Additional tags preserved by tag name after known tags are normalized. */
1514
2037
  tags?: Record<string, string>;
2038
+ /** 1-based start line of the member declaration. */
1515
2039
  line: number;
2040
+ /** 1-based end line of the member declaration. */
1516
2041
  endLine: number;
1517
2042
  }
1518
2043
  /**
1519
2044
  * Parameter documentation.
1520
2045
  */
1521
2046
  interface ParamDoc {
2047
+ /** Parameter name, including dotted names for destructured properties. */
1522
2048
  name: string;
2049
+ /** Rendered TypeScript type text. */
1523
2050
  type: string;
2051
+ /** Prose extracted from `@param` / `@arg` documentation. */
1524
2052
  description: string;
2053
+ /** True when the parameter is optional. */
1525
2054
  optional?: boolean;
2055
+ /** Default value extracted from syntax or `@default` tags. */
1526
2056
  default?: string;
1527
2057
  }
1528
2058
  /**
1529
2059
  * Return type documentation.
1530
2060
  */
1531
2061
  interface ReturnDoc {
2062
+ /** Rendered TypeScript type text for the return value. */
1532
2063
  type: string;
2064
+ /** Prose extracted from `@returns` / `@return` documentation. */
1533
2065
  description: string;
1534
2066
  }
1535
2067
  /**
1536
2068
  * Extracted documentation for a single file.
1537
2069
  */
1538
2070
  interface ExtractedDocs {
2071
+ /** Source module or file identifier used by generated output. */
1539
2072
  file: string;
2073
+ /** Optional module-level description extracted from a file header comment. */
1540
2074
  description?: string;
2075
+ /** Absolute source path, when available for source links and diagnostics. */
1541
2076
  sourcePath?: string;
2077
+ /** Module-level examples collected from a file header comment. */
1542
2078
  examples?: string[];
2079
+ /** Module-level tags preserved by tag name. */
1543
2080
  tags?: Record<string, string>;
2081
+ /** Top-level documented declarations found in this module. */
1544
2082
  entries: DocEntry[];
1545
2083
  }
1546
2084
  /**
1547
2085
  * Summary counts emitted with generated documentation data.
1548
2086
  */
1549
2087
  interface DocsSummary {
2088
+ /** Number of modules included in the generated payload. */
1550
2089
  modules: number;
2090
+ /** Number of top-level entries across all modules. */
1551
2091
  entries: number;
2092
+ /** Entry counts grouped by normalized declaration kind. */
1552
2093
  byKind: Record<string, number>;
2094
+ /** Number of documented parameters. */
1553
2095
  params: number;
2096
+ /** Number of documented return values. */
1554
2097
  returns: number;
2098
+ /** Number of collected examples. */
1555
2099
  examples: number;
2100
+ /** Number of entries or members marked with `@deprecated`. */
1556
2101
  deprecated: number;
1557
2102
  }
1558
2103
  /**
1559
2104
  * Machine-readable payload emitted alongside generated docs.
1560
2105
  */
1561
2106
  interface GeneratedDocsData {
2107
+ /** Payload schema version. Increment when the JSON shape changes incompatibly. */
1562
2108
  version: 1;
2109
+ /** ISO timestamp for the generation run. */
1563
2110
  generatedAt: string;
2111
+ /** Aggregate counts useful for dashboards and generated index pages. */
1564
2112
  summary: DocsSummary;
2113
+ /** Extracted documentation modules in render order. */
1565
2114
  modules: ExtractedDocs[];
1566
2115
  }
1567
2116
  /**
1568
2117
  * Options for full-text search.
2118
+ *
2119
+ * Search indexes are built from Markdown content at build time and loaded by
2120
+ * the client runtime from `search-index.json`. Pass `false` to the top-level
2121
+ * `search` option to disable both index generation and the virtual search
2122
+ * module.
1569
2123
  */
1570
2124
  interface SearchOptions {
1571
2125
  /**
1572
2126
  * Enable search functionality.
2127
+ *
2128
+ * Set this to `false` when config merging requires an object shape but search
2129
+ * should be disabled.
2130
+ *
1573
2131
  * @default true
1574
2132
  */
1575
2133
  enabled?: boolean;
1576
2134
  /**
1577
2135
  * Maximum number of search results.
2136
+ *
2137
+ * This controls client-side result truncation, not the number of documents in
2138
+ * the generated index.
2139
+ *
1578
2140
  * @default 10
1579
2141
  */
1580
2142
  limit?: number;
1581
2143
  /**
1582
2144
  * Enable prefix matching for autocomplete.
2145
+ *
2146
+ * Prefix matching applies to the final query token, which keeps normal terms
2147
+ * precise while still supporting typeahead-style interactions.
2148
+ *
1583
2149
  * @default true
1584
2150
  */
1585
2151
  prefix?: boolean;
1586
2152
  /**
1587
2153
  * Placeholder text for the search input.
2154
+ *
2155
+ * This value is embedded in the virtual search module for UI consumers.
2156
+ *
1588
2157
  * @default 'Search documentation...'
1589
2158
  */
1590
2159
  placeholder?: string;
1591
2160
  /**
1592
2161
  * Keyboard shortcut to focus search (without modifier).
2162
+ *
2163
+ * Use an empty string to let the UI opt out of registering a shortcut.
2164
+ *
1593
2165
  * @default '/'
1594
2166
  */
1595
2167
  hotkey?: string;
@@ -1608,80 +2180,130 @@ interface ResolvedSearchOptions {
1608
2180
  * Search document structure.
1609
2181
  */
1610
2182
  interface SearchDocument {
2183
+ /** Stable document identifier used by the search index. */
1611
2184
  id: string;
2185
+ /** Human-readable document title. */
1612
2186
  title: string;
2187
+ /** URL returned to search consumers. */
1613
2188
  url: string;
2189
+ /** Plain-text body content used for scoring and snippets. */
1614
2190
  body: string;
2191
+ /** Headings extracted from the document. */
1615
2192
  headings: string[];
2193
+ /** Code block text extracted from the document. */
1616
2194
  code: string[];
1617
2195
  }
1618
2196
  /**
1619
2197
  * Search result structure.
1620
2198
  */
1621
2199
  interface SearchResult {
2200
+ /** Matching document identifier. */
1622
2201
  id: string;
2202
+ /** Matching document title. */
1623
2203
  title: string;
2204
+ /** URL to open when the result is selected. */
1624
2205
  url: string;
2206
+ /** Relevance score returned by the BM25 search engine. */
1625
2207
  score: number;
2208
+ /** Query terms that matched the document. */
1626
2209
  matches: string[];
2210
+ /** Context snippet with highlighted terms when available. */
1627
2211
  snippet: string;
2212
+ /** Hierarchical scopes derived from the result URL or document id. */
1628
2213
  scopes?: string[];
1629
2214
  }
1630
2215
  /**
1631
2216
  * Parsed search query with optional scope prefixes.
1632
2217
  */
1633
2218
  interface ScopedSearchQuery {
2219
+ /** Query text after `@scope` prefixes have been removed. */
1634
2220
  text: string;
2221
+ /** Deduplicated lowercase scope prefixes requested by the query. */
1635
2222
  scopes: string[];
1636
2223
  }
1637
2224
  /**
1638
2225
  * Locale configuration.
2226
+ *
2227
+ * Locales define the routing and display metadata used by the i18n plugin.
1639
2228
  */
1640
2229
  interface LocaleConfig {
1641
2230
  /** BCP 47 locale tag (e.g., 'en', 'ja', 'zh-Hans'). */
1642
2231
  code: string;
1643
2232
  /** Display name for this locale (e.g., 'English', '日本語'). */
1644
2233
  name: string;
1645
- /** Text direction. @default 'ltr' */
2234
+ /**
2235
+ * Text direction for rendered pages.
2236
+ *
2237
+ * @default 'ltr'
2238
+ */
1646
2239
  dir?: "ltr" | "rtl";
1647
2240
  }
1648
2241
  /**
1649
2242
  * i18n (internationalization) options.
2243
+ *
2244
+ * i18n is opt-in because it changes routing and build-time validation. Set
2245
+ * `enabled: true` and configure at least `defaultLocale` / `locales` when the
2246
+ * same content tree should serve multiple languages.
1650
2247
  */
1651
2248
  interface I18nOptions {
1652
2249
  /**
1653
2250
  * Enable i18n.
2251
+ *
2252
+ * The resolver returns `false` unless this is explicitly set to `true`.
2253
+ *
1654
2254
  * @default false
1655
2255
  */
1656
2256
  enabled?: boolean;
1657
2257
  /**
1658
2258
  * Path to i18n dictionary directory (relative to project root).
2259
+ *
2260
+ * Dictionary files are watched in development and checked during builds when
2261
+ * `check` is enabled.
2262
+ *
1659
2263
  * @default 'content/i18n'
1660
2264
  */
1661
2265
  dir?: string;
1662
2266
  /**
1663
2267
  * Default locale tag.
2268
+ *
2269
+ * The default locale is added to `locales` automatically when omitted from the
2270
+ * list.
2271
+ *
1664
2272
  * @default 'en'
1665
2273
  */
1666
2274
  defaultLocale?: string;
1667
2275
  /**
1668
2276
  * Available locales.
2277
+ *
2278
+ * When omitted, ox-content creates a single locale from `defaultLocale`.
2279
+ *
2280
+ * @default [{ code: defaultLocale, name: defaultLocale }]
1669
2281
  */
1670
2282
  locales?: LocaleConfig[];
1671
2283
  /**
1672
2284
  * Hide default locale prefix in URLs.
2285
+ *
1673
2286
  * When true, `/page` serves the default locale and `/ja/page` serves Japanese.
1674
2287
  * When false, all locales get prefixed: `/en/page`, `/ja/page`.
2288
+ *
1675
2289
  * @default true
1676
2290
  */
1677
2291
  hideDefaultLocale?: boolean;
1678
2292
  /**
1679
2293
  * Run i18n checks during build.
2294
+ *
2295
+ * Checks validate dictionary coverage and translation function usage when the
2296
+ * native i18n checker is available.
2297
+ *
1680
2298
  * @default true
1681
2299
  */
1682
2300
  check?: boolean;
1683
2301
  /**
1684
2302
  * Translation function names to detect in source code.
2303
+ *
2304
+ * Add framework-specific wrappers here so build-time checks can find all
2305
+ * translation keys.
2306
+ *
1685
2307
  * @default ['t', '$t']
1686
2308
  */
1687
2309
  functionNames?: string[];
@@ -1731,23 +2353,48 @@ interface IncrementalMarkdownParserOptions {
1731
2353
  * @default true
1732
2354
  */
1733
2355
  gfm?: boolean;
1734
- /** Enable footnotes. */
2356
+ /**
2357
+ * Enable footnotes.
2358
+ * @default true
2359
+ */
1735
2360
  footnotes?: boolean;
1736
- /** Enable task list items. */
2361
+ /**
2362
+ * Enable task list items.
2363
+ * @default true
2364
+ */
1737
2365
  taskLists?: boolean;
1738
- /** Enable GFM tables. */
2366
+ /**
2367
+ * Enable GFM tables.
2368
+ * @default true
2369
+ */
1739
2370
  tables?: boolean;
1740
- /** Enable strikethrough. */
2371
+ /**
2372
+ * Enable strikethrough.
2373
+ * @default true
2374
+ */
1741
2375
  strikethrough?: boolean;
1742
- /** Enable Markdown autolinks. */
2376
+ /**
2377
+ * Enable Markdown autolinks.
2378
+ * @default true
2379
+ */
1743
2380
  autolinks?: boolean;
1744
2381
  }
1745
2382
  interface IncrementalMarkdownParseAppendOptions {
1746
- /** Commit the current chunk as the final stream input. */
2383
+ /**
2384
+ * Commit the current chunk as the final stream input.
2385
+ * @default false
2386
+ */
1747
2387
  final?: boolean;
1748
- /** Include a provisional AST for the current replaceable tail. */
2388
+ /**
2389
+ * Include a provisional AST for the current replaceable tail.
2390
+ * The constructor-level value is reused when omitted on `append`.
2391
+ * @default false
2392
+ */
1749
2393
  includePendingAst?: boolean;
1750
- /** Temporarily close unmatched inline delimiters in the provisional AST. */
2394
+ /**
2395
+ * Temporarily close unmatched inline delimiters in the provisional AST.
2396
+ * @default true
2397
+ */
1751
2398
  completeInline?: boolean;
1752
2399
  }
1753
2400
  interface IncrementalMarkdownRendererOptions extends IncrementalMarkdownParserOptions {
@@ -1763,11 +2410,21 @@ interface IncrementalMarkdownRendererOptions extends IncrementalMarkdownParserOp
1763
2410
  completeInline?: boolean;
1764
2411
  }
1765
2412
  interface IncrementalMarkdownRenderAppendOptions {
1766
- /** Commit the current chunk as the final stream input. */
2413
+ /**
2414
+ * Commit the current chunk as the final stream input.
2415
+ * @default false
2416
+ */
1767
2417
  final?: boolean;
1768
- /** Render the unstable tail as replaceable provisional HTML. */
2418
+ /**
2419
+ * Render the unstable tail as replaceable provisional HTML.
2420
+ * The constructor-level value is reused when omitted on `append`.
2421
+ * @default true
2422
+ */
1769
2423
  renderPending?: boolean;
1770
- /** Temporarily close unmatched inline delimiters in provisional HTML. */
2424
+ /**
2425
+ * Temporarily close unmatched inline delimiters in provisional HTML.
2426
+ * @default true
2427
+ */
1771
2428
  completeInline?: boolean;
1772
2429
  }
1773
2430
  type IncrementalMarkdownRenderResult = _$_ox_content_napi0.IncrementalMarkdownRenderResult;
@@ -1919,17 +2576,49 @@ interface CodeBlockDiagnostic {
1919
2576
  language?: string;
1920
2577
  }
1921
2578
  interface CodeBlockLintOptions$1 {
2579
+ /**
2580
+ * Languages to lint. Omit to lint every fenced block language.
2581
+ * @default undefined
2582
+ */
1922
2583
  languages?: string[];
2584
+ /**
2585
+ * Report fences without a language identifier.
2586
+ * @default false
2587
+ */
1923
2588
  requireLanguage?: boolean;
2589
+ /**
2590
+ * Report trailing whitespace in code block lines.
2591
+ * @default true
2592
+ */
1924
2593
  trailingSpaces?: boolean;
1925
2594
  }
1926
2595
  interface DocsTestOptions$1 {
2596
+ /**
2597
+ * Fence languages to collect as runnable examples.
2598
+ * @default ['js', 'jsx', 'ts', 'tsx', 'mjs', 'mts']
2599
+ */
1927
2600
  languages?: string[];
2601
+ /**
2602
+ * Require fence meta such as `test`, `runnable`, `vitest`, or `docs-test`.
2603
+ * @default true
2604
+ */
1928
2605
  requireMeta?: boolean;
1929
2606
  }
1930
2607
  interface TypecheckCodeBlockOptions {
2608
+ /**
2609
+ * Fence languages to type-check.
2610
+ * @default ['ts', 'tsx']
2611
+ */
1931
2612
  languages?: string[];
2613
+ /**
2614
+ * Require fence meta such as `typecheck`, `twoslash`, or `typecheck=...`.
2615
+ * @default true
2616
+ */
1932
2617
  requireMeta?: boolean;
2618
+ /**
2619
+ * Command used to run the TypeScript checker.
2620
+ * @default 'tsgo'
2621
+ */
1933
2622
  tsgoCommand?: string;
1934
2623
  }
1935
2624
  declare function extractCodeBlocks(source: string): Promise<ExtractedCodeBlock[]>;
@@ -2171,6 +2860,7 @@ interface MarkdownLintStandardDictionaryOptions {
2171
2860
  *
2172
2861
  * This can point at installed packages like
2173
2862
  * `@cspell/dict-fr-fr/cspell-ext.json` or local CSpell config files.
2863
+ * @default []
2174
2864
  */
2175
2865
  imports?: string[];
2176
2866
  /**
@@ -2186,14 +2876,17 @@ interface MarkdownLintStandardDictionaryOptions {
2186
2876
  interface MarkdownLintDictionaryOptions {
2187
2877
  /**
2188
2878
  * Words ignored across all configured languages.
2879
+ * @default []
2189
2880
  */
2190
2881
  words?: string[];
2191
2882
  /**
2192
2883
  * Extra words to allow per language.
2884
+ * @default {}
2193
2885
  */
2194
2886
  byLanguage?: Partial<Record<MarkdownLintLanguage, string[]>>;
2195
2887
  /**
2196
2888
  * Words that should never produce diagnostics.
2889
+ * @default []
2197
2890
  */
2198
2891
  ignoredWords?: string[];
2199
2892
  /**
@@ -2201,6 +2894,7 @@ interface MarkdownLintDictionaryOptions {
2201
2894
  *
2202
2895
  * By default the linter stays on a minimal built-in dictionary. Enable this
2203
2896
  * to load larger locale dictionaries from a standard external source.
2897
+ * @default false
2204
2898
  */
2205
2899
  standard?: MarkdownLintStandardDictionaryOptions | false;
2206
2900
  }
@@ -2259,10 +2953,13 @@ interface MarkdownLintOptions {
2259
2953
  languages?: MarkdownLintLanguage[];
2260
2954
  /**
2261
2955
  * Rule configuration.
2956
+ * Omitted fields use `MarkdownLintRuleOptions` defaults.
2957
+ * @default {}
2262
2958
  */
2263
2959
  rules?: MarkdownLintRuleOptions;
2264
2960
  /**
2265
2961
  * Built-in and opt-in standard dictionary overrides.
2962
+ * @default {}
2266
2963
  */
2267
2964
  dictionary?: MarkdownLintDictionaryOptions;
2268
2965
  }
@@ -2363,6 +3060,8 @@ interface MarkdownLintFileOptions extends MarkdownLintOptions {
2363
3060
  exclude?: string[];
2364
3061
  /**
2365
3062
  * Alias of `exclude`.
3063
+ * When omitted, only `exclude` is used.
3064
+ * @default undefined
2366
3065
  */
2367
3066
  ignore?: string[];
2368
3067
  }