@ox-content/napi 3.0.0-alpha.5 → 3.0.0-alpha.6

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 +66 -2
  2. package/package.json +8 -8
package/index.d.ts CHANGED
@@ -1118,6 +1118,52 @@ export interface JsLocalePath {
1118
1118
  root?: string
1119
1119
  }
1120
1120
 
1121
+ /** One configured magic-link alias. */
1122
+ export interface JsMagicLinkAlias {
1123
+ /** Absolute `http:` / `https:` URL. */
1124
+ href: string
1125
+ /** Optional display label. Defaults to the alias key. */
1126
+ label?: string
1127
+ /** Optional avatar or favicon URL. */
1128
+ image?: string
1129
+ }
1130
+
1131
+ /** Replace the resolved image for matching hrefs. */
1132
+ export interface JsMagicLinkImageOverride {
1133
+ /** Exact href to replace. */
1134
+ href?: string
1135
+ /** Href prefix to replace. */
1136
+ prefix?: string
1137
+ /** Replacement image URL. Must be `http:` or `https:`. */
1138
+ image: string
1139
+ }
1140
+
1141
+ /** Opt-in `{link:...}` rich magic links. */
1142
+ export interface JsMagicLinkOptions {
1143
+ /**
1144
+ * Enable `{link:@user}`, `{link:alias}`, and `{link:label|url}`.
1145
+ *
1146
+ * Default: `false`.
1147
+ */
1148
+ enabled?: boolean
1149
+ /** Named aliases mapped to href / label / image. */
1150
+ aliases?: Record<string, JsMagicLinkAlias>
1151
+ /**
1152
+ * Emit a favicon URL for explicit links that have no image.
1153
+ *
1154
+ * Default: `false`. No transform-time network request.
1155
+ */
1156
+ favicon?: boolean
1157
+ /**
1158
+ * Favicon URL template with a `{host}` placeholder.
1159
+ *
1160
+ * Default: `https://{host}/favicon.ico` when `favicon` is true.
1161
+ */
1162
+ faviconTemplate?: string
1163
+ /** Image replacements applied after alias / GitHub / favicon resolution. */
1164
+ imageOverrides?: Array<JsMagicLinkImageOverride>
1165
+ }
1166
+
1121
1167
  export interface JsMarkdownLintDiagnostic {
1122
1168
  ruleId: string
1123
1169
  severity: string
@@ -1866,15 +1912,15 @@ export interface JsThemeConfig {
1866
1912
  aside?: boolean
1867
1913
  /** Breadcrumb trail from the site root through sidebar ancestors. */
1868
1914
  breadcrumbs?: boolean
1915
+ /** Heading permalink visibility. `"hover"` or `"always"`. CSS only. */
1916
+ headingPermalink?: string
1869
1917
  /** Light mode colors. */
1870
1918
  colors?: JsThemeColors
1871
1919
  /** Dark mode colors. */
1872
1920
  darkColors?: JsThemeColors
1873
- /** Font configuration. */
1874
1921
  fonts?: JsThemeFonts
1875
1922
  /** Entry page configuration. */
1876
1923
  entryPage?: JsThemeEntryPage
1877
- /** Layout configuration. */
1878
1924
  layout?: JsThemeLayout
1879
1925
  /** Header configuration. */
1880
1926
  header?: JsThemeHeader
@@ -1989,6 +2035,12 @@ export interface JsTransformOptions {
1989
2035
  * Default: `false`, or `true` when `gfm` is `true`.
1990
2036
  */
1991
2037
  footnotes?: boolean
2038
+ /**
2039
+ * Render footnotes as a semantic ordered section with numeric markers.
2040
+ *
2041
+ * Default: `false`.
2042
+ */
2043
+ semanticFootnotes?: boolean
1992
2044
  /**
1993
2045
  * Enable GFM task-list item markers.
1994
2046
  *
@@ -2088,6 +2140,12 @@ export interface JsTransformOptions {
2088
2140
  * Default: `true`; ignored when [`Self::autolink_urls`] is off.
2089
2141
  */
2090
2142
  autolinkTargetBlank?: boolean
2143
+ /**
2144
+ * Opt-in visible heading permalinks (`<a class="header-anchor" href="#id">`).
2145
+ *
2146
+ * Default: disabled. Existing HTML stays unchanged until this is enabled.
2147
+ */
2148
+ headingPermalinks?: boolean
2091
2149
  /**
2092
2150
  * Opt-in Obsidian-style wiki links.
2093
2151
  *
@@ -2168,6 +2226,12 @@ export interface JsTransformOptions {
2168
2226
  * Default: disabled.
2169
2227
  */
2170
2228
  badges?: JsBadgeOptions
2229
+ /**
2230
+ * Opt-in `{link:...}` rich magic links.
2231
+ *
2232
+ * Default: disabled.
2233
+ */
2234
+ magicLinks?: JsMagicLinkOptions
2171
2235
  /**
2172
2236
  * Opt-in figures, captions, and lazy images.
2173
2237
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ox-content/napi",
3
- "version": "3.0.0-alpha.5",
3
+ "version": "3.0.0-alpha.6",
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-alpha.5",
51
- "@ox-content/binding-darwin-arm64": "3.0.0-alpha.5",
52
- "@ox-content/binding-linux-x64-gnu": "3.0.0-alpha.5",
53
- "@ox-content/binding-linux-x64-musl": "3.0.0-alpha.5",
54
- "@ox-content/binding-linux-arm64-gnu": "3.0.0-alpha.5",
55
- "@ox-content/binding-linux-arm64-musl": "3.0.0-alpha.5",
56
- "@ox-content/binding-win32-x64-msvc": "3.0.0-alpha.5"
50
+ "@ox-content/binding-darwin-x64": "3.0.0-alpha.6",
51
+ "@ox-content/binding-darwin-arm64": "3.0.0-alpha.6",
52
+ "@ox-content/binding-linux-x64-gnu": "3.0.0-alpha.6",
53
+ "@ox-content/binding-linux-x64-musl": "3.0.0-alpha.6",
54
+ "@ox-content/binding-linux-arm64-gnu": "3.0.0-alpha.6",
55
+ "@ox-content/binding-linux-arm64-musl": "3.0.0-alpha.6",
56
+ "@ox-content/binding-win32-x64-msvc": "3.0.0-alpha.6"
57
57
  }
58
58
  }