mq-web 0.5.17 → 0.5.18
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/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/mq_wasm.js +23 -11
- package/dist/mq_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/dist/core.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var j=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var C=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{for(var e in t)j(n,e,{get:t[e],enumerable:!0})},$=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of B(t))!q.call(n,o)&&o!==e&&j(n,o,{get:()=>t[o],enumerable:!(r=L(t,o))||r.enumerable});return n};var N=n=>$(j({},"__esModule",{value:!0}),n);var
|
|
2
|
-
${n.stack}`:r}function
|
|
1
|
+
"use strict";var j=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var C=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{for(var e in t)j(n,e,{get:t[e],enumerable:!0})},$=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of B(t))!q.call(n,o)&&o!==e&&j(n,o,{get:()=>t[o],enumerable:!(r=L(t,o))||r.enumerable});return n};var N=n=>$(j({},"__esModule",{value:!0}),n);var z={};P(z,{ConversionOptions:()=>h,RunOptions:()=>O,default:()=>R,definedValues:()=>G,diagnostics:()=>J,format:()=>X,htmlToMarkdown:()=>Y,initSync:()=>gt,inlayHints:()=>K,run:()=>Q,toAst:()=>Z,toHtml:()=>tt});function G(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u;var o=w(t)?0:g(t,i.__wbindgen_export,i.__wbindgen_export2),c=u;let a=i.definedValues(e,r,o,c);return b(a)}function J(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=i.diagnostics(e,r,w(t)?16777215:t?1:0);return b(o)}function X(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.format(t,e);return b(r)}function Y(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=0;w(t)||(_t(t,h),o=t.__destroy_into_raw());let c=i.htmlToMarkdown(e,r,o);return b(c)}function K(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.inlayHints(t,e);return b(r)}function Q(n,t,e){let r=g(n,i.__wbindgen_export,i.__wbindgen_export2),o=u,c=g(t,i.__wbindgen_export,i.__wbindgen_export2),a=u,f=i.run(r,o,c,a,s(e));return b(f)}function Z(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toAst(t,e);return b(r)}function tt(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toHtml(t,e);return b(r)}function U(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_83742b46f01ce22d:function(t,e){let r=Error(W(t,e));return s(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1:function(t){let e=_(t),r=typeof e=="boolean"?e:void 0;return w(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_5398f5bb970e0daa:function(t,e){let r=I(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_in_41dbb8413020e076:function(t,e){return _(t)in _(e)},__wbg___wbindgen_is_function_3c846841762788c1:function(t){return typeof _(t)=="function"},__wbg___wbindgen_is_object_781bc9f159099513:function(t){let e=_(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_7ef6b97b02428fae:function(t){return typeof _(t)=="string"},__wbg___wbindgen_is_undefined_52709e72fb9f179c:function(t){return _(t)===void 0},__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b:function(t,e){return _(t)==_(e)},__wbg___wbindgen_number_get_34bb9d9dcfa21373:function(t,e){let r=_(e),o=typeof r=="number"?r:void 0;d().setFloat64(t+8,w(o)?0:o,!0),d().setInt32(t+0,!w(o),!0)},__wbg___wbindgen_string_get_395e606bd0ee4427:function(t,e){let r=_(e),o=typeof r=="string"?r:void 0;var c=w(o)?0:g(o,i.__wbindgen_export,i.__wbindgen_export2),a=u;d().setInt32(t+4,a,!0),d().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_6ddd609b62940d55:function(t,e){throw new Error(W(t,e))},__wbg__wbg_cb_unref_6b5b6b8576d35cb1:function(t){_(t)._wbg_cb_unref()},__wbg_arrayBuffer_7ff5e58aa85a64f7:function(t){let e=_(t).arrayBuffer();return s(e)},__wbg_call_2d781c1f4d5c0ef8:function(){return E(function(t,e,r){let o=_(t).call(_(e),_(r));return s(o)},arguments)},__wbg_done_08ce71ee07e3bd17:function(t){return _(t).done},__wbg_entries_310f5926c32b5bcb:function(t){let e=_(t).entries();return s(e)},__wbg_entries_e8a20ff8c9757101:function(t){let e=Object.entries(_(t));return s(e)},__wbg_from_4bdf88943703fd48:function(t){let e=Array.from(_(t));return s(e)},__wbg_getDirectory_2406d369de179ff0:function(t){let e=_(t).getDirectory();return s(e)},__wbg_getFile_30341f4730c33225:function(t){let e=_(t).getFile();return s(e)},__wbg_get_a8ee5c45dabc1b3b:function(t,e){let r=_(t)[e>>>0];return s(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=_(t)[_(e)];return s(r)},__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6:function(t){let e;try{e=_(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_FileSystemDirectoryHandle_2944d0641b4ea10c:function(t){let e;try{e=_(t)instanceof FileSystemDirectoryHandle}catch{e=!1}return e},__wbg_instanceof_FileSystemFileHandle_37ac45c6adcff28f:function(t){let e;try{e=_(t)instanceof FileSystemFileHandle}catch{e=!1}return e},__wbg_instanceof_Uint8Array_740438561a5b956d:function(t){let e;try{e=_(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_instanceof_Window_23e677d2c6843922:function(t){let e;try{e=_(t)instanceof Window}catch{e=!1}return e},__wbg_length_b3416cf66a5452c8:function(t){return _(t).length},__wbg_length_ea16607d7b61445b:function(t){return _(t).length},__wbg_navigator_9cebf56f28aa719b:function(t){let e=_(t).navigator;return s(e)},__wbg_new_5f486cdf45a04d78:function(t){let e=new Uint8Array(_(t));return s(e)},__wbg_new_a70fbab9066b301f:function(){let t=new Array;return s(t)},__wbg_new_ab79df5bd7c26067:function(){let t=new Object;return s(t)},__wbg_new_typed_aaaeaf29cf802876:function(t,e){try{var r={a:t,b:e},o=(a,f)=>{let p=r.a;r.a=0;try{return rt(p,r.b,a,f)}finally{r.a=p}};let c=new Promise(o);return s(c)}finally{r.a=r.b=0}},__wbg_next_9c645ba5e1273237:function(){return E(function(t){let e=_(t).next();return s(e)},arguments)},__wbg_prototypesetcall_d62e5099504357e6:function(t,e,r){Uint8Array.prototype.set.call(ct(t,e),_(r))},__wbg_queueMicrotask_0c399741342fb10f:function(t){let e=_(t).queueMicrotask;return s(e)},__wbg_queueMicrotask_a082d78ce798393e:function(t){queueMicrotask(_(t))},__wbg_resolve_ae8d83246e5bcc12:function(t){let e=Promise.resolve(_(t));return s(e)},__wbg_set_282384002438957f:function(t,e,r){_(t)[e>>>0]=b(r)},__wbg_set_6be42768c690e380:function(t,e,r){_(t)[b(e)]=b(r)},__wbg_size_819df95195daae81:function(t){return _(t).size},__wbg_static_accessor_GLOBAL_8adb955bd33fac2f:function(){let t=typeof global>"u"?null:global;return w(t)?0:s(t)},__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913:function(){let t=typeof globalThis>"u"?null:globalThis;return w(t)?0:s(t)},__wbg_static_accessor_SELF_f207c857566db248:function(){let t=typeof self>"u"?null:self;return w(t)?0:s(t)},__wbg_static_accessor_WINDOW_bb9f1ba69d61b386:function(){let t=typeof window>"u"?null:window;return w(t)?0:s(t)},__wbg_storage_63fa6fa9455d2153:function(t){let e=_(t).storage;return s(e)},__wbg_then_098abe61755d12f6:function(t,e){let r=_(t).then(_(e));return s(r)},__wbg_then_9e335f6dd892bc11:function(t,e,r){let o=_(t).then(_(e),_(r));return s(o)},__wbg_value_21fc78aab0322612:function(t){let e=_(t).value;return s(e)},__wbindgen_cast_0000000000000001:function(t,e){let r=H(t,e,i.__wasm_bindgen_func_elem_135,nt);return s(r)},__wbindgen_cast_0000000000000002:function(t,e){let r=H(t,e,i.__wasm_bindgen_func_elem_135,et);return s(r)},__wbindgen_cast_0000000000000003:function(t){return s(t)},__wbindgen_cast_0000000000000004:function(t,e){let r=W(t,e);return s(r)},__wbindgen_object_clone_ref:function(t){let e=_(t);return s(e)},__wbindgen_object_drop_ref:function(t){b(t)}}}}function nt(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function et(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136_1(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function rt(n,t,e,r){i.__wasm_bindgen_func_elem_967(n,t,s(e),s(r))}function s(n){F===l.length&&l.push(l.length+1);let t=F;return F=l[t],l[t]=n,t}function _t(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function I(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+=I(n[0]));for(let a=1;a<o;a++)c+=", "+I(n[a]);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 st(n){n<1028||(l[n]=F,F=n)}function ct(n,t){return n=n>>>0,A().subarray(n/1,n/1+t)}function d(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==i.memory.buffer)&&(y=new DataView(i.memory.buffer)),y}function W(n,t){return n=n>>>0,ft(n,t)}function A(){return(x===null||x.byteLength===0)&&(x=new Uint8Array(i.memory.buffer)),x}function _(n){return l[n]}function E(n,t){try{return n.apply(this,t)}catch(e){i.__wbindgen_export3(s(e))}}function w(n){return n==null}function H(n,t,e,r){let o={a:n,b:t,cnt:1,dtor:e},c=(...a)=>{o.cnt++;let f=o.a;o.a=0;try{return r(f,o.b,...a)}finally{o.a=f,c._wbg_cb_unref()}};return c._wbg_cb_unref=()=>{--o.cnt===0&&(o.dtor(o.a,o.b),o.a=0,v.unregister(o))},v.register(c,o,o),c}function g(n,t,e){if(e===void 0){let f=S.encode(n),p=t(f.length,1)>>>0;return A().subarray(p,p+f.length).set(f),u=f.length,p}let r=n.length,o=t(r,1)>>>0,c=A(),a=0;for(;a<r;a++){let f=n.charCodeAt(a);if(f>127)break;c[o+a]=f}if(a!==r){a!==0&&(n=n.slice(a)),o=e(o,r,r=a+n.length*3,1)>>>0;let f=A().subarray(o+a,o+r),p=S.encodeInto(n,f);a+=p.written,o=e(o,r,a,1)>>>0}return u=a,o}function b(n){let t=_(n);return st(n),t}function ft(n,t){return T+=t,T>=at&&(M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),M.decode(),T=t),M.decode(A().subarray(n,n+t))}function V(n,t){return i=n.exports,ut=t,y=null,x=null,i}async function bt(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(o){if(n.ok&&e(n.type)&&n.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",o);else throw o}let r=await n.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(n,t);return r instanceof WebAssembly.Instance?{instance:r,module:n}:r}function e(r){switch(r){case"basic":case"cors":case"default":return!0}return!1}}function gt(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=U();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let e=new WebAssembly.Instance(n,t);return V(e,n)}async function R(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),n===void 0&&(n=new URL("mq_wasm_bg.wasm",dt.url));let t=U();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:e,module:r}=await bt(await n,t);return V(e,r)}var dt,h,O,ot,it,v,y,x,l,F,M,at,T,S,u,ut,i,D=C(()=>{"use strict";dt={},h=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ot.unregister(this),t}free(){let t=this.__destroy_into_raw();i.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return i.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return i.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return i.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){i.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){i.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){i.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(h.prototype[Symbol.dispose]=h.prototype.free);O=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,it.unregister(this),t}free(){let t=this.__destroy_into_raw();i.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);ot=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_conversionoptions_free(n>>>0,1)),it=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_runoptions_free(n>>>0,1));v=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));y=null;x=null;l=new Array(1024).fill(void 0);l.push(void 0,null,!0,!1);F=l.length;M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});M.decode();at=2146435072,T=0;S=new TextEncoder;"encodeInto"in S||(S.encodeInto=function(n,t){let e=S.encode(n);return t.set(e),{read:n.length,written:e.length}});u=0});var At={};P(At,{definedValues:()=>mt,diagnostics:()=>yt,format:()=>pt,htmlToMarkdown:()=>ht,run:()=>wt,toAst:()=>lt,toHtml:()=>xt});module.exports=N(At);D();var k=null;async function m(){return k||(await(async()=>{try{await R();let n=await Promise.resolve().then(()=>(D(),z));k={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,definedValues:n.definedValues,htmlToMarkdown:n.htmlToMarkdown,toHtml:n.toHtml}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),k)}async function wt(n,t,e={}){return await(await m()).run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function lt(n){return await(await m()).toAst(n)}async function pt(n){return await(await m()).format(n)}async function yt(n){return await(await m()).diagnostics(n)}async function mt(n,t){return await(await m()).definedValues(n,t)}async function ht(n,t){return await(await m()).htmlToMarkdown(n,t)}async function xt(n){return await(await m()).toHtml(n)}0&&(module.exports={definedValues,diagnostics,format,htmlToMarkdown,run,toAst,toHtml});
|
package/dist/core.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
${n.stack}`:r}function
|
|
1
|
+
var V=Object.defineProperty;var z=(n,t)=>()=>(n&&(t=n(n=0)),t);var L=(n,t)=>{for(var e in t)V(n,e,{get:t[e],enumerable:!0})};var U={};L(U,{ConversionOptions:()=>h,RunOptions:()=>O,default:()=>I,definedValues:()=>B,diagnostics:()=>q,format:()=>C,htmlToMarkdown:()=>$,initSync:()=>ct,inlayHints:()=>N,run:()=>G,toAst:()=>J,toHtml:()=>X});function B(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u;var o=w(t)?0:g(t,i.__wbindgen_export,i.__wbindgen_export2),c=u;let a=i.definedValues(e,r,o,c);return b(a)}function q(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=i.diagnostics(e,r,w(t)?16777215:t?1:0);return b(o)}function C(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.format(t,e);return b(r)}function $(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=0;w(t)||(nt(t,h),o=t.__destroy_into_raw());let c=i.htmlToMarkdown(e,r,o);return b(c)}function N(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.inlayHints(t,e);return b(r)}function G(n,t,e){let r=g(n,i.__wbindgen_export,i.__wbindgen_export2),o=u,c=g(t,i.__wbindgen_export,i.__wbindgen_export2),a=u,f=i.run(r,o,c,a,s(e));return b(f)}function J(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toAst(t,e);return b(r)}function X(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toHtml(t,e);return b(r)}function E(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_83742b46f01ce22d:function(t,e){let r=Error(j(t,e));return s(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1:function(t){let e=_(t),r=typeof e=="boolean"?e:void 0;return w(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_5398f5bb970e0daa:function(t,e){let r=T(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_in_41dbb8413020e076:function(t,e){return _(t)in _(e)},__wbg___wbindgen_is_function_3c846841762788c1:function(t){return typeof _(t)=="function"},__wbg___wbindgen_is_object_781bc9f159099513:function(t){let e=_(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_7ef6b97b02428fae:function(t){return typeof _(t)=="string"},__wbg___wbindgen_is_undefined_52709e72fb9f179c:function(t){return _(t)===void 0},__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b:function(t,e){return _(t)==_(e)},__wbg___wbindgen_number_get_34bb9d9dcfa21373:function(t,e){let r=_(e),o=typeof r=="number"?r:void 0;d().setFloat64(t+8,w(o)?0:o,!0),d().setInt32(t+0,!w(o),!0)},__wbg___wbindgen_string_get_395e606bd0ee4427:function(t,e){let r=_(e),o=typeof r=="string"?r:void 0;var c=w(o)?0:g(o,i.__wbindgen_export,i.__wbindgen_export2),a=u;d().setInt32(t+4,a,!0),d().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_6ddd609b62940d55:function(t,e){throw new Error(j(t,e))},__wbg__wbg_cb_unref_6b5b6b8576d35cb1:function(t){_(t)._wbg_cb_unref()},__wbg_arrayBuffer_7ff5e58aa85a64f7:function(t){let e=_(t).arrayBuffer();return s(e)},__wbg_call_2d781c1f4d5c0ef8:function(){return P(function(t,e,r){let o=_(t).call(_(e),_(r));return s(o)},arguments)},__wbg_done_08ce71ee07e3bd17:function(t){return _(t).done},__wbg_entries_310f5926c32b5bcb:function(t){let e=_(t).entries();return s(e)},__wbg_entries_e8a20ff8c9757101:function(t){let e=Object.entries(_(t));return s(e)},__wbg_from_4bdf88943703fd48:function(t){let e=Array.from(_(t));return s(e)},__wbg_getDirectory_2406d369de179ff0:function(t){let e=_(t).getDirectory();return s(e)},__wbg_getFile_30341f4730c33225:function(t){let e=_(t).getFile();return s(e)},__wbg_get_a8ee5c45dabc1b3b:function(t,e){let r=_(t)[e>>>0];return s(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=_(t)[_(e)];return s(r)},__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6:function(t){let e;try{e=_(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_FileSystemDirectoryHandle_2944d0641b4ea10c:function(t){let e;try{e=_(t)instanceof FileSystemDirectoryHandle}catch{e=!1}return e},__wbg_instanceof_FileSystemFileHandle_37ac45c6adcff28f:function(t){let e;try{e=_(t)instanceof FileSystemFileHandle}catch{e=!1}return e},__wbg_instanceof_Uint8Array_740438561a5b956d:function(t){let e;try{e=_(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_instanceof_Window_23e677d2c6843922:function(t){let e;try{e=_(t)instanceof Window}catch{e=!1}return e},__wbg_length_b3416cf66a5452c8:function(t){return _(t).length},__wbg_length_ea16607d7b61445b:function(t){return _(t).length},__wbg_navigator_9cebf56f28aa719b:function(t){let e=_(t).navigator;return s(e)},__wbg_new_5f486cdf45a04d78:function(t){let e=new Uint8Array(_(t));return s(e)},__wbg_new_a70fbab9066b301f:function(){let t=new Array;return s(t)},__wbg_new_ab79df5bd7c26067:function(){let t=new Object;return s(t)},__wbg_new_typed_aaaeaf29cf802876:function(t,e){try{var r={a:t,b:e},o=(a,f)=>{let p=r.a;r.a=0;try{return Q(p,r.b,a,f)}finally{r.a=p}};let c=new Promise(o);return s(c)}finally{r.a=r.b=0}},__wbg_next_9c645ba5e1273237:function(){return P(function(t){let e=_(t).next();return s(e)},arguments)},__wbg_prototypesetcall_d62e5099504357e6:function(t,e,r){Uint8Array.prototype.set.call(rt(t,e),_(r))},__wbg_queueMicrotask_0c399741342fb10f:function(t){let e=_(t).queueMicrotask;return s(e)},__wbg_queueMicrotask_a082d78ce798393e:function(t){queueMicrotask(_(t))},__wbg_resolve_ae8d83246e5bcc12:function(t){let e=Promise.resolve(_(t));return s(e)},__wbg_set_282384002438957f:function(t,e,r){_(t)[e>>>0]=b(r)},__wbg_set_6be42768c690e380:function(t,e,r){_(t)[b(e)]=b(r)},__wbg_size_819df95195daae81:function(t){return _(t).size},__wbg_static_accessor_GLOBAL_8adb955bd33fac2f:function(){let t=typeof global>"u"?null:global;return w(t)?0:s(t)},__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913:function(){let t=typeof globalThis>"u"?null:globalThis;return w(t)?0:s(t)},__wbg_static_accessor_SELF_f207c857566db248:function(){let t=typeof self>"u"?null:self;return w(t)?0:s(t)},__wbg_static_accessor_WINDOW_bb9f1ba69d61b386:function(){let t=typeof window>"u"?null:window;return w(t)?0:s(t)},__wbg_storage_63fa6fa9455d2153:function(t){let e=_(t).storage;return s(e)},__wbg_then_098abe61755d12f6:function(t,e){let r=_(t).then(_(e));return s(r)},__wbg_then_9e335f6dd892bc11:function(t,e,r){let o=_(t).then(_(e),_(r));return s(o)},__wbg_value_21fc78aab0322612:function(t){let e=_(t).value;return s(e)},__wbindgen_cast_0000000000000001:function(t,e){let r=v(t,e,i.__wasm_bindgen_func_elem_135,Y);return s(r)},__wbindgen_cast_0000000000000002:function(t,e){let r=v(t,e,i.__wasm_bindgen_func_elem_135,K);return s(r)},__wbindgen_cast_0000000000000003:function(t){return s(t)},__wbindgen_cast_0000000000000004:function(t,e){let r=j(t,e);return s(r)},__wbindgen_object_clone_ref:function(t){let e=_(t);return s(e)},__wbindgen_object_drop_ref:function(t){b(t)}}}}function Y(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function K(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136_1(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function Q(n,t,e,r){i.__wasm_bindgen_func_elem_967(n,t,s(e),s(r))}function s(n){F===l.length&&l.push(l.length+1);let t=F;return F=l[t],l[t]=n,t}function nt(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}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 a=1;a<o;a++)c+=", "+T(n[a]);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 et(n){n<1028||(l[n]=F,F=n)}function rt(n,t){return n=n>>>0,A().subarray(n/1,n/1+t)}function d(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==i.memory.buffer)&&(y=new DataView(i.memory.buffer)),y}function j(n,t){return n=n>>>0,it(n,t)}function A(){return(x===null||x.byteLength===0)&&(x=new Uint8Array(i.memory.buffer)),x}function _(n){return l[n]}function P(n,t){try{return n.apply(this,t)}catch(e){i.__wbindgen_export3(s(e))}}function w(n){return n==null}function v(n,t,e,r){let o={a:n,b:t,cnt:1,dtor:e},c=(...a)=>{o.cnt++;let f=o.a;o.a=0;try{return r(f,o.b,...a)}finally{o.a=f,c._wbg_cb_unref()}};return c._wbg_cb_unref=()=>{--o.cnt===0&&(o.dtor(o.a,o.b),o.a=0,D.unregister(o))},D.register(c,o,o),c}function g(n,t,e){if(e===void 0){let f=S.encode(n),p=t(f.length,1)>>>0;return A().subarray(p,p+f.length).set(f),u=f.length,p}let r=n.length,o=t(r,1)>>>0,c=A(),a=0;for(;a<r;a++){let f=n.charCodeAt(a);if(f>127)break;c[o+a]=f}if(a!==r){a!==0&&(n=n.slice(a)),o=e(o,r,r=a+n.length*3,1)>>>0;let f=A().subarray(o+a,o+r),p=S.encodeInto(n,f);a+=p.written,o=e(o,r,a,1)>>>0}return u=a,o}function b(n){let t=_(n);return et(n),t}function it(n,t){return W+=t,W>=ot&&(M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),M.decode(),W=t),M.decode(A().subarray(n,n+t))}function H(n,t){return i=n.exports,_t=t,y=null,x=null,i}async function st(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(o){if(n.ok&&e(n.type)&&n.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",o);else throw o}let r=await n.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(n,t);return r instanceof WebAssembly.Instance?{instance:r,module:n}:r}function e(r){switch(r){case"basic":case"cors":case"default":return!0}return!1}}function ct(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=E();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let e=new WebAssembly.Instance(n,t);return H(e,n)}async function I(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),n===void 0&&(n=new URL("mq_wasm_bg.wasm",import.meta.url));let t=E();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:e,module:r}=await st(await n,t);return H(e,r)}var h,O,Z,tt,D,y,x,l,F,M,ot,W,S,u,_t,i,R=z(()=>{"use strict";h=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),t}free(){let t=this.__destroy_into_raw();i.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return i.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return i.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return i.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){i.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){i.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){i.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(h.prototype[Symbol.dispose]=h.prototype.free);O=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();i.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);Z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_conversionoptions_free(n>>>0,1)),tt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_runoptions_free(n>>>0,1));D=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));y=null;x=null;l=new Array(1024).fill(void 0);l.push(void 0,null,!0,!1);F=l.length;M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});M.decode();ot=2146435072,W=0;S=new TextEncoder;"encodeInto"in S||(S.encodeInto=function(n,t){let e=S.encode(n);return t.set(e),{read:n.length,written:e.length}});u=0});R();var k=null;async function m(){return k||(await(async()=>{try{await I();let n=await Promise.resolve().then(()=>(R(),U));k={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,definedValues:n.definedValues,htmlToMarkdown:n.htmlToMarkdown,toHtml:n.toHtml}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),k)}async function wt(n,t,e={}){return await(await m()).run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function lt(n){return await(await m()).toAst(n)}async function pt(n){return await(await m()).format(n)}async function yt(n){return await(await m()).diagnostics(n)}async function mt(n,t){return await(await m()).definedValues(n,t)}async function ht(n,t){return await(await m()).htmlToMarkdown(n,t)}async function xt(n){return await(await m()).toHtml(n)}export{mt as definedValues,yt as diagnostics,pt as format,ht as htmlToMarkdown,wt as run,lt as toAst,xt as toHtml};
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var j=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var J=Object.prototype.hasOwnProperty;var X=(
|
|
2
|
-
${
|
|
1
|
+
"use strict";var j=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var J=Object.prototype.hasOwnProperty;var X=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{for(var e in t)j(n,e,{get:t[e],enumerable:!0})},Y=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of G(t))!J.call(n,o)&&o!==e&&j(n,o,{get:()=>t[o],enumerable:!(r=N(t,o))||r.enumerable});return n};var K=n=>Y(j({},"__esModule",{value:!0}),n);var z={};P(z,{ConversionOptions:()=>m,RunOptions:()=>O,default:()=>I,definedValues:()=>Q,diagnostics:()=>Z,format:()=>tt,htmlToMarkdown:()=>nt,initSync:()=>yt,inlayHints:()=>et,run:()=>rt,toAst:()=>ot,toHtml:()=>it});function Q(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u;var o=w(t)?0:g(t,i.__wbindgen_export,i.__wbindgen_export2),c=u;let a=i.definedValues(e,r,o,c);return b(a)}function Z(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=i.diagnostics(e,r,w(t)?16777215:t?1:0);return b(o)}function tt(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.format(t,e);return b(r)}function nt(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=0;w(t)||(ut(t,m),o=t.__destroy_into_raw());let c=i.htmlToMarkdown(e,r,o);return b(c)}function et(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.inlayHints(t,e);return b(r)}function rt(n,t,e){let r=g(n,i.__wbindgen_export,i.__wbindgen_export2),o=u,c=g(t,i.__wbindgen_export,i.__wbindgen_export2),a=u,f=i.run(r,o,c,a,s(e));return b(f)}function ot(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toAst(t,e);return b(r)}function it(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toHtml(t,e);return b(r)}function H(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_83742b46f01ce22d:function(t,e){let r=Error(D(t,e));return s(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1:function(t){let e=_(t),r=typeof e=="boolean"?e:void 0;return w(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_5398f5bb970e0daa:function(t,e){let r=W(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_in_41dbb8413020e076:function(t,e){return _(t)in _(e)},__wbg___wbindgen_is_function_3c846841762788c1:function(t){return typeof _(t)=="function"},__wbg___wbindgen_is_object_781bc9f159099513:function(t){let e=_(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_7ef6b97b02428fae:function(t){return typeof _(t)=="string"},__wbg___wbindgen_is_undefined_52709e72fb9f179c:function(t){return _(t)===void 0},__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b:function(t,e){return _(t)==_(e)},__wbg___wbindgen_number_get_34bb9d9dcfa21373:function(t,e){let r=_(e),o=typeof r=="number"?r:void 0;d().setFloat64(t+8,w(o)?0:o,!0),d().setInt32(t+0,!w(o),!0)},__wbg___wbindgen_string_get_395e606bd0ee4427:function(t,e){let r=_(e),o=typeof r=="string"?r:void 0;var c=w(o)?0:g(o,i.__wbindgen_export,i.__wbindgen_export2),a=u;d().setInt32(t+4,a,!0),d().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_6ddd609b62940d55:function(t,e){throw new Error(D(t,e))},__wbg__wbg_cb_unref_6b5b6b8576d35cb1:function(t){_(t)._wbg_cb_unref()},__wbg_arrayBuffer_7ff5e58aa85a64f7:function(t){let e=_(t).arrayBuffer();return s(e)},__wbg_call_2d781c1f4d5c0ef8:function(){return E(function(t,e,r){let o=_(t).call(_(e),_(r));return s(o)},arguments)},__wbg_done_08ce71ee07e3bd17:function(t){return _(t).done},__wbg_entries_310f5926c32b5bcb:function(t){let e=_(t).entries();return s(e)},__wbg_entries_e8a20ff8c9757101:function(t){let e=Object.entries(_(t));return s(e)},__wbg_from_4bdf88943703fd48:function(t){let e=Array.from(_(t));return s(e)},__wbg_getDirectory_2406d369de179ff0:function(t){let e=_(t).getDirectory();return s(e)},__wbg_getFile_30341f4730c33225:function(t){let e=_(t).getFile();return s(e)},__wbg_get_a8ee5c45dabc1b3b:function(t,e){let r=_(t)[e>>>0];return s(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=_(t)[_(e)];return s(r)},__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6:function(t){let e;try{e=_(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_FileSystemDirectoryHandle_2944d0641b4ea10c:function(t){let e;try{e=_(t)instanceof FileSystemDirectoryHandle}catch{e=!1}return e},__wbg_instanceof_FileSystemFileHandle_37ac45c6adcff28f:function(t){let e;try{e=_(t)instanceof FileSystemFileHandle}catch{e=!1}return e},__wbg_instanceof_Uint8Array_740438561a5b956d:function(t){let e;try{e=_(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_instanceof_Window_23e677d2c6843922:function(t){let e;try{e=_(t)instanceof Window}catch{e=!1}return e},__wbg_length_b3416cf66a5452c8:function(t){return _(t).length},__wbg_length_ea16607d7b61445b:function(t){return _(t).length},__wbg_navigator_9cebf56f28aa719b:function(t){let e=_(t).navigator;return s(e)},__wbg_new_5f486cdf45a04d78:function(t){let e=new Uint8Array(_(t));return s(e)},__wbg_new_a70fbab9066b301f:function(){let t=new Array;return s(t)},__wbg_new_ab79df5bd7c26067:function(){let t=new Object;return s(t)},__wbg_new_typed_aaaeaf29cf802876:function(t,e){try{var r={a:t,b:e},o=(a,f)=>{let p=r.a;r.a=0;try{return ct(p,r.b,a,f)}finally{r.a=p}};let c=new Promise(o);return s(c)}finally{r.a=r.b=0}},__wbg_next_9c645ba5e1273237:function(){return E(function(t){let e=_(t).next();return s(e)},arguments)},__wbg_prototypesetcall_d62e5099504357e6:function(t,e,r){Uint8Array.prototype.set.call(gt(t,e),_(r))},__wbg_queueMicrotask_0c399741342fb10f:function(t){let e=_(t).queueMicrotask;return s(e)},__wbg_queueMicrotask_a082d78ce798393e:function(t){queueMicrotask(_(t))},__wbg_resolve_ae8d83246e5bcc12:function(t){let e=Promise.resolve(_(t));return s(e)},__wbg_set_282384002438957f:function(t,e,r){_(t)[e>>>0]=b(r)},__wbg_set_6be42768c690e380:function(t,e,r){_(t)[b(e)]=b(r)},__wbg_size_819df95195daae81:function(t){return _(t).size},__wbg_static_accessor_GLOBAL_8adb955bd33fac2f:function(){let t=typeof global>"u"?null:global;return w(t)?0:s(t)},__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913:function(){let t=typeof globalThis>"u"?null:globalThis;return w(t)?0:s(t)},__wbg_static_accessor_SELF_f207c857566db248:function(){let t=typeof self>"u"?null:self;return w(t)?0:s(t)},__wbg_static_accessor_WINDOW_bb9f1ba69d61b386:function(){let t=typeof window>"u"?null:window;return w(t)?0:s(t)},__wbg_storage_63fa6fa9455d2153:function(t){let e=_(t).storage;return s(e)},__wbg_then_098abe61755d12f6:function(t,e){let r=_(t).then(_(e));return s(r)},__wbg_then_9e335f6dd892bc11:function(t,e,r){let o=_(t).then(_(e),_(r));return s(o)},__wbg_value_21fc78aab0322612:function(t){let e=_(t).value;return s(e)},__wbindgen_cast_0000000000000001:function(t,e){let r=V(t,e,i.__wasm_bindgen_func_elem_135,_t);return s(r)},__wbindgen_cast_0000000000000002:function(t,e){let r=V(t,e,i.__wasm_bindgen_func_elem_135,st);return s(r)},__wbindgen_cast_0000000000000003:function(t){return s(t)},__wbindgen_cast_0000000000000004:function(t,e){let r=D(t,e);return s(r)},__wbindgen_object_clone_ref:function(t){let e=_(t);return s(e)},__wbindgen_object_drop_ref:function(t){b(t)}}}}function _t(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function st(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136_1(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function ct(n,t,e,r){i.__wasm_bindgen_func_elem_967(n,t,s(e),s(r))}function s(n){A===l.length&&l.push(l.length+1);let t=A;return A=l[t],l[t]=n,t}function ut(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function W(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+=W(n[0]));for(let a=1;a<o;a++)c+=", "+W(n[a]);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 bt(n){n<1028||(l[n]=A,A=n)}function gt(n,t){return n=n>>>0,x().subarray(n/1,n/1+t)}function d(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==i.memory.buffer)&&(y=new DataView(i.memory.buffer)),y}function D(n,t){return n=n>>>0,wt(n,t)}function x(){return(h===null||h.byteLength===0)&&(h=new Uint8Array(i.memory.buffer)),h}function _(n){return l[n]}function E(n,t){try{return n.apply(this,t)}catch(e){i.__wbindgen_export3(s(e))}}function w(n){return n==null}function V(n,t,e,r){let o={a:n,b:t,cnt:1,dtor:e},c=(...a)=>{o.cnt++;let f=o.a;o.a=0;try{return r(f,o.b,...a)}finally{o.a=f,c._wbg_cb_unref()}};return c._wbg_cb_unref=()=>{--o.cnt===0&&(o.dtor(o.a,o.b),o.a=0,v.unregister(o))},v.register(c,o,o),c}function g(n,t,e){if(e===void 0){let f=F.encode(n),p=t(f.length,1)>>>0;return x().subarray(p,p+f.length).set(f),u=f.length,p}let r=n.length,o=t(r,1)>>>0,c=x(),a=0;for(;a<r;a++){let f=n.charCodeAt(a);if(f>127)break;c[o+a]=f}if(a!==r){a!==0&&(n=n.slice(a)),o=e(o,r,r=a+n.length*3,1)>>>0;let f=x().subarray(o+a,o+r),p=F.encodeInto(n,f);a+=p.written,o=e(o,r,a,1)>>>0}return u=a,o}function b(n){let t=_(n);return bt(n),t}function wt(n,t){return T+=t,T>=dt&&(M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),M.decode(),T=t),M.decode(x().subarray(n,n+t))}function U(n,t){return i=n.exports,lt=t,y=null,h=null,i}async function pt(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(o){if(n.ok&&e(n.type)&&n.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",o);else throw o}let r=await n.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(n,t);return r instanceof WebAssembly.Instance?{instance:r,module:n}:r}function e(r){switch(r){case"basic":case"cors":case"default":return!0}return!1}}function yt(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=H();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let e=new WebAssembly.Instance(n,t);return U(e,n)}async function I(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),n===void 0&&(n=new URL("mq_wasm_bg.wasm",mt.url));let t=H();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:e,module:r}=await pt(await n,t);return U(e,r)}var mt,m,O,at,ft,v,y,h,l,A,M,dt,T,F,u,lt,i,R=X(()=>{"use strict";mt={},m=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();i.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return i.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return i.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return i.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){i.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){i.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){i.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(m.prototype[Symbol.dispose]=m.prototype.free);O=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ft.unregister(this),t}free(){let t=this.__destroy_into_raw();i.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);at=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_conversionoptions_free(n>>>0,1)),ft=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_runoptions_free(n>>>0,1));v=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));y=null;h=null;l=new Array(1024).fill(void 0);l.push(void 0,null,!0,!1);A=l.length;M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});M.decode();dt=2146435072,T=0;F=new TextEncoder;"encodeInto"in F||(F.encodeInto=function(n,t){let e=F.encode(n);return t.set(e),{read:n.length,written:e.length}});u=0});var ht={};P(ht,{definedValues:()=>$,diagnostics:()=>C,format:()=>B,run:()=>q,toAst:()=>L});module.exports=K(ht);R();var k=null;async function S(){return k||(await(async()=>{try{await I();let n=await Promise.resolve().then(()=>(R(),z));k={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,definedValues:n.definedValues,htmlToMarkdown:n.htmlToMarkdown,toHtml:n.toHtml}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),k)}async function q(n,t,e={}){return await(await S()).run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function L(n){return await(await S()).toAst(n)}async function B(n){return await(await S()).format(n)}async function C(n){return await(await S()).diagnostics(n)}async function $(n,t){return await(await S()).definedValues(n,t)}0&&(module.exports={definedValues,diagnostics,format,run,toAst});
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
${
|
|
1
|
+
var U=Object.defineProperty;var z=(n,t)=>()=>(n&&(t=n(n=0)),t);var q=(n,t)=>{for(var e in t)U(n,e,{get:t[e],enumerable:!0})};var H={};q(H,{ConversionOptions:()=>m,RunOptions:()=>O,default:()=>W,definedValues:()=>L,diagnostics:()=>B,format:()=>C,htmlToMarkdown:()=>$,initSync:()=>ct,inlayHints:()=>N,run:()=>G,toAst:()=>J,toHtml:()=>X});function L(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u;var o=w(t)?0:g(t,i.__wbindgen_export,i.__wbindgen_export2),c=u;let a=i.definedValues(e,r,o,c);return b(a)}function B(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=i.diagnostics(e,r,w(t)?16777215:t?1:0);return b(o)}function C(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.format(t,e);return b(r)}function $(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=0;w(t)||(nt(t,m),o=t.__destroy_into_raw());let c=i.htmlToMarkdown(e,r,o);return b(c)}function N(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.inlayHints(t,e);return b(r)}function G(n,t,e){let r=g(n,i.__wbindgen_export,i.__wbindgen_export2),o=u,c=g(t,i.__wbindgen_export,i.__wbindgen_export2),a=u,f=i.run(r,o,c,a,s(e));return b(f)}function J(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toAst(t,e);return b(r)}function X(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toHtml(t,e);return b(r)}function E(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_83742b46f01ce22d:function(t,e){let r=Error(j(t,e));return s(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1:function(t){let e=_(t),r=typeof e=="boolean"?e:void 0;return w(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_5398f5bb970e0daa:function(t,e){let r=T(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_in_41dbb8413020e076:function(t,e){return _(t)in _(e)},__wbg___wbindgen_is_function_3c846841762788c1:function(t){return typeof _(t)=="function"},__wbg___wbindgen_is_object_781bc9f159099513:function(t){let e=_(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_7ef6b97b02428fae:function(t){return typeof _(t)=="string"},__wbg___wbindgen_is_undefined_52709e72fb9f179c:function(t){return _(t)===void 0},__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b:function(t,e){return _(t)==_(e)},__wbg___wbindgen_number_get_34bb9d9dcfa21373:function(t,e){let r=_(e),o=typeof r=="number"?r:void 0;d().setFloat64(t+8,w(o)?0:o,!0),d().setInt32(t+0,!w(o),!0)},__wbg___wbindgen_string_get_395e606bd0ee4427:function(t,e){let r=_(e),o=typeof r=="string"?r:void 0;var c=w(o)?0:g(o,i.__wbindgen_export,i.__wbindgen_export2),a=u;d().setInt32(t+4,a,!0),d().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_6ddd609b62940d55:function(t,e){throw new Error(j(t,e))},__wbg__wbg_cb_unref_6b5b6b8576d35cb1:function(t){_(t)._wbg_cb_unref()},__wbg_arrayBuffer_7ff5e58aa85a64f7:function(t){let e=_(t).arrayBuffer();return s(e)},__wbg_call_2d781c1f4d5c0ef8:function(){return P(function(t,e,r){let o=_(t).call(_(e),_(r));return s(o)},arguments)},__wbg_done_08ce71ee07e3bd17:function(t){return _(t).done},__wbg_entries_310f5926c32b5bcb:function(t){let e=_(t).entries();return s(e)},__wbg_entries_e8a20ff8c9757101:function(t){let e=Object.entries(_(t));return s(e)},__wbg_from_4bdf88943703fd48:function(t){let e=Array.from(_(t));return s(e)},__wbg_getDirectory_2406d369de179ff0:function(t){let e=_(t).getDirectory();return s(e)},__wbg_getFile_30341f4730c33225:function(t){let e=_(t).getFile();return s(e)},__wbg_get_a8ee5c45dabc1b3b:function(t,e){let r=_(t)[e>>>0];return s(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=_(t)[_(e)];return s(r)},__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6:function(t){let e;try{e=_(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_FileSystemDirectoryHandle_2944d0641b4ea10c:function(t){let e;try{e=_(t)instanceof FileSystemDirectoryHandle}catch{e=!1}return e},__wbg_instanceof_FileSystemFileHandle_37ac45c6adcff28f:function(t){let e;try{e=_(t)instanceof FileSystemFileHandle}catch{e=!1}return e},__wbg_instanceof_Uint8Array_740438561a5b956d:function(t){let e;try{e=_(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_instanceof_Window_23e677d2c6843922:function(t){let e;try{e=_(t)instanceof Window}catch{e=!1}return e},__wbg_length_b3416cf66a5452c8:function(t){return _(t).length},__wbg_length_ea16607d7b61445b:function(t){return _(t).length},__wbg_navigator_9cebf56f28aa719b:function(t){let e=_(t).navigator;return s(e)},__wbg_new_5f486cdf45a04d78:function(t){let e=new Uint8Array(_(t));return s(e)},__wbg_new_a70fbab9066b301f:function(){let t=new Array;return s(t)},__wbg_new_ab79df5bd7c26067:function(){let t=new Object;return s(t)},__wbg_new_typed_aaaeaf29cf802876:function(t,e){try{var r={a:t,b:e},o=(a,f)=>{let p=r.a;r.a=0;try{return Q(p,r.b,a,f)}finally{r.a=p}};let c=new Promise(o);return s(c)}finally{r.a=r.b=0}},__wbg_next_9c645ba5e1273237:function(){return P(function(t){let e=_(t).next();return s(e)},arguments)},__wbg_prototypesetcall_d62e5099504357e6:function(t,e,r){Uint8Array.prototype.set.call(rt(t,e),_(r))},__wbg_queueMicrotask_0c399741342fb10f:function(t){let e=_(t).queueMicrotask;return s(e)},__wbg_queueMicrotask_a082d78ce798393e:function(t){queueMicrotask(_(t))},__wbg_resolve_ae8d83246e5bcc12:function(t){let e=Promise.resolve(_(t));return s(e)},__wbg_set_282384002438957f:function(t,e,r){_(t)[e>>>0]=b(r)},__wbg_set_6be42768c690e380:function(t,e,r){_(t)[b(e)]=b(r)},__wbg_size_819df95195daae81:function(t){return _(t).size},__wbg_static_accessor_GLOBAL_8adb955bd33fac2f:function(){let t=typeof global>"u"?null:global;return w(t)?0:s(t)},__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913:function(){let t=typeof globalThis>"u"?null:globalThis;return w(t)?0:s(t)},__wbg_static_accessor_SELF_f207c857566db248:function(){let t=typeof self>"u"?null:self;return w(t)?0:s(t)},__wbg_static_accessor_WINDOW_bb9f1ba69d61b386:function(){let t=typeof window>"u"?null:window;return w(t)?0:s(t)},__wbg_storage_63fa6fa9455d2153:function(t){let e=_(t).storage;return s(e)},__wbg_then_098abe61755d12f6:function(t,e){let r=_(t).then(_(e));return s(r)},__wbg_then_9e335f6dd892bc11:function(t,e,r){let o=_(t).then(_(e),_(r));return s(o)},__wbg_value_21fc78aab0322612:function(t){let e=_(t).value;return s(e)},__wbindgen_cast_0000000000000001:function(t,e){let r=v(t,e,i.__wasm_bindgen_func_elem_135,Y);return s(r)},__wbindgen_cast_0000000000000002:function(t,e){let r=v(t,e,i.__wasm_bindgen_func_elem_135,K);return s(r)},__wbindgen_cast_0000000000000003:function(t){return s(t)},__wbindgen_cast_0000000000000004:function(t,e){let r=j(t,e);return s(r)},__wbindgen_object_clone_ref:function(t){let e=_(t);return s(e)},__wbindgen_object_drop_ref:function(t){b(t)}}}}function Y(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function K(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136_1(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function Q(n,t,e,r){i.__wasm_bindgen_func_elem_967(n,t,s(e),s(r))}function s(n){A===l.length&&l.push(l.length+1);let t=A;return A=l[t],l[t]=n,t}function nt(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}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 a=1;a<o;a++)c+=", "+T(n[a]);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 et(n){n<1028||(l[n]=A,A=n)}function rt(n,t){return n=n>>>0,x().subarray(n/1,n/1+t)}function d(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==i.memory.buffer)&&(y=new DataView(i.memory.buffer)),y}function j(n,t){return n=n>>>0,it(n,t)}function x(){return(h===null||h.byteLength===0)&&(h=new Uint8Array(i.memory.buffer)),h}function _(n){return l[n]}function P(n,t){try{return n.apply(this,t)}catch(e){i.__wbindgen_export3(s(e))}}function w(n){return n==null}function v(n,t,e,r){let o={a:n,b:t,cnt:1,dtor:e},c=(...a)=>{o.cnt++;let f=o.a;o.a=0;try{return r(f,o.b,...a)}finally{o.a=f,c._wbg_cb_unref()}};return c._wbg_cb_unref=()=>{--o.cnt===0&&(o.dtor(o.a,o.b),o.a=0,R.unregister(o))},R.register(c,o,o),c}function g(n,t,e){if(e===void 0){let f=F.encode(n),p=t(f.length,1)>>>0;return x().subarray(p,p+f.length).set(f),u=f.length,p}let r=n.length,o=t(r,1)>>>0,c=x(),a=0;for(;a<r;a++){let f=n.charCodeAt(a);if(f>127)break;c[o+a]=f}if(a!==r){a!==0&&(n=n.slice(a)),o=e(o,r,r=a+n.length*3,1)>>>0;let f=x().subarray(o+a,o+r),p=F.encodeInto(n,f);a+=p.written,o=e(o,r,a,1)>>>0}return u=a,o}function b(n){let t=_(n);return et(n),t}function it(n,t){return D+=t,D>=ot&&(M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),M.decode(),D=t),M.decode(x().subarray(n,n+t))}function V(n,t){return i=n.exports,_t=t,y=null,h=null,i}async function st(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(o){if(n.ok&&e(n.type)&&n.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",o);else throw o}let r=await n.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(n,t);return r instanceof WebAssembly.Instance?{instance:r,module:n}:r}function e(r){switch(r){case"basic":case"cors":case"default":return!0}return!1}}function ct(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=E();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let e=new WebAssembly.Instance(n,t);return V(e,n)}async function W(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),n===void 0&&(n=new URL("mq_wasm_bg.wasm",import.meta.url));let t=E();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:e,module:r}=await st(await n,t);return V(e,r)}var m,O,Z,tt,R,y,h,l,A,M,ot,D,F,u,_t,i,I=z(()=>{"use strict";m=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),t}free(){let t=this.__destroy_into_raw();i.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return i.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return i.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return i.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){i.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){i.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){i.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(m.prototype[Symbol.dispose]=m.prototype.free);O=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();i.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);Z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_conversionoptions_free(n>>>0,1)),tt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_runoptions_free(n>>>0,1));R=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));y=null;h=null;l=new Array(1024).fill(void 0);l.push(void 0,null,!0,!1);A=l.length;M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});M.decode();ot=2146435072,D=0;F=new TextEncoder;"encodeInto"in F||(F.encodeInto=function(n,t){let e=F.encode(n);return t.set(e),{read:n.length,written:e.length}});u=0});I();var k=null;async function S(){return k||(await(async()=>{try{await W();let n=await Promise.resolve().then(()=>(I(),H));k={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,definedValues:n.definedValues,htmlToMarkdown:n.htmlToMarkdown,toHtml:n.toHtml}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),k)}async function at(n,t,e={}){return await(await S()).run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function ft(n){return await(await S()).toAst(n)}async function ut(n){return await(await S()).format(n)}async function bt(n){return await(await S()).diagnostics(n)}async function gt(n,t){return await(await S()).definedValues(n,t)}export{gt as definedValues,bt as diagnostics,ut as format,at as run,ft as toAst};
|
package/dist/mq_wasm.js
CHANGED
|
@@ -83,12 +83,13 @@ export function definedValues(code, module) {
|
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* @param {string} code
|
|
86
|
+
* @param {boolean | null} [enable_type_check]
|
|
86
87
|
* @returns {Promise<any>}
|
|
87
88
|
*/
|
|
88
|
-
export function diagnostics(code) {
|
|
89
|
+
export function diagnostics(code, enable_type_check) {
|
|
89
90
|
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
90
91
|
const len0 = WASM_VECTOR_LEN;
|
|
91
|
-
const ret = wasm.diagnostics(ptr0, len0);
|
|
92
|
+
const ret = wasm.diagnostics(ptr0, len0, isLikeNone(enable_type_check) ? 0xFFFFFF : enable_type_check ? 1 : 0);
|
|
92
93
|
return takeObject(ret);
|
|
93
94
|
}
|
|
94
95
|
|
|
@@ -120,6 +121,17 @@ export function htmlToMarkdown(html_input, options) {
|
|
|
120
121
|
return takeObject(ret);
|
|
121
122
|
}
|
|
122
123
|
|
|
124
|
+
/**
|
|
125
|
+
* @param {string} code
|
|
126
|
+
* @returns {Promise<any>}
|
|
127
|
+
*/
|
|
128
|
+
export function inlayHints(code) {
|
|
129
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
130
|
+
const len0 = WASM_VECTOR_LEN;
|
|
131
|
+
const ret = wasm.inlayHints(ptr0, len0);
|
|
132
|
+
return takeObject(ret);
|
|
133
|
+
}
|
|
134
|
+
|
|
123
135
|
/**
|
|
124
136
|
* @param {string} code
|
|
125
137
|
* @param {string} content
|
|
@@ -349,7 +361,7 @@ function __wbg_get_imports() {
|
|
|
349
361
|
const a = state0.a;
|
|
350
362
|
state0.a = 0;
|
|
351
363
|
try {
|
|
352
|
-
return
|
|
364
|
+
return __wasm_bindgen_func_elem_967(a, state0.b, arg0, arg1);
|
|
353
365
|
} finally {
|
|
354
366
|
state0.a = a;
|
|
355
367
|
}
|
|
@@ -422,12 +434,12 @@ function __wbg_get_imports() {
|
|
|
422
434
|
},
|
|
423
435
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
424
436
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 6, function: Function { arguments: [Externref], shim_idx: 7, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
425
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
437
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_135, __wasm_bindgen_func_elem_136);
|
|
426
438
|
return addHeapObject(ret);
|
|
427
439
|
},
|
|
428
440
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
429
441
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 6, function: Function { arguments: [NamedExternref("IteratorResult<any>")], shim_idx: 7, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
430
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
442
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_135, __wasm_bindgen_func_elem_136_1);
|
|
431
443
|
return addHeapObject(ret);
|
|
432
444
|
},
|
|
433
445
|
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
@@ -454,10 +466,10 @@ function __wbg_get_imports() {
|
|
|
454
466
|
};
|
|
455
467
|
}
|
|
456
468
|
|
|
457
|
-
function
|
|
469
|
+
function __wasm_bindgen_func_elem_136(arg0, arg1, arg2) {
|
|
458
470
|
try {
|
|
459
471
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
460
|
-
wasm.
|
|
472
|
+
wasm.__wasm_bindgen_func_elem_136(retptr, arg0, arg1, addHeapObject(arg2));
|
|
461
473
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
462
474
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
463
475
|
if (r1) {
|
|
@@ -468,10 +480,10 @@ function __wasm_bindgen_func_elem_132(arg0, arg1, arg2) {
|
|
|
468
480
|
}
|
|
469
481
|
}
|
|
470
482
|
|
|
471
|
-
function
|
|
483
|
+
function __wasm_bindgen_func_elem_136_1(arg0, arg1, arg2) {
|
|
472
484
|
try {
|
|
473
485
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
474
|
-
wasm.
|
|
486
|
+
wasm.__wasm_bindgen_func_elem_136_1(retptr, arg0, arg1, addHeapObject(arg2));
|
|
475
487
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
476
488
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
477
489
|
if (r1) {
|
|
@@ -482,8 +494,8 @@ function __wasm_bindgen_func_elem_132_1(arg0, arg1, arg2) {
|
|
|
482
494
|
}
|
|
483
495
|
}
|
|
484
496
|
|
|
485
|
-
function
|
|
486
|
-
wasm.
|
|
497
|
+
function __wasm_bindgen_func_elem_967(arg0, arg1, arg2, arg3) {
|
|
498
|
+
wasm.__wasm_bindgen_func_elem_967(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
487
499
|
}
|
|
488
500
|
|
|
489
501
|
const ConversionOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
|
package/dist/mq_wasm_bg.wasm
CHANGED
|
Binary file
|