litepaseo 0.9.0 → 0.9.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/CHANGELOG.md +10 -0
- package/README.md +25 -8
- package/dist/server/cli.mjs +8 -2
- package/dist/server/{worker-CmsAgviJ.mjs → worker-Cq2Lf-Zo.mjs} +169 -21
- package/dist/web/assets/{ChangesPanel-DdtJswMt.js → ChangesPanel-BXtRMTqp.js} +1 -1
- package/dist/web/assets/ChangesPanel-BXtRMTqp.js.br +0 -0
- package/dist/web/assets/ChangesPanel-BXtRMTqp.js.gz +0 -0
- package/dist/web/assets/{CodeBlockNode-BOeBLCjf.js → CodeBlockNode-B9X7WZtj.js} +1 -1
- package/dist/web/assets/CodeBlockNode-B9X7WZtj.js.br +0 -0
- package/dist/web/assets/CodeBlockNode-B9X7WZtj.js.gz +0 -0
- package/dist/web/assets/{ConversationSearch-BXfGhrtx.js → ConversationSearch-DgRoYzWP.js} +1 -1
- package/dist/web/assets/ConversationSearch-DgRoYzWP.js.br +0 -0
- package/dist/web/assets/ConversationSearch-DgRoYzWP.js.gz +0 -0
- package/dist/web/assets/{FileViewer-C93qu9YH.js → FileViewer-B-N8t-A2.js} +1 -1
- package/dist/web/assets/FileViewer-B-N8t-A2.js.br +0 -0
- package/dist/web/assets/FileViewer-B-N8t-A2.js.gz +0 -0
- package/dist/web/assets/{FilesPanel-DyqtBDO_.js → FilesPanel-By85fwCy.js} +1 -1
- package/dist/web/assets/FilesPanel-By85fwCy.js.br +0 -0
- package/dist/web/assets/FilesPanel-By85fwCy.js.gz +0 -0
- package/dist/web/assets/{HostSettings-BCsvyF_3.js → HostSettings-Bzv1FBbL.js} +1 -1
- package/dist/web/assets/HostSettings-Bzv1FBbL.js.br +0 -0
- package/dist/web/assets/HostSettings-Bzv1FBbL.js.gz +0 -0
- package/dist/web/assets/{MarkdownMessage-CejBvgRc.js → MarkdownMessage-DbSS5ULZ.js} +5 -5
- package/dist/web/assets/MarkdownMessage-DbSS5ULZ.js.br +0 -0
- package/dist/web/assets/MarkdownMessage-DbSS5ULZ.js.gz +0 -0
- package/dist/web/assets/{PreCodeBlock-BBTzkaAH.js → PreCodeBlock-B-6jTSFa.js} +1 -1
- package/dist/web/assets/{PreCodeBlock.vue_vue_type_style_index_0_lang-4BQzC8nU.js → PreCodeBlock.vue_vue_type_style_index_0_lang-CunCuyah.js} +1 -1
- package/dist/web/assets/PreCodeBlock.vue_vue_type_style_index_0_lang-CunCuyah.js.br +0 -0
- package/dist/web/assets/PreCodeBlock.vue_vue_type_style_index_0_lang-CunCuyah.js.gz +0 -0
- package/dist/web/assets/{SubagentsPanel-D1bEm5QC.js → SubagentsPanel-CdZce3Xr.js} +1 -1
- package/dist/web/assets/SubagentsPanel-CdZce3Xr.js.br +0 -0
- package/dist/web/assets/SubagentsPanel-CdZce3Xr.js.gz +0 -0
- package/dist/web/assets/{TerminalPanel-wazWBZjN.js → TerminalPanel-iBK2wpI0.js} +1 -1
- package/dist/web/assets/TerminalPanel-iBK2wpI0.js.br +0 -0
- package/dist/web/assets/TerminalPanel-iBK2wpI0.js.gz +0 -0
- package/dist/web/assets/{Tooltip-CrG6tFax.js → Tooltip-DLPAOJ1c.js} +1 -1
- package/dist/web/assets/Tooltip-DLPAOJ1c.js.br +0 -0
- package/dist/web/assets/Tooltip-DLPAOJ1c.js.gz +0 -0
- package/dist/web/assets/index-DV5BdS_U.js +35 -0
- package/dist/web/assets/index-DV5BdS_U.js.br +0 -0
- package/dist/web/assets/index-DV5BdS_U.js.gz +0 -0
- package/dist/web/assets/{index10-C9Xw5wOS.js → index10-DgcnbLc5.js} +1 -1
- package/dist/web/assets/index10-DgcnbLc5.js.br +0 -0
- package/dist/web/assets/index10-DgcnbLc5.js.gz +0 -0
- package/dist/web/assets/index3-BdNVIlGK.js +1 -0
- package/dist/web/assets/index4-DnuPr-1i.js +1 -0
- package/dist/web/assets/{index5-Cxc_iCM3.js → index5-Bp-1tRh4.js} +1 -1
- package/dist/web/assets/index5-Bp-1tRh4.js.br +0 -0
- package/dist/web/assets/index5-Bp-1tRh4.js.gz +0 -0
- package/dist/web/assets/{index6-DsTT-iog.js → index6-B8l4-gzx.js} +1 -1
- package/dist/web/assets/index6-B8l4-gzx.js.br +0 -0
- package/dist/web/assets/index6-B8l4-gzx.js.gz +0 -0
- package/dist/web/assets/{index7-Bgw61c0t.js → index7-CIxLf3CP.js} +1 -1
- package/dist/web/assets/index7-CIxLf3CP.js.br +0 -0
- package/dist/web/assets/index7-CIxLf3CP.js.gz +0 -0
- package/dist/web/assets/{index8-DLEM8iM5.js → index8-CnHhIOzI.js} +1 -1
- package/dist/web/assets/index8-CnHhIOzI.js.br +0 -0
- package/dist/web/assets/index8-CnHhIOzI.js.gz +0 -0
- package/dist/web/assets/{index9-CUy1AFI-.js → index9-B_ZyF9x1.js} +1 -1
- package/dist/web/assets/index9-B_ZyF9x1.js.br +0 -0
- package/dist/web/assets/index9-B_ZyF9x1.js.gz +0 -0
- package/dist/web/index.html +1 -1
- package/dist/web/index.html.br +0 -0
- package/dist/web/index.html.gz +0 -0
- package/package.json +1 -1
- package/dist/web/assets/ChangesPanel-DdtJswMt.js.br +0 -0
- package/dist/web/assets/ChangesPanel-DdtJswMt.js.gz +0 -0
- package/dist/web/assets/CodeBlockNode-BOeBLCjf.js.br +0 -0
- package/dist/web/assets/CodeBlockNode-BOeBLCjf.js.gz +0 -0
- package/dist/web/assets/ConversationSearch-BXfGhrtx.js.br +0 -0
- package/dist/web/assets/ConversationSearch-BXfGhrtx.js.gz +0 -0
- package/dist/web/assets/FileViewer-C93qu9YH.js.br +0 -0
- package/dist/web/assets/FileViewer-C93qu9YH.js.gz +0 -0
- package/dist/web/assets/FilesPanel-DyqtBDO_.js.br +0 -0
- package/dist/web/assets/FilesPanel-DyqtBDO_.js.gz +0 -0
- package/dist/web/assets/HostSettings-BCsvyF_3.js.br +0 -0
- package/dist/web/assets/HostSettings-BCsvyF_3.js.gz +0 -0
- package/dist/web/assets/MarkdownMessage-CejBvgRc.js.br +0 -0
- package/dist/web/assets/MarkdownMessage-CejBvgRc.js.gz +0 -0
- package/dist/web/assets/PreCodeBlock.vue_vue_type_style_index_0_lang-4BQzC8nU.js.br +0 -0
- package/dist/web/assets/PreCodeBlock.vue_vue_type_style_index_0_lang-4BQzC8nU.js.gz +0 -0
- package/dist/web/assets/SubagentsPanel-D1bEm5QC.js.br +0 -0
- package/dist/web/assets/SubagentsPanel-D1bEm5QC.js.gz +0 -0
- package/dist/web/assets/TerminalPanel-wazWBZjN.js.br +0 -0
- package/dist/web/assets/TerminalPanel-wazWBZjN.js.gz +0 -0
- package/dist/web/assets/Tooltip-CrG6tFax.js.br +0 -0
- package/dist/web/assets/Tooltip-CrG6tFax.js.gz +0 -0
- package/dist/web/assets/index-Cmpdc3EH.js +0 -35
- package/dist/web/assets/index-Cmpdc3EH.js.br +0 -0
- package/dist/web/assets/index-Cmpdc3EH.js.gz +0 -0
- package/dist/web/assets/index10-C9Xw5wOS.js.br +0 -0
- package/dist/web/assets/index10-C9Xw5wOS.js.gz +0 -0
- package/dist/web/assets/index3-dduGUVTy.js +0 -1
- package/dist/web/assets/index4-qdeznE4u.js +0 -1
- package/dist/web/assets/index5-Cxc_iCM3.js.br +0 -0
- package/dist/web/assets/index5-Cxc_iCM3.js.gz +0 -0
- package/dist/web/assets/index6-DsTT-iog.js.br +0 -0
- package/dist/web/assets/index6-DsTT-iog.js.gz +0 -0
- package/dist/web/assets/index7-Bgw61c0t.js.br +0 -0
- package/dist/web/assets/index7-Bgw61c0t.js.gz +0 -0
- package/dist/web/assets/index8-DLEM8iM5.js.br +0 -0
- package/dist/web/assets/index8-DLEM8iM5.js.gz +0 -0
- package/dist/web/assets/index9-CUy1AFI-.js.br +0 -0
- package/dist/web/assets/index9-CUy1AFI-.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{t as default}from"./PreCodeBlock.vue_vue_type_style_index_0_lang-
|
|
1
|
+
export{t as default}from"./PreCodeBlock.vue_vue_type_style_index_0_lang-CunCuyah.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,C as t,H as n,K as r,N as i,R as a,T as o,X as s,Y as c,_ as l,at as u,b as d,ct as f,d as ee,f as p,g as m,h,it as g,k as _,l as v,n as y,st as te,tt as b,v as x,x as S,y as C}from"./vue.runtime.esm-bundler-4XjPOHMM.js";import{G as w,J as T,K as E,T as D,U as O,Y as k,at as A,ct as j,dt as M,ft as N,g as P,h as F,q as I,rt as L,st as ne,ut as re,w as R,x as z}from"./MarkdownMessage-CejBvgRc.js";var B=Object.defineProperty,V=Object.defineProperties,ie=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,G=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t)=>{for(var n in t||={})U.call(t,n)&&G(e,n,t[n]);if(H)for(var n of H(t))W.call(t,n)&&G(e,n,t[n]);return e},q=(e,t)=>V(e,ie(t)),J=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())});function Y(e,t){if(t===void 0)return E(e);if(t){let n=t(e);if(n!=null&&n!==``)return n}let n=O(e);return I(n)||T()}var X={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)]`},Z={class:`flex items-center gap-0.5`},Q=[`aria-label`],$={class:`code-diff-stat removed`},ae={class:`code-diff-stat added`},oe=[`aria-label`],se={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},ce={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=[`aria-pressed`],ue={key:3,class:`relative`},de=[`aria-expanded`],fe=[`disabled`],pe=[`disabled`],me=[`disabled`],he={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},ge={key:1,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},_e={class:`code-loading-placeholder`},ve={class:`sr-only`,"aria-live":`polite`,role:`status`},ye=o({__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(e,{emit:r}){let i=e,o=r,l=b(!1),d=b(null),_=b(null);function w(){R(!0),l.value=!l.value,l.value&&document.addEventListener(`click`,E,{once:!0,capture:!0})}function T(){R(!0),l.value=!1}function E(e){let t=e.target;d.value?.contains(t)||_.value?.contains(t)?document.addEventListener(`click`,E,{once:!0,capture:!0}):T()}let O=h(()=>i.showFontSizeButtons&&i.enableFontSizeControl||i.showExpandButton||i.isPreviewable&&i.showPreviewButton),{t:k}=z(),A=h(()=>!1!==i.showTooltips);function j(e,t){A.value&&D(e.currentTarget,t,`top`,!1,void 0,i.isDark)}function M(){A.value&&R()}function N(e){j(e,i.copyText?k(`common.copied`)||`Copied`:k(`common.copy`)||`Copy`)}let P=h(()=>!!Number.isFinite(i.codeFontSize)&&(i.codeFontSize??0)<=(i.codeFontMin??0)),F=h(()=>!i.fontBaselineReady||i.codeFontSize===i.defaultCodeFontSize),I=h(()=>!!Number.isFinite(i.codeFontSize)&&(i.codeFontSize??0)>=(i.codeFontMax??100));return(r,h)=>(a(),C(p,null,[i.showHeader?(a(),C(`div`,X,[n(r.$slots,`header-left`),n(r.$slots,`header-right`,{},()=>[m(`div`,Z,[e.diffStats?(a(),C(`div`,{key:0,class:`code-diff-stats`,"aria-label":e.diffStatsAriaLabel},[m(`span`,$,`-`+f(e.diffStats.removed),1),m(`span`,ae,`+`+f(e.diffStats.added),1)],8,Q)):x(``,!0),i.showCopyButton?(a(),C(`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":e.copyText?g(k)(`common.copied`)||`Copied`:g(k)(`common.copy`)||`Copy`,onClick:h[0]||=e=>o(`copy`),onMouseenter:h[1]||=e=>N(e),onFocus:h[2]||=e=>N(e),onMouseleave:M,onBlur:M},[e.copyText?(a(),C(`svg`,ce,[...h[14]||=[m(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):(a(),C(`svg`,se,[...h[13]||=[m(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[m(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),m(`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,oe)):x(``,!0),i.showCollapseButton?(a(),C(`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":e.isCollapsed,onClick:h[3]||=e=>o(`toggleCollapse`),onMouseenter:h[4]||=t=>j(t,e.isCollapsed?g(k)(`common.expand`)||`Expand`:g(k)(`common.collapse`)||`Collapse`),onFocus:h[5]||=t=>j(t,e.isCollapsed?g(k)(`common.expand`)||`Expand`:g(k)(`common.collapse`)||`Collapse`),onMouseleave:M,onBlur:M},[(a(),C(`svg`,{style:te({rotate:e.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`},[...h[15]||=[m(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,le)):x(``,!0),O.value?(a(),C(`div`,ue,[m(`button`,{ref_key:`moreBtnRef`,ref:_,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":l.value,"aria-haspopup":`true`,onClick:ee(w,[`stop`]),onMouseenter:h[6]||=e=>j(e,g(k)(`common.more`)||`More`),onFocus:h[7]||=e=>j(e,g(k)(`common.more`)||`More`),onMouseleave:M,onBlur:M},[...h[16]||=[S(`<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,de),t(y,{name:`code-menu`},{default:c(()=>[l.value?(a(),C(`div`,{key:0,ref_key:`moreMenuRef`,ref:d,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`},[i.showFontSizeButtons&&i.enableFontSizeControl?(a(),C(p,{key:0},[m(`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:h[8]||=e=>{g(R)(!0),o(`decreaseFont`)}},[h[17]||=m(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[m(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14`})],-1),m(`span`,null,f(g(k)(`common.fontSmaller`)||`Font size −`),1)],8,fe),m(`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:F.value,onClick:h[9]||=e=>{g(R)(!0),o(`resetFont`)}},[h[18]||=m(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[m(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[m(`path`,{d:`M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8`}),m(`path`,{d:`M3 3v5h5`})])],-1),m(`span`,null,f(g(k)(`common.fontReset`)||`Font size reset`),1)],8,pe),m(`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:I.value,onClick:h[10]||=e=>{g(R)(!0),o(`increaseFont`)}},[h[19]||=m(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[m(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14m-7-7v14`})],-1),m(`span`,null,f(g(k)(`common.fontLarger`)||`Font size +`),1)],8,me)],64)):x(``,!0),i.showExpandButton?(a(),C(`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:h[11]||=e=>{T(),o(`toggleExpand`)}},[e.isExpanded?(a(),C(`svg`,he,[...h[20]||=[m(`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)]])):(a(),C(`svg`,ge,[...h[21]||=[m(`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(`span`,null,f(e.isExpanded?g(k)(`common.collapse`)||`Collapse`:g(k)(`common.expand`)||`Expand`),1)])):x(``,!0),e.isPreviewable&&i.showPreviewButton?(a(),C(`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:h[12]||=e=>{T(),o(`preview`)}},[h[22]||=m(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[m(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[m(`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`}),m(`circle`,{cx:`12`,cy:`12`,r:`3`})])],-1),m(`span`,null,f(g(k)(`common.preview`)||`Preview`),1)])):x(``,!0)],512)):x(``,!0)]),_:1})])):x(``,!0)])])])):x(``,!0),s(m(`div`,{class:u([`code-block-shell-content`,{"code-block-shell-content--collapsed":e.isCollapsed}])},[n(r.$slots,`default`)],2),[[v,!!e.stream||!e.loading]]),s(m(`div`,_e,[n(r.$slots,`loading`,{},()=>[h[23]||=m(`div`,{class:`loading-skeleton`},[m(`div`,{class:`skeleton-line`}),m(`div`,{class:`skeleton-line`}),m(`div`,{class:`skeleton-line short`})],-1)])],512),[[v,!e.stream&&e.loading]]),m(`span`,ve,f(e.copyText?g(k)(`common.copied`)||`Copied`:``),1)],64))}}),be={class:`code-header-main`},xe=[`innerHTML`],Se={class:`code-header-copy`},Ce={class:`code-header-title`},we={key:0,class:`code-header-caption`},Te=o(q(K({},{inheritAttrs:!1}),{__name:`PreCodeBlock`,props:{codeBlockOptions:{},clipboardWriter:{},darkTheme:{},isDark:{type:Boolean,default:!1},lightTheme:{},resolvedVisualOptions:{},showCopyButton:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showToolbar:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},theme:{},themes:{},node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean,default:!0},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},emits:[`copy`],setup(o,{emit:s}){let u=o,ee=s,p=r(),v=h(()=>{let e=p,{class:t,style:n}=e;return((e,t)=>{var n={};for(var r in e)U.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&H)for(var r of H(e))t.indexOf(r)<0&&W.call(e,r)&&(n[r]=e[r]);return n})(e,[`class`,`style`])}),y=b(null),S=b(!1),T,E=_(P,void 0),D=h(()=>u.showLineNumbers??!0!==u.codeBlockOptions?.disableLineNumbers),I=h(()=>L(u.node)),R=h(()=>!0===u.diffInline||I.value&&ne(u.codeBlockOptions??{})),z=h(()=>O(String(u.node?.language??``))),B=h(()=>{let e=z.value;return e?k[e]||e.charAt(0).toUpperCase()+e.slice(1):k[``]||`Plain Text`}),V=h(()=>A(String(u.node?.raw??``),B.value,L(u.node))),ie=h(()=>(w.value,Y(z.value,E))),G=h(()=>u.resolvedVisualOptions??N(u.codeBlockOptions)),X=h(()=>re({darkTheme:u.darkTheme,isDark:u.isDark,lightTheme:u.lightTheme,theme:u.theme,themes:u.themes})),Z=h(()=>q(K({"--markstream-code-fallback-bg":X.value.background,"--markstream-code-fallback-fg":X.value.foreground},X.value.builtin?{"--markstream-code-theme-bg":X.value.background,"--markstream-code-theme-fg":X.value.foreground,"--markstream-code-theme-line-number":X.value.lineNumber}:{}),{"--markstream-diff-added-line-fill":X.value.diffAddedLine,"--markstream-diff-added-number-fill":X.value.diffAddedNumber,"--markstream-diff-editor-bg":X.value.background,"--markstream-diff-removed-line-fill":X.value.diffRemovedLine,"--markstream-diff-removed-number-fill":X.value.diffRemovedNumber,"--markstream-diff-shell-bg":X.value.background,"--markstream-pre-resolved-theme-bg":X.value.background,"--markstream-pre-resolved-theme-fg":X.value.foreground,"--markstream-pre-resolved-theme-line-number":X.value.lineNumber,backgroundColor:X.value.background,color:X.value.foreground})),Q=h(()=>[`code-pre-fallback`,p.class,{"is-wrap":G.value.overflow===`wrap`}]),$=h(()=>{let e=G.value,t=I.value&&typeof u.reservedHeightPx==`number`&&Number.isFinite(u.reservedHeightPx)&&u.reservedHeightPx>0?`${Math.ceil(u.reservedHeightPx)}px`:void 0;return K(q(K(K({},j(e,{padding:u.codeBlockOptions?.padding,showLineNumbers:D.value,diff:I.value})),M(X.value)),{"--markstream-diff-fallback-handoff-height":t??`auto`}),t?{height:t,minHeight:t,maxHeight:t}:{})});function ae(){return J(this,null,function*(){let e=String((n=(t=u.node)?.code)??``);var t,n;try{yield function(e){return J(this,null,function*(){if(u.clipboardWriter)return void(yield u.clipboardWriter(e));if(typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`)return void(yield navigator.clipboard.writeText(e));if(typeof document>`u`||!document.body)throw Error(`Clipboard API is unavailable`);let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select();try{if(!document.execCommand(`copy`))throw Error(`Clipboard copy command failed`)}finally{t.remove()}})}(e),S.value=!0,ee(`copy`,e),T&&clearTimeout(T),T=setTimeout(()=>{S.value=!1,T=void 0},1e3)}catch(e){S.value=!1,console.error(`[markstream-vue] Failed to copy preformatted code.`,e)}})}return i(()=>{T&&clearTimeout(T)}),(r,i)=>u.showToolbar?(a(),C(`div`,{key:0,style:te(Z.value),class:`code-block-container rounded-lg border`},[t(ye,{"show-header":u.showHeader,"show-copy-button":u.showCopyButton,"show-collapse-button":!1,"show-font-size-buttons":!1,"show-expand-button":!1,"show-preview-button":!1,"show-tooltips":u.showTooltips,"copy-text":S.value,stream:``,onCopy:ae},d({"header-left":c(()=>[n(r.$slots,`header-left`,{},()=>[m(`div`,be,[m(`span`,{class:`icon-slot h-4 w-4 flex-shrink-0`,innerHTML:ie.value},null,8,xe),m(`div`,Se,[m(`div`,Ce,f(V.value.title),1),V.value.caption?(a(),C(`div`,we,f(V.value.caption),1)):x(``,!0)])])])]),default:c(()=>[t(F,e({ref_key:`preNodeRef`,ref:y},v.value,{class:Q.value,style:[g(p).style,$.value],node:u.node,loading:u.loading,"show-line-numbers":D.value,"diff-inline":R.value,"diff-hide-unchanged-regions":u.diffHideUnchangedRegions,"reserved-height-px":u.reservedHeightPx,"data-markstream-code-theme":X.value.name}),null,16,[`class`,`style`,`node`,`loading`,`show-line-numbers`,`diff-inline`,`diff-hide-unchanged-regions`,`reserved-height-px`,`data-markstream-code-theme`])]),_:2},[r.$slots[`header-right`]?{name:`header-right`,fn:c(()=>[n(r.$slots,`header-right`)]),key:`0`}:void 0]),1032,[`show-header`,`show-copy-button`,`show-tooltips`,`copy-text`])],4)):(a(),l(F,e({key:1,ref_key:`preNodeRef`,ref:y},v.value,{class:Q.value,style:[g(p).style,$.value],node:u.node,loading:u.loading,"show-line-numbers":D.value,"diff-inline":R.value,"diff-hide-unchanged-regions":u.diffHideUnchangedRegions,"reserved-height-px":u.reservedHeightPx,"data-markstream-code-theme":X.value.name}),null,16,[`class`,`style`,`node`,`loading`,`show-line-numbers`,`diff-inline`,`diff-hide-unchanged-regions`,`reserved-height-px`,`data-markstream-code-theme`]))}}));export{ye as n,Y as r,Te as t};
|
|
1
|
+
import{A as e,C as t,H as n,K as r,N as i,R as a,T as o,X as s,Y as c,_ as l,at as u,b as d,ct as f,d as ee,f as p,g as m,h,it as g,k as _,l as v,n as y,st as te,tt as b,v as x,x as S,y as C}from"./vue.runtime.esm-bundler-4XjPOHMM.js";import{G as w,J as T,K as E,T as D,U as O,Y as k,at as A,ct as j,dt as M,ft as N,g as P,h as F,q as I,rt as L,st as ne,ut as re,w as R,x as z}from"./MarkdownMessage-DbSS5ULZ.js";var B=Object.defineProperty,V=Object.defineProperties,ie=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,G=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t)=>{for(var n in t||={})U.call(t,n)&&G(e,n,t[n]);if(H)for(var n of H(t))W.call(t,n)&&G(e,n,t[n]);return e},q=(e,t)=>V(e,ie(t)),J=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())});function Y(e,t){if(t===void 0)return E(e);if(t){let n=t(e);if(n!=null&&n!==``)return n}let n=O(e);return I(n)||T()}var X={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)]`},Z={class:`flex items-center gap-0.5`},Q=[`aria-label`],$={class:`code-diff-stat removed`},ae={class:`code-diff-stat added`},oe=[`aria-label`],se={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},ce={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=[`aria-pressed`],ue={key:3,class:`relative`},de=[`aria-expanded`],fe=[`disabled`],pe=[`disabled`],me=[`disabled`],he={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},ge={key:1,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},_e={class:`code-loading-placeholder`},ve={class:`sr-only`,"aria-live":`polite`,role:`status`},ye=o({__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(e,{emit:r}){let i=e,o=r,l=b(!1),d=b(null),_=b(null);function w(){R(!0),l.value=!l.value,l.value&&document.addEventListener(`click`,E,{once:!0,capture:!0})}function T(){R(!0),l.value=!1}function E(e){let t=e.target;d.value?.contains(t)||_.value?.contains(t)?document.addEventListener(`click`,E,{once:!0,capture:!0}):T()}let O=h(()=>i.showFontSizeButtons&&i.enableFontSizeControl||i.showExpandButton||i.isPreviewable&&i.showPreviewButton),{t:k}=z(),A=h(()=>!1!==i.showTooltips);function j(e,t){A.value&&D(e.currentTarget,t,`top`,!1,void 0,i.isDark)}function M(){A.value&&R()}function N(e){j(e,i.copyText?k(`common.copied`)||`Copied`:k(`common.copy`)||`Copy`)}let P=h(()=>!!Number.isFinite(i.codeFontSize)&&(i.codeFontSize??0)<=(i.codeFontMin??0)),F=h(()=>!i.fontBaselineReady||i.codeFontSize===i.defaultCodeFontSize),I=h(()=>!!Number.isFinite(i.codeFontSize)&&(i.codeFontSize??0)>=(i.codeFontMax??100));return(r,h)=>(a(),C(p,null,[i.showHeader?(a(),C(`div`,X,[n(r.$slots,`header-left`),n(r.$slots,`header-right`,{},()=>[m(`div`,Z,[e.diffStats?(a(),C(`div`,{key:0,class:`code-diff-stats`,"aria-label":e.diffStatsAriaLabel},[m(`span`,$,`-`+f(e.diffStats.removed),1),m(`span`,ae,`+`+f(e.diffStats.added),1)],8,Q)):x(``,!0),i.showCopyButton?(a(),C(`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":e.copyText?g(k)(`common.copied`)||`Copied`:g(k)(`common.copy`)||`Copy`,onClick:h[0]||=e=>o(`copy`),onMouseenter:h[1]||=e=>N(e),onFocus:h[2]||=e=>N(e),onMouseleave:M,onBlur:M},[e.copyText?(a(),C(`svg`,ce,[...h[14]||=[m(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):(a(),C(`svg`,se,[...h[13]||=[m(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[m(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),m(`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,oe)):x(``,!0),i.showCollapseButton?(a(),C(`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":e.isCollapsed,onClick:h[3]||=e=>o(`toggleCollapse`),onMouseenter:h[4]||=t=>j(t,e.isCollapsed?g(k)(`common.expand`)||`Expand`:g(k)(`common.collapse`)||`Collapse`),onFocus:h[5]||=t=>j(t,e.isCollapsed?g(k)(`common.expand`)||`Expand`:g(k)(`common.collapse`)||`Collapse`),onMouseleave:M,onBlur:M},[(a(),C(`svg`,{style:te({rotate:e.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`},[...h[15]||=[m(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,le)):x(``,!0),O.value?(a(),C(`div`,ue,[m(`button`,{ref_key:`moreBtnRef`,ref:_,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":l.value,"aria-haspopup":`true`,onClick:ee(w,[`stop`]),onMouseenter:h[6]||=e=>j(e,g(k)(`common.more`)||`More`),onFocus:h[7]||=e=>j(e,g(k)(`common.more`)||`More`),onMouseleave:M,onBlur:M},[...h[16]||=[S(`<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,de),t(y,{name:`code-menu`},{default:c(()=>[l.value?(a(),C(`div`,{key:0,ref_key:`moreMenuRef`,ref:d,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`},[i.showFontSizeButtons&&i.enableFontSizeControl?(a(),C(p,{key:0},[m(`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:h[8]||=e=>{g(R)(!0),o(`decreaseFont`)}},[h[17]||=m(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[m(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14`})],-1),m(`span`,null,f(g(k)(`common.fontSmaller`)||`Font size −`),1)],8,fe),m(`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:F.value,onClick:h[9]||=e=>{g(R)(!0),o(`resetFont`)}},[h[18]||=m(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[m(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[m(`path`,{d:`M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8`}),m(`path`,{d:`M3 3v5h5`})])],-1),m(`span`,null,f(g(k)(`common.fontReset`)||`Font size reset`),1)],8,pe),m(`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:I.value,onClick:h[10]||=e=>{g(R)(!0),o(`increaseFont`)}},[h[19]||=m(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[m(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14m-7-7v14`})],-1),m(`span`,null,f(g(k)(`common.fontLarger`)||`Font size +`),1)],8,me)],64)):x(``,!0),i.showExpandButton?(a(),C(`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:h[11]||=e=>{T(),o(`toggleExpand`)}},[e.isExpanded?(a(),C(`svg`,he,[...h[20]||=[m(`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)]])):(a(),C(`svg`,ge,[...h[21]||=[m(`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(`span`,null,f(e.isExpanded?g(k)(`common.collapse`)||`Collapse`:g(k)(`common.expand`)||`Expand`),1)])):x(``,!0),e.isPreviewable&&i.showPreviewButton?(a(),C(`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:h[12]||=e=>{T(),o(`preview`)}},[h[22]||=m(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[m(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[m(`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`}),m(`circle`,{cx:`12`,cy:`12`,r:`3`})])],-1),m(`span`,null,f(g(k)(`common.preview`)||`Preview`),1)])):x(``,!0)],512)):x(``,!0)]),_:1})])):x(``,!0)])])])):x(``,!0),s(m(`div`,{class:u([`code-block-shell-content`,{"code-block-shell-content--collapsed":e.isCollapsed}])},[n(r.$slots,`default`)],2),[[v,!!e.stream||!e.loading]]),s(m(`div`,_e,[n(r.$slots,`loading`,{},()=>[h[23]||=m(`div`,{class:`loading-skeleton`},[m(`div`,{class:`skeleton-line`}),m(`div`,{class:`skeleton-line`}),m(`div`,{class:`skeleton-line short`})],-1)])],512),[[v,!e.stream&&e.loading]]),m(`span`,ve,f(e.copyText?g(k)(`common.copied`)||`Copied`:``),1)],64))}}),be={class:`code-header-main`},xe=[`innerHTML`],Se={class:`code-header-copy`},Ce={class:`code-header-title`},we={key:0,class:`code-header-caption`},Te=o(q(K({},{inheritAttrs:!1}),{__name:`PreCodeBlock`,props:{codeBlockOptions:{},clipboardWriter:{},darkTheme:{},isDark:{type:Boolean,default:!1},lightTheme:{},resolvedVisualOptions:{},showCopyButton:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showToolbar:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},theme:{},themes:{},node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean,default:!0},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},emits:[`copy`],setup(o,{emit:s}){let u=o,ee=s,p=r(),v=h(()=>{let e=p,{class:t,style:n}=e;return((e,t)=>{var n={};for(var r in e)U.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&H)for(var r of H(e))t.indexOf(r)<0&&W.call(e,r)&&(n[r]=e[r]);return n})(e,[`class`,`style`])}),y=b(null),S=b(!1),T,E=_(P,void 0),D=h(()=>u.showLineNumbers??!0!==u.codeBlockOptions?.disableLineNumbers),I=h(()=>L(u.node)),R=h(()=>!0===u.diffInline||I.value&&ne(u.codeBlockOptions??{})),z=h(()=>O(String(u.node?.language??``))),B=h(()=>{let e=z.value;return e?k[e]||e.charAt(0).toUpperCase()+e.slice(1):k[``]||`Plain Text`}),V=h(()=>A(String(u.node?.raw??``),B.value,L(u.node))),ie=h(()=>(w.value,Y(z.value,E))),G=h(()=>u.resolvedVisualOptions??N(u.codeBlockOptions)),X=h(()=>re({darkTheme:u.darkTheme,isDark:u.isDark,lightTheme:u.lightTheme,theme:u.theme,themes:u.themes})),Z=h(()=>q(K({"--markstream-code-fallback-bg":X.value.background,"--markstream-code-fallback-fg":X.value.foreground},X.value.builtin?{"--markstream-code-theme-bg":X.value.background,"--markstream-code-theme-fg":X.value.foreground,"--markstream-code-theme-line-number":X.value.lineNumber}:{}),{"--markstream-diff-added-line-fill":X.value.diffAddedLine,"--markstream-diff-added-number-fill":X.value.diffAddedNumber,"--markstream-diff-editor-bg":X.value.background,"--markstream-diff-removed-line-fill":X.value.diffRemovedLine,"--markstream-diff-removed-number-fill":X.value.diffRemovedNumber,"--markstream-diff-shell-bg":X.value.background,"--markstream-pre-resolved-theme-bg":X.value.background,"--markstream-pre-resolved-theme-fg":X.value.foreground,"--markstream-pre-resolved-theme-line-number":X.value.lineNumber,backgroundColor:X.value.background,color:X.value.foreground})),Q=h(()=>[`code-pre-fallback`,p.class,{"is-wrap":G.value.overflow===`wrap`}]),$=h(()=>{let e=G.value,t=I.value&&typeof u.reservedHeightPx==`number`&&Number.isFinite(u.reservedHeightPx)&&u.reservedHeightPx>0?`${Math.ceil(u.reservedHeightPx)}px`:void 0;return K(q(K(K({},j(e,{padding:u.codeBlockOptions?.padding,showLineNumbers:D.value,diff:I.value})),M(X.value)),{"--markstream-diff-fallback-handoff-height":t??`auto`}),t?{height:t,minHeight:t,maxHeight:t}:{})});function ae(){return J(this,null,function*(){let e=String((n=(t=u.node)?.code)??``);var t,n;try{yield function(e){return J(this,null,function*(){if(u.clipboardWriter)return void(yield u.clipboardWriter(e));if(typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`)return void(yield navigator.clipboard.writeText(e));if(typeof document>`u`||!document.body)throw Error(`Clipboard API is unavailable`);let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select();try{if(!document.execCommand(`copy`))throw Error(`Clipboard copy command failed`)}finally{t.remove()}})}(e),S.value=!0,ee(`copy`,e),T&&clearTimeout(T),T=setTimeout(()=>{S.value=!1,T=void 0},1e3)}catch(e){S.value=!1,console.error(`[markstream-vue] Failed to copy preformatted code.`,e)}})}return i(()=>{T&&clearTimeout(T)}),(r,i)=>u.showToolbar?(a(),C(`div`,{key:0,style:te(Z.value),class:`code-block-container rounded-lg border`},[t(ye,{"show-header":u.showHeader,"show-copy-button":u.showCopyButton,"show-collapse-button":!1,"show-font-size-buttons":!1,"show-expand-button":!1,"show-preview-button":!1,"show-tooltips":u.showTooltips,"copy-text":S.value,stream:``,onCopy:ae},d({"header-left":c(()=>[n(r.$slots,`header-left`,{},()=>[m(`div`,be,[m(`span`,{class:`icon-slot h-4 w-4 flex-shrink-0`,innerHTML:ie.value},null,8,xe),m(`div`,Se,[m(`div`,Ce,f(V.value.title),1),V.value.caption?(a(),C(`div`,we,f(V.value.caption),1)):x(``,!0)])])])]),default:c(()=>[t(F,e({ref_key:`preNodeRef`,ref:y},v.value,{class:Q.value,style:[g(p).style,$.value],node:u.node,loading:u.loading,"show-line-numbers":D.value,"diff-inline":R.value,"diff-hide-unchanged-regions":u.diffHideUnchangedRegions,"reserved-height-px":u.reservedHeightPx,"data-markstream-code-theme":X.value.name}),null,16,[`class`,`style`,`node`,`loading`,`show-line-numbers`,`diff-inline`,`diff-hide-unchanged-regions`,`reserved-height-px`,`data-markstream-code-theme`])]),_:2},[r.$slots[`header-right`]?{name:`header-right`,fn:c(()=>[n(r.$slots,`header-right`)]),key:`0`}:void 0]),1032,[`show-header`,`show-copy-button`,`show-tooltips`,`copy-text`])],4)):(a(),l(F,e({key:1,ref_key:`preNodeRef`,ref:y},v.value,{class:Q.value,style:[g(p).style,$.value],node:u.node,loading:u.loading,"show-line-numbers":D.value,"diff-inline":R.value,"diff-hide-unchanged-regions":u.diffHideUnchangedRegions,"reserved-height-px":u.reservedHeightPx,"data-markstream-code-theme":X.value.name}),null,16,[`class`,`style`,`node`,`loading`,`show-line-numbers`,`diff-inline`,`diff-hide-unchanged-regions`,`reserved-height-px`,`data-markstream-code-theme`]))}}));export{ye as n,Y as r,Te as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,I as t,R as n,S as r,T as i,V as a,_ as o,at as s,ct as c,f as l,g as u,h as d,j as f,k as p,nt as m,q as h,tt as g,v as _,y as v,z as y}from"./vue.runtime.esm-bundler-4XjPOHMM.js";import{c as b,f as x,m as S,p as C,r as w,s as T}from"./index-
|
|
1
|
+
import{C as e,I as t,R as n,S as r,T as i,V as a,_ as o,at as s,ct as c,f as l,g as u,h as d,j as f,k as p,nt as m,q as h,tt as g,v as _,y as v,z as y}from"./vue.runtime.esm-bundler-4XjPOHMM.js";import{c as b,f as x,m as S,p as C,r as w,s as T}from"./index-DV5BdS_U.js";var E={class:`timeline-inner`},D={key:0,class:`older`},O={key:0,class:`older-loading`,role:`status`},k={key:1,class:`notice`},A={key:2,class:`timeline-working`,role:`status`},j={key:3,class:`timeline-empty`},M={key:0,class:`spinner`},N=C(i({__name:`SubagentConversation`,props:{base:{},api:{type:Function},running:{type:Boolean}},setup(e){let i=e,s=p(b,null),S=m({base:``,cwd:``});h(()=>s?.value,e=>{S.value={...e??{base:``,cwd:``},rewindModes:[],rewind:void 0,subagents:void 0,openSubagent:void 0}},{immediate:!0}),y(b,S);let C=m(new T),N=g(0),P=m([]),F=g(!1),I=g(!1),L=g(``),R=g(null),z=d(()=>(N.value,C.value.membership.value,P.value.length?[...P.value,...C.value.rows]:C.value.rows)),B=d(()=>(N.value,P.value.length?F.value:C.value.hasOlder)),V=d(()=>z.value.at(-1)?.seqStart??-1),H=()=>{let e=R.value;return!e||e.scrollHeight-e.scrollTop-e.clientHeight<120},U=()=>void f(()=>{let e=R.value;e&&(e.scrollTop=e.scrollHeight)}),W=x({url:()=>`/api`+i.base+`/timeline/stream`,onMessage:e=>{let t=e;if(t.type!==`ops`)return;let n=C.value,r=H()||!n.ready,i=t.ops.find(e=>e.type===`error`);L.value=i?.type===`error`?i.message:``;let a=n.epoch;n.apply(t.ops),a&&a!==n.epoch&&(P.value=[]),N.value++,r&&U()}});t(()=>W.close());async function G(){let e=C.value,t=z.value[0];if(t&&!I.value){I.value=!0,L.value=``;try{let n=JSON.stringify({epoch:e.epoch,seq:t.seqStart}),r=await i.api(i.base+`/timeline?cursor=`+encodeURIComponent(n));if(C.value!==e||r.epoch!==e.epoch)return;let a=R.value,o=a?a.scrollHeight-a.scrollTop:0,s=new Set(z.value.map(e=>e.seqStart)),c=r.rows.filter(e=>!s.has(e.seqStart)).map(e=>({seqStart:e.seqStart,row:m(e)}));P.value=[...c,...P.value],F.value=r.hasOlder,await f(),a&&(a.scrollTop=a.scrollHeight-o)}catch(e){L.value=e.message||`Could not load earlier messages.`}finally{I.value=!1}}}return(t,i)=>(n(),v(`div`,{ref_key:`element`,ref:R,class:`timeline subagent-timeline`},[u(`div`,E,[B.value?(n(),v(`div`,D,[I.value?(n(),v(`span`,O,[...i[0]||=[u(`span`,{class:`spinner`},null,-1),r(`Loading earlier messages…`,-1)]])):(n(),v(`button`,{key:1,class:`btn btn-ghost`,onClick:G},`Show earlier messages`))])):_(``,!0),L.value?(n(),v(`p`,k,c(L.value),1)):_(``,!0),(n(!0),v(l,null,a(z.value,t=>(n(),o(w,{key:C.value.epoch+`:`+t.seqStart,entry:t.row,final:t.seqStart!==V.value||!e.running},null,8,[`entry`,`final`]))),128)),e.running&&C.value.ready?(n(),v(`div`,A,[...i[1]||=[u(`span`,{class:`spinner`},null,-1),u(`span`,null,`Working…`,-1)]])):_(``,!0),z.value.length?_(``,!0):(n(),v(`div`,j,[C.value.ready?_(``,!0):(n(),v(`span`,M)),r(` `+c(C.value.ready?`No messages yet.`:`Loading conversation…`),1)]))])],512))}}),[[`__scopeId`,`data-v-96e296b9`]]),P={class:`subagents-panel`},F={class:`subagent-head`},I=[`title`],L=[`title`],R={key:1,class:`subagent-meta`},z={key:1,class:`subagent-list`},B={key:0,class:`subagent-empty`},V=[`onClick`],H={class:`subagent-text`},U={class:`subagent-name`},W={class:`subagent-sub`},G=[`onClick`],K={class:`subagent-text`},q={class:`subagent-name`},J={class:`subagent-sub`},Y=C(i({__name:`SubagentsPanel`,props:{agents:{},subagents:{},base:{},api:{type:Function},opened:{}},emits:[`update:opened`,`select`],setup(t,{emit:i}){let f=t,p=i,m=d(()=>f.opened?f.subagents.find(e=>e.id===f.opened)??null:null),h=e=>e.attention?`attention`:e.state===`failed`?`error`:e.state===`running`?`running`:e.unread?`unread`:`idle`,g=e=>e.attention?`Needs input`:e.state===`failed`?`Failed`:e.state===`running`?`Working`:e.unread?`Ready to review`:`Idle`,y=e=>e.status===`running`?`running`:e.status===`failed`?`error`:`idle`,b=e=>e.status===`running`?`Working`:e.status===`failed`?`Failed`:e.status===`canceled`?`Canceled`:`Done`,x=e=>e.description?.trim()||e.title?.trim()||`Subagent`,C=e=>{let t=e.description?.trim();return e.subtitle?.trim()||(t?e.title?.trim():``)||``};return(i,d)=>(n(),v(`section`,P,[t.opened?(n(),v(l,{key:0},[u(`header`,F,[u(`button`,{class:`icon-btn`,"aria-label":`All subagents`,title:`All subagents`,onClick:d[0]||=e=>p(`update:opened`,null)},[e(S,{name:`back`,size:16})]),m.value?(n(),v(`span`,{key:0,class:s([`status-dot`,`is-`+y(m.value)]),title:b(m.value)},null,10,I)):_(``,!0),u(`span`,{class:`subagent-title`,title:m.value?x(m.value):``},c(m.value?x(m.value):`Subagent`),9,L),m.value?(n(),v(`span`,R,c(b(m.value)),1)):_(``,!0)]),(n(),o(N,{key:t.base+`:`+t.opened,base:t.base+`/subagents/`+encodeURIComponent(t.opened),api:t.api,running:m.value?.status===`running`},null,8,[`base`,`api`,`running`]))],64)):(n(),v(`div`,z,[!t.agents.length&&!t.subagents.length?(n(),v(`p`,B,`No subagents yet.`)):_(``,!0),t.agents.length?(n(),v(l,{key:1},[d[1]||=u(`h3`,null,`Delegated agents`,-1),(n(!0),v(l,null,a(t.agents,t=>(n(),v(`button`,{key:t.key,class:`subagent-row`,onClick:e=>p(`select`,t.key)},[u(`span`,{class:s([`status-dot`,`is-`+h(t)])},null,2),u(`span`,H,[u(`span`,U,c(t.title||`Untitled session`),1),u(`span`,W,c(g(t))+` · `+c(t.provider),1)]),e(S,{name:`chevron`,size:12,class:`subagent-go`})],8,V))),128))],64)):_(``,!0),t.subagents.length?(n(),v(l,{key:2},[d[2]||=u(`h3`,null,`Provider subagents`,-1),(n(!0),v(l,null,a(t.subagents,t=>(n(),v(`button`,{key:t.id,class:s([`subagent-row`,{nested:!!t.parentSubagentId}]),onClick:e=>p(`update:opened`,t.id)},[u(`span`,{class:s([`status-dot`,`is-`+y(t)])},null,2),u(`span`,K,[u(`span`,q,c(x(t)),1),u(`span`,J,[r(c(b(t)),1),C(t)?(n(),v(l,{key:0},[r(` · `+c(C(t)),1)],64)):_(``,!0)])]),e(S,{name:`chevron`,size:12,class:`subagent-go`})],10,G))),128))],64)):_(``,!0)]))]))}}),[[`__scopeId`,`data-v-5b34ea74`]]);export{Y as default};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{C as e,F as t,I as n,R as r,S as i,T as a,V as o,X as ee,at as s,ct as c,d as l,f as u,g as d,i as f,it as p,j as m,nt as h,q as g,s as te,tt as _,v,y}from"./vue.runtime.esm-bundler-4XjPOHMM.js";import{f as b,m as x,o as S,p as C,t as w}from"./index-
|
|
1
|
+
import{C as e,F as t,I as n,R as r,S as i,T as a,V as o,X as ee,at as s,ct as c,d as l,f as u,g as d,i as f,it as p,j as m,nt as h,q as g,s as te,tt as _,v,y}from"./vue.runtime.esm-bundler-4XjPOHMM.js";import{f as b,m as x,o as S,p as C,t as w}from"./index-DV5BdS_U.js";var ne={class:`terminals`},re={class:`term-tabs`},ie=[`title`,`onClick`],ae=[`aria-label`,`onClick`],T=[`value`],E=[`disabled`],D={key:0,class:`term-error`},oe={class:`term-body`},se={key:0,class:`term-empty`},O=[`disabled`],k=C(a({__name:`TerminalPanel`,props:{hostId:{},cwd:{},visible:{type:Boolean},api:{type:Function}},setup(a){f(e=>({v111e7199:p(w)?`#141517`:`#fbfbfc`}));let C=a,k=_([]),A=_([]),j=_(``),M=_(null),N=_(``),P=_(!1),F=_(null),I=()=>`/hosts/${encodeURIComponent(C.hostId)}/terminals`,L=h(null),R=null,z=null,B,V=``,H=!1,U=null,W={dark:{background:`#141517`,foreground:`#e4e4e7`,cursor:`#e4e4e7`,selectionBackground:`#3a3b42`},light:{background:`#fbfbfc`,foreground:`#18181b`,cursor:`#18181b`,selectionBackground:`#d6d6dc`}};async function G(){if(!(L.value||!F.value||H))return U||(U=ce().finally(()=>{U=null}),U)}async function ce(){let[{Terminal:e},{FitAddon:t},{Unicode11Addon:n},{WebglAddon:r}]=await Promise.all([S(()=>import(`./xterm-BMsy1fDS.js`),[]),S(()=>import(`./addon-fit-DIOBYJe3.js`),[]),S(()=>import(`./addon-unicode11-C82cyeHQ.js`),[]),S(()=>import(`./addon-webgl-C3a5wC6k.js`),[])]);if(await document.fonts.ready,H||!F.value)return;let i=new e({fontFamily:getComputedStyle(document.documentElement).getPropertyValue(`--mono`)||`monospace`,fontSize:14,lineHeight:1.2,scrollback:5e3,cursorBlink:!1,allowProposedApi:!0,theme:w.value?W.dark:W.light});R=new t,i.loadAddon(R),i.loadAddon(new n),i.unicode.activeVersion=`11`,i.open(F.value);let a=new r;try{i.loadAddon(a),a.onContextLoss(()=>a.dispose())}catch{a.dispose()}i.onData(le),L.value=i,B=new ResizeObserver(()=>Y()),B.observe(F.value),Y()}g(()=>C.visible,async e=>{e&&(await m(),Y(),L.value?.focus())}),g(w,e=>L.value&&(L.value.options.theme=e?W.dark:W.light));let K=``,q=!1;function le(e){K+=e,J()}async function J(){if(q||!K||!M.value)return;q=!0;let e=M.value;for(;K;){let t=K.slice(0,32768);K=K.slice(t.length);try{await C.api(`${I()}/${e}/input`,`POST`,{data:t})}catch(e){N.value=e.message,K=``}}q=!1}function Y(){if(!L.value||!R||!F.value?.clientWidth)return;R.fit();let e=`${L.value.rows}x${L.value.cols}`;e!==V&&M.value&&(V=e,C.api(`${I()}/${M.value}/input`,`POST`,{rows:L.value.rows,cols:L.value.cols}).catch(()=>{}))}function X(e){z?.close(),M.value=e,V=``,L.value?.reset(),z=b({url:()=>`/api${I()}/${e}/stream?rows=${L.value?.rows??24}&cols=${L.value?.cols??80}`,onMessage:e=>{let t=e;t.t===`reset`?L.value?.reset():t.t===`o`&&t.d?L.value?.write(Uint8Array.from(atob(t.d),e=>e.charCodeAt(0))):t.t===`exit`&&(L.value?.write(`\r
|
|
2
2
|
\x1B[2m[process exited]\x1B[0m\r
|
|
3
3
|
`),Z())}}),Y(),L.value?.focus()}async function Z(){try{k.value=await C.api(`${I()}?cwd=${encodeURIComponent(C.cwd)}`),N.value=``}catch(e){N.value=e.message}}async function Q(){P.value=!0;try{await G();let e=await C.api(I(),`POST`,{cwd:C.cwd,...j.value?{profileId:j.value}:{},rows:L.value?.rows??24,cols:L.value?.cols??80});k.value=[...k.value,e],X(e.id)}catch(e){N.value=e.message}finally{P.value=!1}}async function ue(e){try{await C.api(`${I()}/${e}`,`DELETE`)}catch{}k.value=k.value.filter(t=>t.id!==e),M.value===e&&(z?.close(),z=null,M.value=null,L.value?.reset(),k.value[0]&&X(k.value[0].id))}async function $(){A.value=[],j.value=``;let e=C.hostId;C.api(`/hosts/${encodeURIComponent(e)}/settings`).then(t=>{e===C.hostId&&(A.value=t.config.terminalProfiles??[])}).catch(()=>{}),z?.close(),z=null,M.value=null,await Z(),await m(),await G(),H||k.value[0]&&X(k.value[0].id)}return t(()=>{$().catch(e=>{N.value=e.message})}),g(()=>[C.hostId,C.cwd],$),n(()=>{H=!0,z?.close(),B?.disconnect(),L.value?.dispose()}),(t,n)=>(r(),y(`div`,ne,[d(`div`,re,[(r(!0),y(u,null,o(k.value,(t,n)=>(r(),y(`button`,{key:t.id,class:s([`term-tab`,{chosen:t.id===M.value}]),title:t.title||t.name,onClick:e=>X(t.id)},[e(x,{name:`terminal`,size:12}),d(`span`,null,c(t.title||t.name||`Terminal ${n+1}`),1),d(`span`,{class:`term-close`,role:`button`,"aria-label":`Close `+(t.title||t.name),onClick:l(e=>ue(t.id),[`stop`])},[e(x,{name:`close`,size:11})],8,ae)],10,ie))),128)),A.value.length?ee((r(),y(`select`,{key:0,"onUpdate:modelValue":n[0]||=e=>j.value=e,"aria-label":`New terminal profile`,style:{"max-width":`150px`}},[n[1]||=d(`option`,{value:``},`Default shell`,-1),(r(!0),y(u,null,o(A.value,e=>(r(),y(`option`,{key:e.id,value:e.id},c(e.name),9,T))),128))],512)),[[te,j.value]]):v(``,!0),d(`button`,{class:`icon-btn term-new`,title:`New terminal`,"aria-label":`New terminal`,disabled:P.value,onClick:Q},[e(x,{name:`plus`,size:14})],8,E)]),N.value?(r(),y(`p`,D,[e(x,{name:`alert`,size:13}),i(c(N.value),1)])):v(``,!0),d(`div`,oe,[d(`div`,{ref_key:`host`,ref:F,class:s([`term-host`,{hidden:!M.value}])},null,2),M.value?v(``,!0):(r(),y(`div`,se,[n[3]||=d(`p`,null,`No terminal open in this workspace.`,-1),d(`button`,{class:`btn btn-outline`,disabled:P.value,onClick:Q},[e(x,{name:`terminal`,size:14}),n[2]||=i(`Open terminal`,-1)],8,O)]))])]))}}),[[`__scopeId`,`data-v-264332b6`]]);export{k as default};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,N as t,R as n,S as r,T as i,X as a,Y as o,_ as s,at as c,ct as l,g as u,j as d,l as f,m as p,n as m,q as h,st as g,tt as _}from"./vue.runtime.esm-bundler-4XjPOHMM.js";import{v}from"./MarkdownMessage-
|
|
1
|
+
import{C as e,N as t,R as n,S as r,T as i,X as a,Y as o,_ as s,at as c,ct as l,g as u,j as d,l as f,m as p,n as m,q as h,st as g,tt as _}from"./vue.runtime.esm-bundler-4XjPOHMM.js";import{v}from"./MarkdownMessage-DbSS5ULZ.js";import{o as y}from"./index-DV5BdS_U.js";var b=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),x=[`id`],S=[`data-placement`],C=v(i({__name:`Tooltip`,props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(i){let v=i,C=_(null),w=_(null),T=_({transform:`translate3d(0px, 0px, 0px)`,left:`0px`,top:`0px`}),E=_({}),D=_(v.placement??`top`),O=_(!1),k=null,A=null,j=null,M=null,N=null,P=0;function F(){return M?Promise.resolve(M):(N||=y(()=>import(`./floating-ui.dom-WZBoikmf.js`).then(e=>(M=e,e)),[]).catch(e=>{throw N=null,e}),N)}function I(){k&&=(k(),null),A=null,j=null}function L(e){return b(this,null,function*(){let t=v.anchorEl,n=C.value;if(!v.visible||!t||!n||A===t&&j===n)return;let{autoUpdate:r}=yield F();e()&&v.visible&&v.anchorEl===t&&C.value===n&&(I(),A=t,j=n,k=r(t,n,()=>{R().catch(()=>{z()})}))})}function R(){return b(this,null,function*(){let e=v.anchorEl,t=C.value;if(!v.visible||!e||!t)return!1;let{arrow:n,computePosition:r,flip:i,offset:a,shift:o}=yield F();if(!v.visible||v.anchorEl!==e||C.value!==t)return!1;let s=[a(v.offset??6),i(),o({padding:6}),...w.value?[n({element:w.value,padding:4})]:[]],{x:c,y:l,placement:u,middlewareData:d}=yield r(e,t,{placement:v.placement??`top`,middleware:s,strategy:`fixed`});if(!v.visible||v.anchorEl!==e||C.value!==t)return!1;if(T.value.transform=`translate3d(${Math.round(c)}px, ${Math.round(l)}px, 0)`,T.value.left=`0px`,T.value.top=`0px`,D.value=u,d.arrow&&w.value){let{x:e,y:t}=d.arrow,n={top:`bottom`,bottom:`top`,left:`right`,right:`left`}[u.split(`-`)[0]];E.value={left:e==null?``:`${e}px`,top:t==null?``:`${t}px`,[n]:`-3px`}}return!0})}function z(){let e=v.anchorEl,t=C.value;if(!e||!t)return!1;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=v.offset??6,a=v.placement??`top`,o=n.left,s=n.top;return a===`bottom`?s=n.bottom+i:a===`left`?o=n.left-r.width-i:a===`right`?o=n.right+i:s=n.top-r.height-i,T.value.transform=`translate3d(${Math.round(Math.max(0,o))}px, ${Math.round(Math.max(0,s))}px, 0)`,T.value.left=`0px`,T.value.top=`0px`,D.value=a,E.value={},!0}h(()=>v.visible,e=>b(null,null,function*(){let t=++P;if(e){if(O.value=!1,yield d(),t!==P||!v.visible)return;if(v.anchorEl&&C.value)try{let e=v.anchorEl,n=C.value,r=e.getBoundingClientRect();if(!(yield R())||t!==P||!v.visible||v.anchorEl!==e||C.value!==n)return;let i=T.value.transform;if(v.originX!=null&&v.originY!=null){let e=Math.abs(Number(v.originX)-r.left),n=Math.abs(Number(v.originY)-r.top);if(Math.hypot(e,n)>120){if(T.value.transform=`translate3d(${Math.round(v.originX)}px, ${Math.round(v.originY)}px, 0)`,yield d(),t!==P||!v.visible||(O.value=!0,yield d(),t!==P||!v.visible))return;T.value.transform=i}else O.value=!0}else O.value=!0;yield L(()=>t===P)}catch{if(t!==P||!v.visible)return;if(O.value=z(),v.anchorEl&&C.value)try{yield L(()=>t===P)}catch{}}else O.value=!0}else O.value=!1,I()}));let B=0;return h([()=>v.anchorEl,()=>v.placement,()=>v.content],()=>b(null,null,function*(){let e=++B;if(v.visible&&v.anchorEl&&C.value){if(yield d(),e!==B||!v.visible||!v.anchorEl||!C.value)return;try{let t=yield R();if(e!==B||!v.visible||!v.anchorEl||!C.value)return;t||z()}catch{z()}yield L(()=>e===B)}})),t(()=>{P+=1,I()}),(t,d)=>(n(),s(p,{to:`body`},[u(`div`,{class:c([`markstream-vue`,{dark:i.isDark}])},[e(m,{name:`tooltip`,appear:``},{default:o(()=>[a(u(`div`,{id:v.id,ref_key:`tooltip`,ref:C,style:g({position:`fixed`,left:T.value.left,top:T.value.top,transform:T.value.transform,visibility:O.value?`visible`:`hidden`,pointerEvents:O.value?void 0:`none`}),class:`tooltip-element`,role:`tooltip`},[r(l(i.content)+` `,1),u(`div`,{ref_key:`arrowEl`,ref:w,class:`tooltip-arrow`,"data-placement":D.value,style:g(E.value)},null,12,S)],12,x),[[f,i.visible]])]),_:1})],2)]))}}),[[`__scopeId`,`data-v-c606ee4c`]]);export{C as default};
|
|
Binary file
|
|
Binary file
|