@ox-content/vite-plugin 2.90.0 → 3.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,6 +1,53 @@
1
1
  import { a as JSXProps, c as jsxs, d as when, i as JSXNode, l as raw, n as JSXChild, o as each, r as JSXElementType, s as jsx, t as Fragment, u as renderToString } from "./jsx-html.cjs";
2
2
  import { EnvironmentOptions, Plugin } from "vite";
3
- import { LanguageRegistration, LanguageRegistration as LanguageRegistration$1, ThemeRegistration, ThemeRegistration as ThemeRegistration$1 } from "shiki";
3
+ //#region src/header-chrome.d.ts
4
+ /**
5
+ * Opt-in header nav, announcement, and per-page chrome helpers.
6
+ */
7
+ /** Plain label or locale map (`{ en: "Guide", ja: "ガイド" }`). */
8
+ type LocaleLabel = string | Record<string, string>;
9
+ /** Header nav link or dropdown. */
10
+ interface HeaderNavItem {
11
+ text: LocaleLabel;
12
+ link?: string;
13
+ items?: HeaderNavItem[];
14
+ }
15
+ /** Announcement bar. Text is escaped; no raw HTML slot. */
16
+ interface ThemeAnnouncement {
17
+ text: string;
18
+ /** https or same-origin only. */
19
+ link?: string;
20
+ /** Best-effort localStorage key for dismiss. */
21
+ dismissKey?: string;
22
+ }
23
+ /** Per-page frontmatter chrome flags. `false` hides that region. */
24
+ interface PageChromeFlags {
25
+ sidebar?: boolean;
26
+ outline?: boolean;
27
+ aside?: boolean;
28
+ footer?: boolean;
29
+ navbar?: boolean;
30
+ lastUpdated?: boolean;
31
+ editLink?: boolean;
32
+ }
33
+ /** `false` or omitted stays off. `true` or `{}` enables default flag reading. */
34
+ declare function resolvePageChromeOption(value: boolean | Record<string, unknown> | undefined): boolean;
35
+ /** Reads hide flags from frontmatter. Non-boolean values are ignored. */
36
+ declare function parsePageChromeFlags(frontmatter: Record<string, unknown>): PageChromeFlags;
37
+ /**
38
+ * Picks the exact locale, its language, the default locale, then the first
39
+ * non-empty own string in declaration order.
40
+ */
41
+ declare function resolveLocaleLabel(text: LocaleLabel, locale?: string, defaultLocale?: string): string;
42
+ /** Nav item after locale maps are flattened to strings. */
43
+ interface ResolvedHeaderNavItem {
44
+ text: string;
45
+ link?: string;
46
+ items?: ResolvedHeaderNavItem[];
47
+ }
48
+ /** Resolves locale maps so NAPI always receives string labels. */
49
+ declare function resolveHeaderNavItems(items: HeaderNavItem[] | undefined, locale?: string, defaultLocale?: string): ResolvedHeaderNavItem[] | undefined;
50
+ //#endregion
4
51
  //#region src/theme-tokens.d.ts
5
52
  /**
6
53
  * Free-form `--octc-*` custom properties for themes that need more than the
@@ -137,8 +184,10 @@ interface ThemeEmbed {
137
184
  /** Custom footer content (replaces default footer) */
138
185
  footer?: string;
139
186
  }
