@ox-content/napi 2.12.0 → 2.14.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.
Files changed (3) hide show
  1. package/index.d.ts +72 -2
  2. package/index.js +2 -0
  3. package/package.json +6 -6
package/index.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  /* auto-generated by NAPI-RS */
2
2
  /* eslint-disable */
3
+ /** Builds the public API export graph from entry points. */
4
+ export declare function buildExportGraph(entryPoints: Array<JsEntryPointSpec>, options?: JsGraphOptions | undefined | null): JsExportGraph
5
+
3
6
  /**
4
7
  * Builds a search index from documents.
5
8
  *
@@ -51,11 +54,14 @@ export declare function collectSsgMarkdownFiles(srcDir: string, extensions: Arra
51
54
  /** Extracts shared CSS and JavaScript assets from generated SSG pages. */
52
55
  export declare function externalizeSsgAssets(pages: Array<JsSsgGeneratedHtmlPage>, outDir: string, base: string): JsSsgExternalizedAssets
53
56
 
57
+ /** Extracts generated API docs grouped by public entry points. */
58
+ export declare function extractDocsFromEntryPoints(entryPoints: Array<JsEntryPointSpec>, options?: JsEntryPointDocsOptions | undefined | null): Array<JsEntrypointDocsModule>
59
+
54
60
  /** Extracts normalized documentation entries from a JavaScript/TypeScript file using Oxc. */
55
- export declare function extractFileDocEntries(filePath: string, includePrivate?: boolean | undefined | null): Array<JsDocEntry>
61
+ export declare function extractFileDocEntries(filePath: string, includePrivate?: boolean | undefined | null, includeInternal?: boolean | undefined | null): Array<JsDocEntry>
56
62
 
57
63
  /** Extracts documented declarations from a JavaScript/TypeScript file using Oxc. */
58
- export declare function extractFileDocs(filePath: string, includePrivate?: boolean | undefined | null): Array<JsSourceDocItem>
64
+ export declare function extractFileDocs(filePath: string, includePrivate?: boolean | undefined | null, includeInternal?: boolean | undefined | null): Array<JsSourceDocItem>
59
65
 
60
66
  /**
61
67
  * Extracts searchable content from Markdown source.
@@ -256,6 +262,51 @@ export interface JsEntryPageConfig {
256
262
  features?: Array<JsFeatureConfig>
257
263
  }
258
264
 
265
+ /** Docs grouped by a public entry point. */
266
+ export interface JsEntrypointDocsModule {
267
+ name: string
268
+ file: string
269
+ sourcePath: string
270
+ entries: Array<JsDocEntry>
271
+ exports: Array<JsPublicExport>
272
+ }
273
+
274
+ /** Options for extracting docs grouped by entry point. */
275
+ export interface JsEntryPointDocsOptions {
276
+ root?: string
277
+ tsconfig?: string
278
+ private?: boolean
279
+ internal?: boolean
280
+ }
281
+
282
+ /** Public entry point module. */
283
+ export interface JsEntrypointModule {
284
+ name: string
285
+ sourcePath: string
286
+ exports: Array<JsPublicExport>
287
+ }
288
+
289
+ /** Entry point used to group generated API docs. */
290
+ export interface JsEntryPointSpec {
291
+ path: string
292
+ name?: string
293
+ }
294
+
295
+ /** Resolved export graph. */
296
+ export interface JsExportGraph {
297
+ entrypoints: Array<JsEntrypointModule>
298
+ modules: Array<JsResolvedModule>
299
+ }
300
+
301
+ /** Export source metadata. */
302
+ export interface JsExportSource {
303
+ kind: string
304
+ module?: string
305
+ package?: string
306
+ originalName: string
307
+ typeOnly: boolean
308
+ }
309
+
259
310
  /** Feature card for entry page. */
260
311
  export interface JsFeatureConfig {
261
312
  /** Icon - supports: "mdi:icon-name" (Iconify), image URL, or emoji. */
@@ -270,6 +321,12 @@ export interface JsFeatureConfig {
270
321
  linkText?: string
271
322
  }
272
323
 
324
+ /** Export graph resolution options. */
325
+ export interface JsGraphOptions {
326
+ root?: string
327
+ tsconfig?: string
328
+ }
329
+
273
330
  /** Hero action for entry page. */
274
331
  export interface JsHeroAction {
275
332
  /** Button theme: "brand" or "alt". */
@@ -441,6 +498,19 @@ export interface JsParserOptions {
441
498
  autolinks?: boolean
442
499
  }
443
500
 
501
+ /** Public export metadata. */
502
+ export interface JsPublicExport {
503
+ name: string
504
+ kind: string
505
+ source: JsExportSource
506
+ }
507
+
508
+ /** Resolved source module. */
509
+ export interface JsResolvedModule {
510
+ path: string
511
+ exports: Array<JsPublicExport>
512
+ }
513
+
444
514
  /** Search query split into free text and scope prefixes. */
445
515
  export interface JsScopedSearchQuery {
446
516
  /** Free-text terms after removing scope prefixes. */
package/index.js CHANGED
@@ -85,6 +85,8 @@ module.exports.transformMdastRaw = binding.transformMdastRaw;
85
85
  module.exports.version = binding.version;
86
86
  module.exports.extractFileDocs = binding.extractFileDocs;
87
87
  module.exports.extractFileDocEntries = binding.extractFileDocEntries;
88
+ module.exports.buildExportGraph = binding.buildExportGraph;
89
+ module.exports.extractDocsFromEntryPoints = binding.extractDocsFromEntryPoints;
88
90
  module.exports.generateDocsNavMetadata = binding.generateDocsNavMetadata;
89
91
  module.exports.generateDocsNavCode = binding.generateDocsNavCode;
90
92
  module.exports.collectDocsSourceFiles = binding.collectDocsSourceFiles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ox-content/napi",
3
- "version": "2.12.0",
3
+ "version": "2.14.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.12.0",
49
- "@ox-content/binding-darwin-arm64": "2.12.0",
50
- "@ox-content/binding-linux-x64-gnu": "2.12.0",
51
- "@ox-content/binding-linux-arm64-gnu": "2.12.0",
52
- "@ox-content/binding-win32-x64-msvc": "2.12.0"
48
+ "@ox-content/binding-darwin-x64": "2.14.0",
49
+ "@ox-content/binding-darwin-arm64": "2.14.0",
50
+ "@ox-content/binding-linux-x64-gnu": "2.14.0",
51
+ "@ox-content/binding-linux-arm64-gnu": "2.14.0",
52
+ "@ox-content/binding-win32-x64-msvc": "2.14.0"
53
53
  }
54
54
  }