mq-nodejs 0.1.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.
package/README.md ADDED
@@ -0,0 +1,216 @@
1
+ <div>
2
+ <a href="https://mqlang.org">Visit the site 🌐</a>
3
+ &mdash;
4
+ <a href="https://mqlang.org/book">Read the book 📖</a>
5
+ &mdash;
6
+ <a href="https://mqlang.org/playground">Playground 🎮</a>
7
+ </div>
8
+
9
+ <h1 align="center">mq-nodejs</h1>
10
+
11
+ A Node.js package for running [mq](https://github.com/harehare/mq) (a jq-like command-line tool for Markdown processing) using WebAssembly.
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install mq-nodejs
17
+ ```
18
+
19
+ ## Quick Start
20
+
21
+ ```typescript
22
+ import { run, format, htmlToMarkdown } from "mq-nodejs";
23
+
24
+ // Transform markdown list style
25
+ const markdown = `- First item
26
+ - Second item
27
+ - Third item`;
28
+
29
+ const result = await run(".[]", markdown, { listStyle: "star" });
30
+ console.log(result);
31
+ // Output:
32
+ // * First item
33
+ // * Second item
34
+ // * Third item
35
+
36
+ // Format mq code
37
+ const formatted = await format("map(to_text)|select(gt(5))");
38
+ console.log(formatted);
39
+ // Output: map(to_text) | select(gt(5))
40
+
41
+ // Convert HTML to Markdown
42
+ const html = "<h1>Hello World</h1><p>This is a paragraph.</p>";
43
+ const md = await htmlToMarkdown(html);
44
+ console.log(md);
45
+ // Output:
46
+ // # Hello World
47
+ //
48
+ // This is a paragraph.
49
+ ```
50
+
51
+ ## API Reference
52
+
53
+ ### Functions
54
+
55
+ #### `run(code, content, options?)`
56
+
57
+ Run an mq script on markdown content.
58
+
59
+ - `code`: string - The mq script to execute
60
+ - `content`: string - The markdown content to process
61
+ - `options`: Partial<Options> - Processing options
62
+
63
+ Returns: `Promise<string>` - The processed output
64
+
65
+ #### `format(code)`
66
+
67
+ Format mq code.
68
+
69
+ - `code`: string - The mq code to format
70
+
71
+ Returns: `Promise<string>` - The formatted code
72
+
73
+ #### `diagnostics(code, enableTypeCheck?)`
74
+
75
+ Get diagnostics for mq code.
76
+
77
+ - `code`: string - The mq code to analyze
78
+ - `enableTypeCheck`: boolean (optional) - Enable type checking
79
+
80
+ Returns: `Promise<ReadonlyArray<Diagnostic>>` - Array of diagnostic messages
81
+
82
+ #### `inlayHints(code)`
83
+
84
+ Get inlay type hints for mq code.
85
+
86
+ - `code`: string - The mq code to analyze
87
+
88
+ Returns: `Promise<ReadonlyArray<InlayHint>>` - Array of inlay hints
89
+
90
+ #### `definedValues(code, module?)`
91
+
92
+ Get defined values (functions, selectors, variables) from mq code.
93
+
94
+ - `code`: string - The mq code to analyze
95
+ - `module`: string (optional) - Module name
96
+
97
+ Returns: `Promise<ReadonlyArray<DefinedValue>>` - Array of defined values
98
+
99
+ #### `toAst(code)`
100
+
101
+ Convert mq code to its AST (Abstract Syntax Tree) representation.
102
+
103
+ - `code`: string - The mq code to convert
104
+
105
+ Returns: `Promise<string>` - The AST representation
106
+
107
+ #### `htmlToMarkdown(html, options?)`
108
+
109
+ Convert HTML to markdown format.
110
+
111
+ - `html`: string - The HTML content to convert
112
+ - `options`: Partial<ConversionOptions> - Conversion options
113
+
114
+ Returns: `Promise<string>` - The converted markdown content
115
+
116
+ #### `toHtml(markdownInput)`
117
+
118
+ Convert Markdown to HTML.
119
+
120
+ - `markdownInput`: string - The markdown content to convert
121
+
122
+ Returns: `Promise<string>` - The converted HTML content
123
+
124
+ ## Examples
125
+
126
+ ### Extract and Transform Headings
127
+
128
+ ```typescript
129
+ import { run } from "mq-nodejs";
130
+
131
+ const markdown = `# Main Title
132
+ Some content here.
133
+
134
+ ## Section 1
135
+ More content.
136
+
137
+ ### Subsection
138
+ Even more content.`;
139
+
140
+ // Extract all headings
141
+ const headings = await run(".h", markdown);
142
+ ```
143
+
144
+ ### List Transformations
145
+
146
+ ```typescript
147
+ import { run } from "mq-nodejs";
148
+
149
+ const markdown = `- Apple
150
+ - Banana
151
+ - Cherry`;
152
+
153
+ // Change list style
154
+ const starList = await run(".[]", markdown, { listStyle: "star" });
155
+ // Output: * Apple\n* Banana\n* Cherry
156
+
157
+ // Filter list items
158
+ const filtered = await run('.[] | select(test(to_text(), "^A"))', markdown);
159
+ // Output: - Apple
160
+
161
+ // Transform list items
162
+ const uppercase = await run(".[] | upcase()", markdown);
163
+ // Output: - APPLE\n- BANANA\n- CHERRY
164
+ ```
165
+
166
+ ### HTML to Markdown Conversion
167
+
168
+ ```typescript
169
+ import { htmlToMarkdown } from "mq-nodejs";
170
+
171
+ const html = `
172
+ <article>
173
+ <h1>Welcome to mq</h1>
174
+ <p>A <strong>powerful</strong> tool for <em>Markdown</em> processing.</p>
175
+ <ul>
176
+ <li>Easy to use</li>
177
+ <li>Fast performance</li>
178
+ <li>Web-compatible</li>
179
+ </ul>
180
+ </article>
181
+ `;
182
+
183
+ const markdown = await htmlToMarkdown(html);
184
+ console.log(markdown);
185
+ // Output:
186
+ // # Welcome to mq
187
+ //
188
+ // A **powerful** tool for _Markdown_ processing.
189
+ //
190
+ // - Easy to use
191
+ // - Fast performance
192
+ // - Web-compatible
193
+ ```
194
+
195
+ ### Error Handling
196
+
197
+ ```typescript
198
+ import { run, diagnostics } from "mq-nodejs";
199
+
200
+ try {
201
+ const result = await run("invalid syntax", "content");
202
+ } catch (error) {
203
+ console.error("Runtime error:", error.message);
204
+ }
205
+
206
+ // Get detailed diagnostics
207
+ const diags = await diagnostics("invalid syntax");
208
+ diags.forEach((diag) => {
209
+ console.log(`Error at line ${diag.startLine}: ${diag.message}`);
210
+ });
211
+ ```
212
+
213
+ ## License
214
+
215
+ MIT License - see the main [mq](https://github.com/harehare/mq) repository for details.
216
+
@@ -0,0 +1,79 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ type DefinedValueType = 'Function' | 'Variable';
5
+
6
+ interface DefinedValue {
7
+ name: string;
8
+ args?: string[];
9
+ doc: string;
10
+ valueType: DefinedValueType;
11
+ }
12
+
13
+ interface Diagnostic {
14
+ startLine: number,
15
+ startColumn: number,
16
+ endLine: number,
17
+ endColumn: number,
18
+ message: string,
19
+ }
20
+
21
+ interface InlayHint {
22
+ line: number,
23
+ column: number,
24
+ label: string,
25
+ }
26
+
27
+ interface Options {
28
+ isUpdate: boolean,
29
+ inputFormat: 'markdown' | 'text' | 'mdx' | 'html' | 'null' | 'raw' | null,
30
+ listStyle: 'dash' | 'plus' | 'star' | null,
31
+ linkTitleStyle: 'double' | 'single' | 'paren' | null,
32
+ linkUrlStyle: 'angle' | 'none' | null,
33
+ }
34
+
35
+
36
+
37
+ declare class ConversionOptions {
38
+ private constructor();
39
+ free(): void;
40
+ [Symbol.dispose](): void;
41
+ extract_scripts_as_code_blocks: boolean;
42
+ generate_front_matter: boolean;
43
+ use_title_as_h1: boolean;
44
+ }
45
+
46
+ /**
47
+ * Run an mq script on Markdown content.
48
+ */
49
+ declare function run(code: string, content: string, options?: Partial<Options>): Promise<string>;
50
+ /**
51
+ * Convert mq code to its AST (Abstract Syntax Tree) representation.
52
+ */
53
+ declare function toAst(code: string): Promise<string>;
54
+ /**
55
+ * Format mq code.
56
+ */
57
+ declare function format(code: string): Promise<string>;
58
+ /**
59
+ * Get diagnostics for mq code.
60
+ */
61
+ declare function diagnostics(code: string, enableTypeCheck?: boolean): Promise<ReadonlyArray<Diagnostic>>;
62
+ /**
63
+ * Get inlay type hints for mq code.
64
+ */
65
+ declare function inlayHints(code: string): Promise<ReadonlyArray<InlayHint>>;
66
+ /**
67
+ * Get defined values (functions, selectors, variables) from mq code.
68
+ */
69
+ declare function definedValues(code: string, module?: string): Promise<ReadonlyArray<DefinedValue>>;
70
+ /**
71
+ * Convert HTML to Markdown.
72
+ */
73
+ declare function htmlToMarkdown(html: string, options?: ConversionOptions): Promise<string>;
74
+ /**
75
+ * Convert Markdown to HTML.
76
+ */
77
+ declare function toHtml(markdownInput: string): Promise<string>;
78
+
79
+ export { type DefinedValue as D, type InlayHint as I, type Options as O, type DefinedValueType as a, type Diagnostic as b, definedValues, diagnostics, format, htmlToMarkdown, inlayHints, run, toAst, toHtml };
package/dist/core.d.ts ADDED
@@ -0,0 +1,79 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ type DefinedValueType = 'Function' | 'Variable';
5
+
6
+ interface DefinedValue {
7
+ name: string;
8
+ args?: string[];
9
+ doc: string;
10
+ valueType: DefinedValueType;
11
+ }
12
+
13
+ interface Diagnostic {
14
+ startLine: number,
15
+ startColumn: number,
16
+ endLine: number,
17
+ endColumn: number,
18
+ message: string,
19
+ }
20
+
21
+ interface InlayHint {
22
+ line: number,
23
+ column: number,
24
+ label: string,
25
+ }
26
+
27
+ interface Options {
28
+ isUpdate: boolean,
29
+ inputFormat: 'markdown' | 'text' | 'mdx' | 'html' | 'null' | 'raw' | null,
30
+ listStyle: 'dash' | 'plus' | 'star' | null,
31
+ linkTitleStyle: 'double' | 'single' | 'paren' | null,
32
+ linkUrlStyle: 'angle' | 'none' | null,
33
+ }
34
+
35
+
36
+
37
+ declare class ConversionOptions {
38
+ private constructor();
39
+ free(): void;
40
+ [Symbol.dispose](): void;
41
+ extract_scripts_as_code_blocks: boolean;
42
+ generate_front_matter: boolean;
43
+ use_title_as_h1: boolean;
44
+ }
45
+
46
+ /**
47
+ * Run an mq script on Markdown content.
48
+ */
49
+ declare function run(code: string, content: string, options?: Partial<Options>): Promise<string>;
50
+ /**
51
+ * Convert mq code to its AST (Abstract Syntax Tree) representation.
52
+ */
53
+ declare function toAst(code: string): Promise<string>;
54
+ /**
55
+ * Format mq code.
56
+ */
57
+ declare function format(code: string): Promise<string>;
58
+ /**
59
+ * Get diagnostics for mq code.
60
+ */
61
+ declare function diagnostics(code: string, enableTypeCheck?: boolean): Promise<ReadonlyArray<Diagnostic>>;
62
+ /**
63
+ * Get inlay type hints for mq code.
64
+ */
65
+ declare function inlayHints(code: string): Promise<ReadonlyArray<InlayHint>>;
66
+ /**
67
+ * Get defined values (functions, selectors, variables) from mq code.
68
+ */
69
+ declare function definedValues(code: string, module?: string): Promise<ReadonlyArray<DefinedValue>>;
70
+ /**
71
+ * Convert HTML to Markdown.
72
+ */
73
+ declare function htmlToMarkdown(html: string, options?: ConversionOptions): Promise<string>;
74
+ /**
75
+ * Convert Markdown to HTML.
76
+ */
77
+ declare function toHtml(markdownInput: string): Promise<string>;
78
+
79
+ export { type DefinedValue as D, type InlayHint as I, type Options as O, type DefinedValueType as a, type Diagnostic as b, definedValues, diagnostics, format, htmlToMarkdown, inlayHints, run, toAst, toHtml };
package/dist/core.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";var R=Object.create;var O=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var W=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),q=(n,t)=>{for(var e in t)O(n,e,{get:t[e],enumerable:!0})},P=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of U(t))!C.call(n,o)&&o!==e&&O(n,o,{get:()=>t[o],enumerable:!(r=E(t,o))||r.enumerable});return n};var L=(n,t,e)=>(e=n!=null?R(v(n)):{},P(t||!n||!n.__esModule?O(e,"default",{value:n,enumerable:!0}):e,n)),$=n=>P(O({},"__esModule",{value:!0}),n);var D=W(w=>{"use strict";var A=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,nt.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return _.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return _.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return _.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){_.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){_.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){_.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(A.prototype[Symbol.dispose]=A.prototype.free);w.ConversionOptions=A;var M=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,et.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);w.RunOptions=M;function z(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f;var o=l(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=f;let s=_.definedValues(e,r,o,c);return g(s)}w.definedValues=z;function B(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=_.diagnostics(e,r,l(t)?16777215:t?1:0);return g(o)}w.diagnostics=B;function N(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.format(t,e);return g(r)}w.format=N;function G(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=0;l(t)||(rt(t,A),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(e,r,o);return g(c)}w.htmlToMarkdown=G;function J(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.inlayHints(t,e);return g(r)}w.inlayHints=J;function K(n,t,e){let r=b(n,_.__wbindgen_export,_.__wbindgen_export2),o=f,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),s=f,d=_.run(r,o,c,s,a(e));return g(d)}w.run=K;function Q(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toAst(t,e);return g(r)}w.toAst=Q;function X(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toHtml(t,e);return g(r)}w.toHtml=X;function Y(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_2e59b1b37a9a34c3:function(t,e){let r=Error(H(t,e));return a(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_a86c216575a75c30:function(t){let e=i(t),r=typeof e=="boolean"?e:void 0;return l(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_dd5d2d07ce9e6c57:function(t,e){let r=T(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_4bd7a57e54337366:function(t,e){return i(t)in i(e)},__wbg___wbindgen_is_function_49868bde5eb1e745:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_40c5a80572e8f9d3:function(t){let e=i(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_b29b5c5a8065ba1a:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_c0cca72b82b86f4d:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944:function(t,e){return i(t)==i(e)},__wbg___wbindgen_number_get_7579aab02a8a620c:function(t,e){let r=i(e),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,l(o)?0:o,!0),p().setInt32(t+0,!l(o),!0)},__wbg___wbindgen_string_get_914df97fcfa788f2:function(t,e){let r=i(e),o=typeof r=="string"?r:void 0;var c=l(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),s=f;p().setInt32(t+4,s,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_81fc77679af83bc6:function(t,e){throw new Error(H(t,e))},__wbg__wbg_cb_unref_3c3b4f651835fbcb:function(t){i(t)._wbg_cb_unref()},__wbg_call_d578befcc3145dee:function(){return it(function(t,e,r){let o=i(t).call(i(e),i(r));return a(o)},arguments)},__wbg_entries_616b1a459b85be0b:function(t){let e=Object.entries(i(t));return a(e)},__wbg_get_4848e350b40afc16:function(t,e){let r=i(t)[e>>>0];return a(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=i(t)[i(e)];return a(r)},__wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a:function(t){let e;try{e=i(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_Uint8Array_4b8da683deb25d72:function(t){let e;try{e=i(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_length_0c32cb8543c8e4c8:function(t){return i(t).length},__wbg_length_6e821edde497a532:function(t){return i(t).length},__wbg_new_4f9fafbb3909af72:function(){let t=new Object;return a(t)},__wbg_new_a560378ea1240b14:function(t){let e=new Uint8Array(i(t));return a(e)},__wbg_new_f3c9df4f38f3f798:function(){let t=new Array;return a(t)},__wbg_new_typed_14d7cc391ce53d2c:function(t,e){try{var r={a:t,b:e},o=(s,d)=>{let y=r.a;r.a=0;try{return tt(y,r.b,s,d)}finally{r.a=y}};let c=new Promise(o);return a(c)}finally{r.a=0}},__wbg_prototypesetcall_3e05eb9545565046:function(t,e,r){Uint8Array.prototype.set.call(_t(t,e),i(r))},__wbg_queueMicrotask_abaf92f0bd4e80a4:function(t){let e=i(t).queueMicrotask;return a(e)},__wbg_queueMicrotask_df5a6dac26d818f3:function(t){queueMicrotask(i(t))},__wbg_resolve_0a79de24e9d2267b:function(t){let e=Promise.resolve(i(t));return a(e)},__wbg_set_6be42768c690e380:function(t,e,r){i(t)[g(e)]=g(r)},__wbg_set_6c60b2e8ad0e9383:function(t,e,r){i(t)[e>>>0]=g(r)},__wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:a(t)},__wbg_static_accessor_GLOBAL_f2e0f995a21329ff:function(){let t=typeof global>"u"?null:global;return l(t)?0:a(t)},__wbg_static_accessor_SELF_24f78b6d23f286ea:function(){let t=typeof self>"u"?null:self;return l(t)?0:a(t)},__wbg_static_accessor_WINDOW_59fd959c540fe405:function(){let t=typeof window>"u"?null:window;return l(t)?0:a(t)},__wbg_then_a0c8db0381c8994c:function(t,e){let r=i(t).then(i(e));return a(r)},__wbindgen_cast_0000000000000001:function(t,e){let r=st(t,e,Z);return a(r)},__wbindgen_cast_0000000000000002:function(t){return a(t)},__wbindgen_cast_0000000000000003:function(t,e){let r=H(t,e);return a(r)},__wbindgen_object_clone_ref:function(t){let e=i(t);return a(e)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function Z(n,t,e){try{let c=_.__wbindgen_add_to_stack_pointer(-16);_.__wasm_bindgen_func_elem_689(c,n,t,a(e));var r=p().getInt32(c+0,!0),o=p().getInt32(c+4,!0);if(o)throw g(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}function tt(n,t,e,r){_.__wasm_bindgen_func_elem_985(n,t,a(e),a(r))}var nt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_conversionoptions_free(n>>>0,1)),et=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_runoptions_free(n>>>0,1));function a(n){I===m.length&&m.push(m.length+1);let t=I;return I=m[t],m[t]=n,t}function rt(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}var j=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbindgen_export4(n.a,n.b));function T(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=T(n[0]));for(let s=1;s<o;s++)c+=", "+T(n[s]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
2
+ ${n.stack}`:r}function ot(n){n<1028||(m[n]=I,I=n)}function _t(n,t){return n=n>>>0,F().subarray(n/1,n/1+t)}var x=null;function p(){return(x===null||x.buffer.detached===!0||x.buffer.detached===void 0&&x.buffer!==_.memory.buffer)&&(x=new DataView(_.memory.buffer)),x}function H(n,t){return n=n>>>0,ct(n,t)}var S=null;function F(){return(S===null||S.byteLength===0)&&(S=new Uint8Array(_.memory.buffer)),S}function i(n){return m[n]}function it(n,t){try{return n.apply(this,t)}catch(e){_.__wbindgen_export3(a(e))}}var m=new Array(1024).fill(void 0);m.push(void 0,null,!0,!1);var I=m.length;function l(n){return n==null}function st(n,t,e){let r={a:n,b:t,cnt:1},o=(...c)=>{r.cnt++;let s=r.a;r.a=0;try{return e(s,r.b,...c)}finally{r.a=s,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{--r.cnt===0&&(_.__wbindgen_export4(r.a,r.b),r.a=0,j.unregister(r))},j.register(o,r,r),o}function b(n,t,e){if(e===void 0){let d=k.encode(n),y=t(d.length,1)>>>0;return F().subarray(y,y+d.length).set(d),f=d.length,y}let r=n.length,o=t(r,1)>>>0,c=F(),s=0;for(;s<r;s++){let d=n.charCodeAt(s);if(d>127)break;c[o+s]=d}if(s!==r){s!==0&&(n=n.slice(s)),o=e(o,r,r=s+n.length*3,1)>>>0;let d=F().subarray(o+s,o+r),y=k.encodeInto(n,d);s+=y.written,o=e(o,r,s,1)>>>0}return f=s,o}function g(n){let t=i(n);return ot(n),t}var V=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});V.decode();function ct(n,t){return V.decode(F().subarray(n,n+t))}var k=new TextEncoder;"encodeInto"in k||(k.encodeInto=function(n,t){let e=k.encode(n);return t.set(e),{read:n.length,written:e.length}});var f=0,at=`${__dirname}/mq_wasm_bg.wasm`,ut=require("fs").readFileSync(at),ft=new WebAssembly.Module(ut),_=new WebAssembly.Instance(ft,Y()).exports});var ht={};q(ht,{definedValues:()=>pt,diagnostics:()=>lt,format:()=>bt,htmlToMarkdown:()=>mt,inlayHints:()=>wt,run:()=>dt,toAst:()=>gt,toHtml:()=>yt});module.exports=$(ht);var u=L(D()),h={run:u.run,toAst:u.toAst,format:u.format,diagnostics:u.diagnostics,inlayHints:u.inlayHints,definedValues:u.definedValues,htmlToMarkdown:u.htmlToMarkdown,toHtml:u.toHtml};async function dt(n,t,e={}){return await h.run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function gt(n){return await h.toAst(n)}async function bt(n){return await h.format(n)}async function lt(n,t){return await h.diagnostics(n,t)}async function wt(n){return await h.inlayHints(n)}async function pt(n,t){return await h.definedValues(n,t)}async function mt(n,t){return await h.htmlToMarkdown(n,t)}async function yt(n){return await h.toHtml(n)}0&&(module.exports={definedValues,diagnostics,format,htmlToMarkdown,inlayHints,run,toAst,toHtml});
package/dist/core.mjs ADDED
@@ -0,0 +1,2 @@
1
+ var D=Object.create;var T=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var C=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var W=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var q=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of E(t))!v.call(n,o)&&o!==e&&T(n,o,{get:()=>t[o],enumerable:!(r=R(t,o))||r.enumerable});return n};var L=(n,t,e)=>(e=n!=null?D(U(n)):{},q(t||!n||!n.__esModule?T(e,"default",{value:n,enumerable:!0}):e,n));var V=W(w=>{"use strict";var A=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,tt.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return _.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return _.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return _.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){_.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){_.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){_.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(A.prototype[Symbol.dispose]=A.prototype.free);w.ConversionOptions=A;var M=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,nt.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);w.RunOptions=M;function $(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f;var o=l(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=f;let s=_.definedValues(e,r,o,c);return g(s)}w.definedValues=$;function z(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=_.diagnostics(e,r,l(t)?16777215:t?1:0);return g(o)}w.diagnostics=z;function B(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.format(t,e);return g(r)}w.format=B;function N(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=0;l(t)||(et(t,A),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(e,r,o);return g(c)}w.htmlToMarkdown=N;function G(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.inlayHints(t,e);return g(r)}w.inlayHints=G;function J(n,t,e){let r=b(n,_.__wbindgen_export,_.__wbindgen_export2),o=f,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),s=f,d=_.run(r,o,c,s,a(e));return g(d)}w.run=J;function K(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toAst(t,e);return g(r)}w.toAst=K;function Q(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toHtml(t,e);return g(r)}w.toHtml=Q;function X(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_2e59b1b37a9a34c3:function(t,e){let r=Error(S(t,e));return a(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_a86c216575a75c30:function(t){let e=i(t),r=typeof e=="boolean"?e:void 0;return l(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_dd5d2d07ce9e6c57:function(t,e){let r=H(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_4bd7a57e54337366:function(t,e){return i(t)in i(e)},__wbg___wbindgen_is_function_49868bde5eb1e745:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_40c5a80572e8f9d3:function(t){let e=i(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_b29b5c5a8065ba1a:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_c0cca72b82b86f4d:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944:function(t,e){return i(t)==i(e)},__wbg___wbindgen_number_get_7579aab02a8a620c:function(t,e){let r=i(e),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,l(o)?0:o,!0),p().setInt32(t+0,!l(o),!0)},__wbg___wbindgen_string_get_914df97fcfa788f2:function(t,e){let r=i(e),o=typeof r=="string"?r:void 0;var c=l(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),s=f;p().setInt32(t+4,s,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_81fc77679af83bc6:function(t,e){throw new Error(S(t,e))},__wbg__wbg_cb_unref_3c3b4f651835fbcb:function(t){i(t)._wbg_cb_unref()},__wbg_call_d578befcc3145dee:function(){return _t(function(t,e,r){let o=i(t).call(i(e),i(r));return a(o)},arguments)},__wbg_entries_616b1a459b85be0b:function(t){let e=Object.entries(i(t));return a(e)},__wbg_get_4848e350b40afc16:function(t,e){let r=i(t)[e>>>0];return a(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=i(t)[i(e)];return a(r)},__wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a:function(t){let e;try{e=i(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_Uint8Array_4b8da683deb25d72:function(t){let e;try{e=i(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_length_0c32cb8543c8e4c8:function(t){return i(t).length},__wbg_length_6e821edde497a532:function(t){return i(t).length},__wbg_new_4f9fafbb3909af72:function(){let t=new Object;return a(t)},__wbg_new_a560378ea1240b14:function(t){let e=new Uint8Array(i(t));return a(e)},__wbg_new_f3c9df4f38f3f798:function(){let t=new Array;return a(t)},__wbg_new_typed_14d7cc391ce53d2c:function(t,e){try{var r={a:t,b:e},o=(s,d)=>{let y=r.a;r.a=0;try{return Z(y,r.b,s,d)}finally{r.a=y}};let c=new Promise(o);return a(c)}finally{r.a=0}},__wbg_prototypesetcall_3e05eb9545565046:function(t,e,r){Uint8Array.prototype.set.call(ot(t,e),i(r))},__wbg_queueMicrotask_abaf92f0bd4e80a4:function(t){let e=i(t).queueMicrotask;return a(e)},__wbg_queueMicrotask_df5a6dac26d818f3:function(t){queueMicrotask(i(t))},__wbg_resolve_0a79de24e9d2267b:function(t){let e=Promise.resolve(i(t));return a(e)},__wbg_set_6be42768c690e380:function(t,e,r){i(t)[g(e)]=g(r)},__wbg_set_6c60b2e8ad0e9383:function(t,e,r){i(t)[e>>>0]=g(r)},__wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:a(t)},__wbg_static_accessor_GLOBAL_f2e0f995a21329ff:function(){let t=typeof global>"u"?null:global;return l(t)?0:a(t)},__wbg_static_accessor_SELF_24f78b6d23f286ea:function(){let t=typeof self>"u"?null:self;return l(t)?0:a(t)},__wbg_static_accessor_WINDOW_59fd959c540fe405:function(){let t=typeof window>"u"?null:window;return l(t)?0:a(t)},__wbg_then_a0c8db0381c8994c:function(t,e){let r=i(t).then(i(e));return a(r)},__wbindgen_cast_0000000000000001:function(t,e){let r=it(t,e,Y);return a(r)},__wbindgen_cast_0000000000000002:function(t){return a(t)},__wbindgen_cast_0000000000000003:function(t,e){let r=S(t,e);return a(r)},__wbindgen_object_clone_ref:function(t){let e=i(t);return a(e)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function Y(n,t,e){try{let c=_.__wbindgen_add_to_stack_pointer(-16);_.__wasm_bindgen_func_elem_689(c,n,t,a(e));var r=p().getInt32(c+0,!0),o=p().getInt32(c+4,!0);if(o)throw g(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}function Z(n,t,e,r){_.__wasm_bindgen_func_elem_985(n,t,a(e),a(r))}var tt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_conversionoptions_free(n>>>0,1)),nt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_runoptions_free(n>>>0,1));function a(n){I===m.length&&m.push(m.length+1);let t=I;return I=m[t],m[t]=n,t}function et(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}var P=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbindgen_export4(n.a,n.b));function H(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=H(n[0]));for(let s=1;s<o;s++)c+=", "+H(n[s]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
2
+ ${n.stack}`:r}function rt(n){n<1028||(m[n]=I,I=n)}function ot(n,t){return n=n>>>0,F().subarray(n/1,n/1+t)}var x=null;function p(){return(x===null||x.buffer.detached===!0||x.buffer.detached===void 0&&x.buffer!==_.memory.buffer)&&(x=new DataView(_.memory.buffer)),x}function S(n,t){return n=n>>>0,st(n,t)}var O=null;function F(){return(O===null||O.byteLength===0)&&(O=new Uint8Array(_.memory.buffer)),O}function i(n){return m[n]}function _t(n,t){try{return n.apply(this,t)}catch(e){_.__wbindgen_export3(a(e))}}var m=new Array(1024).fill(void 0);m.push(void 0,null,!0,!1);var I=m.length;function l(n){return n==null}function it(n,t,e){let r={a:n,b:t,cnt:1},o=(...c)=>{r.cnt++;let s=r.a;r.a=0;try{return e(s,r.b,...c)}finally{r.a=s,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{--r.cnt===0&&(_.__wbindgen_export4(r.a,r.b),r.a=0,P.unregister(r))},P.register(o,r,r),o}function b(n,t,e){if(e===void 0){let d=k.encode(n),y=t(d.length,1)>>>0;return F().subarray(y,y+d.length).set(d),f=d.length,y}let r=n.length,o=t(r,1)>>>0,c=F(),s=0;for(;s<r;s++){let d=n.charCodeAt(s);if(d>127)break;c[o+s]=d}if(s!==r){s!==0&&(n=n.slice(s)),o=e(o,r,r=s+n.length*3,1)>>>0;let d=F().subarray(o+s,o+r),y=k.encodeInto(n,d);s+=y.written,o=e(o,r,s,1)>>>0}return f=s,o}function g(n){let t=i(n);return rt(n),t}var j=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});j.decode();function st(n,t){return j.decode(F().subarray(n,n+t))}var k=new TextEncoder;"encodeInto"in k||(k.encodeInto=function(n,t){let e=k.encode(n);return t.set(e),{read:n.length,written:e.length}});var f=0,ct=`${__dirname}/mq_wasm_bg.wasm`,at=C("fs").readFileSync(ct),ut=new WebAssembly.Module(at),_=new WebAssembly.Instance(ut,X()).exports});var u=L(V()),h={run:u.run,toAst:u.toAst,format:u.format,diagnostics:u.diagnostics,inlayHints:u.inlayHints,definedValues:u.definedValues,htmlToMarkdown:u.htmlToMarkdown,toHtml:u.toHtml};async function gt(n,t,e={}){return await h.run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function bt(n){return await h.toAst(n)}async function lt(n){return await h.format(n)}async function wt(n,t){return await h.diagnostics(n,t)}async function pt(n){return await h.inlayHints(n)}async function mt(n,t){return await h.definedValues(n,t)}async function yt(n,t){return await h.htmlToMarkdown(n,t)}async function ht(n){return await h.toHtml(n)}export{mt as definedValues,wt as diagnostics,lt as format,yt as htmlToMarkdown,pt as inlayHints,gt as run,bt as toAst,ht as toHtml};
@@ -0,0 +1 @@
1
+ export { D as DefinedValue, a as DefinedValueType, b as Diagnostic, I as InlayHint, O as Options, definedValues, diagnostics, format, htmlToMarkdown, inlayHints, run, toAst, toHtml } from './core.mjs';
@@ -0,0 +1 @@
1
+ export { D as DefinedValue, a as DefinedValueType, b as Diagnostic, I as InlayHint, O as Options, definedValues, diagnostics, format, htmlToMarkdown, inlayHints, run, toAst, toHtml } from './core.js';
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";var $=Object.create;var O=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,G=Object.prototype.hasOwnProperty;var J=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),K=(n,t)=>{for(var e in t)O(n,e,{get:t[e],enumerable:!0})},j=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of B(t))!G.call(n,o)&&o!==e&&O(n,o,{get:()=>t[o],enumerable:!(r=z(t,o))||r.enumerable});return n};var Q=(n,t,e)=>(e=n!=null?$(N(n)):{},j(t||!n||!n.__esModule?O(e,"default",{value:n,enumerable:!0}):e,n)),X=n=>j(O({},"__esModule",{value:!0}),n);var D=J(w=>{"use strict";var A=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,at.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return _.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return _.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return _.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){_.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){_.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){_.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(A.prototype[Symbol.dispose]=A.prototype.free);w.ConversionOptions=A;var M=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ut.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);w.RunOptions=M;function Y(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f;var o=l(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=f;let s=_.definedValues(e,r,o,c);return g(s)}w.definedValues=Y;function Z(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=_.diagnostics(e,r,l(t)?16777215:t?1:0);return g(o)}w.diagnostics=Z;function tt(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.format(t,e);return g(r)}w.format=tt;function nt(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=0;l(t)||(ft(t,A),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(e,r,o);return g(c)}w.htmlToMarkdown=nt;function et(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.inlayHints(t,e);return g(r)}w.inlayHints=et;function rt(n,t,e){let r=b(n,_.__wbindgen_export,_.__wbindgen_export2),o=f,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),s=f,d=_.run(r,o,c,s,a(e));return g(d)}w.run=rt;function ot(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toAst(t,e);return g(r)}w.toAst=ot;function _t(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toHtml(t,e);return g(r)}w.toHtml=_t;function it(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_2e59b1b37a9a34c3:function(t,e){let r=Error(S(t,e));return a(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_a86c216575a75c30:function(t){let e=i(t),r=typeof e=="boolean"?e:void 0;return l(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_dd5d2d07ce9e6c57:function(t,e){let r=T(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_4bd7a57e54337366:function(t,e){return i(t)in i(e)},__wbg___wbindgen_is_function_49868bde5eb1e745:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_40c5a80572e8f9d3:function(t){let e=i(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_b29b5c5a8065ba1a:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_c0cca72b82b86f4d:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944:function(t,e){return i(t)==i(e)},__wbg___wbindgen_number_get_7579aab02a8a620c:function(t,e){let r=i(e),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,l(o)?0:o,!0),p().setInt32(t+0,!l(o),!0)},__wbg___wbindgen_string_get_914df97fcfa788f2:function(t,e){let r=i(e),o=typeof r=="string"?r:void 0;var c=l(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),s=f;p().setInt32(t+4,s,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_81fc77679af83bc6:function(t,e){throw new Error(S(t,e))},__wbg__wbg_cb_unref_3c3b4f651835fbcb:function(t){i(t)._wbg_cb_unref()},__wbg_call_d578befcc3145dee:function(){return bt(function(t,e,r){let o=i(t).call(i(e),i(r));return a(o)},arguments)},__wbg_entries_616b1a459b85be0b:function(t){let e=Object.entries(i(t));return a(e)},__wbg_get_4848e350b40afc16:function(t,e){let r=i(t)[e>>>0];return a(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=i(t)[i(e)];return a(r)},__wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a:function(t){let e;try{e=i(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_Uint8Array_4b8da683deb25d72:function(t){let e;try{e=i(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_length_0c32cb8543c8e4c8:function(t){return i(t).length},__wbg_length_6e821edde497a532:function(t){return i(t).length},__wbg_new_4f9fafbb3909af72:function(){let t=new Object;return a(t)},__wbg_new_a560378ea1240b14:function(t){let e=new Uint8Array(i(t));return a(e)},__wbg_new_f3c9df4f38f3f798:function(){let t=new Array;return a(t)},__wbg_new_typed_14d7cc391ce53d2c:function(t,e){try{var r={a:t,b:e},o=(s,d)=>{let y=r.a;r.a=0;try{return ct(y,r.b,s,d)}finally{r.a=y}};let c=new Promise(o);return a(c)}finally{r.a=0}},__wbg_prototypesetcall_3e05eb9545565046:function(t,e,r){Uint8Array.prototype.set.call(gt(t,e),i(r))},__wbg_queueMicrotask_abaf92f0bd4e80a4:function(t){let e=i(t).queueMicrotask;return a(e)},__wbg_queueMicrotask_df5a6dac26d818f3:function(t){queueMicrotask(i(t))},__wbg_resolve_0a79de24e9d2267b:function(t){let e=Promise.resolve(i(t));return a(e)},__wbg_set_6be42768c690e380:function(t,e,r){i(t)[g(e)]=g(r)},__wbg_set_6c60b2e8ad0e9383:function(t,e,r){i(t)[e>>>0]=g(r)},__wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:a(t)},__wbg_static_accessor_GLOBAL_f2e0f995a21329ff:function(){let t=typeof global>"u"?null:global;return l(t)?0:a(t)},__wbg_static_accessor_SELF_24f78b6d23f286ea:function(){let t=typeof self>"u"?null:self;return l(t)?0:a(t)},__wbg_static_accessor_WINDOW_59fd959c540fe405:function(){let t=typeof window>"u"?null:window;return l(t)?0:a(t)},__wbg_then_a0c8db0381c8994c:function(t,e){let r=i(t).then(i(e));return a(r)},__wbindgen_cast_0000000000000001:function(t,e){let r=lt(t,e,st);return a(r)},__wbindgen_cast_0000000000000002:function(t){return a(t)},__wbindgen_cast_0000000000000003:function(t,e){let r=S(t,e);return a(r)},__wbindgen_object_clone_ref:function(t){let e=i(t);return a(e)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function st(n,t,e){try{let c=_.__wbindgen_add_to_stack_pointer(-16);_.__wasm_bindgen_func_elem_689(c,n,t,a(e));var r=p().getInt32(c+0,!0),o=p().getInt32(c+4,!0);if(o)throw g(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}function ct(n,t,e,r){_.__wasm_bindgen_func_elem_985(n,t,a(e),a(r))}var at=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_conversionoptions_free(n>>>0,1)),ut=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_runoptions_free(n>>>0,1));function a(n){I===m.length&&m.push(m.length+1);let t=I;return I=m[t],m[t]=n,t}function ft(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}var P=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbindgen_export4(n.a,n.b));function T(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=T(n[0]));for(let s=1;s<o;s++)c+=", "+T(n[s]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
2
+ ${n.stack}`:r}function dt(n){n<1028||(m[n]=I,I=n)}function gt(n,t){return n=n>>>0,F().subarray(n/1,n/1+t)}var x=null;function p(){return(x===null||x.buffer.detached===!0||x.buffer.detached===void 0&&x.buffer!==_.memory.buffer)&&(x=new DataView(_.memory.buffer)),x}function S(n,t){return n=n>>>0,wt(n,t)}var H=null;function F(){return(H===null||H.byteLength===0)&&(H=new Uint8Array(_.memory.buffer)),H}function i(n){return m[n]}function bt(n,t){try{return n.apply(this,t)}catch(e){_.__wbindgen_export3(a(e))}}var m=new Array(1024).fill(void 0);m.push(void 0,null,!0,!1);var I=m.length;function l(n){return n==null}function lt(n,t,e){let r={a:n,b:t,cnt:1},o=(...c)=>{r.cnt++;let s=r.a;r.a=0;try{return e(s,r.b,...c)}finally{r.a=s,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{--r.cnt===0&&(_.__wbindgen_export4(r.a,r.b),r.a=0,P.unregister(r))},P.register(o,r,r),o}function b(n,t,e){if(e===void 0){let d=k.encode(n),y=t(d.length,1)>>>0;return F().subarray(y,y+d.length).set(d),f=d.length,y}let r=n.length,o=t(r,1)>>>0,c=F(),s=0;for(;s<r;s++){let d=n.charCodeAt(s);if(d>127)break;c[o+s]=d}if(s!==r){s!==0&&(n=n.slice(s)),o=e(o,r,r=s+n.length*3,1)>>>0;let d=F().subarray(o+s,o+r),y=k.encodeInto(n,d);s+=y.written,o=e(o,r,s,1)>>>0}return f=s,o}function g(n){let t=i(n);return dt(n),t}var V=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});V.decode();function wt(n,t){return V.decode(F().subarray(n,n+t))}var k=new TextEncoder;"encodeInto"in k||(k.encodeInto=function(n,t){let e=k.encode(n);return t.set(e),{read:n.length,written:e.length}});var f=0,pt=`${__dirname}/mq_wasm_bg.wasm`,mt=require("fs").readFileSync(pt),yt=new WebAssembly.Module(mt),_=new WebAssembly.Instance(yt,it()).exports});var ht={};K(ht,{definedValues:()=>C,diagnostics:()=>q,format:()=>U,htmlToMarkdown:()=>W,inlayHints:()=>v,run:()=>R,toAst:()=>E,toHtml:()=>L});module.exports=X(ht);var u=Q(D()),h={run:u.run,toAst:u.toAst,format:u.format,diagnostics:u.diagnostics,inlayHints:u.inlayHints,definedValues:u.definedValues,htmlToMarkdown:u.htmlToMarkdown,toHtml:u.toHtml};async function R(n,t,e={}){return await h.run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function E(n){return await h.toAst(n)}async function U(n){return await h.format(n)}async function q(n,t){return await h.diagnostics(n,t)}async function v(n){return await h.inlayHints(n)}async function C(n,t){return await h.definedValues(n,t)}async function W(n,t){return await h.htmlToMarkdown(n,t)}async function L(n){return await h.toHtml(n)}0&&(module.exports={definedValues,diagnostics,format,htmlToMarkdown,inlayHints,run,toAst,toHtml});
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ var D=Object.create;var T=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var v=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var C=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var W=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of E(t))!q.call(n,o)&&o!==e&&T(n,o,{get:()=>t[o],enumerable:!(r=R(t,o))||r.enumerable});return n};var L=(n,t,e)=>(e=n!=null?D(U(n)):{},W(t||!n||!n.__esModule?T(e,"default",{value:n,enumerable:!0}):e,n));var V=C(w=>{"use strict";var A=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,tt.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return _.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return _.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return _.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){_.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){_.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){_.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(A.prototype[Symbol.dispose]=A.prototype.free);w.ConversionOptions=A;var M=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,nt.unregister(this),t}free(){let t=this.__destroy_into_raw();_.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(M.prototype[Symbol.dispose]=M.prototype.free);w.RunOptions=M;function $(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f;var o=l(t)?0:b(t,_.__wbindgen_export,_.__wbindgen_export2),c=f;let s=_.definedValues(e,r,o,c);return g(s)}w.definedValues=$;function z(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=_.diagnostics(e,r,l(t)?16777215:t?1:0);return g(o)}w.diagnostics=z;function B(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.format(t,e);return g(r)}w.format=B;function N(n,t){let e=b(n,_.__wbindgen_export,_.__wbindgen_export2),r=f,o=0;l(t)||(et(t,A),o=t.__destroy_into_raw());let c=_.htmlToMarkdown(e,r,o);return g(c)}w.htmlToMarkdown=N;function G(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.inlayHints(t,e);return g(r)}w.inlayHints=G;function J(n,t,e){let r=b(n,_.__wbindgen_export,_.__wbindgen_export2),o=f,c=b(t,_.__wbindgen_export,_.__wbindgen_export2),s=f,d=_.run(r,o,c,s,a(e));return g(d)}w.run=J;function K(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toAst(t,e);return g(r)}w.toAst=K;function Q(n){let t=b(n,_.__wbindgen_export,_.__wbindgen_export2),e=f,r=_.toHtml(t,e);return g(r)}w.toHtml=Q;function X(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_2e59b1b37a9a34c3:function(t,e){let r=Error(H(t,e));return a(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_a86c216575a75c30:function(t){let e=i(t),r=typeof e=="boolean"?e:void 0;return l(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_dd5d2d07ce9e6c57:function(t,e){let r=S(i(e)),o=b(r,_.__wbindgen_export,_.__wbindgen_export2),c=f;p().setInt32(t+4,c,!0),p().setInt32(t+0,o,!0)},__wbg___wbindgen_in_4bd7a57e54337366:function(t,e){return i(t)in i(e)},__wbg___wbindgen_is_function_49868bde5eb1e745:function(t){return typeof i(t)=="function"},__wbg___wbindgen_is_object_40c5a80572e8f9d3:function(t){let e=i(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_b29b5c5a8065ba1a:function(t){return typeof i(t)=="string"},__wbg___wbindgen_is_undefined_c0cca72b82b86f4d:function(t){return i(t)===void 0},__wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944:function(t,e){return i(t)==i(e)},__wbg___wbindgen_number_get_7579aab02a8a620c:function(t,e){let r=i(e),o=typeof r=="number"?r:void 0;p().setFloat64(t+8,l(o)?0:o,!0),p().setInt32(t+0,!l(o),!0)},__wbg___wbindgen_string_get_914df97fcfa788f2:function(t,e){let r=i(e),o=typeof r=="string"?r:void 0;var c=l(o)?0:b(o,_.__wbindgen_export,_.__wbindgen_export2),s=f;p().setInt32(t+4,s,!0),p().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_81fc77679af83bc6:function(t,e){throw new Error(H(t,e))},__wbg__wbg_cb_unref_3c3b4f651835fbcb:function(t){i(t)._wbg_cb_unref()},__wbg_call_d578befcc3145dee:function(){return _t(function(t,e,r){let o=i(t).call(i(e),i(r));return a(o)},arguments)},__wbg_entries_616b1a459b85be0b:function(t){let e=Object.entries(i(t));return a(e)},__wbg_get_4848e350b40afc16:function(t,e){let r=i(t)[e>>>0];return a(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=i(t)[i(e)];return a(r)},__wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a:function(t){let e;try{e=i(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_Uint8Array_4b8da683deb25d72:function(t){let e;try{e=i(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_length_0c32cb8543c8e4c8:function(t){return i(t).length},__wbg_length_6e821edde497a532:function(t){return i(t).length},__wbg_new_4f9fafbb3909af72:function(){let t=new Object;return a(t)},__wbg_new_a560378ea1240b14:function(t){let e=new Uint8Array(i(t));return a(e)},__wbg_new_f3c9df4f38f3f798:function(){let t=new Array;return a(t)},__wbg_new_typed_14d7cc391ce53d2c:function(t,e){try{var r={a:t,b:e},o=(s,d)=>{let y=r.a;r.a=0;try{return Z(y,r.b,s,d)}finally{r.a=y}};let c=new Promise(o);return a(c)}finally{r.a=0}},__wbg_prototypesetcall_3e05eb9545565046:function(t,e,r){Uint8Array.prototype.set.call(ot(t,e),i(r))},__wbg_queueMicrotask_abaf92f0bd4e80a4:function(t){let e=i(t).queueMicrotask;return a(e)},__wbg_queueMicrotask_df5a6dac26d818f3:function(t){queueMicrotask(i(t))},__wbg_resolve_0a79de24e9d2267b:function(t){let e=Promise.resolve(i(t));return a(e)},__wbg_set_6be42768c690e380:function(t,e,r){i(t)[g(e)]=g(r)},__wbg_set_6c60b2e8ad0e9383:function(t,e,r){i(t)[e>>>0]=g(r)},__wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:a(t)},__wbg_static_accessor_GLOBAL_f2e0f995a21329ff:function(){let t=typeof global>"u"?null:global;return l(t)?0:a(t)},__wbg_static_accessor_SELF_24f78b6d23f286ea:function(){let t=typeof self>"u"?null:self;return l(t)?0:a(t)},__wbg_static_accessor_WINDOW_59fd959c540fe405:function(){let t=typeof window>"u"?null:window;return l(t)?0:a(t)},__wbg_then_a0c8db0381c8994c:function(t,e){let r=i(t).then(i(e));return a(r)},__wbindgen_cast_0000000000000001:function(t,e){let r=it(t,e,Y);return a(r)},__wbindgen_cast_0000000000000002:function(t){return a(t)},__wbindgen_cast_0000000000000003:function(t,e){let r=H(t,e);return a(r)},__wbindgen_object_clone_ref:function(t){let e=i(t);return a(e)},__wbindgen_object_drop_ref:function(t){g(t)}}}}function Y(n,t,e){try{let c=_.__wbindgen_add_to_stack_pointer(-16);_.__wasm_bindgen_func_elem_689(c,n,t,a(e));var r=p().getInt32(c+0,!0),o=p().getInt32(c+4,!0);if(o)throw g(r)}finally{_.__wbindgen_add_to_stack_pointer(16)}}function Z(n,t,e,r){_.__wasm_bindgen_func_elem_985(n,t,a(e),a(r))}var tt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_conversionoptions_free(n>>>0,1)),nt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbg_runoptions_free(n>>>0,1));function a(n){I===m.length&&m.push(m.length+1);let t=I;return I=m[t],m[t]=n,t}function et(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}var j=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_.__wbindgen_export4(n.a,n.b));function S(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=S(n[0]));for(let s=1;s<o;s++)c+=", "+S(n[s]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
2
+ ${n.stack}`:r}function rt(n){n<1028||(m[n]=I,I=n)}function ot(n,t){return n=n>>>0,F().subarray(n/1,n/1+t)}var x=null;function p(){return(x===null||x.buffer.detached===!0||x.buffer.detached===void 0&&x.buffer!==_.memory.buffer)&&(x=new DataView(_.memory.buffer)),x}function H(n,t){return n=n>>>0,st(n,t)}var O=null;function F(){return(O===null||O.byteLength===0)&&(O=new Uint8Array(_.memory.buffer)),O}function i(n){return m[n]}function _t(n,t){try{return n.apply(this,t)}catch(e){_.__wbindgen_export3(a(e))}}var m=new Array(1024).fill(void 0);m.push(void 0,null,!0,!1);var I=m.length;function l(n){return n==null}function it(n,t,e){let r={a:n,b:t,cnt:1},o=(...c)=>{r.cnt++;let s=r.a;r.a=0;try{return e(s,r.b,...c)}finally{r.a=s,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{--r.cnt===0&&(_.__wbindgen_export4(r.a,r.b),r.a=0,j.unregister(r))},j.register(o,r,r),o}function b(n,t,e){if(e===void 0){let d=k.encode(n),y=t(d.length,1)>>>0;return F().subarray(y,y+d.length).set(d),f=d.length,y}let r=n.length,o=t(r,1)>>>0,c=F(),s=0;for(;s<r;s++){let d=n.charCodeAt(s);if(d>127)break;c[o+s]=d}if(s!==r){s!==0&&(n=n.slice(s)),o=e(o,r,r=s+n.length*3,1)>>>0;let d=F().subarray(o+s,o+r),y=k.encodeInto(n,d);s+=y.written,o=e(o,r,s,1)>>>0}return f=s,o}function g(n){let t=i(n);return rt(n),t}var P=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});P.decode();function st(n,t){return P.decode(F().subarray(n,n+t))}var k=new TextEncoder;"encodeInto"in k||(k.encodeInto=function(n,t){let e=k.encode(n);return t.set(e),{read:n.length,written:e.length}});var f=0,ct=`${__dirname}/mq_wasm_bg.wasm`,at=v("fs").readFileSync(ct),ut=new WebAssembly.Module(at),_=new WebAssembly.Instance(ut,X()).exports});var u=L(V()),h={run:u.run,toAst:u.toAst,format:u.format,diagnostics:u.diagnostics,inlayHints:u.inlayHints,definedValues:u.definedValues,htmlToMarkdown:u.htmlToMarkdown,toHtml:u.toHtml};async function ft(n,t,e={}){return await h.run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function dt(n){return await h.toAst(n)}async function gt(n){return await h.format(n)}async function bt(n,t){return await h.diagnostics(n,t)}async function lt(n){return await h.inlayHints(n)}async function wt(n,t){return await h.definedValues(n,t)}async function pt(n,t){return await h.htmlToMarkdown(n,t)}async function mt(n){return await h.toHtml(n)}export{wt as definedValues,bt as diagnostics,gt as format,pt as htmlToMarkdown,lt as inlayHints,ft as run,dt as toAst,mt as toHtml};