satteri 0.9.4 → 0.10.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 (64) hide show
  1. package/README.md +11 -1
  2. package/dist/binding.browser.d.ts +1 -1
  3. package/dist/binding.browser.js +1 -1
  4. package/dist/binding.d.ts +1 -1
  5. package/dist/binding.js +1 -1
  6. package/dist/byte-writer.d.ts +4 -0
  7. package/dist/byte-writer.js +13 -4
  8. package/dist/child-stub.d.ts +7 -3
  9. package/dist/child-stub.js +18 -7
  10. package/dist/command-buffer.d.ts +36 -50
  11. package/dist/command-buffer.js +102 -49
  12. package/dist/compile.d.ts +80 -32
  13. package/dist/compile.js +295 -70
  14. package/dist/freeze.d.ts +2 -0
  15. package/dist/freeze.js +10 -0
  16. package/dist/generated/wire-constants.d.ts +3 -2
  17. package/dist/generated/wire-constants.js +4 -2
  18. package/dist/hast/child-stub.d.ts +2 -3
  19. package/dist/hast/child-stub.js +18 -11
  20. package/dist/hast/element-props.d.ts +1 -1
  21. package/dist/hast/element-props.js +14 -6
  22. package/dist/hast/hast-materializer.d.ts +6 -2
  23. package/dist/hast/hast-materializer.js +48 -134
  24. package/dist/hast/hast-reader.d.ts +7 -13
  25. package/dist/hast/hast-reader.js +76 -21
  26. package/dist/hast/hast-visitor.d.ts +55 -5
  27. package/dist/hast/hast-visitor.js +320 -154
  28. package/dist/index.d.ts +6 -6
  29. package/dist/index.js +1 -1
  30. package/dist/lazy-child-resolver.d.ts +20 -13
  31. package/dist/lazy-child-resolver.js +66 -38
  32. package/dist/materializer-cache.d.ts +42 -0
  33. package/dist/materializer-cache.js +192 -0
  34. package/dist/mdast/child-stub.d.ts +6 -3
  35. package/dist/mdast/child-stub.js +71 -8
  36. package/dist/mdast/generated/layout.d.ts +2 -3
  37. package/dist/mdast/generated/layout.js +24 -28
  38. package/dist/mdast/generated/node-types.d.ts +4 -0
  39. package/dist/mdast/generated/node-types.js +25 -0
  40. package/dist/mdast/mdast-materializer.d.ts +12 -3
  41. package/dist/mdast/mdast-materializer.js +83 -78
  42. package/dist/mdast/mdast-reader.d.ts +15 -0
  43. package/dist/mdast/mdast-reader.js +55 -10
  44. package/dist/mdast/mdast-visitor.d.ts +79 -32
  45. package/dist/mdast/mdast-visitor.js +305 -122
  46. package/dist/op-stream.d.ts +5 -12
  47. package/dist/op-stream.js +6 -21
  48. package/dist/plugin.d.ts +36 -10
  49. package/dist/plugin.js +50 -2
  50. package/dist/string-pool.d.ts +13 -0
  51. package/dist/string-pool.js +91 -0
  52. package/dist/types.d.ts +44 -1
  53. package/dist/visitor-shared.d.ts +27 -4
  54. package/dist/visitor-shared.js +36 -10
  55. package/dist/wire-read.js +3 -1
  56. package/index.d.ts +130 -7
  57. package/index.js +89 -68
  58. package/package.json +24 -19
  59. package/dist/lazy-props.d.ts +0 -10
  60. package/dist/lazy-props.js +0 -50
  61. package/satteri_napi.wasi-browser.js +0 -83
  62. package/satteri_napi.wasi.cjs +0 -134
  63. package/wasi-worker-browser.mjs +0 -36
  64. package/wasi-worker.mjs +0 -63
package/index.d.ts CHANGED
@@ -1,11 +1,29 @@
1
1
  /* auto-generated by NAPI-RS */
2
2
  /* eslint-disable */