187
+ /** Sidebar group or link, including recursively nested localized labels. */
140
188
  interface SidebarItem {
141
- text?: string;
189
+ /** Plain label or locale map (`{ en: "Guide", ja: "ガイド" }`). */
190
+ text?: LocaleLabel;
142
191
  link?: string;
143
192
  items?: SidebarItem[];
144
193
  collapsed?: boolean;
@@ -152,6 +201,30 @@ interface ThemeConfig {
152
201
  name?: string;
153
202
  /** Base theme to extend */
154
203
  extends?: ThemeConfig;
204
+ /**
205
+ * Preserve the current surface during same-origin MPA navigation with the
206
+ * browser's cross-document View Transition API.
207
+ *
208
+ * Unsupported browsers use normal navigation. Reduced-motion preferences
209
+ * never enable the transition. Set `false` to opt out.
210
+ *
211
+ * @default true
212
+ */
213
+ viewTransitions?: boolean;
214
+ /**
215
+ * Show the right-hand "On this page" outline.
216
+ *
217
+ * Default `false`. When `true`, the outline is rendered only on pages
218
+ * that have TOC entries, using the existing `<aside class="toc">` markup.
219
+ */
220
+ aside?: boolean;
221
+ /**
222
+ * Show a breadcrumb trail from the site root through sidebar ancestors.
223
+ *
224
+ * Default `false`. `true` or an object enables the trail. Frontmatter
225
+ * `breadcrumbs: false` still hides it on that page.
226
+ */
227
+ breadcrumbs?: boolean | Record<string, unknown>;
155
228
  /** Light mode colors (maps to CSS variables) */
156
229
  colors?: ThemeColors;
157
230
  /** Dark mode colors (maps to CSS variables) */
@@ -164,6 +237,17 @@ interface ThemeConfig {
164
237
  layout?: ThemeLayout;
165
238
  /** Header configuration */
166
239
  header?: ThemeHeader;
240
+ /**
241
+ * Opt-in header nav. Each item is `{ text, link }` or a dropdown
242
+ * `{ text, items }`. Labels are escaped. `javascript:`, `data:`,
243
+ * `vbscript:`, and protocol-relative `//` links are omitted.
244
+ */
245
+ nav?: HeaderNavItem[];
246
+ /**
247
+ * Opt-in announcement bar above the header. Text is escaped.
248
+ * Optional `link` must be https or same-origin.
249
+ */
250
+ announcement?: ThemeAnnouncement;
167
251
  /** Footer configuration */
168
252
  footer?: ThemeFooter;
169
253
  /** Social links configuration */
@@ -192,12 +276,17 @@ interface ThemeConfig {
192
276
  */
193
277
  interface ResolvedThemeConfig {
194
278
  name: string;
279
+ viewTransitions: boolean;
280
+ aside: boolean;
281
+ breadcrumbs: boolean;
195
282
  colors: ThemeColors;
196
283
  darkColors: ThemeColors;
197
284
  fonts: ThemeFonts;
198
285
  entryPage: ThemeEntryPage;
199
286
  layout: ThemeLayout;
200
287
  header: ThemeHeader;
288
+ nav?: HeaderNavItem[];
289
+ announcement?: ThemeAnnouncement;
201
290
  footer: ThemeFooter;
202
291
  socialLinks: SocialLinks;
203
292
  sidebar: SidebarItem[];
@@ -282,6 +371,11 @@ interface GitHubSourceRef {
282
371
  permalink: string;
283
372
  lines?: GitHubLineRange;
284
373
  }
374
+ interface GitHubSourceCommit {
375
+ sha: string;
376
+ message: string;
377
+ html_url: string;
378
+ }
285
379
  interface GitHubSourceData {
286
380
  repo: string;
287
381
  ref: string;
@@ -291,6 +385,7 @@ interface GitHubSourceData {
291
385
  size: number;
292
386
  html_url: string;
293
387
  language: string | null;
388
+ commit?: GitHubSourceCommit;
294
389
  }
295
390
  interface GitHubOptions {
296
391
  /**
@@ -583,6 +678,11 @@ interface BasePageProps {
583
678
  toc: TocEntry[];
584
679
  /** Last git commit timestamp in milliseconds */
585
680
  lastUpdated?: number;
681
+ /** Unique git authors for this page */
682
+ contributors?: Array<{
683
+ name: string;
684
+ avatar?: string;
685
+ }>;
586
686
  /** Source file path (relative to docs root) */
587
687
  path: string;
588
688
  /** Output URL path */
@@ -783,6 +883,11 @@ interface PageData {
783
883
  toc: TocEntry[];
784
884
  /** Last git commit timestamp in milliseconds */
785
885
  lastUpdated?: number;
886
+ /** Unique git authors for this page */
887
+ contributors?: Array<{
888
+ name: string;
889
+ avatar?: string;
890
+ }>;
786
891
  /** Source file path */
787
892
  path: string;
788
893
  /** Output URL path */
@@ -1098,6 +1203,129 @@ interface SsgOptions {
1098
1203
  * @default false
1099
1204
  */
1100
1205
  lastUpdated?: boolean;
1206
+ /**
1207
+ * List unique git authors for each page.
1208
+ *
1209
+ * Off by default. `true` enables names only. An object enables the
1210
+ * feature and can set `ignore` and `avatars`. Missing `.git` (for
1211
+ * example a published tarball) yields an empty list and does not
1212
+ * fail the build.
1213
+ *
1214
+ * @default false
1215
+ */
1216
+ contributors?: boolean | ContributorsOptions;
1217
+ /**
1218
+ * Show previous/next page links after the article.
1219
+ *
1220
+ * Disabled when omitted or `false`. `true` enables the default pager.
1221
+ * An object also enables the feature.
1222
+ *
1223
+ * @default false
1224
+ */
1225
+ pagination?: boolean | Record<string, unknown>;
1226
+ /**
1227
+ * Show a breadcrumb trail from the site root through sidebar ancestors.
1228
+ *
1229
+ * Disabled when omitted or `false`. `true` enables the default trail.
1230
+ * An object also enables the feature. Frontmatter `breadcrumbs: false`
1231
+ * hides the trail on that page.
1232
+ *
1233
+ * @default false
1234
+ */
1235
+ breadcrumbs?: boolean | Record<string, unknown>;
1236
+ /**
1237
+ * Emit JSON-LD structured data (`TechArticle`, `WebSite`, and optional
1238
+ * `BreadcrumbList`) in the page `<head>`.
1239
+ *
1240
+ * Disabled when omitted or `false`. `true` enables the defaults. An object
1241
+ * enables the feature and can hide BreadcrumbList or supply a publisher.
1242
+ * Publisher fields the site does not set are not invented.
1243
+ *
1244
+ * @default false
1245
+ */
1246
+ jsonLd?: boolean | JsonLdOptions;
1247
+ /**
1248
+ * Opt-in copy buttons, outbound-link icons, and a back-to-top control.
1249
+ *
1250
+ * Disabled when omitted or `false`. `true` enables all three with defaults.
1251
+ * An object enables the feature and can turn one control off, for example
1252
+ * `{ copy: false }`.
1253
+ *
1254
+ * @default false
1255
+ */
1256
+ readerChrome?: boolean | ReaderChromeOptions;
1257
+ /**
1258
+ * Show a header locale switcher in the default theme.
1259
+ *
1260
+ * Disabled when omitted or `false`, even if `i18n.locales` is set.
1261
+ * `true` or an object enables the control when available locales are
1262
+ * non-empty. Links use the sibling page when it exists, otherwise the
1263
+ * locale root (`/{locale}/` or a configured root).
1264
+ *
1265
+ * @default false
1266
+ */
1267
+ localeSwitcher?: boolean | Record<string, unknown>;
1268
+ /**
1269
+ * Opt-in skip link and print styles.
1270
+ *
1271
+ * Disabled when omitted or `false`. `true` enables the default skip link
1272
+ * and print CSS. An object enables the feature and can override the label.
1273
+ *
1274
+ * @default false
1275
+ */
1276
+ a11y?: boolean | A11yOptions;
1277
+ /**
1278
+ * Honor per-page frontmatter chrome flags (`sidebar`, `outline` / `aside`,
1279
+ * `footer`, `navbar`, `lastUpdated`, `editLink`).
1280
+ *
1281
+ * Disabled when omitted or `false`. `true` or `{}` enables the defaults:
1282
+ * omitted flags keep current chrome, and `false` hides that region.
1283
+ *
1284
+ * @default false
1285
+ */
1286
+ pageChrome?: boolean | Record<string, unknown>;
1287
+ /**
1288
+ * Write a themed 404 page during SSG.
1289
+ *
1290
+ * Off by default. `true` reads `404.md` from `srcDir` and writes `404.html`.
1291
+ * An object enables the feature and overrides only the fields you set.
1292
+ * When the source file is missing, a built-in "Page not found" page is
1293
+ * written instead. The page is omitted from the search index and sitemap.
1294
+ *
1295
+ * @default false
1296
+ */
1297
+ notFound?: boolean | NotFoundOptions;
1298
+ /**
1299
+ * Render a static members card grid on pages with `layout: team`.
1300
+ *
1301
+ * Off by default. `true` enables an empty list. An object enables the
1302
+ * feature and supplies `members`. When the option is off, `layout: team`
1303
+ * is ignored and the page stays ordinary.
1304
+ *
1305
+ * @default false
1306
+ */
1307
+ team?: boolean | TeamOptions;
1308
+ /**
1309
+ * Opt-in blog index, authors, tags, reading time, and archive.
1310
+ *
1311
+ * Off by default. `true` enables defaults. An object enables the feature
1312
+ * and overrides only the fields you set. Top-level `blog` wins when both
1313
+ * are set.
1314
+ *
1315
+ * @default false
1316
+ */
1317
+ blog?: boolean | BlogOptions;
1318
+ /**
1319
+ * Generate a static index for directories that have child pages but no
1320
+ * `index.md` / `index.mdx`.
1321
+ *
1322
+ * Off by default. `true` enables card listings. An object enables the
1323
+ * feature and can switch the listing to `list`. Existing content indexes
1324
+ * are never overwritten.
1325
+ *
1326
+ * @default false
1327
+ */
1328
+ sectionIndex?: boolean | SectionIndexOptions;
1101
1329
  /**
1102
1330
  * Absolute site URL used when generating social metadata.
1103
1331
  *
@@ -1139,6 +1367,97 @@ interface SsgOptions {
1139
1367
  */
1140
1368
  navigation?: SsgNavigationGroup[];
1141
1369
  }
1370
+ /**
1371
+ * Per-control flags for `ssg.readerChrome`.
1372
+ *
1373
+ * Omitted fields stay on when the feature itself is enabled.
1374
+ */
1375
+ interface ReaderChromeOptions {
1376
+ /**
1377
+ * Copy button on fenced code blocks. The clipboard is read in the browser,
1378
+ * never at build time.
1379
+ *
1380
+ * @default true
1381
+ */
1382
+ copy?: boolean;
1383
+ /**
1384
+ * Icon and `rel="noopener noreferrer"` on outbound `http(s)` links.
1385
+ * Relative, hash, and same-document links are left alone.
1386
+ *
1387
+ * @default true
1388
+ */
1389
+ externalLinks?: boolean;
1390
+ /**
1391
+ * Back-to-top control that appears after the page is scrolled.
1392
+ *
1393
+ * @default true
1394
+ */
1395
+ backToTop?: boolean;
1396
+ }
1397
+ /**
1398
+ * Resolved reader chrome. `false` means no extra markup or JS.
1399
+ */
1400
+ type ResolvedReaderChrome = false | {
1401
+ copy: boolean;
1402
+ externalLinks: boolean;
1403
+ backToTop: boolean;
1404
+ };
1405
+ /**
1406
+ * Per-control flags for `ssg.a11y`.
1407
+ *
1408
+ * Omitted fields keep the defaults when the feature itself is enabled.
1409
+ */
1410
+ interface A11yOptions {
1411
+ /**
1412
+ * Visible label for the skip link. Escaped in HTML.
1413
+ *
1414
+ * @default "Skip to content"
1415
+ */
1416
+ skipLinkLabel?: string;
1417
+ }
1418
+ /**
1419
+ * Resolved skip-link / print styles. `false` means no extra markup or CSS.
1420
+ */
1421
+ type ResolvedA11y = false | {
1422
+ skipLinkLabel: string;
1423
+ };
1424
+ /**
1425
+ * Per-control flags for `ssg.jsonLd`.
1426
+ *
1427
+ * Omitted fields keep the defaults when the feature itself is enabled.
1428
+ */
1429
+ interface JsonLdOptions {
1430
+ /**
1431
+ * Emit `BreadcrumbList` when a visible breadcrumb trail exists.
1432
+ *
1433
+ * @default true
1434
+ */
1435
+ breadcrumbs?: boolean;
1436
+ /**
1437
+ * Optional publisher. Only configured `name` / `url` are written.
1438
+ * Logo and other Organization fields are never invented.
1439
+ */
1440
+ publisher?: JsonLdPublisherOptions;
1441
+ }
1442
+ /**
1443
+ * Optional JSON-LD publisher. Empty or omitted fields are left out.
1444
+ */
1445
+ interface JsonLdPublisherOptions {
1446
+ /** Organization name. */
1447
+ name?: string;
1448
+ /** Organization URL. `javascript:` and other unsafe schemes are dropped. */
1449
+ url?: string;
1450
+ }
1451
+ /**
1452
+ * Resolved JSON-LD options. `false` means no `<script type="application/ld+json">`.
1453
+ */
1454
+ type ResolvedJsonLd = false | {
1455
+ breadcrumbs: boolean;
1456
+ publisher?: {
1457
+ name?: string;
1458
+ url?: string;
1459
+ };
1460
+ };
1142
1461
  /**
1143
1462
  * Resolved SSG options.
1144
1463
  */
@@ -1156,123 +1475,711 @@ interface ResolvedSsgOptions {
1156
1475
  ogImage?: string;
1157
1476
  generateOgImage: boolean;
1158
1477
  lastUpdated: boolean;
1478
+ /**
1479
+ * Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
1480
+ */
1481
+ contributors?: ResolvedContributors;
1482
+ pagination: boolean;
1483
+ breadcrumbs: boolean;
1484
+ jsonLd: ResolvedJsonLd;
1485
+ readerChrome: ResolvedReaderChrome;
1486
+ localeSwitcher: boolean;
1487
+ a11y: ResolvedA11y;
1488
+ pageChrome: boolean;
1489
+ /**
1490
+ * Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
1491
+ */
1492
+ notFound?: ResolvedNotFoundOptions;
1493
+ /**
1494
+ * Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
1495
+ */
1496
+ team?: ResolvedTeamOptions;
1497
+ /**
1498
+ * Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
1499
+ */
1500
+ blog?: ResolvedBlogOptions;
1501
+ sectionIndex?: ResolvedSectionIndexOptions;
1159
1502
  siteUrl?: string;
1160
1503
  theme?: ResolvedThemeConfig;
1161
1504
  navigation?: SsgNavigationGroup[];
1162
1505
  }
1163
1506
  /**
1164
- * Options for the core `oxContent()` Vite plugin.
1165
- *
1166
- * The top-level options describe where content lives, which Markdown features
1167
- * are enabled, and which build-time features should run. Feature toggles that
1168
- * accept `boolean | Options` follow the same convention:
1169
- *
1170
- * - `false` disables the feature.
1171
- * - `true` enables the feature with its documented defaults.
1172
- * - an object enables the feature and overrides only the provided fields.
1507
+ * Opt-in custom 404 page written during SSG.
1173
1508
  */
1174
- interface OxContentOptions {
1509
+ interface NotFoundOptions {
1175
1510
  /**
1176
- * Directory containing Markdown source files.
1177
- *
1178
- * The path is resolved from the Vite project root. SSG, search indexing, and
1179
- * dev-server routing all use this directory as the content root.
1180
- *
1181
- * @default 'content'
1511
+ * Markdown source relative to `srcDir`.
1512
+ * @default "404.md"
1182
1513
  */
1183
- srcDir?: string;
1514
+ source?: string;
1184
1515
  /**
1185
- * Directory where generated files are written.
1186
- *
1187
- * SSG HTML, search indexes, and generated assets are emitted under this
1188
- * directory during production builds.
1189
- *
1190
- * @default 'dist'
1516
+ * Output file relative to `outDir`.
1517
+ * @default "404.html"
1191
1518
  */
1192
- outDir?: string;
1519
+ output?: string;
1520
+ }
1521
+ /**
1522
+ * Resolved custom 404 options.
1523
+ */
1524
+ interface ResolvedNotFoundOptions {
1525
+ enabled: boolean;
1526
+ source: string;
1527
+ output: string;
1528
+ }
1529
+ /**
1530
+ * One link on a team member card.
1531
+ */
1532
+ interface TeamLink {
1533
+ /** Visible label. Escaped in HTML. */
1534
+ label: string;
1535
+ /** Destination. Only `https:` or a site-relative `/` path is emitted. */
1536
+ href: string;
1537
+ }
1538
+ /**
1539
+ * One person on the team page.
1540
+ */
1541
+ interface TeamMember {
1542
+ /** Display name. Escaped in HTML. */
1543
+ name: string;
1544
+ /** Optional role or title. Escaped in HTML. */
1545
+ role?: string;
1546
+ /** Avatar URL. Only `https:` or a site-relative `/` path is emitted. */
1547
+ avatar?: string;
1548
+ /** Optional profile or social links. */
1549
+ links?: TeamLink[];
1550
+ }
1551
+ /**
1552
+ * Opt-in team / members page.
1553
+ */
1554
+ /**
1555
+ * Opt-in git contributor list.
1556
+ */
1557
+ interface ContributorsOptions {
1193
1558
  /**
1194
- * Base path prepended to generated internal URLs.
1195
- *
1196
- * Use this when the site is deployed below a sub-path, such as GitHub Pages or
1197
- * a documentation route inside a larger application.
1198
- *
1199
- * @default '/'
1559
+ * Author names or emails to omit. Comparison is case-insensitive and
1560
+ * matches the full name or the full email.
1200
1561
  */
1201
- base?: string;
1562
+ ignore?: string[];
1202
1563
  /**
1203
- * Markdown-like file extensions to process.
1204
- *
1205
- * Extensions are normalized with a leading dot and matched case-insensitively.
1206
- * Add custom extensions when another authoring format is compiled to Markdown
1207
- * before ox-content sees it.
1208
- *
1209
- * @default ['.md', '.markdown', '.mdx']
1564
+ * When true and a git author email is present, render a Gravatar
1565
+ * image from the MD5 of that email. The raw email is never written
1566
+ * into HTML. Default is names only.
1210
1567
  */
1211
- extensions?: string[];
1568
+ avatars?: boolean;
1569
+ }
1570
+ /**
1571
+ * Resolved git contributor list. `false` means the feature is off.
1572
+ */
1573
+ type ResolvedContributors = false | {
1574
+ ignore: string[];
1575
+ avatars: boolean;
1576
+ };
1577
+ interface TeamOptions {
1212
1578
  /**
1213
- * Static Site Generation options.
1214
- *
1215
- * Passing `true` or omitting this option enables SSG with defaults. Passing
1216
- * `false` disables the SSG plugin while still allowing Markdown module
1217
- * transforms to run.
1218
- *
1219
- * @default { enabled: true }
1579
+ * People rendered as static cards on `layout: team` pages.
1580
+ * @default []
1220
1581
  */
1221
- ssg?: SsgOptions | boolean;
1582
+ members?: TeamMember[];
1583
+ }
1584
+ /**
1585
+ * Resolved team page options.
1586
+ */
1587
+ interface ResolvedTeamOptions {
1588
+ enabled: boolean;
1589
+ members: TeamMember[];
1590
+ }
1591
+ /**
1592
+ * Listing style for a generated section index.
1593
+ */
1594
+ type SectionIndexStyle = "list" | "cards";
1595
+ /**
1596
+ * Opt-in generated section index pages.
1597
+ */
1598
+ interface SectionIndexOptions {
1222
1599
  /**
1223
- * Enable GitHub Flavored Markdown extensions.
1224
- * @default true
1600
+ * How children are rendered. `cards` is the default when the feature is on.
1601
+ * @default "cards"
1225
1602
  */
1226
- gfm?: boolean;
1603
+ style?: SectionIndexStyle;
1604
+ }
1605
+ /**
1606
+ * Resolved generated section index options.
1607
+ */
1608
+ interface ResolvedSectionIndexOptions {
1609
+ enabled: boolean;
1610
+ style: SectionIndexStyle;
1611
+ }
1612
+ /**
1613
+ * Opt-in web app manifest and service worker written during SSG.
1614
+ *
1615
+ * Enabling `offline` (the default when the feature is on) injects a tiny
1616
+ * client script that registers `sw.js`. Set `offline: false` to keep the
1617
+ * manifest without that script.
1618
+ */
1619
+ interface PwaOptions {
1227
1620
  /**
1228
- * Enable footnotes.
1621
+ * Write `sw.js` and register it from themed pages.
1229
1622
  * @default true
1230
1623
  */
1231
- footnotes?: boolean;
1624
+ offline?: boolean;
1232
1625
  /**
1233
- * Enable tables.
1234
- * @default true
1626
+ * Manifest `name`. Falls back to `ssg.siteName` when omitted.
1235
1627
  */
1236
- tables?: boolean;
1628
+ name?: string;
1237
1629
  /**
1238
- * Enable task lists.
1239
- * @default true
1630
+ * Manifest `short_name`. Falls back to `name` when omitted.
1240
1631
  */
1241
- taskLists?: boolean;
1632
+ shortName?: string;
1242
1633
  /**
1243
- * Enable strikethrough.
1244
- * @default true
1634
+ * Manifest / meta theme color. Hex (`#rgb` / `#rrggbb`) or a CSS color name.
1635
+ * @default "#000000"
1245
1636
  */
1246
- strikethrough?: boolean;
1637
+ themeColor?: string;
1247
1638
  /**
1248
- * Enable GFM autolinks and linkify bare URLs.
1249
- * @default true
1639
+ * Manifest background color. Hex or a CSS color name.
1640
+ * @default "#ffffff"
1250
1641
  */
1251
- autolinks?: boolean;
1642
+ backgroundColor?: string;
1252
1643
  /**
1253
- * Enable syntax highlighting for code blocks.
1644
+ * Manifest `start_url`. Same-origin site paths only (`/`, `/docs/`).
1645
+ * Defaults to the Vite `base`.
1646
+ */
1647
+ startUrl?: string;
1648
+ }
1649
+ /**
1650
+ * Resolved PWA options.
1651
+ */
1652
+ interface ResolvedPwaOptions {
1653
+ enabled: boolean;
1654
+ offline: boolean;
1655
+ name?: string;
1656
+ shortName?: string;
1657
+ themeColor?: string;
1658
+ backgroundColor?: string;
1659
+ startUrl?: string;
1660
+ }
1661
+ /**
1662
+ * Opt-in crawl manifests written during SSG.
1663
+ */
1664
+ interface SiteMapsOptions {
1665
+ /**
1666
+ * Write `robots.txt` with a Sitemap line.
1667
+ * @default true
1668
+ */
1669
+ robots?: boolean;
1670
+ /**
1671
+ * Write `llms.txt` with the site title, description, and page URLs.
1672
+ * @default true
1673
+ */
1674
+ llms?: boolean;
1675
+ }
1676
+ /**
1677
+ * Resolved crawl-manifest options.
1678
+ */
1679
+ interface ResolvedSiteMapsOptions {
1680
+ enabled: boolean;
1681
+ robots: boolean;
1682
+ llms: boolean;
1683
+ }
1684
+ /**
1685
+ * Opt-in draft / unlisted / scheduled page filtering.
1686
+ */
1687
+ interface PublishStateOptions {
1688
+ /**
1689
+ * When `false`, frontmatter publish fields are ignored.
1690
+ * @default true when the option is an object
1691
+ */
1692
+ enabled?: boolean;
1693
+ /**
1694
+ * Injected ISO-8601 clock compared against `scheduled`, `date`, and `expiry`.
1695
+ * Invalid values fall back to the system clock.
1696
+ */
1697
+ now?: string;
1698
+ /**
1699
+ * Keep draft and not-yet-scheduled pages in output. The dev server sets this.
1254
1700
  * @default false
1255
1701
  */
1256
- highlight?: boolean;
1702
+ includeDrafts?: boolean;
1703
+ }
1704
+ /**
1705
+ * Resolved publish-state options.
1706
+ */
1707
+ interface ResolvedPublishStateOptions {
1708
+ enabled: boolean;
1709
+ now?: string;
1710
+ includeDrafts: boolean;
1711
+ }
1712
+ /**
1713
+ * Opt-in frontmatter `permalink` / `slug` routing.
1714
+ *
1715
+ * `false` or omitted stays off. `true` or `{}` enables defaults.
1716
+ * Set `enabled: false` on the object to turn the feature back off.
1717
+ */
1718
+ interface PermalinksOptions {
1719
+ /**
1720
+ * Enable permalink / slug routing.
1721
+ * @default true
1722
+ */
1723
+ enabled?: boolean;
1724
+ }
1725
+ /**
1726
+ * Resolved permalink options.
1727
+ */
1728
+ interface ResolvedPermalinksOptions {
1729
+ enabled: boolean;
1730
+ }
1731
+ /**
1732
+ * Opt-in `_index` directory frontmatter cascade.
1733
+ *
1734
+ * `false` or omitted stays off. `true` or `{}` enables defaults.
1735
+ * Set `enabled: false` on the object to turn the feature back off.
1736
+ */
1737
+ interface CascadeOptions {
1738
+ /**
1739
+ * Enable directory-level frontmatter inheritance.
1740
+ * @default true
1741
+ */
1742
+ enabled?: boolean;
1743
+ }
1744
+ /**
1745
+ * Resolved cascade options.
1746
+ */
1747
+ interface ResolvedCascadeOptions {
1748
+ enabled: boolean;
1749
+ }
1750
+ /**
1751
+ * Opt-in static redirects, aliases, and path rewrites.
1752
+ *
1753
+ * A path map such as `{ "/old-guide": "/guide" }` is also accepted in place
1754
+ * of this object and enables the feature with that map.
1755
+ */
1756
+ interface RedirectsOptions {
1757
+ /**
1758
+ * Old path to new path. Destinations must be same-origin (`/` but not `//`)
1759
+ * unless `allowExternal` is set.
1760
+ * @default {}
1761
+ */
1762
+ map?: Record<string, string>;
1763
+ /**
1764
+ * Write a Netlify / Cloudflare `_redirects` file next to the HTML pages.
1765
+ * @default false
1766
+ */
1767
+ netlify?: boolean;
1768
+ /**
1769
+ * Write a `_headers` Location map next to the HTML pages.
1770
+ * @default false
1771
+ */
1772
+ headers?: boolean;
1773
+ /**
1774
+ * Write a machine-readable `redirects.json` map.
1775
+ * @default false
1776
+ */
1777
+ json?: boolean;
1778
+ /**
1779
+ * Allow `http://` and `https://` destinations. `javascript:`, `data:`, and
1780
+ * protocol-relative `//` targets stay rejected.
1781
+ * @default false
1782
+ */
1783
+ allowExternal?: boolean;
1784
+ }
1785
+ /**
1786
+ * Resolved redirect options.
1787
+ */
1788
+ interface ResolvedRedirectsOptions {
1789
+ enabled: boolean;
1790
+ map: Record<string, string>;
1791
+ netlify: boolean;
1792
+ headers: boolean;
1793
+ json: boolean;
1794
+ allowExternal: boolean;
1795
+ }
1796
+ /**
1797
+ * Feed file formats written during SSG.
1798
+ */
1799
+ type FeedFormat = "rss" | "atom" | "json";
1800
+ /**
1801
+ * Opt-in RSS / Atom / JSON Feed files written during SSG.
1802
+ */
1803
+ interface FeedsOptions {
1804
+ /**
1805
+ * Feed formats to write.
1806
+ * @default ["rss", "atom", "json"]
1807
+ */
1808
+ formats?: FeedFormat[];
1809
+ /**
1810
+ * Named collection to publish. Defaults to `content`, or the first
1811
+ * configured collection when `content` is absent.
1812
+ */
1813
+ collection?: string;
1814
+ /**
1815
+ * Maximum number of published items, newest first.
1816
+ * @default 20
1817
+ */
1818
+ limit?: number;
1819
+ /**
1820
+ * Site-relative directory for the generated files.
1821
+ * @default "/"
1822
+ */
1823
+ path?: string;
1824
+ }
1825
+ /**
1826
+ * Resolved feed options.
1827
+ */
1828
+ interface ResolvedFeedsOptions {
1829
+ enabled: boolean;
1830
+ formats: FeedFormat[];
1831
+ collection?: string;
1832
+ limit: number;
1833
+ path: string;
1834
+ }
1835
+ /**
1836
+ * One person in the `blog.authors` map.
1837
+ */
1838
+ interface BlogAuthor {
1839
+ /** Display name. Escaped in HTML. */
1840
+ name: string;
1841
+ /** Optional short bio. Escaped in HTML. */
1842
+ bio?: string;
1843
+ /** Profile URL. Only `https:` or a site-relative `/` path is emitted. */
1844
+ url?: string;
1845
+ }
1846
+ /**
1847
+ * Opt-in blog index, authors, tags, reading time, and archive.
1848
+ */
1849
+ interface BlogOptions {
1850
+ /**
1851
+ * Named collection of posts. Defaults to a collection named `blog`, or
1852
+ * the only configured collection. Required when several collections exist
1853
+ * and none is named `blog`.
1854
+ */
1855
+ collection?: string;
1856
+ /**
1857
+ * Author records keyed by the frontmatter `author` / `authors` value.
1858
+ * @default {}
1859
+ */
1860
+ authors?: Record<string, BlogAuthor>;
1861
+ /**
1862
+ * Posts per index page, newest first.
1863
+ * @default 10
1864
+ */
1865
+ pageSize?: number;
1866
+ }
1867
+ /**
1868
+ * Resolved blog options.
1869
+ */
1870
+ interface ResolvedBlogOptions {
1871
+ enabled: boolean;
1872
+ collection?: string;
1873
+ authors: Record<string, BlogAuthor>;
1874
+ pageSize: number;
1875
+ }
1876
+ /**
1877
+ * Opt-in term list pages, per-term pages, and related-page lists.
1878
+ */
1879
+ interface TaxonomiesOptions {
1880
+ /**
1881
+ * Frontmatter keys (and URL prefixes) to read terms from.
1882
+ * @default ["tags", "categories"]
1883
+ */
1884
+ taxonomies?: string[];
1257
1885
  /**
1258
- * Syntax highlighting theme.
1886
+ * Maximum related pages injected into a source page.
1887
+ * @default 5
1888
+ */
1889
+ relatedLimit?: number;
1890
+ }
1891
+ /**
1892
+ * Resolved taxonomy options.
1893
+ */
1894
+ interface ResolvedTaxonomiesOptions {
1895
+ enabled: boolean;
1896
+ taxonomies: string[];
1897
+ relatedLimit: number;
1898
+ }
1899
+ /** Banner shown on pages that belong to one documented version. */
1900
+ type VersionBannerKind = "unreleased" | "unmaintained";
1901
+ /**
1902
+ * One published or snapshot version of a docs tree.
1903
+ */
1904
+ interface VersionEntry {
1905
+ /** Stable id used as `versions.current`. */
1906
+ id: string;
1907
+ /** Header label. Escaped before it is rendered. */
1908
+ label: string;
1909
+ /**
1910
+ * URL prefix without slashes (`"2.90"`, `"next"`). Empty string is the
1911
+ * site root.
1912
+ */
1913
+ prefix: string;
1914
+ /**
1915
+ * Snapshot directory relative to the Vite root. Omitted entries use the
1916
+ * live `srcDir` and are not copied. Historical dirs are read-only.
1917
+ */
1918
+ dir?: string;
1919
+ /** Optional status banner for pages in this version. */
1920
+ banner?: VersionBannerKind | false;
1921
+ }
1922
+ /**
1923
+ * Opt-in documentation versioning.
1924
+ *
1925
+ * Off by default. `true` enables a single current entry. An object enables
1926
+ * the feature and overrides only the fields you set.
1927
+ */
1928
+ interface VersionsOptions {
1929
+ /** Id of the live tree being built from `srcDir`. */
1930
+ current?: string;
1931
+ /** Render the header version dropdown. @default true */
1932
+ switcher?: boolean;
1933
+ /** Show unreleased / unmaintained badges in the dropdown. @default true */
1934
+ badge?: boolean;
1935
+ /** Declared versions. Historical snapshots must set `dir`. */
1936
+ entries?: VersionEntry[];
1937
+ }
1938
+ /**
1939
+ * Resolved documentation versioning.
1940
+ */
1941
+ interface ResolvedVersionsOptions {
1942
+ enabled: boolean;
1943
+ current: string;
1944
+ switcher: boolean;
1945
+ badge: boolean;
1946
+ entries: ResolvedVersionEntry[];
1947
+ }
1948
+ /**
1949
+ * One resolved version after prefix and banner sanitization.
1950
+ */
1951
+ interface ResolvedVersionEntry {
1952
+ id: string;
1953
+ label: string;
1954
+ prefix: string;
1955
+ dir?: string;
1956
+ banner: VersionBannerKind | false;
1957
+ }
1958
+ /**
1959
+ * Options for the core `oxContent()` Vite plugin.
1960
+ *
1961
+ * The top-level options describe where content lives, which Markdown features
1962
+ * are enabled, and which build-time features should run. Feature toggles that
1963
+ * accept `boolean | Options` follow the same convention:
1964
+ *
1965
+ * - `false` disables the feature.
1966
+ * - `true` enables the feature with its documented defaults.
1967
+ * - an object enables the feature and overrides only the provided fields.
1968
+ */
1969
+ interface OxContentOptions {
1970
+ /**
1971
+ * Directory containing Markdown source files.
1259
1972
  *
1260
- * Defaults to `'css-variables'`, which renders token colors as `--octc-shiki-*`
1261
- * custom properties so highlighting follows the active color scheme in both
1262
- * light and dark from one build. Without a `@ox-content/theme-color-*`
1263
- * package installed the properties fall back to GitHub Dark. Pass any bundled
1264
- * Shiki theme name to opt out and bake fixed colors in instead.
1973
+ * The path is resolved from the Vite project root. SSG, search indexing, and
1974
+ * dev-server routing all use this directory as the content root.
1265
1975
  *
1266
- * @default 'css-variables'
1976
+ * @default 'content'
1267
1977
  */
1268
- highlightTheme?: string | ThemeRegistration$1;
1978
+ srcDir?: string;
1269
1979
  /**
1270
- * Additional languages for syntax highlighting.
1271
- * Accepts Shiki LanguageRegistration objects (e.g., TextMate grammars).
1272
- * These are loaded alongside the built-in languages.
1273
- * @default []
1980
+ * Directory where generated files are written.
1981
+ *
1982
+ * SSG HTML, search indexes, and generated assets are emitted under this
1983
+ * directory during production builds.
1984
+ *
1985
+ * @default 'dist'
1986
+ */
1987
+ outDir?: string;
1988
+ /**
1989
+ * Base path prepended to generated internal URLs.
1990
+ *
1991
+ * Use this when the site is deployed below a sub-path, such as GitHub Pages or
1992
+ * a documentation route inside a larger application.
1993
+ *
1994
+ * @default '/'
1995
+ */
1996
+ base?: string;
1997
+ /**
1998
+ * Markdown-like file extensions to process.
1999
+ *
2000
+ * Extensions are normalized with a leading dot and matched case-insensitively.
2001
+ * Add custom extensions when another authoring format is compiled to Markdown
2002
+ * before ox-content sees it.
2003
+ *
2004
+ * @default ['.md', '.markdown', '.mdx']
2005
+ */
2006
+ extensions?: string[];
2007
+ /**
2008
+ * Static Site Generation options.
2009
+ *
2010
+ * Passing `true` or omitting this option enables SSG with defaults. Passing
2011
+ * `false` disables the SSG plugin while still allowing Markdown module
2012
+ * transforms to run.
2013
+ *
2014
+ * @default { enabled: true }
2015
+ */
2016
+ ssg?: SsgOptions | boolean;
2017
+ /**
2018
+ * Write crawl manifests next to generated HTML.
2019
+ *
2020
+ * Off by default. `true` writes `sitemap.xml`, `robots.txt`, and `llms.txt`.
2021
+ * An object enables the feature and overrides only the fields you set.
2022
+ * Requires `ssg.siteUrl`. When that is missing the build continues and a
2023
+ * warning is emitted instead of writing files.
2024
+ *
2025
+ * @default false
1274
2026
  */
1275
- highlightLangs?: LanguageRegistration$1[];
2027
+ siteMaps?: boolean | SiteMapsOptions;
2028
+ /**
2029
+ * Honor frontmatter draft / unlisted / scheduled publish states.
2030
+ *
2031
+ * Off by default. `true` omits drafts and future-scheduled pages from
2032
+ * production HTML, search, and sitemaps. Unlisted pages still build and
2033
+ * remain reachable by URL. An object enables the feature and can inject
2034
+ * `now` for a deterministic build-time clock.
2035
+ *
2036
+ * @default false
2037
+ */
2038
+ publishState?: boolean | PublishStateOptions;
2039
+ /**
2040
+ * Honor frontmatter `permalink` / `slug` when resolving page URLs.
2041
+ *
2042
+ * Off by default. `true` or `{}` replaces the file-tree URL with
2043
+ * `permalink`, or the last path segment with `slug`. Path escape
2044
+ * (`../`, absolute filesystem paths, `javascript:`, protocol-relative
2045
+ * `//`) is rejected and the file-tree URL is kept. Two pages that
2046
+ * resolve to the same URL produce an error; the first page is kept and
2047
+ * the later page is skipped.
2048
+ *
2049
+ * @default false
2050
+ */
2051
+ permalinks?: boolean | PermalinksOptions;
2052
+ /**
2053
+ * Inherit missing frontmatter keys from ancestor `_index` files.
2054
+ *
2055
+ * Off by default. `true` or `{}` fills keys a child does not set.
2056
+ * `permalink` and `slug` are never inherited.
2057
+ *
2058
+ * @default false
2059
+ */
2060
+ cascade?: boolean | CascadeOptions;
2061
+ /**
2062
+ * Write static HTML redirect pages for frontmatter aliases and a config map.
2063
+ *
2064
+ * Off by default. `true` or `{}` enables empty defaults. A path map such as
2065
+ * `{ "/old-guide": "/guide" }` enables the feature with that map. Destinations
2066
+ * must be same-origin paths (`/` but not `//`) unless `allowExternal` is set.
2067
+ * `javascript:`, `data:`, and protocol-relative URLs are ignored.
2068
+ * Overlapping sources last-win after trailing slashes are folded.
2069
+ *
2070
+ * @default false
2071
+ */
2072
+ redirects?: boolean | RedirectsOptions | Record<string, string>;
2073
+ /**
2074
+ * Write a paginated blog index, tag pages, and yearly/monthly archive,
2075
+ * and inject author / reading-time chrome on posts.
2076
+ *
2077
+ * Off by default. `true` uses the `blog` collection when it exists,
2078
+ * otherwise the only configured collection, with pageSize 10.
2079
+ * An object enables the feature and overrides only the fields you set.
2080
+ * Also accepted as `ssg.blog`; the top-level option wins when both are set.
2081
+ *
2082
+ * @default false
2083
+ */
2084
+ blog?: boolean | BlogOptions;
2085
+ /**
2086
+ * Write RSS, Atom, and/or JSON Feed files from a named collection.
2087
+ *
2088
+ * Off by default. `true` writes all three formats from the `content`
2089
+ * collection (or the first configured collection) with a 20-item limit.
2090
+ * An object enables the feature and overrides only the fields you set.
2091
+ * Requires `ssg.siteUrl`. When that is missing the build continues and a
2092
+ * warning is emitted instead of writing files.
2093
+ *
2094
+ * @default false
2095
+ */
2096
+ feeds?: boolean | FeedsOptions;
2097
+ /**
2098
+ * Write a web app manifest and an optional service worker.
2099
+ *
2100
+ * Off by default. `true` writes `manifest.webmanifest` and `sw.js`, and
2101
+ * injects a tiny client script that registers the worker on themed pages.
2102
+ * An object enables the feature and can set `offline: false` to keep the
2103
+ * manifest without caching or that script. This adds client JavaScript
2104
+ * when offline is on. Requires `ssg.siteUrl`. When that is missing the
2105
+ * build continues and a warning is emitted instead of writing files.
2106
+ *
2107
+ * @default false
2108
+ */
2109
+ pwa?: boolean | PwaOptions;
2110
+ /**
2111
+ * Write tag/category term pages and inject related-page lists.
2112
+ *
2113
+ * Off by default. `true` reads frontmatter `tags` and `categories` and
2114
+ * writes list pages, per-term pages, and up to 5 related links on pages
2115
+ * that share a term. An object enables the feature and overrides only
2116
+ * the fields you set. Term slugs are `[a-z0-9-]` and every label is
2117
+ * HTML-escaped.
2118
+ *
2119
+ * @default false
2120
+ */
2121
+ taxonomies?: boolean | TaxonomiesOptions;
2122
+ /**
2123
+ * Prefix live docs, emit frozen snapshot trees, and render a header
2124
+ * version dropdown.
2125
+ *
2126
+ * Off by default. `true` enables a single current entry. An object
2127
+ * enables the feature and lists additional versions. Historical
2128
+ * snapshot directories are read, never rewritten.
2129
+ *
2130
+ * @default false
2131
+ */
2132
+ versions?: boolean | VersionsOptions;
2133
+ /**
2134
+ * Enable GitHub Flavored Markdown extensions.
2135
+ * @default true
2136
+ */
2137
+ gfm?: boolean;
2138
+ /**
2139
+ * Enable MDX JSX, ESM, and expressions.
2140
+ *
2141
+ * When omitted, MDX is enabled for `.mdx` files only. Set `true` to enable
2142
+ * it for every configured extension or `false` to keep `.mdx` on the plain
2143
+ * Markdown path.
2144
+ * @default inferred from the source extension
2145
+ */
2146
+ mdx?: boolean;
2147
+ /**
2148
+ * Enable footnotes.
2149
+ * @default true
2150
+ */
2151
+ footnotes?: boolean;
2152
+ /**
2153
+ * Enable tables.
2154
+ * @default true
2155
+ */
2156
+ tables?: boolean;
2157
+ /**
2158
+ * Enable task lists.
2159
+ * @default true
2160
+ */
2161
+ taskLists?: boolean;
2162
+ /**
2163
+ * Enable strikethrough.
2164
+ * @default true
2165
+ */
2166
+ strikethrough?: boolean;
2167
+ /**
2168
+ * Enable GFM autolinks and linkify bare URLs.
2169
+ * @default true
2170
+ */
2171
+ autolinks?: boolean;
2172
+ /**
2173
+ * Enable syntax highlighting for code blocks.
2174
+ *
2175
+ * When true, fenced and language-tagged inline code is highlighted with the
2176
+ * native tree-sitter engine. Token colors are `--octc-shiki-*` custom
2177
+ * properties (the `shiki` prefix is historical) so theme-color packages keep
2178
+ * working. Languages with no native grammar stay unhighlighted.
2179
+ *
2180
+ * @default false
2181
+ */
2182
+ highlight?: boolean;
1276
2183
  /**
1277
2184
  * Code block line annotations for fenced code blocks.
1278
2185
  *
@@ -1318,6 +2225,51 @@ interface OxContentOptions {
1318
2225
  * @default false
1319
2226
  */
1320
2227
  attrs?: boolean | AttrsOptions;
2228
+ /**
2229
+ * Opt-in `{badge:variant}` inline badges.
2230
+ *
2231
+ * Passing `true` or an options object enables the built-in variants.
2232
+ * Badge text is HTML-escaped. Fenced, indented, and inline code are skipped.
2233
+ *
2234
+ * @default false
2235
+ */
2236
+ badges?: boolean | BadgeOptions;
2237
+ /**
2238
+ * Opt-in `::: tip` custom containers.
2239
+ *
2240
+ * GitHub-style `> [!NOTE]` callouts stay available without this option.
2241
+ * Passing `true` enables the built-in types. Pass an object to register extra
2242
+ * types or override titles.
2243
+ *
2244
+ * @default false
2245
+ */
2246
+ containers?: boolean | ContainerOptions;
2247
+ /**
2248
+ * Opt-in figures, captions, and lazy-loaded images.
2249
+ *
2250
+ * Title text becomes a `<figcaption>`. Optional `{width=N height=M}` on the
2251
+ * image is consumed by this feature and does not require `attrs`. Passing
2252
+ * `true` or `{}` enables defaults (`lazy: true`).
2253
+ *
2254
+ * @default false
2255
+ */
2256
+ images?: boolean | ImageOptions;
2257
+ /**
2258
+ * Opt-in page-bundle resources and build-time image processing.
2259
+ *
2260
+ * Off by default. `true` or `{}` treats each page directory as a bundle:
2261
+ * sibling images are addressable with relative URLs. Query-string
2262
+ * resize/crop/format transforms run at build time and are cached by
2263
+ * source mtime plus transform params. Paths that leave the page
2264
+ * directory or `srcDir` are rejected. Missing sources fail the build
2265
+ * when `missing` is `"error"` (the default when enabled).
2266
+ *
2267
+ * This is separate from `images`, which only adds figures, captions,
2268
+ * and lazy-loading.
2269
+ *
2270
+ * @default false
2271
+ */
2272
+ resources?: boolean | ResourcesOptions;
1321
2273
  /**
1322
2274
  * Import source snippets into fences with `<<< @/path/to/file.ts{region}`.
1323
2275
  *
@@ -1328,6 +2280,45 @@ interface OxContentOptions {
1328
2280
  * @default false
1329
2281
  */
1330
2282
  codeImports?: boolean | CodeImportOptions;
2283
+ /**
2284
+ * Inline another Markdown file with `<!-- @include: ./path.md -->`.
2285
+ *
2286
+ * Expansion happens before Markdown is parsed, so included headings and
2287
+ * lists become part of the host document. Relative paths resolve from the
2288
+ * current file. `@/` and `/` resolve from `rootDir`. Paths outside
2289
+ * `rootDir` are rejected and reported as transform errors.
2290
+ *
2291
+ * @default false
2292
+ */
2293
+ includes?: boolean | IncludeOptions;
2294
+ /**
2295
+ * Opt-in `::: card` / `::: link-card` / `::: card-grid` blocks.
2296
+ *
2297
+ * Passing `true` enables the defaults. Pass an object to keep the option
2298
+ * shape while overriding `enabled`.
2299
+ *
2300
+ * @default false
2301
+ */
2302
+ cards?: boolean | CardOptions;
2303
+ /**
2304
+ * Restyle a `::: steps` wrapper around an ordered list.
2305
+ *
2306
+ * Disabled when omitted or `false`. `true` and `{}` enable the default
2307
+ * step-list markup. Ordinary ordered lists outside `::: steps` are unchanged.
2308
+ *
2309
+ * @default false
2310
+ */
2311
+ steps?: boolean | StepsOptions;
2312
+ /**
2313
+ * Opt-in static directory trees from `file-tree` fences.
2314
+ *
2315
+ * Passing `true` or `{}` enables the transform. Names are escaped and never
2316
+ * read from the filesystem. Directories with children open and close with
2317
+ * `<details>`. Icons are on by default and can be replaced from site config.
2318
+ *
2319
+ * @default false
2320
+ */
2321
+ fileTree?: boolean | FileTreeOptions;
1331
2322
  /**
1332
2323
  * Sanitize rendered HTML with safe defaults or explicit allow lists.
1333
2324
  *
@@ -1374,6 +2365,16 @@ interface OxContentOptions {
1374
2365
  * @default false
1375
2366
  */
1376
2367
  codeBlockTypecheck?: boolean | CodeBlockTypecheckOptions;
2368
+ /**
2369
+ * Attach build-time TypeScript hover overlays to opted-in fences.
2370
+ *
2371
+ * Off by default. `true` or `{}` enables the feature. Only `ts` / `tsx`
2372
+ * fences tagged `twoslash` receive payloads. Types are generated during
2373
+ * the Markdown transform; no TypeScript compiler is shipped to the browser.
2374
+ *
2375
+ * @default false
2376
+ */
2377
+ typedHover?: boolean | TypedHoverOptions;
1377
2378
  /**
1378
2379
  * Extract runnable fenced examples for Vitest docs-as-tests harnesses.
1379
2380
  *
@@ -1388,6 +2389,15 @@ interface OxContentOptions {
1388
2389
  * @default false
1389
2390
  */
1390
2391
  mermaid?: boolean;
2392
+ /**
2393
+ * Enable `$…$` inline and `$$…$$` block math.
2394
+ *
2395
+ * Currency-like `$` runs, fenced code, indented code, and inline code stay
2396
+ * literal. TeX is HTML-escaped into accessible MathML `mtext`.
2397
+ *
2398
+ * @default false
2399
+ */
2400
+ math?: boolean | MathOptions;
1391
2401
  /**
1392
2402
  * Parse YAML frontmatter.
1393
2403
  * @default true
@@ -1471,27 +2481,49 @@ interface ResolvedOptions {
1471
2481
  base: string;
1472
2482
  extensions: string[];
1473
2483
  ssg: ResolvedSsgOptions;
2484
+ siteMaps?: ResolvedSiteMapsOptions;
2485
+ publishState?: ResolvedPublishStateOptions;
2486
+ permalinks?: ResolvedPermalinksOptions;
2487
+ cascade?: ResolvedCascadeOptions;
2488
+ redirects?: ResolvedRedirectsOptions;
2489
+ blog?: ResolvedBlogOptions;
2490
+ feeds?: ResolvedFeedsOptions;
2491
+ pwa?: ResolvedPwaOptions;
2492
+ taxonomies?: ResolvedTaxonomiesOptions;
2493
+ versions?: ResolvedVersionsOptions;
2494
+ resources?: ResolvedResourcesOptions;
1474
2495
  gfm: boolean;
2496
+ mdx?: boolean;
1475
2497
  footnotes: boolean;
1476
2498
  tables: boolean;
1477
2499
  taskLists: boolean;
1478
2500
  strikethrough: boolean;
1479
2501
  autolinks: boolean;
1480
2502
  highlight: boolean;
1481
- highlightTheme: string | ThemeRegistration$1;
1482
- highlightLangs: LanguageRegistration$1[];
1483
2503
  codeAnnotations: ResolvedCodeAnnotationsOptions;
1484
2504
  wikiLinks: ResolvedWikiLinkOptions;
1485
2505
  emojiShortcodes: ResolvedEmojiShortcodeOptions;
1486
2506
  attrs: ResolvedAttrsOptions;
2507
+ badges: ResolvedBadgeOptions;
2508
+ containers: ResolvedContainerOptions;
2509
+ images: ResolvedImageOptions;
1487
2510
  codeImports: ResolvedCodeImportOptions;
2511
+ includes: ResolvedIncludeOptions;
2512
+ cards: ResolvedCardOptions;
2513
+ steps: ResolvedStepsOptions;
2514
+ fileTree: ResolvedFileTreeOptions;
1488
2515
  sanitize: ResolvedSanitizeOptions;
1489
2516
  editThisPage: ResolvedEditThisPageOptions;
1490
2517
  cjkEmphasis: boolean;
1491
2518
  codeBlockLint: ResolvedCodeBlockLintOptions;
1492
2519
  codeBlockTypecheck: ResolvedCodeBlockTypecheckOptions;
2520
+ /**
2521
+ * Present after `resolveOptions`. Omitted in hand-built fixtures means off.
2522
+ */
2523
+ typedHover?: ResolvedTypedHoverOptions;
1493
2524
  docsTests: ResolvedDocsTestOptions;
1494
2525
  mermaid: boolean;
2526
+ math: ResolvedMathOptions;
1495
2527
  frontmatter: boolean;
1496
2528
  toc: boolean;
1497
2529
  tocMaxDepth: number;
@@ -1582,6 +2614,112 @@ interface ResolvedBuiltinEmbedOptions {
1582
2614
  bluesky: boolean;
1583
2615
  webContainer: boolean;
1584
2616
  }
2617
+ /**
2618
+ * Options for opt-in `{badge:variant}` inline badges.
2619
+ */
2620
+ interface BadgeOptions {
2621
+ /**
2622
+ * Enable the badge transform when an options object is supplied.
2623
+ *
2624
+ * @default true
2625
+ */
2626
+ enabled?: boolean;
2627
+ }
2628
+ /**
2629
+ * Resolved inline-badge transform options.
2630
+ */
2631
+ interface ResolvedBadgeOptions {
2632
+ enabled: boolean;
2633
+ }
2634
+ /**
2635
+ * Options for opt-in `::: type` custom containers.
2636
+ */
2637
+ interface ContainerOptions {
2638
+ /**
2639
+ * Enable the container transform when an options object is supplied.
2640
+ *
2641
+ * @default true
2642
+ */
2643
+ enabled?: boolean;
2644
+ /**
2645
+ * Extra or overriding container types.
2646
+ *
2647
+ * Keys must be ASCII identifiers (`[A-Za-z0-9_-]+`). Unknown hostile names
2648
+ * are ignored.
2649
+ */
2650
+ types?: Record<string, ContainerTypeOptions>;
2651
+ }
2652
+ /**
2653
+ * Per-type container presentation.
2654
+ */
2655
+ interface ContainerTypeOptions {
2656
+ /** Title used when the opener does not set one. */
2657
+ title?: string;
2658
+ /** `"details"` renders `<details>`/`<summary>`; anything else is a `<div>`. */
2659
+ tag?: "div" | "details";
2660
+ }
2661
+ /**
2662
+ * Resolved custom-container transform options.
2663
+ */
2664
+ interface ResolvedContainerOptions {
2665
+ enabled: boolean;
2666
+ types: Record<string, ContainerTypeOptions>;
2667
+ }
2668
+ /**
2669
+ * Options for opt-in figures, captions, and lazy images.
2670
+ */
2671
+ interface ImageOptions {
2672
+ /**
2673
+ * Add `loading="lazy"` to transformed images.
2674
+ *
2675
+ * @default true
2676
+ */
2677
+ lazy?: boolean;
2678
+ }
2679
+ /**
2680
+ * Resolved image transform options.
2681
+ */
2682
+ interface ResolvedImageOptions {
2683
+ enabled: boolean;
2684
+ lazy: boolean;
2685
+ }
2686
+ /**
2687
+ * Options for opt-in page-bundle resources and image processing.
2688
+ */
2689
+ interface ResourcesOptions {
2690
+ /**
2691
+ * Allowed output formats for `?format=`.
2692
+ *
2693
+ * `jpg` is treated as `jpeg`. Pixel transforms encode `png` and `jpeg`.
2694
+ * `webp` is copied when the source is already webp and no pixel
2695
+ * transform is requested.
2696
+ *
2697
+ * @default ["png", "jpeg", "webp"]
2698
+ */
2699
+ formats?: string[];
2700
+ /**
2701
+ * Allowed `?width=` / `?w=` values. An empty list allows any positive
2702
+ * width.
2703
+ *
2704
+ * @default []
2705
+ */
2706
+ widths?: number[];
2707
+ /**
2708
+ * What to do when a relative resource is missing.
2709
+ *
2710
+ * @default "error"
2711
+ */
2712
+ missing?: "error" | "warn";
2713
+ }
2714
+ /**
2715
+ * Resolved page-resource options.
2716
+ */
2717
+ interface ResolvedResourcesOptions {
2718
+ enabled: boolean;
2719
+ formats: string[];
2720
+ widths: number[];
2721
+ missing: "error" | "warn";
2722
+ }
1585
2723
  /**
1586
2724
  * Options for expanding Obsidian-style wiki links.
1587
2725
  *
@@ -1636,6 +2774,27 @@ interface ResolvedEmojiShortcodeOptions {
1636
2774
  enabled: boolean;
1637
2775
  custom: Record<string, string>;
1638
2776
  }
2777
+ /**
2778
+ * Options for opt-in `$…$` / `$$…$$` math.
2779
+ *
2780
+ * Delimiter parsing lives in the native transform. Typesetting uses KaTeX at
2781
+ * build time when the optional `katex` peer is installed. Sites that omit
2782
+ * `math` do not need that package.
2783
+ */
2784
+ interface MathOptions {
2785
+ /**
2786
+ * Enable the math transform when an options object is supplied.
2787
+ *
2788
+ * @default true
2789
+ */
2790
+ enabled?: boolean;
2791
+ }
2792
+ /**
2793
+ * Resolved math transform options.
2794
+ */
2795
+ interface ResolvedMathOptions {
2796
+ enabled: boolean;
2797
+ }
1639
2798
  /**
1640
2799
  * Options for markdown-it-attrs style attribute blocks.
1641
2800
  *
@@ -1689,6 +2848,112 @@ interface ResolvedCodeImportOptions {
1689
2848
  enabled: boolean;
1690
2849
  rootDir?: string;
1691
2850
  }
2851
+ /**
2852
+ * Options for inlining Markdown files with `<!-- @include: PATH -->`.
2853
+ *
2854
+ * Relative paths resolve from the current file. `@/` and leading `/` resolve
2855
+ * from `rootDir`. After canonicalize, paths outside `rootDir` are rejected.
2856
+ */
2857
+ interface IncludeOptions {
2858
+ /**
2859
+ * Directory used to resolve `@/` and absolute include paths.
2860
+ *
2861
+ * When omitted, includes resolve from the Vite project root.
2862
+ *
2863
+ * @default undefined
2864
+ */
2865
+ rootDir?: string;
2866
+ }
2867
+ /**
2868
+ * Resolved Markdown-include transform options.
2869
+ */
2870
+ interface ResolvedIncludeOptions {
2871
+ enabled: boolean;
2872
+ rootDir?: string;
2873
+ }
2874
+ /**
2875
+ * Options for opt-in `::: card` / `::: link-card` / `::: card-grid` blocks.
2876
+ */
2877
+ interface CardOptions {
2878
+ /**
2879
+ * Enable the card transform when an options object is supplied.
2880
+ *
2881
+ * @default true
2882
+ */
2883
+ enabled?: boolean;
2884
+ }
2885
+ /**
2886
+ * Resolved card transform options.
2887
+ */
2888
+ interface ResolvedCardOptions {
2889
+ enabled: boolean;
2890
+ }
2891
+ /**
2892
+ * Options for opt-in `::: steps` ordered lists.
2893
+ */
2894
+ interface StepsOptions {
2895
+ /**
2896
+ * Enable the steps transform when an options object is supplied.
2897
+ *
2898
+ * @default true
2899
+ */
2900
+ enabled?: boolean;
2901
+ }
2902
+ /**
2903
+ * Resolved step-list transform options.
2904
+ */
2905
+ interface ResolvedStepsOptions {
2906
+ enabled: boolean;
2907
+ }
2908
+ /**
2909
+ * Replaceable file-tree icons. Values are trusted site-config SVG markup or
2910
+ * CSS class tokens, never fence content.
2911
+ */
2912
+ interface FileTreeIconOptions {
2913
+ /** Collapsed folder icon. */
2914
+ folder?: string;
2915
+ /** Open folder icon. */
2916
+ folderOpen?: string;
2917
+ /** Default file icon. */
2918
+ file?: string;
2919
+ /** File icons keyed by extension (`ts`, `.json`). */
2920
+ files?: Record<string, string>;
2921
+ }
2922
+ /**
2923
+ * Options for opt-in `file-tree` fences.
2924
+ */
2925
+ interface FileTreeOptions {
2926
+ /**
2927
+ * Enable the file-tree transform when an options object is supplied.
2928
+ *
2929
+ * @default true
2930
+ */
2931
+ enabled?: boolean;
2932
+ /**
2933
+ * Open directory `<details>` by default.
2934
+ *
2935
+ * @default true
2936
+ */
2937
+ defaultOpen?: boolean;
2938
+ /**
2939
+ * Render folder and file icons. Pass an object to replace the defaults.
2940
+ *
2941
+ * @default true
2942
+ */
2943
+ icons?: boolean | FileTreeIconOptions;
2944
+ }
2945
+ /**
2946
+ * Resolved file-tree transform options.
2947
+ */
2948
+ interface ResolvedFileTreeOptions {
2949
+ enabled: boolean;
2950
+ defaultOpen: boolean;
2951
+ icons: boolean;
2952
+ iconFolder?: string;
2953
+ iconFolderOpen?: string;
2954
+ iconFile?: string;
2955
+ iconFiles?: Record<string, string>;
2956
+ }
1692
2957
  /**
1693
2958
  * Options for sanitizing rendered HTML.
1694
2959
  *
@@ -1890,6 +3155,43 @@ interface ResolvedCodeBlockTypecheckOptions {
1890
3155
  tsgoCommand: string;
1891
3156
  mode: "warn" | "error";
1892
3157
  }
3158
+ /**
3159
+ * Options for opt-in typed hover overlays on TypeScript fences.
3160
+ *
3161
+ * Hover strings are computed at build time with the same TypeScript compiler
3162
+ * family used by `codeBlockTypecheck` (`tsgo` / `typescript`). The browser
3163
+ * only receives JSON payloads and a tiny overlay script.
3164
+ */
3165
+ interface TypedHoverOptions {
3166
+ /**
3167
+ * Enable typed hover overlays.
3168
+ *
3169
+ * @default true when the object form is used
3170
+ */
3171
+ enabled?: boolean;
3172
+ /**
3173
+ * Fence languages that can receive hover payloads.
3174
+ *
3175
+ * Language names are compared case-insensitively.
3176
+ *
3177
+ * @default ['ts', 'tsx']
3178
+ */
3179
+ languages?: string[];
3180
+ /**
3181
+ * Path to the `tsgo` binary used to compute hover types.
3182
+ *
3183
+ * When omitted, the bundled `@typescript/native-preview` executable is used.
3184
+ */
3185
+ tsgoCommand?: string;
3186
+ }
3187
+ /**
3188
+ * Resolved typed-hover options.
3189
+ */
3190
+ interface ResolvedTypedHoverOptions {
3191
+ enabled: boolean;
3192
+ languages: string[];
3193
+ tsgoCommand?: string;
3194
+ }
1893
3195
  /**
1894
3196
  * Options for extracting fenced examples into docs-as-tests fixtures.
1895
3197
  *
@@ -2065,6 +3367,30 @@ interface MarkdownNode {
2065
3367
  value?: string;
2066
3368
  [key: string]: unknown;
2067
3369
  }
3370
+ /**
3371
+ * How a specifier was imported from an MDX `import` statement.
3372
+ */
3373
+ type MdxImportSpecifierKind = "default" | "named" | "namespace";
3374
+ /**
3375
+ * One binding created by an MDX `import` statement.
3376
+ */
3377
+ interface MdxImportSpecifier {
3378
+ /** Imported name (`default`, `*`, or the named export). */
3379
+ imported: string;
3380
+ /** Local binding name. */
3381
+ local: string;
3382
+ /** Specifier kind. */
3383
+ kind: MdxImportSpecifierKind;
3384
+ }
3385
+ /**
3386
+ * One MDX `import` statement collected from the AST.
3387
+ */
3388
+ interface MdxImport {
3389
+ /** Module specifier string. */
3390
+ source: string;
3391
+ /** Bindings created by the import. */
3392
+ specifiers: MdxImportSpecifier[];
3393
+ }
2068
3394
  /**
2069
3395
  * Transform result.
2070
3396
  */
@@ -2089,6 +3415,18 @@ interface TransformResult {
2089
3415
  * Table of contents.
2090
3416
  */
2091
3417
  toc: TocEntry[];
3418
+ /**
3419
+ * MDX `import` statements (empty when MDX is off or no ESM nodes).
3420
+ */
3421
+ imports: MdxImport[];
3422
+ /**
3423
+ * Export names from MDX ESM (empty when MDX is off or no exports).
3424
+ */
3425
+ exports: string[];
3426
+ /**
3427
+ * Unique JSX component names in document order (empty when none).
3428
+ */
3429
+ components: string[];
2092
3430
  }
2093
3431
  /**
2094
3432
  * Table of contents entry.
@@ -2706,6 +4044,50 @@ interface SearchOptions {
2706
4044
  * @default '/'
2707
4045
  */
2708
4046
  hotkey?: string;
4047
+ /**
4048
+ * Search backend used by `virtual:ox-content/search`.
4049
+ *
4050
+ * `"local"` (the default) keeps the static BM25 `search-index.json` client.
4051
+ * `"hosted"` sends queries to a remote index with a public search-only key.
4052
+ * Hosted search is used only when this is set to `"hosted"`.
4053
+ *
4054
+ * @default 'local'
4055
+ */
4056
+ provider?: "local" | "hosted";
4057
+ /**
4058
+ * Hosted search application id.
4059
+ *
4060
+ * Required when `provider` is `"hosted"`. Also read from
4061
+ * `OX_CONTENT_SEARCH_APP_ID` when omitted here.
4062
+ */
4063
+ appId?: string;
4064
+ /**
4065
+ * Hosted search index name.
4066
+ *
4067
+ * Required when `provider` is `"hosted"`. Also read from
4068
+ * `OX_CONTENT_SEARCH_INDEX_NAME` when omitted here.
4069
+ */
4070
+ indexName?: string;
4071
+ /**
4072
+ * Public search-only key for the hosted provider.
4073
+ *
4074
+ * Write and admin keys are rejected. Also read from `OX_CONTENT_SEARCH_KEY`
4075
+ * when omitted here.
4076
+ */
4077
+ searchKey?: string;
4078
+ /**
4079
+ * Alias for `searchKey`.
4080
+ *
4081
+ * Also read from `OX_CONTENT_SEARCH_PUBLIC_KEY` when omitted here.
4082
+ */
4083
+ publicKey?: string;
4084
+ /**
4085
+ * HTTP endpoint that receives hosted search queries.
4086
+ *
4087
+ * Also read from `OX_CONTENT_SEARCH_ENDPOINT`. Defaults to `/search` when
4088
+ * hosted credentials are present.
4089
+ */
4090
+ endpoint?: string;
2709
4091
  }
2710
4092
  /**
2711
4093
  * Resolved search options.
@@ -2716,6 +4098,12 @@ interface ResolvedSearchOptions {
2716
4098
  prefix: boolean;
2717
4099
  placeholder: string;
2718
4100
  hotkey: string;
4101
+ provider?: "local" | "hosted";
4102
+ appId?: string;
4103
+ indexName?: string;
4104
+ searchKey?: string;
4105
+ publicKey?: string;
4106
+ endpoint?: string;
2719
4107
  }
2720
4108
  /**
2721
4109
  * Search document structure.
@@ -2896,6 +4284,21 @@ declare module "virtual:ox-content/collections" {
2896
4284
  export default api;
2897
4285
  }
2898
4286
  //#endregion
4287
+ //#region src/card-options.d.ts
4288
+ declare function resolveCardOptions(options: OxContentOptions["cards"]): ResolvedOptions["cards"];
4289
+ //#endregion
4290
+ //#region src/include-options.d.ts
4291
+ declare function resolveIncludeOptions(options: OxContentOptions["includes"]): ResolvedOptions["includes"];
4292
+ //#endregion
4293
+ //#region src/step-options.d.ts
4294
+ declare function resolveStepsOptions(options: OxContentOptions["steps"]): ResolvedOptions["steps"];
4295
+ //#endregion
4296
+ //#region src/file-tree-options.d.ts
4297
+ declare function resolveFileTreeOptions(options: OxContentOptions["fileTree"]): ResolvedOptions["fileTree"];
4298
+ //#endregion
4299
+ //#region src/typed-hover.d.ts
4300
+ declare function resolveTypedHoverOptions(options: OxContentOptions["typedHover"]): ResolvedOptions["typedHover"];
4301
+ //#endregion
2899
4302
  //#region src/environment.d.ts
2900
4303
  /**
2901
4304
  * Creates the Markdown processing environment configuration.
@@ -2928,6 +4331,11 @@ interface IncrementalMarkdownParserOptions {
2928
4331
  * @default true
2929
4332
  */
2930
4333
  gfm?: boolean;
4334
+ /**
4335
+ * Enable MDX JSX, ESM, and expression nodes.
4336
+ * @default false
4337
+ */
4338
+ mdx?: boolean;
2931
4339
  /**
2932
4340
  * Enable footnotes.
2933
4341
  * @default true
@@ -3057,6 +4465,9 @@ declare function renderMarkdownStream(chunks: MarkdownChunkSource, options?: Inc
3057
4465
  * - `html` (string): Rendered HTML content with all enhancements applied
3058
4466
  * - `frontmatter` (object): Parsed YAML frontmatter as JavaScript object
3059
4467
  * - `toc` (array): Hierarchical table of contents entries
4468
+ * - `imports` (array): MDX import statements (`source` + specifiers)
4469
+ * - `exports` (array): MDX export names
4470
+ * - `components` (array): Unique JSX component names
3060
4471
  * - `render` (function): Client-side render function for dynamic updates
3061
4472
  *
3062
4473
  * ## Markdown Features Supported
@@ -3104,7 +4515,6 @@ declare function renderMarkdownStream(chunks: MarkdownChunkSource, options?: Inc
3104
4515
  *
3105
4516
  * const options = resolveOptions({
3106
4517
  * highlight: true,
3107
- * highlightTheme: 'github-dark',
3108
4518
  * toc: true,
3109
4519
  * gfm: true,
3110
4520
  * mermaid: true,
@@ -3132,6 +4542,138 @@ interface SsgTransformOptions {
3132
4542
  }
3133
4543
  declare function transformMarkdown(source: string, filePath: string, options: ResolvedOptions, ssgOptions?: SsgTransformOptions): Promise<TransformResult>;
3134
4544
  //#endregion
4545
+ //#region src/markdown.d.ts
4546
+ declare const DEFAULT_MARKDOWN_EXTENSIONS: readonly [".md", ".markdown", ".mdx"];
4547
+ declare function normalizeMarkdownExtensions(extensions?: readonly string[]): string[];
4548
+ declare function isMarkdownFilePath(filePath: string, extensions?: readonly string[]): boolean;
4549
+ /** Returns true when a resource id points at an MDX source file. */
4550
+ declare function isMdxFilePath(filePath: string): boolean;
4551
+ /** Explicit configuration wins; otherwise MDX follows the source extension. */
4552
+ declare function resolveMdxForFilePath(filePath: string, configured?: boolean): boolean;
4553
+ declare function stripMarkdownExtension(filePath: string, extensions?: readonly string[]): string;
4554
+ //#endregion
4555
+ //#region src/mdx-islands.d.ts
4556
+ /**
4557
+ * Discover registered MDX islands from the mdast tree or rendered HTML.
4558
+ *
4559
+ * Framework plugins use this instead of a source regex when MDX is on, so
4560
+ * nested JSX, expression attributes, and fragments stay visible. Names that
4561
+ * are not in the global `components` map and are not document-local import
4562
+ * bindings are left as static HTML.
4563
+ */
4564
+ /** Global component map: object, Map, or name list. */
4565
+ type ComponentRegistry = Readonly<Record<string, unknown>> | ReadonlyMap<string, unknown> | Iterable<string>;
4566
+ /**
4567
+ * Collect named MDX JSX tags from a parsed mdast tree (JSON from NAPI `parse()`).
4568
+ * Fragments (`name: null`) and non-JSX nodes are ignored. Walks nested children
4569
+ * so inner islands are found.
4570
+ */
4571
+ declare function collectMdxJsxNamesFromAst(ast: unknown): string[];
4572
+ /**
4573
+ * Collect `data-ox-island` names from Rust-rendered HTML.
4574
+ * Used when an AST walk is unavailable.
4575
+ */
4576
+ declare function collectMdxIslandNamesFromHtml(html: string): string[];
4577
+ /** Keep names that exist on the global component map, in first-seen order. */
4578
+ declare function intersectRegisteredComponentNames(names: Iterable<string>, components: ComponentRegistry): string[];
4579
+ /**
4580
+ * Keep names that are either globally registered or document-local bindings.
4581
+ */
4582
+ declare function intersectHydratableComponentNames(names: Iterable<string>, components: ComponentRegistry, localNames?: Iterable<string>): string[];
4583
+ interface DiscoverRegisteredMdxComponentsInput {
4584
+ /** Markdown/MDX body (frontmatter already stripped). */
4585
+ source: string;
4586
+ /** Rendered HTML, used when `parse()` is missing or the AST walk fails. */
4587
+ html?: string;
4588
+ components: ComponentRegistry;
4589
+ /** Document-local import bindings. These override the global map for this file. */
4590
+ localNames?: Iterable<string>;
4591
+ }
4592
+ /**
4593
+ * Resolve registered island names for an MDX document.
4594
+ *
4595
+ * Prefers a NAPI `parse()` AST walk. Falls back to rendered `data-ox-island`
4596
+ * names so plugins still hydrate if #659 metadata is not present.
4597
+ */
4598
+ declare function discoverRegisteredMdxComponents(input: DiscoverRegisteredMdxComponentsInput): Promise<string[]>;
4599
+ declare function isRegisteredComponent(name: string, components: ComponentRegistry): boolean;
4600
+ //#endregion
4601
+ //#region src/document-imports.d.ts
4602
+ interface ResolveDocumentComponentImportsInput {
4603
+ imports: readonly MdxImport[];
4604
+ documentPath: string;
4605
+ contentRoot?: string;
4606
+ srcDir?: string;
4607
+ }
4608
+ interface ResolvedDocumentComponentImport {
4609
+ localName: string;
4610
+ specifier: string;
4611
+ resolvedPath: string;
4612
+ importPathRelativeToDocument: string;
4613
+ imported: string;
4614
+ kind: Exclude<MdxImportSpecifierKind, "namespace">;
4615
+ }
4616
+ type DocumentImportDiagnosticCode = "not-relative" | "escapes-root" | "duplicate-binding";
4617
+ interface DocumentImportDiagnostic {
4618
+ code: DocumentImportDiagnosticCode;
4619
+ message: string;
4620
+ specifier: string;
4621
+ localName?: string;
4622
+ }
4623
+ interface ResolveDocumentComponentImportsResult {
4624
+ bindings: ResolvedDocumentComponentImport[];
4625
+ diagnostics: DocumentImportDiagnostic[];
4626
+ }
4627
+ declare function resolveContentRootPath(input: {
4628
+ contentRoot?: string;
4629
+ srcDir?: string;
4630
+ root?: string;
4631
+ }): string;
4632
+ declare function stripViteQuery(id: string): string;
4633
+ declare function resolveDocumentComponentImports(input: ResolveDocumentComponentImportsInput): ResolveDocumentComponentImportsResult;
4634
+ //#endregion
4635
+ //#region src/document-islands.d.ts
4636
+ interface DiscoverDocumentMdxIslandsInput {
4637
+ source: string;
4638
+ html?: string;
4639
+ components: ComponentRegistry;
4640
+ imports: readonly MdxImport[];
4641
+ documentPath: string;
4642
+ contentRoot?: string;
4643
+ srcDir?: string;
4644
+ root?: string;
4645
+ }
4646
+ interface DiscoverDocumentMdxIslandsResult {
4647
+ usedComponents: string[];
4648
+ localBindings: Map<string, ResolvedDocumentComponentImport>;
4649
+ diagnostics: DocumentImportDiagnostic[];
4650
+ }
4651
+ declare function discoverDocumentMdxIslands(input: DiscoverDocumentMdxIslandsInput): Promise<DiscoverDocumentMdxIslandsResult>;
4652
+ //#endregion
4653
+ //#region src/island-codegen.d.ts
4654
+ type GlobalComponentMap = Readonly<Record<string, string>> | ReadonlyMap<string, string>;
4655
+ interface RenderIslandComponentImportsInput {
4656
+ globalComponents: GlobalComponentMap;
4657
+ localBindings?: ReadonlyMap<string, ResolvedDocumentComponentImport>;
4658
+ documentPath: string;
4659
+ root?: string;
4660
+ }
4661
+ declare function renderIslandComponentImports(usedComponents: readonly string[], input: RenderIslandComponentImportsInput): string;
4662
+ //#endregion
4663
+ //#region src/island-ssr.d.ts
4664
+ /**
4665
+ * Optional adapter-side island SSR.
4666
+ *
4667
+ * Framework plugins may supply `renderIsland` to replace island inner HTML at
4668
+ * transform time. This helper stays framework-neutral and does not import a
4669
+ * framework SSR runtime.
4670
+ */
4671
+ type RenderIslandFn = (name: string, props: Record<string, unknown>, filePath: string) => string | Promise<string>;
4672
+ declare function applyIslandSsrHtml(html: string, renderIsland: RenderIslandFn, filePath: string, names?: Iterable<string>): Promise<string>;
4673
+ //#endregion
4674
+ //#region src/resolve-image-options.d.ts
4675
+ declare function resolveImageOptions(options: OxContentOptions["images"]): ResolvedOptions["images"];
4676
+ //#endregion
3135
4677
  //#region src/framework.d.ts
3136
4678
  type FrameworkRenderTarget = "html" | "native";
3137
4679
  type FrameworkCodegenTarget = "react" | "vue" | "svelte";
@@ -3153,6 +4695,10 @@ interface FrameworkMarkdownOptions {
3153
4695
  github?: ResolvedOptions["embeds"]["github"];
3154
4696
  openGraph?: ResolvedOptions["embeds"]["openGraph"];
3155
4697
  };
4698
+ math?: boolean | {
4699
+ enabled?: boolean;
4700
+ };
4701
+ mdx?: boolean;
3156
4702
  }
3157
4703
  interface FrameworkComponentIsland {
3158
4704
  name: string;
@@ -3579,6 +5125,12 @@ interface MarkdownLintOptions {
3579
5125
  * @default {}
3580
5126
  */
3581
5127
  dictionary?: MarkdownLintDictionaryOptions;
5128
+ /**
5129
+ * Enable MDX-aware syntax masking while linting visible prose.
5130
+ * File-oriented APIs infer this from `.mdx` when omitted.
5131
+ * @default false for content APIs; inferred for file APIs
5132
+ */
5133
+ mdx?: boolean;
3582
5134
  }
3583
5135
  /**
3584
5136
  * A single Markdown lint diagnostic.
@@ -3756,6 +5308,144 @@ interface SsgBuildResult {
3756
5308
  */
3757
5309
  declare function buildSsg(options: ResolvedOptions, root: string): Promise<SsgBuildResult>;
3758
5310
  //#endregion
5311
+ //#region src/not-found.d.ts
5312
+ /**
5313
+ * Resolves `ssg.notFound` with defaults.
5314
+ *
5315
+ * `false` / omitted stays off. `true` enables `404.md` → `404.html`. An object
5316
+ * enables the feature and overrides only the fields the site set.
5317
+ */
5318
+ declare function resolveNotFoundOptions(value: boolean | NotFoundOptions | undefined): ResolvedNotFoundOptions;
5319
+ //#endregion
5320
+ //#region src/site-maps.d.ts
5321
+ /**
5322
+ * Resolves `siteMaps` with defaults.
5323
+ *
5324
+ * `false` / omitted stays off. `true` enables all three files. An object
5325
+ * enables the feature and overrides only the fields the site set.
5326
+ */
5327
+ declare function resolveSiteMapsOptions(value: boolean | SiteMapsOptions | undefined): ResolvedSiteMapsOptions;
5328
+ //#endregion
5329
+ //#region src/publish-state.d.ts
5330
+ /** Split pages into production output vs listing surfaces. */
5331
+ interface PartitionedPages<T> {
5332
+ output: T[];
5333
+ listed: T[];
5334
+ }
5335
+ /**
5336
+ * Resolves `publishState` with defaults.
5337
+ *
5338
+ * `false` / omitted stays off. `true` enables production filtering. An object
5339
+ * enables the feature and overrides only the fields the site set.
5340
+ */
5341
+ declare function resolvePublishStateOptions(value: boolean | PublishStateOptions | undefined): ResolvedPublishStateOptions;
5342
+ /** Classifies one frontmatter object. Never throws. */
5343
+ declare function classifyPublishState(frontmatter: Record<string, unknown>, options: ResolvedPublishStateOptions | undefined): {
5344
+ output: boolean;
5345
+ listed: boolean;
5346
+ };
5347
+ /** Splits pages into those that write HTML and those that appear in listings. */
5348
+ declare function partitionPublishedPages<T extends {
5349
+ frontmatter: Record<string, unknown>;
5350
+ }>(pages: readonly T[], options: ResolvedPublishStateOptions | undefined): PartitionedPages<T>;
5351
+ //#endregion
5352
+ //#region src/permalinks.d.ts
5353
+ /** Resolves `permalinks`. `false` / omitted stays off. `true` / `{}` enables. */
5354
+ declare function resolvePermalinksOptions(value: boolean | PermalinksOptions | undefined): ResolvedPermalinksOptions;
5355
+ /** Resolves `cascade`. `false` / omitted stays off. `true` / `{}` enables. */
5356
+ declare function resolveCascadeOptions(value: boolean | CascadeOptions | undefined): ResolvedCascadeOptions;
5357
+ //#endregion
5358
+ //#region src/redirects.d.ts
5359
+ /**
5360
+ * Resolves `redirects` with defaults.
5361
+ *
5362
+ * `false` / omitted stays off. `true` or `{}` enables empty defaults.
5363
+ * A path map (`{ "/old": "/new" }`) enables the feature with that map.
5364
+ * `{ map, netlify, headers, json, allowExternal }` overrides only set fields.
5365
+ */
5366
+ declare function resolveRedirectsOptions(value: boolean | RedirectsOptions | Record<string, string> | undefined): ResolvedRedirectsOptions;
5367
+ //#endregion
5368
+ //#region src/feeds.d.ts
5369
+ /**
5370
+ * Resolves `feeds` with defaults.
5371
+ *
5372
+ * `false` / omitted stays off. `true` enables all three formats with
5373
+ * collection `content` (or the first configured collection) and limit 20.
5374
+ * An object enables the feature and overrides only the fields the site set.
5375
+ */
5376
+ declare function resolveFeedsOptions(value: boolean | FeedsOptions | undefined): ResolvedFeedsOptions;
5377
+ //#endregion
5378
+ //#region src/blog-options.d.ts
5379
+ declare function resolveBlogOptions(value: boolean | BlogOptions | undefined): ResolvedBlogOptions;
5380
+ /**
5381
+ * Picks a collection named `blog`, else the only configured collection.
5382
+ *
5383
+ * An explicit name always wins. Several collections and no `blog` name
5384
+ * require `blog.collection`.
5385
+ */
5386
+ declare function resolveBlogCollectionName(requested: string | undefined, collectionNames: readonly string[]): string | undefined;
5387
+ //#endregion
5388
+ //#region src/blog-reading.d.ts
5389
+ /**
5390
+ * Deterministic blog reading-time estimates.
5391
+ */
5392
+ declare function readingTimeMinutes(markdown: string): number;
5393
+ //#endregion
5394
+ //#region src/pwa.d.ts
5395
+ /**
5396
+ * Resolves `pwa` with defaults.
5397
+ *
5398
+ * `false` / omitted stays off. `true` enables the manifest and offline
5399
+ * service worker. An object enables the feature and overrides only the
5400
+ * fields the site set.
5401
+ */
5402
+ declare function resolvePwaOptions(value: boolean | PwaOptions | undefined): ResolvedPwaOptions;
5403
+ //#endregion
5404
+ //#region src/taxonomies.d.ts
5405
+ /**
5406
+ * Resolves `taxonomies` with defaults.
5407
+ *
5408
+ * `false` / omitted stays off. `true` enables `tags` and `categories` with
5409
+ * relatedLimit 5. An object enables the feature and overrides only set fields.
5410
+ */
5411
+ declare function resolveTaxonomiesOptions(value: boolean | TaxonomiesOptions | undefined): ResolvedTaxonomiesOptions;
5412
+ //#endregion
5413
+ //#region src/versions.d.ts
5414
+ /**
5415
+ * Resolves `versions`. Omitted / `false` stay off. `true` enables a single
5416
+ * current entry. An object enables the feature and overrides set fields.
5417
+ */
5418
+ declare function resolveVersionsOptions(value: boolean | VersionsOptions | undefined): ResolvedVersionsOptions;
5419
+ //#endregion
5420
+ //#region src/resources.d.ts
5421
+ declare class PageResourceError extends Error {
5422
+ readonly issues: string[];
5423
+ constructor(issues: string[]);
5424
+ }
5425
+ /**
5426
+ * Resolves `resources`. Omitted / `false` stay off. `true` or `{}` enables
5427
+ * defaults. An object enables the feature and overrides only set fields.
5428
+ */
5429
+ declare function resolveResourcesOptions(value: boolean | ResourcesOptions | undefined): ResolvedResourcesOptions;
5430
+ //#endregion
5431
+ //#region src/team.d.ts
5432
+ /**
5433
+ * Resolves `ssg.team` with defaults.
5434
+ *
5435
+ * `false` / omitted stays off. `true` enables an empty member list.
5436
+ * An object enables the feature and keeps the members the site set.
5437
+ */
5438
+ declare function resolveTeamOptions(value: boolean | TeamOptions | undefined): ResolvedTeamOptions;
5439
+ //#endregion
5440
+ //#region src/section-index.d.ts
5441
+ /**
5442
+ * Resolves `ssg.sectionIndex` with defaults.
5443
+ *
5444
+ * `false` / omitted stays off. `true` enables card listings. An object
5445
+ * enables the feature and overrides only the fields the site set.
5446
+ */
5447
+ declare function resolveSectionIndexOptions(value: boolean | SectionIndexOptions | undefined): ResolvedSectionIndexOptions;
5448
+ //#endregion
3759
5449
  //#region src/search.d.ts
3760
5450
  /**
3761
5451
  * Resolves search options with defaults.
@@ -3763,8 +5453,12 @@ declare function buildSsg(options: ResolvedOptions, root: string): Promise<SsgBu
3763
5453
  declare function resolveSearchOptions(options: SearchOptions | boolean | undefined): ResolvedSearchOptions;
3764
5454
  /**
3765
5455
  * Builds the search index from Markdown files.
5456
+ *
5457
+ * `publishState` is forwarded to the native indexer. `excludeDocumentIds`
5458
+ * then drops matching documents and rebuilds the BM25 index so omitted
5459
+ * pages (such as the opt-in 404 source) are not searchable.
3766
5460
  */
3767
- declare function buildSearchIndex(srcDir: string, base: string, extensions?: readonly string[]): Promise<string>;
5461
+ declare function buildSearchIndex(srcDir: string, base: string, extensions?: readonly string[], publishState?: ResolvedPublishStateOptions, excludeDocumentIds?: readonly string[], mdx?: boolean): Promise<string>;
3768
5462
  /**
3769
5463
  * Writes the search index to a file.
3770
5464
  */
@@ -3777,12 +5471,6 @@ declare function resolveCollectionsOptions(options: CollectionsOptions | boolean
3777
5471
  declare function buildCollectionManifest(root: string, options: ResolvedOptions): Promise<CollectionManifest>;
3778
5472
  declare function generateCollectionsVirtualModule(root: string, options: ResolvedOptions): Promise<string>;
3779
5473
  //#endregion
3780
- //#region src/markdown.d.ts
3781
- declare const DEFAULT_MARKDOWN_EXTENSIONS: readonly [".md", ".markdown", ".mdx"];
3782
- declare function normalizeMarkdownExtensions(extensions?: readonly string[]): string[];
3783
- declare function isMarkdownFilePath(filePath: string, extensions?: readonly string[]): boolean;
3784
- declare function stripMarkdownExtension(filePath: string, extensions?: readonly string[]): string;
3785
- //#endregion
3786
5474
  //#region src/vitepress.d.ts
3787
5475
  interface VitePressLogo {
3788
5476
  light?: string;
@@ -4073,10 +5761,12 @@ declare function createI18nPlugin(resolvedOptions: ResolvedOptions): Plugin;
4073
5761
  */
4074
5762
  declare function oxContent(options?: OxContentOptions): Plugin[];
4075
5763
  declare function resolveBuiltinEmbedOptions(options: OxContentOptions["embeds"]): ResolvedOptions["embeds"];
5764
+ declare function resolveMathOptions(options: OxContentOptions["math"]): ResolvedOptions["math"];
5765
+ declare function resolveBadgeOptions(options: OxContentOptions["badges"]): ResolvedOptions["badges"];
4076
5766
  /**
4077
5767
  * Generates virtual module content.
4078
5768
  */
4079
5769
  declare function generateVirtualModule(path: string, options: ResolvedOptions): string;
4080
5770
  //#endregion
4081
- export { AttrsOptions, type BasePageProps, BuiltinEmbedOptions, BuiltinPmOptions, CodeAnnotationKind, CodeAnnotationSyntax, CodeAnnotationsOptions, type CodeBlockDiagnostic, CodeBlockLintOptions, CodeBlockTypecheckOptions, CodeImportOptions, type CollectedDocsTest, CollectionEntry, CollectionIncludeField, CollectionManifest, CollectionOptions, CollectionQueryBuilder, CollectionQueryOperator, CollectionsOptions, DEFAULT_HTML_TEMPLATE, DEFAULT_MARKDOWN_EXTENSIONS, DefaultTheme, DocEntry, DocMember, DocsEntryPoint, DocsOptions, DocsSortStrategy, DocsSummary, type DocsTestFileOptions, type DocsTestHarnessOptions, DocsTestOptions, DocsTestRunError, type DocsTestRunResult, type DocsTestSource, type DocsTestWriteResult, EditThisPageOptions, EmojiShortcodeOptions, EntryPageConfig, type ExtractedCodeBlock, ExtractedDocs, FeatureConfig, Fragment, type FrameworkCodegenMode, type FrameworkCodegenTarget, type FrameworkComponentIsland, type FrameworkMarkdownOptions, type FrameworkRenderTarget, type FrameworkTransformData, type FrontmatterSchema, type GenerateVitePressMigrationConfigOptions, GeneratedDocsData, type GitHubLineRange, type GitHubOptions, type GitHubRepoData, type GitHubSourceData, type GitHubSourceRef, HeroAction, HeroConfig, HeroImage, HeroNotice, I18nOptions, type IncrementalMarkdownParseAppendOptions, type IncrementalMarkdownParseResult, IncrementalMarkdownParser, type IncrementalMarkdownParserOptions, type IncrementalMarkdownRenderAppendOptions, type IncrementalMarkdownRenderResult, IncrementalMarkdownRenderer, type IncrementalMarkdownRendererOptions, type IslandInfo, type JSXChild, type JSXElementType, type JSXNode, type JSXProps, type LanguageRegistration, type LoadStrategy, LocaleConfig, type MarkdownChunkSource, MarkdownDisplayFormat, type MarkdownLintFileDiagnostic as MarkdownLintBatchDiagnostic, type MarkdownLintFileDiagnostic, type MarkdownLintDiagnostic, type MarkdownLintDictionaryOptions, type MarkdownLintFileOptions, type MarkdownLintFileOptions as MarkdownLintProjectOptions, type MarkdownLintFileResult, type MarkdownLintFilesResult, type MarkdownLintLanguage, type MarkdownLintOptions, type MarkdownLintResult, type MarkdownLintRuleOptions, type MarkdownLintSeverity, type MarkdownLintStandardDictionaryOptions, MarkdownNode, MarkdownTransformer, type MermaidOptions, type NavGroup, NavItem, type OgBrowserSession, OgImageOptions, type OgImagePageEntry, type OgImageOptions$1 as OgImagePluginOptions, type OgImageResult, type OgImageTemplateFn, type OgImageTemplateProps, type OgpData, type OgpOptions, OxContentOptions, type PageData, type PageProps, ParamDoc, type ParseIslandsResult, type RenderContext, ResolvedAttrsOptions, ResolvedBuiltinEmbedOptions, ResolvedCodeAnnotationsOptions, ResolvedCodeBlockLintOptions, ResolvedCodeBlockTypecheckOptions, ResolvedCodeImportOptions, ResolvedCollectionOptions, ResolvedCollectionsOptions, ResolvedDocsEntryPoint, ResolvedDocsOptions, ResolvedDocsTestOptions, ResolvedEditThisPageOptions, ResolvedEmojiShortcodeOptions, ResolvedI18nOptions, ResolvedOgImageOptions, ResolvedOptions, ResolvedSanitizeOptions, ResolvedSearchOptions, ResolvedSsgOptions, type ResolvedThemeConfig, ResolvedWikiLinkOptions, ReturnDoc, type RunDocsTestsOptions, SanitizeOptions, ScopedSearchQuery, SearchDocument, SearchOptions, SearchResult, type SiteConfig, type SocialLinks, SsgNavigationGroup, SsgNavigationItem, SsgOptions, type ThemeColors, type ThemeComponent, type ThemeConfig, type ThemeEmbed, type ThemeEntryPage, type ThemeFonts, type ThemeFooter, type ThemeHeader, type ThemeLayout, type ThemeProps, type ThemeRegistration, type ThemeRenderOptions, type ThemeTokens, ThrowsDoc, TocEntry, type TransformAllOptions, TransformContext, TransformResult, type TwitterEmbedOptions, type TypecheckCodeBlockOptions, type VitePressConfig, type VitePressFooter, type VitePressLogo, type VitePressNavItem, type VitePressSidebar, type VitePressSidebarItem, type VitePressSocialLink, type VitePressThemeConfig, WikiLinkOptions, type WrittenDocsTestFile, type YouTubeOptions, buildCollectionManifest, buildSearchIndex, buildSsg, clearRenderContext, collectDocsTests, collectGitHubRepos, collectGitHubSources, collectOgpUrls, convertVitePressNav, convertVitePressSidebar, createFrameworkMarkdownOptions, createI18nPlugin, createIncrementalMarkdownParser, createIncrementalMarkdownRenderer, createMarkdownEnvironment, createTheme, defaultTheme, defineCollection, defineCollections, defineTheme, each, escapeSvelteMarkup, extractCodeBlocks, extractDocs, extractDocsTests, extractIslandInfo, extractVideoId, fetchGitHubSource, fetchOgpData, fetchRepoData, fromVitePressConfig, generateCollectionsVirtualModule, generateFrontmatterTypes, generateHydrationScript, generateMarkdown, generateOgImages, generateTabsCSS, generateTypes, generateVirtualModule, generateVitePressMigrationConfig, hasIslands, inferType, isMarkdownFilePath, jsx, jsxs, lintCodeBlocks, lintMarkdown, lintMarkdownAsync, lintMarkdownFile, lintMarkdownFiles, mergeThemes, mermaidClientScript, normalizeMarkdownExtensions, normalizeVitePressFrontmatter, oxContent, parseGitHubLineRange, parseGitHubPermalink, prefetchGitHubRepos, prefetchGitHubSources, prefetchOgpData, raw, renderAllPages, renderHtmlToFrameworkCode, renderHtmlToReactComponent, renderHtmlToReactCreateElement, renderHtmlToSvelteComponent, renderHtmlToVueComponent, renderHtmlToVueH, renderMarkdownStream, renderPage, renderToString, resolveBuiltinEmbedOptions, resolveCollectionsOptions, resolveDocsOptions, resolveI18nOptions, resolveOgImageOptions, resolveSearchOptions, resolveSsgOptions, resolveTheme, runDocsTests, setRenderContext, shouldLintMarkdownFile, stripMarkdownExtension, transformAllPlugins, transformGitHub, transformIslands, transformMarkdown, transformMermaidStatic, transformOgp, transformTabs, transformYouTube, typecheckCodeBlocks, useIsActive, useNav, usePageProps, useRenderContext, useSiteConfig, when, writeDocs, writeDocsTestFiles, writeSearchIndex };
5771
+ export { A11yOptions, AttrsOptions, BadgeOptions, type BasePageProps, BlogAuthor, BlogOptions, BuiltinEmbedOptions, BuiltinPmOptions, CardOptions, CascadeOptions, CodeAnnotationKind, CodeAnnotationSyntax, CodeAnnotationsOptions, type CodeBlockDiagnostic, CodeBlockLintOptions, CodeBlockTypecheckOptions, CodeImportOptions, type CollectedDocsTest, CollectionEntry, CollectionIncludeField, CollectionManifest, CollectionOptions, CollectionQueryBuilder, CollectionQueryOperator, CollectionsOptions, type ComponentRegistry, ContainerOptions, ContainerTypeOptions, ContributorsOptions, DEFAULT_HTML_TEMPLATE, DEFAULT_MARKDOWN_EXTENSIONS, DefaultTheme, type DiscoverDocumentMdxIslandsInput, type DiscoverDocumentMdxIslandsResult, type DiscoverRegisteredMdxComponentsInput, DocEntry, DocMember, DocsEntryPoint, DocsOptions, DocsSortStrategy, DocsSummary, type DocsTestFileOptions, type DocsTestHarnessOptions, DocsTestOptions, DocsTestRunError, type DocsTestRunResult, type DocsTestSource, type DocsTestWriteResult, type DocumentImportDiagnostic, type DocumentImportDiagnosticCode, EditThisPageOptions, EmojiShortcodeOptions, EntryPageConfig, type ExtractedCodeBlock, ExtractedDocs, FeatureConfig, FeedFormat, FeedsOptions, FileTreeIconOptions, FileTreeOptions, Fragment, type FrameworkCodegenMode, type FrameworkCodegenTarget, type FrameworkComponentIsland, type FrameworkMarkdownOptions, type FrameworkRenderTarget, type FrameworkTransformData, type FrontmatterSchema, type GenerateVitePressMigrationConfigOptions, GeneratedDocsData, type GitHubLineRange, type GitHubOptions, type GitHubRepoData, type GitHubSourceCommit, type GitHubSourceData, type GitHubSourceRef, type GlobalComponentMap, type HeaderNavItem, HeroAction, HeroConfig, HeroImage, HeroNotice, I18nOptions, ImageOptions, IncludeOptions, type IncrementalMarkdownParseAppendOptions, type IncrementalMarkdownParseResult, IncrementalMarkdownParser, type IncrementalMarkdownParserOptions, type IncrementalMarkdownRenderAppendOptions, type IncrementalMarkdownRenderResult, IncrementalMarkdownRenderer, type IncrementalMarkdownRendererOptions, type IslandInfo, type JSXChild, type JSXElementType, type JSXNode, type JSXProps, JsonLdOptions, JsonLdPublisherOptions, type LoadStrategy, LocaleConfig, type LocaleLabel, type MarkdownChunkSource, MarkdownDisplayFormat, type MarkdownLintFileDiagnostic as MarkdownLintBatchDiagnostic, type MarkdownLintFileDiagnostic, type MarkdownLintDiagnostic, type MarkdownLintDictionaryOptions, type MarkdownLintFileOptions, type MarkdownLintFileOptions as MarkdownLintProjectOptions, type MarkdownLintFileResult, type MarkdownLintFilesResult, type MarkdownLintLanguage, type MarkdownLintOptions, type MarkdownLintResult, type MarkdownLintRuleOptions, type MarkdownLintSeverity, type MarkdownLintStandardDictionaryOptions, MarkdownNode, MarkdownTransformer, MathOptions, MdxImport, MdxImportSpecifier, MdxImportSpecifierKind, type MermaidOptions, type NavGroup, NavItem, NotFoundOptions, type OgBrowserSession, OgImageOptions, type OgImagePageEntry, type OgImageOptions$1 as OgImagePluginOptions, type OgImageResult, type OgImageTemplateFn, type OgImageTemplateProps, type OgpData, type OgpOptions, OxContentOptions, type PageChromeFlags, type PageData, type PageProps, PageResourceError, ParamDoc, type ParseIslandsResult, PermalinksOptions, PublishStateOptions, PwaOptions, ReaderChromeOptions, RedirectsOptions, type RenderContext, type RenderIslandComponentImportsInput, type RenderIslandFn, type ResolveDocumentComponentImportsInput, type ResolveDocumentComponentImportsResult, ResolvedA11y, ResolvedAttrsOptions, ResolvedBadgeOptions, ResolvedBlogOptions, ResolvedBuiltinEmbedOptions, ResolvedCardOptions, ResolvedCascadeOptions, ResolvedCodeAnnotationsOptions, ResolvedCodeBlockLintOptions, ResolvedCodeBlockTypecheckOptions, ResolvedCodeImportOptions, ResolvedCollectionOptions, ResolvedCollectionsOptions, ResolvedContainerOptions, ResolvedContributors, ResolvedDocsEntryPoint, ResolvedDocsOptions, ResolvedDocsTestOptions, type ResolvedDocumentComponentImport, ResolvedEditThisPageOptions, ResolvedEmojiShortcodeOptions, ResolvedFeedsOptions, ResolvedFileTreeOptions, ResolvedI18nOptions, ResolvedImageOptions, ResolvedIncludeOptions, ResolvedJsonLd, ResolvedMathOptions, ResolvedNotFoundOptions, ResolvedOgImageOptions, ResolvedOptions, ResolvedPermalinksOptions, ResolvedPublishStateOptions, ResolvedPwaOptions, ResolvedReaderChrome, ResolvedRedirectsOptions, ResolvedResourcesOptions, ResolvedSanitizeOptions, ResolvedSearchOptions, ResolvedSectionIndexOptions, ResolvedSiteMapsOptions, ResolvedSsgOptions, ResolvedStepsOptions, ResolvedTaxonomiesOptions, ResolvedTeamOptions, type ResolvedThemeConfig, ResolvedTypedHoverOptions, ResolvedVersionEntry, ResolvedVersionsOptions, ResolvedWikiLinkOptions, ResourcesOptions, ReturnDoc, type RunDocsTestsOptions, SanitizeOptions, ScopedSearchQuery, SearchDocument, SearchOptions, SearchResult, SectionIndexOptions, SectionIndexStyle, type SidebarItem, type SiteConfig, SiteMapsOptions, type SocialLinks, SsgNavigationGroup, SsgNavigationItem, SsgOptions, StepsOptions, TaxonomiesOptions, TeamLink, TeamMember, TeamOptions, type ThemeAnnouncement, type ThemeColors, type ThemeComponent, type ThemeConfig, type ThemeEmbed, type ThemeEntryPage, type ThemeFonts, type ThemeFooter, type ThemeHeader, type ThemeLayout, type ThemeProps, type ThemeRenderOptions, type ThemeTokens, ThrowsDoc, TocEntry, type TransformAllOptions, TransformContext, TransformResult, type TwitterEmbedOptions, type TypecheckCodeBlockOptions, TypedHoverOptions, VersionBannerKind, VersionEntry, VersionsOptions, type VitePressConfig, type VitePressFooter, type VitePressLogo, type VitePressNavItem, type VitePressSidebar, type VitePressSidebarItem, type VitePressSocialLink, type VitePressThemeConfig, WikiLinkOptions, type WrittenDocsTestFile, type YouTubeOptions, applyIslandSsrHtml, buildCollectionManifest, buildSearchIndex, buildSsg, classifyPublishState, clearRenderContext, collectDocsTests, collectGitHubRepos, collectGitHubSources, collectMdxIslandNamesFromHtml, collectMdxJsxNamesFromAst, collectOgpUrls, convertVitePressNav, convertVitePressSidebar, createFrameworkMarkdownOptions, createI18nPlugin, createIncrementalMarkdownParser, createIncrementalMarkdownRenderer, createMarkdownEnvironment, createTheme, defaultTheme, defineCollection, defineCollections, defineTheme, discoverDocumentMdxIslands, discoverRegisteredMdxComponents, each, escapeSvelteMarkup, extractCodeBlocks, extractDocs, extractDocsTests, extractIslandInfo, extractVideoId, fetchGitHubSource, fetchOgpData, fetchRepoData, fromVitePressConfig, generateCollectionsVirtualModule, generateFrontmatterTypes, generateHydrationScript, generateMarkdown, generateOgImages, generateTabsCSS, generateTypes, generateVirtualModule, generateVitePressMigrationConfig, hasIslands, inferType, intersectHydratableComponentNames, intersectRegisteredComponentNames, isMarkdownFilePath, isMdxFilePath, isRegisteredComponent, jsx, jsxs, lintCodeBlocks, lintMarkdown, lintMarkdownAsync, lintMarkdownFile, lintMarkdownFiles, mergeThemes, mermaidClientScript, normalizeMarkdownExtensions, normalizeVitePressFrontmatter, oxContent, parseGitHubLineRange, parseGitHubPermalink, parsePageChromeFlags, partitionPublishedPages, prefetchGitHubRepos, prefetchGitHubSources, prefetchOgpData, raw, readingTimeMinutes, renderAllPages, renderHtmlToFrameworkCode, renderHtmlToReactComponent, renderHtmlToReactCreateElement, renderHtmlToSvelteComponent, renderHtmlToVueComponent, renderHtmlToVueH, renderIslandComponentImports, renderMarkdownStream, renderPage, renderToString, resolveBadgeOptions, resolveBlogCollectionName, resolveBlogOptions, resolveBuiltinEmbedOptions, resolveCardOptions, resolveCascadeOptions, resolveCollectionsOptions, resolveContentRootPath, resolveDocsOptions, resolveDocumentComponentImports, resolveFeedsOptions, resolveFileTreeOptions, resolveHeaderNavItems, resolveI18nOptions, resolveImageOptions, resolveIncludeOptions, resolveLocaleLabel, resolveMathOptions, resolveMdxForFilePath, resolveNotFoundOptions, resolveOgImageOptions, resolvePageChromeOption, resolvePermalinksOptions, resolvePublishStateOptions, resolvePwaOptions, resolveRedirectsOptions, resolveResourcesOptions, resolveSearchOptions, resolveSectionIndexOptions, resolveSiteMapsOptions, resolveSsgOptions, resolveStepsOptions, resolveTaxonomiesOptions, resolveTeamOptions, resolveTheme, resolveTypedHoverOptions, resolveVersionsOptions, runDocsTests, setRenderContext, shouldLintMarkdownFile, stripMarkdownExtension, stripViteQuery, transformAllPlugins, transformGitHub, transformIslands, transformMarkdown, transformMermaidStatic, transformOgp, transformTabs, transformYouTube, typecheckCodeBlocks, useIsActive, useNav, usePageProps, useRenderContext, useSiteConfig, when, writeDocs, writeDocsTestFiles, writeSearchIndex };
4082
5772
  //# sourceMappingURL=index.d.cts.map