@ox-content/napi 2.90.0 → 3.0.0-alpha.10
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/index.d.ts +814 -8
- package/index.js +5 -0
- package/package.json +8 -8
package/index.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ export declare function buildSearchIndex(documents: Array<JsSearchDocument>): st
|
|
|
70
70
|
* File discovery, Markdown parsing, search document extraction, and index
|
|
71
71
|
* construction all run on the Rust side.
|
|
72
72
|
*/
|
|
73
|
-
export declare function buildSearchIndexFromDirectory(srcDir: string, base: string, extensions: Array<string
|
|
73
|
+
export declare function buildSearchIndexFromDirectory(srcDir: string, base: string, extensions: Array<string>, options?: JsSearchIndexBuildOptions | undefined | null): string
|
|
74
74
|
|
|
75
75
|
/** Builds SSG navigation groups from markdown files. */
|
|
76
76
|
export declare function buildSsgNavItems(markdownFiles: Array<string>, srcDir: string, base: string, extension: string): Array<JsSsgNavGroup>
|
|
@@ -96,6 +96,9 @@ export declare function checkI18n(dictDir: string, usedKeys: Array<string>): I18
|
|
|
96
96
|
*/
|
|
97
97
|
export declare function checkI18nProject(dictDir: string, srcDirs: Array<string>, functionNames: Array<string>, defaultLocale: string): I18NCheckResult
|
|
98
98
|
|
|
99
|
+
/** Classifies already-parsed frontmatter JSON against publish-state options. */
|
|
100
|
+
export declare function classifyPublishState(frontmatterJson: string, options?: JsPublishStateOptions | undefined | null): JsPublishDecision
|
|
101
|
+
|
|
99
102
|
/** Collects source files for generated API documentation. */
|
|
100
103
|
export declare function collectDocsSourceFiles(srcDir: string, include: Array<string>, exclude: Array<string>): Array<string>
|
|
101
104
|
|
|
@@ -180,6 +183,9 @@ export declare function generateI18nModule(dictDir: string, config: JsI18NRuntim
|
|
|
180
183
|
*/
|
|
181
184
|
export declare function generateOgImageSvg(data: JsOgImageData, config?: JsOgImageConfig | undefined | null): string
|
|
182
185
|
|
|
186
|
+
/** Generates static OpenAPI reference Markdown pages from local JSON/YAML files. */
|
|
187
|
+
export declare function generateOpenApiDocs(inputs: Array<JsOpenApiDocsInput>, options?: JsOpenApiDocsOptions | undefined | null): JsGeneratedOpenApiDocs
|
|
188
|
+
|
|
183
189
|
/** Generates the client-side search runtime module. */
|
|
184
190
|
export declare function generateSearchModule(optionsJson: string, indexPath: string): string
|
|
185
191
|
|
|
@@ -193,7 +199,10 @@ export declare function generateSsgBareHtml(content: string, title: string): str
|
|
|
193
199
|
export declare function generateSsgBarePage(page: JsSsgBarePage): string
|
|
194
200
|
|
|
195
201
|
/** Generates SSG HTML page with navigation and search. */
|
|
196
|
-
export declare function generateSsgHtml(pageData: JsSsgPageData, navGroups: Array<JsSsgNavGroup>, config: JsSsgConfig):
|
|
202
|
+
export declare function generateSsgHtml(pageData: JsSsgPageData, navGroups: Array<JsSsgNavGroup>, config: JsSsgConfig): JsSsgHtmlResult
|
|
203
|
+
|
|
204
|
+
/** Returns unique git authors for a file. Empty when git is missing or fails. */
|
|
205
|
+
export declare function getGitContributors(filePath: string, root?: string | undefined | null): Array<JsGitContributor>
|
|
197
206
|
|
|
198
207
|
/** Returns the last git commit timestamp for a file in milliseconds. */
|
|
199
208
|
export declare function getGitLastUpdated(filePath: string, root?: string | undefined | null): number | null
|
|
@@ -323,6 +332,34 @@ export interface IncrementalMarkdownRenderResult {
|
|
|
323
332
|
errors: Array<string>
|
|
324
333
|
}
|
|
325
334
|
|
|
335
|
+
/** Opt-in skip link and print styles. Presence of the object enables the feature. */
|
|
336
|
+
export interface JsA11y {
|
|
337
|
+
/** Override for the skip-link label. Empty / omitted uses "Skip to content". */
|
|
338
|
+
skipLinkLabel?: string
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/** Opt-in abbreviation and glossary expansion. */
|
|
342
|
+
export interface JsAbbreviationsOptions {
|
|
343
|
+
/**
|
|
344
|
+
* Enable `*[TERM]: expansion` and config-term rewriting.
|
|
345
|
+
*
|
|
346
|
+
* Default: `false`.
|
|
347
|
+
*/
|
|
348
|
+
enabled?: boolean
|
|
349
|
+
/**
|
|
350
|
+
* Central glossary terms. Keys are matched with Unicode word boundaries.
|
|
351
|
+
*
|
|
352
|
+
* Default: `{}`.
|
|
353
|
+
*/
|
|
354
|
+
terms?: Record<string, string>
|
|
355
|
+
/**
|
|
356
|
+
* Wrap only the first occurrence of each term.
|
|
357
|
+
*
|
|
358
|
+
* Default: `false` (every occurrence).
|
|
359
|
+
*/
|
|
360
|
+
firstUseOnly?: boolean
|
|
361
|
+
}
|
|
362
|
+
|
|
326
363
|
/** Attribute syntax transform options. */
|
|
327
364
|
export interface JsAttrsOptions {
|
|
328
365
|
/**
|
|
@@ -333,6 +370,16 @@ export interface JsAttrsOptions {
|
|
|
333
370
|
enabled?: boolean
|
|
334
371
|
}
|
|
335
372
|
|
|
373
|
+
/** Opt-in `{badge:variant}` inline badges. */
|
|
374
|
+
export interface JsBadgeOptions {
|
|
375
|
+
/**
|
|
376
|
+
* Enable `{badge:variant}text{/badge}` expansion.
|
|
377
|
+
*
|
|
378
|
+
* Default: `false`.
|
|
379
|
+
*/
|
|
380
|
+
enabled?: boolean
|
|
381
|
+
}
|
|
382
|
+
|
|
336
383
|
export interface JsBuildCollectionManifestOptions {
|
|
337
384
|
/** Source directory containing Markdown files. */
|
|
338
385
|
srcDir: string
|
|
@@ -346,6 +393,16 @@ export interface JsBuildCollectionManifestOptions {
|
|
|
346
393
|
transformOptions?: JsTransformOptions
|
|
347
394
|
}
|
|
348
395
|
|
|
396
|
+
/** Opt-in `::: card` / `::: link-card` / `::: card-grid` blocks. */
|
|
397
|
+
export interface JsCardOptions {
|
|
398
|
+
/**
|
|
399
|
+
* Enable card, link-card, and card-grid containers.
|
|
400
|
+
*
|
|
401
|
+
* Default: `false`.
|
|
402
|
+
*/
|
|
403
|
+
enabled?: boolean
|
|
404
|
+
}
|
|
405
|
+
|
|
349
406
|
/** Extracted fenced code block. */
|
|
350
407
|
export interface JsCodeBlock {
|
|
351
408
|
language: string
|
|
@@ -395,6 +452,16 @@ export interface JsCodeBlockLintOptions {
|
|
|
395
452
|
trailingSpaces?: boolean
|
|
396
453
|
}
|
|
397
454
|
|
|
455
|
+
/** Opt-in `::: code-group` fence groups. */
|
|
456
|
+
export interface JsCodeGroupOptions {
|
|
457
|
+
/**
|
|
458
|
+
* Enable VitePress-style `::: code-group` rewriting.
|
|
459
|
+
*
|
|
460
|
+
* Default: `false`.
|
|
461
|
+
*/
|
|
462
|
+
enabled?: boolean
|
|
463
|
+
}
|
|
464
|
+
|
|
398
465
|
/** Code import / snippet injection options. */
|
|
399
466
|
export interface JsCodeImportOptions {
|
|
400
467
|
/**
|
|
@@ -420,6 +487,58 @@ export interface JsCollectionDefinition {
|
|
|
420
487
|
include: Array<string>
|
|
421
488
|
}
|
|
422
489
|
|
|
490
|
+
/** Opt-in `::: tip` custom containers. */
|
|
491
|
+
export interface JsContainerOptions {
|
|
492
|
+
/**
|
|
493
|
+
* Enable `::: type` containers.
|
|
494
|
+
*
|
|
495
|
+
* Default: `false`.
|
|
496
|
+
*/
|
|
497
|
+
enabled?: boolean
|
|
498
|
+
/** Extra or overriding container types. */
|
|
499
|
+
types?: Record<string, JsContainerTypeOptions>
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/** Custom container transform options. */
|
|
503
|
+
export interface JsContainerTypeOptions {
|
|
504
|
+
/** Title used when the opener does not set one. */
|
|
505
|
+
title?: string
|
|
506
|
+
/** `"details"` renders `<details>`/`<summary>`; anything else is a `<div>`. */
|
|
507
|
+
tag?: string
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/** Opt-in static `csv-table` / `json-table` fences. */
|
|
511
|
+
export interface JsDataTableOptions {
|
|
512
|
+
/**
|
|
513
|
+
* Enable `csv-table` and `json-table` fences.
|
|
514
|
+
*
|
|
515
|
+
* Default: `false`.
|
|
516
|
+
*/
|
|
517
|
+
enabled?: boolean
|
|
518
|
+
/**
|
|
519
|
+
* Root directory used for `@/` and absolute data-table imports.
|
|
520
|
+
*
|
|
521
|
+
* Default: project root from the JavaScript caller.
|
|
522
|
+
*/
|
|
523
|
+
rootDir?: string
|
|
524
|
+
/**
|
|
525
|
+
* What to do when an imported file is missing.
|
|
526
|
+
*
|
|
527
|
+
* Default: `"error"`.
|
|
528
|
+
*/
|
|
529
|
+
missing?: string
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/** Opt-in PHP Markdown Extra / mdBook-style definition lists. */
|
|
533
|
+
export interface JsDefinitionListOptions {
|
|
534
|
+
/**
|
|
535
|
+
* Enable `Term` / `: definition` expansion.
|
|
536
|
+
*
|
|
537
|
+
* Default: `false`.
|
|
538
|
+
*/
|
|
539
|
+
enabled?: boolean
|
|
540
|
+
}
|
|
541
|
+
|
|
423
542
|
/** Normalized documentation entry used by generated API docs. */
|
|
424
543
|
export interface JsDocEntry {
|
|
425
544
|
name: string
|
|
@@ -815,6 +934,36 @@ export interface JsFeatureConfig {
|
|
|
815
934
|
linkText?: string
|
|
816
935
|
}
|
|
817
936
|
|
|
937
|
+
/** Opt-in static `file-tree` fences. */
|
|
938
|
+
export interface JsFileTreeOptions {
|
|
939
|
+
/**
|
|
940
|
+
* Enable `file-tree` fences.
|
|
941
|
+
*
|
|
942
|
+
* Default: `false`.
|
|
943
|
+
*/
|
|
944
|
+
enabled?: boolean
|
|
945
|
+
/**
|
|
946
|
+
* Open directory `<details>` by default.
|
|
947
|
+
*
|
|
948
|
+
* Default: `true`.
|
|
949
|
+
*/
|
|
950
|
+
defaultOpen?: boolean
|
|
951
|
+
/**
|
|
952
|
+
* Render folder and file icons.
|
|
953
|
+
*
|
|
954
|
+
* Default: `true`.
|
|
955
|
+
*/
|
|
956
|
+
icons?: boolean
|
|
957
|
+
/** Trusted SVG markup or class tokens for collapsed folders. */
|
|
958
|
+
iconFolder?: string
|
|
959
|
+
/** Trusted SVG markup or class tokens for open folders. */
|
|
960
|
+
iconFolderOpen?: string
|
|
961
|
+
/** Trusted SVG markup or class tokens for files. */
|
|
962
|
+
iconFile?: string
|
|
963
|
+
/** Trusted SVG markup or class tokens keyed by file extension. */
|
|
964
|
+
iconFiles?: Record<string, string>
|
|
965
|
+
}
|
|
966
|
+
|
|
818
967
|
export interface JsFrameworkComponentIsland {
|
|
819
968
|
name: string
|
|
820
969
|
props: Record<string, any>
|
|
@@ -822,6 +971,22 @@ export interface JsFrameworkComponentIsland {
|
|
|
822
971
|
content?: string
|
|
823
972
|
}
|
|
824
973
|
|
|
974
|
+
/** Generated OpenAPI Markdown pages and navigation metadata. */
|
|
975
|
+
export interface JsGeneratedOpenApiDocs {
|
|
976
|
+
pages: Record<string, string>
|
|
977
|
+
nav: Array<JsDocsNavItem>
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
/** One unique git author returned by `getGitContributors`. */
|
|
981
|
+
export interface JsGitContributor {
|
|
982
|
+
/** Author name from `%an`. */
|
|
983
|
+
name: string
|
|
984
|
+
/** Author email from `%ae`. Never rendered into `href`. */
|
|
985
|
+
email?: string
|
|
986
|
+
/** Number of commits attributed to this author on the file. */
|
|
987
|
+
commits?: number
|
|
988
|
+
}
|
|
989
|
+
|
|
825
990
|
/** Export graph resolution options. */
|
|
826
991
|
export interface JsGraphOptions {
|
|
827
992
|
root?: string
|
|
@@ -830,6 +995,22 @@ export interface JsGraphOptions {
|
|
|
830
995
|
externalPackageSources?: Array<JsExternalPackageSource>
|
|
831
996
|
}
|
|
832
997
|
|
|
998
|
+
/** One page-head validation finding. */
|
|
999
|
+
export interface JsHeadDiagnostic {
|
|
1000
|
+
strict: boolean
|
|
1001
|
+
message: string
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
/** Header nav link or dropdown. */
|
|
1005
|
+
export interface JsHeaderNavItem {
|
|
1006
|
+
/** Display label. */
|
|
1007
|
+
text: string
|
|
1008
|
+
/** Link URL. */
|
|
1009
|
+
link?: string
|
|
1010
|
+
/** Dropdown children. */
|
|
1011
|
+
items?: Array<JsHeaderNavItem>
|
|
1012
|
+
}
|
|
1013
|
+
|
|
833
1014
|
/** Hero action for entry page. */
|
|
834
1015
|
export interface JsHeroAction {
|
|
835
1016
|
/** Button theme: "brand" or "alt". */
|
|
@@ -918,6 +1099,66 @@ export interface JsI18NRuntimeLocale {
|
|
|
918
1099
|
dir?: string
|
|
919
1100
|
}
|
|
920
1101
|
|
|
1102
|
+
/** Opt-in static `::: gallery` image groups. */
|
|
1103
|
+
export interface JsImageGalleryOptions {
|
|
1104
|
+
/**
|
|
1105
|
+
* Enable static image gallery blocks.
|
|
1106
|
+
*
|
|
1107
|
+
* Default: `false`.
|
|
1108
|
+
*/
|
|
1109
|
+
enabled?: boolean
|
|
1110
|
+
/**
|
|
1111
|
+
* Add `loading="lazy"` to images inside galleries.
|
|
1112
|
+
*
|
|
1113
|
+
* Default: follows `images.lazy`, or `true` when `images` is disabled.
|
|
1114
|
+
*/
|
|
1115
|
+
lazy?: boolean
|
|
1116
|
+
/**
|
|
1117
|
+
* Validation mode for images with empty alt text.
|
|
1118
|
+
*
|
|
1119
|
+
* Default: `"error"`.
|
|
1120
|
+
*/
|
|
1121
|
+
missingAlt?: string
|
|
1122
|
+
/**
|
|
1123
|
+
* Validation mode for galleries without image items.
|
|
1124
|
+
*
|
|
1125
|
+
* Default: `"error"`.
|
|
1126
|
+
*/
|
|
1127
|
+
empty?: string
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
/** Opt-in figures, captions, and lazy images. */
|
|
1131
|
+
export interface JsImageOptions {
|
|
1132
|
+
/**
|
|
1133
|
+
* Enable figure captions, lazy loading, and safe dimensions.
|
|
1134
|
+
*
|
|
1135
|
+
* Default: `false`.
|
|
1136
|
+
*/
|
|
1137
|
+
enabled?: boolean
|
|
1138
|
+
/**
|
|
1139
|
+
* Add `loading="lazy"` to transformed images.
|
|
1140
|
+
*
|
|
1141
|
+
* Default: `true`.
|
|
1142
|
+
*/
|
|
1143
|
+
lazy?: boolean
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
/** Markdown file include options. */
|
|
1147
|
+
export interface JsIncludeOptions {
|
|
1148
|
+
/**
|
|
1149
|
+
* Enable `<!-- @include: PATH -->` expansion.
|
|
1150
|
+
*
|
|
1151
|
+
* Default: `false`.
|
|
1152
|
+
*/
|
|
1153
|
+
enabled?: boolean
|
|
1154
|
+
/**
|
|
1155
|
+
* Root directory used for `@/` and absolute include paths.
|
|
1156
|
+
*
|
|
1157
|
+
* Default: project root from the JavaScript caller.
|
|
1158
|
+
*/
|
|
1159
|
+
rootDir?: string
|
|
1160
|
+
}
|
|
1161
|
+
|
|
921
1162
|
/** Options for appending to an incremental parser. */
|
|
922
1163
|
export interface JsIncrementalParseOptions {
|
|
923
1164
|
/** Treat this append as the final stream chunk. */
|
|
@@ -938,6 +1179,48 @@ export interface JsIncrementalRenderOptions {
|
|
|
938
1179
|
completeInline?: boolean
|
|
939
1180
|
}
|
|
940
1181
|
|
|
1182
|
+
/** Opt-in JSON-LD structured data. Presence of the object enables the feature. */
|
|
1183
|
+
export interface JsJsonLd {
|
|
1184
|
+
/** When false, omit BreadcrumbList even if a visible trail exists. */
|
|
1185
|
+
breadcrumbs?: boolean
|
|
1186
|
+
/** Optional publisher. Missing fields are not invented. */
|
|
1187
|
+
publisher?: JsJsonLdPublisher
|
|
1188
|
+
/** Site origin used for `@id` / `url`. */
|
|
1189
|
+
siteUrl?: string
|
|
1190
|
+
pageType?: string
|
|
1191
|
+
graph?: Array<string>
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
/** Optional JSON-LD publisher. Only configured fields are emitted. */
|
|
1195
|
+
export interface JsJsonLdPublisher {
|
|
1196
|
+
/** Organization name. */
|
|
1197
|
+
name?: string
|
|
1198
|
+
/** Organization URL. Unsafe schemes are dropped. */
|
|
1199
|
+
url?: string
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
/** Opt-in `{kbd:...}` inline keyboard keys. */
|
|
1203
|
+
export interface JsKeyboardKeysOptions {
|
|
1204
|
+
/**
|
|
1205
|
+
* Enable `{kbd:Ctrl+K}` expansion.
|
|
1206
|
+
*
|
|
1207
|
+
* Default: `false`.
|
|
1208
|
+
*/
|
|
1209
|
+
enabled?: boolean
|
|
1210
|
+
/**
|
|
1211
|
+
* Build-time key aliases. Keys are matched case-insensitively.
|
|
1212
|
+
*
|
|
1213
|
+
* Default: `{}`.
|
|
1214
|
+
*/
|
|
1215
|
+
aliases?: Record<string, string>
|
|
1216
|
+
/**
|
|
1217
|
+
* Label style for built-in aliases: `"words"` or `"symbols"`.
|
|
1218
|
+
*
|
|
1219
|
+
* Default: `"words"`.
|
|
1220
|
+
*/
|
|
1221
|
+
style?: string
|
|
1222
|
+
}
|
|
1223
|
+
|
|
941
1224
|
/** Locale information for the locale switcher. */
|
|
942
1225
|
export interface JsLocaleInfo {
|
|
943
1226
|
/** BCP 47 locale tag. */
|
|
@@ -948,6 +1231,62 @@ export interface JsLocaleInfo {
|
|
|
948
1231
|
dir: string
|
|
949
1232
|
}
|
|
950
1233
|
|
|
1234
|
+
/** Sibling page or locale-root href for one locale. */
|
|
1235
|
+
export interface JsLocalePath {
|
|
1236
|
+
/** BCP 47 locale tag. */
|
|
1237
|
+
code: string
|
|
1238
|
+
/** Href of the same page in this locale, when that translation exists. */
|
|
1239
|
+
href?: string
|
|
1240
|
+
/** Locale home href used when `href` is missing. */
|
|
1241
|
+
root?: string
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
/** One configured magic-link alias. */
|
|
1245
|
+
export interface JsMagicLinkAlias {
|
|
1246
|
+
/** Absolute `http:` / `https:` URL. */
|
|
1247
|
+
href: string
|
|
1248
|
+
/** Optional display label. Defaults to the alias key. */
|
|
1249
|
+
label?: string
|
|
1250
|
+
/** Optional avatar or favicon URL. */
|
|
1251
|
+
image?: string
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
/** Replace the resolved image for matching hrefs. */
|
|
1255
|
+
export interface JsMagicLinkImageOverride {
|
|
1256
|
+
/** Exact href to replace. */
|
|
1257
|
+
href?: string
|
|
1258
|
+
/** Href prefix to replace. */
|
|
1259
|
+
prefix?: string
|
|
1260
|
+
/** Replacement image URL. Must be `http:` or `https:`. */
|
|
1261
|
+
image: string
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
/** Opt-in `{link:...}` rich magic links. */
|
|
1265
|
+
export interface JsMagicLinkOptions {
|
|
1266
|
+
/**
|
|
1267
|
+
* Enable `{link:@user}`, `{link:alias}`, and `{link:label|url}`.
|
|
1268
|
+
*
|
|
1269
|
+
* Default: `false`.
|
|
1270
|
+
*/
|
|
1271
|
+
enabled?: boolean
|
|
1272
|
+
/** Named aliases mapped to href / label / image. */
|
|
1273
|
+
aliases?: Record<string, JsMagicLinkAlias>
|
|
1274
|
+
/**
|
|
1275
|
+
* Emit a favicon URL for explicit links that have no image.
|
|
1276
|
+
*
|
|
1277
|
+
* Default: `false`. No transform-time network request.
|
|
1278
|
+
*/
|
|
1279
|
+
favicon?: boolean
|
|
1280
|
+
/**
|
|
1281
|
+
* Favicon URL template with a `{host}` placeholder.
|
|
1282
|
+
*
|
|
1283
|
+
* Default: `https://{host}/favicon.ico` when `favicon` is true.
|
|
1284
|
+
*/
|
|
1285
|
+
faviconTemplate?: string
|
|
1286
|
+
/** Image replacements applied after alias / GitHub / favicon resolution. */
|
|
1287
|
+
imageOverrides?: Array<JsMagicLinkImageOverride>
|
|
1288
|
+
}
|
|
1289
|
+
|
|
951
1290
|
export interface JsMarkdownLintDiagnostic {
|
|
952
1291
|
ruleId: string
|
|
953
1292
|
severity: string
|
|
@@ -975,6 +1314,8 @@ export interface JsMarkdownLintOptions {
|
|
|
975
1314
|
languages?: Array<string>
|
|
976
1315
|
rules?: JsMarkdownLintRuleOptions
|
|
977
1316
|
dictionary?: JsMarkdownLintDictionaryOptions
|
|
1317
|
+
/** Enable MDX-aware syntax masking while linting visible prose. */
|
|
1318
|
+
mdx?: boolean
|
|
978
1319
|
}
|
|
979
1320
|
|
|
980
1321
|
export interface JsMarkdownLintResult {
|
|
@@ -995,6 +1336,16 @@ export interface JsMarkdownLintRuleOptions {
|
|
|
995
1336
|
trailingSpaces?: boolean
|
|
996
1337
|
}
|
|
997
1338
|
|
|
1339
|
+
/** Opt-in `$…$` inline and `$$…$$` block math. */
|
|
1340
|
+
export interface JsMathOptions {
|
|
1341
|
+
/**
|
|
1342
|
+
* Enable `$…$` inline and `$$…$$` block math.
|
|
1343
|
+
*
|
|
1344
|
+
* Default: `false` when the whole option is omitted; `true` when this object is present.
|
|
1345
|
+
*/
|
|
1346
|
+
enabled?: boolean
|
|
1347
|
+
}
|
|
1348
|
+
|
|
998
1349
|
/** Built-in media embed transform switches. */
|
|
999
1350
|
export interface JsMediaEmbedsOptions {
|
|
1000
1351
|
/**
|
|
@@ -1003,6 +1354,18 @@ export interface JsMediaEmbedsOptions {
|
|
|
1003
1354
|
* Default: `false`.
|
|
1004
1355
|
*/
|
|
1005
1356
|
spotify?: boolean
|
|
1357
|
+
/**
|
|
1358
|
+
* Render `<AppleMusic>` embeds.
|
|
1359
|
+
*
|
|
1360
|
+
* Default: `false`.
|
|
1361
|
+
*/
|
|
1362
|
+
appleMusic?: boolean
|
|
1363
|
+
/**
|
|
1364
|
+
* Render `<SpeakerDeck>` embeds.
|
|
1365
|
+
*
|
|
1366
|
+
* Default: `false`.
|
|
1367
|
+
*/
|
|
1368
|
+
speakerDeck?: boolean
|
|
1006
1369
|
/**
|
|
1007
1370
|
* Render `<StackBlitz>` embeds.
|
|
1008
1371
|
*
|
|
@@ -1027,6 +1390,40 @@ export interface JsMediaEmbedsOptions {
|
|
|
1027
1390
|
* Default: `false`.
|
|
1028
1391
|
*/
|
|
1029
1392
|
webContainer?: boolean
|
|
1393
|
+
/**
|
|
1394
|
+
* Render `<Audio>` native players.
|
|
1395
|
+
*
|
|
1396
|
+
* Default: `false`.
|
|
1397
|
+
*/
|
|
1398
|
+
audio?: boolean
|
|
1399
|
+
/**
|
|
1400
|
+
* Render `<Video>` native players.
|
|
1401
|
+
*
|
|
1402
|
+
* Default: `false`.
|
|
1403
|
+
*/
|
|
1404
|
+
video?: boolean
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
/** Opt-in `<NotByAI />` authorship badge. */
|
|
1408
|
+
export interface JsNotByAiOptions {
|
|
1409
|
+
/**
|
|
1410
|
+
* Enable `<NotByAI />` expansion.
|
|
1411
|
+
*
|
|
1412
|
+
* Default: `false`.
|
|
1413
|
+
*/
|
|
1414
|
+
enabled?: boolean
|
|
1415
|
+
/**
|
|
1416
|
+
* Accessible label for the badge link.
|
|
1417
|
+
*
|
|
1418
|
+
* Default: `"Written by human, not by AI"`.
|
|
1419
|
+
*/
|
|
1420
|
+
label?: string
|
|
1421
|
+
/**
|
|
1422
|
+
* Destination URL. Unsafe values fall back to `https://notbyai.fyi`.
|
|
1423
|
+
*
|
|
1424
|
+
* Default: `"https://notbyai.fyi"`.
|
|
1425
|
+
*/
|
|
1426
|
+
href?: string
|
|
1030
1427
|
}
|
|
1031
1428
|
|
|
1032
1429
|
/** OG image configuration for JavaScript. */
|
|
@@ -1057,6 +1454,40 @@ export interface JsOgImageData {
|
|
|
1057
1454
|
author?: string
|
|
1058
1455
|
}
|
|
1059
1456
|
|
|
1457
|
+
/** One local OpenAPI file consumed by the generated docs pipeline. */
|
|
1458
|
+
export interface JsOpenApiDocsInput {
|
|
1459
|
+
path: string
|
|
1460
|
+
name?: string
|
|
1461
|
+
failOnUnresolvedRefs?: boolean
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
/** Options shared by all OpenAPI docs inputs. */
|
|
1465
|
+
export interface JsOpenApiDocsOptions {
|
|
1466
|
+
root?: string
|
|
1467
|
+
basePath?: string
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
/** Per-page frontmatter chrome flags. */
|
|
1471
|
+
export interface JsPageChromeFlags {
|
|
1472
|
+
sidebar?: boolean
|
|
1473
|
+
outline?: boolean
|
|
1474
|
+
aside?: boolean
|
|
1475
|
+
footer?: boolean
|
|
1476
|
+
navbar?: boolean
|
|
1477
|
+
lastUpdated?: boolean
|
|
1478
|
+
editLink?: boolean
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
/** Frontmatter override for one previous/next pager side. */
|
|
1482
|
+
export interface JsPagerOverride {
|
|
1483
|
+
/** Hide this side when true. */
|
|
1484
|
+
hidden?: boolean
|
|
1485
|
+
/** Replacement title. */
|
|
1486
|
+
text?: string
|
|
1487
|
+
/** Replacement href. */
|
|
1488
|
+
href?: string
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1060
1491
|
/**
|
|
1061
1492
|
* Parser options for JavaScript.
|
|
1062
1493
|
*
|
|
@@ -1069,6 +1500,12 @@ export interface JsParserOptions {
|
|
|
1069
1500
|
* Default: `false`.
|
|
1070
1501
|
*/
|
|
1071
1502
|
gfm?: boolean
|
|
1503
|
+
/**
|
|
1504
|
+
* Enable MDX JSX, ESM, and expression nodes.
|
|
1505
|
+
*
|
|
1506
|
+
* Default: `false`.
|
|
1507
|
+
*/
|
|
1508
|
+
mdx?: boolean
|
|
1072
1509
|
/**
|
|
1073
1510
|
* Enable footnote references and definitions.
|
|
1074
1511
|
*
|
|
@@ -1101,6 +1538,34 @@ export interface JsParserOptions {
|
|
|
1101
1538
|
autolinks?: boolean
|
|
1102
1539
|
}
|
|
1103
1540
|
|
|
1541
|
+
/** Opt-in parameterized Markdown partials. */
|
|
1542
|
+
export interface JsPartialsOptions {
|
|
1543
|
+
/**
|
|
1544
|
+
* Enable `<!-- @partial: PATH k="v" -->` expansion.
|
|
1545
|
+
*
|
|
1546
|
+
* Default: `false`.
|
|
1547
|
+
*/
|
|
1548
|
+
enabled?: boolean
|
|
1549
|
+
/**
|
|
1550
|
+
* Root directory used for `@/` and absolute partial paths.
|
|
1551
|
+
*
|
|
1552
|
+
* Default: project root from the JavaScript caller.
|
|
1553
|
+
*/
|
|
1554
|
+
rootDir?: string
|
|
1555
|
+
/**
|
|
1556
|
+
* Directory used for bare partial names such as `install.md`.
|
|
1557
|
+
*
|
|
1558
|
+
* Default: `"_partials"`.
|
|
1559
|
+
*/
|
|
1560
|
+
root?: string
|
|
1561
|
+
/**
|
|
1562
|
+
* Missing `{{ name }}` substitutions: `"literal"` (default) or `"error"`.
|
|
1563
|
+
*
|
|
1564
|
+
* Default: `"literal"`.
|
|
1565
|
+
*/
|
|
1566
|
+
missing?: string
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1104
1569
|
/** A block the native pass left for the caller's highlighter. */
|
|
1105
1570
|
export interface JsPendingBlock {
|
|
1106
1571
|
/** The `language-…` class the block carries. */
|
|
@@ -1139,6 +1604,34 @@ export interface JsPublicExport {
|
|
|
1139
1604
|
source: JsExportSource
|
|
1140
1605
|
}
|
|
1141
1606
|
|
|
1607
|
+
/** Whether a page should be written and listed. */
|
|
1608
|
+
export interface JsPublishDecision {
|
|
1609
|
+
/** Write HTML for this page. */
|
|
1610
|
+
output: boolean
|
|
1611
|
+
/** Include the page in nav, sitemap, and search. */
|
|
1612
|
+
listed: boolean
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
/** JavaScript publish-state options. */
|
|
1616
|
+
export interface JsPublishStateOptions {
|
|
1617
|
+
/** When false, every page stays published and listed. */
|
|
1618
|
+
enabled?: boolean
|
|
1619
|
+
/** Injected ISO-8601 clock used for scheduled / expiry comparison. */
|
|
1620
|
+
now?: string
|
|
1621
|
+
/** Keep draft and not-yet-scheduled pages visible (dev preview). */
|
|
1622
|
+
includeDrafts?: boolean
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
/** Opt-in reader chrome flags. Presence of the object enables the feature. */
|
|
1626
|
+
export interface JsReaderChrome {
|
|
1627
|
+
/** Copy button on fenced code blocks. */
|
|
1628
|
+
copy?: boolean
|
|
1629
|
+
/** Icon and `rel` on outbound links. */
|
|
1630
|
+
externalLinks?: boolean
|
|
1631
|
+
/** Back-to-top control that appears after scroll. */
|
|
1632
|
+
backToTop?: boolean
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1142
1635
|
/** Resolved source module. */
|
|
1143
1636
|
export interface JsResolvedModule {
|
|
1144
1637
|
path: string
|
|
@@ -1197,6 +1690,14 @@ export interface JsSearchDocument {
|
|
|
1197
1690
|
code: Array<string>
|
|
1198
1691
|
}
|
|
1199
1692
|
|
|
1693
|
+
/** Optional filters for directory search-index construction. */
|
|
1694
|
+
export interface JsSearchIndexBuildOptions {
|
|
1695
|
+
/** Publish-state filter applied while walking Markdown files. */
|
|
1696
|
+
publishState?: JsPublishStateOptions
|
|
1697
|
+
/** Explicit MDX parser override. When omitted, `.mdx` files enable MDX. */
|
|
1698
|
+
mdx?: boolean
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1200
1701
|
/** Search options for JavaScript. */
|
|
1201
1702
|
export interface JsSearchOptions {
|
|
1202
1703
|
/** Maximum number of results. */
|
|
@@ -1233,12 +1734,24 @@ export interface JsSearchRuntimeOptions {
|
|
|
1233
1734
|
limit: number
|
|
1234
1735
|
/** Enable prefix matching. */
|
|
1235
1736
|
prefix: boolean
|
|
1737
|
+
/** Enable fuzzy typo-tolerant matching. */
|
|
1738
|
+
fuzzy: boolean
|
|
1236
1739
|
/** Search input placeholder. */
|
|
1237
1740
|
placeholder: string
|
|
1238
1741
|
/** Keyboard shortcut to focus search. */
|
|
1239
1742
|
hotkey: string
|
|
1240
1743
|
}
|
|
1241
1744
|
|
|
1745
|
+
/** One child link on a generated section index. */
|
|
1746
|
+
export interface JsSectionIndexItem {
|
|
1747
|
+
/** Visible title. Escaped in HTML. */
|
|
1748
|
+
title: string
|
|
1749
|
+
/** Destination. `javascript:` and other schemes are rejected. */
|
|
1750
|
+
href: string
|
|
1751
|
+
/** Optional card description. Escaped in HTML. */
|
|
1752
|
+
description?: string
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1242
1755
|
/** Custom social link for JavaScript. */
|
|
1243
1756
|
export interface JsSocialLink {
|
|
1244
1757
|
/** Icon label. */
|
|
@@ -1353,18 +1866,44 @@ export interface JsSsgBarePage {
|
|
|
1353
1866
|
|
|
1354
1867
|
/** SSG configuration. */
|
|
1355
1868
|
export interface JsSsgConfig {
|
|
1356
|
-
/** Site name. */
|
|
1357
1869
|
siteName: string
|
|
1358
|
-
/** Base URL path. */
|
|
1359
1870
|
base: string
|
|
1360
|
-
|
|
1871
|
+
breadcrumbRootHref?: string
|
|
1361
1872
|
ogImage?: string
|
|
1873
|
+
siteUrl?: string
|
|
1874
|
+
headValidation?: string
|
|
1362
1875
|
/** Theme configuration. */
|
|
1363
1876
|
theme?: JsThemeConfig
|
|
1364
1877
|
/** Current locale for this page. */
|
|
1365
1878
|
locale?: string
|
|
1366
1879
|
/** Available locales for locale switcher. */
|
|
1367
1880
|
availableLocales?: Array<JsLocaleInfo>
|
|
1881
|
+
/** When true, render previous/next page links after the article. */
|
|
1882
|
+
pagination?: boolean
|
|
1883
|
+
/** When true, render a breadcrumb trail above the article. */
|
|
1884
|
+
breadcrumbs?: boolean
|
|
1885
|
+
/** Opt-in copy, external-link, and back-to-top chrome. */
|
|
1886
|
+
readerChrome?: JsReaderChrome
|
|
1887
|
+
/** Opt-in header locale switcher. */
|
|
1888
|
+
localeSwitcher?: boolean
|
|
1889
|
+
/** Existing sibling hrefs and locale roots. */
|
|
1890
|
+
localePaths?: Array<JsLocalePath>
|
|
1891
|
+
/** Opt-in skip link and print styles. Presence enables the feature. */
|
|
1892
|
+
a11y?: JsA11y
|
|
1893
|
+
/** Opt-in team / members page. Omitted stays off. */
|
|
1894
|
+
team?: JsTeamOptions
|
|
1895
|
+
/** When true, honor per-page frontmatter chrome flags. */
|
|
1896
|
+
pageChrome?: boolean
|
|
1897
|
+
/** Opt-in JSON-LD structured data. Presence enables the feature. */
|
|
1898
|
+
jsonLd?: JsJsonLd
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
/** One rendered git author on an SSG page. */
|
|
1902
|
+
export interface JsSsgContributor {
|
|
1903
|
+
/** Display name. Escaped in HTML. */
|
|
1904
|
+
name: string
|
|
1905
|
+
/** Optional `https:` avatar URL. Emails are never accepted here. */
|
|
1906
|
+
avatar?: string
|
|
1368
1907
|
}
|
|
1369
1908
|
|
|
1370
1909
|
/** Result of SSG shared asset extraction. */
|
|
@@ -1385,6 +1924,12 @@ export interface JsSsgGeneratedHtmlPage {
|
|
|
1385
1924
|
html: string
|
|
1386
1925
|
}
|
|
1387
1926
|
|
|
1927
|
+
/** Themed SSG HTML plus page-head diagnostics. */
|
|
1928
|
+
export interface JsSsgHtmlResult {
|
|
1929
|
+
html: string
|
|
1930
|
+
diagnostics: Array<JsHeadDiagnostic>
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1388
1933
|
/** Navigation group for SSG. */
|
|
1389
1934
|
export interface JsSsgNavGroup {
|
|
1390
1935
|
/** Group title. */
|
|
@@ -1433,10 +1978,28 @@ export interface JsSsgPageData {
|
|
|
1433
1978
|
toc: Array<TocEntry>
|
|
1434
1979
|
/** Last updated timestamp in milliseconds since the Unix epoch. */
|
|
1435
1980
|
lastUpdated?: number
|
|
1981
|
+
/** Unique git authors for this page. Empty unless the site opted in. */
|
|
1982
|
+
contributors?: Array<JsSsgContributor>
|
|
1436
1983
|
/** URL path. */
|
|
1437
1984
|
path: string
|
|
1438
1985
|
/** Entry page configuration (if layout: entry). */
|
|
1439
1986
|
entryPage?: JsEntryPageConfig
|
|
1987
|
+
/** Frontmatter override for the previous-page link. */
|
|
1988
|
+
prev?: JsPagerOverride
|
|
1989
|
+
/** Frontmatter override for the next-page link. */
|
|
1990
|
+
next?: JsPagerOverride
|
|
1991
|
+
/** Frontmatter `breadcrumbs: false` hides the trail on this page. */
|
|
1992
|
+
breadcrumbs?: boolean
|
|
1993
|
+
/** Frontmatter `layout`. `team` renders member cards when the option is on. */
|
|
1994
|
+
layout?: string
|
|
1995
|
+
/** Per-page chrome flags. Honored only when page chrome is enabled. */
|
|
1996
|
+
chrome?: JsPageChromeFlags
|
|
1997
|
+
/** Frontmatter `robots`. */
|
|
1998
|
+
robots?: string
|
|
1999
|
+
/** Frontmatter `canonical`. */
|
|
2000
|
+
canonical?: string
|
|
2001
|
+
/** Companion `.md` URL when copy-as-markdown chrome is on. */
|
|
2002
|
+
markdownSource?: string
|
|
1440
2003
|
}
|
|
1441
2004
|
|
|
1442
2005
|
/** Resolved SSG output and public route paths. */
|
|
@@ -1477,6 +2040,11 @@ export interface JsSsgSidebarItem {
|
|
|
1477
2040
|
stickyCollapsed?: boolean
|
|
1478
2041
|
}
|
|
1479
2042
|
|
|
2043
|
+
/** Opt-in `::: steps` wrappers. `enabled` defaults to `false`. */
|
|
2044
|
+
export interface JsStepsOptions {
|
|
2045
|
+
enabled?: boolean
|
|
2046
|
+
}
|
|
2047
|
+
|
|
1480
2048
|
/** Result of [`super::transform_tabs_embeds`]. */
|
|
1481
2049
|
export interface JsTabsTransformResult {
|
|
1482
2050
|
/** HTML with every `<tabs>` block expanded. */
|
|
@@ -1488,6 +2056,44 @@ export interface JsTabsTransformResult {
|
|
|
1488
2056
|
groupCount: number
|
|
1489
2057
|
}
|
|
1490
2058
|
|
|
2059
|
+
/** One link on a team member card. */
|
|
2060
|
+
export interface JsTeamLink {
|
|
2061
|
+
/** Visible label. */
|
|
2062
|
+
label: string
|
|
2063
|
+
/** Destination URL. */
|
|
2064
|
+
href: string
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
/** One person on the team page. */
|
|
2068
|
+
export interface JsTeamMember {
|
|
2069
|
+
/** Display name. */
|
|
2070
|
+
name: string
|
|
2071
|
+
/** Optional role or title. */
|
|
2072
|
+
role?: string
|
|
2073
|
+
/** Avatar URL. */
|
|
2074
|
+
avatar?: string
|
|
2075
|
+
/** Optional profile or social links. */
|
|
2076
|
+
links?: Array<JsTeamLink>
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
/** Opt-in team / members page. Presence of the object enables the feature. */
|
|
2080
|
+
export interface JsTeamOptions {
|
|
2081
|
+
/** When false, `layout: team` is ignored. */
|
|
2082
|
+
enabled?: boolean
|
|
2083
|
+
/** Members rendered as static cards. */
|
|
2084
|
+
members?: Array<JsTeamMember>
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
/** Announcement bar for JavaScript. */
|
|
2088
|
+
export interface JsThemeAnnouncement {
|
|
2089
|
+
/** Escaped bar text. */
|
|
2090
|
+
text: string
|
|
2091
|
+
/** Optional https or same-origin link. */
|
|
2092
|
+
link?: string
|
|
2093
|
+
/** localStorage key used to persist dismiss. */
|
|
2094
|
+
dismissKey?: string
|
|
2095
|
+
}
|
|
2096
|
+
|
|
1491
2097
|
/** Theme colors for JavaScript. */
|
|
1492
2098
|
export interface JsThemeColors {
|
|
1493
2099
|
/** Primary accent color. */
|
|
@@ -1514,18 +2120,28 @@ export interface JsThemeColors {
|
|
|
1514
2120
|
|
|
1515
2121
|
/** Theme configuration for JavaScript. */
|
|
1516
2122
|
export interface JsThemeConfig {
|
|
2123
|
+
/** Progressive cross-document transitions for same-origin MPA navigation. */
|
|
2124
|
+
viewTransitions?: boolean
|
|
2125
|
+
/** Right-hand "On this page" outline. Omitted and `false` hide it. */
|
|
2126
|
+
aside?: boolean
|
|
2127
|
+
/** Breadcrumb trail from the site root through sidebar ancestors. */
|
|
2128
|
+
breadcrumbs?: boolean
|
|
2129
|
+
/** Heading permalink visibility. `"hover"` or `"always"`. CSS only. */
|
|
2130
|
+
headingPermalink?: string
|
|
1517
2131
|
/** Light mode colors. */
|
|
1518
2132
|
colors?: JsThemeColors
|
|
1519
2133
|
/** Dark mode colors. */
|
|
1520
2134
|
darkColors?: JsThemeColors
|
|
1521
|
-
/** Font configuration. */
|
|
1522
2135
|
fonts?: JsThemeFonts
|
|
1523
2136
|
/** Entry page configuration. */
|
|
1524
2137
|
entryPage?: JsThemeEntryPage
|
|
1525
|
-
/** Layout configuration. */
|
|
1526
2138
|
layout?: JsThemeLayout
|
|
1527
2139
|
/** Header configuration. */
|
|
1528
2140
|
header?: JsThemeHeader
|
|
2141
|
+
/** Opt-in header nav items. */
|
|
2142
|
+
nav?: Array<JsHeaderNavItem>
|
|
2143
|
+
/** Opt-in announcement bar. */
|
|
2144
|
+
announcement?: JsThemeAnnouncement
|
|
1529
2145
|
/** Footer configuration. */
|
|
1530
2146
|
footer?: JsThemeFooter
|
|
1531
2147
|
/** Social links configuration. */
|
|
@@ -1608,6 +2224,40 @@ export interface JsThemeLayout {
|
|
|
1608
2224
|
maxContentWidth?: string
|
|
1609
2225
|
}
|
|
1610
2226
|
|
|
2227
|
+
/** Opt-in static `::: timeline` milestone lists. */
|
|
2228
|
+
export interface JsTimelineOptions {
|
|
2229
|
+
/**
|
|
2230
|
+
* Enable static timeline blocks.
|
|
2231
|
+
*
|
|
2232
|
+
* Default: `false`.
|
|
2233
|
+
*/
|
|
2234
|
+
enabled?: boolean
|
|
2235
|
+
/**
|
|
2236
|
+
* Render timelines as ordered lists unless a block overrides it.
|
|
2237
|
+
*
|
|
2238
|
+
* Default: `true`.
|
|
2239
|
+
*/
|
|
2240
|
+
ordered?: boolean
|
|
2241
|
+
/**
|
|
2242
|
+
* Validation mode for malformed dates.
|
|
2243
|
+
*
|
|
2244
|
+
* Default: `"error"`.
|
|
2245
|
+
*/
|
|
2246
|
+
invalidDate?: string
|
|
2247
|
+
/**
|
|
2248
|
+
* Validation mode for unsupported item metadata.
|
|
2249
|
+
*
|
|
2250
|
+
* Default: `"error"`.
|
|
2251
|
+
*/
|
|
2252
|
+
unknownMeta?: string
|
|
2253
|
+
/**
|
|
2254
|
+
* Validation mode for timeline blocks without items.
|
|
2255
|
+
*
|
|
2256
|
+
* Default: `"error"`.
|
|
2257
|
+
*/
|
|
2258
|
+
empty?: string
|
|
2259
|
+
}
|
|
2260
|
+
|
|
1611
2261
|
/**
|
|
1612
2262
|
* Transform options for JavaScript.
|
|
1613
2263
|
*
|
|
@@ -1621,12 +2271,24 @@ export interface JsTransformOptions {
|
|
|
1621
2271
|
* Default: `false`.
|
|
1622
2272
|
*/
|
|
1623
2273
|
gfm?: boolean
|
|
2274
|
+
/**
|
|
2275
|
+
* Enable MDX JSX, ESM, and expression nodes.
|
|
2276
|
+
*
|
|
2277
|
+
* Default: `false`.
|
|
2278
|
+
*/
|
|
2279
|
+
mdx?: boolean
|
|
1624
2280
|
/**
|
|
1625
2281
|
* Enable footnote references and definitions.
|
|
1626
2282
|
*
|
|
1627
2283
|
* Default: `false`, or `true` when `gfm` is `true`.
|
|
1628
2284
|
*/
|
|
1629
2285
|
footnotes?: boolean
|
|
2286
|
+
/**
|
|
2287
|
+
* Render footnotes as a semantic ordered section with numeric markers.
|
|
2288
|
+
*
|
|
2289
|
+
* Default: `false`.
|
|
2290
|
+
*/
|
|
2291
|
+
semanticFootnotes?: boolean
|
|
1630
2292
|
/**
|
|
1631
2293
|
* Enable GFM task-list item markers.
|
|
1632
2294
|
*
|
|
@@ -1726,6 +2388,12 @@ export interface JsTransformOptions {
|
|
|
1726
2388
|
* Default: `true`; ignored when [`Self::autolink_urls`] is off.
|
|
1727
2389
|
*/
|
|
1728
2390
|
autolinkTargetBlank?: boolean
|
|
2391
|
+
/**
|
|
2392
|
+
* Opt-in visible heading permalinks (`<a class="header-anchor" href="#id">`).
|
|
2393
|
+
*
|
|
2394
|
+
* Default: disabled. Existing HTML stays unchanged until this is enabled.
|
|
2395
|
+
*/
|
|
2396
|
+
headingPermalinks?: boolean
|
|
1729
2397
|
/**
|
|
1730
2398
|
* Opt-in Obsidian-style wiki links.
|
|
1731
2399
|
*
|
|
@@ -1782,6 +2450,114 @@ export interface JsTransformOptions {
|
|
|
1782
2450
|
* Default: disabled.
|
|
1783
2451
|
*/
|
|
1784
2452
|
editThisPage?: JsEditThisPageOptions
|
|
2453
|
+
/**
|
|
2454
|
+
* Opt-in `::: tip` custom containers.
|
|
2455
|
+
*
|
|
2456
|
+
* Default: disabled.
|
|
2457
|
+
*/
|
|
2458
|
+
containers?: JsContainerOptions
|
|
2459
|
+
/**
|
|
2460
|
+
* Opt-in Markdown file includes via `<!-- @include: PATH -->`.
|
|
2461
|
+
*
|
|
2462
|
+
* Default: disabled.
|
|
2463
|
+
*/
|
|
2464
|
+
includes?: JsIncludeOptions
|
|
2465
|
+
/**
|
|
2466
|
+
* Opt-in parameterized Markdown partials via `<!-- @partial: PATH k="v" -->`.
|
|
2467
|
+
*
|
|
2468
|
+
* Default: disabled.
|
|
2469
|
+
*/
|
|
2470
|
+
partials?: JsPartialsOptions
|
|
2471
|
+
/**
|
|
2472
|
+
* Opt-in `::: steps` ordered lists.
|
|
2473
|
+
*
|
|
2474
|
+
* Default: disabled.
|
|
2475
|
+
*/
|
|
2476
|
+
steps?: JsStepsOptions
|
|
2477
|
+
/**
|
|
2478
|
+
* Opt-in `::: code-group` fence groups.
|
|
2479
|
+
*
|
|
2480
|
+
* Default: disabled.
|
|
2481
|
+
*/
|
|
2482
|
+
codeGroups?: JsCodeGroupOptions
|
|
2483
|
+
/**
|
|
2484
|
+
* Opt-in `{badge:variant}` inline badges.
|
|
2485
|
+
*
|
|
2486
|
+
* Default: disabled.
|
|
2487
|
+
*/
|
|
2488
|
+
badges?: JsBadgeOptions
|
|
2489
|
+
/**
|
|
2490
|
+
* Opt-in `<NotByAI />` authorship badge.
|
|
2491
|
+
*
|
|
2492
|
+
* Default: disabled.
|
|
2493
|
+
*/
|
|
2494
|
+
notByAi?: JsNotByAiOptions
|
|
2495
|
+
/**
|
|
2496
|
+
* Opt-in `{kbd:...}` inline keyboard keys.
|
|
2497
|
+
*
|
|
2498
|
+
* Default: disabled.
|
|
2499
|
+
*/
|
|
2500
|
+
keyboardKeys?: JsKeyboardKeysOptions
|
|
2501
|
+
/**
|
|
2502
|
+
* Opt-in abbreviation and glossary expansion.
|
|
2503
|
+
*
|
|
2504
|
+
* Default: disabled.
|
|
2505
|
+
*/
|
|
2506
|
+
abbreviations?: JsAbbreviationsOptions
|
|
2507
|
+
/**
|
|
2508
|
+
* Opt-in PHP Markdown Extra / mdBook-style definition lists.
|
|
2509
|
+
*
|
|
2510
|
+
* Default: disabled.
|
|
2511
|
+
*/
|
|
2512
|
+
definitionLists?: JsDefinitionListOptions
|
|
2513
|
+
/**
|
|
2514
|
+
* Opt-in `{link:...}` rich magic links.
|
|
2515
|
+
*
|
|
2516
|
+
* Default: disabled.
|
|
2517
|
+
*/
|
|
2518
|
+
magicLinks?: JsMagicLinkOptions
|
|
2519
|
+
/**
|
|
2520
|
+
* Opt-in figures, captions, and lazy images.
|
|
2521
|
+
*
|
|
2522
|
+
* Default: disabled.
|
|
2523
|
+
*/
|
|
2524
|
+
images?: JsImageOptions
|
|
2525
|
+
/**
|
|
2526
|
+
* Opt-in static `::: gallery` image groups.
|
|
2527
|
+
*
|
|
2528
|
+
* Default: disabled.
|
|
2529
|
+
*/
|
|
2530
|
+
imageGalleries?: JsImageGalleryOptions
|
|
2531
|
+
/**
|
|
2532
|
+
* Opt-in static `::: timeline` milestone lists.
|
|
2533
|
+
*
|
|
2534
|
+
* Default: disabled.
|
|
2535
|
+
*/
|
|
2536
|
+
timelines?: JsTimelineOptions
|
|
2537
|
+
/**
|
|
2538
|
+
* Opt-in `::: card` / `::: link-card` / `::: card-grid` blocks.
|
|
2539
|
+
*
|
|
2540
|
+
* Default: disabled.
|
|
2541
|
+
*/
|
|
2542
|
+
cards?: JsCardOptions
|
|
2543
|
+
/**
|
|
2544
|
+
* Opt-in `$…$` inline and `$$…$$` block math.
|
|
2545
|
+
*
|
|
2546
|
+
* Default: disabled.
|
|
2547
|
+
*/
|
|
2548
|
+
math?: boolean | JsMathOptions
|
|
2549
|
+
/**
|
|
2550
|
+
* Opt-in static `file-tree` fences.
|
|
2551
|
+
*
|
|
2552
|
+
* Default: disabled.
|
|
2553
|
+
*/
|
|
2554
|
+
fileTree?: JsFileTreeOptions
|
|
2555
|
+
/**
|
|
2556
|
+
* Opt-in static `csv-table` / `json-table` fences.
|
|
2557
|
+
*
|
|
2558
|
+
* Default: disabled.
|
|
2559
|
+
*/
|
|
2560
|
+
dataTables?: JsDataTableOptions
|
|
1785
2561
|
}
|
|
1786
2562
|
|
|
1787
2563
|
/** Type parameter documentation (`<T extends C = D>`) used by generated API docs. */
|
|
@@ -1865,6 +2641,24 @@ export declare function loadDictionariesFlat(dir: string): Record<string, Record
|
|
|
1865
2641
|
/** Returns true when a document belongs to at least one requested search scope. */
|
|
1866
2642
|
export declare function matchesSearchScopes(id: string, url: string, scopes: Array<string>): boolean
|
|
1867
2643
|
|
|
2644
|
+
/** One `import` statement collected from MDX ESM. */
|
|
2645
|
+
export interface MdxImport {
|
|
2646
|
+
/** Module specifier string. */
|
|
2647
|
+
source: string
|
|
2648
|
+
/** Bindings created by the import. */
|
|
2649
|
+
specifiers: Array<MdxImportSpecifier>
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2652
|
+
/** How a specifier was imported. */
|
|
2653
|
+
export interface MdxImportSpecifier {
|
|
2654
|
+
/** Imported name (`default`, `*`, or the named export). */
|
|
2655
|
+
imported: string
|
|
2656
|
+
/** Local binding name. */
|
|
2657
|
+
local: string
|
|
2658
|
+
/** `default`, `named`, or `namespace`. */
|
|
2659
|
+
kind: 'default' | 'named' | 'namespace'
|
|
2660
|
+
}
|
|
2661
|
+
|
|
1868
2662
|
/** Restores code block metadata after JavaScript-side syntax highlighting. */
|
|
1869
2663
|
export declare function mergeHighlightedCodeBlocks(originalHtml: string, highlightedHtml: string): string
|
|
1870
2664
|
|
|
@@ -1959,6 +2753,9 @@ export declare function render(astJson: string): RenderResult
|
|
|
1959
2753
|
*/
|
|
1960
2754
|
export declare function renderFrameworkComponentCode(html: string, target: string, islands?: Array<JsFrameworkComponentIsland> | undefined | null, mode?: string | undefined | null): string
|
|
1961
2755
|
|
|
2756
|
+
/** Resolve Unhead-compatible page-head descriptors to HTML. */
|
|
2757
|
+
export declare function renderHead(inputJson: string): JsSsgHtmlResult
|
|
2758
|
+
|
|
1962
2759
|
/** Render result containing the HTML output. */
|
|
1963
2760
|
export interface RenderResult {
|
|
1964
2761
|
/** The rendered HTML. */
|
|
@@ -1967,6 +2764,9 @@ export interface RenderResult {
|
|
|
1967
2764
|
errors: Array<string>
|
|
1968
2765
|
}
|
|
1969
2766
|
|
|
2767
|
+
/** Renders escaped section-index listing HTML. Hostile hrefs are dropped. */
|
|
2768
|
+
export declare function renderSsgSectionIndex(title: string, items: Array<JsSectionIndexItem>, style: string): string
|
|
2769
|
+
|
|
1970
2770
|
/** Resolves manual SSG navigation groups. */
|
|
1971
2771
|
export declare function resolveSsgNavigationGroups(navigation: Array<JsSsgNavigationGroup>, base: string, extension: string): Array<JsSsgNavGroup>
|
|
1972
2772
|
|
|
@@ -2033,7 +2833,7 @@ export declare function transformMermaid(html: string, mmdcPath: string): Mermai
|
|
|
2033
2833
|
*/
|
|
2034
2834
|
export declare function transformPmEmbeds(html: string, startGroup: number, options?: JsPmOptions | undefined | null): JsPmTransformResult
|
|
2035
2835
|
|
|
2036
|
-
/** Transform result containing HTML, frontmatter, and
|
|
2836
|
+
/** Transform result containing HTML, frontmatter, TOC, and MDX metadata. */
|
|
2037
2837
|
export interface TransformResult {
|
|
2038
2838
|
/** The rendered HTML. */
|
|
2039
2839
|
html: string
|
|
@@ -2043,6 +2843,12 @@ export interface TransformResult {
|
|
|
2043
2843
|
toc: Array<TocEntry>
|
|
2044
2844
|
/** Parse/render errors, if any. */
|
|
2045
2845
|
errors: Array<string>
|
|
2846
|
+
/** MDX `import` statements (empty when MDX is off or no ESM nodes). */
|
|
2847
|
+
imports: Array<MdxImport>
|
|
2848
|
+
/** Export names from MDX ESM (empty when MDX is off or no exports). */
|
|
2849
|
+
exports: Array<string>
|
|
2850
|
+
/** Unique JSX component names in document order (empty when none). */
|
|
2851
|
+
components: Array<string>
|
|
2046
2852
|
}
|
|
2047
2853
|
|
|
2048
2854
|
/**
|
package/index.js
CHANGED
|
@@ -191,12 +191,14 @@ module.exports.generateDocsNavCode = binding.generateDocsNavCode;
|
|
|
191
191
|
module.exports.collectDocsSourceFiles = binding.collectDocsSourceFiles;
|
|
192
192
|
module.exports.generateDocsDataJson = binding.generateDocsDataJson;
|
|
193
193
|
module.exports.generateDocsMarkdown = binding.generateDocsMarkdown;
|
|
194
|
+
module.exports.generateOpenApiDocs = binding.generateOpenApiDocs;
|
|
194
195
|
module.exports.writeGeneratedDocs = binding.writeGeneratedDocs;
|
|
195
196
|
module.exports.buildCollectionManifest = binding.buildCollectionManifest;
|
|
196
197
|
module.exports.mergeHighlightedCodeBlocks = binding.mergeHighlightedCodeBlocks;
|
|
197
198
|
module.exports.generateOgImageSvg = binding.generateOgImageSvg;
|
|
198
199
|
module.exports.buildSearchIndex = binding.buildSearchIndex;
|
|
199
200
|
module.exports.buildSearchIndexFromDirectory = binding.buildSearchIndexFromDirectory;
|
|
201
|
+
module.exports.classifyPublishState = binding.classifyPublishState;
|
|
200
202
|
module.exports.writeSearchIndex = binding.writeSearchIndex;
|
|
201
203
|
module.exports.searchIndex = binding.searchIndex;
|
|
202
204
|
module.exports.extractSearchContent = binding.extractSearchContent;
|
|
@@ -208,6 +210,7 @@ module.exports.generateSearchModuleFromOptions = binding.generateSearchModuleFro
|
|
|
208
210
|
module.exports.collectSearchMarkdownFiles = binding.collectSearchMarkdownFiles;
|
|
209
211
|
module.exports.normalizeVitePressFrontmatter = binding.normalizeVitePressFrontmatter;
|
|
210
212
|
module.exports.generateSsgHtml = binding.generateSsgHtml;
|
|
213
|
+
module.exports.renderHead = binding.renderHead;
|
|
211
214
|
module.exports.generateSsgBareHtml = binding.generateSsgBareHtml;
|
|
212
215
|
module.exports.highlightCodeBlock = binding.highlightCodeBlock;
|
|
213
216
|
module.exports.applyPendingHighlights = binding.applyPendingHighlights;
|
|
@@ -217,6 +220,7 @@ module.exports.supportsHighlightLanguage = binding.supportsHighlightLanguage;
|
|
|
217
220
|
module.exports.nativeHighlightLanguages = binding.nativeHighlightLanguages;
|
|
218
221
|
module.exports.generateSsgBarePage = binding.generateSsgBarePage;
|
|
219
222
|
module.exports.getGitLastUpdated = binding.getGitLastUpdated;
|
|
223
|
+
module.exports.getGitContributors = binding.getGitContributors;
|
|
220
224
|
module.exports.resolveSsgRoutePaths = binding.resolveSsgRoutePaths;
|
|
221
225
|
module.exports.getSsgOutputPath = binding.getSsgOutputPath;
|
|
222
226
|
module.exports.getSsgUrlPath = binding.getSsgUrlPath;
|
|
@@ -238,4 +242,5 @@ module.exports.checkI18n = binding.checkI18n;
|
|
|
238
242
|
module.exports.checkI18nProject = binding.checkI18nProject;
|
|
239
243
|
module.exports.extractTranslationKeys = binding.extractTranslationKeys;
|
|
240
244
|
module.exports.renderFrameworkComponentCode = binding.renderFrameworkComponentCode;
|
|
245
|
+
module.exports.renderSsgSectionIndex = binding.renderSsgSectionIndex;
|
|
241
246
|
module.exports.escapeSvelteMarkup = binding.escapeSvelteMarkup;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ox-content/napi",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha.10",
|
|
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": "
|
|
51
|
-
"@ox-content/binding-darwin-arm64": "
|
|
52
|
-
"@ox-content/binding-linux-x64-gnu": "
|
|
53
|
-
"@ox-content/binding-linux-x64-musl": "
|
|
54
|
-
"@ox-content/binding-linux-arm64-gnu": "
|
|
55
|
-
"@ox-content/binding-linux-arm64-musl": "
|
|
56
|
-
"@ox-content/binding-win32-x64-msvc": "
|
|
50
|
+
"@ox-content/binding-darwin-x64": "3.0.0-alpha.10",
|
|
51
|
+
"@ox-content/binding-darwin-arm64": "3.0.0-alpha.10",
|
|
52
|
+
"@ox-content/binding-linux-x64-gnu": "3.0.0-alpha.10",
|
|
53
|
+
"@ox-content/binding-linux-x64-musl": "3.0.0-alpha.10",
|
|
54
|
+
"@ox-content/binding-linux-arm64-gnu": "3.0.0-alpha.10",
|
|
55
|
+
"@ox-content/binding-linux-arm64-musl": "3.0.0-alpha.10",
|
|
56
|
+
"@ox-content/binding-win32-x64-msvc": "3.0.0-alpha.10"
|
|
57
57
|
}
|
|
58
58
|
}
|