3
+ /**
4
+ * Same as `apply_commands_and_render_handle` but for the MDX → JS path.
5
+ * Fuses apply + simplify + compile + drop.
6
+ */
7
+ export declare function applyCommandsAndCompileHandle(handle: HastHandle, commandBuf: Uint8Array, options?: JsMdxOptions | undefined | null): CompileJsOneShot
8
+
3
9
  /**
4
10
  * Apply MDAST commands and convert to HAST handle in one step.
5
11
  * The MDAST handle is consumed (emptied).
6
12
  */
7
13
  export declare function applyCommandsAndConvertToHastHandle(handle: MdastHandle, commandBuf: Uint8Array, convertOptions?: JsConvertOptions | undefined | null): HastHandle
8
14
 
15
+ /**
16
+ * Fused tail step for `markdownToHtml` with a HAST plugin: apply the plugin's
17
+ * command buffer, render the resulting HAST to HTML, and leave the handle
18
+ * drained, all in one NAPI roundtrip. Saves the `apply` + `render` + `drop`
19
+ * crossings the old path made separately.
20
+ *
21
+ * The handle keeps existing (callers can still `dropHandle` it on the JS
22
+ * side if they want explicit cleanup), but the arena inside is left empty so
23
+ * the next access sees no state and the underlying allocations are freed.
24
+ */
25
+ export declare function applyCommandsAndRenderHandle(handle: HastHandle, commandBuf: Uint8Array): RenderHtmlOneShot
26
+
9
27
  /**
10
28
  * Apply a command buffer to a HAST handle's arena in-place. Returns how many
11
29
  * patches were dropped because their target lived inside a subtree this pass
@@ -21,9 +39,32 @@ export declare function applyCommandsToHandle(handle: HastHandle, commandBuf: Ui
21
39
  */
22
40
  export declare function applyCommandsToMdastHandle(handle: MdastHandle, commandBuf: Uint8Array): number
23
41
 
42
+ /**
43
+ * Fused tail for `mdxToJs` when there's an MDAST plugin but no HAST plugin.
44
+ * Apply → extract frontmatter → convert → simplify → compile, all in one
45
+ * NAPI roundtrip.
46
+ */
47
+ export declare function applyMdastCommandsAndConvertAndCompile(handle: MdastHandle, commandBuf: Uint8Array, options?: JsMdxOptions | undefined | null, convertOptions?: JsConvertOptions | undefined | null): MdxJsOneShot
48
+
49
+ /**
50
+ * Fused tail for `markdownToHtml` when there's an MDAST plugin but no HAST
51
+ * plugin: apply the MDAST commands, extract frontmatter from the (now
52
+ * possibly-mutated) MDAST, convert MDAST → HAST, render to HTML. All in one
53
+ * NAPI roundtrip. Saves the convert + render + drop + frontmatter crossings
54
+ * the old path made separately, and reads frontmatter *after* mutations so a
55
+ * plugin that rewrites yaml/toml is observed correctly.
56
+ */
57
+ export declare function applyMdastCommandsAndConvertAndRender(handle: MdastHandle, commandBuf: Uint8Array, convertOptions?: JsConvertOptions | undefined | null): MarkdownHtmlOneShot
58
+
24
59
  /** Compile a HAST handle's arena to MDX JavaScript. Does not consume the handle. */
25
60
  export declare function compileHandle(handle: HastHandle, options?: JsMdxOptions | undefined | null): string
26
61
 
62
+ /** Result of the fused apply + compile tail; see [`RenderHtmlOneShot`]. */
63
+ export interface CompileJsOneShot {
64
+ code: string
65
+ droppedTransforms: number
66
+ }
67
+
27
68
  /** Compile MDX source directly to JavaScript. */
28
69
  export declare function compileMdx(source: string, options?: JsMdxOptions | undefined | null, features?: JsFeatures | undefined | null, convertOptions?: JsConvertOptions | undefined | null): string
29
70
 
