markstream-vue 0.0.2-beta.8 → 0.0.2-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/README.zh-CN.md +1 -0
- package/dist/exports-CyoL-8XF.js +4827 -0
- package/dist/exports-DADWwNRQ.cjs +246 -0
- package/dist/exports.js +1 -1
- package/dist/index-Br7IvHNe.cjs +1 -0
- package/dist/index-CDRkq20z.js +958 -0
- package/dist/index-CcqRGphH.cjs +22 -0
- package/dist/index-DdtMPiwH.js +113 -0
- package/dist/index-DoRl8S3_.js +122 -0
- package/dist/index-OTPe0l-Z.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +71 -62
- package/dist/index.tailwind.css +1 -1
- package/dist/index2.js +1 -1
- package/dist/index3.js +1 -1
- package/dist/index4.js +1 -1
- package/dist/tailwind.ts +0 -0
- package/package.json +7 -7
- package/dist/exports-BD7Y_TjZ.cjs +0 -247
- package/dist/exports-BreegGo9.js +0 -4719
- package/dist/index-BM9Oro93.js +0 -860
- package/dist/index-Cc3u_ylp.js +0 -117
- package/dist/index-CoB_G9GJ.cjs +0 -1
- package/dist/index-DbbC_URx.cjs +0 -1
- package/dist/index-Dq586yJ8.cjs +0 -1
- package/dist/index-ELonlW3Z.js +0 -108
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var w=(m,t,s)=>new Promise((a,i)=>{var p=n=>{try{l(s.next(n))}catch(_){i(_)}},d=n=>{try{l(s.throw(n))}catch(_){i(_)}},l=n=>n.done?a(n.value):Promise.resolve(n.value).then(p,d);l((s=s.apply(m,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),f=require("./exports-DADWwNRQ.cjs"),y={class:"math-inline__loading",role:"status","aria-live":"polite"},I=e.defineComponent({__name:"MathInlineNode",props:{node:{}},setup(m){const t=m,s=e.ref(null),a=e.ref(null);let i=!1,p=0,d=!1,l=null;const n=e.ref(!0),_=f.useViewportPriority();let r=null;function T(){return w(this,null,function*(){if(!t.node.content||!a.value||d)return;l&&(l.abort(),l=null);const u=++p,c=new AbortController;if(l=c,!i)try{!r&&s.value&&(r=_(s.value)),yield r==null?void 0:r.whenVisible}catch(o){}f.renderKaTeXWithBackpressure(t.node.content,!1,{timeout:1500,waitTimeout:0,maxRetries:0,signal:c.signal}).then(o=>{d||u!==p||a.value&&(a.value.innerHTML=o,n.value=!1,i=!0)}).catch(o=>w(null,null,function*(){if(d||u!==p||!a.value)return;const h=(o==null?void 0:o.code)||(o==null?void 0:o.name),k=h==="WORKER_INIT_ERROR"||(o==null?void 0:o.fallbackToRenderer),C=h===f.WORKER_BUSY_CODE||h==="WORKER_TIMEOUT",E=h==="KATEX_DISABLED";if(k||C){const R=yield f.getKatex();if(R){try{const g=R.renderToString(t.node.content,{throwOnError:t.node.loading,displayMode:!1});n.value=!1,a.value.innerHTML=g,i=!0,f.setKaTeXCache(t.node.content,!1,g)}catch(g){}return}}if(E){n.value=!1,a.value.textContent=t.node.raw;return}i||(n.value=!E),t.node.loading?E&&(a.value.textContent=t.node.raw):(n.value=!1,a.value.textContent=t.node.raw)}))})}return e.watch(()=>t.node.content,()=>{T()}),e.onMounted(()=>{T()}),e.onBeforeUnmount(()=>{var u;d=!0,l&&(l.abort(),l=null),(u=r==null?void 0:r.destroy)==null||u.call(r),r=null}),(u,c)=>(e.openBlock(),e.createElementBlock("span",{ref_key:"containerEl",ref:s,class:"math-inline-wrapper"},[e.withDirectives(e.createElementVNode("span",{ref_key:"mathElement",ref:a,class:"math-inline"},null,512),[[e.vShow,!n.value]]),n.value?(e.openBlock(),e.createBlock(e.Transition,{key:0,name:"table-node-fade"},{default:e.withCtx(()=>[e.createElementVNode("span",y,[e.renderSlot(u.$slots,"loading",{isLoading:n.value},()=>[c[0]||(c[0]=e.createElementVNode("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),c[1]||(c[1]=e.createElementVNode("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):e.createCommentVNode("",!0)],512))}}),v=f._export_sfc(I,[["__scopeId","data-v-fbd3ae11"]]);v.install=m=>{m.component(v.__name,v)};exports.default=v;
|