@ox-content/napi 3.0.0-alpha.1 → 3.0.0-alpha.11

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.
Files changed (3) hide show
  1. package/index.d.ts +879 -9
  2. package/index.js +15 -0
  3. package/package.json +8 -8
package/index.d.ts CHANGED
@@ -149,6 +149,12 @@ export declare function extractSsgTitle(content: string, frontmatterTitle?: stri
149
149
  */
150
150
  export declare function extractTranslationKeys(source: string, filePath: string, functionNames?: Array<string> | undefined | null): Array<I18NKeyUsage>
151
151
 
152
+ /**
153
+ * Extracts a YouTube video id from a bare id or a watch / share / embed /
154
+ * shorts URL, returning `null` when the input names no video.
155
+ */
156
+ export declare function extractYoutubeVideoId(input: string): string | null
157
+
152
158
  /** Formats a file or directory segment as an SSG title. */
153
159
  export declare function formatSsgTitle(name: string): string
154
160
 
@@ -172,6 +178,9 @@ export declare function generateDocsNavMetadata(files: Array<string>, basePath?:
172
178
  */
173
179
  export declare function generateDocsNavMetadataFromDocs(docs: Array<JsDocsMarkdownModule>, options?: JsDocsNavOptions | undefined | null): Array<JsDocsNavItem>
174
180
 
181
+ /** Builds RSS / Atom / JSON Feed bodies without writing files. */
182
+ export declare function generateFeedBodies(options: JsFeedsOptions, items: Array<JsFeedItem>): JsFeedsOutput
183
+
175
184
  /** Generates the `virtual:ox-content/i18n` runtime module. */
176
185
  export declare function generateI18nModule(dictDir: string, config: JsI18NRuntimeConfig): string
177
186
 
@@ -183,12 +192,18 @@ export declare function generateI18nModule(dictDir: string, config: JsI18NRuntim
183
192
  */
184
193
  export declare function generateOgImageSvg(data: JsOgImageData, config?: JsOgImageConfig | undefined | null): string
185
194
 
195
+ /** Generates static OpenAPI reference Markdown pages from local JSON/YAML files. */
196
+ export declare function generateOpenApiDocs(inputs: Array<JsOpenApiDocsInput>, options?: JsOpenApiDocsOptions | undefined | null): JsGeneratedOpenApiDocs
197
+
186
198
  /** Generates the client-side search runtime module. */
187
199
  export declare function generateSearchModule(optionsJson: string, indexPath: string): string
188
200
 
189
201
  /** Generates the client-side search runtime module from typed options. */
190
202
  export declare function generateSearchModuleFromOptions(options: JsSearchRuntimeOptions, indexPath: string): string
191
203
 
204
+ /** Builds `sitemap.xml`, `robots.txt`, and `llms.txt` bodies without writing files. */
205
+ export declare function generateSiteMapBodies(options: JsSiteMapsOptions, pages: Array<JsSiteMapPage>): JsSiteMapsOutput
206
+
192
207
  /** Generates a bare SSG HTML page without navigation or styles. */
193
208
  export declare function generateSsgBareHtml(content: string, title: string): string
194
209
 
@@ -196,7 +211,10 @@ export declare function generateSsgBareHtml(content: string, title: string): str
196
211
  export declare function generateSsgBarePage(page: JsSsgBarePage): string
197
212
 
198
213
  /** Generates SSG HTML page with navigation and search. */
199
- export declare function generateSsgHtml(pageData: JsSsgPageData, navGroups: Array<JsSsgNavGroup>, config: JsSsgConfig): string
214
+ export declare function generateSsgHtml(pageData: JsSsgPageData, navGroups: Array<JsSsgNavGroup>, config: JsSsgConfig): JsSsgHtmlResult
215
+
216
+ /** Returns unique git authors for a file. Empty when git is missing or fails. */
217
+ export declare function getGitContributors(filePath: string, root?: string | undefined | null): Array<JsGitContributor>
200
218
 
201
219
  /** Returns the last git commit timestamp for a file in milliseconds. */
202
220
  export declare function getGitLastUpdated(filePath: string, root?: string | undefined | null): number | null
@@ -326,12 +344,37 @@ export interface IncrementalMarkdownRenderResult {
326
344
  errors: Array<string>
327
345
  }
328
346
 
347
+ /** Same-origin path check: leading `/`, not `//`, and no scheme. */
348
+ export declare function isSafeRedirectDest(value: string): boolean
349
+
329
350
  /** Opt-in skip link and print styles. Presence of the object enables the feature. */
330
351
  export interface JsA11y {
331
352
  /** Override for the skip-link label. Empty / omitted uses "Skip to content". */
332
353
  skipLinkLabel?: string
333
354
  }
334
355
 
356
+ /** Opt-in abbreviation and glossary expansion. */
357
+ export interface JsAbbreviationsOptions {
358
+ /**
359
+ * Enable `*[TERM]: expansion` and config-term rewriting.
360
+ *
361
+ * Default: `false`.
362
+ */
363
+ enabled?: boolean
364
+ /**
365
+ * Central glossary terms. Keys are matched with Unicode word boundaries.
366
+ *
367
+ * Default: `{}`.
368
+ */
369
+ terms?: Record<string, string>
370
+ /**
371
+ * Wrap only the first occurrence of each term.
372
+ *
373
+ * Default: `false` (every occurrence).
374
+ */
375
+ firstUseOnly?: boolean
376
+ }
377
+
335
378
  /** Attribute syntax transform options. */
336
379
  export interface JsAttrsOptions {
337
380
  /**
@@ -424,6 +467,16 @@ export interface JsCodeBlockLintOptions {
424
467
  trailingSpaces?: boolean
425
468
  }
426
469
 
470
+ /** Opt-in `::: code-group` fence groups. */
471
+ export interface JsCodeGroupOptions {
472
+ /**
473
+ * Enable VitePress-style `::: code-group` rewriting.
474
+ *
475
+ * Default: `false`.
476
+ */
477
+ enabled?: boolean
478
+ }
479
+
427
480
  /** Code import / snippet injection options. */
428
481
  export interface JsCodeImportOptions {
429
482
  /**
@@ -449,6 +502,22 @@ export interface JsCollectionDefinition {
449
502
  include: Array<string>
450
503
  }
451
504
 
505
+ /** Opt-in static `::: if` / `::: else` conditional blocks. */
506
+ export interface JsConditionalBlockOptions {
507
+ /**
508
+ * Enable conditional block evaluation.
509
+ *
510
+ * Default: `true` when the options object is supplied.
511
+ */
512
+ enabled?: boolean
513
+ /**
514
+ * Build-time values available as `config.*` or bare identifiers.
515
+ *
516
+ * Default: `{}`.
517
+ */
518
+ values?: Record<string, any>
519
+ }
520
+
452
521
  /** Opt-in `::: tip` custom containers. */
453
522
  export interface JsContainerOptions {
454
523
  /**
@@ -469,6 +538,81 @@ export interface JsContainerTypeOptions {
469
538
  tag?: string
470
539
  }
471
540
 
541
+ /** One rule the document broke. */
542
+ export interface JsCrossReferenceDiagnostic {
543
+ /** `"error"` or `"warn"`, as the options asked. */
544
+ policy: string
545
+ message: string
546
+ }
547
+
548
+ /** One numbered target the document defines. */
549
+ export interface JsCrossReferenceEntry {
550
+ id: string
551
+ /** `"figure"`, `"table"`, or `"section"`. */
552
+ kind: string
553
+ number: string
554
+ label: string
555
+ text: string
556
+ href: string
557
+ title?: string
558
+ }
559
+
560
+ /** The word placed before each number, per kind. */
561
+ export interface JsCrossReferenceLabels {
562
+ figure?: string
563
+ table?: string
564
+ section?: string
565
+ }
566
+
567
+ /** The annotated HTML, what it defined, and what it got wrong. */
568
+ export interface JsCrossReferenceOutput {
569
+ html: string
570
+ references: Array<JsCrossReferenceEntry>
571
+ diagnostics: Array<JsCrossReferenceDiagnostic>
572
+ }
573
+
574
+ /** Switches and labels for the cross-reference pass. */
575
+ export interface JsCrossReferencesOptions {
576
+ enabled: boolean
577
+ /** `"warn"` reports and carries on; anything else fails the build. */
578
+ missing?: string
579
+ duplicates?: string
580
+ mismatches?: string
581
+ labels?: JsCrossReferenceLabels
582
+ }
583
+
584
+ /** Opt-in static `csv-table` / `json-table` fences. */
585
+ export interface JsDataTableOptions {
586
+ /**
587
+ * Enable `csv-table` and `json-table` fences.
588
+ *
589
+ * Default: `false`.
590
+ */
591
+ enabled?: boolean
592
+ /**
593
+ * Root directory used for `@/` and absolute data-table imports.
594
+ *
595
+ * Default: project root from the JavaScript caller.
596
+ */
597
+ rootDir?: string
598
+ /**
599
+ * What to do when an imported file is missing.
600
+ *
601
+ * Default: `"error"`.
602
+ */
603
+ missing?: string
604
+ }
605
+
606
+ /** Opt-in PHP Markdown Extra / mdBook-style definition lists. */
607
+ export interface JsDefinitionListOptions {
608
+ /**
609
+ * Enable `Term` / `: definition` expansion.
610
+ *
611
+ * Default: `false`.
612
+ */
613
+ enabled?: boolean
614
+ }
615
+
472
616
  /** Normalized documentation entry used by generated API docs. */
473
617
  export interface JsDocEntry {
474
618
  name: string
@@ -754,6 +898,24 @@ export interface JsEditThisPageOptions {
754
898
  label?: string
755
899
  }
756
900
 
901
+ /**
902
+ * Transform opt-in static media embed components in already-rendered HTML.
903
+ * One tag an enabled provider refused, and what the transform did instead.
904
+ */
905
+ export interface JsEmbedDiagnostic {
906
+ /** Tag name as the provider registers it, for example `speakerdeck`. */
907
+ provider: string
908
+ /** The URL the tag carried, when it carried one worth naming. */
909
+ url?: string
910
+ /** 1-based line of the opening tag in the transformed HTML. */
911
+ line: number
912
+ /**
913
+ * `"linked"` when the tag became a plain link, `"kept"` when its markup
914
+ * was left as authored.
915
+ */
916
+ fallback: string
917
+ }
918
+
757
919
  /** Emoji-shortcode transform options. */
758
920
  export interface JsEmojiShortcodeOptions {
759
921
  /**
@@ -864,6 +1026,65 @@ export interface JsFeatureConfig {
864
1026
  linkText?: string
865
1027
  }
866
1028
 
1029
+ /** A file carried alongside a feed item. */
1030
+ export interface JsFeedAttachment {
1031
+ url: string
1032
+ mimeType?: string
1033
+ title?: string
1034
+ sizeInBytes?: number
1035
+ durationInSeconds?: number
1036
+ }
1037
+
1038
+ /** A person credited on a feed item. */
1039
+ export interface JsFeedAuthor {
1040
+ name: string
1041
+ url?: string
1042
+ }
1043
+
1044
+ /** One collection entry considered for a feed. */
1045
+ export interface JsFeedItem {
1046
+ title: string
1047
+ description?: string
1048
+ loc: string
1049
+ date?: string
1050
+ lastUpdated?: string
1051
+ draft?: boolean
1052
+ unlisted?: boolean
1053
+ content?: string
1054
+ id?: string
1055
+ authors?: Array<JsFeedAuthor>
1056
+ image?: string
1057
+ attachments?: Array<JsFeedAttachment>
1058
+ language?: string
1059
+ }
1060
+
1061
+ /** Switches and site metadata for feed generation. */
1062
+ export interface JsFeedsOptions {
1063
+ enabled: boolean
1064
+ siteUrl?: string
1065
+ siteName: string
1066
+ siteDescription?: string
1067
+ homePageUrl: string
1068
+ rssUrl: string
1069
+ atomUrl: string
1070
+ jsonUrl: string
1071
+ /** Any of `"rss"`, `"atom"`, `"json"`. Unknown names are ignored. */
1072
+ formats: Array<string>
1073
+ limit: number
1074
+ language?: string
1075
+ image?: string
1076
+ favicon?: string
1077
+ copyright?: string
1078
+ }
1079
+
1080
+ /** Generated feed bodies, or a warning when generation is skipped. */
1081
+ export interface JsFeedsOutput {
1082
+ rssXml?: string
1083
+ atomXml?: string
1084
+ jsonFeed?: string
1085
+ warning?: string
1086
+ }
1087
+
867
1088
  /** Opt-in static `file-tree` fences. */
868
1089
  export interface JsFileTreeOptions {
869
1090
  /**
@@ -872,6 +1093,26 @@ export interface JsFileTreeOptions {
872
1093
  * Default: `false`.
873
1094
  */
874
1095
  enabled?: boolean
1096
+ /**
1097
+ * Open directory `<details>` by default.
1098
+ *
1099
+ * Default: `true`.
1100
+ */
1101
+ defaultOpen?: boolean
1102
+ /**
1103
+ * Render folder and file icons.
1104
+ *
1105
+ * Default: `true`.
1106
+ */
1107
+ icons?: boolean
1108
+ /** Trusted SVG markup or class tokens for collapsed folders. */
1109
+ iconFolder?: string
1110
+ /** Trusted SVG markup or class tokens for open folders. */
1111
+ iconFolderOpen?: string
1112
+ /** Trusted SVG markup or class tokens for files. */
1113
+ iconFile?: string
1114
+ /** Trusted SVG markup or class tokens keyed by file extension. */
1115
+ iconFiles?: Record<string, string>
875
1116
  }
876
1117
 
877
1118
  export interface JsFrameworkComponentIsland {
@@ -881,6 +1122,22 @@ export interface JsFrameworkComponentIsland {
881
1122
  content?: string
882
1123
  }
883
1124
 
1125
+ /** Generated OpenAPI Markdown pages and navigation metadata. */
1126
+ export interface JsGeneratedOpenApiDocs {
1127
+ pages: Record<string, string>
1128
+ nav: Array<JsDocsNavItem>
1129
+ }
1130
+
1131
+ /** One unique git author returned by `getGitContributors`. */
1132
+ export interface JsGitContributor {
1133
+ /** Author name from `%an`. */
1134
+ name: string
1135
+ /** Author email from `%ae`. Never rendered into `href`. */
1136
+ email?: string
1137
+ /** Number of commits attributed to this author on the file. */
1138
+ commits?: number
1139
+ }
1140
+
884
1141
  /** Export graph resolution options. */
885
1142
  export interface JsGraphOptions {
886
1143
  root?: string
@@ -889,6 +1146,12 @@ export interface JsGraphOptions {
889
1146
  externalPackageSources?: Array<JsExternalPackageSource>
890
1147
  }
891
1148
 
1149
+ /** One page-head validation finding. */
1150
+ export interface JsHeadDiagnostic {
1151
+ strict: boolean
1152
+ message: string
1153
+ }
1154
+
892
1155
  /** Header nav link or dropdown. */
893
1156
  export interface JsHeaderNavItem {
894
1157
  /** Display label. */
@@ -987,6 +1250,34 @@ export interface JsI18NRuntimeLocale {
987
1250
  dir?: string
988
1251
  }
989
1252
 
1253
+ /** Opt-in static `::: gallery` image groups. */
1254
+ export interface JsImageGalleryOptions {
1255
+ /**
1256
+ * Enable static image gallery blocks.
1257
+ *
1258
+ * Default: `false`.
1259
+ */
1260
+ enabled?: boolean
1261
+ /**
1262
+ * Add `loading="lazy"` to images inside galleries.
1263
+ *
1264
+ * Default: follows `images.lazy`, or `true` when `images` is disabled.
1265
+ */
1266
+ lazy?: boolean
1267
+ /**
1268
+ * Validation mode for images with empty alt text.
1269
+ *
1270
+ * Default: `"error"`.
1271
+ */
1272
+ missingAlt?: string
1273
+ /**
1274
+ * Validation mode for galleries without image items.
1275
+ *
1276
+ * Default: `"error"`.
1277
+ */
1278
+ empty?: string
1279
+ }
1280
+
990
1281
  /** Opt-in figures, captions, and lazy images. */
991
1282
  export interface JsImageOptions {
992
1283
  /**
@@ -1039,6 +1330,48 @@ export interface JsIncrementalRenderOptions {
1039
1330
  completeInline?: boolean
1040
1331
  }
1041
1332
 
1333
+ /** Opt-in JSON-LD structured data. Presence of the object enables the feature. */
1334
+ export interface JsJsonLd {
1335
+ /** When false, omit BreadcrumbList even if a visible trail exists. */
1336
+ breadcrumbs?: boolean
1337
+ /** Optional publisher. Missing fields are not invented. */
1338
+ publisher?: JsJsonLdPublisher
1339
+ /** Site origin used for `@id` / `url`. */
1340
+ siteUrl?: string
1341
+ pageType?: string
1342
+ graph?: Array<string>
1343
+ }
1344
+
1345
+ /** Optional JSON-LD publisher. Only configured fields are emitted. */
1346
+ export interface JsJsonLdPublisher {
1347
+ /** Organization name. */
1348
+ name?: string
1349
+ /** Organization URL. Unsafe schemes are dropped. */
1350
+ url?: string
1351
+ }
1352
+
1353
+ /** Opt-in `{kbd:...}` inline keyboard keys. */
1354
+ export interface JsKeyboardKeysOptions {
1355
+ /**
1356
+ * Enable `{kbd:Ctrl+K}` expansion.
1357
+ *
1358
+ * Default: `false`.
1359
+ */
1360
+ enabled?: boolean
1361
+ /**
1362
+ * Build-time key aliases. Keys are matched case-insensitively.
1363
+ *
1364
+ * Default: `{}`.
1365
+ */
1366
+ aliases?: Record<string, string>
1367
+ /**
1368
+ * Label style for built-in aliases: `"words"` or `"symbols"`.
1369
+ *
1370
+ * Default: `"words"`.
1371
+ */
1372
+ style?: string
1373
+ }
1374
+
1042
1375
  /** Locale information for the locale switcher. */
1043
1376
  export interface JsLocaleInfo {
1044
1377
  /** BCP 47 locale tag. */
@@ -1059,6 +1392,52 @@ export interface JsLocalePath {
1059
1392
  root?: string
1060
1393
  }
1061
1394
 
1395
+ /** One configured magic-link alias. */
1396
+ export interface JsMagicLinkAlias {
1397
+ /** Absolute `http:` / `https:` URL. */
1398
+ href: string
1399
+ /** Optional display label. Defaults to the alias key. */
1400
+ label?: string
1401
+ /** Optional avatar or favicon URL. */
1402
+ image?: string
1403
+ }
1404
+
1405
+ /** Replace the resolved image for matching hrefs. */
1406
+ export interface JsMagicLinkImageOverride {
1407
+ /** Exact href to replace. */
1408
+ href?: string
1409
+ /** Href prefix to replace. */
1410
+ prefix?: string
1411
+ /** Replacement image URL. Must be `http:` or `https:`. */
1412
+ image: string
1413
+ }
1414
+
1415
+ /** Opt-in `{link:...}` rich magic links. */
1416
+ export interface JsMagicLinkOptions {
1417
+ /**
1418
+ * Enable `{link:@user}`, `{link:alias}`, and `{link:label|url}`.
1419
+ *
1420
+ * Default: `false`.
1421
+ */
1422
+ enabled?: boolean
1423
+ /** Named aliases mapped to href / label / image. */
1424
+ aliases?: Record<string, JsMagicLinkAlias>
1425
+ /**
1426
+ * Emit a favicon URL for explicit links that have no image.
1427
+ *
1428
+ * Default: `false`. No transform-time network request.
1429
+ */
1430
+ favicon?: boolean
1431
+ /**
1432
+ * Favicon URL template with a `{host}` placeholder.
1433
+ *
1434
+ * Default: `https://{host}/favicon.ico` when `favicon` is true.
1435
+ */
1436
+ faviconTemplate?: string
1437
+ /** Image replacements applied after alias / GitHub / favicon resolution. */
1438
+ imageOverrides?: Array<JsMagicLinkImageOverride>
1439
+ }
1440
+
1062
1441
  export interface JsMarkdownLintDiagnostic {
1063
1442
  ruleId: string
1064
1443
  severity: string
@@ -1126,6 +1505,18 @@ export interface JsMediaEmbedsOptions {
1126
1505
  * Default: `false`.
1127
1506
  */
1128
1507
  spotify?: boolean
1508
+ /**
1509
+ * Render `<AppleMusic>` embeds.
1510
+ *
1511
+ * Default: `false`.
1512
+ */
1513
+ appleMusic?: boolean
1514
+ /**
1515
+ * Render `<SpeakerDeck>` embeds.
1516
+ *
1517
+ * Default: `false`.
1518
+ */
1519
+ speakerDeck?: boolean
1129
1520
  /**
1130
1521
  * Render `<StackBlitz>` embeds.
1131
1522
  *
@@ -1144,12 +1535,124 @@ export interface JsMediaEmbedsOptions {
1144
1535
  * Default: `false`.
1145
1536
  */
1146
1537
  bluesky?: boolean
1538
+ /**
1539
+ * Render `<GoogleMaps>` static place cards.
1540
+ *
1541
+ * Default: `false`.
1542
+ */
1543
+ googleMaps?: boolean
1544
+ /**
1545
+ * Render `<Qiita>` static article cards.
1546
+ *
1547
+ * Default: `false`.
1548
+ */
1549
+ qiita?: boolean
1550
+ /**
1551
+ * Render `<Zenn>` static article cards.
1552
+ *
1553
+ * Default: `false`.
1554
+ */
1555
+ zenn?: boolean
1556
+ /**
1557
+ * Render package registry cards for npm, crates.io, PyPI, and Docker Hub.
1558
+ *
1559
+ * Default: `false`.
1560
+ */
1561
+ packageRegistry?: boolean
1562
+ /**
1563
+ * Render `<CodePen>`, `<JSFiddle>`, and `<Observable>` playground cards.
1564
+ *
1565
+ * Default: `false`.
1566
+ */
1567
+ playgrounds?: boolean
1568
+ /**
1569
+ * Render `<Vimeo>` video cards.
1570
+ *
1571
+ * Default: `false`.
1572
+ */
1573
+ vimeo?: boolean
1574
+ /**
1575
+ * Render `<Twitch>` video, clip, and channel cards.
1576
+ *
1577
+ * Default: `false`.
1578
+ */
1579
+ twitch?: boolean
1580
+ /**
1581
+ * Render `<Discord>` static invite/message cards.
1582
+ *
1583
+ * Default: `false`.
1584
+ */
1585
+ discord?: boolean
1586
+ /**
1587
+ * Render `<Fediverse>`, `<Mastodon>`, `<Misskey>`, and `<Mixi2>` static post cards.
1588
+ *
1589
+ * Default: `false`.
1590
+ */
1591
+ fediverse?: boolean
1592
+ /**
1593
+ * Render `<Facebook>` static post cards.
1594
+ *
1595
+ * Default: `false`.
1596
+ */
1597
+ facebook?: boolean
1598
+ /**
1599
+ * Render `<Threads>` static post cards.
1600
+ *
1601
+ * Default: `false`.
1602
+ */
1603
+ threads?: boolean
1604
+ /**
1605
+ * Render `<Instagram>` static post cards.
1606
+ *
1607
+ * Default: `false`.
1608
+ */
1609
+ instagram?: boolean
1147
1610
  /**
1148
1611
  * Render `<WebContainer>` lazy placeholder blocks.
1149
1612
  *
1150
1613
  * Default: `false`.
1151
1614
  */
1152
1615
  webContainer?: boolean
1616
+ /**
1617
+ * Render `<Audio>` native players.
1618
+ *
1619
+ * Default: `false`.
1620
+ */
1621
+ audio?: boolean
1622
+ /**
1623
+ * Render `<Video>` native players.
1624
+ *
1625
+ * Default: `false`.
1626
+ */
1627
+ video?: boolean
1628
+ }
1629
+
1630
+ /** Rewritten HTML plus every tag an enabled provider refused. */
1631
+ export interface JsMediaEmbedsResult {
1632
+ html: string
1633
+ diagnostics: Array<JsEmbedDiagnostic>
1634
+ }
1635
+
1636
+ /** Opt-in `<NotByAI />` authorship badge. */
1637
+ export interface JsNotByAiOptions {
1638
+ /**
1639
+ * Enable `<NotByAI />` expansion.
1640
+ *
1641
+ * Default: `false`.
1642
+ */
1643
+ enabled?: boolean
1644
+ /**
1645
+ * Accessible label for the badge link.
1646
+ *
1647
+ * Default: `"Written by human, not by AI"`.
1648
+ */
1649
+ label?: string
1650
+ /**
1651
+ * Destination URL. Unsafe values fall back to `https://notbyai.fyi`.
1652
+ *
1653
+ * Default: `"https://notbyai.fyi"`.
1654
+ */
1655
+ href?: string
1153
1656
  }
1154
1657
 
1155
1658
  /** OG image configuration for JavaScript. */
@@ -1180,6 +1683,19 @@ export interface JsOgImageData {
1180
1683
  author?: string
1181
1684
  }
1182
1685
 
1686
+ /** One local OpenAPI file consumed by the generated docs pipeline. */
1687
+ export interface JsOpenApiDocsInput {
1688
+ path: string
1689
+ name?: string
1690
+ failOnUnresolvedRefs?: boolean
1691
+ }
1692
+
1693
+ /** Options shared by all OpenAPI docs inputs. */
1694
+ export interface JsOpenApiDocsOptions {
1695
+ root?: string
1696
+ basePath?: string
1697
+ }
1698
+
1183
1699
  /** Per-page frontmatter chrome flags. */
1184
1700
  export interface JsPageChromeFlags {
1185
1701
  sidebar?: boolean
@@ -1201,6 +1717,31 @@ export interface JsPagerOverride {
1201
1717
  href?: string
1202
1718
  }
1203
1719
 
1720
+ /**
1721
+ * A feed date after parsing: the instant, its civil parts in UTC, and the two
1722
+ * serializations the feed formats ask for.
1723
+ */
1724
+ export interface JsParsedFeedDate {
1725
+ /** Seconds since the Unix epoch. */
1726
+ unix: number
1727
+ /** Civil year in UTC. */
1728
+ year: number
1729
+ /** Civil month, 1-12. */
1730
+ month: number
1731
+ /** Civil day of month, 1-31. */
1732
+ day: number
1733
+ /** Hour, 0-23. */
1734
+ hour: number
1735
+ /** Minute, 0-59. */
1736
+ minute: number
1737
+ /** Second, 0-60. */
1738
+ second: number
1739
+ /** `YYYY-MM-DDTHH:MM:SSZ`, as Atom and JSON Feed want it. */
1740
+ rfc3339: string
1741
+ /** `Day, DD Mon YYYY HH:MM:SS +0000`, as RSS wants it. */
1742
+ rfc822: string
1743
+ }
1744
+
1204
1745
  /**
1205
1746
  * Parser options for JavaScript.
1206
1747
  *
@@ -1251,6 +1792,34 @@ export interface JsParserOptions {
1251
1792
  autolinks?: boolean
1252
1793
  }
1253
1794
 
1795
+ /** Opt-in parameterized Markdown partials. */
1796
+ export interface JsPartialsOptions {
1797
+ /**
1798
+ * Enable `<!-- @partial: PATH k="v" -->` expansion.
1799
+ *
1800
+ * Default: `false`.
1801
+ */
1802
+ enabled?: boolean
1803
+ /**
1804
+ * Root directory used for `@/` and absolute partial paths.
1805
+ *
1806
+ * Default: project root from the JavaScript caller.
1807
+ */
1808
+ rootDir?: string
1809
+ /**
1810
+ * Directory used for bare partial names such as `install.md`.
1811
+ *
1812
+ * Default: `"_partials"`.
1813
+ */
1814
+ root?: string
1815
+ /**
1816
+ * Missing `{{ name }}` substitutions: `"literal"` (default) or `"error"`.
1817
+ *
1818
+ * Default: `"literal"`.
1819
+ */
1820
+ missing?: string
1821
+ }
1822
+
1254
1823
  /** A block the native pass left for the caller's highlighter. */
1255
1824
  export interface JsPendingBlock {
1256
1825
  /** The `language-…` class the block carries. */
@@ -1317,12 +1886,63 @@ export interface JsReaderChrome {
1317
1886
  backToTop?: boolean
1318
1887
  }
1319
1888
 
1889
+ /** One planned static HTML redirect. */
1890
+ export interface JsRedirectEntry {
1891
+ from: string
1892
+ to: string
1893
+ html: string
1894
+ relativePath: string
1895
+ }
1896
+
1897
+ /** One entry of the config rewrite map, in author order. */
1898
+ export interface JsRedirectMapEntry {
1899
+ from: string
1900
+ to: string
1901
+ }
1902
+
1903
+ /** One page that other paths can redirect to. */
1904
+ export interface JsRedirectPage {
1905
+ dest: string
1906
+ aliases?: Array<string>
1907
+ redirect?: string
1908
+ }
1909
+
1910
+ /** Switches and the config rewrite map. */
1911
+ export interface JsRedirectsOptions {
1912
+ enabled: boolean
1913
+ map: Array<JsRedirectMapEntry>
1914
+ netlify: boolean
1915
+ headers: boolean
1916
+ json: boolean
1917
+ allowExternal: boolean
1918
+ html: boolean
1919
+ base?: string
1920
+ }
1921
+
1922
+ /** Planned redirect pages and optional host files. */
1923
+ export interface JsRedirectsOutput {
1924
+ pages: Array<JsRedirectEntry>
1925
+ netlify?: string
1926
+ headers?: string
1927
+ json?: string
1928
+ }
1929
+
1320
1930
  /** Resolved source module. */
1321
1931
  export interface JsResolvedModule {
1322
1932
  path: string
1323
1933
  exports: Array<JsPublicExport>
1324
1934
  }
1325
1935
 
1936
+ /** One page after cascade and optional permalink / slug rewriting. */
1937
+ export interface JsResolvedSsgRoutePage {
1938
+ /** Source path relative to the content root. */
1939
+ source: string
1940
+ /** Resolved URL path. */
1941
+ urlPath: string
1942
+ /** Frontmatter after cascade fills. */
1943
+ frontmatter: Record<string, unknown>
1944
+ }
1945
+
1326
1946
  /** HTML sanitizer options. */
1327
1947
  export interface JsSanitizeOptions {
1328
1948
  /**
@@ -1381,6 +2001,8 @@ export interface JsSearchIndexBuildOptions {
1381
2001
  publishState?: JsPublishStateOptions
1382
2002
  /** Explicit MDX parser override. When omitted, `.mdx` files enable MDX. */
1383
2003
  mdx?: boolean
2004
+ /** Conditional blocks are resolved before extracting searchable content. */
2005
+ conditionalBlocks?: JsConditionalBlockOptions
1384
2006
  }
1385
2007
 
1386
2008
  /** Search options for JavaScript. */
@@ -1419,12 +2041,54 @@ export interface JsSearchRuntimeOptions {
1419
2041
  limit: number
1420
2042
  /** Enable prefix matching. */
1421
2043
  prefix: boolean
2044
+ /** Enable fuzzy typo-tolerant matching. */
2045
+ fuzzy: boolean
1422
2046
  /** Search input placeholder. */
1423
2047
  placeholder: string
1424
2048
  /** Keyboard shortcut to focus search. */
1425
2049
  hotkey: string
1426
2050
  }
1427
2051
 
2052
+ /** One child link on a generated section index. */
2053
+ export interface JsSectionIndexItem {
2054
+ /** Visible title. Escaped in HTML. */
2055
+ title: string
2056
+ /** Destination. `javascript:` and other schemes are rejected. */
2057
+ href: string
2058
+ /** Optional card description. Escaped in HTML. */
2059
+ description?: string
2060
+ }
2061
+
2062
+ /** One page considered for the crawl manifests. */
2063
+ export interface JsSiteMapPage {
2064
+ loc: string
2065
+ title: string
2066
+ description?: string
2067
+ /** Source-file git commit time in milliseconds. `None` omits `<lastmod>`. */
2068
+ lastUpdated?: number
2069
+ draft?: boolean
2070
+ unlisted?: boolean
2071
+ }
2072
+
2073
+ /** Switches and site metadata for crawl-manifest generation. */
2074
+ export interface JsSiteMapsOptions {
2075
+ enabled: boolean
2076
+ siteUrl?: string
2077
+ sitemapLoc: string
2078
+ siteName: string
2079
+ siteDescription?: string
2080
+ robots: boolean
2081
+ llms: boolean
2082
+ }
2083
+
2084
+ /** Generated crawl-manifest bodies, or a warning when generation is skipped. */
2085
+ export interface JsSiteMapsOutput {
2086
+ sitemapXml?: string
2087
+ robotsTxt?: string
2088
+ llmsTxt?: string
2089
+ warning?: string
2090
+ }
2091
+
1428
2092
  /** Custom social link for JavaScript. */
1429
2093
  export interface JsSocialLink {
1430
2094
  /** Icon label. */
@@ -1539,14 +2203,12 @@ export interface JsSsgBarePage {
1539
2203
 
1540
2204
  /** SSG configuration. */
1541
2205
  export interface JsSsgConfig {
1542
- /** Site name. */
1543
2206
  siteName: string
1544
- /** Base URL path. */
1545
2207
  base: string
1546
- /** Optional site-root href for breadcrumbs. */
1547
2208
  breadcrumbRootHref?: string
1548
- /** OG image URL. */
1549
2209
  ogImage?: string
2210
+ siteUrl?: string
2211
+ headValidation?: string
1550
2212
  /** Theme configuration. */
1551
2213
  theme?: JsThemeConfig
1552
2214
  /** Current locale for this page. */
@@ -1569,6 +2231,16 @@ export interface JsSsgConfig {
1569
2231
  team?: JsTeamOptions
1570
2232
  /** When true, honor per-page frontmatter chrome flags. */
1571
2233
  pageChrome?: boolean
2234
+ /** Opt-in JSON-LD structured data. Presence enables the feature. */
2235
+ jsonLd?: JsJsonLd
2236
+ }
2237
+
2238
+ /** One rendered git author on an SSG page. */
2239
+ export interface JsSsgContributor {
2240
+ /** Display name. Escaped in HTML. */
2241
+ name: string
2242
+ /** Optional `https:` avatar URL. Emails are never accepted here. */
2243
+ avatar?: string
1572
2244
  }
1573
2245
 
1574
2246
  /** Result of SSG shared asset extraction. */
@@ -1589,6 +2261,12 @@ export interface JsSsgGeneratedHtmlPage {
1589
2261
  html: string
1590
2262
  }
1591
2263
 
2264
+ /** Themed SSG HTML plus page-head diagnostics. */
2265
+ export interface JsSsgHtmlResult {
2266
+ html: string
2267
+ diagnostics: Array<JsHeadDiagnostic>
2268
+ }
2269
+
1592
2270
  /** Navigation group for SSG. */
1593
2271
  export interface JsSsgNavGroup {
1594
2272
  /** Group title. */
@@ -1637,6 +2315,8 @@ export interface JsSsgPageData {
1637
2315
  toc: Array<TocEntry>
1638
2316
  /** Last updated timestamp in milliseconds since the Unix epoch. */
1639
2317
  lastUpdated?: number
2318
+ /** Unique git authors for this page. Empty unless the site opted in. */
2319
+ contributors?: Array<JsSsgContributor>
1640
2320
  /** URL path. */
1641
2321
  path: string
1642
2322
  /** Entry page configuration (if layout: entry). */
@@ -1651,6 +2331,30 @@ export interface JsSsgPageData {
1651
2331
  layout?: string
1652
2332
  /** Per-page chrome flags. Honored only when page chrome is enabled. */
1653
2333
  chrome?: JsPageChromeFlags
2334
+ /** Frontmatter `robots`. */
2335
+ robots?: string
2336
+ /** Frontmatter `canonical`. */
2337
+ canonical?: string
2338
+ /** Companion `.md` URL when copy-as-markdown chrome is on. */
2339
+ markdownSource?: string
2340
+ }
2341
+
2342
+ /** Resolved page routes plus collision and rejection diagnostics. */
2343
+ export interface JsSsgPageRouteOutput {
2344
+ /** Pages that still have a unique URL. */
2345
+ pages: Array<JsResolvedSsgRoutePage>
2346
+ /** Human-readable collision and rejection messages. */
2347
+ errors: Array<string>
2348
+ }
2349
+
2350
+ /** One page considered for cascade and permalink resolution. */
2351
+ export interface JsSsgRoutePageInput {
2352
+ /** Source path relative to the content root. */
2353
+ source: string
2354
+ /** File-tree URL before permalink or slug rewriting. */
2355
+ fileUrl: string
2356
+ /** Parsed frontmatter object. */
2357
+ frontmatter: Record<string, unknown>
1654
2358
  }
1655
2359
 
1656
2360
  /** Resolved SSG output and public route paths. */
@@ -1777,15 +2481,15 @@ export interface JsThemeConfig {
1777
2481
  aside?: boolean
1778
2482
  /** Breadcrumb trail from the site root through sidebar ancestors. */
1779
2483
  breadcrumbs?: boolean
2484
+ /** Heading permalink visibility. `"hover"` or `"always"`. CSS only. */
2485
+ headingPermalink?: string
1780
2486
  /** Light mode colors. */
1781
2487
  colors?: JsThemeColors
1782
2488
  /** Dark mode colors. */
1783
2489
  darkColors?: JsThemeColors
1784
- /** Font configuration. */
1785
2490
  fonts?: JsThemeFonts
1786
2491
  /** Entry page configuration. */
1787
2492
  entryPage?: JsThemeEntryPage
1788
- /** Layout configuration. */
1789
2493
  layout?: JsThemeLayout
1790
2494
  /** Header configuration. */
1791
2495
  header?: JsThemeHeader
@@ -1875,6 +2579,40 @@ export interface JsThemeLayout {
1875
2579
  maxContentWidth?: string
1876
2580
  }
1877
2581
 
2582
+ /** Opt-in static `::: timeline` milestone lists. */
2583
+ export interface JsTimelineOptions {
2584
+ /**
2585
+ * Enable static timeline blocks.
2586
+ *
2587
+ * Default: `false`.
2588
+ */
2589
+ enabled?: boolean
2590
+ /**
2591
+ * Render timelines as ordered lists unless a block overrides it.
2592
+ *
2593
+ * Default: `true`.
2594
+ */
2595
+ ordered?: boolean
2596
+ /**
2597
+ * Validation mode for malformed dates.
2598
+ *
2599
+ * Default: `"error"`.
2600
+ */
2601
+ invalidDate?: string
2602
+ /**
2603
+ * Validation mode for unsupported item metadata.
2604
+ *
2605
+ * Default: `"error"`.
2606
+ */
2607
+ unknownMeta?: string
2608
+ /**
2609
+ * Validation mode for timeline blocks without items.
2610
+ *
2611
+ * Default: `"error"`.
2612
+ */
2613
+ empty?: string
2614
+ }
2615
+
1878
2616
  /**
1879
2617
  * Transform options for JavaScript.
1880
2618
  *
@@ -1900,6 +2638,12 @@ export interface JsTransformOptions {
1900
2638
  * Default: `false`, or `true` when `gfm` is `true`.
1901
2639
  */
1902
2640
  footnotes?: boolean
2641
+ /**
2642
+ * Render footnotes as a semantic ordered section with numeric markers.
2643
+ *
2644
+ * Default: `false`.
2645
+ */
2646
+ semanticFootnotes?: boolean
1903
2647
  /**
1904
2648
  * Enable GFM task-list item markers.
1905
2649
  *
@@ -1999,6 +2743,12 @@ export interface JsTransformOptions {
1999
2743
  * Default: `true`; ignored when [`Self::autolink_urls`] is off.
2000
2744
  */
2001
2745
  autolinkTargetBlank?: boolean
2746
+ /**
2747
+ * Opt-in visible heading permalinks (`<a class="header-anchor" href="#id">`).
2748
+ *
2749
+ * Default: disabled. Existing HTML stays unchanged until this is enabled.
2750
+ */
2751
+ headingPermalinks?: boolean
2002
2752
  /**
2003
2753
  * Opt-in Obsidian-style wiki links.
2004
2754
  *
@@ -2067,24 +2817,84 @@ export interface JsTransformOptions {
2067
2817
  * Default: disabled.
2068
2818
  */
2069
2819
  includes?: JsIncludeOptions
2820
+ /**
2821
+ * Opt-in parameterized Markdown partials via `<!-- @partial: PATH k="v" -->`.
2822
+ *
2823
+ * Default: disabled.
2824
+ */
2825
+ partials?: JsPartialsOptions
2070
2826
  /**
2071
2827
  * Opt-in `::: steps` ordered lists.
2072
2828
  *
2073
2829
  * Default: disabled.
2074
2830
  */
2075
2831
  steps?: JsStepsOptions
2832
+ /**
2833
+ * Opt-in `::: code-group` fence groups.
2834
+ *
2835
+ * Default: disabled.
2836
+ */
2837
+ codeGroups?: JsCodeGroupOptions
2076
2838
  /**
2077
2839
  * Opt-in `{badge:variant}` inline badges.
2078
2840
  *
2079
2841
  * Default: disabled.
2080
2842
  */
2081
2843
  badges?: JsBadgeOptions
2844
+ /**
2845
+ * Opt-in `<NotByAI />` authorship badge.
2846
+ *
2847
+ * Default: disabled.
2848
+ */
2849
+ notByAi?: JsNotByAiOptions
2850
+ /**
2851
+ * Opt-in `{kbd:...}` inline keyboard keys.
2852
+ *
2853
+ * Default: disabled.
2854
+ */
2855
+ keyboardKeys?: JsKeyboardKeysOptions
2856
+ /**
2857
+ * Opt-in abbreviation and glossary expansion.
2858
+ *
2859
+ * Default: disabled.
2860
+ */
2861
+ abbreviations?: JsAbbreviationsOptions
2862
+ /**
2863
+ * Opt-in PHP Markdown Extra / mdBook-style definition lists.
2864
+ *
2865
+ * Default: disabled.
2866
+ */
2867
+ definitionLists?: JsDefinitionListOptions
2868
+ /**
2869
+ * Opt-in `{link:...}` rich magic links.
2870
+ *
2871
+ * Default: disabled.
2872
+ */
2873
+ magicLinks?: JsMagicLinkOptions
2082
2874
  /**
2083
2875
  * Opt-in figures, captions, and lazy images.
2084
2876
  *
2085
2877
  * Default: disabled.
2086
2878
  */
2087
2879
  images?: JsImageOptions
2880
+ /**
2881
+ * Opt-in static `::: gallery` image groups.
2882
+ *
2883
+ * Default: disabled.
2884
+ */
2885
+ imageGalleries?: JsImageGalleryOptions
2886
+ /**
2887
+ * Opt-in static `::: timeline` milestone lists.
2888
+ *
2889
+ * Default: disabled.
2890
+ */
2891
+ timelines?: JsTimelineOptions
2892
+ /**
2893
+ * Opt-in static `::: if` / `::: else` conditional blocks.
2894
+ *
2895
+ * Default: disabled.
2896
+ */
2897
+ conditionalBlocks?: JsConditionalBlockOptions
2088
2898
  /**
2089
2899
  * Opt-in `::: card` / `::: link-card` / `::: card-grid` blocks.
2090
2900
  *
@@ -2103,6 +2913,12 @@ export interface JsTransformOptions {
2103
2913
  * Default: disabled.
2104
2914
  */
2105
2915
  fileTree?: JsFileTreeOptions
2916
+ /**
2917
+ * Opt-in static `csv-table` / `json-table` fences.
2918
+ *
2919
+ * Default: disabled.
2920
+ */
2921
+ dataTables?: JsDataTableOptions
2106
2922
  }
2107
2923
 
2108
2924
  /** Type parameter documentation (`<T extends C = D>`) used by generated API docs. */
@@ -2186,6 +3002,24 @@ export declare function loadDictionariesFlat(dir: string): Record<string, Record
2186
3002
  /** Returns true when a document belongs to at least one requested search scope. */
2187
3003
  export declare function matchesSearchScopes(id: string, url: string, scopes: Array<string>): boolean
2188
3004
 
3005
+ /** One `import` statement collected from MDX ESM. */
3006
+ export interface MdxImport {
3007
+ /** Module specifier string. */
3008
+ source: string
3009
+ /** Bindings created by the import. */
3010
+ specifiers: Array<MdxImportSpecifier>
3011
+ }
3012
+
3013
+ /** How a specifier was imported. */
3014
+ export interface MdxImportSpecifier {
3015
+ /** Imported name (`default`, `*`, or the named export). */
3016
+ imported: string
3017
+ /** Local binding name. */
3018
+ local: string
3019
+ /** `default`, `named`, or `namespace`. */
3020
+ kind: 'default' | 'named' | 'namespace'
3021
+ }
3022
+
2189
3023
  /** Restores code block metadata after JavaScript-side syntax highlighting. */
2190
3024
  export declare function mergeHighlightedCodeBlocks(originalHtml: string, highlightedHtml: string): string
2191
3025
 
@@ -2210,6 +3044,9 @@ export interface Mf2ValidateResult {
2210
3044
  /** Every language name and alias the native highlighter answers to. */
2211
3045
  export declare function nativeHighlightLanguages(): Array<string>
2212
3046
 
3047
+ /** Strips a trailing slash except for `/`. Unsafe values return `None`. */
3048
+ export declare function normalizeRedirectPath(value: string): string | null
3049
+
2213
3050
  /** Normalizes VitePress-specific frontmatter into ox-content's entry-page shape. */
2214
3051
  export declare function normalizeVitePressFrontmatter(frontmatter: any): any
2215
3052
 
@@ -2226,6 +3063,13 @@ export declare function parseAndRender(source: string, options?: JsParserOptions
2226
3063
  /** Parses Markdown and renders to HTML asynchronously (runs on worker thread). */
2227
3064
  export declare function parseAndRenderAsync(source: string, options?: JsParserOptions | undefined | null): Promise<unknown>
2228
3065
 
3066
+ /**
3067
+ * Parses a feed date — an epoch seconds/milliseconds integer, or a civil
3068
+ * date-time with an optional zone offset — returning `null` when the value
3069
+ * names no instant.
3070
+ */
3071
+ export declare function parseFeedDate(value?: string | undefined | null): JsParsedFeedDate | null
3072
+
2229
3073
  /** Parses Markdown source into a raw mdast memory block for JavaScript-side deserialization. */
2230
3074
  export declare function parseMdastRaw(source: string, options?: JsParserOptions | undefined | null): Uint8Array
2231
3075
 
@@ -2248,6 +3092,9 @@ export declare function parseScopedSearchQuery(query: string): JsScopedSearchQue
2248
3092
  */
2249
3093
  export declare function parseTransferRaw(source: string, kind: string, options?: JsParserOptions | undefined | null): Uint8Array
2250
3094
 
3095
+ /** Plans redirect pages and host files without writing anything. */
3096
+ export declare function planRedirects(options: JsRedirectsOptions, pages: Array<JsRedirectPage>): JsRedirectsOutput
3097
+
2251
3098
  /** Prepared Markdown source with parsed frontmatter. */
2252
3099
  export interface PreparedSourceResult {
2253
3100
  /** Markdown content after optional frontmatter removal. */
@@ -2280,6 +3127,12 @@ export declare function render(astJson: string): RenderResult
2280
3127
  */
2281
3128
  export declare function renderFrameworkComponentCode(html: string, target: string, islands?: Array<JsFrameworkComponentIsland> | undefined | null, mode?: string | undefined | null): string
2282
3129
 
3130
+ /** Resolve Unhead-compatible page-head descriptors to HTML. */
3131
+ export declare function renderHead(inputJson: string): JsSsgHtmlResult
3132
+
3133
+ /** Static HTML redirect body. `dest` is escaped; callers still validate it. */
3134
+ export declare function renderRedirectHtml(dest: string): string
3135
+
2283
3136
  /** Render result containing the HTML output. */
2284
3137
  export interface RenderResult {
2285
3138
  /** The rendered HTML. */
@@ -2288,9 +3141,15 @@ export interface RenderResult {
2288
3141
  errors: Array<string>
2289
3142
  }
2290
3143
 
3144
+ /** Renders escaped section-index listing HTML. Hostile hrefs are dropped. */
3145
+ export declare function renderSsgSectionIndex(title: string, items: Array<JsSectionIndexItem>, style: string): string
3146
+
2291
3147
  /** Resolves manual SSG navigation groups. */
2292
3148
  export declare function resolveSsgNavigationGroups(navigation: Array<JsSsgNavigationGroup>, base: string, extension: string): Array<JsSsgNavGroup>
2293
3149
 
3150
+ /** Resolves permalink / slug routes and `_index` frontmatter cascade. */
3151
+ export declare function resolveSsgPageRoutes(pages: Array<JsSsgRoutePageInput>, permalinksEnabled: boolean, cascadeEnabled: boolean): JsSsgPageRouteOutput
3152
+
2294
3153
  /** Resolves all output and public route paths for an SSG page. */
2295
3154
  export declare function resolveSsgRoutePaths(inputPath: string, srcDir: string, outDir: string, base: string, extension: string, siteUrl?: string | undefined | null): JsSsgRoutePaths
2296
3155
 
@@ -2330,6 +3189,9 @@ export declare function transform(source: string, options?: JsTransformOptions |
2330
3189
  /** Transforms Markdown source asynchronously (runs on worker thread). */
2331
3190
  export declare function transformAsync(source: string, options?: JsTransformOptions | undefined | null): Promise<unknown>
2332
3191
 
3192
+ /** Numbers headings, figures, and tables, and links `@id` references to them. */
3193
+ export declare function transformCrossReferences(html: string, options: JsCrossReferencesOptions): JsCrossReferenceOutput
3194
+
2333
3195
  /**
2334
3196
  * Transforms Markdown into a raw mdast transfer buffer.
2335
3197
  *
@@ -2338,9 +3200,11 @@ export declare function transformAsync(source: string, options?: JsTransformOpti
2338
3200
  */
2339
3201
  export declare function transformMdastRaw(source: string, options?: JsTransformOptions | undefined | null): Uint8Array
2340
3202
 
2341
- /** Transform opt-in static media embed components in already-rendered HTML. */
2342
3203
  export declare function transformMediaEmbeds(html: string, options?: JsMediaEmbedsOptions | undefined | null): string
2343
3204
 
3205
+ /** Rewrites embeds and reports the tags no provider would render. */
3206
+ export declare function transformMediaEmbedsWithDiagnostics(html: string, options?: JsMediaEmbedsOptions | undefined | null): JsMediaEmbedsResult
3207
+
2344
3208
  /** Transforms mermaid code blocks in HTML to rendered SVG diagrams. */
2345
3209
  export declare function transformMermaid(html: string, mmdcPath: string): MermaidTransformResult
2346
3210
 
@@ -2354,7 +3218,7 @@ export declare function transformMermaid(html: string, mmdcPath: string): Mermai
2354
3218
  */
2355
3219
  export declare function transformPmEmbeds(html: string, startGroup: number, options?: JsPmOptions | undefined | null): JsPmTransformResult
2356
3220
 
2357
- /** Transform result containing HTML, frontmatter, and TOC. */
3221
+ /** Transform result containing HTML, frontmatter, TOC, and MDX metadata. */
2358
3222
  export interface TransformResult {
2359
3223
  /** The rendered HTML. */
2360
3224
  html: string
@@ -2364,6 +3228,12 @@ export interface TransformResult {
2364
3228
  toc: Array<TocEntry>
2365
3229
  /** Parse/render errors, if any. */
2366
3230
  errors: Array<string>
3231
+ /** MDX `import` statements (empty when MDX is off or no ESM nodes). */
3232
+ imports: Array<MdxImport>
3233
+ /** Export names from MDX ESM (empty when MDX is off or no exports). */
3234
+ exports: Array<string>
3235
+ /** Unique JSX component names in document order (empty when none). */
3236
+ components: Array<string>
2367
3237
  }
2368
3238
 
2369
3239
  /**
package/index.js CHANGED
@@ -173,9 +173,11 @@ module.exports.transformAsync = binding.transformAsync;
173
173
  module.exports.transformMdastRaw = binding.transformMdastRaw;
174
174
  module.exports.sanitizeHtml = binding.sanitizeHtml;
175
175
  module.exports.transformMediaEmbeds = binding.transformMediaEmbeds;
176
+ module.exports.transformMediaEmbedsWithDiagnostics = binding.transformMediaEmbedsWithDiagnostics;
176
177
  module.exports.transformPmEmbeds = binding.transformPmEmbeds;
177
178
  module.exports.transformTabsEmbeds = binding.transformTabsEmbeds;
178
179
  module.exports.transformYoutubeEmbeds = binding.transformYoutubeEmbeds;
180
+ module.exports.extractYoutubeVideoId = binding.extractYoutubeVideoId;
179
181
  module.exports.extractCodeBlocks = binding.extractCodeBlocks;
180
182
  module.exports.lintCodeBlocks = binding.lintCodeBlocks;
181
183
  module.exports.extractDocsTests = binding.extractDocsTests;
@@ -191,6 +193,7 @@ module.exports.generateDocsNavCode = binding.generateDocsNavCode;
191
193
  module.exports.collectDocsSourceFiles = binding.collectDocsSourceFiles;
192
194
  module.exports.generateDocsDataJson = binding.generateDocsDataJson;
193
195
  module.exports.generateDocsMarkdown = binding.generateDocsMarkdown;
196
+ module.exports.generateOpenApiDocs = binding.generateOpenApiDocs;
194
197
  module.exports.writeGeneratedDocs = binding.writeGeneratedDocs;
195
198
  module.exports.buildCollectionManifest = binding.buildCollectionManifest;
196
199
  module.exports.mergeHighlightedCodeBlocks = binding.mergeHighlightedCodeBlocks;
@@ -209,6 +212,7 @@ module.exports.generateSearchModuleFromOptions = binding.generateSearchModuleFro
209
212
  module.exports.collectSearchMarkdownFiles = binding.collectSearchMarkdownFiles;
210
213
  module.exports.normalizeVitePressFrontmatter = binding.normalizeVitePressFrontmatter;
211
214
  module.exports.generateSsgHtml = binding.generateSsgHtml;
215
+ module.exports.renderHead = binding.renderHead;
212
216
  module.exports.generateSsgBareHtml = binding.generateSsgBareHtml;
213
217
  module.exports.highlightCodeBlock = binding.highlightCodeBlock;
214
218
  module.exports.applyPendingHighlights = binding.applyPendingHighlights;
@@ -218,6 +222,8 @@ module.exports.supportsHighlightLanguage = binding.supportsHighlightLanguage;
218
222
  module.exports.nativeHighlightLanguages = binding.nativeHighlightLanguages;
219
223
  module.exports.generateSsgBarePage = binding.generateSsgBarePage;
220
224
  module.exports.getGitLastUpdated = binding.getGitLastUpdated;
225
+ module.exports.getGitContributors = binding.getGitContributors;
226
+ module.exports.resolveSsgPageRoutes = binding.resolveSsgPageRoutes;
221
227
  module.exports.resolveSsgRoutePaths = binding.resolveSsgRoutePaths;
222
228
  module.exports.getSsgOutputPath = binding.getSsgOutputPath;
223
229
  module.exports.getSsgUrlPath = binding.getSsgUrlPath;
@@ -239,4 +245,13 @@ module.exports.checkI18n = binding.checkI18n;
239
245
  module.exports.checkI18nProject = binding.checkI18nProject;
240
246
  module.exports.extractTranslationKeys = binding.extractTranslationKeys;
241
247
  module.exports.renderFrameworkComponentCode = binding.renderFrameworkComponentCode;
248
+ module.exports.renderSsgSectionIndex = binding.renderSsgSectionIndex;
249
+ module.exports.parseFeedDate = binding.parseFeedDate;
250
+ module.exports.generateFeedBodies = binding.generateFeedBodies;
251
+ module.exports.transformCrossReferences = binding.transformCrossReferences;
252
+ module.exports.planRedirects = binding.planRedirects;
253
+ module.exports.renderRedirectHtml = binding.renderRedirectHtml;
254
+ module.exports.isSafeRedirectDest = binding.isSafeRedirectDest;
255
+ module.exports.normalizeRedirectPath = binding.normalizeRedirectPath;
256
+ module.exports.generateSiteMapBodies = binding.generateSiteMapBodies;
242
257
  module.exports.escapeSvelteMarkup = binding.escapeSvelteMarkup;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ox-content/napi",
3
- "version": "3.0.0-alpha.1",
3
+ "version": "3.0.0-alpha.11",
4
4
  "description": "Node.js bindings for Ox Content - High-performance Markdown parser",
5
5
  "keywords": [
6
6
  "markdown",
@@ -47,12 +47,12 @@
47
47
  ]
48
48
  },
49
49
  "optionalDependencies": {
50
- "@ox-content/binding-darwin-x64": "3.0.0-alpha.1",
51
- "@ox-content/binding-darwin-arm64": "3.0.0-alpha.1",
52
- "@ox-content/binding-linux-x64-gnu": "3.0.0-alpha.1",
53
- "@ox-content/binding-linux-x64-musl": "3.0.0-alpha.1",
54
- "@ox-content/binding-linux-arm64-gnu": "3.0.0-alpha.1",
55
- "@ox-content/binding-linux-arm64-musl": "3.0.0-alpha.1",
56
- "@ox-content/binding-win32-x64-msvc": "3.0.0-alpha.1"
50
+ "@ox-content/binding-darwin-x64": "3.0.0-alpha.11",
51
+ "@ox-content/binding-darwin-arm64": "3.0.0-alpha.11",
52
+ "@ox-content/binding-linux-x64-gnu": "3.0.0-alpha.11",
53
+ "@ox-content/binding-linux-x64-musl": "3.0.0-alpha.11",
54
+ "@ox-content/binding-linux-arm64-gnu": "3.0.0-alpha.11",
55
+ "@ox-content/binding-linux-arm64-musl": "3.0.0-alpha.11",
56
+ "@ox-content/binding-win32-x64-msvc": "3.0.0-alpha.11"
57
57
  }
58
58
  }