@ox-content/napi 2.67.0 → 2.68.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 +314 -62
  2. package/package.json +6 -6
package/index.d.ts CHANGED
@@ -269,7 +269,11 @@ export interface IncrementalMarkdownRenderResult {
269
269
 
270
270
  /** Attribute syntax transform options. */
271
271
  export interface JsAttrsOptions {
272
- /** Enable markdown-it-attrs style `{#id .class key=value}`. */
272
+ /**
273
+ * Enable markdown-it-attrs style `{#id .class key=value}`.
274
+ *
275
+ * Default: `false`.
276
+ */
273
277
  enabled?: boolean
274
278
  }
275
279
 
@@ -296,21 +300,45 @@ export interface JsCodeBlockDiagnostic {
296
300
 
297
301
  /** Code block linting options. */
298
302
  export interface JsCodeBlockLintOptions {
299
- /** Enable code block linting. */
303
+ /**
304
+ * Enable code block linting.
305
+ *
306
+ * Default: `false` when the whole option is omitted.
307
+ */
300
308
  enabled?: boolean
301
- /** Restrict linting to these language identifiers. */
309
+ /**
310
+ * Restrict linting to these language identifiers.
311
+ *
312
+ * Default: all fenced block languages.
313
+ */
302
314
  languages?: Array<string>
303
- /** Report fences without a language identifier. */
315
+ /**
316
+ * Report fences without a language identifier.
317
+ *
318
+ * Default: `false`.
319
+ */
304
320
  requireLanguage?: boolean
305
- /** Report trailing whitespace in code block lines. */
321
+ /**
322
+ * Report trailing whitespace in code block lines.
323
+ *
324
+ * Default: `true`.
325
+ */
306
326
  trailingSpaces?: boolean
307
327
  }
308
328
 
309
329
  /** Code import / snippet injection options. */
310
330
  export interface JsCodeImportOptions {
311
- /** Enable `<<< path{selector}` snippet injection. */
331
+ /**
332
+ * Enable `<<< path{selector}` snippet injection.
333
+ *
334
+ * Default: `false`.
335
+ */
312
336
  enabled?: boolean
313
- /** Root directory used for `@/` and absolute snippet imports. */
337
+ /**
338
+ * Root directory used for `@/` and absolute snippet imports.
339
+ *
340
+ * Default: project root from the JavaScript caller.
341
+ */
314
342
  rootDir?: string
315
343
  }
316
344
 
@@ -540,33 +568,69 @@ export interface JsDocsOutputOptions {
540
568
 
541
569
  /** Docs-as-tests extraction options. */
542
570
  export interface JsDocsTestOptions {
543
- /** Enable docs test extraction. */
571
+ /**
572
+ * Enable docs test extraction.
573
+ *
574
+ * Default: `false` when the whole option is omitted.
575
+ */
544
576
  enabled?: boolean
545
- /** Languages that can be emitted as test cases. */
577
+ /**
578
+ * Languages that can be emitted as test cases.
579
+ *
580
+ * Default: `["js", "jsx", "ts", "tsx", "mjs", "mts"]`.
581
+ */
546
582
  languages?: Array<string>
547
- /** Require fence meta such as `test`, `runnable`, or `vitest`. */
583
+ /**
584
+ * Require fence meta such as `test`, `runnable`, or `vitest`.
585
+ *
586
+ * Default: `true`.
587
+ */
548
588
  requireMeta?: boolean
549
589
  }
550
590
 
551
591
  /** Edit-this-page link options. */
552
592
  export interface JsEditThisPageOptions {
553
- /** Enable edit link generation. */
593
+ /**
594
+ * Enable edit link generation.
595
+ *
596
+ * Default: `false` unless `repo_url` is provided by the JavaScript resolver.
597
+ */
554
598
  enabled?: boolean
555
599
  /** GitHub repository URL, e.g. `https://github.com/owner/repo`. */
556
600
  repoUrl?: string
557
- /** Branch used in edit URLs. */
601
+ /**
602
+ * Branch used in edit URLs.
603
+ *
604
+ * Default: `"main"`.
605
+ */
558
606
  branch?: string
559
- /** Root directory used to relativize `sourcePath`. */
607
+ /**
608
+ * Root directory used to relativize `sourcePath`.
609
+ *
610
+ * Default: no extra root prefix.
611
+ */
560
612
  rootDir?: string
561
- /** Link label. */
613
+ /**
614
+ * Link label.
615
+ *
616
+ * Default: `"Edit this page"`.
617
+ */
562
618
  label?: string
563
619
  }
564
620
 
565
621
  /** Emoji-shortcode transform options. */
566
622
  export interface JsEmojiShortcodeOptions {
567
- /** Enable `:shortcode:` expansion. */
623
+ /**
624
+ * Enable `:shortcode:` expansion.
625
+ *
626
+ * Default: `false`.
627
+ */
568
628
  enabled?: boolean
569
- /** Custom shortcode map. Values are emitted verbatim. */
629
+ /**
630
+ * Custom shortcode map. Values are emitted verbatim.
631
+ *
632
+ * Default: `{}`.
633
+ */
570
634
  custom?: Record<string, string>
571
635
  }
572
636
 
@@ -821,15 +885,35 @@ export interface JsMarkdownLintRuleOptions {
821
885
 
822
886
  /** Built-in media embed transform switches. */
823
887
  export interface JsMediaEmbedsOptions {
824
- /** Render `<Spotify>` embeds. */
888
+ /**
889
+ * Render `<Spotify>` embeds.
890
+ *
891
+ * Default: `false`.
892
+ */
825
893
  spotify?: boolean
826
- /** Render `<StackBlitz>` embeds. */
894
+ /**
895
+ * Render `<StackBlitz>` embeds.
896
+ *
897
+ * Default: `false`.
898
+ */
827
899
  stackBlitz?: boolean
828
- /** Render `<Tweet>` / `<XPost>` static cards. */
900
+ /**
901
+ * Render `<Tweet>` / `<XPost>` static cards.
902
+ *
903
+ * Default: `false`.
904
+ */
829
905
  twitter?: boolean
830
- /** Render `<Bluesky>` static cards. */
906
+ /**
907
+ * Render `<Bluesky>` static cards.
908
+ *
909
+ * Default: `false`.
910
+ */
831
911
  bluesky?: boolean
832
- /** Render `<WebContainer>` lazy placeholder blocks. */
912
+ /**
913
+ * Render `<WebContainer>` lazy placeholder blocks.
914
+ *
915
+ * Default: `false`.
916
+ */
833
917
  webContainer?: boolean
834
918
  }
835
919
 
@@ -861,19 +945,47 @@ export interface JsOgImageData {
861
945
  author?: string
862
946
  }
863
947
 
864
- /** Parser options for JavaScript. */
948
+ /**
949
+ * Parser options for JavaScript.
950
+ *
951
+ * When `gfm` is `true`, omitted extension flags inherit the GFM profile.
952
+ */
865
953
  export interface JsParserOptions {
866
- /** Enable GFM extensions. */
954
+ /**
955
+ * Enable the GFM convenience profile.
956
+ *
957
+ * Default: `false`.
958
+ */
867
959
  gfm?: boolean
868
- /** Enable footnotes. */
960
+ /**
961
+ * Enable footnote references and definitions.
962
+ *
963
+ * Default: `false`, or `true` when `gfm` is `true`.
964
+ */
869
965
  footnotes?: boolean
870
- /** Enable task lists. */
966
+ /**
967
+ * Enable GFM task-list item markers.
968
+ *
969
+ * Default: `false`, or `true` when `gfm` is `true`.
970
+ */
871
971
  taskLists?: boolean
872
- /** Enable tables. */
972
+ /**
973
+ * Enable GFM pipe tables.
974
+ *
975
+ * Default: `false`, or `true` when `gfm` is `true`.
976
+ */
873
977
  tables?: boolean
874
- /** Enable strikethrough. */
978
+ /**
979
+ * Enable GFM strikethrough spans.
980
+ *
981
+ * Default: `false`, or `true` when `gfm` is `true`.
982
+ */
875
983
  strikethrough?: boolean
876
- /** Enable autolinks. */
984
+ /**
985
+ * Enable GFM autolinks.
986
+ *
987
+ * Default: `false`, or `true` when `gfm` is `true`.
988
+ */
877
989
  autolinks?: boolean
878
990
  }
879
991
 
@@ -915,13 +1027,29 @@ export interface JsResolvedModule {
915
1027
 
916
1028
  /** HTML sanitizer options. */
917
1029
  export interface JsSanitizeOptions {
918
- /** Enable sanitizer. When omitted, passing this object enables it. */
1030
+ /**
1031
+ * Enable sanitizer. When omitted, passing this object enables it.
1032
+ *
1033
+ * Default: `false` when the whole option is omitted; `true` when this object is present.
1034
+ */
919
1035
  enabled?: boolean
920
- /** Allowed tag names. Omit for safe defaults. */
1036
+ /**
1037
+ * Allowed tag names. Omit for safe defaults.
1038
+ *
1039
+ * Default: built-in safe tag allow list.
1040
+ */
921
1041
  allowedTags?: Array<string>
922
- /** Allowed attribute names. Omit for safe defaults. */
1042
+ /**
1043
+ * Allowed attribute names. Omit for safe defaults.
1044
+ *
1045
+ * Default: built-in safe attribute allow list.
1046
+ */
923
1047
  allowedAttributes?: Array<string>
924
- /** Allowed URL schemes for URL-bearing attributes. Omit for safe defaults. */
1048
+ /**
1049
+ * Allowed URL schemes for URL-bearing attributes. Omit for safe defaults.
1050
+ *
1051
+ * Default: built-in safe URL scheme allow list.
1052
+ */
925
1053
  allowedUrlSchemes?: Array<string>
926
1054
  }
927
1055
 
@@ -1052,7 +1180,11 @@ export interface JsSourceDocTag {
1052
1180
 
1053
1181
  /** Source preparation options for JavaScript. */
1054
1182
  export interface JsSourceOptions {
1055
- /** Parse YAML frontmatter before returning the content payload. */
1183
+ /**
1184
+ * Parse YAML frontmatter before returning the content payload.
1185
+ *
1186
+ * Default: `false`.
1187
+ */
1056
1188
  frontmatter?: boolean
1057
1189
  }
1058
1190
 
@@ -1323,70 +1455,166 @@ export interface JsThemeLayout {
1323
1455
  maxContentWidth?: string
1324
1456
  }
1325
1457
 
1326
- /** Transform options for JavaScript. */
1458
+ /**
1459
+ * Transform options for JavaScript.
1460
+ *
1461
+ * Omitted parser flags inherit the GFM profile when `gfm` is `true`; otherwise
1462
+ * they use the parser defaults.
1463
+ */
1327
1464
  export interface JsTransformOptions {
1328
- /** Enable GFM extensions. */
1465
+ /**
1466
+ * Enable the GFM convenience profile.
1467
+ *
1468
+ * Default: `false`.
1469
+ */
1329
1470
  gfm?: boolean
1330
- /** Enable footnotes. */
1471
+ /**
1472
+ * Enable footnote references and definitions.
1473
+ *
1474
+ * Default: `false`, or `true` when `gfm` is `true`.
1475
+ */
1331
1476
  footnotes?: boolean
1332
- /** Enable task lists. */
1477
+ /**
1478
+ * Enable GFM task-list item markers.
1479
+ *
1480
+ * Default: `false`, or `true` when `gfm` is `true`.
1481
+ */
1333
1482
  taskLists?: boolean
1334
- /** Enable tables. */
1483
+ /**
1484
+ * Enable GFM pipe tables.
1485
+ *
1486
+ * Default: `false`, or `true` when `gfm` is `true`.
1487
+ */
1335
1488
  tables?: boolean
1336
- /** Enable strikethrough. */
1489
+ /**
1490
+ * Enable GFM strikethrough spans.
1491
+ *
1492
+ * Default: `false`, or `true` when `gfm` is `true`.
1493
+ */
1337
1494
  strikethrough?: boolean
1338
- /** Enable autolinks. */
1495
+ /**
1496
+ * Enable GFM autolinks.
1497
+ *
1498
+ * Default: `false`, or `true` when `gfm` is `true`.
1499
+ */
1339
1500
  autolinks?: boolean
1340
- /** Parse YAML frontmatter before transforming. */
1501
+ /**
1502
+ * Parse YAML frontmatter before transforming.
1503
+ *
1504
+ * Default: `false`.
1505
+ */
1341
1506
  frontmatter?: boolean
1342
- /** Maximum TOC depth (1-6). */
1507
+ /**
1508
+ * Maximum TOC depth (1-6).
1509
+ *
1510
+ * Default: `3`.
1511
+ */
1343
1512
  tocMaxDepth?: number
1344
- /** Convert `.md` links to `.html` links for SSG output. */
1513
+ /**
1514
+ * Convert `.md` links to `.html` links for SSG output.
1515
+ *
1516
+ * Default: `false`.
1517
+ */
1345
1518
  convertMdLinks?: boolean
1346
- /** Base URL for absolute link conversion (e.g., "/" or "/docs/"). */
1519
+ /**
1520
+ * Base URL for absolute link conversion (e.g., "/" or "/docs/").
1521
+ *
1522
+ * Default: `"/"`.
1523
+ */
1347
1524
  baseUrl?: string
1348
- /** Source file path for relative link resolution. */
1525
+ /**
1526
+ * Source file path for relative link resolution.
1527
+ *
1528
+ * Default: empty string.
1529
+ */
1349
1530
  sourcePath?: string
1350
- /** Enable line annotations for code blocks using fence meta. */
1531
+ /**
1532
+ * Enable line annotations for code blocks using fence meta.
1533
+ *
1534
+ * Default: `false`.
1535
+ */
1351
1536
  codeAnnotations?: boolean
1352
- /** Fence meta key used to read code annotations. */
1537
+ /**
1538
+ * Fence meta key used to read code annotations.
1539
+ *
1540
+ * Default: `"annotate"`.
1541
+ */
1353
1542
  codeAnnotationMetaKey?: string
1354
- /** Code annotation syntax mode. */
1543
+ /**
1544
+ * Code annotation syntax mode.
1545
+ *
1546
+ * Default: `"attribute"`.
1547
+ */
1355
1548
  codeAnnotationSyntax?: string
1356
- /** Enable line numbers for all code blocks by default. */
1549
+ /**
1550
+ * Enable line numbers for all code blocks by default.
1551
+ *
1552
+ * Default: `false`.
1553
+ */
1357
1554
  codeAnnotationDefaultLineNumbers?: boolean
1358
1555
  /**
1359
1556
  * Auto-link bare URLs in text. When enabled, the renderer wraps any
1360
1557
  * text occurrence starting with a registered pattern (default `http://`
1361
1558
  * and `https://`) in an `<a>` tag.
1559
+ *
1560
+ * Default: `false`.
1362
1561
  */
1363
1562
  autolinkUrls?: boolean
1364
1563
  /**
1365
1564
  * URL prefix patterns for [`Self::autolink_urls`]. Overrides the
1366
1565
  * default `["http://", "https://"]` when set.
1566
+ *
1567
+ * Default: `["http://", "https://"]`.
1367
1568
  */
1368
1569
  autolinkPatterns?: Array<string>
1369
1570
  /**
1370
1571
  * Add `target="_blank" rel="noopener noreferrer"` to auto-linked URLs.
1371
- * Defaults to true; ignored when [`Self::autolink_urls`] is off.
1572
+ *
1573
+ * Default: `true`; ignored when [`Self::autolink_urls`] is off.
1372
1574
  */
1373
1575
  autolinkTargetBlank?: boolean
1374
- /** Opt-in Obsidian-style wiki links. */
1576
+ /**
1577
+ * Opt-in Obsidian-style wiki links.
1578
+ *
1579
+ * Default: disabled.
1580
+ */
1375
1581
  wikiLinks?: JsWikiLinkOptions
1376
- /** Opt-in emoji shortcode expansion. */
1582
+ /**
1583
+ * Opt-in emoji shortcode expansion.
1584
+ *
1585
+ * Default: disabled.
1586
+ */
1377
1587
  emojiShortcodes?: JsEmojiShortcodeOptions
1378
- /** Opt-in markdown-it-attrs style attributes. */
1588
+ /**
1589
+ * Opt-in markdown-it-attrs style attributes.
1590
+ *
1591
+ * Default: disabled.
1592
+ */
1379
1593
  attributes?: JsAttrsOptions
1380
1594
  /**
1381
1595
  * Opt-in CJK emphasis compatibility flag. The parser is already CJK-friendly;
1382
1596
  * this keeps the feature explicit in the public API.
1597
+ *
1598
+ * Default: `false`.
1383
1599
  */
1384
1600
  cjkEmphasis?: boolean
1385
- /** Opt-in VitePress-style code import/snippet injection. */
1601
+ /**
1602
+ * Opt-in VitePress-style code import/snippet injection.
1603
+ *
1604
+ * Default: disabled.
1605
+ */
1386
1606
  codeImports?: JsCodeImportOptions
1387
- /** Opt-in HTML sanitizer. */
1607
+ /**
1608
+ * Opt-in HTML sanitizer.
1609
+ *
1610
+ * Default: disabled.
1611
+ */
1388
1612
  sanitize?: JsSanitizeOptions
1389
- /** Opt-in edit-this-page link generation. */
1613
+ /**
1614
+ * Opt-in edit-this-page link generation.
1615
+ *
1616
+ * Default: disabled.
1617
+ */
1390
1618
  editThisPage?: JsEditThisPageOptions
1391
1619
  }
1392
1620
 
@@ -1400,9 +1628,17 @@ export interface JsTypeParam {
1400
1628
 
1401
1629
  /** Wiki-link transform options. */
1402
1630
  export interface JsWikiLinkOptions {
1403
- /** Enable `[[target]]` and `[[target|label]]` expansion. */
1631
+ /**
1632
+ * Enable `[[target]]` and `[[target|label]]` expansion.
1633
+ *
1634
+ * Default: `false`.
1635
+ */
1404
1636
  enabled?: boolean
1405
- /** Base URL used for site-relative wiki links. */
1637
+ /**
1638
+ * Base URL used for site-relative wiki links.
1639
+ *
1640
+ * Default: `"/"`.
1641
+ */
1406
1642
  baseUrl?: string
1407
1643
  }
1408
1644
 
@@ -1411,13 +1647,29 @@ export interface JsWikiLinkOptions {
1411
1647
  * `YouTubeOptions` defaults when omitted.
1412
1648
  */
1413
1649
  export interface JsYouTubeOptions {
1414
- /** Use privacy-enhanced mode (youtube-nocookie.com). Default: true. */
1650
+ /**
1651
+ * Use privacy-enhanced mode (`youtube-nocookie.com`).
1652
+ *
1653
+ * Default: `true`.
1654
+ */
1415
1655
  privacyEnhanced?: boolean
1416
- /** Default aspect ratio. Default: "16/9". */
1656
+ /**
1657
+ * Default iframe aspect ratio.
1658
+ *
1659
+ * Default: `"16/9"`.
1660
+ */
1417
1661
  aspectRatio?: string
1418
- /** Allow fullscreen. Default: true. */
1662
+ /**
1663
+ * Allow fullscreen playback.
1664
+ *
1665
+ * Default: `true`.
1666
+ */
1419
1667
  allowFullscreen?: boolean
1420
- /** Lazy-load the iframe. Default: true. */
1668
+ /**
1669
+ * Lazy-load the iframe.
1670
+ *
1671
+ * Default: `true`.
1672
+ */
1421
1673
  lazyLoad?: boolean
1422
1674
  }
1423
1675
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ox-content/napi",
3
- "version": "2.67.0",
3
+ "version": "2.68.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.67.0",
49
- "@ox-content/binding-darwin-arm64": "2.67.0",
50
- "@ox-content/binding-linux-x64-gnu": "2.67.0",
51
- "@ox-content/binding-linux-arm64-gnu": "2.67.0",
52
- "@ox-content/binding-win32-x64-msvc": "2.67.0"
48
+ "@ox-content/binding-darwin-x64": "2.68.0",
49
+ "@ox-content/binding-darwin-arm64": "2.68.0",
50
+ "@ox-content/binding-linux-x64-gnu": "2.68.0",
51
+ "@ox-content/binding-linux-arm64-gnu": "2.68.0",
52
+ "@ox-content/binding-win32-x64-msvc": "2.68.0"
53
53
  }
54
54
  }