mq-web 0.5.23 → 0.5.25
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.js +2 -2
- package/dist/index.js +2 -2
- package/dist/mq_wasm.js +72 -72
- package/dist/mq_wasm_bg.wasm +0 -0
- package/package.json +7 -7
- package/dist/core.cjs +0 -2
- package/dist/core.d.cts +0 -79
- package/dist/index.cjs +0 -2
- package/dist/index.d.cts +0 -37
package/dist/core.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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:()=>W,definedValues:()=>B,diagnostics:()=>C,format:()=>q,htmlToMarkdown:()=>$,initSync:()=>ct,inlayHints:()=>N,run:()=>G,toAst:()=>J,toHtml:()=>X});function B(n,t){let e=g(n,
|
|
2
|
-
${n.stack}`:r}function et(n){n<1028||(w[n]=F,F=n)}function rt(n,t){return n=n>>>0,A().subarray(n/1,n/1+t)}function d(){return(m===null||m.buffer.detached===!0||m.buffer.detached===void 0&&m.buffer!==
|
|
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:()=>W,definedValues:()=>B,diagnostics:()=>C,format:()=>q,htmlToMarkdown:()=>$,initSync:()=>ct,inlayHints:()=>N,run:()=>G,toAst:()=>J,toHtml:()=>X});function B(n,t){let e=g(n,o.__wbindgen_export,o.__wbindgen_export2),r=u;var i=l(t)?0:g(t,o.__wbindgen_export,o.__wbindgen_export2),c=u;let a=o.definedValues(e,r,i,c);return f(a)}function C(n,t){let e=g(n,o.__wbindgen_export,o.__wbindgen_export2),r=u,i=o.diagnostics(e,r,l(t)?16777215:t?1:0);return f(i)}function q(n){let t=g(n,o.__wbindgen_export,o.__wbindgen_export2),e=u,r=o.format(t,e);return f(r)}function $(n,t){let e=g(n,o.__wbindgen_export,o.__wbindgen_export2),r=u,i=0;l(t)||(nt(t,h),i=t.__destroy_into_raw());let c=o.htmlToMarkdown(e,r,i);return f(c)}function N(n){let t=g(n,o.__wbindgen_export,o.__wbindgen_export2),e=u,r=o.inlayHints(t,e);return f(r)}function G(n,t,e){let r=g(n,o.__wbindgen_export,o.__wbindgen_export2),i=u,c=g(t,o.__wbindgen_export,o.__wbindgen_export2),a=u,b=o.run(r,i,c,a,s(e));return f(b)}function J(n){let t=g(n,o.__wbindgen_export,o.__wbindgen_export2),e=u,r=o.toAst(t,e);return f(r)}function X(n){let t=g(n,o.__wbindgen_export,o.__wbindgen_export2),e=u,r=o.toHtml(t,e);return f(r)}function v(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_2e59b1b37a9a34c3:function(t,e){let r=Error(I(t,e));return s(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(_(e)),i=g(r,o.__wbindgen_export,o.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,i,!0)},__wbg___wbindgen_boolean_get_a86c216575a75c30:function(t){let e=_(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(_(e)),i=g(r,o.__wbindgen_export,o.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,i,!0)},__wbg___wbindgen_in_4bd7a57e54337366:function(t,e){return _(t)in _(e)},__wbg___wbindgen_is_function_49868bde5eb1e745:function(t){return typeof _(t)=="function"},__wbg___wbindgen_is_object_40c5a80572e8f9d3:function(t){let e=_(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_b29b5c5a8065ba1a:function(t){return typeof _(t)=="string"},__wbg___wbindgen_is_undefined_c0cca72b82b86f4d:function(t){return _(t)===void 0},__wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944:function(t,e){return _(t)==_(e)},__wbg___wbindgen_number_get_7579aab02a8a620c:function(t,e){let r=_(e),i=typeof r=="number"?r:void 0;d().setFloat64(t+8,l(i)?0:i,!0),d().setInt32(t+0,!l(i),!0)},__wbg___wbindgen_string_get_914df97fcfa788f2:function(t,e){let r=_(e),i=typeof r=="string"?r:void 0;var c=l(i)?0:g(i,o.__wbindgen_export,o.__wbindgen_export2),a=u;d().setInt32(t+4,a,!0),d().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_81fc77679af83bc6:function(t,e){throw new Error(I(t,e))},__wbg__wbg_cb_unref_3c3b4f651835fbcb:function(t){_(t)._wbg_cb_unref()},__wbg_arrayBuffer_7bba74066875530e:function(t){let e=_(t).arrayBuffer();return s(e)},__wbg_call_d578befcc3145dee:function(){return P(function(t,e,r){let i=_(t).call(_(e),_(r));return s(i)},arguments)},__wbg_done_547d467e97529006:function(t){return _(t).done},__wbg_entries_616b1a459b85be0b:function(t){let e=Object.entries(_(t));return s(e)},__wbg_entries_69b67e91e74ba327:function(t){let e=_(t).entries();return s(e)},__wbg_from_741da0f916ab74aa:function(t){let e=Array.from(_(t));return s(e)},__wbg_getDirectory_3af764c18446017f:function(t){let e=_(t).getDirectory();return s(e)},__wbg_getFile_0e25dfe508c6bd0a:function(t){let e=_(t).getFile();return s(e)},__wbg_get_4848e350b40afc16: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_ff7c1337a5e3b33a:function(t){let e;try{e=_(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_FileSystemDirectoryHandle_66b8b1a90ca7b685:function(t){let e;try{e=_(t)instanceof FileSystemDirectoryHandle}catch{e=!1}return e},__wbg_instanceof_FileSystemFileHandle_2236115c7caa5120:function(t){let e;try{e=_(t)instanceof FileSystemFileHandle}catch{e=!1}return e},__wbg_instanceof_Uint8Array_4b8da683deb25d72:function(t){let e;try{e=_(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_instanceof_Window_c0fee4c064502536:function(t){let e;try{e=_(t)instanceof Window}catch{e=!1}return e},__wbg_length_0c32cb8543c8e4c8:function(t){return _(t).length},__wbg_length_6e821edde497a532:function(t){return _(t).length},__wbg_navigator_9b09ea705d03d227:function(t){let e=_(t).navigator;return s(e)},__wbg_new_4f9fafbb3909af72:function(){let t=new Object;return s(t)},__wbg_new_a560378ea1240b14:function(t){let e=new Uint8Array(_(t));return s(e)},__wbg_new_f3c9df4f38f3f798:function(){let t=new Array;return s(t)},__wbg_new_typed_14d7cc391ce53d2c:function(t,e){try{var r={a:t,b:e},i=(a,b)=>{let p=r.a;r.a=0;try{return Q(p,r.b,a,b)}finally{r.a=p}};let c=new Promise(i);return s(c)}finally{r.a=0}},__wbg_next_7eee17bf2cc62f05:function(){return P(function(t){let e=_(t).next();return s(e)},arguments)},__wbg_prototypesetcall_3e05eb9545565046:function(t,e,r){Uint8Array.prototype.set.call(rt(t,e),_(r))},__wbg_queueMicrotask_abaf92f0bd4e80a4:function(t){let e=_(t).queueMicrotask;return s(e)},__wbg_queueMicrotask_df5a6dac26d818f3:function(t){queueMicrotask(_(t))},__wbg_resolve_0a79de24e9d2267b:function(t){let e=Promise.resolve(_(t));return s(e)},__wbg_set_6be42768c690e380:function(t,e,r){_(t)[f(e)]=f(r)},__wbg_set_6c60b2e8ad0e9383:function(t,e,r){_(t)[e>>>0]=f(r)},__wbg_size_7306c9406e13bf29:function(t){return _(t).size},__wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:s(t)},__wbg_static_accessor_GLOBAL_f2e0f995a21329ff:function(){let t=typeof global>"u"?null:global;return l(t)?0:s(t)},__wbg_static_accessor_SELF_24f78b6d23f286ea:function(){let t=typeof self>"u"?null:self;return l(t)?0:s(t)},__wbg_static_accessor_WINDOW_59fd959c540fe405:function(){let t=typeof window>"u"?null:window;return l(t)?0:s(t)},__wbg_storage_8f8e63186ec77353:function(t){let e=_(t).storage;return s(e)},__wbg_then_00eed3ac0b8e82cb:function(t,e,r){let i=_(t).then(_(e),_(r));return s(i)},__wbg_then_a0c8db0381c8994c:function(t,e){let r=_(t).then(_(e));return s(r)},__wbg_value_7f6052747ccf940f:function(t){let e=_(t).value;return s(e)},__wbindgen_cast_0000000000000001:function(t,e){let r=D(t,e,Y);return s(r)},__wbindgen_cast_0000000000000002:function(t,e){let r=D(t,e,K);return s(r)},__wbindgen_cast_0000000000000003:function(t){return s(t)},__wbindgen_cast_0000000000000004:function(t,e){let r=I(t,e);return s(r)},__wbindgen_object_clone_ref:function(t){let e=_(t);return s(e)},__wbindgen_object_drop_ref:function(t){f(t)}}}}function Y(n,t,e){try{let c=o.__wbindgen_add_to_stack_pointer(-16);o.__wasm_bindgen_func_elem_138(c,n,t,s(e));var r=d().getInt32(c+0,!0),i=d().getInt32(c+4,!0);if(i)throw f(r)}finally{o.__wbindgen_add_to_stack_pointer(16)}}function K(n,t,e){try{let c=o.__wbindgen_add_to_stack_pointer(-16);o.__wasm_bindgen_func_elem_138_1(c,n,t,s(e));var r=d().getInt32(c+0,!0),i=d().getInt32(c+4,!0);if(i)throw f(r)}finally{o.__wbindgen_add_to_stack_pointer(16)}}function Q(n,t,e,r){o.__wasm_bindgen_func_elem_1021(n,t,s(e),s(r))}function s(n){F===w.length&&w.push(w.length+1);let t=F;return F=w[t],w[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 i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(t=="function"){let i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){let i=n.length,c="[";i>0&&(c+=T(n[0]));for(let a=1;a<i;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||(w[n]=F,F=n)}function rt(n,t){return n=n>>>0,A().subarray(n/1,n/1+t)}function d(){return(m===null||m.buffer.detached===!0||m.buffer.detached===void 0&&m.buffer!==o.memory.buffer)&&(m=new DataView(o.memory.buffer)),m}function I(n,t){return n=n>>>0,it(n,t)}function A(){return(x===null||x.byteLength===0)&&(x=new Uint8Array(o.memory.buffer)),x}function _(n){return w[n]}function P(n,t){try{return n.apply(this,t)}catch(e){o.__wbindgen_export3(s(e))}}function l(n){return n==null}function D(n,t,e){let r={a:n,b:t,cnt:1},i=(...c)=>{r.cnt++;let a=r.a;r.a=0;try{return e(a,r.b,...c)}finally{r.a=a,i._wbg_cb_unref()}};return i._wbg_cb_unref=()=>{--r.cnt===0&&(o.__wbindgen_export4(r.a,r.b),r.a=0,R.unregister(r))},R.register(i,r,r),i}function g(n,t,e){if(e===void 0){let b=S.encode(n),p=t(b.length,1)>>>0;return A().subarray(p,p+b.length).set(b),u=b.length,p}let r=n.length,i=t(r,1)>>>0,c=A(),a=0;for(;a<r;a++){let b=n.charCodeAt(a);if(b>127)break;c[i+a]=b}if(a!==r){a!==0&&(n=n.slice(a)),i=e(i,r,r=a+n.length*3,1)>>>0;let b=A().subarray(i+a,i+r),p=S.encodeInto(n,b);a+=p.written,i=e(i,r,a,1)>>>0}return u=a,i}function f(n){let t=_(n);return et(n),t}function it(n,t){return j+=t,j>=ot&&(k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),k.decode(),j=t),k.decode(A().subarray(n,n+t))}function E(n,t){return o=n.exports,_t=t,m=null,x=null,o}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(i){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",i);else throw i}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(o!==void 0)return o;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=v();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let e=new WebAssembly.Instance(n,t);return E(e,n)}async function W(n){if(o!==void 0)return o;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=v();(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 E(e,r)}var h,O,Z,tt,R,m,x,w,F,k,ot,j,S,u,_t,o,H=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();o.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return o.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return o.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return o.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){o.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){o.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){o.__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();o.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);Z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>o.__wbg_conversionoptions_free(n>>>0,1)),tt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>o.__wbg_runoptions_free(n>>>0,1));R=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>o.__wbindgen_export4(n.a,n.b));m=null;x=null;w=new Array(1024).fill(void 0);w.push(void 0,null,!0,!1);F=w.length;k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});k.decode();ot=2146435072,j=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});H();var M=null;async function y(){return M||(await(async()=>{try{await W();let n=await Promise.resolve().then(()=>(H(),U));M={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,inlayHints:n.inlayHints,definedValues:n.definedValues,htmlToMarkdown:n.htmlToMarkdown,toHtml:n.toHtml}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),M)}async function wt(n,t,e={}){return await(await y()).run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function pt(n){return await(await y()).toAst(n)}async function yt(n){return await(await y()).format(n)}async function mt(n,t){return await(await y()).diagnostics(n,t)}async function ht(n){return await(await y()).inlayHints(n)}async function xt(n,t){return await(await y()).definedValues(n,t)}async function At(n,t){return await(await y()).htmlToMarkdown(n,t)}async function Ft(n){return await(await y()).toHtml(n)}export{xt as definedValues,mt as diagnostics,yt as format,At as htmlToMarkdown,ht as inlayHints,wt as run,pt as toAst,Ft as toHtml};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,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 V={};q(V,{ConversionOptions:()=>m,RunOptions:()=>S,default:()=>T,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,
|
|
2
|
-
${n.stack}`:r}function et(n){n<1028||(w[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!==
|
|
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 V={};q(V,{ConversionOptions:()=>m,RunOptions:()=>S,default:()=>T,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,o.__wbindgen_export,o.__wbindgen_export2),r=f;var i=l(t)?0:g(t,o.__wbindgen_export,o.__wbindgen_export2),c=f;let a=o.definedValues(e,r,i,c);return u(a)}function B(n,t){let e=g(n,o.__wbindgen_export,o.__wbindgen_export2),r=f,i=o.diagnostics(e,r,l(t)?16777215:t?1:0);return u(i)}function C(n){let t=g(n,o.__wbindgen_export,o.__wbindgen_export2),e=f,r=o.format(t,e);return u(r)}function $(n,t){let e=g(n,o.__wbindgen_export,o.__wbindgen_export2),r=f,i=0;l(t)||(nt(t,m),i=t.__destroy_into_raw());let c=o.htmlToMarkdown(e,r,i);return u(c)}function N(n){let t=g(n,o.__wbindgen_export,o.__wbindgen_export2),e=f,r=o.inlayHints(t,e);return u(r)}function G(n,t,e){let r=g(n,o.__wbindgen_export,o.__wbindgen_export2),i=f,c=g(t,o.__wbindgen_export,o.__wbindgen_export2),a=f,b=o.run(r,i,c,a,s(e));return u(b)}function J(n){let t=g(n,o.__wbindgen_export,o.__wbindgen_export2),e=f,r=o.toAst(t,e);return u(r)}function X(n){let t=g(n,o.__wbindgen_export,o.__wbindgen_export2),e=f,r=o.toHtml(t,e);return u(r)}function v(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_2e59b1b37a9a34c3:function(t,e){let r=Error(I(t,e));return s(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(_(e)),i=g(r,o.__wbindgen_export,o.__wbindgen_export2),c=f;d().setInt32(t+4,c,!0),d().setInt32(t+0,i,!0)},__wbg___wbindgen_boolean_get_a86c216575a75c30:function(t){let e=_(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(_(e)),i=g(r,o.__wbindgen_export,o.__wbindgen_export2),c=f;d().setInt32(t+4,c,!0),d().setInt32(t+0,i,!0)},__wbg___wbindgen_in_4bd7a57e54337366:function(t,e){return _(t)in _(e)},__wbg___wbindgen_is_function_49868bde5eb1e745:function(t){return typeof _(t)=="function"},__wbg___wbindgen_is_object_40c5a80572e8f9d3:function(t){let e=_(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_b29b5c5a8065ba1a:function(t){return typeof _(t)=="string"},__wbg___wbindgen_is_undefined_c0cca72b82b86f4d:function(t){return _(t)===void 0},__wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944:function(t,e){return _(t)==_(e)},__wbg___wbindgen_number_get_7579aab02a8a620c:function(t,e){let r=_(e),i=typeof r=="number"?r:void 0;d().setFloat64(t+8,l(i)?0:i,!0),d().setInt32(t+0,!l(i),!0)},__wbg___wbindgen_string_get_914df97fcfa788f2:function(t,e){let r=_(e),i=typeof r=="string"?r:void 0;var c=l(i)?0:g(i,o.__wbindgen_export,o.__wbindgen_export2),a=f;d().setInt32(t+4,a,!0),d().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_81fc77679af83bc6:function(t,e){throw new Error(I(t,e))},__wbg__wbg_cb_unref_3c3b4f651835fbcb:function(t){_(t)._wbg_cb_unref()},__wbg_arrayBuffer_7bba74066875530e:function(t){let e=_(t).arrayBuffer();return s(e)},__wbg_call_d578befcc3145dee:function(){return R(function(t,e,r){let i=_(t).call(_(e),_(r));return s(i)},arguments)},__wbg_done_547d467e97529006:function(t){return _(t).done},__wbg_entries_616b1a459b85be0b:function(t){let e=Object.entries(_(t));return s(e)},__wbg_entries_69b67e91e74ba327:function(t){let e=_(t).entries();return s(e)},__wbg_from_741da0f916ab74aa:function(t){let e=Array.from(_(t));return s(e)},__wbg_getDirectory_3af764c18446017f:function(t){let e=_(t).getDirectory();return s(e)},__wbg_getFile_0e25dfe508c6bd0a:function(t){let e=_(t).getFile();return s(e)},__wbg_get_4848e350b40afc16: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_ff7c1337a5e3b33a:function(t){let e;try{e=_(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_FileSystemDirectoryHandle_66b8b1a90ca7b685:function(t){let e;try{e=_(t)instanceof FileSystemDirectoryHandle}catch{e=!1}return e},__wbg_instanceof_FileSystemFileHandle_2236115c7caa5120:function(t){let e;try{e=_(t)instanceof FileSystemFileHandle}catch{e=!1}return e},__wbg_instanceof_Uint8Array_4b8da683deb25d72:function(t){let e;try{e=_(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_instanceof_Window_c0fee4c064502536:function(t){let e;try{e=_(t)instanceof Window}catch{e=!1}return e},__wbg_length_0c32cb8543c8e4c8:function(t){return _(t).length},__wbg_length_6e821edde497a532:function(t){return _(t).length},__wbg_navigator_9b09ea705d03d227:function(t){let e=_(t).navigator;return s(e)},__wbg_new_4f9fafbb3909af72:function(){let t=new Object;return s(t)},__wbg_new_a560378ea1240b14:function(t){let e=new Uint8Array(_(t));return s(e)},__wbg_new_f3c9df4f38f3f798:function(){let t=new Array;return s(t)},__wbg_new_typed_14d7cc391ce53d2c:function(t,e){try{var r={a:t,b:e},i=(a,b)=>{let p=r.a;r.a=0;try{return Q(p,r.b,a,b)}finally{r.a=p}};let c=new Promise(i);return s(c)}finally{r.a=0}},__wbg_next_7eee17bf2cc62f05:function(){return R(function(t){let e=_(t).next();return s(e)},arguments)},__wbg_prototypesetcall_3e05eb9545565046:function(t,e,r){Uint8Array.prototype.set.call(rt(t,e),_(r))},__wbg_queueMicrotask_abaf92f0bd4e80a4:function(t){let e=_(t).queueMicrotask;return s(e)},__wbg_queueMicrotask_df5a6dac26d818f3:function(t){queueMicrotask(_(t))},__wbg_resolve_0a79de24e9d2267b:function(t){let e=Promise.resolve(_(t));return s(e)},__wbg_set_6be42768c690e380:function(t,e,r){_(t)[u(e)]=u(r)},__wbg_set_6c60b2e8ad0e9383:function(t,e,r){_(t)[e>>>0]=u(r)},__wbg_size_7306c9406e13bf29:function(t){return _(t).size},__wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:s(t)},__wbg_static_accessor_GLOBAL_f2e0f995a21329ff:function(){let t=typeof global>"u"?null:global;return l(t)?0:s(t)},__wbg_static_accessor_SELF_24f78b6d23f286ea:function(){let t=typeof self>"u"?null:self;return l(t)?0:s(t)},__wbg_static_accessor_WINDOW_59fd959c540fe405:function(){let t=typeof window>"u"?null:window;return l(t)?0:s(t)},__wbg_storage_8f8e63186ec77353:function(t){let e=_(t).storage;return s(e)},__wbg_then_00eed3ac0b8e82cb:function(t,e,r){let i=_(t).then(_(e),_(r));return s(i)},__wbg_then_a0c8db0381c8994c:function(t,e){let r=_(t).then(_(e));return s(r)},__wbg_value_7f6052747ccf940f:function(t){let e=_(t).value;return s(e)},__wbindgen_cast_0000000000000001:function(t,e){let r=P(t,e,Y);return s(r)},__wbindgen_cast_0000000000000002:function(t,e){let r=P(t,e,K);return s(r)},__wbindgen_cast_0000000000000003:function(t){return s(t)},__wbindgen_cast_0000000000000004:function(t,e){let r=I(t,e);return s(r)},__wbindgen_object_clone_ref:function(t){let e=_(t);return s(e)},__wbindgen_object_drop_ref:function(t){u(t)}}}}function Y(n,t,e){try{let c=o.__wbindgen_add_to_stack_pointer(-16);o.__wasm_bindgen_func_elem_138(c,n,t,s(e));var r=d().getInt32(c+0,!0),i=d().getInt32(c+4,!0);if(i)throw u(r)}finally{o.__wbindgen_add_to_stack_pointer(16)}}function K(n,t,e){try{let c=o.__wbindgen_add_to_stack_pointer(-16);o.__wasm_bindgen_func_elem_138_1(c,n,t,s(e));var r=d().getInt32(c+0,!0),i=d().getInt32(c+4,!0);if(i)throw u(r)}finally{o.__wbindgen_add_to_stack_pointer(16)}}function Q(n,t,e,r){o.__wasm_bindgen_func_elem_1021(n,t,s(e),s(r))}function s(n){F===w.length&&w.push(w.length+1);let t=F;return F=w[t],w[t]=n,t}function nt(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}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 i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(t=="function"){let i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){let i=n.length,c="[";i>0&&(c+=H(n[0]));for(let a=1;a<i;a++)c+=", "+H(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||(w[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!==o.memory.buffer)&&(y=new DataView(o.memory.buffer)),y}function I(n,t){return n=n>>>0,it(n,t)}function A(){return(x===null||x.byteLength===0)&&(x=new Uint8Array(o.memory.buffer)),x}function _(n){return w[n]}function R(n,t){try{return n.apply(this,t)}catch(e){o.__wbindgen_export3(s(e))}}function l(n){return n==null}function P(n,t,e){let r={a:n,b:t,cnt:1},i=(...c)=>{r.cnt++;let a=r.a;r.a=0;try{return e(a,r.b,...c)}finally{r.a=a,i._wbg_cb_unref()}};return i._wbg_cb_unref=()=>{--r.cnt===0&&(o.__wbindgen_export4(r.a,r.b),r.a=0,W.unregister(r))},W.register(i,r,r),i}function g(n,t,e){if(e===void 0){let b=O.encode(n),p=t(b.length,1)>>>0;return A().subarray(p,p+b.length).set(b),f=b.length,p}let r=n.length,i=t(r,1)>>>0,c=A(),a=0;for(;a<r;a++){let b=n.charCodeAt(a);if(b>127)break;c[i+a]=b}if(a!==r){a!==0&&(n=n.slice(a)),i=e(i,r,r=a+n.length*3,1)>>>0;let b=A().subarray(i+a,i+r),p=O.encodeInto(n,b);a+=p.written,i=e(i,r,a,1)>>>0}return f=a,i}function u(n){let t=_(n);return et(n),t}function it(n,t){return j+=t,j>=ot&&(k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),k.decode(),j=t),k.decode(A().subarray(n,n+t))}function E(n,t){return o=n.exports,_t=t,y=null,x=null,o}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(i){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",i);else throw i}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(o!==void 0)return o;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=v();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let e=new WebAssembly.Instance(n,t);return E(e,n)}async function T(n){if(o!==void 0)return o;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=v();(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 E(e,r)}var m,S,Z,tt,W,y,x,w,F,k,ot,j,O,f,_t,o,D=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();o.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return o.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return o.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return o.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){o.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){o.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){o.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(m.prototype[Symbol.dispose]=m.prototype.free);S=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();o.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(S.prototype[Symbol.dispose]=S.prototype.free);Z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>o.__wbg_conversionoptions_free(n>>>0,1)),tt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>o.__wbg_runoptions_free(n>>>0,1));W=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>o.__wbindgen_export4(n.a,n.b));y=null;x=null;w=new Array(1024).fill(void 0);w.push(void 0,null,!0,!1);F=w.length;k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});k.decode();ot=2146435072,j=0;O=new TextEncoder;"encodeInto"in O||(O.encodeInto=function(n,t){let e=O.encode(n);return t.set(e),{read:n.length,written:e.length}});f=0});D();var M=null;async function h(){return M||(await(async()=>{try{await T();let n=await Promise.resolve().then(()=>(D(),V));M={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,inlayHints:n.inlayHints,definedValues:n.definedValues,htmlToMarkdown:n.htmlToMarkdown,toHtml:n.toHtml}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),M)}async function at(n,t,e={}){return await(await h()).run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function ft(n){return await(await h()).toAst(n)}async function ut(n){return await(await h()).format(n)}async function bt(n,t){return await(await h()).diagnostics(n,t)}async function gt(n){return await(await h()).inlayHints(n)}async function dt(n,t){return await(await h()).definedValues(n,t)}export{dt as definedValues,bt as diagnostics,ut as format,gt as inlayHints,at as run,ft as toAst};
|
package/dist/mq_wasm.js
CHANGED
|
@@ -172,7 +172,7 @@ export function toHtml(markdown_input) {
|
|
|
172
172
|
function __wbg_get_imports() {
|
|
173
173
|
const import0 = {
|
|
174
174
|
__proto__: null,
|
|
175
|
-
|
|
175
|
+
__wbg_Error_2e59b1b37a9a34c3: function(arg0, arg1) {
|
|
176
176
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
177
177
|
return addHeapObject(ret);
|
|
178
178
|
},
|
|
@@ -183,50 +183,50 @@ function __wbg_get_imports() {
|
|
|
183
183
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
184
184
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
185
185
|
},
|
|
186
|
-
|
|
186
|
+
__wbg___wbindgen_boolean_get_a86c216575a75c30: function(arg0) {
|
|
187
187
|
const v = getObject(arg0);
|
|
188
188
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
189
189
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
190
190
|
},
|
|
191
|
-
|
|
191
|
+
__wbg___wbindgen_debug_string_dd5d2d07ce9e6c57: function(arg0, arg1) {
|
|
192
192
|
const ret = debugString(getObject(arg1));
|
|
193
193
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
194
194
|
const len1 = WASM_VECTOR_LEN;
|
|
195
195
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
196
196
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
197
197
|
},
|
|
198
|
-
|
|
198
|
+
__wbg___wbindgen_in_4bd7a57e54337366: function(arg0, arg1) {
|
|
199
199
|
const ret = getObject(arg0) in getObject(arg1);
|
|
200
200
|
return ret;
|
|
201
201
|
},
|
|
202
|
-
|
|
202
|
+
__wbg___wbindgen_is_function_49868bde5eb1e745: function(arg0) {
|
|
203
203
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
204
204
|
return ret;
|
|
205
205
|
},
|
|
206
|
-
|
|
206
|
+
__wbg___wbindgen_is_object_40c5a80572e8f9d3: function(arg0) {
|
|
207
207
|
const val = getObject(arg0);
|
|
208
208
|
const ret = typeof(val) === 'object' && val !== null;
|
|
209
209
|
return ret;
|
|
210
210
|
},
|
|
211
|
-
|
|
211
|
+
__wbg___wbindgen_is_string_b29b5c5a8065ba1a: function(arg0) {
|
|
212
212
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
213
213
|
return ret;
|
|
214
214
|
},
|
|
215
|
-
|
|
215
|
+
__wbg___wbindgen_is_undefined_c0cca72b82b86f4d: function(arg0) {
|
|
216
216
|
const ret = getObject(arg0) === undefined;
|
|
217
217
|
return ret;
|
|
218
218
|
},
|
|
219
|
-
|
|
219
|
+
__wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944: function(arg0, arg1) {
|
|
220
220
|
const ret = getObject(arg0) == getObject(arg1);
|
|
221
221
|
return ret;
|
|
222
222
|
},
|
|
223
|
-
|
|
223
|
+
__wbg___wbindgen_number_get_7579aab02a8a620c: function(arg0, arg1) {
|
|
224
224
|
const obj = getObject(arg1);
|
|
225
225
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
226
226
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
227
227
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
228
228
|
},
|
|
229
|
-
|
|
229
|
+
__wbg___wbindgen_string_get_914df97fcfa788f2: function(arg0, arg1) {
|
|
230
230
|
const obj = getObject(arg1);
|
|
231
231
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
232
232
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -234,45 +234,45 @@ function __wbg_get_imports() {
|
|
|
234
234
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
235
235
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
236
236
|
},
|
|
237
|
-
|
|
237
|
+
__wbg___wbindgen_throw_81fc77679af83bc6: function(arg0, arg1) {
|
|
238
238
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
239
239
|
},
|
|
240
|
-
|
|
240
|
+
__wbg__wbg_cb_unref_3c3b4f651835fbcb: function(arg0) {
|
|
241
241
|
getObject(arg0)._wbg_cb_unref();
|
|
242
242
|
},
|
|
243
|
-
|
|
243
|
+
__wbg_arrayBuffer_7bba74066875530e: function(arg0) {
|
|
244
244
|
const ret = getObject(arg0).arrayBuffer();
|
|
245
245
|
return addHeapObject(ret);
|
|
246
246
|
},
|
|
247
|
-
|
|
247
|
+
__wbg_call_d578befcc3145dee: function() { return handleError(function (arg0, arg1, arg2) {
|
|
248
248
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
249
249
|
return addHeapObject(ret);
|
|
250
250
|
}, arguments); },
|
|
251
|
-
|
|
251
|
+
__wbg_done_547d467e97529006: function(arg0) {
|
|
252
252
|
const ret = getObject(arg0).done;
|
|
253
253
|
return ret;
|
|
254
254
|
},
|
|
255
|
-
|
|
256
|
-
const ret = getObject(arg0)
|
|
255
|
+
__wbg_entries_616b1a459b85be0b: function(arg0) {
|
|
256
|
+
const ret = Object.entries(getObject(arg0));
|
|
257
257
|
return addHeapObject(ret);
|
|
258
258
|
},
|
|
259
|
-
|
|
260
|
-
const ret =
|
|
259
|
+
__wbg_entries_69b67e91e74ba327: function(arg0) {
|
|
260
|
+
const ret = getObject(arg0).entries();
|
|
261
261
|
return addHeapObject(ret);
|
|
262
262
|
},
|
|
263
|
-
|
|
263
|
+
__wbg_from_741da0f916ab74aa: function(arg0) {
|
|
264
264
|
const ret = Array.from(getObject(arg0));
|
|
265
265
|
return addHeapObject(ret);
|
|
266
266
|
},
|
|
267
|
-
|
|
267
|
+
__wbg_getDirectory_3af764c18446017f: function(arg0) {
|
|
268
268
|
const ret = getObject(arg0).getDirectory();
|
|
269
269
|
return addHeapObject(ret);
|
|
270
270
|
},
|
|
271
|
-
|
|
271
|
+
__wbg_getFile_0e25dfe508c6bd0a: function(arg0) {
|
|
272
272
|
const ret = getObject(arg0).getFile();
|
|
273
273
|
return addHeapObject(ret);
|
|
274
274
|
},
|
|
275
|
-
|
|
275
|
+
__wbg_get_4848e350b40afc16: function(arg0, arg1) {
|
|
276
276
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
277
277
|
return addHeapObject(ret);
|
|
278
278
|
},
|
|
@@ -280,7 +280,7 @@ function __wbg_get_imports() {
|
|
|
280
280
|
const ret = getObject(arg0)[getObject(arg1)];
|
|
281
281
|
return addHeapObject(ret);
|
|
282
282
|
},
|
|
283
|
-
|
|
283
|
+
__wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a: function(arg0) {
|
|
284
284
|
let result;
|
|
285
285
|
try {
|
|
286
286
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -290,7 +290,7 @@ function __wbg_get_imports() {
|
|
|
290
290
|
const ret = result;
|
|
291
291
|
return ret;
|
|
292
292
|
},
|
|
293
|
-
|
|
293
|
+
__wbg_instanceof_FileSystemDirectoryHandle_66b8b1a90ca7b685: function(arg0) {
|
|
294
294
|
let result;
|
|
295
295
|
try {
|
|
296
296
|
result = getObject(arg0) instanceof FileSystemDirectoryHandle;
|
|
@@ -300,7 +300,7 @@ function __wbg_get_imports() {
|
|
|
300
300
|
const ret = result;
|
|
301
301
|
return ret;
|
|
302
302
|
},
|
|
303
|
-
|
|
303
|
+
__wbg_instanceof_FileSystemFileHandle_2236115c7caa5120: function(arg0) {
|
|
304
304
|
let result;
|
|
305
305
|
try {
|
|
306
306
|
result = getObject(arg0) instanceof FileSystemFileHandle;
|
|
@@ -310,7 +310,7 @@ function __wbg_get_imports() {
|
|
|
310
310
|
const ret = result;
|
|
311
311
|
return ret;
|
|
312
312
|
},
|
|
313
|
-
|
|
313
|
+
__wbg_instanceof_Uint8Array_4b8da683deb25d72: function(arg0) {
|
|
314
314
|
let result;
|
|
315
315
|
try {
|
|
316
316
|
result = getObject(arg0) instanceof Uint8Array;
|
|
@@ -320,7 +320,7 @@ function __wbg_get_imports() {
|
|
|
320
320
|
const ret = result;
|
|
321
321
|
return ret;
|
|
322
322
|
},
|
|
323
|
-
|
|
323
|
+
__wbg_instanceof_Window_c0fee4c064502536: function(arg0) {
|
|
324
324
|
let result;
|
|
325
325
|
try {
|
|
326
326
|
result = getObject(arg0) instanceof Window;
|
|
@@ -330,38 +330,38 @@ function __wbg_get_imports() {
|
|
|
330
330
|
const ret = result;
|
|
331
331
|
return ret;
|
|
332
332
|
},
|
|
333
|
-
|
|
333
|
+
__wbg_length_0c32cb8543c8e4c8: function(arg0) {
|
|
334
334
|
const ret = getObject(arg0).length;
|
|
335
335
|
return ret;
|
|
336
336
|
},
|
|
337
|
-
|
|
337
|
+
__wbg_length_6e821edde497a532: function(arg0) {
|
|
338
338
|
const ret = getObject(arg0).length;
|
|
339
339
|
return ret;
|
|
340
340
|
},
|
|
341
|
-
|
|
341
|
+
__wbg_navigator_9b09ea705d03d227: function(arg0) {
|
|
342
342
|
const ret = getObject(arg0).navigator;
|
|
343
343
|
return addHeapObject(ret);
|
|
344
344
|
},
|
|
345
|
-
|
|
346
|
-
const ret = new
|
|
345
|
+
__wbg_new_4f9fafbb3909af72: function() {
|
|
346
|
+
const ret = new Object();
|
|
347
347
|
return addHeapObject(ret);
|
|
348
348
|
},
|
|
349
|
-
|
|
350
|
-
const ret = new
|
|
349
|
+
__wbg_new_a560378ea1240b14: function(arg0) {
|
|
350
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
351
351
|
return addHeapObject(ret);
|
|
352
352
|
},
|
|
353
|
-
|
|
354
|
-
const ret = new
|
|
353
|
+
__wbg_new_f3c9df4f38f3f798: function() {
|
|
354
|
+
const ret = new Array();
|
|
355
355
|
return addHeapObject(ret);
|
|
356
356
|
},
|
|
357
|
-
|
|
357
|
+
__wbg_new_typed_14d7cc391ce53d2c: function(arg0, arg1) {
|
|
358
358
|
try {
|
|
359
359
|
var state0 = {a: arg0, b: arg1};
|
|
360
360
|
var cb0 = (arg0, arg1) => {
|
|
361
361
|
const a = state0.a;
|
|
362
362
|
state0.a = 0;
|
|
363
363
|
try {
|
|
364
|
-
return
|
|
364
|
+
return __wasm_bindgen_func_elem_1021(a, state0.b, arg0, arg1);
|
|
365
365
|
} finally {
|
|
366
366
|
state0.a = a;
|
|
367
367
|
}
|
|
@@ -369,77 +369,77 @@ function __wbg_get_imports() {
|
|
|
369
369
|
const ret = new Promise(cb0);
|
|
370
370
|
return addHeapObject(ret);
|
|
371
371
|
} finally {
|
|
372
|
-
state0.a =
|
|
372
|
+
state0.a = 0;
|
|
373
373
|
}
|
|
374
374
|
},
|
|
375
|
-
|
|
375
|
+
__wbg_next_7eee17bf2cc62f05: function() { return handleError(function (arg0) {
|
|
376
376
|
const ret = getObject(arg0).next();
|
|
377
377
|
return addHeapObject(ret);
|
|
378
378
|
}, arguments); },
|
|
379
|
-
|
|
379
|
+
__wbg_prototypesetcall_3e05eb9545565046: function(arg0, arg1, arg2) {
|
|
380
380
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
381
381
|
},
|
|
382
|
-
|
|
382
|
+
__wbg_queueMicrotask_abaf92f0bd4e80a4: function(arg0) {
|
|
383
383
|
const ret = getObject(arg0).queueMicrotask;
|
|
384
384
|
return addHeapObject(ret);
|
|
385
385
|
},
|
|
386
|
-
|
|
386
|
+
__wbg_queueMicrotask_df5a6dac26d818f3: function(arg0) {
|
|
387
387
|
queueMicrotask(getObject(arg0));
|
|
388
388
|
},
|
|
389
|
-
|
|
389
|
+
__wbg_resolve_0a79de24e9d2267b: function(arg0) {
|
|
390
390
|
const ret = Promise.resolve(getObject(arg0));
|
|
391
391
|
return addHeapObject(ret);
|
|
392
392
|
},
|
|
393
|
-
__wbg_set_282384002438957f: function(arg0, arg1, arg2) {
|
|
394
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
395
|
-
},
|
|
396
393
|
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
397
394
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
398
395
|
},
|
|
399
|
-
|
|
396
|
+
__wbg_set_6c60b2e8ad0e9383: function(arg0, arg1, arg2) {
|
|
397
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
398
|
+
},
|
|
399
|
+
__wbg_size_7306c9406e13bf29: function(arg0) {
|
|
400
400
|
const ret = getObject(arg0).size;
|
|
401
401
|
return ret;
|
|
402
402
|
},
|
|
403
|
-
|
|
404
|
-
const ret = typeof
|
|
403
|
+
__wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f: function() {
|
|
404
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
405
405
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
406
406
|
},
|
|
407
|
-
|
|
408
|
-
const ret = typeof
|
|
407
|
+
__wbg_static_accessor_GLOBAL_f2e0f995a21329ff: function() {
|
|
408
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
409
409
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
410
410
|
},
|
|
411
|
-
|
|
411
|
+
__wbg_static_accessor_SELF_24f78b6d23f286ea: function() {
|
|
412
412
|
const ret = typeof self === 'undefined' ? null : self;
|
|
413
413
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
414
414
|
},
|
|
415
|
-
|
|
415
|
+
__wbg_static_accessor_WINDOW_59fd959c540fe405: function() {
|
|
416
416
|
const ret = typeof window === 'undefined' ? null : window;
|
|
417
417
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
418
418
|
},
|
|
419
|
-
|
|
419
|
+
__wbg_storage_8f8e63186ec77353: function(arg0) {
|
|
420
420
|
const ret = getObject(arg0).storage;
|
|
421
421
|
return addHeapObject(ret);
|
|
422
422
|
},
|
|
423
|
-
|
|
424
|
-
const ret = getObject(arg0).then(getObject(arg1));
|
|
423
|
+
__wbg_then_00eed3ac0b8e82cb: function(arg0, arg1, arg2) {
|
|
424
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
425
425
|
return addHeapObject(ret);
|
|
426
426
|
},
|
|
427
|
-
|
|
428
|
-
const ret = getObject(arg0).then(getObject(arg1)
|
|
427
|
+
__wbg_then_a0c8db0381c8994c: function(arg0, arg1) {
|
|
428
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
429
429
|
return addHeapObject(ret);
|
|
430
430
|
},
|
|
431
|
-
|
|
431
|
+
__wbg_value_7f6052747ccf940f: function(arg0) {
|
|
432
432
|
const ret = getObject(arg0).value;
|
|
433
433
|
return addHeapObject(ret);
|
|
434
434
|
},
|
|
435
435
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
436
|
-
// Cast intrinsic for `Closure(Closure {
|
|
437
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
436
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
437
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_138);
|
|
438
438
|
return addHeapObject(ret);
|
|
439
439
|
},
|
|
440
440
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
441
|
-
// Cast intrinsic for `Closure(Closure {
|
|
442
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
441
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("IteratorResult<any>")], shim_idx: 1, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
442
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_138_1);
|
|
443
443
|
return addHeapObject(ret);
|
|
444
444
|
},
|
|
445
445
|
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
@@ -494,8 +494,8 @@ function __wasm_bindgen_func_elem_138_1(arg0, arg1, arg2) {
|
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
496
|
|
|
497
|
-
function
|
|
498
|
-
wasm.
|
|
497
|
+
function __wasm_bindgen_func_elem_1021(arg0, arg1, arg2, arg3) {
|
|
498
|
+
wasm.__wasm_bindgen_func_elem_1021(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
499
499
|
}
|
|
500
500
|
|
|
501
501
|
const ConversionOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -522,7 +522,7 @@ function _assertClass(instance, klass) {
|
|
|
522
522
|
|
|
523
523
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
524
524
|
? { register: () => {}, unregister: () => {} }
|
|
525
|
-
: new FinalizationRegistry(state =>
|
|
525
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_export4(state.a, state.b));
|
|
526
526
|
|
|
527
527
|
function debugString(val) {
|
|
528
528
|
// primitive types
|
|
@@ -640,8 +640,8 @@ function isLikeNone(x) {
|
|
|
640
640
|
return x === undefined || x === null;
|
|
641
641
|
}
|
|
642
642
|
|
|
643
|
-
function makeMutClosure(arg0, arg1,
|
|
644
|
-
const state = { a: arg0, b: arg1, cnt: 1
|
|
643
|
+
function makeMutClosure(arg0, arg1, f) {
|
|
644
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
645
645
|
const real = (...args) => {
|
|
646
646
|
|
|
647
647
|
// First up with a closure we increment the internal reference
|
|
@@ -659,7 +659,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
659
659
|
};
|
|
660
660
|
real._wbg_cb_unref = () => {
|
|
661
661
|
if (--state.cnt === 0) {
|
|
662
|
-
|
|
662
|
+
wasm.__wbindgen_export4(state.a, state.b);
|
|
663
663
|
state.a = 0;
|
|
664
664
|
CLOSURE_DTORS.unregister(state);
|
|
665
665
|
}
|
package/dist/mq_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mq-web",
|
|
3
3
|
"description": "A jq-like command-line tool for Markdown processing",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.25",
|
|
5
5
|
"author": "harehare",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bugs": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"oxlint": "^1.31.0",
|
|
12
12
|
"tsup": "^8.5.1",
|
|
13
|
-
"typescript": "^
|
|
13
|
+
"typescript": "^6.0.2"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"url": "git+https://github.com/harehare/mq.git",
|
|
31
31
|
"directory": "packages/mq-web"
|
|
32
32
|
},
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"type": "module",
|
|
35
|
+
"types": "dist/index.d.ts",
|
|
33
36
|
"scripts": {
|
|
34
37
|
"build": "tsup && rm dist/.gitignore",
|
|
35
38
|
"dev": "tsup --watch",
|
|
36
39
|
"type-check": "tsc --noEmit",
|
|
37
40
|
"lint": "oxlint ."
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
"type": "module",
|
|
41
|
-
"types": "dist/index.d.ts"
|
|
42
|
-
}
|
|
41
|
+
}
|
|
42
|
+
}
|
package/dist/core.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var I=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var q=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{for(var e in t)I(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))!C.call(n,o)&&o!==e&&I(n,o,{get:()=>t[o],enumerable:!(r=L(t,o))||r.enumerable});return n};var N=n=>$(I({},"__esModule",{value:!0}),n);var z={};P(z,{ConversionOptions:()=>h,RunOptions:()=>O,default:()=>H,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=l(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,l(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;l(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(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 l(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,l(o)?0:o,!0),d().setInt32(t+0,!l(o),!0)},__wbg___wbindgen_string_get_395e606bd0ee4427:function(t,e){let r=_(e),o=typeof r=="string"?r:void 0;var c=l(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 v(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 v(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 l(t)?0:s(t)},__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:s(t)},__wbg_static_accessor_SELF_f207c857566db248:function(){let t=typeof self>"u"?null:self;return l(t)?0:s(t)},__wbg_static_accessor_WINDOW_bb9f1ba69d61b386:function(){let t=typeof window>"u"?null:window;return l(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=E(t,e,i.__wasm_bindgen_func_elem_137,nt);return s(r)},__wbindgen_cast_0000000000000002:function(t,e){let r=E(t,e,i.__wasm_bindgen_func_elem_137,et);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 nt(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_138(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_138_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_991(n,t,s(e),s(r))}function s(n){F===w.length&&w.push(w.length+1);let t=F;return F=w[t],w[t]=n,t}function _t(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 st(n){n<1028||(w[n]=F,F=n)}function ct(n,t){return n=n>>>0,A().subarray(n/1,n/1+t)}function d(){return(m===null||m.buffer.detached===!0||m.buffer.detached===void 0&&m.buffer!==i.memory.buffer)&&(m=new DataView(i.memory.buffer)),m}function j(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 w[n]}function v(n,t){try{return n.apply(this,t)}catch(e){i.__wbindgen_export3(s(e))}}function l(n){return n==null}function E(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 st(n),t}function ft(n,t){return T+=t,T>=at&&(k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),k.decode(),T=t),k.decode(A().subarray(n,n+t))}function V(n,t){return i=n.exports,ut=t,m=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 H(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,D,m,x,w,F,k,at,T,S,u,ut,i,R=q(()=>{"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));D=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));m=null;x=null;w=new Array(1024).fill(void 0);w.push(void 0,null,!0,!1);F=w.length;k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});k.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 Ft={};P(Ft,{definedValues:()=>ht,diagnostics:()=>yt,format:()=>pt,htmlToMarkdown:()=>xt,inlayHints:()=>mt,run:()=>lt,toAst:()=>wt,toHtml:()=>At});module.exports=N(Ft);R();var M=null;async function y(){return M||(await(async()=>{try{await H();let n=await Promise.resolve().then(()=>(R(),z));M={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,inlayHints:n.inlayHints,definedValues:n.definedValues,htmlToMarkdown:n.htmlToMarkdown,toHtml:n.toHtml}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),M)}async function lt(n,t,e={}){return await(await y()).run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function wt(n){return await(await y()).toAst(n)}async function pt(n){return await(await y()).format(n)}async function yt(n,t){return await(await y()).diagnostics(n,t)}async function mt(n){return await(await y()).inlayHints(n)}async function ht(n,t){return await(await y()).definedValues(n,t)}async function xt(n,t){return await(await y()).htmlToMarkdown(n,t)}async function At(n){return await(await y()).toHtml(n)}0&&(module.exports={definedValues,diagnostics,format,htmlToMarkdown,inlayHints,run,toAst,toHtml});
|
package/dist/core.d.cts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
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
|
|
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 from mq code
|
|
68
|
-
*/
|
|
69
|
-
declare function definedValues(code: string, module?: string): Promise<ReadonlyArray<DefinedValue>>;
|
|
70
|
-
/**
|
|
71
|
-
* Converts HTML input to Markdown
|
|
72
|
-
*/
|
|
73
|
-
declare function htmlToMarkdown(html: string, options?: ConversionOptions): Promise<string>;
|
|
74
|
-
/**
|
|
75
|
-
* Markdown Input to HTML
|
|
76
|
-
*/
|
|
77
|
-
declare function toHtml(markdownInput: string): Promise<string>;
|
|
78
|
-
|
|
79
|
-
export { definedValues, diagnostics, format, htmlToMarkdown, inlayHints, run, toAst, toHtml };
|
package/dist/index.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var I=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var X=Object.prototype.hasOwnProperty;var Y=(n,t)=>()=>(n&&(t=n(n=0)),t);var R=(n,t)=>{for(var e in t)I(n,e,{get:t[e],enumerable:!0})},K=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of J(t))!X.call(n,o)&&o!==e&&I(n,o,{get:()=>t[o],enumerable:!(r=G(t,o))||r.enumerable});return n};var Q=n=>K(I({},"__esModule",{value:!0}),n);var z={};R(z,{ConversionOptions:()=>m,RunOptions:()=>S,default:()=>D,definedValues:()=>Z,diagnostics:()=>tt,format:()=>nt,htmlToMarkdown:()=>et,initSync:()=>mt,inlayHints:()=>rt,run:()=>ot,toAst:()=>it,toHtml:()=>_t});function Z(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u;var o=l(t)?0:g(t,i.__wbindgen_export,i.__wbindgen_export2),c=u;let a=i.definedValues(e,r,o,c);return b(a)}function tt(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=i.diagnostics(e,r,l(t)?16777215:t?1:0);return b(o)}function nt(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.format(t,e);return b(r)}function et(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=0;l(t)||(bt(t,m),o=t.__destroy_into_raw());let c=i.htmlToMarkdown(e,r,o);return b(c)}function rt(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.inlayHints(t,e);return b(r)}function ot(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 it(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toAst(t,e);return b(r)}function _t(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toHtml(t,e);return b(r)}function V(){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 l(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,l(o)?0:o,!0),d().setInt32(t+0,!l(o),!0)},__wbg___wbindgen_string_get_395e606bd0ee4427:function(t,e){let r=_(e),o=typeof r=="string"?r:void 0;var c=l(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 v(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 at(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 v(function(t){let e=_(t).next();return s(e)},arguments)},__wbg_prototypesetcall_d62e5099504357e6:function(t,e,r){Uint8Array.prototype.set.call(dt(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 l(t)?0:s(t)},__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913:function(){let t=typeof globalThis>"u"?null:globalThis;return l(t)?0:s(t)},__wbg_static_accessor_SELF_f207c857566db248:function(){let t=typeof self>"u"?null:self;return l(t)?0:s(t)},__wbg_static_accessor_WINDOW_bb9f1ba69d61b386:function(){let t=typeof window>"u"?null:window;return l(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=E(t,e,i.__wasm_bindgen_func_elem_137,st);return s(r)},__wbindgen_cast_0000000000000002:function(t,e){let r=E(t,e,i.__wasm_bindgen_func_elem_137,ct);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 st(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_138(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){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_138_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 at(n,t,e,r){i.__wasm_bindgen_func_elem_991(n,t,s(e),s(r))}function s(n){F===w.length&&w.push(w.length+1);let t=F;return F=w[t],w[t]=n,t}function bt(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 gt(n){n<1028||(w[n]=F,F=n)}function dt(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,wt(n,t)}function A(){return(x===null||x.byteLength===0)&&(x=new Uint8Array(i.memory.buffer)),x}function _(n){return w[n]}function v(n,t){try{return n.apply(this,t)}catch(e){i.__wbindgen_export3(s(e))}}function l(n){return n==null}function E(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,P.unregister(o))},P.register(c,o,o),c}function g(n,t,e){if(e===void 0){let f=O.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=O.encodeInto(n,f);a+=p.written,o=e(o,r,a,1)>>>0}return u=a,o}function b(n){let t=_(n);return gt(n),t}function wt(n,t){return H+=t,H>=lt&&(k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),k.decode(),H=t),k.decode(A().subarray(n,n+t))}function U(n,t){return i=n.exports,pt=t,y=null,x=null,i}async function yt(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 mt(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=V();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let e=new WebAssembly.Instance(n,t);return U(e,n)}async function D(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",ht.url));let t=V();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:e,module:r}=await yt(await n,t);return U(e,r)}var ht,m,S,ft,ut,P,y,x,w,F,k,lt,H,O,u,pt,i,W=Y(()=>{"use strict";ht={},m=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_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);S=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();i.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(S.prototype[Symbol.dispose]=S.prototype.free);ft=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_conversionoptions_free(n>>>0,1)),ut=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_runoptions_free(n>>>0,1));P=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));y=null;x=null;w=new Array(1024).fill(void 0);w.push(void 0,null,!0,!1);F=w.length;k=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});k.decode();lt=2146435072,H=0;O=new TextEncoder;"encodeInto"in O||(O.encodeInto=function(n,t){let e=O.encode(n);return t.set(e),{read:n.length,written:e.length}});u=0});var xt={};R(xt,{definedValues:()=>N,diagnostics:()=>C,format:()=>B,inlayHints:()=>$,run:()=>q,toAst:()=>L});module.exports=Q(xt);W();var M=null;async function h(){return M||(await(async()=>{try{await D();let n=await Promise.resolve().then(()=>(W(),z));M={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,inlayHints:n.inlayHints,definedValues:n.definedValues,htmlToMarkdown:n.htmlToMarkdown,toHtml:n.toHtml}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),M)}async function q(n,t,e={}){return await(await h()).run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function L(n){return await(await h()).toAst(n)}async function B(n){return await(await h()).format(n)}async function C(n,t){return await(await h()).diagnostics(n,t)}async function $(n){return await(await h()).inlayHints(n)}async function N(n,t){return await(await h()).definedValues(n,t)}0&&(module.exports={definedValues,diagnostics,format,inlayHints,run,toAst});
|
package/dist/index.d.cts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export { definedValues, diagnostics, format, inlayHints, run, toAst } from './core.cjs';
|
|
2
|
-
|
|
3
|
-
/* tslint:disable */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
|
|
6
|
-
type DefinedValueType = 'Function' | 'Variable';
|
|
7
|
-
|
|
8
|
-
interface DefinedValue {
|
|
9
|
-
name: string;
|
|
10
|
-
args?: string[];
|
|
11
|
-
doc: string;
|
|
12
|
-
valueType: DefinedValueType;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface Diagnostic {
|
|
16
|
-
startLine: number,
|
|
17
|
-
startColumn: number,
|
|
18
|
-
endLine: number,
|
|
19
|
-
endColumn: number,
|
|
20
|
-
message: string,
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
interface InlayHint {
|
|
24
|
-
line: number,
|
|
25
|
-
column: number,
|
|
26
|
-
label: string,
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interface Options {
|
|
30
|
-
isUpdate: boolean,
|
|
31
|
-
inputFormat: 'markdown' | 'text' | 'mdx' | 'html' | 'null' | 'raw' | null,
|
|
32
|
-
listStyle: 'dash' | 'plus' | 'star' | null,
|
|
33
|
-
linkTitleStyle: 'double' | 'single' | 'paren' | null,
|
|
34
|
-
linkUrlStyle: 'angle' | 'none' | null,
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export type { DefinedValue, DefinedValueType, Diagnostic, InlayHint, Options };
|