blun-king-cli 9.1.602 → 9.1.604
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 +118 -99
- package/LIESMICH.txt +74 -57
- package/README.md +119 -76
- package/bin/agentspine-king-goal-inbox.mjs +127 -127
- package/bin/agentspine-king-goal-intake.mjs +106 -106
- package/bin/agentspine-king-host-runner.mjs +109 -109
- package/bin/agentspine-king-snapshot-policy.cjs +80 -80
- package/bin/agentspine-king-status-policy.mjs +226 -226
- package/bin/agentspine-king-worker-host.mjs +160 -160
- package/bin/core-bootstrap.js +77 -77
- package/bin/launcher-mode.js +93 -93
- package/bin/launcher-restart-policy.cjs +131 -131
- package/bin/launcher-runtime.js +491 -491
- package/bin/managed-node.js +186 -186
- package/bin/managed-plugin-selection.cjs +115 -115
- package/bin/native-module-repair.js +201 -201
- package/bin/node-runtime.js +34 -34
- package/bin/node-version.js +49 -49
- package/bin/plugin-bootstrap.js +162 -162
- package/bin/private-paths.js +1606 -1606
- package/bin/runtime-exit-ledger.cjs +144 -144
- package/bin/runtime-exit-ledger.d.cts +23 -23
- package/bin/standard-tools-bootstrap.js +272 -272
- package/bin/turn-thinking-policy.cjs +82 -82
- package/bin/update-copy.js +200 -200
- package/bin/update-lease.js +597 -597
- package/bin/update-notice.js +1568 -1568
- package/bin/verify-agent-behavior.cjs +122 -122
- package/bin/verify-agent-components.cjs +104 -104
- package/bin/verify-bundled-agent-sources.cjs +98 -76
- package/bin/windows-node-crash-dump.cjs +289 -289
- package/blun.mjs +8041 -6407
- package/codebase-index/codebase_index.py +470 -470
- package/dist-web/assets/{CodeBlockNode-CXnTLMNr.js → CodeBlockNode-TKKkJX8L.js} +1 -1
- package/dist-web/assets/{CodeBlockShell.vue_vue_type_style_index_0_lang-CCF8Ntnq.js → CodeBlockShell.vue_vue_type_style_index_0_lang-CUj2Ds5x.js} +1 -1
- package/dist-web/assets/DesignSystemView-DwK1aQMo.js +12 -0
- package/dist-web/assets/DesignSystemView-szjTj7ns.css +1 -0
- package/dist-web/assets/{Tooltip-CFQEzqC-.js → Tooltip-CTWv7WCU.js} +1 -1
- package/dist-web/assets/{abnfDiagram-N423BO3Z-Z1APZG5m.js → abnfDiagram-N423BO3Z-DA8V8Zjh.js} +1 -1
- package/dist-web/assets/{arc-C4VyWloT.js → arc-YtddKbdY.js} +1 -1
- package/dist-web/assets/{architectureDiagram-T3A2C74G-DpddbUcM.js → architectureDiagram-T3A2C74G-CGEiObmo.js} +1 -1
- package/dist-web/assets/{blockDiagram-VBNYF7ZC-BqccOSMr.js → blockDiagram-VBNYF7ZC-Bd5Vt50e.js} +1 -1
- package/dist-web/assets/{c4Diagram-5PPSVZJV-OHAcJrTy.js → c4Diagram-5PPSVZJV-D2ApPM54.js} +1 -1
- package/dist-web/assets/channel-BnluexuN.js +1 -0
- package/dist-web/assets/{chunk-2GRJ4B5K-DqJHs8Fw.js → chunk-2GRJ4B5K-BDcIEZSl.js} +1 -1
- package/dist-web/assets/{chunk-2Q5K7J3B-B1nCd91o.js → chunk-2Q5K7J3B-6aSabCX7.js} +1 -1
- package/dist-web/assets/{chunk-5RXB4S5H-neG70kZx.js → chunk-5RXB4S5H-BFRQvIJS.js} +1 -1
- package/dist-web/assets/{chunk-5VM5RSS4-l7biGqeH.js → chunk-5VM5RSS4-ChAa-DNY.js} +1 -1
- package/dist-web/assets/{chunk-6Q2QTUOP-BO-F11Gs.js → chunk-6Q2QTUOP-BIfrb2Jc.js} +1 -1
- package/dist-web/assets/{chunk-GF5L2VYU-BtC69fw0.js → chunk-GF5L2VYU-BR0gvtWI.js} +1 -1
- package/dist-web/assets/{chunk-JWPE2WC7-DIOubEqr.js → chunk-JWPE2WC7-BgXKsx5E.js} +1 -1
- package/dist-web/assets/{chunk-KBJHAD2P-DDUeH_Ba.js → chunk-KBJHAD2P-I8mrZhpz.js} +1 -1
- package/dist-web/assets/{chunk-RYQCIY6F-B9gFMVbS.js → chunk-RYQCIY6F-BMPaem92.js} +1 -1
- package/dist-web/assets/{chunk-XXDRQBXY-Bn1Xz6TQ.js → chunk-XXDRQBXY-COy0J-0j.js} +1 -1
- package/dist-web/assets/classDiagram-JCYQIIEL-BliFdSD9.js +1 -0
- package/dist-web/assets/classDiagram-v2-OCEON4UE-BliFdSD9.js +1 -0
- package/dist-web/assets/{cose-bilkent-JH36ORCC-DqigO3T4.js → cose-bilkent-JH36ORCC-MosTTRdo.js} +1 -1
- package/dist-web/assets/{cynefin-VYW2F7L2-rpD93tQ-.js → cynefin-VYW2F7L2-5tjPgrkP.js} +1 -1
- package/dist-web/assets/{cynefinDiagram-MW4NZA55-DbTqnkVJ.js → cynefinDiagram-MW4NZA55-CbDcdInR.js} +1 -1
- package/dist-web/assets/{dagre-VZM6K2ZE-DcM8aEVY.js → dagre-VZM6K2ZE-YaBom1ZH.js} +1 -1
- package/dist-web/assets/{diagram-7IWD3JNH-UymgsBNa.js → diagram-7IWD3JNH-Da4m-Hgz.js} +1 -1
- package/dist-web/assets/{diagram-B4RE2ZJO-BiYu5WPF.js → diagram-B4RE2ZJO-CAUUegxg.js} +1 -1
- package/dist-web/assets/{diagram-LBJQPF4R-BD3kkgOO.js → diagram-LBJQPF4R-o21mWKG4.js} +1 -1
- package/dist-web/assets/{diagram-Q27KOJAE-D1mYQ_cI.js → diagram-Q27KOJAE-BA3z3sXf.js} +1 -1
- package/dist-web/assets/{diagram-UB23O5K3-BtX8u6HG.js → diagram-UB23O5K3-CGRdSSDK.js} +1 -1
- package/dist-web/assets/{ebnfDiagram-BXEA7PRR-CBAnFkRF.js → ebnfDiagram-BXEA7PRR-Bw-iU9FP.js} +1 -1
- package/dist-web/assets/{erDiagram-JOGREHBK-3vKcWsxm.js → erDiagram-JOGREHBK-BwM1yiR0.js} +1 -1
- package/dist-web/assets/{flowDiagram-UKHOOZJN-D9wBbHm2.js → flowDiagram-UKHOOZJN-z05eOR1Q.js} +1 -1
- package/dist-web/assets/{ganttDiagram-PKOTCBZU-Cd_dViF-.js → ganttDiagram-PKOTCBZU-BMUubNTl.js} +1 -1
- package/dist-web/assets/{gitGraphDiagram-DS77QQ5N-BiEEtTo7.js → gitGraphDiagram-DS77QQ5N-Dccbi1wU.js} +1 -1
- package/dist-web/assets/{index-DdEakFJM.js → index-BBbC5LRF.js} +1 -1
- package/dist-web/assets/{index-BmKj7CB1.css → index-C9eDH3u-.css} +1 -1
- package/dist-web/assets/{index-Ba1OvLjf.js → index-D48p0M2S.js} +2 -2
- package/dist-web/assets/{index-CiPA8Kex.js → index-h0KEOmkU.js} +14 -14
- package/dist-web/assets/{index10-CNr4U-Nw.js → index10-Qbuw1N6u.js} +1 -1
- package/dist-web/assets/{index11-Dto_yZNz.js → index11-g8v025wN.js} +1 -1
- package/dist-web/assets/{index5-B2PldaO2.js → index5-BYNcV8BY.js} +1 -1
- package/dist-web/assets/{index6-CBdZmmyx.js → index6-BetANtnV.js} +1 -1
- package/dist-web/assets/{index7-Dz9oCsUF.js → index7-BcPbgCKN.js} +1 -1
- package/dist-web/assets/{index8-B6k25jtU.js → index8-B1lp-RvF.js} +2 -2
- package/dist-web/assets/{infoDiagram-6WML65LV-D4ph2sIH.js → infoDiagram-6WML65LV-BF_pbUnN.js} +1 -1
- package/dist-web/assets/{ishikawaDiagram-WSZJBQD7-DjKjbMm9.js → ishikawaDiagram-WSZJBQD7-Dedv4urS.js} +1 -1
- package/dist-web/assets/{journeyDiagram-NVQOT4AX-DttHDfPQ.js → journeyDiagram-NVQOT4AX-B1Ex3b6o.js} +1 -1
- package/dist-web/assets/{kanban-definition-27J2QSJJ-C5gB-W0d.js → kanban-definition-27J2QSJJ-BtCGliBH.js} +1 -1
- package/dist-web/assets/{linear-BRGe4-d6.js → linear-ByItc8Qr.js} +1 -1
- package/dist-web/assets/{mermaid.core-D-9Sx1No.js → mermaid.core-B1M2O7nN.js} +4 -4
- package/dist-web/assets/{mindmap-definition-FAOFIHXS-Cg_hoVIq.js → mindmap-definition-FAOFIHXS-D0UHKUyj.js} +1 -1
- package/dist-web/assets/{pegDiagram-VL7TDLO6-CSX9hitD.js → pegDiagram-VL7TDLO6-D7zYCVmG.js} +1 -1
- package/dist-web/assets/{pieDiagram-7S7Q4E2Y-0L0mxahZ.js → pieDiagram-7S7Q4E2Y-Bd0i9CHa.js} +1 -1
- package/dist-web/assets/{quadrantDiagram-CIZ2JOQS-U483z0er.js → quadrantDiagram-CIZ2JOQS-MG-Ug47d.js} +1 -1
- package/dist-web/assets/{railroadDiagram-AXF67PYL-D80a2_DJ.js → railroadDiagram-AXF67PYL-AZdl90Gj.js} +1 -1
- package/dist-web/assets/{requirementDiagram-LRYGKXZP-CeyHfq8t.js → requirementDiagram-LRYGKXZP-DjplF9kt.js} +1 -1
- package/dist-web/assets/{sankeyDiagram-W5VNT64P-CCISkkrR.js → sankeyDiagram-W5VNT64P-Bi9Zgfjs.js} +1 -1
- package/dist-web/assets/{sequenceDiagram-SI44F4Z6-jQfm2XS7.js → sequenceDiagram-SI44F4Z6-ChEpdCvb.js} +1 -1
- package/dist-web/assets/{sizeCapture-X5ZJPWSS-lRZsmCoS.js → sizeCapture-X5ZJPWSS-B5RFUdaa.js} +1 -1
- package/dist-web/assets/{stateDiagram-OKZ733FA-ClCgTdUm.js → stateDiagram-OKZ733FA-BkRblSKp.js} +1 -1
- package/dist-web/assets/stateDiagram-v2-UEYNNEHI-fVkQcACW.js +1 -0
- package/dist-web/assets/{swimlanes-SLNWSIFB-BCdOUN05.js → swimlanes-SLNWSIFB-DLXH6Zhc.js} +2 -2
- package/dist-web/assets/swimlanesDiagram-ULZ7WXOC-Bg-BiZJQ.js +8 -0
- package/dist-web/assets/{timeline-definition-Z64GVDOM-DpWutSKa.js → timeline-definition-Z64GVDOM-C_N88siO.js} +1 -1
- package/dist-web/assets/{vennDiagram-T6HMQDX7-DVC5JVsc.js → vennDiagram-T6HMQDX7-DMsnvDt0.js} +1 -1
- package/dist-web/assets/{vue.runtime.esm-bundler-BwwRtQwQ.js → vue.runtime.esm-bundler-B-3uIy85.js} +1 -1
- package/dist-web/assets/{wardleyDiagram-T6FBY63Y-BK2mrq7L.js → wardleyDiagram-T6FBY63Y-C9SJIPzq.js} +1 -1
- package/dist-web/assets/{xychartDiagram-ELKLHX3M-DUJu9F7-.js → xychartDiagram-ELKLHX3M-DZLWA6Go.js} +1 -1
- package/dist-web/index.html +32 -32
- package/dist-web/vis/index.html.gz +0 -0
- package/package.json +1 -1
- package/scripts/fix-node-pty-perms.js +53 -53
- package/standard-skills/blun-app-design-system/SKILL.md +30 -30
- package/standard-skills/blun-app-design-system/provenance.json +17 -17
- package/standard-skills/blun-app-design-system/references/tokens.md +48 -48
- package/standard-skills/blun-app-design-system/scripts/check-blun-design.mjs +49 -49
- package/telegram-plugin/blun.plugin.json +20 -20
- package/telegram-plugin/commands/access.md +37 -37
- package/telegram-plugin/dist/bridge.mjs +117 -100
- package/telegram-plugin/dist/mcp-server.mjs +185 -161
- package/worker-host.mjs +1458 -1022
- package/dist-web/assets/DesignSystemView-6HgAUEmC.css +0 -1
- package/dist-web/assets/DesignSystemView-BbMOu-XO.js +0 -12
- package/dist-web/assets/channel-B2VOQOI-.js +0 -1
- package/dist-web/assets/classDiagram-JCYQIIEL-BA1TjAxj.js +0 -1
- package/dist-web/assets/classDiagram-v2-OCEON4UE-BA1TjAxj.js +0 -1
- package/dist-web/assets/stateDiagram-v2-UEYNNEHI-fi_lrTAx.js +0 -1
- package/dist-web/assets/swimlanesDiagram-ULZ7WXOC-BUd_uYK3.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bR as ao,ci as uo,bQ as Bl,M as El,bl as so,af as gl,bZ as co,c0 as Ol,aU as P,bT as fo,bE as q,az as vo,c1 as wl,c2 as mo,aI as Ll,aL as Xe,s as Nn,bk as Et,cj as bl,u as Sl,I as po,A as ho,bJ as Ln,aY as bt,bL as yo,v as A,aw as St,au as Hn,t as kt,bB as go,bb as Ot,q as w,ck as wo,c4 as bo,c5 as So,c8 as ko,a0 as Co,c3 as kl,aD as xo,bO as Mo,T as Po,as as V,b$ as Bo,cl as Eo}from"./index-
|
|
1
|
+
import{bR as ao,ci as uo,bQ as Bl,M as El,bl as so,af as gl,bZ as co,c0 as Ol,aU as P,bT as fo,bE as q,az as vo,c1 as wl,c2 as mo,aI as Ll,aL as Xe,s as Nn,bk as Et,cj as bl,u as Sl,I as po,A as ho,bJ as Ln,aY as bt,bL as yo,v as A,aw as St,au as Hn,t as kt,bB as go,bb as Ot,q as w,ck as wo,c4 as bo,c5 as So,c8 as ko,a0 as Co,c3 as kl,aD as xo,bO as Mo,T as Po,as as V,b$ as Bo,cl as Eo}from"./index-h0KEOmkU.js";import{i as Z,t as Oo}from"./safeRaf-DGuzXxDK.js";import{V as Lo}from"./CodeBlockShell.vue_vue_type_style_index_0_lang-CUj2Ds5x.js";var Fn=(x,k,M)=>new Promise((i,de)=>{var Oe=B=>{try{ee(M.next(B))}catch(L){de(L)}},K=B=>{try{ee(M.throw(B))}catch(L){de(L)}},ee=B=>B.done?i(B.value):Promise.resolve(B.value).then(Oe,K);ee((M=M.apply(x,k)).next())});let Cl=!1,fn=null,vn=null,Ct=!1,mn=null;function Fo(){return Fn(this,null,function*(){if(mn)return mn;mn=Fn(null,null,function*(){if(!vn){if(Ct)return null;try{if(vn=(function(x){const k=x;if(typeof k?.useMonaco=="function")return k;const M=x?.default;return typeof M?.useMonaco=="function"?M:null})(yield ao(()=>import("./__vite-optional-peer-dep_stream-monaco_markstream-vue-BIHI7g3E.js"),[])),!vn)return Ct=!0,null}catch{return Ct=!0,null}}try{return yield(function(x){return Fn(this,null,function*(){return Cl?void 0:fn||(fn=Fn(null,null,function*(){const M=globalThis?.MonacoEnvironment;M&&(typeof M.getWorker=="function"||typeof M.getWorkerUrl=="function")||typeof x?.preloadMonacoWorkers!="function"||(yield x.preloadMonacoWorkers()),Cl=!0}).finally(()=>{fn=null}),fn)})})(vn),uo(),vn}catch{return null}});try{return yield mn}finally{mn=null}})}var $o=Object.defineProperty,No=Object.defineProperties,Ho=Object.getOwnPropertyDescriptors,xl=Object.getOwnPropertySymbols,zo=Object.prototype.hasOwnProperty,To=Object.prototype.propertyIsEnumerable,Ml=(x,k,M)=>k in x?$o(x,k,{enumerable:!0,configurable:!0,writable:!0,value:M}):x[k]=M,_=(x,k)=>{for(var M in k||(k={}))zo.call(k,M)&&Ml(x,M,k[M]);if(xl)for(var M of xl(k))To.call(k,M)&&Ml(x,M,k[M]);return x},ye=(x,k)=>No(x,Ho(k)),H=(x,k,M)=>new Promise((i,de)=>{var Oe=B=>{try{ee(M.next(B))}catch(L){de(L)}},K=B=>{try{ee(M.throw(B))}catch(L){de(L)}},ee=B=>B.done?i(B.value):Promise.resolve(B.value).then(Oe,K);ee((M=M.apply(x,k)).next())});const Ro={class:"html-preview-frame__header"},_o={class:"html-preview-frame__title"},Do={class:"html-preview-frame__label"},Wo=["sandbox","srcdoc"],Ao=Bl(El({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(x){const k=x,M=import.meta!==void 0&&!1;let i=null;const{t:de}=Ol(),Oe=w(()=>{const B=k.code||"",L=B.trim().toLowerCase();return L.startsWith("<!doctype")||L.startsWith("<html")||L.startsWith("<body")?B:`<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as V,c0 as N,aL as s,u as i,aY as f,v as o,bb as p,t as d,bk as c,aw as R,bO as _,G as D,I as $,bJ as H,F,g as A,bL as S,bB as M,aU as g,q as w,c8 as q,c2 as G}from"./index-CiPA8Kex.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=V({__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}=N(),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:R({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:_(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]=[D('<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 V,c0 as N,aL as s,u as i,aY as f,v as o,bb as p,t as d,bk as c,aw as R,bO as _,G as D,I as $,bJ as H,F,g as A,bL as S,bB as M,aU as g,q as w,c8 as q,c2 as G}from"./index-h0KEOmkU.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=V({__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}=N(),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:R({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:_(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]=[D('<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};
|