@ox-content/vite-plugin 3.0.0-alpha.1 → 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/api.cjs +6563 -0
- package/dist/api.cjs.map +1 -0
- package/dist/api.mjs +6456 -0
- package/dist/api.mjs.map +1 -0
- package/dist/index.cjs +3650 -240
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +629 -8
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +629 -8
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3694 -307
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -2
package/dist/index.d.mts
CHANGED
|
@@ -371,6 +371,11 @@ interface GitHubSourceRef {
|
|
|
371
371
|
permalink: string;
|
|
372
372
|
lines?: GitHubLineRange;
|
|
373
373
|
}
|
|
374
|
+
interface GitHubSourceCommit {
|
|
375
|
+
sha: string;
|
|
376
|
+
message: string;
|
|
377
|
+
html_url: string;
|
|
378
|
+
}
|
|
374
379
|
interface GitHubSourceData {
|
|
375
380
|
repo: string;
|
|
376
381
|
ref: string;
|
|
@@ -380,6 +385,7 @@ interface GitHubSourceData {
|
|
|
380
385
|
size: number;
|
|
381
386
|
html_url: string;
|
|
382
387
|
language: string | null;
|
|
388
|
+
commit?: GitHubSourceCommit;
|
|
383
389
|
}
|
|
384
390
|
interface GitHubOptions {
|
|
385
391
|
/**
|
|
@@ -672,6 +678,11 @@ interface BasePageProps {
|
|
|
672
678
|
toc: TocEntry[];
|
|
673
679
|
/** Last git commit timestamp in milliseconds */
|
|
674
680
|
lastUpdated?: number;
|
|
681
|
+
/** Unique git authors for this page */
|
|
682
|
+
contributors?: Array<{
|
|
683
|
+
name: string;
|
|
684
|
+
avatar?: string;
|
|
685
|
+
}>;
|
|
675
686
|
/** Source file path (relative to docs root) */
|
|
676
687
|
path: string;
|
|
677
688
|
/** Output URL path */
|
|
@@ -872,6 +883,11 @@ interface PageData {
|
|
|
872
883
|
toc: TocEntry[];
|
|
873
884
|
/** Last git commit timestamp in milliseconds */
|
|
874
885
|
lastUpdated?: number;
|
|
886
|
+
/** Unique git authors for this page */
|
|
887
|
+
contributors?: Array<{
|
|
888
|
+
name: string;
|
|
889
|
+
avatar?: string;
|
|
890
|
+
}>;
|
|
875
891
|
/** Source file path */
|
|
876
892
|
path: string;
|
|
877
893
|
/** Output URL path */
|
|
@@ -1187,6 +1203,17 @@ interface SsgOptions {
|
|
|
1187
1203
|
* @default false
|
|
1188
1204
|
*/
|
|
1189
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;
|
|
1190
1217
|
/**
|
|
1191
1218
|
* Show previous/next page links after the article.
|
|
1192
1219
|
*
|
|
@@ -1206,6 +1233,17 @@ interface SsgOptions {
|
|
|
1206
1233
|
* @default false
|
|
1207
1234
|
*/
|
|
1208
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;
|
|
1209
1247
|
/**
|
|
1210
1248
|
* Opt-in copy buttons, outbound-link icons, and a back-to-top control.
|
|
1211
1249
|
*
|
|
@@ -1267,6 +1305,27 @@ interface SsgOptions {
|
|
|
1267
1305
|
* @default false
|
|
1268
1306
|
*/
|
|
1269
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;
|
|
1270
1329
|
/**
|
|
1271
1330
|
* Absolute site URL used when generating social metadata.
|
|
1272
1331
|
*
|
|
@@ -1362,6 +1421,43 @@ interface A11yOptions {
|
|
|
1362
1421
|
type ResolvedA11y = false | {
|
|
1363
1422
|
skipLinkLabel: string;
|
|
1364
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
|
+
};
|
|
1365
1461
|
/**
|
|
1366
1462
|
* Resolved SSG options.
|
|
1367
1463
|
*/
|
|
@@ -1379,8 +1475,13 @@ interface ResolvedSsgOptions {
|
|
|
1379
1475
|
ogImage?: string;
|
|
1380
1476
|
generateOgImage: boolean;
|
|
1381
1477
|
lastUpdated: boolean;
|
|
1478
|
+
/**
|
|
1479
|
+
* Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
|
|
1480
|
+
*/
|
|
1481
|
+
contributors?: ResolvedContributors;
|
|
1382
1482
|
pagination: boolean;
|
|
1383
1483
|
breadcrumbs: boolean;
|
|
1484
|
+
jsonLd: ResolvedJsonLd;
|
|
1384
1485
|
readerChrome: ResolvedReaderChrome;
|
|
1385
1486
|
localeSwitcher: boolean;
|
|
1386
1487
|
a11y: ResolvedA11y;
|
|
@@ -1393,6 +1494,11 @@ interface ResolvedSsgOptions {
|
|
|
1393
1494
|
* Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
|
|
1394
1495
|
*/
|
|
1395
1496
|
team?: ResolvedTeamOptions;
|
|
1497
|
+
/**
|
|
1498
|
+
* Present after `resolveSsgOptions`. Omitted in hand-built fixtures means off.
|
|
1499
|
+
*/
|
|
1500
|
+
blog?: ResolvedBlogOptions;
|
|
1501
|
+
sectionIndex?: ResolvedSectionIndexOptions;
|
|
1396
1502
|
siteUrl?: string;
|
|
1397
1503
|
theme?: ResolvedThemeConfig;
|
|
1398
1504
|
navigation?: SsgNavigationGroup[];
|
|
@@ -1445,6 +1551,29 @@ interface TeamMember {
|
|
|
1445
1551
|
/**
|
|
1446
1552
|
* Opt-in team / members page.
|
|
1447
1553
|
*/
|
|
1554
|
+
/**
|
|
1555
|
+
* Opt-in git contributor list.
|
|
1556
|
+
*/
|
|
1557
|
+
interface ContributorsOptions {
|
|
1558
|
+
/**
|
|
1559
|
+
* Author names or emails to omit. Comparison is case-insensitive and
|
|
1560
|
+
* matches the full name or the full email.
|
|
1561
|
+
*/
|
|
1562
|
+
ignore?: string[];
|
|
1563
|
+
/**
|
|
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.
|
|
1567
|
+
*/
|
|
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
|
+
};
|
|
1448
1577
|
interface TeamOptions {
|
|
1449
1578
|
/**
|
|
1450
1579
|
* People rendered as static cards on `layout: team` pages.
|
|
@@ -1459,6 +1588,76 @@ interface ResolvedTeamOptions {
|
|
|
1459
1588
|
enabled: boolean;
|
|
1460
1589
|
members: TeamMember[];
|
|
1461
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 {
|
|
1599
|
+
/**
|
|
1600
|
+
* How children are rendered. `cards` is the default when the feature is on.
|
|
1601
|
+
* @default "cards"
|
|
1602
|
+
*/
|
|
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 {
|
|
1620
|
+
/**
|
|
1621
|
+
* Write `sw.js` and register it from themed pages.
|
|
1622
|
+
* @default true
|
|
1623
|
+
*/
|
|
1624
|
+
offline?: boolean;
|
|
1625
|
+
/**
|
|
1626
|
+
* Manifest `name`. Falls back to `ssg.siteName` when omitted.
|
|
1627
|
+
*/
|
|
1628
|
+
name?: string;
|
|
1629
|
+
/**
|
|
1630
|
+
* Manifest `short_name`. Falls back to `name` when omitted.
|
|
1631
|
+
*/
|
|
1632
|
+
shortName?: string;
|
|
1633
|
+
/**
|
|
1634
|
+
* Manifest / meta theme color. Hex (`#rgb` / `#rrggbb`) or a CSS color name.
|
|
1635
|
+
* @default "#000000"
|
|
1636
|
+
*/
|
|
1637
|
+
themeColor?: string;
|
|
1638
|
+
/**
|
|
1639
|
+
* Manifest background color. Hex or a CSS color name.
|
|
1640
|
+
* @default "#ffffff"
|
|
1641
|
+
*/
|
|
1642
|
+
backgroundColor?: string;
|
|
1643
|
+
/**
|
|
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
|
+
}
|
|
1462
1661
|
/**
|
|
1463
1662
|
* Opt-in crawl manifests written during SSG.
|
|
1464
1663
|
*/
|
|
@@ -1633,6 +1832,47 @@ interface ResolvedFeedsOptions {
|
|
|
1633
1832
|
limit: number;
|
|
1634
1833
|
path: string;
|
|
1635
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
|
+
}
|
|
1636
1876
|
/**
|
|
1637
1877
|
* Opt-in term list pages, per-term pages, and related-page lists.
|
|
1638
1878
|
*/
|
|
@@ -1830,6 +2070,18 @@ interface OxContentOptions {
|
|
|
1830
2070
|
* @default false
|
|
1831
2071
|
*/
|
|
1832
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;
|
|
1833
2085
|
/**
|
|
1834
2086
|
* Write RSS, Atom, and/or JSON Feed files from a named collection.
|
|
1835
2087
|
*
|
|
@@ -1842,6 +2094,19 @@ interface OxContentOptions {
|
|
|
1842
2094
|
* @default false
|
|
1843
2095
|
*/
|
|
1844
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;
|
|
1845
2110
|
/**
|
|
1846
2111
|
* Write tag/category term pages and inject related-page lists.
|
|
1847
2112
|
*
|
|
@@ -1989,6 +2254,22 @@ interface OxContentOptions {
|
|
|
1989
2254
|
* @default false
|
|
1990
2255
|
*/
|
|
1991
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;
|
|
1992
2273
|
/**
|
|
1993
2274
|
* Import source snippets into fences with `<<< @/path/to/file.ts{region}`.
|
|
1994
2275
|
*
|
|
@@ -2032,7 +2313,8 @@ interface OxContentOptions {
|
|
|
2032
2313
|
* Opt-in static directory trees from `file-tree` fences.
|
|
2033
2314
|
*
|
|
2034
2315
|
* Passing `true` or `{}` enables the transform. Names are escaped and never
|
|
2035
|
-
* read from the filesystem.
|
|
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.
|
|
2036
2318
|
*
|
|
2037
2319
|
* @default false
|
|
2038
2320
|
*/
|
|
@@ -2083,6 +2365,16 @@ interface OxContentOptions {
|
|
|
2083
2365
|
* @default false
|
|
2084
2366
|
*/
|
|
2085
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;
|
|
2086
2378
|
/**
|
|
2087
2379
|
* Extract runnable fenced examples for Vitest docs-as-tests harnesses.
|
|
2088
2380
|
*
|
|
@@ -2194,9 +2486,12 @@ interface ResolvedOptions {
|
|
|
2194
2486
|
permalinks?: ResolvedPermalinksOptions;
|
|
2195
2487
|
cascade?: ResolvedCascadeOptions;
|
|
2196
2488
|
redirects?: ResolvedRedirectsOptions;
|
|
2489
|
+
blog?: ResolvedBlogOptions;
|
|
2197
2490
|
feeds?: ResolvedFeedsOptions;
|
|
2491
|
+
pwa?: ResolvedPwaOptions;
|
|
2198
2492
|
taxonomies?: ResolvedTaxonomiesOptions;
|
|
2199
2493
|
versions?: ResolvedVersionsOptions;
|
|
2494
|
+
resources?: ResolvedResourcesOptions;
|
|
2200
2495
|
gfm: boolean;
|
|
2201
2496
|
mdx?: boolean;
|
|
2202
2497
|
footnotes: boolean;
|
|
@@ -2222,6 +2517,10 @@ interface ResolvedOptions {
|
|
|
2222
2517
|
cjkEmphasis: boolean;
|
|
2223
2518
|
codeBlockLint: ResolvedCodeBlockLintOptions;
|
|
2224
2519
|
codeBlockTypecheck: ResolvedCodeBlockTypecheckOptions;
|
|
2520
|
+
/**
|
|
2521
|
+
* Present after `resolveOptions`. Omitted in hand-built fixtures means off.
|
|
2522
|
+
*/
|
|
2523
|
+
typedHover?: ResolvedTypedHoverOptions;
|
|
2225
2524
|
docsTests: ResolvedDocsTestOptions;
|
|
2226
2525
|
mermaid: boolean;
|
|
2227
2526
|
math: ResolvedMathOptions;
|
|
@@ -2384,6 +2683,43 @@ interface ResolvedImageOptions {
|
|
|
2384
2683
|
enabled: boolean;
|
|
2385
2684
|
lazy: boolean;
|
|
2386
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
|
+
}
|
|
2387
2723
|
/**
|
|
2388
2724
|
* Options for expanding Obsidian-style wiki links.
|
|
2389
2725
|
*
|
|
@@ -2440,6 +2776,10 @@ interface ResolvedEmojiShortcodeOptions {
|
|
|
2440
2776
|
}
|
|
2441
2777
|
/**
|
|
2442
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.
|
|
2443
2783
|
*/
|
|
2444
2784
|
interface MathOptions {
|
|
2445
2785
|
/**
|
|
@@ -2565,6 +2905,20 @@ interface StepsOptions {
|
|
|
2565
2905
|
interface ResolvedStepsOptions {
|
|
2566
2906
|
enabled: boolean;
|
|
2567
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
|
+
}
|
|
2568
2922
|
/**
|
|
2569
2923
|
* Options for opt-in `file-tree` fences.
|
|
2570
2924
|
*/
|
|
@@ -2575,12 +2929,30 @@ interface FileTreeOptions {
|
|
|
2575
2929
|
* @default true
|
|
2576
2930
|
*/
|
|
2577
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;
|
|
2578
2944
|
}
|
|
2579
2945
|
/**
|
|
2580
2946
|
* Resolved file-tree transform options.
|
|
2581
2947
|
*/
|
|
2582
2948
|
interface ResolvedFileTreeOptions {
|
|
2583
2949
|
enabled: boolean;
|
|
2950
|
+
defaultOpen: boolean;
|
|
2951
|
+
icons: boolean;
|
|
2952
|
+
iconFolder?: string;
|
|
2953
|
+
iconFolderOpen?: string;
|
|
2954
|
+
iconFile?: string;
|
|
2955
|
+
iconFiles?: Record<string, string>;
|
|
2584
2956
|
}
|
|
2585
2957
|
/**
|
|
2586
2958
|
* Options for sanitizing rendered HTML.
|
|
@@ -2783,6 +3155,43 @@ interface ResolvedCodeBlockTypecheckOptions {
|
|
|
2783
3155
|
tsgoCommand: string;
|
|
2784
3156
|
mode: "warn" | "error";
|
|
2785
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
|
+
}
|
|
2786
3195
|
/**
|
|
2787
3196
|
* Options for extracting fenced examples into docs-as-tests fixtures.
|
|
2788
3197
|
*
|
|
@@ -2958,6 +3367,30 @@ interface MarkdownNode {
|
|
|
2958
3367
|
value?: string;
|
|
2959
3368
|
[key: string]: unknown;
|
|
2960
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
|
+
}
|
|
2961
3394
|
/**
|
|
2962
3395
|
* Transform result.
|
|
2963
3396
|
*/
|
|
@@ -2982,6 +3415,18 @@ interface TransformResult {
|
|
|
2982
3415
|
* Table of contents.
|
|
2983
3416
|
*/
|
|
2984
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[];
|
|
2985
3430
|
}
|
|
2986
3431
|
/**
|
|
2987
3432
|
* Table of contents entry.
|
|
@@ -3851,6 +4296,9 @@ declare function resolveStepsOptions(options: OxContentOptions["steps"]): Resolv
|
|
|
3851
4296
|
//#region src/file-tree-options.d.ts
|
|
3852
4297
|
declare function resolveFileTreeOptions(options: OxContentOptions["fileTree"]): ResolvedOptions["fileTree"];
|
|
3853
4298
|
//#endregion
|
|
4299
|
+
//#region src/typed-hover.d.ts
|
|
4300
|
+
declare function resolveTypedHoverOptions(options: OxContentOptions["typedHover"]): ResolvedOptions["typedHover"];
|
|
4301
|
+
//#endregion
|
|
3854
4302
|
//#region src/environment.d.ts
|
|
3855
4303
|
/**
|
|
3856
4304
|
* Creates the Markdown processing environment configuration.
|
|
@@ -4017,6 +4465,9 @@ declare function renderMarkdownStream(chunks: MarkdownChunkSource, options?: Inc
|
|
|
4017
4465
|
* - `html` (string): Rendered HTML content with all enhancements applied
|
|
4018
4466
|
* - `frontmatter` (object): Parsed YAML frontmatter as JavaScript object
|
|
4019
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
|
|
4020
4471
|
* - `render` (function): Client-side render function for dynamic updates
|
|
4021
4472
|
*
|
|
4022
4473
|
* ## Markdown Features Supported
|
|
@@ -4091,6 +4542,135 @@ interface SsgTransformOptions {
|
|
|
4091
4542
|
}
|
|
4092
4543
|
declare function transformMarkdown(source: string, filePath: string, options: ResolvedOptions, ssgOptions?: SsgTransformOptions): Promise<TransformResult>;
|
|
4093
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
|
|
4094
4674
|
//#region src/resolve-image-options.d.ts
|
|
4095
4675
|
declare function resolveImageOptions(options: OxContentOptions["images"]): ResolvedOptions["images"];
|
|
4096
4676
|
//#endregion
|
|
@@ -4118,6 +4698,7 @@ interface FrameworkMarkdownOptions {
|
|
|
4118
4698
|
math?: boolean | {
|
|
4119
4699
|
enabled?: boolean;
|
|
4120
4700
|
};
|
|
4701
|
+
mdx?: boolean;
|
|
4121
4702
|
}
|
|
4122
4703
|
interface FrameworkComponentIsland {
|
|
4123
4704
|
name: string;
|
|
@@ -4794,6 +5375,32 @@ declare function resolveRedirectsOptions(value: boolean | RedirectsOptions | Rec
|
|
|
4794
5375
|
*/
|
|
4795
5376
|
declare function resolveFeedsOptions(value: boolean | FeedsOptions | undefined): ResolvedFeedsOptions;
|
|
4796
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
|
|
4797
5404
|
//#region src/taxonomies.d.ts
|
|
4798
5405
|
/**
|
|
4799
5406
|
* Resolves `taxonomies` with defaults.
|
|
@@ -4810,6 +5417,17 @@ declare function resolveTaxonomiesOptions(value: boolean | TaxonomiesOptions | u
|
|
|
4810
5417
|
*/
|
|
4811
5418
|
declare function resolveVersionsOptions(value: boolean | VersionsOptions | undefined): ResolvedVersionsOptions;
|
|
4812
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
|
|
4813
5431
|
//#region src/team.d.ts
|
|
4814
5432
|
/**
|
|
4815
5433
|
* Resolves `ssg.team` with defaults.
|
|
@@ -4819,6 +5437,15 @@ declare function resolveVersionsOptions(value: boolean | VersionsOptions | undef
|
|
|
4819
5437
|
*/
|
|
4820
5438
|
declare function resolveTeamOptions(value: boolean | TeamOptions | undefined): ResolvedTeamOptions;
|
|
4821
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
|
|
4822
5449
|
//#region src/search.d.ts
|
|
4823
5450
|
/**
|
|
4824
5451
|
* Resolves search options with defaults.
|
|
@@ -4844,12 +5471,6 @@ declare function resolveCollectionsOptions(options: CollectionsOptions | boolean
|
|
|
4844
5471
|
declare function buildCollectionManifest(root: string, options: ResolvedOptions): Promise<CollectionManifest>;
|
|
4845
5472
|
declare function generateCollectionsVirtualModule(root: string, options: ResolvedOptions): Promise<string>;
|
|
4846
5473
|
//#endregion
|
|
4847
|
-
//#region src/markdown.d.ts
|
|
4848
|
-
declare const DEFAULT_MARKDOWN_EXTENSIONS: readonly [".md", ".markdown", ".mdx"];
|
|
4849
|
-
declare function normalizeMarkdownExtensions(extensions?: readonly string[]): string[];
|
|
4850
|
-
declare function isMarkdownFilePath(filePath: string, extensions?: readonly string[]): boolean;
|
|
4851
|
-
declare function stripMarkdownExtension(filePath: string, extensions?: readonly string[]): string;
|
|
4852
|
-
//#endregion
|
|
4853
5474
|
//#region src/vitepress.d.ts
|
|
4854
5475
|
interface VitePressLogo {
|
|
4855
5476
|
light?: string;
|
|
@@ -5147,5 +5768,5 @@ declare function resolveBadgeOptions(options: OxContentOptions["badges"]): Resol
|
|
|
5147
5768
|
*/
|
|
5148
5769
|
declare function generateVirtualModule(path: string, options: ResolvedOptions): string;
|
|
5149
5770
|
//#endregion
|
|
5150
|
-
export { A11yOptions, AttrsOptions, BadgeOptions, type BasePageProps, BuiltinEmbedOptions, BuiltinPmOptions, CardOptions, CascadeOptions, CodeAnnotationKind, CodeAnnotationSyntax, CodeAnnotationsOptions, type CodeBlockDiagnostic, CodeBlockLintOptions, CodeBlockTypecheckOptions, CodeImportOptions, type CollectedDocsTest, CollectionEntry, CollectionIncludeField, CollectionManifest, CollectionOptions, CollectionQueryBuilder, CollectionQueryOperator, CollectionsOptions, ContainerOptions, ContainerTypeOptions, 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, FeedFormat, FeedsOptions, 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 GitHubSourceData, type GitHubSourceRef, 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, 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, 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, ParamDoc, type ParseIslandsResult, PermalinksOptions, PublishStateOptions, ReaderChromeOptions, RedirectsOptions, type RenderContext, ResolvedA11y, ResolvedAttrsOptions, ResolvedBadgeOptions, ResolvedBuiltinEmbedOptions, ResolvedCardOptions, ResolvedCascadeOptions, ResolvedCodeAnnotationsOptions, ResolvedCodeBlockLintOptions, ResolvedCodeBlockTypecheckOptions, ResolvedCodeImportOptions, ResolvedCollectionOptions, ResolvedCollectionsOptions, ResolvedContainerOptions, ResolvedDocsEntryPoint, ResolvedDocsOptions, ResolvedDocsTestOptions, ResolvedEditThisPageOptions, ResolvedEmojiShortcodeOptions, ResolvedFeedsOptions, ResolvedFileTreeOptions, ResolvedI18nOptions, ResolvedImageOptions, ResolvedIncludeOptions, ResolvedMathOptions, ResolvedNotFoundOptions, ResolvedOgImageOptions, ResolvedOptions, ResolvedPermalinksOptions, ResolvedPublishStateOptions, ResolvedReaderChrome, ResolvedRedirectsOptions, ResolvedSanitizeOptions, ResolvedSearchOptions, ResolvedSiteMapsOptions, ResolvedSsgOptions, ResolvedStepsOptions, ResolvedTaxonomiesOptions, ResolvedTeamOptions, type ResolvedThemeConfig, ResolvedVersionEntry, ResolvedVersionsOptions, ResolvedWikiLinkOptions, ReturnDoc, type RunDocsTestsOptions, SanitizeOptions, ScopedSearchQuery, SearchDocument, SearchOptions, SearchResult, 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, VersionBannerKind, VersionEntry, VersionsOptions, type VitePressConfig, type VitePressFooter, type VitePressLogo, type VitePressNavItem, type VitePressSidebar, type VitePressSidebarItem, type VitePressSocialLink, type VitePressThemeConfig, WikiLinkOptions, type WrittenDocsTestFile, type YouTubeOptions, buildCollectionManifest, buildSearchIndex, buildSsg, classifyPublishState, 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, parsePageChromeFlags, partitionPublishedPages, prefetchGitHubRepos, prefetchGitHubSources, prefetchOgpData, raw, renderAllPages, renderHtmlToFrameworkCode, renderHtmlToReactComponent, renderHtmlToReactCreateElement, renderHtmlToSvelteComponent, renderHtmlToVueComponent, renderHtmlToVueH, renderMarkdownStream, renderPage, renderToString, resolveBadgeOptions, resolveBuiltinEmbedOptions, resolveCardOptions, resolveCascadeOptions, resolveCollectionsOptions, resolveDocsOptions, resolveFeedsOptions, resolveFileTreeOptions, resolveHeaderNavItems, resolveI18nOptions, resolveImageOptions, resolveIncludeOptions, resolveLocaleLabel, resolveMathOptions, resolveNotFoundOptions, resolveOgImageOptions, resolvePageChromeOption, resolvePermalinksOptions, resolvePublishStateOptions, resolveRedirectsOptions, resolveSearchOptions, resolveSiteMapsOptions, resolveSsgOptions, resolveStepsOptions, resolveTaxonomiesOptions, resolveTeamOptions, resolveTheme, resolveVersionsOptions, 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 };
|
|
5151
5772
|
//# sourceMappingURL=index.d.mts.map
|