@ox-content/napi 3.0.0-beta.8 → 3.0.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 +71 -0
  2. package/index.js +1 -0
  3. package/package.json +8 -8
package/index.d.ts CHANGED
@@ -231,6 +231,9 @@ export declare function getGitContributors(filePath: string, root?: string | und
231
231
  /** Returns the last git commit timestamp for a file in milliseconds. */
232
232
  export declare function getGitLastUpdated(filePath: string, root?: string | undefined | null): number | null
233
233
 
234
+ /** Returns last git commit timestamps for files or directories in one lookup. */
235
+ export declare function getGitLastUpdatedMany(filePaths: Array<string>, root?: string | undefined | null): Array<JsGitLastmodResult>
236
+
234
237
  /** Derives hierarchical search scopes from a document id or URL. */
235
238
  export declare function getSearchDocumentScopes(id: string, url: string): Array<string>
236
239
 
@@ -1190,6 +1193,14 @@ export interface JsGitContributor {
1190
1193
  commits?: number
1191
1194
  }
1192
1195
 
1196
+ /** One successful git lastmod lookup from `getGitLastUpdatedMany`. */
1197
+ export interface JsGitLastmodResult {
1198
+ /** Input path supplied by the caller. */
1199
+ path: string
1200
+ /** Latest git commit timestamp in milliseconds. */
1201
+ lastUpdated: number
1202
+ }
1203
+
1193
1204
  /** Export graph resolution options. */
1194
1205
  export interface JsGraphOptions {
1195
1206
  root?: string
@@ -1934,6 +1945,36 @@ export interface JsParserOptions {
1934
1945
  * Default: `false`, or `true` when `gfm` is `true`.
1935
1946
  */
1936
1947
  autolinks?: boolean
1948
+ /**
1949
+ * Enable `^text^` superscript spans.
1950
+ *
1951
+ * Default: `false`.
1952
+ */
1953
+ superscript?: boolean
1954
+ /**
1955
+ * Enable `~text~` subscript spans.
1956
+ *
1957
+ * Default: `false`.
1958
+ */
1959
+ subscript?: boolean
1960
+ /**
1961
+ * Enable smart punctuation replacement.
1962
+ *
1963
+ * Default: `false`.
1964
+ */
1965
+ smartPunctuation?: boolean
1966
+ /**
1967
+ * Enable `$...$` inline math and `$$...$$` block math.
1968
+ *
1969
+ * Default: `false`.
1970
+ */
1971
+ math?: boolean
1972
+ /**
1973
+ * Enable definition list blocks.
1974
+ *
1975
+ * Default: `false`.
1976
+ */
1977
+ definitionLists?: boolean
1937
1978
  }
1938
1979
 
1939
1980
  /** Opt-in parameterized Markdown partials. */
@@ -2814,6 +2855,24 @@ export interface JsTransformOptions {
2814
2855
  * Default: `false`, or `true` when `gfm` is `true`.
2815
2856
  */
2816
2857
  autolinks?: boolean
2858
+ /**
2859
+ * Enable `^text^` superscript spans.
2860
+ *
2861
+ * Default: `false`.
2862
+ */
2863
+ superscript?: boolean
2864
+ /**
2865
+ * Enable `~text~` subscript spans.
2866
+ *
2867
+ * Default: `false`.
2868
+ */
2869
+ subscript?: boolean
2870
+ /**
2871
+ * Enable smart punctuation replacement.
2872
+ *
2873
+ * Default: `false`.
2874
+ */
2875
+ smartPunctuation?: boolean
2817
2876
  /**
2818
2877
  * Parse YAML frontmatter before transforming.
2819
2878
  *
@@ -2889,6 +2948,18 @@ export interface JsTransformOptions {
2889
2948
  * Default: `true`; ignored when [`Self::autolink_urls`] is off.
2890
2949
  */
2891
2950
  autolinkTargetBlank?: boolean
2951
+ /**
2952
+ * Add `target="_blank" rel="noopener noreferrer"` to parsed http(s) links.
2953
+ *
2954
+ * Default: `true`.
2955
+ */
2956
+ linkTargetBlank?: boolean
2957
+ /**
2958
+ * Emit `data-source-span="start-end"` on rendered block elements.
2959
+ *
2960
+ * Default: `false`.
2961
+ */
2962
+ sourceSpans?: boolean
2892
2963
  /**
2893
2964
  * Opt-in visible heading permalinks (`<a class="header-anchor" href="#id">`).
2894
2965
  *
package/index.js CHANGED
@@ -228,6 +228,7 @@ module.exports.supportsHighlightLanguage = binding.supportsHighlightLanguage;
228
228
  module.exports.nativeHighlightLanguages = binding.nativeHighlightLanguages;
229
229
  module.exports.generateSsgBarePage = binding.generateSsgBarePage;
230
230
  module.exports.getGitLastUpdated = binding.getGitLastUpdated;
231
+ module.exports.getGitLastUpdatedMany = binding.getGitLastUpdatedMany;
231
232
  module.exports.getGitContributors = binding.getGitContributors;
232
233
  module.exports.resolveSsgPageRoutes = binding.resolveSsgPageRoutes;
233
234
  module.exports.resolveSsgRoutePaths = binding.resolveSsgRoutePaths;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ox-content/napi",
3
- "version": "3.0.0-beta.8",
3
+ "version": "3.0.0",
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-beta.8",
51
- "@ox-content/binding-darwin-arm64": "3.0.0-beta.8",
52
- "@ox-content/binding-linux-x64-gnu": "3.0.0-beta.8",
53
- "@ox-content/binding-linux-x64-musl": "3.0.0-beta.8",
54
- "@ox-content/binding-linux-arm64-gnu": "3.0.0-beta.8",
55
- "@ox-content/binding-linux-arm64-musl": "3.0.0-beta.8",
56
- "@ox-content/binding-win32-x64-msvc": "3.0.0-beta.8"
50
+ "@ox-content/binding-darwin-x64": "3.0.0",
51
+ "@ox-content/binding-darwin-arm64": "3.0.0",
52
+ "@ox-content/binding-linux-x64-gnu": "3.0.0",
53
+ "@ox-content/binding-linux-x64-musl": "3.0.0",
54
+ "@ox-content/binding-linux-arm64-gnu": "3.0.0",
55
+ "@ox-content/binding-linux-arm64-musl": "3.0.0",
56
+ "@ox-content/binding-win32-x64-msvc": "3.0.0"
57
57
  }
58
58
  }