@ox-content/napi 3.0.0-beta.0 → 3.0.0-beta.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 +64 -1
- package/index.js +4 -0
- package/package.json +8 -8
package/index.d.ts
CHANGED
|
@@ -99,6 +99,12 @@ export declare function checkI18n(dictDir: string, usedKeys: Array<string>): I18
|
|
|
99
99
|
*/
|
|
100
100
|
export declare function checkI18nProject(dictDir: string, srcDirs: Array<string>, functionNames: Array<string>, defaultLocale: string): I18NCheckResult
|
|
101
101
|
|
|
102
|
+
/** Checks Markdown/MDC local links from Node.js. */
|
|
103
|
+
export declare function checkLinks(files: Array<string>, options?: JsLinkCheckOptions | undefined | null): JsLinkCheckResult
|
|
104
|
+
|
|
105
|
+
/** Checks MDC component syntax from Node.js. */
|
|
106
|
+
export declare function checkMdc(files: Array<string>): JsMdcCheckResult
|
|
107
|
+
|
|
102
108
|
/** Classifies already-parsed frontmatter JSON against publish-state options. */
|
|
103
109
|
export declare function classifyPublishState(frontmatterJson: string, options?: JsPublishStateOptions | undefined | null): JsPublishDecision
|
|
104
110
|
|
|
@@ -216,6 +222,9 @@ export declare function generateSsgBarePage(page: JsSsgBarePage): string
|
|
|
216
222
|
/** Generates SSG HTML page with navigation and search. */
|
|
217
223
|
export declare function generateSsgHtml(pageData: JsSsgPageData, navGroups: Array<JsSsgNavGroup>, config: JsSsgConfig): JsSsgHtmlResult
|
|
218
224
|
|
|
225
|
+
/** Generates multiple themed SSG HTML pages while sharing navigation/config conversion. */
|
|
226
|
+
export declare function generateSsgHtmlPages(pageDatas: Array<JsSsgPageData>, navGroups: Array<JsSsgNavGroup>, config: JsSsgConfig): Array<JsSsgHtmlResult>
|
|
227
|
+
|
|
219
228
|
/** Returns unique git authors for a file. Empty when git is missing or fails. */
|
|
220
229
|
export declare function getGitContributors(filePath: string, root?: string | undefined | null): Array<JsGitContributor>
|
|
221
230
|
|
|
@@ -1415,6 +1424,37 @@ export interface JsKeyboardKeysOptions {
|
|
|
1415
1424
|
style?: string
|
|
1416
1425
|
}
|
|
1417
1426
|
|
|
1427
|
+
export interface JsLinkCheckOptions {
|
|
1428
|
+
srcDir?: string
|
|
1429
|
+
publicDir?: string
|
|
1430
|
+
siteDir?: string
|
|
1431
|
+
base?: string
|
|
1432
|
+
ignore?: Array<string>
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
export interface JsLinkCheckResult {
|
|
1436
|
+
reports: Array<JsLinkFileReport>
|
|
1437
|
+
errorCount: number
|
|
1438
|
+
warningCount: number
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
export interface JsLinkDiagnostic {
|
|
1442
|
+
severity: string
|
|
1443
|
+
code: string
|
|
1444
|
+
message: string
|
|
1445
|
+
line: number
|
|
1446
|
+
column: number
|
|
1447
|
+
endLine: number
|
|
1448
|
+
endColumn: number
|
|
1449
|
+
kind: string
|
|
1450
|
+
target: string
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
export interface JsLinkFileReport {
|
|
1454
|
+
file: string
|
|
1455
|
+
diagnostics: Array<JsLinkDiagnostic>
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1418
1458
|
/** Locale information for the locale switcher. */
|
|
1419
1459
|
export interface JsLocaleInfo {
|
|
1420
1460
|
/** BCP 47 locale tag. */
|
|
@@ -1550,6 +1590,27 @@ export interface JsMdastTransformResult {
|
|
|
1550
1590
|
errors: Array<string>
|
|
1551
1591
|
}
|
|
1552
1592
|
|
|
1593
|
+
export interface JsMdcCheckResult {
|
|
1594
|
+
reports: Array<JsMdcFileReport>
|
|
1595
|
+
errorCount: number
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
export interface JsMdcDiagnostic {
|
|
1599
|
+
severity: string
|
|
1600
|
+
code: string
|
|
1601
|
+
message: string
|
|
1602
|
+
line: number
|
|
1603
|
+
column: number
|
|
1604
|
+
endLine: number
|
|
1605
|
+
endColumn: number
|
|
1606
|
+
component?: string
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
export interface JsMdcFileReport {
|
|
1610
|
+
file: string
|
|
1611
|
+
diagnostics: Array<JsMdcDiagnostic>
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1553
1614
|
/** Built-in media embed transform switches. */
|
|
1554
1615
|
export interface JsMediaEmbedsOptions {
|
|
1555
1616
|
/**
|
|
@@ -3253,6 +3314,8 @@ export declare function resolveSsgPageRoutes(pages: Array<JsSsgRoutePageInput>,
|
|
|
3253
3314
|
/** Resolves all output and public route paths for an SSG page. */
|
|
3254
3315
|
export declare function resolveSsgRoutePaths(inputPath: string, srcDir: string, outDir: string, base: string, extension: string, siteUrl?: string | undefined | null): JsSsgRoutePaths
|
|
3255
3316
|
|
|
3317
|
+
export declare function runLspStdio(): void
|
|
3318
|
+
|
|
3256
3319
|
/** Sanitize an HTML string with safe defaults or an explicit allow-list. */
|
|
3257
3320
|
export declare function sanitizeHtml(html: string, options?: JsSanitizeOptions | undefined | null): string
|
|
3258
3321
|
|
|
@@ -3329,7 +3392,7 @@ export declare function transformMediaEmbedsWithDiagnostics(html: string, option
|
|
|
3329
3392
|
export declare function transformMermaid(html: string, mmdcPath: string): MermaidTransformResult
|
|
3330
3393
|
|
|
3331
3394
|
/**
|
|
3332
|
-
* Expand `<pm>` blocks in rendered HTML into
|
|
3395
|
+
* Expand `<pm>` blocks in rendered HTML into vp/pnpm/bun/npm/yarn install tabs.
|
|
3333
3396
|
*
|
|
3334
3397
|
* The single npm-style command inside each `<pm>` element is converted to the
|
|
3335
3398
|
* equivalent command for every package manager and rendered into the shared
|
package/index.js
CHANGED
|
@@ -214,6 +214,7 @@ module.exports.generateSearchModuleFromOptions = binding.generateSearchModuleFro
|
|
|
214
214
|
module.exports.collectSearchMarkdownFiles = binding.collectSearchMarkdownFiles;
|
|
215
215
|
module.exports.normalizeVitePressFrontmatter = binding.normalizeVitePressFrontmatter;
|
|
216
216
|
module.exports.generateSsgHtml = binding.generateSsgHtml;
|
|
217
|
+
module.exports.generateSsgHtmlPages = binding.generateSsgHtmlPages;
|
|
217
218
|
module.exports.renderHead = binding.renderHead;
|
|
218
219
|
module.exports.applySsgReaderChromeHtml = binding.applySsgReaderChromeHtml;
|
|
219
220
|
module.exports.getSsgReaderChromeCss = binding.getSsgReaderChromeCss;
|
|
@@ -248,6 +249,9 @@ module.exports.generateI18nModule = binding.generateI18nModule;
|
|
|
248
249
|
module.exports.validateMf2 = binding.validateMf2;
|
|
249
250
|
module.exports.checkI18n = binding.checkI18n;
|
|
250
251
|
module.exports.checkI18nProject = binding.checkI18nProject;
|
|
252
|
+
module.exports.checkLinks = binding.checkLinks;
|
|
253
|
+
module.exports.runLspStdio = binding.runLspStdio;
|
|
254
|
+
module.exports.checkMdc = binding.checkMdc;
|
|
251
255
|
module.exports.extractTranslationKeys = binding.extractTranslationKeys;
|
|
252
256
|
module.exports.renderFrameworkComponentCode = binding.renderFrameworkComponentCode;
|
|
253
257
|
module.exports.renderSsgSectionIndex = binding.renderSsgSectionIndex;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ox-content/napi",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.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": "3.0.0-beta.
|
|
51
|
-
"@ox-content/binding-darwin-arm64": "3.0.0-beta.
|
|
52
|
-
"@ox-content/binding-linux-x64-gnu": "3.0.0-beta.
|
|
53
|
-
"@ox-content/binding-linux-x64-musl": "3.0.0-beta.
|
|
54
|
-
"@ox-content/binding-linux-arm64-gnu": "3.0.0-beta.
|
|
55
|
-
"@ox-content/binding-linux-arm64-musl": "3.0.0-beta.
|
|
56
|
-
"@ox-content/binding-win32-x64-msvc": "3.0.0-beta.
|
|
50
|
+
"@ox-content/binding-darwin-x64": "3.0.0-beta.10",
|
|
51
|
+
"@ox-content/binding-darwin-arm64": "3.0.0-beta.10",
|
|
52
|
+
"@ox-content/binding-linux-x64-gnu": "3.0.0-beta.10",
|
|
53
|
+
"@ox-content/binding-linux-x64-musl": "3.0.0-beta.10",
|
|
54
|
+
"@ox-content/binding-linux-arm64-gnu": "3.0.0-beta.10",
|
|
55
|
+
"@ox-content/binding-linux-arm64-musl": "3.0.0-beta.10",
|
|
56
|
+
"@ox-content/binding-win32-x64-msvc": "3.0.0-beta.10"
|
|
57
57
|
}
|
|
58
58
|
}
|