@ox-content/napi 2.73.0 → 2.75.0
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 +31 -0
- package/index.js +1 -0
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -34,6 +34,15 @@ export declare class IncrementalMarkdownRenderer {
|
|
|
34
34
|
get pendingMarkdown(): string
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Builds a Markdown collection manifest directly from files on the Rust side.
|
|
39
|
+
*
|
|
40
|
+
* File discovery, pattern filtering, frontmatter preparation, route metadata,
|
|
41
|
+
* and optional raw Rust Markdown transforms happen in one native call to avoid
|
|
42
|
+
* per-file JS/NAPI round trips on large content directories.
|
|
43
|
+
*/
|
|
44
|
+
export declare function buildCollectionManifest(options: JsBuildCollectionManifestOptions): string
|
|
45
|
+
|
|
37
46
|
/** Builds the public API export graph from entry points. */
|
|
38
47
|
export declare function buildExportGraph(entryPoints: Array<JsEntryPointSpec>, options?: JsGraphOptions | undefined | null): JsExportGraph
|
|
39
48
|
|
|
@@ -280,6 +289,19 @@ export interface JsAttrsOptions {
|
|
|
280
289
|
enabled?: boolean
|
|
281
290
|
}
|
|
282
291
|
|
|
292
|
+
export interface JsBuildCollectionManifestOptions {
|
|
293
|
+
/** Source directory containing Markdown files. */
|
|
294
|
+
srcDir: string
|
|
295
|
+
/** Markdown extensions to collect. */
|
|
296
|
+
extensions: Array<string>
|
|
297
|
+
/** Parse YAML frontmatter before building entries. */
|
|
298
|
+
frontmatter?: boolean
|
|
299
|
+
/** Collection definitions. */
|
|
300
|
+
collections: Array<JsCollectionDefinition>
|
|
301
|
+
/** Rust Markdown transform options used only when a collection includes `html` or `toc`. */
|
|
302
|
+
transformOptions?: JsTransformOptions
|
|
303
|
+
}
|
|
304
|
+
|
|
283
305
|
/** Extracted fenced code block. */
|
|
284
306
|
export interface JsCodeBlock {
|
|
285
307
|
language: string
|
|
@@ -345,6 +367,15 @@ export interface JsCodeImportOptions {
|
|
|
345
367
|
rootDir?: string
|
|
346
368
|
}
|
|
347
369
|
|
|
370
|
+
export interface JsCollectionDefinition {
|
|
371
|
+
/** Collection name. */
|
|
372
|
+
name: string
|
|
373
|
+
/** Glob-like source patterns relative to `srcDir`. */
|
|
374
|
+
source: Array<string>
|
|
375
|
+
/** Extra payload fields: `body`, `html`, and/or `toc`. */
|
|
376
|
+
include: Array<string>
|
|
377
|
+
}
|
|
378
|
+
|
|
348
379
|
/** Normalized documentation entry used by generated API docs. */
|
|
349
380
|
export interface JsDocEntry {
|
|
350
381
|
name: string
|
package/index.js
CHANGED
|
@@ -125,6 +125,7 @@ module.exports.collectDocsSourceFiles = binding.collectDocsSourceFiles;
|
|
|
125
125
|
module.exports.generateDocsDataJson = binding.generateDocsDataJson;
|
|
126
126
|
module.exports.generateDocsMarkdown = binding.generateDocsMarkdown;
|
|
127
127
|
module.exports.writeGeneratedDocs = binding.writeGeneratedDocs;
|
|
128
|
+
module.exports.buildCollectionManifest = binding.buildCollectionManifest;
|
|
128
129
|
module.exports.mergeHighlightedCodeBlocks = binding.mergeHighlightedCodeBlocks;
|
|
129
130
|
module.exports.generateOgImageSvg = binding.generateOgImageSvg;
|
|
130
131
|
module.exports.buildSearchIndex = binding.buildSearchIndex;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ox-content/napi",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.75.0",
|
|
4
4
|
"description": "Node.js bindings for Ox Content - High-performance Markdown parser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
"optionalDependencies": {
|
|
48
|
-
"@ox-content/binding-darwin-x64": "2.
|
|
49
|
-
"@ox-content/binding-darwin-arm64": "2.
|
|
50
|
-
"@ox-content/binding-linux-x64-gnu": "2.
|
|
51
|
-
"@ox-content/binding-linux-arm64-gnu": "2.
|
|
52
|
-
"@ox-content/binding-win32-x64-msvc": "2.
|
|
48
|
+
"@ox-content/binding-darwin-x64": "2.75.0",
|
|
49
|
+
"@ox-content/binding-darwin-arm64": "2.75.0",
|
|
50
|
+
"@ox-content/binding-linux-x64-gnu": "2.75.0",
|
|
51
|
+
"@ox-content/binding-linux-arm64-gnu": "2.75.0",
|
|
52
|
+
"@ox-content/binding-win32-x64-msvc": "2.75.0"
|
|
53
53
|
}
|
|
54
54
|
}
|