@moonshot-ai/kimi-code 0.20.0 → 0.20.1
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/main.mjs +1629 -227
- package/dist-web/assets/{CodeBlockNode-CaV-jku-.js → CodeBlockNode-Ds9FDojm.js} +1 -1
- package/dist-web/assets/{CodeBlockShell.vue_vue_type_style_index_0_lang-D2LMLnjQ.js → CodeBlockShell.vue_vue_type_style_index_0_lang-DPPhMZ1J.js} +1 -1
- package/dist-web/assets/{Tooltip-BkDnpjpB.js → Tooltip-D4SNb85I.js} +1 -1
- package/dist-web/assets/{arc-BpCxx-Lm.js → arc-ByMO5pI7.js} +1 -1
- package/dist-web/assets/{architectureDiagram-3BPJPVTR-BUzyMdWP.js → architectureDiagram-3BPJPVTR-Dvmwtelo.js} +1 -1
- package/dist-web/assets/{blockDiagram-GPEHLZMM-BUkuE4Df.js → blockDiagram-GPEHLZMM-lDGeez1y.js} +1 -1
- package/dist-web/assets/{c4Diagram-AAUBKEIU-Cyx2I5NF.js → c4Diagram-AAUBKEIU-BpX1rFb4.js} +1 -1
- package/dist-web/assets/channel-CFIWdU7V.js +1 -0
- package/dist-web/assets/{chunk-2J33WTMH-D1yizOHn.js → chunk-2J33WTMH-jodlcE5W.js} +1 -1
- package/dist-web/assets/{chunk-4BX2VUAB-Dh0raYq6.js → chunk-4BX2VUAB-BrZvBuhT.js} +1 -1
- package/dist-web/assets/{chunk-55IACEB6-BEhXMK8a.js → chunk-55IACEB6-BMZITsHm.js} +1 -1
- package/dist-web/assets/{chunk-727SXJPM-DNNSkr-u.js → chunk-727SXJPM-Cmhtbm26.js} +1 -1
- package/dist-web/assets/{chunk-AQP2D5EJ-BdIEtlnn.js → chunk-AQP2D5EJ-yt2A8pJF.js} +1 -1
- package/dist-web/assets/{chunk-FMBD7UC4-CkJ1iFLI.js → chunk-FMBD7UC4-C5EABTZN.js} +1 -1
- package/dist-web/assets/{chunk-ND2GUHAM-BHPtuSG5.js → chunk-ND2GUHAM-CVMSNFBB.js} +1 -1
- package/dist-web/assets/{chunk-QZHKN3VN-CkJm98VG.js → chunk-QZHKN3VN-F9qv3qjM.js} +1 -1
- package/dist-web/assets/classDiagram-4FO5ZUOK-HfSWUU5X.js +1 -0
- package/dist-web/assets/classDiagram-v2-Q7XG4LA2-HfSWUU5X.js +1 -0
- package/dist-web/assets/{cose-bilkent-S5V4N54A-x5W3gqTd.js → cose-bilkent-S5V4N54A-BTsTGLXV.js} +1 -1
- package/dist-web/assets/{dagre-BM42HDAG-eSRg4w-M.js → dagre-BM42HDAG-DrzkpEQT.js} +1 -1
- package/dist-web/assets/{diagram-2AECGRRQ-Cifjip15.js → diagram-2AECGRRQ-e1GfngTa.js} +1 -1
- package/dist-web/assets/{diagram-5GNKFQAL-DLv5M6zi.js → diagram-5GNKFQAL-ousok5qp.js} +1 -1
- package/dist-web/assets/{diagram-KO2AKTUF-DlsIZYaS.js → diagram-KO2AKTUF-DyZixoAA.js} +1 -1
- package/dist-web/assets/{diagram-LMA3HP47-CbDbbTBN.js → diagram-LMA3HP47-DYvup0AJ.js} +1 -1
- package/dist-web/assets/{diagram-OG6HWLK6-DmIs02eE.js → diagram-OG6HWLK6-DjeAOuOP.js} +1 -1
- package/dist-web/assets/{erDiagram-TEJ5UH35-DKiJXrkX.js → erDiagram-TEJ5UH35-DW158lKF.js} +1 -1
- package/dist-web/assets/{flowDiagram-I6XJVG4X-Diwcs-TL.js → flowDiagram-I6XJVG4X-CNe29HBu.js} +1 -1
- package/dist-web/assets/{ganttDiagram-6RSMTGT7-C1Z7ZuXq.js → ganttDiagram-6RSMTGT7-DNXeqbuv.js} +1 -1
- package/dist-web/assets/{gitGraphDiagram-PVQCEYII-zAnihooO.js → gitGraphDiagram-PVQCEYII-DxrQ7BFf.js} +1 -1
- package/dist-web/assets/{index-MiWa00oP.js → index-CO3YU1Qs.js} +2 -2
- package/dist-web/assets/index-Dv5UmLv8.css +1 -0
- package/dist-web/assets/{index-sGTig1yI.js → index-JMCtP-Ps.js} +1 -1
- package/dist-web/assets/{index-DsKglRi9.js → index-uGnch3Jw.js} +131 -131
- package/dist-web/assets/{index10-D-oYkFkv.js → index10-CgqlibfL.js} +1 -1
- package/dist-web/assets/{index11-BZ-VpLJZ.js → index11-DEbZPqF_.js} +2 -2
- package/dist-web/assets/{index5-BHU3YSPN.js → index5-6RR-0mhw.js} +1 -1
- package/dist-web/assets/{index6-DktmVOWV.js → index6-Dd2WDK6a.js} +1 -1
- package/dist-web/assets/{index7-5thVZydO.js → index7-DhrSWRIG.js} +1 -1
- package/dist-web/assets/{index8-oLPFpvcC.js → index8-C1M9n-68.js} +2 -2
- package/dist-web/assets/{infoDiagram-5YYISTIA-CTtKRrDv.js → infoDiagram-5YYISTIA-bsQXw5Cf.js} +1 -1
- package/dist-web/assets/{ishikawaDiagram-YF4QCWOH-CpeSKUEO.js → ishikawaDiagram-YF4QCWOH-k8l6Qdjw.js} +1 -1
- package/dist-web/assets/{journeyDiagram-JHISSGLW-CqozeoGf.js → journeyDiagram-JHISSGLW-cYfBbMdz.js} +1 -1
- package/dist-web/assets/{kanban-definition-UN3LZRKU-D8fkRjdV.js → kanban-definition-UN3LZRKU-CTnpueoW.js} +1 -1
- package/dist-web/assets/{linear-CcasoJPT.js → linear-CdKUj4Ug.js} +1 -1
- package/dist-web/assets/{mermaid.core-DQW_ubr6.js → mermaid.core-UWDZO4h_.js} +4 -4
- package/dist-web/assets/{mindmap-definition-RKZ34NQL-Ds4S3Jr8.js → mindmap-definition-RKZ34NQL-3z79U-lX.js} +1 -1
- package/dist-web/assets/{pieDiagram-4H26LBE5-B6flMWC0.js → pieDiagram-4H26LBE5-CMDgRqd9.js} +1 -1
- package/dist-web/assets/{quadrantDiagram-W4KKPZXB-Dp7Mce_9.js → quadrantDiagram-W4KKPZXB-DX1F2ToM.js} +1 -1
- package/dist-web/assets/{requirementDiagram-4Y6WPE33-POD8vh5c.js → requirementDiagram-4Y6WPE33-DoWnnNLY.js} +1 -1
- package/dist-web/assets/{sankeyDiagram-5OEKKPKP-DPTFBsjO.js → sankeyDiagram-5OEKKPKP-ClNy2w1_.js} +1 -1
- package/dist-web/assets/{sequenceDiagram-3UESZ5HK-D7J9QzqQ.js → sequenceDiagram-3UESZ5HK-BfJgBlpQ.js} +1 -1
- package/dist-web/assets/{stateDiagram-AJRCARHV-BPCTy0Vu.js → stateDiagram-AJRCARHV-KaDNy_Jo.js} +1 -1
- package/dist-web/assets/stateDiagram-v2-BHNVJYJU-BGR-zf4G.js +1 -0
- package/dist-web/assets/{timeline-definition-PNZ67QCA-CjYdXq94.js → timeline-definition-PNZ67QCA-DaKQHHIC.js} +1 -1
- package/dist-web/assets/{vennDiagram-CIIHVFJN-DopODwti.js → vennDiagram-CIIHVFJN-Cw9sx89s.js} +1 -1
- package/dist-web/assets/{vue.runtime.esm-bundler-HPT0I7TD.js → vue.runtime.esm-bundler-DNelV8ct.js} +1 -1
- package/dist-web/assets/{wardley-L42UT6IY-t4Clap_T.js → wardley-L42UT6IY-fWMnczak.js} +1 -1
- package/dist-web/assets/{wardleyDiagram-YWT4CUSO-DT5OKzVz.js → wardleyDiagram-YWT4CUSO-Bi8Phs9U.js} +1 -1
- package/dist-web/assets/{xychartDiagram-2RQKCTM6-BePku_Rt.js → xychartDiagram-2RQKCTM6-DR3dlDte.js} +1 -1
- package/dist-web/index.html +2 -2
- package/package.json +5 -5
- package/dist-web/assets/channel-BPMCBZZJ.js +0 -1
- package/dist-web/assets/classDiagram-4FO5ZUOK-JXNmNMT4.js +0 -1
- package/dist-web/assets/classDiagram-v2-Q7XG4LA2-JXNmNMT4.js +0 -1
- package/dist-web/assets/index-CytBc_Au.css +0 -1
- package/dist-web/assets/stateDiagram-v2-BHNVJYJU-CJbfs5Xz.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bR as Vl,ci as Jl,bQ as fl,M as vl,bl as Gl,af as ll,bZ as Yl,c0 as ml,aU as L,bT as Kl,bE as U,az as Ql,c1 as ol,c2 as Xl,aI as pl,aL as je,s as Pn,bk as pt,cj as il,u as rl,I as Zl,A as eo,bJ as Cn,aY as at,bL as no,v as T,aw as ut,au as Bn,t as dt,bB as to,bb as ht,q as g,ck as lo,c4 as oo,c5 as io,c7 as ro,a0 as ao,c3 as al,aD as uo,bO as so,T as co,as as ne,b$ as fo,cl as vo}from"./index-
|
|
1
|
+
import{bR as Vl,ci as Jl,bQ as fl,M as vl,bl as Gl,af as ll,bZ as Yl,c0 as ml,aU as L,bT as Kl,bE as U,az as Ql,c1 as ol,c2 as Xl,aI as pl,aL as je,s as Pn,bk as pt,cj as il,u as rl,I as Zl,A as eo,bJ as Cn,aY as at,bL as no,v as T,aw as ut,au as Bn,t as dt,bB as to,bb as ht,q as g,ck as lo,c4 as oo,c5 as io,c7 as ro,a0 as ao,c3 as al,aD as uo,bO as so,T as co,as as ne,b$ as fo,cl as vo}from"./index-uGnch3Jw.js";import{i as V,t as mo}from"./safeRaf-DGuzXxDK.js";import{V as po}from"./CodeBlockShell.vue_vue_type_style_index_0_lang-DPPhMZ1J.js";var xn=(k,w,C)=>new Promise((i,ue)=>{var xe=P=>{try{J(C.next(P))}catch(O){ue(O)}},_=P=>{try{J(C.throw(P))}catch(O){ue(O)}},J=P=>P.done?i(P.value):Promise.resolve(P.value).then(xe,_);J((C=C.apply(k,w)).next())});let ul=!1,rn=null,an=null,st=!1,un=null;function ho(){return xn(this,null,function*(){if(un)return un;un=xn(null,null,function*(){if(!an){if(st)return null;try{if(an=(function(k){const w=k;if(typeof w?.useMonaco=="function")return w;const C=k?.default;return typeof C?.useMonaco=="function"?C:null})(yield Vl(()=>import("./__vite-optional-peer-dep_stream-monaco_markstream-vue-BIHI7g3E.js"),[])),!an)return st=!0,null}catch{return st=!0,null}}try{return yield(function(k){return xn(this,null,function*(){return ul?void 0:rn||(rn=xn(null,null,function*(){const C=globalThis?.MonacoEnvironment;C&&(typeof C.getWorker=="function"||typeof C.getWorkerUrl=="function")||typeof k?.preloadMonacoWorkers!="function"||(yield k.preloadMonacoWorkers()),ul=!0}).finally(()=>{rn=null}),rn)})})(an),Jl(),an}catch{return null}});try{return yield un}finally{un=null}})}var yo=Object.defineProperty,go=Object.defineProperties,wo=Object.getOwnPropertyDescriptors,dl=Object.getOwnPropertySymbols,bo=Object.prototype.hasOwnProperty,So=Object.prototype.propertyIsEnumerable,sl=(k,w,C)=>w in k?yo(k,w,{enumerable:!0,configurable:!0,writable:!0,value:C}):k[w]=C,H=(k,w)=>{for(var C in w||(w={}))bo.call(w,C)&&sl(k,C,w[C]);if(dl)for(var C of dl(w))So.call(w,C)&&sl(k,C,w[C]);return k},ve=(k,w)=>go(k,wo(w)),N=(k,w,C)=>new Promise((i,ue)=>{var xe=P=>{try{J(C.next(P))}catch(O){ue(O)}},_=P=>{try{J(C.throw(P))}catch(O){ue(O)}},J=P=>P.done?i(P.value):Promise.resolve(P.value).then(xe,_);J((C=C.apply(k,w)).next())});const ko={class:"html-preview-frame__header"},Co={class:"html-preview-frame__title"},xo={class:"html-preview-frame__label"},Mo=["sandbox","srcdoc"],Po=fl(vl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(k){const w=k,C=import.meta!==void 0&&!1;let i=null;const{t:ue}=ml(),xe=g(()=>{const P=w.code||"",O=P.trim().toLowerCase();return O.startsWith("<!doctype")||O.startsWith("<html")||O.startsWith("<body")?P:`<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as N,c0 as V,aL as s,u as i,aY as f,v as o,bb as p,t as d,bk as c,aw as D,bO as R,G as _,I as $,bJ as H,F,g as A,bL as S,bB as M,aU as g,q as w,c7 as q,c2 as G}from"./index-DsKglRi9.js";const I={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},J={class:"flex items-center gap-0.5"},K=["aria-label"],O={class:"code-diff-stat removed"},U={class:"code-diff-stat added"},Y=["aria-label"],Q={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},W={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},X=["aria-pressed"],Z={key:3,class:"relative"},ee=["aria-expanded"],oe=["disabled"],te=["disabled"],ne=["disabled"],ae={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},re={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},le={class:"code-block-shell-content"},se={class:"code-loading-placeholder"},ie={class:"sr-only","aria-live":"polite",role:"status"},de=N({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(a,{emit:z}){const t=a,v=z,u=g(!1),x=g(null),b=g(null);function E(){u.value=!u.value,u.value&&document.addEventListener("click",y,{once:!0,capture:!0})}function y(l){var e,n;const C=l.target;(e=x.value)!=null&&e.contains(C)||(n=b.value)!=null&&n.contains(C)?document.addEventListener("click",y,{once:!0,capture:!0}):u.value=!1}const j=w(()=>t.showFontSizeButtons&&t.enableFontSizeControl||t.showExpandButton||t.isPreviewable&&t.showPreviewButton),{t:r}=V(),k=w(()=>t.showTooltips!==!1);function m(l,e){k.value&&q(l.currentTarget,e,"top",!1,void 0,t.isDark)}function h(){k.value&&G()}function B(l){m(l,t.copyText?r("common.copied")||"Copied":r("common.copy")||"Copy")}const L=w(()=>{var l,e;return!!Number.isFinite(t.codeFontSize)&&((l=t.codeFontSize)!=null?l:0)<=((e=t.codeFontMin)!=null?e:0)}),T=w(()=>!t.fontBaselineReady||t.codeFontSize===t.defaultCodeFontSize),P=w(()=>{var l,e;return!!Number.isFinite(t.codeFontSize)&&((l=t.codeFontSize)!=null?l:0)>=((e=t.codeFontMax)!=null?e:100)});return(l,e)=>(s(),i(F,null,[t.showHeader?(s(),i("div",I,[f(l.$slots,"header-left"),f(l.$slots,"header-right",{},()=>[o("div",J,[a.diffStats?(s(),i("div",{key:0,class:"code-diff-stats","aria-label":a.diffStatsAriaLabel},[o("span",O,"-"+p(a.diffStats.removed),1),o("span",U,"+"+p(a.diffStats.added),1)],8,K)):d("",!0),t.showCopyButton?(s(),i("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":a.copyText?c(r)("common.copied")||"Copied":c(r)("common.copy")||"Copy",onClick:e[0]||(e[0]=n=>v("copy")),onMouseenter:e[1]||(e[1]=n=>B(n)),onFocus:e[2]||(e[2]=n=>B(n)),onMouseleave:h,onBlur:h},[a.copyText?(s(),i("svg",W,[...e[14]||(e[14]=[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(s(),i("svg",Q,[...e[13]||(e[13]=[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),o("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,Y)):d("",!0),t.showCollapseButton?(s(),i("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":a.isCollapsed,onClick:e[3]||(e[3]=n=>v("toggleCollapse")),onMouseenter:e[4]||(e[4]=n=>m(n,a.isCollapsed?c(r)("common.expand")||"Expand":c(r)("common.collapse")||"Collapse")),onFocus:e[5]||(e[5]=n=>m(n,a.isCollapsed?c(r)("common.expand")||"Expand":c(r)("common.collapse")||"Collapse")),onMouseleave:h,onBlur:h},[(s(),i("svg",{style:D({rotate:a.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[15]||(e[15]=[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,X)):d("",!0),j.value?(s(),i("div",Z,[o("button",{ref_key:"moreBtnRef",ref:b,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":u.value,"aria-haspopup":"true",onClick:R(E,["stop"]),onMouseenter:e[6]||(e[6]=n=>m(n,c(r)("common.more")||"More")),onFocus:e[7]||(e[7]=n=>m(n,c(r)("common.more")||"More")),onMouseleave:h,onBlur:h},[...e[16]||(e[16]=[_('<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="1em" height="1em" viewBox="0 0 24 24" class="action-icon"><g fill="currentColor"><circle cx="12" cy="5" r="1.5"></circle><circle cx="12" cy="12" r="1.5"></circle><circle cx="12" cy="19" r="1.5"></circle></g></svg>',1)])],40,ee),$(A,{name:"code-menu"},{default:H(()=>[u.value?(s(),i("div",{key:0,ref_key:"moreMenuRef",ref:x,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[t.showFontSizeButtons&&t.enableFontSizeControl?(s(),i(F,{key:0},[o("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:L.value,onClick:e[8]||(e[8]=n=>v("decreaseFont"))},[e[17]||(e[17]=o("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),o("span",null,p(c(r)("common.fontSmaller")||"Font size −"),1)],8,oe),o("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:T.value,onClick:e[9]||(e[9]=n=>v("resetFont"))},[e[18]||(e[18]=o("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),o("path",{d:"M3 3v5h5"})])],-1)),o("span",null,p(c(r)("common.fontReset")||"Font size reset"),1)],8,te),o("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:P.value,onClick:e[10]||(e[10]=n=>v("increaseFont"))},[e[19]||(e[19]=o("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),o("span",null,p(c(r)("common.fontLarger")||"Font size +"),1)],8,ne)],64)):d("",!0),t.showExpandButton?(s(),i("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:e[11]||(e[11]=n=>{v("toggleExpand",n),u.value=!1})},[a.isExpanded?(s(),i("svg",ae,[...e[20]||(e[20]=[o("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)])])):(s(),i("svg",re,[...e[21]||(e[21]=[o("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)])])),o("span",null,p(a.isExpanded?c(r)("common.collapse")||"Collapse":c(r)("common.expand")||"Expand"),1)])):d("",!0),a.isPreviewable&&t.showPreviewButton?(s(),i("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:e[12]||(e[12]=n=>{v("preview"),u.value=!1})},[e[22]||(e[22]=o("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),o("circle",{cx:"12",cy:"12",r:"3"})])],-1)),o("span",null,p(c(r)("common.preview")||"Preview"),1)])):d("",!0)],512)):d("",!0)]),_:1})])):d("",!0)])])])):d("",!0),S(o("div",le,[f(l.$slots,"default")],512),[[M,!(a.isCollapsed||!a.stream&&a.loading)]]),S(o("div",se,[f(l.$slots,"loading",{},()=>[e[23]||(e[23]=o("div",{class:"loading-skeleton"},[o("div",{class:"skeleton-line"}),o("div",{class:"skeleton-line"}),o("div",{class:"skeleton-line short"})],-1))])],512),[[M,!a.stream&&a.loading]]),o("span",ie,p(a.copyText?c(r)("common.copied")||"Copied":""),1)],64))}});export{de as V};
|
|
1
|
+
import{M as N,c0 as V,aL as s,u as i,aY as f,v as o,bb as p,t as d,bk as c,aw as D,bO as R,G as _,I as $,bJ as H,F,g as A,bL as S,bB as M,aU as g,q as w,c7 as q,c2 as G}from"./index-uGnch3Jw.js";const I={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},J={class:"flex items-center gap-0.5"},K=["aria-label"],O={class:"code-diff-stat removed"},U={class:"code-diff-stat added"},Y=["aria-label"],Q={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},W={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},X=["aria-pressed"],Z={key:3,class:"relative"},ee=["aria-expanded"],oe=["disabled"],te=["disabled"],ne=["disabled"],ae={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},re={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},le={class:"code-block-shell-content"},se={class:"code-loading-placeholder"},ie={class:"sr-only","aria-live":"polite",role:"status"},de=N({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(a,{emit:z}){const t=a,v=z,u=g(!1),x=g(null),b=g(null);function E(){u.value=!u.value,u.value&&document.addEventListener("click",y,{once:!0,capture:!0})}function y(l){var e,n;const C=l.target;(e=x.value)!=null&&e.contains(C)||(n=b.value)!=null&&n.contains(C)?document.addEventListener("click",y,{once:!0,capture:!0}):u.value=!1}const j=w(()=>t.showFontSizeButtons&&t.enableFontSizeControl||t.showExpandButton||t.isPreviewable&&t.showPreviewButton),{t:r}=V(),k=w(()=>t.showTooltips!==!1);function m(l,e){k.value&&q(l.currentTarget,e,"top",!1,void 0,t.isDark)}function h(){k.value&&G()}function B(l){m(l,t.copyText?r("common.copied")||"Copied":r("common.copy")||"Copy")}const L=w(()=>{var l,e;return!!Number.isFinite(t.codeFontSize)&&((l=t.codeFontSize)!=null?l:0)<=((e=t.codeFontMin)!=null?e:0)}),T=w(()=>!t.fontBaselineReady||t.codeFontSize===t.defaultCodeFontSize),P=w(()=>{var l,e;return!!Number.isFinite(t.codeFontSize)&&((l=t.codeFontSize)!=null?l:0)>=((e=t.codeFontMax)!=null?e:100)});return(l,e)=>(s(),i(F,null,[t.showHeader?(s(),i("div",I,[f(l.$slots,"header-left"),f(l.$slots,"header-right",{},()=>[o("div",J,[a.diffStats?(s(),i("div",{key:0,class:"code-diff-stats","aria-label":a.diffStatsAriaLabel},[o("span",O,"-"+p(a.diffStats.removed),1),o("span",U,"+"+p(a.diffStats.added),1)],8,K)):d("",!0),t.showCopyButton?(s(),i("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":a.copyText?c(r)("common.copied")||"Copied":c(r)("common.copy")||"Copy",onClick:e[0]||(e[0]=n=>v("copy")),onMouseenter:e[1]||(e[1]=n=>B(n)),onFocus:e[2]||(e[2]=n=>B(n)),onMouseleave:h,onBlur:h},[a.copyText?(s(),i("svg",W,[...e[14]||(e[14]=[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(s(),i("svg",Q,[...e[13]||(e[13]=[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),o("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,Y)):d("",!0),t.showCollapseButton?(s(),i("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":a.isCollapsed,onClick:e[3]||(e[3]=n=>v("toggleCollapse")),onMouseenter:e[4]||(e[4]=n=>m(n,a.isCollapsed?c(r)("common.expand")||"Expand":c(r)("common.collapse")||"Collapse")),onFocus:e[5]||(e[5]=n=>m(n,a.isCollapsed?c(r)("common.expand")||"Expand":c(r)("common.collapse")||"Collapse")),onMouseleave:h,onBlur:h},[(s(),i("svg",{style:D({rotate:a.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[15]||(e[15]=[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,X)):d("",!0),j.value?(s(),i("div",Z,[o("button",{ref_key:"moreBtnRef",ref:b,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":u.value,"aria-haspopup":"true",onClick:R(E,["stop"]),onMouseenter:e[6]||(e[6]=n=>m(n,c(r)("common.more")||"More")),onFocus:e[7]||(e[7]=n=>m(n,c(r)("common.more")||"More")),onMouseleave:h,onBlur:h},[...e[16]||(e[16]=[_('<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="1em" height="1em" viewBox="0 0 24 24" class="action-icon"><g fill="currentColor"><circle cx="12" cy="5" r="1.5"></circle><circle cx="12" cy="12" r="1.5"></circle><circle cx="12" cy="19" r="1.5"></circle></g></svg>',1)])],40,ee),$(A,{name:"code-menu"},{default:H(()=>[u.value?(s(),i("div",{key:0,ref_key:"moreMenuRef",ref:x,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[t.showFontSizeButtons&&t.enableFontSizeControl?(s(),i(F,{key:0},[o("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:L.value,onClick:e[8]||(e[8]=n=>v("decreaseFont"))},[e[17]||(e[17]=o("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),o("span",null,p(c(r)("common.fontSmaller")||"Font size −"),1)],8,oe),o("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:T.value,onClick:e[9]||(e[9]=n=>v("resetFont"))},[e[18]||(e[18]=o("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),o("path",{d:"M3 3v5h5"})])],-1)),o("span",null,p(c(r)("common.fontReset")||"Font size reset"),1)],8,te),o("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:P.value,onClick:e[10]||(e[10]=n=>v("increaseFont"))},[e[19]||(e[19]=o("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[o("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),o("span",null,p(c(r)("common.fontLarger")||"Font size +"),1)],8,ne)],64)):d("",!0),t.showExpandButton?(s(),i("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:e[11]||(e[11]=n=>{v("toggleExpand",n),u.value=!1})},[a.isExpanded?(s(),i("svg",ae,[...e[20]||(e[20]=[o("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)])])):(s(),i("svg",re,[...e[21]||(e[21]=[o("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)])])),o("span",null,p(a.isExpanded?c(r)("common.collapse")||"Collapse":c(r)("common.expand")||"Expand"),1)])):d("",!0),a.isPreviewable&&t.showPreviewButton?(s(),i("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:e[12]||(e[12]=n=>{v("preview"),u.value=!1})},[e[22]||(e[22]=o("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[o("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[o("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),o("circle",{cx:"12",cy:"12",r:"3"})])],-1)),o("span",null,p(c(r)("common.preview")||"Preview"),1)])):d("",!0)],512)):d("",!0)]),_:1})])):d("",!0)])])])):d("",!0),S(o("div",le,[f(l.$slots,"default")],512),[[M,!(a.isCollapsed||!a.stream&&a.loading)]]),S(o("div",se,[f(l.$slots,"loading",{},()=>[e[23]||(e[23]=o("div",{class:"loading-skeleton"},[o("div",{class:"skeleton-line"}),o("div",{class:"skeleton-line"}),o("div",{class:"skeleton-line short"})],-1))])],512),[[M,!a.stream&&a.loading]]),o("span",ie,p(a.copyText?c(r)("common.copied")||"Copied":""),1)],64))}});export{de as V};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-
|
|
1
|
+
import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-uGnch3Jw.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-CDU05fwN.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as ln,T as an,V as z,W as S,X,Y as un,$ as y,a0 as tn,a1 as F,a2 as _,a3 as rn,a4 as o,a5 as on,a6 as sn,a7 as fn}from"./mermaid.core-
|
|
1
|
+
import{S as ln,T as an,V as z,W as S,X,Y as un,$ as y,a0 as tn,a1 as F,a2 as _,a3 as rn,a4 as o,a5 as on,a6 as sn,a7 as fn}from"./mermaid.core-UWDZO4h_.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,E,q,v,A,Y,a){var I=E-l,i=q-h,n=Y-v,d=a-A,u=d*I-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*I,h+u*i]}function M(l,h,E,q,v,A,Y){var a=l-E,I=h-q,i=(Y?A:-A)/F(a*a+I*I),n=i*I,d=-i*a,u=l+n,s=h+d,f=E+n,c=q+d,$=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,O=(g<0?-1:1)*F(on(0,T*T*R-P*P)),V=(P*g-m*O)/R,W=(-P*m-g*O)/R,w=(P*g+m*O)/R,p=(-P*m+g*O)/R,x=V-$,e=W-t,r=w-$,j=p-t;return x*x+e*e>r*r+j*j&&(V=w,W=p),{cx:V,cy:W,x01:-n,y01:-d,x11:V*(v/T-1),y11:W*(v/T-1)}}function hn(){var l=cn,h=yn,E=X(0),q=null,v=gn,A=dn,Y=mn,a=null,I=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,$=rn(c-f),t=c>f;if(a||(a=n=I()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if($>tn-y)a.moveTo(s*z(f),s*S(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*z(c),u*S(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=$,O=$,V=Y.apply(this,arguments)/2,W=V>y&&(q?+q.apply(this,arguments):F(u*u+s*s)),w=_(rn(s-u)/2,+E.apply(this,arguments)),p=w,x=w,e,r;if(W>y){var j=sn(W/u*S(V)),G=sn(W/s*S(V));(P-=j*2)>y?(j*=t?1:-1,R+=j,T-=j):(P=0,R=T=(f+c)/2),(O-=G*2)>y?(G*=t?1:-1,m+=G,g-=G):(O=0,m=g=(f+c)/2)}var B=s*z(m),C=s*S(m),H=u*z(T),J=u*S(T);if(w>y){var K=s*z(g),L=s*S(g),N=u*z(R),Q=u*S(R),D;if($<an)if(D=pn(B,C,N,Q,K,L,H,J)){var U=B-D[0],Z=C-D[1],k=K-D[0],b=L-D[1],nn=1/S(fn((U*k+Z*b)/(F(U*U+Z*Z)*F(k*k+b*b)))/2),en=F(D[0]*D[0]+D[1]*D[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}O>y?x>y?(e=M(N,Q,B,C,s,x,t),r=M(K,L,H,J,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(B,C),a.arc(0,0,s,m,g,!t)):a.moveTo(B,C),!(u>y)||!(P>y)?a.lineTo(H,J):p>y?(e=M(H,J,K,L,u,-p,t),r=M(B,C,N,Q,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[z(d)*n,S(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:X(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:X(+n),i):h},i.cornerRadius=function(n){return arguments.length?(E=typeof n=="function"?n:X(+n),i):E},i.padRadius=function(n){return arguments.length?(q=n==null?null:typeof n=="function"?n:X(+n),i):q},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:X(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:X(+n),i):A},i.padAngle=function(n){return arguments.length?(Y=typeof n=="function"?n:X(+n),i):Y},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|