md2x 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/chunks/chunk-2LPNL4GA.js +1 -0
  2. package/dist/chunks/chunk-3P5X57NT.js +262 -0
  3. package/dist/chunks/chunk-3VL755NO.js +1 -0
  4. package/dist/chunks/chunk-5DPTQTJJ.js +1 -0
  5. package/dist/chunks/chunk-5DRL26RK.js +108 -0
  6. package/dist/chunks/chunk-AK6TXLWO.js +1 -0
  7. package/dist/chunks/chunk-CN4F5HOV.js +5 -0
  8. package/dist/chunks/chunk-CVKZIRZW.js +5 -0
  9. package/dist/chunks/chunk-DFROP2PD.js +11 -0
  10. package/dist/chunks/chunk-DJGIYXVP.js +3 -0
  11. package/dist/chunks/chunk-IENSDROB.js +1 -0
  12. package/dist/chunks/chunk-LLCWR7UA.js +1 -0
  13. package/dist/chunks/chunk-MHCTK6WW.js +1 -0
  14. package/dist/chunks/chunk-NM6J3ND7.js +1 -0
  15. package/dist/chunks/chunk-PARPCLXM.js +1 -0
  16. package/dist/chunks/chunk-PUOHPY5L.js +16 -0
  17. package/dist/chunks/chunk-PXO7VHRW.js +723 -0
  18. package/dist/chunks/chunk-R65AQGTF.js +1 -0
  19. package/dist/chunks/chunk-R6G2575A.js +3 -0
  20. package/dist/chunks/chunk-TRGQPVRY.js +2 -0
  21. package/dist/chunks/chunk-URO5RPHJ.js +9 -0
  22. package/dist/chunks/chunk-YFL3W3OS.js +1 -0
  23. package/dist/chunks/chunk-Z4LVGK7Y.js +1 -0
  24. package/dist/chunks/docx-exporter-FGXU5MTK.js +1 -0
  25. package/dist/chunks/rehype-highlight-Y4Q4RX67.js +1 -0
  26. package/dist/chunks/rehype-katex-FXTCTSUE.js +1 -0
  27. package/dist/chunks/rehype-stringify-4CQSSRDL.js +1 -0
  28. package/dist/chunks/remark-gfm-BUZ4SLP3.js +1 -0
  29. package/dist/chunks/remark-math-HEZQAPFK.js +1 -0
  30. package/dist/chunks/remark-parse-QC7TSXTK.js +1 -0
  31. package/dist/chunks/remark-rehype-C2LX643P.js +1 -0
  32. package/dist/chunks/remark-super-sub-EP2AQS54.js +1 -0
  33. package/dist/chunks/theme-manager-AZBU2SLL.js +1 -0
  34. package/dist/chunks/theme-to-css-GLV3WYDU.js +85 -0
  35. package/dist/chunks/unified-PU53JLVJ.js +1 -0
  36. package/dist/chunks/unist-util-visit-SBSD62C6.js +1 -0
  37. package/dist/index.js +1 -0
  38. package/dist/md2x.js +37 -0
  39. package/dist/renderer/puppeteer-render.html +1 -2812
  40. package/dist/types/node/src/host/browser-renderer.d.ts +31 -4
  41. package/dist/types/node/src/host/index.d.ts +94 -0
  42. package/dist/types/node/src/host/node-exporter.d.ts +3 -12
  43. package/dist/types/node/src/index.d.ts +1 -8
  44. package/package.json +11 -7
  45. package/dist/index.mjs +0 -128685
  46. package/dist/md2x.mjs +0 -128921
