@ox-content/napi 3.0.0-beta.1 → 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 +61 -1
- package/index.js +3 -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
|
|
|
@@ -1418,6 +1424,37 @@ export interface JsKeyboardKeysOptions {
|
|
|
1418
1424
|
style?: string
|
|
1419
1425
|
}
|
|
1420
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
|
+
|
|
1421
1458
|
/** Locale information for the locale switcher. */
|
|
1422
1459
|
export interface JsLocaleInfo {
|
|
1423
1460
|
/** BCP 47 locale tag. */
|
|
@@ -1553,6 +1590,27 @@ export interface JsMdastTransformResult {
|
|
|
1553
1590
|
errors: Array<string>
|
|
1554
1591
|
}
|
|
1555
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
|
+
|
|
1556
1614
|
/** Built-in media embed transform switches. */
|
|
1557
1615
|
export interface JsMediaEmbedsOptions {
|
|
1558
1616
|
/**
|
|
@@ -3256,6 +3314,8 @@ export declare function resolveSsgPageRoutes(pages: Array<JsSsgRoutePageInput>,
|
|
|
3256
3314
|
/** Resolves all output and public route paths for an SSG page. */
|
|
3257
3315
|
export declare function resolveSsgRoutePaths(inputPath: string, srcDir: string, outDir: string, base: string, extension: string, siteUrl?: string | undefined | null): JsSsgRoutePaths
|
|
3258
3316
|
|
|
3317
|
+
export declare function runLspStdio(): void
|
|
3318
|
+
|
|
3259
3319
|
/** Sanitize an HTML string with safe defaults or an explicit allow-list. */
|
|
3260
3320
|
export declare function sanitizeHtml(html: string, options?: JsSanitizeOptions | undefined | null): string
|
|
3261
3321
|
|
|
@@ -3332,7 +3392,7 @@ export declare function transformMediaEmbedsWithDiagnostics(html: string, option
|
|
|
3332
3392
|
export declare function transformMermaid(html: string, mmdcPath: string): MermaidTransformResult
|
|
3333
3393
|
|
|
3334
3394
|
/**
|
|
3335
|
-
* Expand `<pm>` blocks in rendered HTML into
|
|
3395
|
+
* Expand `<pm>` blocks in rendered HTML into vp/pnpm/bun/npm/yarn install tabs.
|
|
3336
3396
|
*
|
|
3337
3397
|
* The single npm-style command inside each `<pm>` element is converted to the
|
|
3338
3398
|
* equivalent command for every package manager and rendered into the shared
|
package/index.js
CHANGED
|
@@ -249,6 +249,9 @@ module.exports.generateI18nModule = binding.generateI18nModule;
|
|
|
249
249
|
module.exports.validateMf2 = binding.validateMf2;
|
|
250
250
|
module.exports.checkI18n = binding.checkI18n;
|
|
251
251
|
module.exports.checkI18nProject = binding.checkI18nProject;
|
|
252
|
+
module.exports.checkLinks = binding.checkLinks;
|
|
253
|
+
module.exports.runLspStdio = binding.runLspStdio;
|
|
254
|
+
module.exports.checkMdc = binding.checkMdc;
|
|
252
255
|
module.exports.extractTranslationKeys = binding.extractTranslationKeys;
|
|
253
256
|
module.exports.renderFrameworkComponentCode = binding.renderFrameworkComponentCode;
|
|
254
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
|
}
|