@ox-content/napi 2.27.0 → 2.29.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 (2) hide show
  1. package/index.d.ts +34 -0
  2. package/package.json +6 -6
package/index.d.ts CHANGED
@@ -283,6 +283,7 @@ export interface JsDocsMarkdownOptions {
283
283
  linkStyle?: 'markdown' | 'clean'
284
284
  basePath?: string
285
285
  pathStrategy?: 'flat' | 'typedoc'
286
+ renderStyle?: 'html' | 'markdown'
286
287
  }
287
288
 
288
289
  /** Ordered JSDoc tag used by generated API Markdown. */
@@ -575,6 +576,29 @@ export interface JsParserOptions {
575
576
  autolinks?: boolean
576
577
  }
577
578
 
579
+ /** Options for [`transform_pm_embeds`]. */
580
+ export interface JsPmOptions {
581
+ /**
582
+ * Enable opt-in synced package-manager tab groups. When `true`, a
583
+ * `data-ox-tab-group="pkg-manager"` attribute is emitted so the client
584
+ * runtime keeps every pm tab group on the page in sync via `localStorage`.
585
+ * Off by default; when omitted/`false` the output has no group attribute
586
+ * and behaves exactly like a standalone tab group.
587
+ */
588
+ sync?: boolean
589
+ }
590
+
591
+ /** Result of [`transform_pm_embeds`]. */
592
+ export interface JsPmTransformResult {
593
+ /** HTML with every `<pm>` block expanded into a package-manager tab widget. */
594
+ html: string
595
+ /**
596
+ * Number of tab groups expanded; the caller advances its shared tab-group
597
+ * counter by this amount.
598
+ */
599
+ groupCount: number
600
+ }
601
+
578
602
  /** Public export metadata. */
579
603
  export interface JsPublicExport {
580
604
  name: string
@@ -1211,6 +1235,16 @@ export declare function transformMdastRaw(source: string, options?: JsTransformO
1211
1235
  */
1212
1236
  export declare function transformMermaid(html: string, mmdcPath: string): MermaidTransformResult
1213
1237
 
1238
+ /**
1239
+ * Expand `<pm>` blocks in rendered HTML into npm/pnpm/yarn/bun install tabs.
1240
+ *
1241
+ * The single npm-style command inside each `<pm>` element is converted to the
1242
+ * equivalent command for every package manager and rendered into the shared
1243
+ * `ox-tabs` widget. Groups are numbered from `start_group`. Syncing is opt-in
1244
+ * via `options.sync` and off by default.
1245
+ */
1246
+ export declare function transformPmEmbeds(html: string, startGroup: number, options?: JsPmOptions | undefined | null): JsPmTransformResult
1247
+
1214
1248
  /** Transform result containing HTML, frontmatter, and TOC. */
1215
1249
  export interface TransformResult {
1216
1250
  /** The rendered HTML. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ox-content/napi",
3
- "version": "2.27.0",
3
+ "version": "2.29.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.27.0",
49
- "@ox-content/binding-darwin-arm64": "2.27.0",
50
- "@ox-content/binding-linux-x64-gnu": "2.27.0",
51
- "@ox-content/binding-linux-arm64-gnu": "2.27.0",
52
- "@ox-content/binding-win32-x64-msvc": "2.27.0"
48
+ "@ox-content/binding-darwin-x64": "2.29.0",
49
+ "@ox-content/binding-darwin-arm64": "2.29.0",
50
+ "@ox-content/binding-linux-x64-gnu": "2.29.0",
51
+ "@ox-content/binding-linux-arm64-gnu": "2.29.0",
52
+ "@ox-content/binding-win32-x64-msvc": "2.29.0"
53
53
  }
54
54
  }