@@ -0,0 +1 @@
1
+ import{b as I}from"./chunk-MHCTK6WW.js";import{b as R,d as Y}from"./chunk-NM6J3ND7.js";var k=R((Q,F)=>{"use strict";var m=Object.prototype.hasOwnProperty,D=Object.prototype.toString,T=Object.defineProperty,C=Object.getOwnPropertyDescriptor,S=function(e){return typeof Array.isArray=="function"?Array.isArray(e):D.call(e)==="[object Array]"},j=function(e){if(!e||D.call(e)!=="[object Object]")return!1;var t=m.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&m.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!r)return!1;var i;for(i in e);return typeof i>"u"||m.call(e,i)},V=function(e,t){T&&t.name==="__proto__"?T(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},_=function(e,t){if(t==="__proto__")if(m.call(e,t)){if(C)return C(e,t).value}else return;return e[t]};F.exports=function n(){var e,t,r,i,a,c,o=arguments[0],p=1,s=arguments.length,f=!1;for(typeof o=="boolean"&&(f=o,o=arguments[1]||{},p=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});p<s;++p)if(e=arguments[p],e!=null)for(t in e)r=_(o,t),i=_(e,t),o!==i&&(f&&i&&(j(i)||(a=S(i)))?(a?(a=!1,c=r&&S(r)?r:[]):c=r&&j(r)?r:{},V(o,{name:t,newValue:n(f,c,i)})):typeof i<"u"&&V(o,{name:t,newValue:i}));return o}});function b(n){if(n)throw n}var g=Y(k(),1);function d(n){if(typeof n!="object"||n===null)return!1;let e=Object.getPrototypeOf(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function x(){let n=[],e={run:t,use:r};return e;function t(...i){let a=-1,c=i.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);o(null,...i);function o(p,...s){let f=n[++a],u=-1;if(p){c(p);return}for(;++u<i.length;)(s[u]===null||s[u]===void 0)&&(s[u]=i[u]);i=s,f?L(f,o)(...s):c(null,...s)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return n.push(i),e}}function L(n,e){let t;return r;function r(...c){let o=n.length>c.length,p;o&&c.push(i);try{p=n.apply(this,c)}catch(s){let f=s;if(o&&t)throw f;return i(f)}o||(p&&p.then&&typeof p.then=="function"?p.then(a,i):p instanceof Error?i(p):a(p))}function i(c,...o){t||(t=!0,e(c,...o))}function a(c){i(null,c)}}var N=(function(n){let r=this.constructor.prototype,i=r[n],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a});var q={}.hasOwnProperty,z=class n extends N{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=x()}copy(){let e=new n,t=-1;for(;++t<this.attachers.length;){let r=this.attachers[t];e.use(...r)}return e.data((0,g.default)(!0,{},this.namespace)),e}data(e,t){return typeof e=="string"?arguments.length===2?(E("data",this.frozen),this.namespace[e]=t,this):q.call(this.namespace,e)&&this.namespace[e]||void 0:e?(E("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let i=t.call(e,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let t=w(e),r=this.parser||this.Parser;return P("parse",r),r(String(t),t)}process(e,t){let r=this;return this.freeze(),P("process",this.parser||this.Parser),O("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(a,c){let o=w(e),p=r.parse(o);r.run(p,o,function(f,u,l){if(f||!u||!l)return s(f);let h=u,y=r.stringify(h,l);J(y)?l.value=y:l.result=y,s(f,l)});function s(f,u){f||!u?c(f):a?a(u):t(void 0,u)}}}processSync(e){let t=!1,r;return this.freeze(),P("processSync",this.parser||this.Parser),O("processSync",this.compiler||this.Compiler),this.process(e,i),B("processSync","process",t),r;function i(a,c){t=!0,b(a),r=c}}run(e,t,r){U(e),this.freeze();let i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?a(void 0,r):new Promise(a);function a(c,o){let p=w(t);i.run(e,p,s);function s(f,u,l){let h=u||e;f?o(f):c?c(h):r(void 0,h,l)}}}runSync(e,t){let r=!1,i;return this.run(e,t,a),B("runSync","run",r),i;function a(c,o){b(c),i=o,r=!0}}stringify(e,t){this.freeze();let r=w(t),i=this.compiler||this.Compiler;return O("stringify",i),U(e),i(e,r)}use(e,...t){let r=this.attachers,i=this.namespace;if(E("use",this.frozen),e!=null)if(typeof e=="function")p(e,t);else if(typeof e=="object")Array.isArray(e)?o(e):c(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function a(s){if(typeof s=="function")p(s,[]);else if(typeof s=="object")if(Array.isArray(s)){let[f,...u]=s;p(f,u)}else c(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function c(s){if(!("plugins"in s)&&!("settings"in s))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(s.plugins),s.settings&&(i.settings=(0,g.default)(!0,i.settings,s.settings))}function o(s){let f=-1;if(s!=null)if(Array.isArray(s))for(;++f<s.length;){let u=s[f];a(u)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function p(s,f){let u=-1,l=-1;for(;++u<r.length;)if(r[u][0]===s){l=u;break}if(l===-1)r.push([s,...f]);else if(f.length>0){let[h,...y]=f,A=r[l][1];d(A)&&d(h)&&(h=(0,g.default)(!0,A,h)),r[l]=[s,h,...y]}}}},G=new z().freeze();function P(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function O(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function E(n,e){if(e)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function U(n){if(!d(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function B(n,e,t){if(!t)throw new Error("`"+n+"` finished async. Use `"+e+"` instead")}function w(n){return H(n)?n:new I(n)}function H(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function J(n){return typeof n=="string"||K(n)}function K(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}export{G as a};