@@ -34,20 +75,41 @@ export declare function convertMdastToHastHandle(handle: MdastHandle, convertOpt
34
75
  * Parse markdown source and convert to HAST. Returns an opaque handle.
35
76
  * The arena stays in Rust memory, no buffer is copied to JS.
36
77
  */
37
- export declare function createHastHandle(source: string, features?: JsFeatures | undefined | null, convertOptions?: JsConvertOptions | undefined | null): HastHandle
78
+ export declare function createHastHandle(source: string, features?: JsFeatures | undefined | null, convertOptions?: JsConvertOptions | undefined | null, trackPositions?: boolean | undefined | null): HastHandle
79
+
80
+ /**
81
+ * Parse an HTML string into structured HAST (elements, text, comments).
82
+ * Returns an opaque handle; the arena stays in Rust memory.
83
+ */
84
+ export declare function createHastHandleFromHtml(html: string): HastHandle
38
85
 
39
- /** Parse markdown source into an MDAST arena handle. */
40
- export declare function createMdastHandle(source: string, features?: JsFeatures | undefined | null): MdastHandle
86
+ /**
87
+ * Parse + frontmatter + HAST conversion in one crossing (HAST-plugin path
88
+ * head). Returns a `[handle, frontmatter]` pair.
89
+ */
90
+ export declare function createHastHandleWithFrontmatter(source: string, features?: JsFeatures | undefined | null, convertOptions?: JsConvertOptions | undefined | null, trackPositions?: boolean | undefined | null): [HastHandle, JsFrontmatter | undefined | null]
91
+
92
+ /**
93
+ * Parse markdown source into an MDAST arena handle.
94
+ *
95
+ * `track_positions` (default `true`) controls whether `position` is recorded
96
+ * on nodes. The plugin pipeline passes `false` when no plugin reads positions,
97
+ * skipping the `LineIndex` build + per-node line/column lookups (~15% of parse).
98
+ */
99
+ export declare function createMdastHandle(source: string, features?: JsFeatures | undefined | null, trackPositions?: boolean | undefined | null): MdastHandle
41
100
 
42
101
  /** Parse MDX source and convert to HAST. Returns an opaque handle. */
43
- export declare function createMdxHastHandle(source: string, features?: JsFeatures | undefined | null, convertOptions?: JsConvertOptions | undefined | null): HastHandle
102
+ export declare function createMdxHastHandle(source: string, features?: JsFeatures | undefined | null, convertOptions?: JsConvertOptions | undefined | null, trackPositions?: boolean | undefined | null): HastHandle
103
+
104
+ /** MDX variant of [`create_hast_handle_with_frontmatter`]. */
105
+ export declare function createMdxHastHandleWithFrontmatter(source: string, features?: JsFeatures | undefined | null, convertOptions?: JsConvertOptions | undefined | null, trackPositions?: boolean | undefined | null): [HastHandle, JsFrontmatter | undefined | null]
44
106
 
45
107
  /** Parse MDX source into an MDAST arena handle. */
46
- export declare function createMdxMdastHandle(source: string, features?: JsFeatures | undefined | null): MdastHandle
108
+ export declare function createMdxMdastHandle(source: string, features?: JsFeatures | undefined | null, trackPositions?: boolean | undefined | null): MdastHandle
47
109
 
48
110
  /**
49
- * Release a handle's arena memory. The handle becomes empty but remains
50
- * valid (subsequent calls are no-ops or return empty results).
111
+ * Empty a handle's arena into the thread-local pool; the handle stays valid
112
+ * (subsequent calls are no-ops or return empty results).
51
113
  */
52
114
  export declare function dropHandle(handle: AnyHandle): void
53
115
 
@@ -86,6 +148,11 @@ export interface JsConvertOptions {
86
148
  * Default: `"Back to reference {reference}"`.
87
149
  */
88
150
  footnoteBackLabel?: string | ((arg0: number, arg1: number) => string)
151
+ /**
152
+ * Reparse raw HTML embedded in markdown into real HAST nodes. Default:
153
+ * false. Only effective in builds with the `from-html` feature.
154
+ */
155
+ rawHtml?: boolean
89
156
  }
90
157
 
91
158
  /** Feature toggles for the Markdown/MDX parser, passed from JavaScript. */
@@ -110,6 +177,8 @@ export interface JsFeatures {
110
177
  subscript?: boolean
111
178
  /** Obsidian-style wikilinks (`[[link]]`). Default: false. */
112
179
  wikilinks?: boolean
180
+ /** Definition lists (`Term` then `: definition`). Default: false. */
181
+ definitionList?: boolean
113
182
  /** Smart punctuation: all categories on. Default: false. */
114
183
  smartPunctuation?: boolean
115
184
  /** Granular smart-punctuation control (overrides `smart_punctuation`). */
@@ -229,12 +298,55 @@ export interface JsTextContentOptions {
229
298
  includeHtml?: boolean
230
299
  }
231
300
 
301
+ /**
302
+ * One-shot result returned by the no-plugin fast path and the MDAST-plugin
303
+ * fused tail. `dropped_transforms` is only ever non-zero on the fused-tail
304
+ * path (the fast path applies no commands).
305
+ */
306
+ export interface MarkdownHtmlOneShot {
307
+ html: string
308
+ frontmatter?: JsFrontmatter
309
+ droppedTransforms: number
310
+ }
311
+
312
+ /**
313
+ * Fast path: parse markdown → MDAST → HAST → HTML, plus extract frontmatter,
314
+ * in a single NAPI roundtrip. Used by `markdownToHtml` when the caller didn't
315
+ * configure any plugins. Skips 5 of the 6 NAPI crossings the handle-based
316
+ * path makes (createMdast, getFrontmatter, convertToHast, dropMdast, render,
317
+ * dropHast → just one call).
318
+ */
319
+ export declare function markdownToHtmlFast(source: string, features?: JsFeatures | undefined | null, convertOptions?: JsConvertOptions | undefined | null): MarkdownHtmlOneShot
320
+
321
+ /**
322
+ * Plain-Markdown variant of [`mdx_to_js_fast`]: MDX syntax stays literal text.
323
+ * Used by `markdownToJs` when the caller didn't configure any plugins.
324
+ */
325
+ export declare function markdownToJsFast(source: string, features?: JsFeatures | undefined | null, options?: JsMdxOptions | undefined | null, convertOptions?: JsConvertOptions | undefined | null): MdxJsOneShot
326
+
232
327
  /**
233
328
  * Collect the concatenated text content of an MDAST node and all its descendants.
234
329
  * Mirrors `mdast-util-to-string`: collects value from text nodes, alt from images.
235
330
  */
236
331
  export declare function mdastTextContentHandle(handle: MdastHandle, nodeId: number, options?: JsTextContentOptions | undefined | null): string
237
332
 
333
+ /**
334
+ * One-shot result returned by the no-plugin `mdxToJs` fast path and the
335
+ * MDAST-plugin fused tail; see [`MarkdownHtmlOneShot`].
336
+ */
337
+ export interface MdxJsOneShot {
338
+ code: string
339
+ frontmatter?: JsFrontmatter
340
+ droppedTransforms: number
341
+ }
342
+
343
+ /**
344
+ * Fast path: parse MDX → MDAST → HAST → JS, plus extract frontmatter, in a
345
+ * single NAPI roundtrip. Used by `mdxToJs` when the caller didn't configure
346
+ * any plugins. Skips 5 of the 6 NAPI crossings the handle-based path makes.
347
+ */
348
+ export declare function mdxToJsFast(source: string, features?: JsFeatures | undefined | null, options?: JsMdxOptions | undefined | null, convertOptions?: JsConvertOptions | undefined | null): MdxJsOneShot
349
+
238
350
  /** Parse ESM (import/export statements) and return ESTree-compatible AST as JSON. */
239
351
  export declare function parseEsm(source: string): string | null
240
352
 
@@ -250,6 +362,17 @@ export declare function parseToHtml(source: string, features?: JsFeatures | unde
250
362
  /** Render a HAST handle's arena to HTML. Does not consume the handle. */
251
363
  export declare function renderHandle(handle: HastHandle): string
252
364
 
365
+ /**
366
+ * Result of the fused apply + render tail. `dropped_transforms` mirrors the
367
+ * count `apply_commands_to_handle` returns: patches dropped because their
368
+ * target lived inside a removed/replaced subtree; the JS pipeline warns when
369
+ * non-zero.
370
+ */
371
+ export interface RenderHtmlOneShot {
372
+ html: string
373
+ droppedTransforms: number
374
+ }
375
+
253
376
  /**
254
377
  * Serialize a handle's arena to the wire-format buffer JS instantiates a
255
378
  * reader from. The kind tag in the header tells the JS side whether to
package/index.js CHANGED
@@ -3,11 +3,11 @@
3
3
  // @ts-nocheck
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
- import { createRequire } from 'node:module'
6
+ import { createRequire } from 'module'
7
7
  const require = createRequire(import.meta.url)
8
8
  const __dirname = new URL('.', import.meta.url).pathname
9
9
 
10
- const { readFileSync } = require('node:fs')
10
+ const { readFileSync } = require('fs')
11
11
  let nativeBinding = null
12
12
  const loadErrors = []
13
13
 
@@ -37,7 +37,7 @@ const isMuslFromFilesystem = () => {
37
37
 
38
38
  const isMuslFromReport = () => {
39
39
  let report = null
40
- if (typeof process.report?.getReport === 'function') {
40
+ if (process.report && typeof process.report.getReport === 'function') {
41
41
  process.report.excludeNetwork = true
42
42
  report = process.report.getReport()
43
43
  }
@@ -81,8 +81,8 @@ function requireNative() {
81
81
  try {
82
82
  const binding = require('@bruits/satteri-android-arm64')
83
83
  const bindingPackageVersion = require('@bruits/satteri-android-arm64/package.json').version
84
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
85
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
84
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
85
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
86
86
  }
87
87
  return binding
88
88
  } catch (e) {
@@ -97,8 +97,8 @@ function requireNative() {
97
97
  try {
98
98
  const binding = require('@bruits/satteri-android-arm-eabi')
99
99
  const bindingPackageVersion = require('@bruits/satteri-android-arm-eabi/package.json').version
100
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
101
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
100
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
101
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
102
102
  }
103
103
  return binding
104
104
  } catch (e) {
@@ -109,7 +109,7 @@ function requireNative() {
109
109
  }
110
110
  } else if (process.platform === 'win32') {
111
111
  if (process.arch === 'x64') {
112
- if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') {
112
+ if ((process.config && process.config.variables && process.config.variables.shlib_suffix === 'dll.a') || (process.config && process.config.variables && process.config.variables.node_target_type === 'shared_library')) {
113
113
  try {
114
114
  return require('./satteri_napi.win32-x64-gnu.node')
115
115
  } catch (e) {
@@ -118,8 +118,8 @@ function requireNative() {
118
118
  try {
119
119
  const binding = require('@bruits/satteri-win32-x64-gnu')
120
120
  const bindingPackageVersion = require('@bruits/satteri-win32-x64-gnu/package.json').version
121
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
122
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
121
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
122
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
123
123
  }
124
124
  return binding
125
125
  } catch (e) {
@@ -134,8 +134,8 @@ function requireNative() {
134
134
  try {
135
135
  const binding = require('@bruits/satteri-win32-x64-msvc')
136
136
  const bindingPackageVersion = require('@bruits/satteri-win32-x64-msvc/package.json').version
137
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
138
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
137
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
138
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
139
139
  }
140
140
  return binding
141
141
  } catch (e) {
@@ -151,8 +151,8 @@ function requireNative() {
151
151
  try {
152
152
  const binding = require('@bruits/satteri-win32-ia32-msvc')
153
153
  const bindingPackageVersion = require('@bruits/satteri-win32-ia32-msvc/package.json').version
154
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
155
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
154
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
155
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
156
156
  }
157
157
  return binding
158
158
  } catch (e) {
@@ -167,8 +167,8 @@ function requireNative() {
167
167
  try {
168
168
  const binding = require('@bruits/satteri-win32-arm64-msvc')
169
169
  const bindingPackageVersion = require('@bruits/satteri-win32-arm64-msvc/package.json').version
170
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
171
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
170
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
171
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
172
172
  }
173
173
  return binding
174
174
  } catch (e) {
@@ -186,8 +186,8 @@ function requireNative() {
186
186
  try {
187
187
  const binding = require('@bruits/satteri-darwin-universal')
188
188
  const bindingPackageVersion = require('@bruits/satteri-darwin-universal/package.json').version
189
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
190
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
189
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
190
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
191
191
  }
192
192
  return binding
193
193
  } catch (e) {
@@ -202,8 +202,8 @@ function requireNative() {
202
202
  try {
203
203
  const binding = require('@bruits/satteri-darwin-x64')
204
204
  const bindingPackageVersion = require('@bruits/satteri-darwin-x64/package.json').version
205
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
206
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
205
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
206
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
207
207
  }
208
208
  return binding
209
209
  } catch (e) {
@@ -218,8 +218,8 @@ function requireNative() {
218
218
  try {
219
219
  const binding = require('@bruits/satteri-darwin-arm64')
220
220
  const bindingPackageVersion = require('@bruits/satteri-darwin-arm64/package.json').version
221
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
222
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
221
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
222
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
223
223
  }
224
224
  return binding
225
225
  } catch (e) {
@@ -238,8 +238,8 @@ function requireNative() {
238
238
  try {
239
239
  const binding = require('@bruits/satteri-freebsd-x64')
240
240
  const bindingPackageVersion = require('@bruits/satteri-freebsd-x64/package.json').version
241
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
242
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
241
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
242
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
243
243
  }
244
244
  return binding
245
245
  } catch (e) {
@@ -254,8 +254,8 @@ function requireNative() {
254
254
  try {
255
255
  const binding = require('@bruits/satteri-freebsd-arm64')
256
256
  const bindingPackageVersion = require('@bruits/satteri-freebsd-arm64/package.json').version
257
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
258
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
257
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
258
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
259
259
  }
260
260
  return binding
261
261
  } catch (e) {
@@ -275,8 +275,8 @@ function requireNative() {
275
275
  try {
276
276
  const binding = require('@bruits/satteri-linux-x64-musl')
277
277
  const bindingPackageVersion = require('@bruits/satteri-linux-x64-musl/package.json').version
278
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
279
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
278
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
279
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
280
280
  }
281
281
  return binding
282
282
  } catch (e) {
@@ -291,8 +291,8 @@ function requireNative() {
291
291
  try {
292
292
  const binding = require('@bruits/satteri-linux-x64-gnu')
293
293
  const bindingPackageVersion = require('@bruits/satteri-linux-x64-gnu/package.json').version
294
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
295
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
294
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
295
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
296
296
  }
297
297
  return binding
298
298
  } catch (e) {
@@ -309,8 +309,8 @@ function requireNative() {
309
309
  try {
310
310
  const binding = require('@bruits/satteri-linux-arm64-musl')
311
311
  const bindingPackageVersion = require('@bruits/satteri-linux-arm64-musl/package.json').version
312
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
313
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
312
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
313
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
314
314
  }
315
315
  return binding
316
316
  } catch (e) {
@@ -325,8 +325,8 @@ function requireNative() {
325
325
  try {
326
326
  const binding = require('@bruits/satteri-linux-arm64-gnu')
327
327
  const bindingPackageVersion = require('@bruits/satteri-linux-arm64-gnu/package.json').version
328
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
329
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
328
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
329
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
330
330
  }
331
331
  return binding
332
332
  } catch (e) {
@@ -343,8 +343,8 @@ function requireNative() {
343
343
  try {
344
344
  const binding = require('@bruits/satteri-linux-arm-musleabihf')
345
345
  const bindingPackageVersion = require('@bruits/satteri-linux-arm-musleabihf/package.json').version
346
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
347
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
346
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
347
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
348
348
  }
349
349
  return binding
350
350
  } catch (e) {
@@ -359,8 +359,8 @@ function requireNative() {
359
359
  try {
360
360
  const binding = require('@bruits/satteri-linux-arm-gnueabihf')
361
361
  const bindingPackageVersion = require('@bruits/satteri-linux-arm-gnueabihf/package.json').version
362
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
363
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
362
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
363
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
364
364
  }
365
365
  return binding
366
366
  } catch (e) {
@@ -377,8 +377,8 @@ function requireNative() {
377
377
  try {
378
378
  const binding = require('@bruits/satteri-linux-loong64-musl')
379
379
  const bindingPackageVersion = require('@bruits/satteri-linux-loong64-musl/package.json').version
380
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
381
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
380
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
381
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
382
382
  }
383
383
  return binding
384
384
  } catch (e) {
@@ -393,8 +393,8 @@ function requireNative() {
393
393
  try {
394
394
  const binding = require('@bruits/satteri-linux-loong64-gnu')
395
395
  const bindingPackageVersion = require('@bruits/satteri-linux-loong64-gnu/package.json').version
396
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
397
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
396
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
397
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
398
398
  }
399
399
  return binding
400
400
  } catch (e) {
@@ -411,8 +411,8 @@ function requireNative() {
411
411
  try {
412
412
  const binding = require('@bruits/satteri-linux-riscv64-musl')
413
413
  const bindingPackageVersion = require('@bruits/satteri-linux-riscv64-musl/package.json').version
414
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
415
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
414
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
415
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
416
416
  }
417
417
  return binding
418
418
  } catch (e) {
@@ -427,8 +427,8 @@ function requireNative() {
427
427
  try {
428
428
  const binding = require('@bruits/satteri-linux-riscv64-gnu')
429
429
  const bindingPackageVersion = require('@bruits/satteri-linux-riscv64-gnu/package.json').version
430
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
431
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
430
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
431
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
432
432
  }
433
433
  return binding
434
434
  } catch (e) {
@@ -444,8 +444,8 @@ function requireNative() {
444
444
  try {
445
445
  const binding = require('@bruits/satteri-linux-ppc64-gnu')
446
446
  const bindingPackageVersion = require('@bruits/satteri-linux-ppc64-gnu/package.json').version
447
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
448
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
447
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
448
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
449
449
  }
450
450
  return binding
451
451
  } catch (e) {
@@ -460,8 +460,8 @@ function requireNative() {
460
460
  try {
461
461
  const binding = require('@bruits/satteri-linux-s390x-gnu')
462
462
  const bindingPackageVersion = require('@bruits/satteri-linux-s390x-gnu/package.json').version
463
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
464
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
463
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
464
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
465
465
  }
466
466
  return binding
467
467
  } catch (e) {
@@ -480,8 +480,8 @@ function requireNative() {
480
480
  try {
481
481
  const binding = require('@bruits/satteri-openharmony-arm64')
482
482
  const bindingPackageVersion = require('@bruits/satteri-openharmony-arm64/package.json').version
483
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
484
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
483
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
484
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
485
485
  }
486
486
  return binding
487
487
  } catch (e) {
@@ -496,8 +496,8 @@ function requireNative() {
496
496
  try {
497
497
  const binding = require('@bruits/satteri-openharmony-x64')
498
498
  const bindingPackageVersion = require('@bruits/satteri-openharmony-x64/package.json').version
499
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
500
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
499
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
500
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
501
501
  }
502
502
  return binding
503
503
  } catch (e) {
@@ -512,8 +512,8 @@ function requireNative() {
512
512
  try {
513
513
  const binding = require('@bruits/satteri-openharmony-arm')
514
514
  const bindingPackageVersion = require('@bruits/satteri-openharmony-arm/package.json').version
515
- if (bindingPackageVersion !== '0.8.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
516
- throw new Error(`Native binding package version mismatch, expected 0.8.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
515
+ if (bindingPackageVersion !== '0.9.5' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
516
+ throw new Error(`Native binding package version mismatch, expected 0.9.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
517
517
  }
518
518
  return binding
519
519
  } catch (e) {
@@ -529,23 +529,33 @@ function requireNative() {
529
529
 
530
530
  nativeBinding = requireNative()
531
531
 
532
- if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
532
+ // NAPI_RS_FORCE_WASI is a tri-state flag:
533
+ // unset / any other value → native binding preferred, WASI is only a fallback
534
+ // 'true' → force WASI fallback even if native loaded
535
+ // 'error' → force WASI and throw if no WASI binding is found
536
+ // Treating any non-empty string as truthy (the historical behavior) meant
537
+ // NAPI_RS_FORCE_WASI=false, NAPI_RS_FORCE_WASI=0, etc. inadvertently triggered
538
+ // the WASI path, causing ENOENT for packages shipped without a .wasi.cjs file.
539
+ const forceWasi =
540
+ process.env.NAPI_RS_FORCE_WASI === 'true' || process.env.NAPI_RS_FORCE_WASI === 'error'
541
+
542
+ if (!nativeBinding || forceWasi) {
533
543
  let wasiBinding = null
534
544
  let wasiBindingError = null
535
545
  try {
536
546
  wasiBinding = require('./satteri_napi.wasi.cjs')
537
547
  nativeBinding = wasiBinding
538
548
  } catch (err) {
539
- if (process.env.NAPI_RS_FORCE_WASI) {
549
+ if (forceWasi) {
540
550
  wasiBindingError = err
541
551
  }
542
552
  }
543
- if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
553
+ if (!nativeBinding || forceWasi) {
544
554
  try {
545
555
  wasiBinding = require('@bruits/satteri-wasm32-wasi')
546
556
  nativeBinding = wasiBinding
547
557
  } catch (err) {
548
- if (process.env.NAPI_RS_FORCE_WASI) {
558
+ if (forceWasi) {
549
559
  if (!wasiBindingError) {
550
560
  wasiBindingError = err
551
561
  } else {
@@ -572,37 +582,48 @@ if (!nativeBinding && globalThis.process?.versions?.['webcontainer']) {
572
582
 
573
583
  if (!nativeBinding) {
574
584
  if (loadErrors.length > 0) {
575
- throw new Error(
585
+ const error = new Error(
576
586
  `Cannot find native binding. ` +
577
587
  `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
578
588
  'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
579
- {
580
- cause: loadErrors.reduce((err, cur) => {
581
- cur.cause = err
582
- return cur
583
- }),
584
- },
585
589
  )
590
+ // assign instead of the `new Error(message, { cause })` options form,
591
+ // which Node < 16.9 silently ignores
592
+ error.cause = loadErrors.reduce((err, cur) => {
593
+ cur.cause = err
594
+ return cur
595
+ })
596
+ throw error
586
597
  }
587
598
  throw new Error(`Failed to load native binding`)
588
599
  }
589
600
 
590
- const { applyCommandsAndConvertToHastHandle, applyCommandsToHandle, applyCommandsToMdastHandle, compileHandle, compileMdx, convertMdastToHastHandle, createHastHandle, createMdastHandle, createMdxHastHandle, createMdxMdastHandle, dropHandle, getHandleSource, getMdastFrontmatter, getNodeData, mdastTextContentHandle, parseEsm, parseExpression, parseToHtml, renderHandle, serializeHandle, setNodeData, textContentHandle, walkHandle, walkMdastHandle } = nativeBinding
601
+ const { applyCommandsAndCompileHandle, applyCommandsAndConvertToHastHandle, applyCommandsAndRenderHandle, applyCommandsToHandle, applyCommandsToMdastHandle, applyMdastCommandsAndConvertAndCompile, applyMdastCommandsAndConvertAndRender, compileHandle, compileMdx, convertMdastToHastHandle, createHastHandle, createHastHandleFromHtml, createHastHandleWithFrontmatter, createMdastHandle, createMdxHastHandle, createMdxHastHandleWithFrontmatter, createMdxMdastHandle, dropHandle, getHandleSource, getMdastFrontmatter, getNodeData, markdownToHtmlFast, markdownToJsFast, mdastTextContentHandle, mdxToJsFast, parseEsm, parseExpression, parseToHtml, renderHandle, serializeHandle, setNodeData, textContentHandle, walkHandle, walkMdastHandle } = nativeBinding
602
+ export { applyCommandsAndCompileHandle }
591
603
  export { applyCommandsAndConvertToHastHandle }
604
+ export { applyCommandsAndRenderHandle }
592
605
  export { applyCommandsToHandle }
593
606
  export { applyCommandsToMdastHandle }
607
+ export { applyMdastCommandsAndConvertAndCompile }
608
+ export { applyMdastCommandsAndConvertAndRender }
594
609
  export { compileHandle }
595
610
  export { compileMdx }
596
611
  export { convertMdastToHastHandle }
597
612
  export { createHastHandle }
613
+ export { createHastHandleFromHtml }
614
+ export { createHastHandleWithFrontmatter }
598
615
  export { createMdastHandle }
599
616
  export { createMdxHastHandle }
617
+ export { createMdxHastHandleWithFrontmatter }
600
618
  export { createMdxMdastHandle }
601
619
  export { dropHandle }
602
620
  export { getHandleSource }
603
621
  export { getMdastFrontmatter }
604
622
  export { getNodeData }
623
+ export { markdownToHtmlFast }
624
+ export { markdownToJsFast }
605
625
  export { mdastTextContentHandle }
626
+ export { mdxToJsFast }
606
627
  export { parseEsm }
607
628
  export { parseExpression }
608
629
  export { parseToHtml }