markstream-vue 0.0.2-beta.9 → 0.0.2

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/index4.js CHANGED
@@ -1 +1 @@
1
- var e=Object.defineProperty,o=Object.defineProperties,t=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,a=(o,t,n)=>t in o?e(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,r=(e,o,t)=>new Promise((n,l)=>{var i=e=>{try{r(t.next(e))}catch(o){l(o)}},a=e=>{try{r(t.throw(e))}catch(o){l(o)}},r=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,a);r((t=t.apply(e,o)).next())});import{defineComponent as u,computed as s,onMounted as c,onUnmounted as d,createBlock as v,openBlock as m,Teleport as h,createElementVNode as p,normalizeClass as w,withModifiers as f,toDisplayString as g,unref as y,getCurrentInstance as k,ref as x,watch as b,onBeforeUnmount as M,nextTick as C,createElementBlock as B,normalizeStyle as S,createCommentVNode as O,withDirectives as _,renderSlot as F,Fragment as P,vShow as E}from"vue";import{u as L,_ as T,a as H,g as N,s as $,l as z,b as D,c as j,d as Y,h as V}from"./exports.js";const W={class:"html-preview-frame__header"},I={class:"html-preview-frame__title"},q={class:"html-preview-frame__label"},R=["srcdoc"],X=/* @__PURE__ */T(/* @__PURE__ */u({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},onClose:{type:Function},title:{}},setup(e){const o=e,{t}=L(),n=s(()=>{const e=o.code||"",t=e.trim().toLowerCase();return t.startsWith("<!doctype")||t.startsWith("<html")||t.startsWith("<body")?e:`<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <style>\n html, body {\n margin: 0;\n padding: 0;\n height: 100%;\n background-color: ${o.isDark?"#020617":"#ffffff"};\n color: ${o.isDark?"#e5e7eb":"#020617"};\n }\n body {\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;\n }\n </style>\n </head>\n <body>\n ${e}\n </body>\n</html>`});function l(e){var t;"Escape"!==e.key&&"Esc"!==e.key||null==(t=o.onClose)||t.call(o)}return c(()=>{"undefined"!=typeof window&&window.addEventListener("keydown",l)}),d(()=>{"undefined"!=typeof window&&window.removeEventListener("keydown",l)}),(e,l)=>(m(),v(h,{to:"body"},[p("div",{class:w(["html-preview-frame__backdrop",{"html-preview-frame__backdrop--dark":o.isDark}]),onClick:l[2]||(l[2]=e=>{var t;return null==(t=o.onClose)?void 0:t.call(o)})},[p("div",{class:w(["html-preview-frame",{"html-preview-frame--dark":o.isDark}]),onClick:l[1]||(l[1]=f(()=>{},["stop"]))},[p("div",W,[p("div",I,[l[3]||(l[3]=p("span",{class:"html-preview-frame__dot"},null,-1)),p("span",q,g(o.title||y(t)("common.preview")||"Preview"),1)]),p("button",{type:"button",class:w(["html-preview-frame__close",{"html-preview-frame__close--dark":o.isDark}]),onClick:l[0]||(l[0]=e=>{var t;return null==(t=o.onClose)?void 0:t.call(o)})}," × ",2)]),p("iframe",{class:"html-preview-frame__iframe",sandbox:"allow-scripts allow-same-origin",srcdoc:n.value},null,8,R)],2)],2)]))}}),[["__scopeId","data-v-3cf0ed56"]]),A={key:0,class:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",style:{color:"var(--vscode-editor-foreground)","background-color":"var(--vscode-editor-background)"}},G={class:"flex items-center space-x-2 flex-1 overflow-hidden"},U=["innerHTML"],J={class:"text-sm font-medium font-mono truncate"},K={class:"flex items-center space-x-2"},Q=["aria-pressed"],Z=["disabled"],ee=["disabled"],oe=["disabled"],te=["aria-label"],ne={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},le={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},ie=["aria-pressed"],ae={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},re={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},ue=["aria-label"],se={class:"code-loading-placeholder"},ce={class:"sr-only","aria-live":"polite",role:"status"},de=/* @__PURE__ */T(/* @__PURE__ */u({__name:"CodeBlockNode",props:{node:{},isDark:{type:Boolean},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:void 0},lightTheme:{default:void 0},isShowPreview:{type:Boolean,default:!0},monacoOptions:{},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},customId:{}},emits:["previewCode","copy"],setup(e,{emit:u}){var c,h;const f=e,T=u,W=k(),I=s(()=>{const e=null==W?void 0:W.vnode.props;return!(!e||!e.onPreviewCode&&!e.onPreviewCode)}),{t:q}=L(),R=x(null),de=x(null),ve=x(!1),me=x(String(null!=(c=f.node.language)?c:"")),he=x(!1),pe=x(!1),we=x(!1),fe=x(!1),ge=x(null);let ye=0;const ke=H(),xe=x(null),be=x("undefined"==typeof window);"undefined"!=typeof window&&b(()=>de.value,e=>{var o;if(null==(o=xe.value)||o.destroy(),xe.value=null,!e)return void(be.value=!1);const t=ke(e,{rootMargin:"400px"});xe.value=t,be.value=t.isVisible.value,t.whenVisible.then(()=>{be.value=!0})},{immediate:!0}),M(()=>{var e;null==(e=xe.value)||e.destroy(),xe.value=null});let Me=null,Ce=null,Be=()=>{},Se=()=>{},Oe=()=>null,_e=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),Fe=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),Pe=()=>{},Ee=()=>{},Le=null,Te=()=>{var e;return String(null!=(e=f.node.language)?e:"plaintext")},He=()=>r(null,null,function*(){});const Ne=s(()=>f.node.diff),$e=x(!1),ze=x(!1);"undefined"!=typeof window&&r(null,null,function*(){try{const r=yield N();if(!r)return void($e.value=!0);const u=r.useMonaco,s=r.detectLanguage;if("function"==typeof s&&(Te=s),"function"==typeof u){const r=co();if(r&&f.themes&&Array.isArray(f.themes)&&!f.themes.includes(r))throw new Error("Preferred theme not in provided themes array");const s=u((e=((e,o)=>{for(var t in o||(o={}))l.call(o,t)&&a(e,t,o[t]);if(n)for(var t of n(o))i.call(o,t)&&a(e,t,o[t]);return e})({wordWrap:"on",wrappingIndent:"same",themes:f.themes,theme:r},f.monacoOptions||{}),o(e,t({onThemeChange(){!function(){var e,o,t;const n=R.value,l=de.value;if(!n||!l)return;const i=n.querySelector(".monaco-editor")||n;let a=null;try{"undefined"!=typeof window&&"function"==typeof window.getComputedStyle&&(a=window.getComputedStyle(i))}catch(c){a=null}const r=String(null!=(e=null==a?void 0:a.getPropertyValue("--vscode-editor-foreground"))?e:""),u=String(null!=(o=null==a?void 0:a.getPropertyValue("--vscode-editor-background"))?o:""),s=String(null!=(t=null==a?void 0:a.getPropertyValue("--vscode-editor-hoverHighlightBackground"))?t:"");r&&u&&(l.style.setProperty("--vscode-editor-foreground",r.trim()),l.style.setProperty("--vscode-editor-background",u.trim()),l.style.setProperty("--vscode-editor-selectionBackground",s.trim()))}()}}))));Me=s.createEditor||Me,Ce=s.createDiffEditor||Ce,Be=s.updateCode||Be,Se=s.updateDiff||Se,Oe=s.getEditor||Oe,_e=s.getEditorView||_e,Fe=s.getDiffEditorView||Fe,Pe=s.cleanupEditor||Pe,Ee=s.safeClean||s.cleanupEditor||Ee,He=s.setTheme||He,fe.value=!0,R.value&&(yield ro(R.value))}}catch(r){$e.value=!0}var e});const De=x("number"==typeof(null==(h=f.monacoOptions)?void 0:h.fontSize)?f.monacoOptions.fontSize:Number.NaN),je=x(De.value),Ye=s(()=>{const e=De.value,o=je.value;return"number"==typeof e&&Number.isFinite(e)&&e>0&&"number"==typeof o&&Number.isFinite(o)&&o>0});function Ve(){var e,o,t,n,l;try{const i=Ne.value?null!=(t=null==(o=null==(e=Fe())?void 0:e.getModifiedEditor)?void 0:o.call(e))?t:Fe():_e(),a=Oe(),r=null==(n=null==a?void 0:a.EditorOption)?void 0:n.fontInfo;if(i&&null!=r){const e=null==(l=i.getOption)?void 0:l.call(i,r),o=null==e?void 0:e.fontSize;if("number"==typeof o&&Number.isFinite(o)&&o>0)return o}}catch(i){}try{const e=R.value;if(e){const o=e.querySelector(".view-lines .view-line");if(o)try{if("undefined"!=typeof window&&"function"==typeof window.getComputedStyle){const e=window.getComputedStyle(o).fontSize,t=e&&e.match(/^(\d+(?:\.\d+)?)/);if(t)return Number.parseFloat(t[1])}}catch(i){}}}catch(i){}return null}function We(e){var o,t;try{const n=Oe(),l=null==(o=null==n?void 0:n.EditorOption)?void 0:o.lineHeight;if(null!=l){const o=null==(t=null==e?void 0:e.getOption)?void 0:t.call(e,l);if("number"==typeof o&&o>0)return o}}catch(i){}const n=function(){try{const e=R.value;if(!e)return null;const o=e.querySelector(".view-lines .view-line");if(o){const e=Math.ceil(o.getBoundingClientRect().height);if(e>0)return e}}catch(i){}return null}();if(n&&n>0)return n;const l=Number.isFinite(je.value)&&je.value>0?je.value:12;return Math.max(12,Math.round(1.35*l))}function Ie(){var e;if(Number.isFinite(je.value)&&je.value>0&&Number.isFinite(De.value))return je.value;const o=Ve();return"number"==typeof(null==(e=f.monacoOptions)?void 0:e.fontSize)?(De.value=f.monacoOptions.fontSize,je.value=f.monacoOptions.fontSize,je.value):o&&o>0?(De.value=o,je.value=o,o):(De.value=12,je.value=12,12)}function qe(){var e,o,t,n,l,i,a,r,u,s,c,d,v,m;try{const h=Ne.value?Fe():_e();if(!h)return null;if(Ne.value&&(null==h?void 0:h.getOriginalEditor)&&(null==h?void 0:h.getModifiedEditor)){const v=null==(e=h.getOriginalEditor)?void 0:e.call(h),m=null==(o=h.getModifiedEditor)?void 0:o.call(h);null==(t=null==v?void 0:v.layout)||t.call(v),null==(n=null==m?void 0:m.layout)||n.call(m);const p=(null==(l=null==v?void 0:v.getContentHeight)?void 0:l.call(v))||0,w=(null==(i=null==m?void 0:m.getContentHeight)?void 0:i.call(m))||0,f=Math.max(p,w);if(f>0)return Math.ceil(f+1);const g=(null==(u=null==(r=null==(a=null==v?void 0:v.getModel)?void 0:a.call(v))?void 0:r.getLineCount)?void 0:u.call(r))||1,y=(null==(d=null==(c=null==(s=null==m?void 0:m.getModel)?void 0:s.call(m))?void 0:c.getLineCount)?void 0:d.call(c))||1,k=Math.max(g,y),x=Math.max(We(v),We(m));return Math.ceil(k*(x+1.5)+0+1)}if(null==h?void 0:h.getContentHeight){null==(v=null==h?void 0:h.layout)||v.call(h);const e=h.getContentHeight();if(e>0)return Math.ceil(e+1)}const p=null==(m=null==h?void 0:h.getModel)?void 0:m.call(h);let w=1;p&&"function"==typeof p.getLineCount&&(w=p.getLineCount());const f=We(h);return Math.ceil(w*(f+1.5)+0+1)}catch(h){return null}}function Re(){try{const e=R.value;if(!e)return;const o=e.getBoundingClientRect(),t=window.scrollY+o.top,n=qe();if(null!=n&&n>0){const l=o.height;e.style.height=`${Math.ceil(n)}px`,e.style.maxHeight="none";const i=Math.ceil(n)-l;0!==i&&t<window.scrollY&&window.scrollBy(0,i)}}catch(e){}}function Xe(){var e;try{const o=R.value;if(!o)return;const t=o.getBoundingClientRect(),n=window.scrollY+t.top,l=t.height,i=function(){var e,o;const t=null!=(o=null==(e=f.monacoOptions)?void 0:e.MAX_HEIGHT)?o:500;if("number"==typeof t)return t;const n=String(t).match(/^(\d+(?:\.\d+)?)/);return n?Number.parseFloat(n[1]):500}();if(ye>0&&(ye--,null!=ge.value)){const e=Math.min(ge.value,i);o.style.height=`${Math.ceil(e)}px`,o.style.maxHeight=`${Math.ceil(i)}px`,o.style.overflow="auto";const t=Math.ceil(e)-l;return void(0!==t&&n<window.scrollY&&window.scrollBy(0,t))}const a=qe();if(null!=a&&a>0){const e=Math.min(a,i);o.style.height=`${Math.ceil(e)}px`,o.style.maxHeight=`${Math.ceil(i)}px`,o.style.overflow="auto";const t=Math.ceil(e)-l;return void(0!==t&&n<window.scrollY&&window.scrollBy(0,t))}if(null!=ge.value){const e=Math.min(ge.value,i);o.style.height=`${Math.ceil(e)}px`,o.style.maxHeight=`${Math.ceil(i)}px`,o.style.overflow="auto";const t=Math.ceil(e)-l;return void(0!==t&&n<window.scrollY&&window.scrollBy(0,t))}const r=Math.ceil((null==(e=o.getBoundingClientRect)?void 0:e.call(o).height)||0);if(r>0){const e=Math.min(r,i);o.style.height=`${Math.ceil(e)}px`,o.style.maxHeight=`${Math.ceil(i)}px`,o.style.overflow="auto";const t=Math.ceil(e)-l;return void(0!==t&&n<window.scrollY&&window.scrollBy(0,t))}const u=Number.parseFloat(o.style.height);if(!Number.isNaN(u)&&u>0){const e=Math.ceil(Math.min(u,i));o.style.height=`${e}px`;const t=e-l;0!==t&&n<window.scrollY&&window.scrollBy(0,t)}else{const e=Math.ceil(i);o.style.height=`${e}px`;const t=e-l;0!==t&&n<window.scrollY&&window.scrollBy(0,t)}o.style.maxHeight=`${Math.ceil(i)}px`,o.style.overflow="auto"}catch(o){}}const Ae=s(()=>{const e=me.value.trim().toLowerCase();return f.isShowPreview&&("html"===e||"svg"===e)}),Ge=s(()=>"mermaid"===me.value.trim().toLowerCase());b(()=>f.node.language,e=>{me.value=e}),b(()=>f.node.code,e=>r(null,null,function*(){var o,t;if(!1!==f.stream){if(me.value||(me.value=Te(e)),Me&&!we.value&&R.value)try{yield ro(R.value)}catch(n){}Ne.value?Se(String(null!=(o=f.node.originalCode)?o:""),String(null!=(t=f.node.updatedCode)?t:""),me.value):Be(e,me.value),he.value&&$(()=>Re())}}));const Ue=s(()=>{const e=me.value.trim().toLowerCase();return z[e]||e.charAt(0).toUpperCase()+e.slice(1)}),Je=s(()=>{const e=me.value.trim().toLowerCase();return D(e.split(":")[0])}),Ke=s(()=>{const e={},o=e=>{if(null!=e)return"number"==typeof e?`${e}px`:String(e)},t=o(f.minWidth),n=o(f.maxWidth);return t&&(e.minWidth=t),n&&(e.maxWidth=n),e});function Qe(){return r(this,null,function*(){try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(f.node.code)),ve.value=!0,T("copy",f.node.code),setTimeout(()=>{ve.value=!1},1e3)}catch(e){console.error("复制失败:",e)}})}function Ze(e){return!e||e.disabled}function eo(e,o,t="top"){if(Ze(e.currentTarget))return;const n=e,l=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;Y(e.currentTarget,o,t,!1,l,f.isDark)}function oo(){V()}function to(e){if(Ze(e.currentTarget))return;const o=ve.value?q("common.copied")||"Copied":q("common.copy")||"Copy",t=e,n=null!=(null==t?void 0:t.clientX)&&null!=(null==t?void 0:t.clientY)?{x:t.clientX,y:t.clientY}:void 0;Y(e.currentTarget,o,"top",!1,n,f.isDark)}function no(){he.value=!he.value;const e=Ne.value?Fe():_e(),o=R.value;e&&o&&(he.value?(ao(!0),o.style.maxHeight="none",o.style.overflow="visible",Re()):(ao(!1),o.style.overflow="auto",Xe()))}function lo(){var e,o,t;if(pe.value=!pe.value,pe.value){if(R.value){const t=Math.ceil((null==(o=(e=R.value).getBoundingClientRect)?void 0:o.call(e).height)||0);t>0&&(ge.value=t)}ao(!1)}else{he.value&&ao(!0),R.value&&null!=ge.value&&(R.value.style.height=`${ge.value}px`);const e=Ne.value?Fe():_e();try{null==(t=null==e?void 0:e.layout)||t.call(e)}catch(n){}ye=2,$(()=>{he.value?Re():Xe()})}}function io(){if(!Ae.value)return;const e=(me.value||f.node.language).toLowerCase();if(I.value){const o="html"===e?"text/html":"image/svg+xml",t="html"===e?q("artifacts.htmlPreviewTitle")||"HTML Preview":q("artifacts.svgPreviewTitle")||"SVG Preview";return void T("previewCode",{node:f.node,artifactType:o,artifactTitle:t,id:`temp-${e}-${Date.now()}`})}"html"===e&&(ze.value=!ze.value)}function ao(e){var o,t;try{if(Ne.value){const t=Fe();null==(o=null==t?void 0:t.updateOptions)||o.call(t,{automaticLayout:e})}else{const o=_e();null==(t=null==o?void 0:o.updateOptions)||t.call(o,{automaticLayout:e})}}catch(n){}}function ro(e){if(!Me)return null;if(Le)return Le;we.value=!0;const o=r(null,null,function*(){yield function(e){return r(this,null,function*(){var o,t,n;if(!Me)return;Ne.value?(Ee(),Ce?yield Ce(e,String(null!=(o=f.node.originalCode)?o:""),String(null!=(t=f.node.updatedCode)?t:""),me.value):yield Me(e,f.node.code,me.value)):yield Me(e,f.node.code,me.value);const l=Ne.value?Fe():_e();if("number"==typeof(null==(n=f.monacoOptions)?void 0:n.fontSize))null==l||l.updateOptions({fontSize:f.monacoOptions.fontSize,automaticLayout:!1}),De.value=f.monacoOptions.fontSize,je.value=f.monacoOptions.fontSize;else{const e=Ve();e&&e>0?(De.value=e,je.value=e):(De.value=12,je.value=12)}he.value||pe.value||Xe(),!1===f.loading&&(yield C(),$(()=>{he.value&&!pe.value?Re():pe.value||Xe()}))})}(e)});return Le=o.finally(()=>{Le=null}),Le}b(()=>je.value,(e,o)=>{const t=Ne.value?Fe():_e();t&&"number"==typeof e&&Number.isFinite(e)&&e>0&&(t.updateOptions({fontSize:e}),he.value&&!pe.value&&Re())},{flush:"post",immediate:!1});const uo=b(()=>[R.value,Ge.value,Ne.value,f.stream,f.loading,fe.value,be.value],e=>r(null,[e],function*([e,o,t,n,l,i,a]){if(!e||!Me)return;if(!a)return;if(!1===n&&!1!==l)return;if(Ge.value)return Pe(),void uo();const r=ro(e);r&&(yield r,uo())})),so=b(()=>[f.darkTheme,f.lightTheme,we.value,be.value],()=>{if(we.value&&be.value)return Ge.value?so():void function(){const e=co();e&&He(e)}()});function co(){return f.isDark?f.darkTheme:f.lightTheme}const vo=b(()=>[f.monacoOptions,be.value],()=>{var e,o;if(!Me||!be.value)return;if(Ge.value)return vo();const t=Ne.value?Fe():_e(),n="number"==typeof(null==(e=f.monacoOptions)?void 0:e.fontSize)?f.monacoOptions.fontSize:Number.isFinite(je.value)?je.value:void 0;"number"==typeof n&&Number.isFinite(n)&&n>0&&(null==(o=null==t?void 0:t.updateOptions)||o.call(t,{fontSize:n})),he.value&&!pe.value?Re():pe.value||Xe()},{deep:!0}),mo=b(()=>[f.loading,be.value],e=>r(null,[e],function*([e,o]){o&&(Ge.value?C(()=>{null==mo||mo()}):e||(yield C(),$(()=>{pe.value||(he.value?Re():Xe()),mo()})))}),{immediate:!0,flush:"post"});return d(()=>{Pe()}),(o,t)=>$e.value?(m(),v(y(j),{key:0,node:e.node,loading:f.loading},null,8,["node","loading"])):(m(),B("div",{key:1,ref_key:"container",ref:de,style:S(Ke.value),class:w(["code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",[f.isDark?"border-gray-700/30 bg-gray-900":"border-gray-200 bg-white",{"is-rendering":f.loading,"is-dark":f.isDark}]])},[f.showHeader?(m(),B("div",A,[F(o.$slots,"header-left",{},()=>[p("div",G,[p("span",{class:"icon-slot h-4 w-4 flex-shrink-0",innerHTML:Je.value},null,8,U),p("span",J,g(Ue.value),1)])],!0),F(o.$slots,"header-right",{},()=>[p("div",K,[p("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":pe.value,onClick:lo,onMouseenter:t[0]||(t[0]=e=>eo(e,pe.value?y(q)("common.expand")||"Expand":y(q)("common.collapse")||"Collapse")),onFocus:t[1]||(t[1]=e=>eo(e,pe.value?y(q)("common.expand")||"Expand":y(q)("common.collapse")||"Collapse")),onMouseleave:oo,onBlur:oo},[(m(),B("svg",{style:S({rotate:pe.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[...t[17]||(t[17]=[p("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,Q),f.showFontSizeButtons&&f.enableFontSizeControl?(m(),B(P,{key:0},[p("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!!Number.isFinite(je.value)&&je.value<=10,onClick:t[2]||(t[2]=e=>function(){const e=Ie(),o=Math.max(10,e-1);je.value=o}()),onMouseenter:t[3]||(t[3]=e=>eo(e,y(q)("common.decrease")||"Decrease")),onFocus:t[4]||(t[4]=e=>eo(e,y(q)("common.decrease")||"Decrease")),onMouseleave:oo,onBlur:oo},[...t[18]||(t[18]=[p("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[p("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)])],40,Z),p("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!Ye.value||je.value===De.value,onClick:t[5]||(t[5]=e=>(Ie(),void(Number.isFinite(De.value)&&(je.value=De.value)))),onMouseenter:t[6]||(t[6]=e=>eo(e,y(q)("common.reset")||"Reset")),onFocus:t[7]||(t[7]=e=>eo(e,y(q)("common.reset")||"Reset")),onMouseleave:oo,onBlur:oo},[...t[19]||(t[19]=[p("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[p("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[p("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),p("path",{d:"M3 3v5h5"})])],-1)])],40,ee),p("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!!Number.isFinite(je.value)&&je.value>=36,onClick:t[8]||(t[8]=e=>function(){const e=Ie(),o=Math.min(36,e+1);je.value=o}()),onMouseenter:t[9]||(t[9]=e=>eo(e,y(q)("common.increase")||"Increase")),onFocus:t[10]||(t[10]=e=>eo(e,y(q)("common.increase")||"Increase")),onMouseleave:oo,onBlur:oo},[...t[20]||(t[20]=[p("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[p("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)])],40,oe)],64)):O("",!0),f.showCopyButton?(m(),B("button",{key:1,type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":ve.value?y(q)("common.copied")||"Copied":y(q)("common.copy")||"Copy",onClick:Qe,onMouseenter:t[11]||(t[11]=e=>to(e)),onFocus:t[12]||(t[12]=e=>to(e)),onMouseleave:oo,onBlur:oo},[ve.value?(m(),B("svg",le,[...t[22]||(t[22]=[p("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(m(),B("svg",ne,[...t[21]||(t[21]=[p("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[p("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),p("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,te)):O("",!0),f.showExpandButton?(m(),B("button",{key:2,type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":he.value,onClick:no,onMouseenter:t[13]||(t[13]=e=>eo(e,he.value?y(q)("common.collapse")||"Collapse":y(q)("common.expand")||"Expand")),onFocus:t[14]||(t[14]=e=>eo(e,he.value?y(q)("common.collapse")||"Collapse":y(q)("common.expand")||"Expand")),onMouseleave:oo,onBlur:oo},[he.value?(m(),B("svg",ae,[...t[23]||(t[23]=[p("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])):(m(),B("svg",re,[...t[24]||(t[24]=[p("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])]))],40,ie)):O("",!0),Ae.value&&f.showPreviewButton?(m(),B("button",{key:3,type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":y(q)("common.preview")||"Preview",onClick:io,onMouseenter:t[15]||(t[15]=e=>eo(e,y(q)("common.preview")||"Preview")),onFocus:t[16]||(t[16]=e=>eo(e,y(q)("common.preview")||"Preview")),onMouseleave:oo,onBlur:oo},[...t[25]||(t[25]=[p("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24"},[p("g",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"},[p("path",{d:"M23.628 7.41c-.12-1.172-.08-3.583-.9-4.233c-1.921-1.51-6.143-1.11-8.815-1.19c-3.481-.15-7.193.14-10.625.24a.34.34 0 0 0 0 .67c3.472-.05 7.074-.29 10.575-.09c2.471.15 6.653-.14 8.254 1.16c.4.33.41 2.732.49 3.582a42 42 0 0 1 .08 9.005a13.8 13.8 0 0 1-.45 3.001c-2.42 1.4-19.69 2.381-20.72.55a21 21 0 0 1-.65-4.632a41.5 41.5 0 0 1 .12-7.964c.08 0 7.334.33 12.586.24c2.331 0 4.682-.13 6.764-.21a.33.33 0 0 0 0-.66c-7.714-.16-12.897-.43-19.31.05c.11-1.38.48-3.922.38-4.002a.3.3 0 0 0-.42 0c-.37.41-.29 1.77-.36 2.251s-.14 1.07-.2 1.6a45 45 0 0 0-.36 8.645a21.8 21.8 0 0 0 .66 5.002c1.46 2.702 17.248 1.461 20.95.43c1.45-.4 1.69-.8 1.871-1.95c.575-3.809.602-7.68.08-11.496"}),p("path",{d:"M4.528 5.237a.84.84 0 0 0-.21-1c-.77-.41-1.71.39-1 1.1a.83.83 0 0 0 1.21-.1m2.632-.25c.14-.14.19-.84-.2-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.2-.09m2.88 0a.83.83 0 0 0-.21-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.21-.09m-4.29 8.735c0 .08.23 2.471.31 2.561a.371.371 0 0 0 .63-.14c0-.09 0 0 .15-1.72a10 10 0 0 0-.11-2.232a5.3 5.3 0 0 1-.26-1.37a.3.3 0 0 0-.54-.24a6.8 6.8 0 0 0-.2 2.33c-1.281-.38-1.121.13-1.131-.42a15 15 0 0 0-.19-1.93c-.16-.17-.36-.17-.51.14a20 20 0 0 0-.43 3.471c.04.773.18 1.536.42 2.272c.26.4.7.22.7-.1c0-.09-.16-.09 0-1.862c.06-1.18-.23-.3 1.16-.76m5.033-2.552c.32-.07.41-.28.39-.37c0-.55-3.322-.34-3.462-.24s-.2.18-.18.28s0 .11 0 .16a3.8 3.8 0 0 0 1.591.361v.82a15 15 0 0 0-.13 3.132c0 .2-.09.94.17 1.16a.34.34 0 0 0 .48 0c.125-.35.196-.718.21-1.09a8 8 0 0 0 .14-3.232c0-.13.05-.7-.1-.89a8 8 0 0 0 .89-.09m5.544-.181a.69.69 0 0 0-.89-.44a2.8 2.8 0 0 0-1.252 1.001a2.3 2.3 0 0 0-.41-.83a1 1 0 0 0-1.6.27a7 7 0 0 0-.35 2.07c0 .571 0 2.642.06 2.762c.14 1.09 1 .51.63.13a17.6 17.6 0 0 1 .38-3.962c.32-1.18.32.2.39.51s.11 1.081.73 1.081s.48-.93 1.401-1.78q.075 1.345 0 2.69a15 15 0 0 0 0 1.811a.34.34 0 0 0 .68 0q.112-.861.11-1.73a16.7 16.7 0 0 0 .12-3.582m1.441-.201c-.05.16-.3 3.002-.31 3.202a6.3 6.3 0 0 0 .21 1.741c.33 1 1.21 1.07 2.291.82a3.7 3.7 0 0 0 1.14-.23c.21-.22.10-.59-.41-.64q-.817.096-1.64.07c-.44-.07-.34 0-.67-4.442q.015-.185 0-.37a.316.316 0 0 0-.23-.38a.316.316 0 0 0-.38.23"})])],-1)])],40,ue)):O("",!0)])],!0)])):O("",!0),_(p("div",{ref_key:"codeEditor",ref:R,class:w(["code-editor-container",[e.stream?"":"code-height-placeholder"]])},null,2),[[E,!(pe.value||!e.stream&&e.loading)]]),ze.value&&!I.value&&Ae.value&&"html"===me.value.trim().toLowerCase()?(m(),v(X,{key:1,code:e.node.code,"is-dark":f.isDark,"on-close":()=>ze.value=!1},null,8,["code","is-dark","on-close"])):O("",!0),_(p("div",se,[F(o.$slots,"loading",{loading:e.loading,stream:e.stream},()=>[t[26]||(t[26]=p("div",{class:"loading-skeleton"},[p("div",{class:"skeleton-line"}),p("div",{class:"skeleton-line"}),p("div",{class:"skeleton-line short"})],-1))],!0)],512),[[E,!e.stream&&e.loading]]),p("span",ce,g(ve.value?y(q)("common.copied")||"Copied":""),1)],6))}}),[["__scopeId","data-v-d44250c0"]]);de.install=e=>{e.component(de.__name,de)};export{de as default};
1
+ var e=Object.defineProperty,o=Object.defineProperties,t=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,a=(o,t,n)=>t in o?e(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,r=(e,o,t)=>new Promise((n,l)=>{var i=e=>{try{r(t.next(e))}catch(o){l(o)}},a=e=>{try{r(t.throw(e))}catch(o){l(o)}},r=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,a);r((t=t.apply(e,o)).next())});import{defineComponent as u,computed as s,onMounted as c,onUnmounted as d,createBlock as v,openBlock as m,Teleport as h,createElementVNode as p,normalizeClass as f,withModifiers as w,toDisplayString as g,unref as y,getCurrentInstance as k,ref as x,watch as b,onBeforeUnmount as M,nextTick as C,createElementBlock as B,normalizeStyle as S,createCommentVNode as O,withDirectives as _,renderSlot as P,Fragment as F,vShow as E}from"vue";import{u as T,_ as H,n as N,r as $,a as z,g as D,s as L,l as j,b as Y,c as V,d as W,h as I}from"./exports.js";const q={class:"html-preview-frame__header"},R={class:"html-preview-frame__title"},X={class:"html-preview-frame__label"},A=["srcdoc"],G=/* @__PURE__ */H(/* @__PURE__ */u({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},onClose:{type:Function},title:{}},setup(e){const o=e,{t}=T(),n=s(()=>{const e=o.code||"",t=e.trim().toLowerCase();return t.startsWith("<!doctype")||t.startsWith("<html")||t.startsWith("<body")?e:`<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <style>\n html, body {\n margin: 0;\n padding: 0;\n height: 100%;\n background-color: ${o.isDark?"#020617":"#ffffff"};\n color: ${o.isDark?"#e5e7eb":"#020617"};\n }\n body {\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;\n }\n </style>\n </head>\n <body>\n ${e}\n </body>\n</html>`});function l(e){var t;"Escape"!==e.key&&"Esc"!==e.key||null==(t=o.onClose)||t.call(o)}return c(()=>{"undefined"!=typeof window&&window.addEventListener("keydown",l)}),d(()=>{"undefined"!=typeof window&&window.removeEventListener("keydown",l)}),(e,l)=>(m(),v(h,{to:"body"},[p("div",{class:f(["html-preview-frame__backdrop",{"html-preview-frame__backdrop--dark":o.isDark}]),onClick:l[2]||(l[2]=e=>{var t;return null==(t=o.onClose)?void 0:t.call(o)})},[p("div",{class:f(["html-preview-frame",{"html-preview-frame--dark":o.isDark}]),onClick:l[1]||(l[1]=w(()=>{},["stop"]))},[p("div",q,[p("div",R,[l[3]||(l[3]=p("span",{class:"html-preview-frame__dot"},null,-1)),p("span",X,g(o.title||y(t)("common.preview")||"Preview"),1)]),p("button",{type:"button",class:f(["html-preview-frame__close",{"html-preview-frame__close--dark":o.isDark}]),onClick:l[0]||(l[0]=e=>{var t;return null==(t=o.onClose)?void 0:t.call(o)})}," × ",2)]),p("iframe",{class:"html-preview-frame__iframe",sandbox:"allow-scripts allow-same-origin",srcdoc:n.value},null,8,A)],2)],2)]))}}),[["__scopeId","data-v-3cf0ed56"]]),U={key:0,class:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",style:{color:"var(--vscode-editor-foreground)","background-color":"var(--vscode-editor-background)"}},J={class:"flex items-center space-x-2 flex-1 overflow-hidden"},K=["innerHTML"],Q={class:"text-sm font-medium font-mono truncate"},Z={class:"flex items-center space-x-2"},ee=["aria-pressed"],oe=["disabled"],te=["disabled"],ne=["disabled"],le=["aria-label"],ie={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},ae={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},re=["aria-pressed"],ue={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},se={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},ce=["aria-label"],de={class:"code-loading-placeholder"},ve={class:"sr-only","aria-live":"polite",role:"status"},me=/* @__PURE__ */H(/* @__PURE__ */u({__name:"CodeBlockNode",props:{node:{},isDark:{type:Boolean},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:void 0},lightTheme:{default:void 0},isShowPreview:{type:Boolean,default:!0},monacoOptions:{},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},customId:{}},emits:["previewCode","copy"],setup(e,{emit:u}){var c;const h=e,w=u,H=k(),q=s(()=>{const e=null==H?void 0:H.vnode.props;return!(!e||!e.onPreviewCode&&!e.onPreviewCode)}),{t:R}=T(),X=x(null),A=x(null),me=x(!1),he=x(N(h.node.language)),pe=s(()=>$(he.value)),fe=x(!1),we=x(!1),ge=x(!1),ye=x(!1),ke=x(null);let xe=0;const be=z(),Me=x(null),Ce=x("undefined"==typeof window);"undefined"!=typeof window&&b(()=>A.value,e=>{var o;if(null==(o=Me.value)||o.destroy(),Me.value=null,!e)return void(Ce.value=!1);const t=be(e,{rootMargin:"400px"});Me.value=t,Ce.value=t.isVisible.value,t.whenVisible.then(()=>{Ce.value=!0})},{immediate:!0}),M(()=>{var e;null==(e=Me.value)||e.destroy(),Me.value=null});let Be=null,Se=null,Oe=()=>{},_e=()=>{},Pe=()=>null,Fe=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),Ee=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),Te=()=>{},He=()=>{},Ne=null,$e=()=>{var e;return String(null!=(e=h.node.language)?e:"plaintext")},ze=()=>r(null,null,function*(){});const De=s(()=>h.node.diff),Le=x(!1),je=x(!1);"undefined"!=typeof window&&r(null,null,function*(){try{const r=yield D();if(!r)return void(Le.value=!0);const u=r.useMonaco,s=r.detectLanguage;if("function"==typeof s&&($e=s),"function"==typeof u){const r=mo();if(r&&h.themes&&Array.isArray(h.themes)&&!h.themes.includes(r))throw new Error("Preferred theme not in provided themes array");const s=u((e=((e,o)=>{for(var t in o||(o={}))l.call(o,t)&&a(e,t,o[t]);if(n)for(var t of n(o))i.call(o,t)&&a(e,t,o[t]);return e})({wordWrap:"on",wrappingIndent:"same",themes:h.themes,theme:r},h.monacoOptions||{}),o(e,t({onThemeChange(){!function(){var e,o,t;const n=X.value,l=A.value;if(!n||!l)return;const i=n.querySelector(".monaco-editor")||n;let a=null;try{"undefined"!=typeof window&&"function"==typeof window.getComputedStyle&&(a=window.getComputedStyle(i))}catch(c){a=null}const r=String(null!=(e=null==a?void 0:a.getPropertyValue("--vscode-editor-foreground"))?e:""),u=String(null!=(o=null==a?void 0:a.getPropertyValue("--vscode-editor-background"))?o:""),s=String(null!=(t=null==a?void 0:a.getPropertyValue("--vscode-editor-hoverHighlightBackground"))?t:"");r&&u&&(l.style.setProperty("--vscode-editor-foreground",r.trim()),l.style.setProperty("--vscode-editor-background",u.trim()),l.style.setProperty("--vscode-editor-selectionBackground",s.trim()))}()}}))));Be=s.createEditor||Be,Se=s.createDiffEditor||Se,Oe=s.updateCode||Oe,_e=s.updateDiff||_e,Pe=s.getEditor||Pe,Fe=s.getEditorView||Fe,Ee=s.getDiffEditorView||Ee,Te=s.cleanupEditor||Te,He=s.safeClean||s.cleanupEditor||He,ze=s.setTheme||ze,ye.value=!0,X.value&&(yield so(X.value))}}catch(r){Le.value=!0}var e});const Ye=x("number"==typeof(null==(c=h.monacoOptions)?void 0:c.fontSize)?h.monacoOptions.fontSize:Number.NaN),Ve=x(Ye.value),We=s(()=>{const e=Ye.value,o=Ve.value;return"number"==typeof e&&Number.isFinite(e)&&e>0&&"number"==typeof o&&Number.isFinite(o)&&o>0});function Ie(){var e,o,t,n,l;try{const i=De.value?null!=(t=null==(o=null==(e=Ee())?void 0:e.getModifiedEditor)?void 0:o.call(e))?t:Ee():Fe(),a=Pe(),r=null==(n=null==a?void 0:a.EditorOption)?void 0:n.fontInfo;if(i&&null!=r){const e=null==(l=i.getOption)?void 0:l.call(i,r),o=null==e?void 0:e.fontSize;if("number"==typeof o&&Number.isFinite(o)&&o>0)return o}}catch(i){}try{const e=X.value;if(e){const o=e.querySelector(".view-lines .view-line");if(o)try{if("undefined"!=typeof window&&"function"==typeof window.getComputedStyle){const e=window.getComputedStyle(o).fontSize,t=e&&e.match(/^(\d+(?:\.\d+)?)/);if(t)return Number.parseFloat(t[1])}}catch(i){}}}catch(i){}return null}function qe(e){var o,t;try{const n=Pe(),l=null==(o=null==n?void 0:n.EditorOption)?void 0:o.lineHeight;if(null!=l){const o=null==(t=null==e?void 0:e.getOption)?void 0:t.call(e,l);if("number"==typeof o&&o>0)return o}}catch(i){}const n=function(){try{const e=X.value;if(!e)return null;const o=e.querySelector(".view-lines .view-line");if(o){const e=Math.ceil(o.getBoundingClientRect().height);if(e>0)return e}}catch(i){}return null}();if(n&&n>0)return n;const l=Number.isFinite(Ve.value)&&Ve.value>0?Ve.value:12;return Math.max(12,Math.round(1.35*l))}function Re(){var e;if(Number.isFinite(Ve.value)&&Ve.value>0&&Number.isFinite(Ye.value))return Ve.value;const o=Ie();return"number"==typeof(null==(e=h.monacoOptions)?void 0:e.fontSize)?(Ye.value=h.monacoOptions.fontSize,Ve.value=h.monacoOptions.fontSize,Ve.value):o&&o>0?(Ye.value=o,Ve.value=o,o):(Ye.value=12,Ve.value=12,12)}function Xe(){var e,o,t,n,l,i,a,r,u,s,c,d,v,m;try{const h=De.value?Ee():Fe();if(!h)return null;if(De.value&&(null==h?void 0:h.getOriginalEditor)&&(null==h?void 0:h.getModifiedEditor)){const v=null==(e=h.getOriginalEditor)?void 0:e.call(h),m=null==(o=h.getModifiedEditor)?void 0:o.call(h);null==(t=null==v?void 0:v.layout)||t.call(v),null==(n=null==m?void 0:m.layout)||n.call(m);const p=(null==(l=null==v?void 0:v.getContentHeight)?void 0:l.call(v))||0,f=(null==(i=null==m?void 0:m.getContentHeight)?void 0:i.call(m))||0,w=Math.max(p,f);if(w>0)return Math.ceil(w+1);const g=(null==(u=null==(r=null==(a=null==v?void 0:v.getModel)?void 0:a.call(v))?void 0:r.getLineCount)?void 0:u.call(r))||1,y=(null==(d=null==(c=null==(s=null==m?void 0:m.getModel)?void 0:s.call(m))?void 0:c.getLineCount)?void 0:d.call(c))||1,k=Math.max(g,y),x=Math.max(qe(v),qe(m));return Math.ceil(k*(x+1.5)+0+1)}if(null==h?void 0:h.getContentHeight){null==(v=null==h?void 0:h.layout)||v.call(h);const e=h.getContentHeight();if(e>0)return Math.ceil(e+1)}const p=null==(m=null==h?void 0:h.getModel)?void 0:m.call(h);let f=1;p&&"function"==typeof p.getLineCount&&(f=p.getLineCount());const w=qe(h);return Math.ceil(f*(w+1.5)+0+1)}catch(h){return null}}function Ae(){try{const e=X.value;if(!e)return;const o=e.getBoundingClientRect(),t=window.scrollY+o.top,n=Xe();if(null!=n&&n>0){const l=o.height;e.style.height=`${Math.ceil(n)}px`,e.style.maxHeight="none";const i=Math.ceil(n)-l;0!==i&&t<window.scrollY&&window.scrollBy(0,i)}}catch(e){}}function Ge(){var e;try{const o=X.value;if(!o)return;const t=o.getBoundingClientRect(),n=window.scrollY+t.top,l=t.height,i=function(){var e,o;const t=null!=(o=null==(e=h.monacoOptions)?void 0:e.MAX_HEIGHT)?o:500;if("number"==typeof t)return t;const n=String(t).match(/^(\d+(?:\.\d+)?)/);return n?Number.parseFloat(n[1]):500}();if(xe>0&&(xe--,null!=ke.value)){const e=Math.min(ke.value,i);o.style.height=`${Math.ceil(e)}px`,o.style.maxHeight=`${Math.ceil(i)}px`,o.style.overflow="auto";const t=Math.ceil(e)-l;return void(0!==t&&n<window.scrollY&&window.scrollBy(0,t))}const a=Xe();if(null!=a&&a>0){const e=Math.min(a,i);o.style.height=`${Math.ceil(e)}px`,o.style.maxHeight=`${Math.ceil(i)}px`,o.style.overflow="auto";const t=Math.ceil(e)-l;return void(0!==t&&n<window.scrollY&&window.scrollBy(0,t))}if(null!=ke.value){const e=Math.min(ke.value,i);o.style.height=`${Math.ceil(e)}px`,o.style.maxHeight=`${Math.ceil(i)}px`,o.style.overflow="auto";const t=Math.ceil(e)-l;return void(0!==t&&n<window.scrollY&&window.scrollBy(0,t))}const r=Math.ceil((null==(e=o.getBoundingClientRect)?void 0:e.call(o).height)||0);if(r>0){const e=Math.min(r,i);o.style.height=`${Math.ceil(e)}px`,o.style.maxHeight=`${Math.ceil(i)}px`,o.style.overflow="auto";const t=Math.ceil(e)-l;return void(0!==t&&n<window.scrollY&&window.scrollBy(0,t))}const u=Number.parseFloat(o.style.height);if(!Number.isNaN(u)&&u>0){const e=Math.ceil(Math.min(u,i));o.style.height=`${e}px`;const t=e-l;0!==t&&n<window.scrollY&&window.scrollBy(0,t)}else{const e=Math.ceil(i);o.style.height=`${e}px`;const t=e-l;0!==t&&n<window.scrollY&&window.scrollBy(0,t)}o.style.maxHeight=`${Math.ceil(i)}px`,o.style.overflow="auto"}catch(o){}}const Ue=s(()=>h.isShowPreview&&("html"===he.value||"svg"===he.value)),Je=s(()=>"mermaid"===he.value);b(()=>h.node.language,e=>{he.value=N(e)}),b(()=>h.node.code,e=>r(null,null,function*(){var o,t;if(!1!==h.stream){if(he.value||(he.value=N($e(e))),Be&&!ge.value&&X.value)try{yield so(X.value)}catch(n){}De.value?_e(String(null!=(o=h.node.originalCode)?o:""),String(null!=(t=h.node.updatedCode)?t:""),pe.value):Oe(e,pe.value),fe.value&&L(()=>Ae())}}));const Ke=s(()=>{const e=he.value;return e?j[e]||e.charAt(0).toUpperCase()+e.slice(1):j[""]||"Plain Text"}),Qe=s(()=>Y(he.value||"")),Ze=s(()=>{const e={},o=e=>{if(null!=e)return"number"==typeof e?`${e}px`:String(e)},t=o(h.minWidth),n=o(h.maxWidth);return t&&(e.minWidth=t),n&&(e.maxWidth=n),e});function eo(){return r(this,null,function*(){try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(h.node.code)),me.value=!0,w("copy",h.node.code),setTimeout(()=>{me.value=!1},1e3)}catch(e){console.error("复制失败:",e)}})}function oo(e){return!e||e.disabled}function to(e,o,t="top"){if(oo(e.currentTarget))return;const n=e,l=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;W(e.currentTarget,o,t,!1,l,h.isDark)}function no(){I()}function lo(e){if(oo(e.currentTarget))return;const o=me.value?R("common.copied")||"Copied":R("common.copy")||"Copy",t=e,n=null!=(null==t?void 0:t.clientX)&&null!=(null==t?void 0:t.clientY)?{x:t.clientX,y:t.clientY}:void 0;W(e.currentTarget,o,"top",!1,n,h.isDark)}function io(){fe.value=!fe.value;const e=De.value?Ee():Fe(),o=X.value;e&&o&&(fe.value?(uo(!0),o.style.maxHeight="none",o.style.overflow="visible",Ae()):(uo(!1),o.style.overflow="auto",Ge()))}function ao(){var e,o,t;if(we.value=!we.value,we.value){if(X.value){const t=Math.ceil((null==(o=(e=X.value).getBoundingClientRect)?void 0:o.call(e).height)||0);t>0&&(ke.value=t)}uo(!1)}else{fe.value&&uo(!0),X.value&&null!=ke.value&&(X.value.style.height=`${ke.value}px`);const e=De.value?Ee():Fe();try{null==(t=null==e?void 0:e.layout)||t.call(e)}catch(n){}xe=2,L(()=>{fe.value?Ae():Ge()})}}function ro(){if(!Ue.value)return;const e=he.value;if(q.value){const o="html"===e?"text/html":"image/svg+xml",t="html"===e?R("artifacts.htmlPreviewTitle")||"HTML Preview":R("artifacts.svgPreviewTitle")||"SVG Preview";return void w("previewCode",{node:h.node,artifactType:o,artifactTitle:t,id:`temp-${e}-${Date.now()}`})}"html"===e&&(je.value=!je.value)}function uo(e){var o,t;try{if(De.value){const t=Ee();null==(o=null==t?void 0:t.updateOptions)||o.call(t,{automaticLayout:e})}else{const o=Fe();null==(t=null==o?void 0:o.updateOptions)||t.call(o,{automaticLayout:e})}}catch(n){}}function so(e){if(!Be)return null;if(Ne)return Ne;ge.value=!0;const o=r(null,null,function*(){yield function(e){return r(this,null,function*(){var o,t,n;if(!Be)return;De.value?(He(),Se?yield Se(e,String(null!=(o=h.node.originalCode)?o:""),String(null!=(t=h.node.updatedCode)?t:""),pe.value):yield Be(e,h.node.code,pe.value)):yield Be(e,h.node.code,pe.value);const l=De.value?Ee():Fe();if("number"==typeof(null==(n=h.monacoOptions)?void 0:n.fontSize))null==l||l.updateOptions({fontSize:h.monacoOptions.fontSize,automaticLayout:!1}),Ye.value=h.monacoOptions.fontSize,Ve.value=h.monacoOptions.fontSize;else{const e=Ie();e&&e>0?(Ye.value=e,Ve.value=e):(Ye.value=12,Ve.value=12)}fe.value||we.value||Ge(),!1===h.loading&&(yield C(),L(()=>{fe.value&&!we.value?Ae():we.value||Ge()}))})}(e)});return Ne=o.finally(()=>{Ne=null}),Ne}b(()=>Ve.value,(e,o)=>{const t=De.value?Ee():Fe();t&&"number"==typeof e&&Number.isFinite(e)&&e>0&&(t.updateOptions({fontSize:e}),fe.value&&!we.value&&Ae())},{flush:"post",immediate:!1});const co=b(()=>[X.value,Je.value,De.value,h.stream,h.loading,ye.value,Ce.value],e=>r(null,[e],function*([e,o,t,n,l,i,a]){if(!e||!Be)return;if(!a)return;if(!1===n&&!1!==l)return;if(Je.value)return Te(),void co();const r=so(e);r&&(yield r,co())})),vo=b(()=>[h.darkTheme,h.lightTheme,ge.value,Ce.value],()=>{if(ge.value&&Ce.value)return Je.value?vo():void function(){const e=mo();e&&ze(e)}()});function mo(){return h.isDark?h.darkTheme:h.lightTheme}const ho=b(()=>[h.monacoOptions,Ce.value],()=>{var e,o;if(!Be||!Ce.value)return;if(Je.value)return ho();const t=De.value?Ee():Fe(),n="number"==typeof(null==(e=h.monacoOptions)?void 0:e.fontSize)?h.monacoOptions.fontSize:Number.isFinite(Ve.value)?Ve.value:void 0;"number"==typeof n&&Number.isFinite(n)&&n>0&&(null==(o=null==t?void 0:t.updateOptions)||o.call(t,{fontSize:n})),fe.value&&!we.value?Ae():we.value||Ge()},{deep:!0}),po=b(()=>[h.loading,Ce.value],e=>r(null,[e],function*([e,o]){o&&(Je.value?C(()=>{null==po||po()}):e||(yield C(),L(()=>{we.value||(fe.value?Ae():Ge()),po()})))}),{immediate:!0,flush:"post"});return d(()=>{Te()}),(o,t)=>Le.value?(m(),v(y(V),{key:0,node:e.node,loading:h.loading},null,8,["node","loading"])):(m(),B("div",{key:1,ref_key:"container",ref:A,style:S(Ze.value),class:f(["code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",[h.isDark?"border-gray-700/30 bg-gray-900":"border-gray-200 bg-white",{"is-rendering":h.loading,"is-dark":h.isDark}]])},[h.showHeader?(m(),B("div",U,[P(o.$slots,"header-left",{},()=>[p("div",J,[p("span",{class:"icon-slot h-4 w-4 flex-shrink-0",innerHTML:Qe.value},null,8,K),p("span",Q,g(Ke.value),1)])],!0),P(o.$slots,"header-right",{},()=>[p("div",Z,[p("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":we.value,onClick:ao,onMouseenter:t[0]||(t[0]=e=>to(e,we.value?y(R)("common.expand")||"Expand":y(R)("common.collapse")||"Collapse")),onFocus:t[1]||(t[1]=e=>to(e,we.value?y(R)("common.expand")||"Expand":y(R)("common.collapse")||"Collapse")),onMouseleave:no,onBlur:no},[(m(),B("svg",{style:S({rotate:we.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[...t[17]||(t[17]=[p("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ee),h.showFontSizeButtons&&h.enableFontSizeControl?(m(),B(F,{key:0},[p("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!!Number.isFinite(Ve.value)&&Ve.value<=10,onClick:t[2]||(t[2]=e=>function(){const e=Re(),o=Math.max(10,e-1);Ve.value=o}()),onMouseenter:t[3]||(t[3]=e=>to(e,y(R)("common.decrease")||"Decrease")),onFocus:t[4]||(t[4]=e=>to(e,y(R)("common.decrease")||"Decrease")),onMouseleave:no,onBlur:no},[...t[18]||(t[18]=[p("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[p("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)])],40,oe),p("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!We.value||Ve.value===Ye.value,onClick:t[5]||(t[5]=e=>(Re(),void(Number.isFinite(Ye.value)&&(Ve.value=Ye.value)))),onMouseenter:t[6]||(t[6]=e=>to(e,y(R)("common.reset")||"Reset")),onFocus:t[7]||(t[7]=e=>to(e,y(R)("common.reset")||"Reset")),onMouseleave:no,onBlur:no},[...t[19]||(t[19]=[p("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[p("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[p("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),p("path",{d:"M3 3v5h5"})])],-1)])],40,te),p("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!!Number.isFinite(Ve.value)&&Ve.value>=36,onClick:t[8]||(t[8]=e=>function(){const e=Re(),o=Math.min(36,e+1);Ve.value=o}()),onMouseenter:t[9]||(t[9]=e=>to(e,y(R)("common.increase")||"Increase")),onFocus:t[10]||(t[10]=e=>to(e,y(R)("common.increase")||"Increase")),onMouseleave:no,onBlur:no},[...t[20]||(t[20]=[p("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[p("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)])],40,ne)],64)):O("",!0),h.showCopyButton?(m(),B("button",{key:1,type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":me.value?y(R)("common.copied")||"Copied":y(R)("common.copy")||"Copy",onClick:eo,onMouseenter:t[11]||(t[11]=e=>lo(e)),onFocus:t[12]||(t[12]=e=>lo(e)),onMouseleave:no,onBlur:no},[me.value?(m(),B("svg",ae,[...t[22]||(t[22]=[p("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(m(),B("svg",ie,[...t[21]||(t[21]=[p("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[p("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),p("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,le)):O("",!0),h.showExpandButton?(m(),B("button",{key:2,type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":fe.value,onClick:io,onMouseenter:t[13]||(t[13]=e=>to(e,fe.value?y(R)("common.collapse")||"Collapse":y(R)("common.expand")||"Expand")),onFocus:t[14]||(t[14]=e=>to(e,fe.value?y(R)("common.collapse")||"Collapse":y(R)("common.expand")||"Expand")),onMouseleave:no,onBlur:no},[fe.value?(m(),B("svg",ue,[...t[23]||(t[23]=[p("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])):(m(),B("svg",se,[...t[24]||(t[24]=[p("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])]))],40,re)):O("",!0),Ue.value&&h.showPreviewButton?(m(),B("button",{key:3,type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":y(R)("common.preview")||"Preview",onClick:ro,onMouseenter:t[15]||(t[15]=e=>to(e,y(R)("common.preview")||"Preview")),onFocus:t[16]||(t[16]=e=>to(e,y(R)("common.preview")||"Preview")),onMouseleave:no,onBlur:no},[...t[25]||(t[25]=[p("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24"},[p("g",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"},[p("path",{d:"M23.628 7.41c-.12-1.172-.08-3.583-.9-4.233c-1.921-1.51-6.143-1.11-8.815-1.19c-3.481-.15-7.193.14-10.625.24a.34.34 0 0 0 0 .67c3.472-.05 7.074-.29 10.575-.09c2.471.15 6.653-.14 8.254 1.16c.4.33.41 2.732.49 3.582a42 42 0 0 1 .08 9.005a13.8 13.8 0 0 1-.45 3.001c-2.42 1.4-19.69 2.381-20.72.55a21 21 0 0 1-.65-4.632a41.5 41.5 0 0 1 .12-7.964c.08 0 7.334.33 12.586.24c2.331 0 4.682-.13 6.764-.21a.33.33 0 0 0 0-.66c-7.714-.16-12.897-.43-19.31.05c.11-1.38.48-3.922.38-4.002a.3.3 0 0 0-.42 0c-.37.41-.29 1.77-.36 2.251s-.14 1.07-.2 1.6a45 45 0 0 0-.36 8.645a21.8 21.8 0 0 0 .66 5.002c1.46 2.702 17.248 1.461 20.95.43c1.45-.4 1.69-.8 1.871-1.95c.575-3.809.602-7.68.08-11.496"}),p("path",{d:"M4.528 5.237a.84.84 0 0 0-.21-1c-.77-.41-1.71.39-1 1.1a.83.83 0 0 0 1.21-.1m2.632-.25c.14-.14.19-.84-.2-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.2-.09m2.88 0a.83.83 0 0 0-.21-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.21-.09m-4.29 8.735c0 .08.23 2.471.31 2.561a.371.371 0 0 0 .63-.14c0-.09 0 0 .15-1.72a10 10 0 0 0-.11-2.232a5.3 5.3 0 0 1-.26-1.37a.3.3 0 0 0-.54-.24a6.8 6.8 0 0 0-.2 2.33c-1.281-.38-1.121.13-1.131-.42a15 15 0 0 0-.19-1.93c-.16-.17-.36-.17-.51.14a20 20 0 0 0-.43 3.471c.04.773.18 1.536.42 2.272c.26.4.7.22.7-.1c0-.09-.16-.09 0-1.862c.06-1.18-.23-.3 1.16-.76m5.033-2.552c.32-.07.41-.28.39-.37c0-.55-3.322-.34-3.462-.24s-.2.18-.18.28s0 .11 0 .16a3.8 3.8 0 0 0 1.591.361v.82a15 15 0 0 0-.13 3.132c0 .2-.09.94.17 1.16a.34.34 0 0 0 .48 0c.125-.35.196-.718.21-1.09a8 8 0 0 0 .14-3.232c0-.13.05-.7-.1-.89a8 8 0 0 0 .89-.09m5.544-.181a.69.69 0 0 0-.89-.44a2.8 2.8 0 0 0-1.252 1.001a2.3 2.3 0 0 0-.41-.83a1 1 0 0 0-1.6.27a7 7 0 0 0-.35 2.07c0 .571 0 2.642.06 2.762c.14 1.09 1 .51.63.13a17.6 17.6 0 0 1 .38-3.962c.32-1.18.32.2.39.51s.11 1.081.73 1.081s.48-.93 1.401-1.78q.075 1.345 0 2.69a15 15 0 0 0 0 1.811a.34.34 0 0 0 .68 0q.112-.861.11-1.73a16.7 16.7 0 0 0 .12-3.582m1.441-.201c-.05.16-.3 3.002-.31 3.202a6.3 6.3 0 0 0 .21 1.741c.33 1 1.21 1.07 2.291.82a3.7 3.7 0 0 0 1.14-.23c.21-.22.10-.59-.41-.64q-.817.096-1.64.07c-.44-.07-.34 0-.67-4.442q.015-.185 0-.37a.316.316 0 0 0-.23-.38a.316.316 0 0 0-.38.23"})])],-1)])],40,ce)):O("",!0)])],!0)])):O("",!0),_(p("div",{ref_key:"codeEditor",ref:X,class:f(["code-editor-container",[e.stream?"":"code-height-placeholder"]])},null,2),[[E,!(we.value||!e.stream&&e.loading)]]),je.value&&!q.value&&Ue.value&&"html"===he.value?(m(),v(G,{key:1,code:e.node.code,"is-dark":h.isDark,"on-close":()=>je.value=!1},null,8,["code","is-dark","on-close"])):O("",!0),_(p("div",de,[P(o.$slots,"loading",{loading:e.loading,stream:e.stream},()=>[t[26]||(t[26]=p("div",{class:"loading-skeleton"},[p("div",{class:"skeleton-line"}),p("div",{class:"skeleton-line"}),p("div",{class:"skeleton-line short"})],-1))],!0)],512),[[E,!e.stream&&e.loading]]),p("span",ve,g(me.value?y(R)("common.copied")||"Copied":""),1)],6))}}),[["__scopeId","data-v-f37961ae"]]);me.install=e=>{e.component(me.__name,me)};export{me as default};
package/dist/tailwind.ts CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "markstream-vue",
3
3
  "type": "module",
4
- "version": "0.0.2-beta.9",
4
+ "version": "0.0.2",
5
5
  "packageManager": "pnpm@10.24.0",
6
6
  "description": "Vue 3 Markdown renderer optimized for large docs: progressive Mermaid, streaming diff code blocks, and fast real-time preview.",
7
7
  "author": "Simon He",
@@ -93,8 +93,8 @@
93
93
  "katex": ">=0.16.22",
94
94
  "mermaid": ">=11",
95
95
  "shiki": "^3.13.0",
96
- "stream-markdown": ">=0.0.10",
97
- "stream-monaco": ">=0.0.7",
96
+ "stream-markdown": ">=0.0.11",
97
+ "stream-monaco": ">=0.0.8",
98
98
  "vue": ">=3.0.0",
99
99
  "vue-i18n": ">=9"
100
100
  },
@@ -120,7 +120,7 @@
120
120
  },
121
121
  "dependencies": {
122
122
  "@floating-ui/dom": "^1.7.4",
123
- "stream-markdown-parser": "^0.0.35"
123
+ "stream-markdown-parser": "^0.0.36"
124
124
  },
125
125
  "devDependencies": {
126
126
  "@antfu/eslint-config": "^5.4.1",