@ox-content/vite-plugin 2.67.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
@@ -264,15 +264,30 @@ interface GitHubSourceData {
264
264
  language: string | null;
265
265
  }
266
266
  interface GitHubOptions {
267
- /** GitHub API token for higher rate limits. */
267
+ /**
268
+ * GitHub API token used for higher rate limits and private repository access.
269
+ * @default ''
270
+ */
268
271
  token?: string;
269
- /** Cache fetched data. Default: true */
272
+ /**
273
+ * Cache fetched repository and source data in memory for the current process.
274
+ * @default true
275
+ */
270
276
  cache?: boolean;
271
- /** Cache TTL in milliseconds. Default: 3600000 (1 hour) */
277
+ /**
278
+ * Cache TTL in milliseconds.
279
+ * @default 3600000
280
+ */
272
281
  cacheTTL?: number;
273
- /** Maximum source file size to inline in bytes. Default: 200000 */
282
+ /**
283
+ * Maximum source file size to inline in bytes.
284
+ * @default 200000
285
+ */
274
286
  maxSourceBytes?: number;
275
- /** 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
+ */
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
- /** Request timeout in milliseconds. Default: 10000 */
340
+ /**
341
+ * Request timeout in milliseconds.
342
+ * @default 10000
343
+ */
326
344
  timeout?: number;
327
- /** Cache fetched data. Default: true */
345
+ /**
346
+ * Cache fetched Open Graph metadata in memory for the current process.
347
+ * @default true
348
+ */
328
349
  cache?: boolean;
329
- /** Cache TTL in milliseconds. Default: 3600000 (1 hour) */
350
+ /**
351
+ * Cache TTL in milliseconds.
352
+ * @default 3600000
353
+ */
330
354
  cacheTTL?: number;
331
- /** 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
+ */
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. Default: false.
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
- /** Use privacy-enhanced mode (youtube-nocookie.com). Default: true */
431
+ /**
432
+ * Use privacy-enhanced mode (`youtube-nocookie.com`).
433
+ * @default true
434
+ */
404
435
  privacyEnhanced?: boolean;
405
- /** Default aspect ratio. Default: "16/9" */
436
+ /**
437
+ * Default iframe aspect ratio.
438
+ * @default '16/9'
439
+ */
406
440
  aspectRatio?: string;
407
- /** Allow fullscreen. Default: true */
441
+ /**
442
+ * Allow fullscreen playback.
443
+ * @default true
444
+ */
408
445
  allowFullscreen?: boolean;
409
- /** Lazy load iframe. Default: true */
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
- /** Mermaid theme. Default: "neutral" */
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
- * 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.
582
629
  */
583
630
  interface SsgOptions {
584
631
  /**
585
- * 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
+ *
586
637
  * @default true
587
638
  */
588
639
  enabled?: boolean;
589
640
  /**
590
- * 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
+ *
591
647
  * @default '.html'
592
648
  */
593
649
  extension?: string;
594
650
  /**
595
- * 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
+ *
596
657
  * @default false
597
658
  */
598
659
  clean?: boolean;
599
660
  /**
600
- * Bare HTML output (no navigation, no styles).
601
- * 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
+ *
602
667
  * @default false
603
668
  */
604
669
  bare?: boolean;
605
670
  /**
606
- * 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
607
676
  */
608
677
  siteName?: string;
609
678
  /**
610
- * OG image URL for social sharing (static URL).
611
- * 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
612
685
  */
613
686
  ogImage?: string;
614
687
  /**
615
- * Generate OG images per page using Rust-based generator.
616
- * 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
+ *
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
- * Site URL for generating absolute OG image URLs.
627
- * Required for proper SNS sharing.
628
- * 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
629
714
  */
630
715
  siteUrl?: string;
631
716
  /**
632
- * Theme configuration for customizing the SSG output.
633
- * 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
634
723
  */
635
724
  theme?: ThemeConfig;
636
725
  /**
637
- * Override the auto-generated sidebar navigation.
638
- * 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
639
733
  */
640
734
  navigation?: SsgNavigationGroup[];
641
735
  }
@@ -656,32 +750,61 @@ interface ResolvedSsgOptions {
656
750
  navigation?: SsgNavigationGroup[];
657
751
  }
658
752
  /**
659
- * 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.
660
762
  */
661
763
  interface OxContentOptions {
662
764
  /**
663
- * 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
+ *
664
770
  * @default 'content'
665
771
  */
666
772
  srcDir?: string;
667
773
  /**
668
- * 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
+ *
669
779
  * @default 'dist'
670
780
  */
671
781
  outDir?: string;
672
782
  /**
673
- * 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
+ *
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
- * SSG (Static Site Generation) options.
684
- * 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
+ *
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
- * Opt-in code block annotations for fenced code blocks.
854
+ * Code block line annotations for fenced code blocks.
731
855
  *
732
- * Supports the configurable attribute syntax by default, and can also opt
733
- * 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.
734
859
  *
735
- * Example:
736
- * ` ```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
+ * ~~~
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/disable docs generation.
1268
- * @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
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
- * @default true
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
- * When provided, generated documentation will include links to source code.
1323
- * 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
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
- * 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
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,196 @@ 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
+ /** Code examples collected from `@example` tags. */
1490
1992
  examples?: string[];
1993
+ /** Additional tags preserved by tag name after known tags are normalized. */
1491
1994
  tags?: Record<string, string>;
1995
+ /** True when the entry is marked private or matched by private filtering. */
1492
1996
  private?: boolean;
1997
+ /** Source file path relative to the extraction root when available. */
1493
1998
  file: string;
1999
+ /** 1-based start line of the declaration in the source file. */
1494
2000
  line: number;
2001
+ /** 1-based end line of the declaration in the source file. */
1495
2002
  endLine: number;
2003
+ /** Full declaration signature, when the renderer can extract one. */
1496
2004
  signature?: string;
2005
+ /** Members belonging to classes, interfaces, object types, and enums. */
1497
2006
  members?: DocMember[];
1498
2007
  }
1499
2008
  /**
1500
2009
  * A member belonging to a class, interface, type alias, or enum entry.
1501
2010
  */
1502
2011
  interface DocMember {
2012
+ /** Member name as it appears in the containing declaration. */
1503
2013
  name: string;
2014
+ /** Normalized member kind used for rendering and sorting. */
1504
2015
  kind: "property" | "method" | "constructor" | "getter" | "setter" | "enumMember";
2016
+ /** Main prose extracted from the member's documentation comment. */
1505
2017
  description: string;
2018
+ /** Full member signature, when available. */
1506
2019
  signature?: string;
2020
+ /** Rendered TypeScript type text for properties and enum members. */
1507
2021
  type?: string;
2022
+ /** Default value extracted from syntax or `@default` tags. */
1508
2023
  default?: string;
2024
+ /** Parameter documentation for methods and constructors. */
1509
2025
  params?: ParamDoc[];
2026
+ /** Return value documentation for methods and accessors. */
1510
2027
  returns?: ReturnDoc;
2028
+ /** True when the member is optional in the source declaration. */
1511
2029
  optional?: boolean;
2030
+ /** True when the member is declared readonly. */
1512
2031
  readonly?: boolean;
2032
+ /** True when the member is static. */
1513
2033
  static?: boolean;
2034
+ /** True when the member is marked private or matched by private filtering. */
1514
2035
  private?: boolean;
2036
+ /** Additional tags preserved by tag name after known tags are normalized. */
1515
2037
  tags?: Record<string, string>;
2038
+ /** 1-based start line of the member declaration. */
1516
2039
  line: number;
2040
+ /** 1-based end line of the member declaration. */
1517
2041
  endLine: number;
1518
2042
  }
1519
2043
  /**
1520
2044
  * Parameter documentation.
1521
2045
  */
1522
2046
  interface ParamDoc {
2047
+ /** Parameter name, including dotted names for destructured properties. */
1523
2048
  name: string;
2049
+ /** Rendered TypeScript type text. */
1524
2050
  type: string;
2051
+ /** Prose extracted from `@param` / `@arg` documentation. */
1525
2052
  description: string;
2053
+ /** True when the parameter is optional. */
1526
2054
  optional?: boolean;
2055
+ /** Default value extracted from syntax or `@default` tags. */
1527
2056
  default?: string;
1528
2057
  }
1529
2058
  /**
1530
2059
  * Return type documentation.
1531
2060
  */
1532
2061
  interface ReturnDoc {
2062
+ /** Rendered TypeScript type text for the return value. */
1533
2063
  type: string;
2064
+ /** Prose extracted from `@returns` / `@return` documentation. */
1534
2065
  description: string;
1535
2066
  }
1536
2067
  /**
1537
2068
  * Extracted documentation for a single file.
1538
2069
  */
1539
2070
  interface ExtractedDocs {
2071
+ /** Source module or file identifier used by generated output. */
1540
2072
  file: string;
2073
+ /** Optional module-level description extracted from a file header comment. */
1541
2074
  description?: string;
2075
+ /** Absolute source path, when available for source links and diagnostics. */
1542
2076
  sourcePath?: string;
2077
+ /** Module-level examples collected from a file header comment. */
1543
2078
  examples?: string[];
2079
+ /** Module-level tags preserved by tag name. */
1544
2080
  tags?: Record<string, string>;
2081
+ /** Top-level documented declarations found in this module. */
1545
2082
  entries: DocEntry[];
1546
2083
  }
1547
2084
  /**
1548
2085
  * Summary counts emitted with generated documentation data.
1549
2086
  */
1550
2087
  interface DocsSummary {
2088
+ /** Number of modules included in the generated payload. */
1551
2089
  modules: number;
2090
+ /** Number of top-level entries across all modules. */
1552
2091
  entries: number;
2092
+ /** Entry counts grouped by normalized declaration kind. */
1553
2093
  byKind: Record<string, number>;
2094
+ /** Number of documented parameters. */
1554
2095
  params: number;
2096
+ /** Number of documented return values. */
1555
2097
  returns: number;
2098
+ /** Number of collected examples. */
1556
2099
  examples: number;
2100
+ /** Number of entries or members marked with `@deprecated`. */
1557
2101
  deprecated: number;
1558
2102
  }
1559
2103
  /**
1560
2104
  * Machine-readable payload emitted alongside generated docs.
1561
2105
  */
1562
2106
  interface GeneratedDocsData {
2107
+ /** Payload schema version. Increment when the JSON shape changes incompatibly. */
1563
2108
  version: 1;
2109
+ /** ISO timestamp for the generation run. */
1564
2110
  generatedAt: string;
2111
+ /** Aggregate counts useful for dashboards and generated index pages. */
1565
2112
  summary: DocsSummary;
2113
+ /** Extracted documentation modules in render order. */
1566
2114
  modules: ExtractedDocs[];
1567
2115
  }
1568
2116
  /**
1569
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.
1570
2123
  */
1571
2124
  interface SearchOptions {
1572
2125
  /**
1573
2126
  * Enable search functionality.
2127
+ *
2128
+ * Set this to `false` when config merging requires an object shape but search
2129
+ * should be disabled.
2130
+ *
1574
2131
  * @default true
1575
2132
  */
1576
2133
  enabled?: boolean;
1577
2134
  /**
1578
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
+ *
1579
2140
  * @default 10
1580
2141
  */
1581
2142
  limit?: number;
1582
2143
  /**
1583
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
+ *
1584
2149
  * @default true
1585
2150
  */
1586
2151
  prefix?: boolean;
1587
2152
  /**
1588
2153
  * Placeholder text for the search input.
2154
+ *
2155
+ * This value is embedded in the virtual search module for UI consumers.
2156
+ *
1589
2157
  * @default 'Search documentation...'
1590
2158
  */
1591
2159
  placeholder?: string;
1592
2160
  /**
1593
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
+ *
1594
2165
  * @default '/'
1595
2166
  */
1596
2167
  hotkey?: string;
@@ -1609,80 +2180,130 @@ interface ResolvedSearchOptions {
1609
2180
  * Search document structure.
1610
2181
  */
1611
2182
  interface SearchDocument {
2183
+ /** Stable document identifier used by the search index. */
1612
2184
  id: string;
2185
+ /** Human-readable document title. */
1613
2186
  title: string;
2187
+ /** URL returned to search consumers. */
1614
2188
  url: string;
2189
+ /** Plain-text body content used for scoring and snippets. */
1615
2190
  body: string;
2191
+ /** Headings extracted from the document. */
1616
2192
  headings: string[];
2193
+ /** Code block text extracted from the document. */
1617
2194
  code: string[];
1618
2195
  }
1619
2196
  /**
1620
2197
  * Search result structure.
1621
2198
  */
1622
2199
  interface SearchResult {
2200
+ /** Matching document identifier. */
1623
2201
  id: string;
2202
+ /** Matching document title. */
1624
2203
  title: string;
2204
+ /** URL to open when the result is selected. */
1625
2205
  url: string;
2206
+ /** Relevance score returned by the BM25 search engine. */
1626
2207
  score: number;
2208
+ /** Query terms that matched the document. */
1627
2209
  matches: string[];
2210
+ /** Context snippet with highlighted terms when available. */
1628
2211
  snippet: string;
2212
+ /** Hierarchical scopes derived from the result URL or document id. */
1629
2213
  scopes?: string[];
1630
2214
  }
1631
2215
  /**
1632
2216
  * Parsed search query with optional scope prefixes.
1633
2217
  */
1634
2218
  interface ScopedSearchQuery {
2219
+ /** Query text after `@scope` prefixes have been removed. */
1635
2220
  text: string;
2221
+ /** Deduplicated lowercase scope prefixes requested by the query. */
1636
2222
  scopes: string[];
1637
2223
  }
1638
2224
  /**
1639
2225
  * Locale configuration.
2226
+ *
2227
+ * Locales define the routing and display metadata used by the i18n plugin.
1640
2228
  */
1641
2229
  interface LocaleConfig {
1642
2230
  /** BCP 47 locale tag (e.g., 'en', 'ja', 'zh-Hans'). */
1643
2231
  code: string;
1644
2232
  /** Display name for this locale (e.g., 'English', '日本語'). */
1645
2233
  name: string;
1646
- /** Text direction. @default 'ltr' */
2234
+ /**
2235
+ * Text direction for rendered pages.
2236
+ *
2237
+ * @default 'ltr'
2238
+ */
1647
2239
  dir?: "ltr" | "rtl";
1648
2240
  }
1649
2241
  /**
1650
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.
1651
2247
  */
1652
2248
  interface I18nOptions {
1653
2249
  /**
1654
2250
  * Enable i18n.
2251
+ *
2252
+ * The resolver returns `false` unless this is explicitly set to `true`.
2253
+ *
1655
2254
  * @default false
1656
2255
  */
1657
2256
  enabled?: boolean;
1658
2257
  /**
1659
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
+ *
1660
2263
  * @default 'content/i18n'
1661
2264
  */
1662
2265
  dir?: string;
1663
2266
  /**
1664
2267
  * Default locale tag.
2268
+ *
2269
+ * The default locale is added to `locales` automatically when omitted from the
2270
+ * list.
2271
+ *
1665
2272
  * @default 'en'
1666
2273
  */
1667
2274
  defaultLocale?: string;
1668
2275
  /**
1669
2276
  * Available locales.
2277
+ *
2278
+ * When omitted, ox-content creates a single locale from `defaultLocale`.
2279
+ *
2280
+ * @default [{ code: defaultLocale, name: defaultLocale }]
1670
2281
  */
1671
2282
  locales?: LocaleConfig[];
1672
2283
  /**
1673
2284
  * Hide default locale prefix in URLs.
2285
+ *
1674
2286
  * When true, `/page` serves the default locale and `/ja/page` serves Japanese.
1675
2287
  * When false, all locales get prefixed: `/en/page`, `/ja/page`.
2288
+ *
1676
2289
  * @default true
1677
2290
  */
1678
2291
  hideDefaultLocale?: boolean;
1679
2292
  /**
1680
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
+ *
1681
2298
  * @default true
1682
2299
  */
1683
2300
  check?: boolean;
1684
2301
  /**
1685
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
+ *
1686
2307
  * @default ['t', '$t']
1687
2308
  */
1688
2309
  functionNames?: string[];
@@ -1732,23 +2353,48 @@ interface IncrementalMarkdownParserOptions {
1732
2353
  * @default true
1733
2354
  */
1734
2355
  gfm?: boolean;
1735
- /** Enable footnotes. */
2356
+ /**
2357
+ * Enable footnotes.
2358
+ * @default true
2359
+ */
1736
2360
  footnotes?: boolean;
1737
- /** Enable task list items. */
2361
+ /**
2362
+ * Enable task list items.
2363
+ * @default true
2364
+ */
1738
2365
  taskLists?: boolean;
1739
- /** Enable GFM tables. */
2366
+ /**
2367
+ * Enable GFM tables.
2368
+ * @default true
2369
+ */
1740
2370
  tables?: boolean;
1741
- /** Enable strikethrough. */
2371
+ /**
2372
+ * Enable strikethrough.
2373
+ * @default true
2374
+ */
1742
2375
  strikethrough?: boolean;
1743
- /** Enable Markdown autolinks. */
2376
+ /**
2377
+ * Enable Markdown autolinks.
2378
+ * @default true
2379
+ */
1744
2380
  autolinks?: boolean;
1745
2381
  }
1746
2382
  interface IncrementalMarkdownParseAppendOptions {
1747
- /** Commit the current chunk as the final stream input. */
2383
+ /**
2384
+ * Commit the current chunk as the final stream input.
2385
+ * @default false
2386
+ */
1748
2387
  final?: boolean;
1749
- /** 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
+ */
1750
2393
  includePendingAst?: boolean;
1751
- /** Temporarily close unmatched inline delimiters in the provisional AST. */
2394
+ /**
2395
+ * Temporarily close unmatched inline delimiters in the provisional AST.
2396
+ * @default true
2397
+ */
1752
2398
  completeInline?: boolean;
1753
2399
  }
1754
2400
  interface IncrementalMarkdownRendererOptions extends IncrementalMarkdownParserOptions {
@@ -1764,11 +2410,21 @@ interface IncrementalMarkdownRendererOptions extends IncrementalMarkdownParserOp
1764
2410
  completeInline?: boolean;
1765
2411
  }
1766
2412
  interface IncrementalMarkdownRenderAppendOptions {
1767
- /** Commit the current chunk as the final stream input. */
2413
+ /**
2414
+ * Commit the current chunk as the final stream input.
2415
+ * @default false
2416
+ */
1768
2417
  final?: boolean;
1769
- /** 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
+ */
1770
2423
  renderPending?: boolean;
1771
- /** Temporarily close unmatched inline delimiters in provisional HTML. */
2424
+ /**
2425
+ * Temporarily close unmatched inline delimiters in provisional HTML.
2426
+ * @default true
2427
+ */
1772
2428
  completeInline?: boolean;
1773
2429
  }
1774
2430
  type IncrementalMarkdownRenderResult = _$_ox_content_napi0.IncrementalMarkdownRenderResult;
@@ -1920,17 +2576,49 @@ interface CodeBlockDiagnostic {
1920
2576
  language?: string;
1921
2577
  }
1922
2578
  interface CodeBlockLintOptions$1 {
2579
+ /**
2580
+ * Languages to lint. Omit to lint every fenced block language.
2581
+ * @default undefined
2582
+ */
1923
2583
  languages?: string[];
2584
+ /**
2585
+ * Report fences without a language identifier.
2586
+ * @default false
2587
+ */
1924
2588
  requireLanguage?: boolean;
2589
+ /**
2590
+ * Report trailing whitespace in code block lines.
2591
+ * @default true
2592
+ */
1925
2593
  trailingSpaces?: boolean;
1926
2594
  }
1927
2595
  interface DocsTestOptions$1 {
2596
+ /**
2597
+ * Fence languages to collect as runnable examples.
2598
+ * @default ['js', 'jsx', 'ts', 'tsx', 'mjs', 'mts']
2599
+ */
1928
2600
  languages?: string[];
2601
+ /**
2602
+ * Require fence meta such as `test`, `runnable`, `vitest`, or `docs-test`.
2603
+ * @default true
2604
+ */
1929
2605
  requireMeta?: boolean;
1930
2606
  }
1931
2607
  interface TypecheckCodeBlockOptions {
2608
+ /**
2609
+ * Fence languages to type-check.
2610
+ * @default ['ts', 'tsx']
2611
+ */
1932
2612
  languages?: string[];
2613
+ /**
2614
+ * Require fence meta such as `typecheck`, `twoslash`, or `typecheck=...`.
2615
+ * @default true
2616
+ */
1933
2617
  requireMeta?: boolean;
2618
+ /**
2619
+ * Command used to run the TypeScript checker.
2620
+ * @default 'tsgo'
2621
+ */
1934
2622
  tsgoCommand?: string;
1935
2623
  }
1936
2624
  declare function extractCodeBlocks(source: string): Promise<ExtractedCodeBlock[]>;
@@ -2172,6 +2860,7 @@ interface MarkdownLintStandardDictionaryOptions {
2172
2860
  *
2173
2861
  * This can point at installed packages like
2174
2862
  * `@cspell/dict-fr-fr/cspell-ext.json` or local CSpell config files.
2863
+ * @default []
2175
2864
  */
2176
2865
  imports?: string[];
2177
2866
  /**
@@ -2187,14 +2876,17 @@ interface MarkdownLintStandardDictionaryOptions {
2187
2876
  interface MarkdownLintDictionaryOptions {
2188
2877
  /**
2189
2878
  * Words ignored across all configured languages.
2879
+ * @default []
2190
2880
  */
2191
2881
  words?: string[];
2192
2882
  /**
2193
2883
  * Extra words to allow per language.
2884
+ * @default {}
2194
2885
  */
2195
2886
  byLanguage?: Partial<Record<MarkdownLintLanguage, string[]>>;
2196
2887
  /**
2197
2888
  * Words that should never produce diagnostics.
2889
+ * @default []
2198
2890
  */
2199
2891
  ignoredWords?: string[];
2200
2892
  /**
@@ -2202,6 +2894,7 @@ interface MarkdownLintDictionaryOptions {
2202
2894
  *
2203
2895
  * By default the linter stays on a minimal built-in dictionary. Enable this
2204
2896
  * to load larger locale dictionaries from a standard external source.
2897
+ * @default false
2205
2898
  */
2206
2899
  standard?: MarkdownLintStandardDictionaryOptions | false;
2207
2900
  }
@@ -2260,10 +2953,13 @@ interface MarkdownLintOptions {
2260
2953
  languages?: MarkdownLintLanguage[];
2261
2954
  /**
2262
2955
  * Rule configuration.
2956
+ * Omitted fields use `MarkdownLintRuleOptions` defaults.
2957
+ * @default {}
2263
2958
  */
2264
2959
  rules?: MarkdownLintRuleOptions;
2265
2960
  /**
2266
2961
  * Built-in and opt-in standard dictionary overrides.
2962
+ * @default {}
2267
2963
  */
2268
2964
  dictionary?: MarkdownLintDictionaryOptions;
2269
2965
  }
@@ -2364,6 +3060,8 @@ interface MarkdownLintFileOptions extends MarkdownLintOptions {
2364
3060
  exclude?: string[];
2365
3061
  /**
2366
3062
  * Alias of `exclude`.
3063
+ * When omitted, only `exclude` is used.
3064
+ * @default undefined
2367
3065
  */
2368
3066
  ignore?: string[];
2369
3067
  }