comp-hub 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/website/dist/assets/{atom-one-dark-DpwWbKXs.js → atom-one-dark-C3G4SyfT.js} +1 -1
- package/dist/website/dist/assets/{index-CuwxaERJ.js → index-0y1DtOfV.js} +1 -1
- package/dist/website/dist/assets/{index-PRdqCzzy.js → index-ALTjrqSu.js} +1 -1
- package/dist/website/dist/assets/{index-BVqdv81O.js → index-B8kPPzKR.js} +1 -1
- package/dist/website/dist/assets/{index-Di_iCsNQ.js → index-BN6DESqO.js} +1 -1
- package/dist/website/dist/assets/{index-DJaxMIGA.css → index-BVsVzL5c.css} +1 -1
- package/dist/website/dist/assets/{index-Bgx8NSCi.js → index-Blp6T7rl.js} +1 -1
- package/dist/website/dist/assets/{index-DniNqRWl.js → index-C26Rl450.js} +8 -8
- package/dist/website/dist/assets/{index-CCR7kVdR.js → index-CIEoSFz1.js} +1 -1
- package/dist/website/dist/assets/{index-DAIyolhk.js → index-CLdQuheE.js} +1 -1
- package/dist/website/dist/assets/{index-CjqtgB2v.css → index-CRFpFKvC.css} +1 -1
- package/dist/website/dist/assets/{index-B9TCSN0k.js → index-CrPOGApD.js} +1 -1
- package/dist/website/dist/assets/{index-YAC9XXtL.js → index-DHXhG9Ng.js} +3 -3
- package/dist/website/dist/assets/{index-CUUkQILV.js → index-DURepe7s.js} +1 -1
- package/dist/website/dist/assets/{index-CyQiIDRV.js → index-DY1fW_of.js} +1 -1
- package/dist/website/dist/assets/{index-CP9waZEc.js → index-DiHk_mns.js} +1 -1
- package/dist/website/dist/assets/index-N7P-74PQ.js +1 -0
- package/dist/website/dist/assets/{index-DbQbVPgg.js → index-ShGF-65v.js} +1 -1
- package/dist/website/dist/assets/index-xhncCd-9.js +1 -0
- package/dist/website/dist/assets/{index-PhxsG4U_.js → index-zlcKfdMZ.js} +1 -1
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-B_QtQDll.js +1 -0
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-lxfAk1Lj.js → index.vue_vue_type_script_setup_true_lang-BvP8OIHp.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-Bo_Vawx0.js → index.vue_vue_type_script_setup_true_lang-Bw9f5ewL.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-BgvR8MEN.js → index.vue_vue_type_script_setup_true_lang-C1Sc5-oi.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_style_index_0_lang-BO5zydX-.js → index.vue_vue_type_style_index_0_lang-CHcIiz-I.js} +1 -1
- package/dist/website/dist/assets/{md5-_eDK8r-N.js → md5-DrWnL044.js} +1 -1
- package/dist/website/dist/index.html +2 -2
- package/package.json +13 -2
- package/dist/website/dist/assets/index-DtNwFWfs.js +0 -1
- package/dist/website/dist/assets/index-Ek0k2L0r.js +0 -1
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-BAIK5pxk.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as R,r as I,c as C,o as f,b as y,aw as Te,w as x,x as J,h as w,A as D,U as ue,F as H,a7 as G,f as K,t as $,aG as de,u as T,k as pe,ax as fe,a as g,j as S,aa as Le,n as j,D as me,b0 as ze,b1 as Pe,b2 as Re,a5 as ce,T as Ae,p as Be,av as Fe,a2 as Y,X as be,Y as Ce,b3 as Ne,E as ee,aZ as W,R as le,af as ae,a_ as xe,b4 as Ve,b5 as je,a$ as Ue,b6 as We,b7 as He,b8 as Ge,aR as Ie,b9 as Ye,ba as k,bb as te,i as re,a1 as qe,a0 as Xe,G as Ze,aq as Ke,ar as Je,bc as Qe,bd as et,be as tt,bf as we,bg as nt,bh as ot,ao as lt}from"./index-DniNqRWl.js";import{a as at,c as st,_ as it,E as ct,G as rt}from"./index-DbQbVPgg.js";import{_ as ut}from"./index.vue_vue_type_script_setup_true_lang-BAIK5pxk.js";import{_ as dt}from"./index.vue_vue_type_script_setup_true_lang-lxfAk1Lj.js";const pt={class:"collect"},ft=R({__name:"index",props:{isCollect:{type:Boolean,default:!1}},emits:["collect"],setup(t,{emit:o}){const n=t,e=o;function i(){e("collect",!n.isCollect)}return(c,u)=>{const s=I("StarFilled"),l=I("el-icon");return f(),C("div",pt,[y(l,{class:Te(["collect-icon",{"is-collect":t.isCollect}]),onClick:i},{default:x(()=>[y(s)]),_:1},8,["class"])])}}}),mt=J(ft,[["__scopeId","data-v-25eb2692"]]),vt=R({__name:"index",setup(t,{expose:o}){const n=w(!1),e=w(null),i=s=>{n.value=!0,e.value=s},c=()=>{n.value=!1,e.value=null},u=s=>{e.value&&e.value(s)};return o({open:i,close:c}),(s,l)=>(f(),D(ut,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),title:"项目文件夹",width:"50%","show-close":""},{default:x(()=>[y(at,{onSelect:u})]),_:1},8,["modelValue"]))}}),Se=R({__name:"index",props:{title:{type:String,default:""},column:{type:Number,default:3},items:{type:Array,default:()=>[]}},setup(t){const o=ue();return(n,e)=>{const i=I("el-descriptions-item"),c=I("el-descriptions");return f(),D(c,de({column:t.column,title:t.title},T(o)),{default:x(()=>[(f(!0),C(H,null,G(t.items,(u,s)=>(f(),D(i,{key:s,label:u.label},{default:x(()=>[K($(u.value),1)]),_:2},1032,["label"]))),128))]),_:1},16,["column","title"])}}}),_t={class:"comp-desc-container"},ht=R({__name:"index",props:{desc:{type:String,default:""}},setup(t){const o=w(null),n=w(!1),e=t;return pe(async()=>{if(e.desc){await fe();const i=o.value;if(!i)return;n.value=i.scrollHeight>i.clientHeight}}),(i,c)=>{const u=I("el-popover");return f(),C("div",_t,[y(u,{disabled:!n.value,content:t.desc,placement:"bottom",width:"300"},{reference:x(()=>[g("p",{ref_key:"paraRef",ref:o},$(t.desc),513)]),_:1},8,["disabled","content"])])}}}),gt=J(ht,[["__scopeId","data-v-f59630ca"]]),yt={key:0,class:"comp-deps size-full"},bt={key:0,class:"more"},Ct={class:"measure-row"},xt=5,wt=70,St=R({__name:"index",props:{compDeps:{}},setup(t){const o=t,n=w(0),e=w([]);function i(a){n.value=a[0].contentRect.width}function c(a){!a||a instanceof Element||fe().then(()=>{const d=a.$el||a;e.value.push(d.offsetWidth)})}const u=S(()=>{let a=0,d=0;const v=n.value-wt;for(let p=0;p<e.value.length&&(a+=e.value[p]+(p?xt:0),!(a>v));p++)d++;return Math.max(0,d)}),s=S(()=>o.compDeps.slice(0,u.value)),l=S(()=>o.compDeps.length-u.value);return(a,d)=>{const v=I("el-tag");return f(),D(Le,{resize:i},{default:x(()=>[a.compDeps.length?(f(),C("div",yt,[(f(!0),C(H,null,G(s.value,p=>(f(),D(v,{key:p.name,type:"success"},{default:x(()=>[K($(p.name)+" "+$(p.version),1)]),_:2},1024))),128)),l.value>0?(f(),C("span",bt,"+"+$(l.value)+" more",1)):j("",!0)])):j("",!0),g("div",Ct,[(f(!0),C(H,null,G(a.compDeps,p=>(f(),D(v,{key:"m-"+p.name,type:"success",ref_for:!0,ref:c},{default:x(()=>[K($(p.name)+" "+$(p.version),1)]),_:2},1024))),128))])]),_:1})}}}),De=J(St,[["__scopeId","data-v-a1f79215"]]),Et={class:"w-[100px]"},kt=R({__name:"index",props:{modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(t,{emit:o}){const n=o,e=ue(),i=w([]);async function c(){const l=await ze({compName:e.name});i.value=l.data.map(a=>({value:a.version,label:a.version}))}function u(l){console.log("切换版本号",l),n("update:modelValue",l)}function s(){i.value=[{value:e.version,label:e.version}],n("update:modelValue",e.version)}return me(()=>{s()}),(l,a)=>{const d=I("el-option"),v=I("el-select");return f(),C("div",Et,[y(v,{"model-value":t.modelValue,onChange:u,onVisibleChange:c},{default:x(()=>[(f(!0),C(H,null,G(i.value,p=>(f(),D(d,{key:p.value,label:p.label,value:p.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"])])}}}),Tt={class:"flex justify-center items-center gap-[5px]"},It={class:"text-[12px] text-[#857e7e]"},Dt=R({__name:"index",props:{nickname:{type:String,default:""},avatar:{type:String,default:""}},setup(t){const o=t,n=w(Re);return pe(async()=>{if(!o.avatar)return;const e=await Pe({objectId:o.avatar});n.value=e.data.signUrl}),(e,i)=>{const c=I("el-avatar");return f(),C("div",Tt,[g("span",It,$(t.nickname),1),y(c,{size:15,src:n.value},null,8,["src"])])}}}),Ot=J(Dt,[["__scopeId","data-v-911677f5"]]),$t={class:"bg-[#fff] flex items-center justify-center flex-col size-full overflow-hidden"},Mt={class:"h-[270px] overflow-hidden w-full"},Lt={class:"flex flex-1 justify-start gap-[5px]"},zt={class:"text-left flex-1 flex flex-col w-full overflow-hidden p-[5px] gap-[5px]"},Pt={class:"flex justify-between"},Rt={class:"font-medium"},At={class:"desc-content flex-1"},Bt={class:"h-[30px] p-[5px] overflow-hidden w-full bg-[#ccc] flex items-center justify-between"},Ft={class:"flex gap-[5px]"},Nt={class:"flex"},Vt=R({__name:"index",setup(t){const o=ce("compListStore"),n=ce("callbacks"),e=ue(),i=Ae(),c=Be(),u=w(),s=w([{key:"delete",text:"删除",handler:z,type:"danger"},{key:"update",text:"更新",handler:B,type:"primary"},{key:"preview",text:"预览",handler:q,type:"primary"},{key:"download",text:"下载",handler:P,type:"primary"},{key:"collect",text:"收藏",handler:M}]),l=w(""),a=w([]),d=S(()=>o.operate.length?o.operate.map(r=>s.value.find(m=>m.key===r)):[]),v=S(()=>o.operate.includes("terminal")),p=S(()=>e.previewConfigs.filter(r=>{var m;return(m=r.path)==null?void 0:m.length}).slice(0,3).map(r=>{const m=r.path[r.path.length-1].replace(/[/\\]/g,"/"),h=a.value.find(_=>_.path===m);return{entryUrl:h==null?void 0:h.signedUrl}})),b=S(()=>[{label:"下载:",value:e.downloadCount},{label:"收藏:",value:e.collectCount}]),E=S(()=>Object.keys(e.dep).map(m=>{var h,_;return{name:m,version:(_=(h=e.dep)==null?void 0:h[m])==null?void 0:_.version}})),L=S(()=>({panelType:Fe.MINI,previews:p.value,dep:e.dep,bgColor:e.bgColor,signedUrls:a.value,autoplay:!0,onePageEntryNameToFile:o.onePageEntryNameToFile}));async function z(){!e.name||await ae.confirm(W.CONFIRM.DELETE(e.name),"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"})!=="confirm"||Ve({compId:e.id}).then(()=>ee.success(W.SUCCESS.DELETE)).finally(()=>n.get(le.AFTER_COMP_DEL)(e.id))}function B(){e.id&&je({compId:e.id}).then(r=>{if(!r.data){ee.error("组件不在本地,请先下载后更新");return}i.setSelectedFolder(r.data),n.get(le.BEFORE_COMP_GO_UPDATE)(e.id)})}function q(){console.log("预览"),c.push({path:`/preview/${e.id}`})}async function P(r){var h;!r()||await ae.confirm("当前选择的版本为:"+l.value+",确认下载吗?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).catch(()=>{console.log("取消下载")})!=="confirm"||(h=u.value)==null||h.open(Q)}async function M(r){r()&&(console.log("收藏"),Ne({compId:e.id,isCollect:!e.isCollect}).then(()=>{ee.success(e.isCollect?W.SUCCESS.UNCOLLECT:W.SUCCESS.COLLECT);const m={...e,isCollect:!e.isCollect};o.updateCompListItemById(e.id,m),e.isCollect?(o.updateCompListItemById(e.id,{...m,collectCount:e.collectCount-1}),n.get(le.AFTER_COMP_CANCEL_COLLECT)(e.id)):o.updateCompListItemById(e.id,{...m,collectCount:e.collectCount+1})}))}async function Q(r){var A;if(await ae.confirm(W.CONFIRM.DOWNLOAD(r.path),"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"})!=="confirm")return;const h=await xe({compId:e.id,savePath:r.path,compName:e.name,version:l.value}),{isRepeat:_=!1}=h.data;if(_){if(await ae.confirm(W.CONFIRM.COVER(e.name),"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"})!=="confirm")return;await xe({compId:e.id,savePath:r.path,compName:e.name,isCover:!0,version:l.value})}ee.success(W.SUCCESS.DOWNLOAD),o.updateCompListItemById(e.id,{...e,downloadCount:e.downloadCount+1}),(A=u.value)==null||A.close()}async function ie(){const r={objectId:e.objectId,compName:e.name,version:e.version,files:e.files.map(m=>m.path)};await Ue(r).then(m=>{a.value=m.data.signedUrls})}async function X(r){await We({compName:e.name,version:r}).then(m=>{o.updateCompListItemById(e.id,{...m.data,id:e.id,downloadCount:e.downloadCount,collectCount:e.collectCount,isCollect:e.isCollect})})}function oe(){n.get(le.OPEN_COMP_TERMINAL)(e.id)}return Y(()=>e,async()=>{a.value=[],await ie()},{immediate:!0,deep:!0}),Y(()=>l.value,async r=>{r!==e.version&&await X(r)}),(r,m)=>{const h=I("el-button");return f(),C("div",$t,[g("div",Mt,[y(st,be(Ce(L.value)),{compToolBar:x(()=>[g("div",Lt,[v.value?(f(),D(h,{key:0,color:"#414141",onClick:oe},{default:x(()=>[...m[1]||(m[1]=[K("终端",-1)])]),_:1})):j("",!0),y(kt,de({modelValue:l.value,"onUpdate:modelValue":m[0]||(m[0]=_=>l.value=_)},T(e)),null,16,["modelValue"])])]),_:1},16)]),g("div",zt,[g("div",Pt,[g("h4",Rt,$(T(e).name),1),g("div",null,[y(Ot,be(Ce(T(e).authorId)),null,16)])]),g("div",At,[y(gt,{desc:T(e).desc},null,8,["desc"])]),y(De,{compDeps:E.value},null,8,["compDeps"])]),g("div",Bt,[g("div",Ft,[y(Se,{column:1,items:[b.value[0]]},null,8,["items"]),y(Se,{column:1,items:[b.value[1]]},null,8,["items"])]),g("div",Nt,[(f(!0),C(H,null,G(d.value,(_,A)=>(f(),D(it,{key:A},{default:x(({isLogin:N})=>[(_==null?void 0:_.key)!=="collect"?(f(),D(h,{key:0,title:_==null?void 0:_.text,type:_==null?void 0:_.type,link:"",onClick:O=>_==null?void 0:_.handler(N)},{default:x(()=>[K($(_==null?void 0:_.text),1)]),_:2},1032,["title","type","onClick"])):(f(),D(mt,{key:1,class:"pl-[5px]",isCollect:T(e).isCollect,onCollect:O=>M(N)},null,8,["isCollect","onCollect"]))]),_:2},1024))),128))])]),y(vt,{ref_key:"DialogVueFinderRef",ref:u,onDownload:Q},null,512)])}}});function ve(t){return He()?(Ge(t),!0):!1}const jt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Oe=t=>t!=null,Ut=Object.prototype.toString,Wt=t=>Ut.call(t)==="[object Object]",F=()=>{};function $e(t,o){function n(...e){return new Promise((i,c)=>{Promise.resolve(t(()=>o.apply(this,e),{fn:o,thisArg:this,args:e})).then(i).catch(c)})}return n}function Ht(t,o={}){let n,e,i=F;const c=l=>{clearTimeout(l),i(),i=F};let u;return l=>{const a=k(t),d=k(o.maxWait);return n&&c(n),a<=0||d!==void 0&&d<=0?(e&&(c(e),e=void 0),Promise.resolve(l())):new Promise((v,p)=>{i=o.rejectOnCancel?p:v,u=l,d&&!e&&(e=setTimeout(()=>{n&&c(n),e=void 0,v(u())},d)),n=setTimeout(()=>{e&&c(e),e=void 0,v(l())},a)})}}function Gt(...t){let o=0,n,e=!0,i=F,c,u,s,l,a;!Ye(t[0])&&typeof t[0]=="object"?{delay:u,trailing:s=!0,leading:l=!0,rejectOnCancel:a=!1}=t[0]:[u,s=!0,l=!0,a=!1]=t;const d=()=>{n&&(clearTimeout(n),n=void 0,i(),i=F)};return p=>{const b=k(u),E=Date.now()-o,L=()=>c=p();return d(),b<=0?(o=Date.now(),L()):(E>b&&(l||!e)?(o=Date.now(),L()):s&&(c=new Promise((z,B)=>{i=a?B:z,n=setTimeout(()=>{o=Date.now(),e=!0,z(L()),d()},Math.max(0,b-E))})),!l&&!n&&(n=setTimeout(()=>e=!0,b)),e=!1,c)}}function ne(t){return Array.isArray(t)?t:[t]}function Yt(t){return Ie()}function qt(t,o=200,n={}){return $e(Ht(o,n),t)}function Xt(t,o=200,n=!1,e=!0,i=!1){return $e(Gt(o,n,e,i),t)}function Zt(t,o=!0,n){Yt()?me(t,n):o?t():fe(t)}function Kt(t,o,n){return Y(t,o,{...n,immediate:!0})}const se=jt?window:void 0;function Z(t){var o;const n=k(t);return(o=n==null?void 0:n.$el)!=null?o:n}function Ee(...t){const o=[],n=()=>{o.forEach(s=>s()),o.length=0},e=(s,l,a,d)=>(s.addEventListener(l,a,d),()=>s.removeEventListener(l,a,d)),i=S(()=>{const s=ne(k(t[0])).filter(l=>l!=null);return s.every(l=>typeof l!="string")?s:void 0}),c=Kt(()=>{var s,l;return[(l=(s=i.value)==null?void 0:s.map(a=>Z(a)))!=null?l:[se].filter(a=>a!=null),ne(k(i.value?t[1]:t[0])),ne(T(i.value?t[2]:t[1])),k(i.value?t[3]:t[2])]},([s,l,a,d])=>{if(n(),!(s!=null&&s.length)||!(l!=null&&l.length)||!(a!=null&&a.length))return;const v=Wt(d)?{...d}:d;o.push(...s.flatMap(p=>l.flatMap(b=>a.map(E=>e(p,b,E,v)))))},{flush:"post"}),u=()=>{c(),n()};return ve(n),u}function Jt(){const t=te(!1),o=Ie();return o&&me(()=>{t.value=!0},o),t}function Me(t){const o=Jt();return S(()=>(o.value,!!t()))}function Qt(t,o,n={}){const{window:e=se,...i}=n;let c;const u=Me(()=>e&&"MutationObserver"in e),s=()=>{c&&(c.disconnect(),c=void 0)},l=S(()=>{const p=k(t),b=ne(p).map(Z).filter(Oe);return new Set(b)}),a=Y(l,p=>{s(),u.value&&p.size&&(c=new MutationObserver(o),p.forEach(b=>c.observe(b,i)))},{immediate:!0,flush:"post"}),d=()=>c==null?void 0:c.takeRecords(),v=()=>{a(),s()};return ve(v),{isSupported:u,stop:v,takeRecords:d}}function bn(t,o,n={}){const{root:e,rootMargin:i="0px",threshold:c=0,window:u=se,immediate:s=!0}=n,l=Me(()=>u&&"IntersectionObserver"in u),a=S(()=>{const E=k(t);return ne(E).map(Z).filter(Oe)});let d=F;const v=te(s),p=l.value?Y(()=>[a.value,Z(e),v.value],([E,L])=>{if(d(),!v.value||!E.length)return;const z=new IntersectionObserver(o,{root:Z(L),rootMargin:i,threshold:c});E.forEach(B=>B&&z.observe(B)),d=()=>{z.disconnect(),d=F}},{immediate:s,flush:"post"}):F,b=()=>{d(),p(),v.value=!1};return ve(b),{isSupported:l,isActive:v,pause(){d(),v.value=!1},resume(){v.value=!0},stop:b}}const ke=1;function en(t,o={}){const{throttle:n=0,idle:e=200,onStop:i=F,onScroll:c=F,offset:u={left:0,right:0,top:0,bottom:0},observe:s={mutation:!1},eventListenerOptions:l={capture:!1,passive:!0},behavior:a="auto",window:d=se,onError:v=r=>{console.error(r)}}=o,p=typeof s=="boolean"?{mutation:s}:s,b=te(0),E=te(0),L=S({get(){return b.value},set(r){B(r,void 0)}}),z=S({get(){return E.value},set(r){B(void 0,r)}});function B(r,m){var h,_,A,N;if(!d)return;const O=k(t);if(!O)return;(A=O instanceof Document?d.document.body:O)==null||A.scrollTo({top:(h=k(m))!=null?h:z.value,left:(_=k(r))!=null?_:L.value,behavior:k(a)});const V=((N=O==null?void 0:O.document)==null?void 0:N.documentElement)||(O==null?void 0:O.documentElement)||O;L!=null&&(b.value=V.scrollLeft),z!=null&&(E.value=V.scrollTop)}const q=te(!1),P=re({left:!0,right:!1,top:!0,bottom:!1}),M=re({left:!1,right:!1,top:!1,bottom:!1}),Q=r=>{q.value&&(q.value=!1,M.left=!1,M.right=!1,M.top=!1,M.bottom=!1,i(r))},ie=qt(Q,n+e),X=r=>{var m;if(!d)return;const h=((m=r==null?void 0:r.document)==null?void 0:m.documentElement)||(r==null?void 0:r.documentElement)||Z(r),{display:_,flexDirection:A,direction:N}=getComputedStyle(h),O=N==="rtl"?-1:1,V=h.scrollLeft;M.left=V<b.value,M.right=V>b.value;const _e=Math.abs(V*O)<=(u.left||0),he=Math.abs(V*O)+h.clientWidth>=h.scrollWidth-(u.right||0)-ke;_==="flex"&&A==="row-reverse"?(P.left=he,P.right=_e):(P.left=_e,P.right=he),b.value=V;let U=h.scrollTop;r===d.document&&!U&&(U=d.document.body.scrollTop),M.top=U<E.value,M.bottom=U>E.value;const ge=Math.abs(U)<=(u.top||0),ye=Math.abs(U)+h.clientHeight>=h.scrollHeight-(u.bottom||0)-ke;_==="flex"&&A==="column-reverse"?(P.top=ye,P.bottom=ge):(P.top=ge,P.bottom=ye),E.value=U},oe=r=>{var m;if(!d)return;const h=(m=r.target.documentElement)!=null?m:r.target;X(h),q.value=!0,ie(r),c(r)};return Ee(t,"scroll",n?Xt(oe,n,!0,!1):oe,l),Zt(()=>{try{const r=k(t);if(!r)return;X(r)}catch(r){v(r)}}),p!=null&&p.mutation&&t!=null&&t!==d&&t!==document&&Qt(t,()=>{const r=k(t);r&&X(r)},{attributes:!0,childList:!0,subtree:!0}),Ee(t,"scrollend",Q,l),{x:L,y:z,isScrolling:q,arrivedState:P,directions:M,measure(){const r=k(t);d&&r&&X(r)}}}function tn(t){const o=w(0),n=typeof t=="string"?w(document.querySelector(t)):t,{y:e}=en(n,{behavior:"auto"});return qe(()=>{o.value=T(e)??0}),Xe(async()=>{setTimeout(()=>{e.value=o.value},0)}),{memoryY:o}}function nn(t,o=10,n=50){const e=w([]);let i=0,c=0;const u=l=>{for(;i<t.value.length&&(l.timeRemaining()>0||l.didTimeout);){const a=Math.min(i+o,t.value.length);e.value.push(...t.value.slice(i,a)),i=a}i<t.value.length&&(c=requestIdleCallback(u,{timeout:n}))};return Y(t,()=>{cancelIdleCallback(c),e.value=[],i=0,c=requestIdleCallback(u,{timeout:n})},{immediate:!0}),Ze(()=>cancelIdleCallback(c)),e}const on={class:"h-full flex flex-col overflow-hidden gap-[10px]"},ln={key:0,class:"flex justify-center p-[5px]"},Cn=R({__name:"index",props:{isPagination:{type:Boolean,default:!0}},setup(t){const o=w(null);tn(o);const n=ce("compListStore"),e=S(()=>n.loading),i=nn(S(()=>n.list),1),c=re({total:n.pagination.total,background:!0,layout:"total, sizes, prev, pager, next, jumper",pageSizes:[10,20,30],page:n.pagination.page,pageSize:n.pagination.pageSize});function u(l){Qe(l.toString()),n.setPagination({...n.pagination,pageSize:l})}function s(l){n.setPagination({...n.pagination,page:l})}return Y([()=>n.pagination.pageSize,()=>n.pagination.page],async()=>{await n.getComps()}),(l,a)=>{const d=I("el-pagination"),v=Je("loading");return Ke((f(),C("div",on,[g("div",{class:"flex-1 overflow-auto",ref_key:"compListEl",ref:o},[y(ct,{isEmpty:T(i).length===0&&!e.value},{default:x(()=>[y(rt,{itemMinWidth:310},{default:x(()=>[(f(!0),C(H,null,G(T(i),p=>(f(),C("div",{key:p.id,class:"h-[400px] overflow-hidden rounded-md"},[y(Vt,de({ref_for:!0},p),null,16)]))),128))]),_:1})]),_:1},8,["isEmpty"])],512),t.isPagination?(f(),C("div",ln,[y(d,{"current-page":c.page,"onUpdate:currentPage":a[0]||(a[0]=p=>c.page=p),"page-size":c.pageSize,"onUpdate:pageSize":a[1]||(a[1]=p=>c.pageSize=p),"page-sizes":c.pageSizes,background:c.background,layout:c.layout,total:T(n).pagination.total,onSizeChange:u,onCurrentChange:s},null,8,["current-page","page-size","page-sizes","background","layout","total"])])):j("",!0)])),[[v,e.value]])}}}),an={class:"terminal-pane-container"},sn={class:"deps-content"},cn={class:"comp-name"},rn={class:"cli-list"},un=R({__name:"index",props:{compId:{},getCompDetail:{type:Function}},setup(t){const o=t,n=w(),e=S(()=>n.value?Object.keys(n.value.dep).map(s=>{var l,a,d;return{name:s,version:(d=(a=(l=n.value)==null?void 0:l.dep)==null?void 0:a[s])==null?void 0:d.version}}):[]),i=(u,s)=>`npm install ${u}@${s}`,c=async u=>{const s=await et(i(u.name,u.version));s&&ee.success(s)};return pe(async()=>{const u=await o.getCompDetail(o.compId);u&&(n.value=u)}),(u,s)=>{const l=I("el-button"),a=I("el-splitter-panel"),d=I("el-splitter");return f(),C("div",an,[y(d,{layout:"vertical"},{default:x(()=>[y(a,{size:"30%",min:200},{default:x(()=>{var v;return[g("div",sn,[g("h4",null,[g("span",cn,$((v=n.value)==null?void 0:v.name),1)]),g("div",null,[y(De,{compDeps:e.value},null,8,["compDeps"])]),s[1]||(s[1]=g("h4",null,"安装命令",-1)),g("div",rn,[(f(!0),C(H,null,G(e.value,p=>(f(),C("div",{key:p.name,class:"cli-item"},[g("span",null,$(i(p.name,p.version)),1),y(l,{type:"primary",onClick:b=>c(p)},{default:x(()=>[...s[0]||(s[0]=[K("复制",-1)])]),_:1},8,["onClick"])]))),128))])])]}),_:1}),y(a,{min:200},{default:x(()=>[y(dt)]),_:1})]),_:1})])}}}),xn=J(un,[["__scopeId","data-v-88ef56f4"]]),dn={class:"base-pane-pane-header"},pn={class:"base-pane-pane-header-title"},fn={class:"base-pane-pane-header-actions"},mn={key:0,class:"base-pane-pane-body"},vn=R({__name:"index",props:{title:{type:String,default:""},actions:{type:Array,default:()=>["close","maximize","minimize"]}},emits:["close","maximize","minimize"],setup(t,{emit:o}){const n=t,e=o,i=w(!1),c=w(!1);function u(){e("close")}function s(){i.value=!i.value,e("maximize",i.value)}function l(){c.value=!c.value,e("minimize",c.value)}function a(d){return n.actions.includes(d)}return(d,v)=>{const p=I("el-button");return f(),C("div",{class:Te(["base-pane-pane rounded-sm",{"is-maximized":i.value,"is-minimized":c.value}])},[g("div",dn,[g("div",pn,$(t.title),1),g("div",fn,[a("close")?(f(),D(p,{key:0,type:"primary",icon:T(tt),circle:"",onClick:u},null,8,["icon"])):j("",!0),a("maximize")?(f(),D(p,{key:1,type:"primary",icon:i.value?T(we):T(nt),circle:"",onClick:s},null,8,["icon"])):j("",!0),a("minimize")?(f(),D(p,{key:2,type:"primary",icon:c.value?T(we):T(ot),circle:"",onClick:l},null,8,["icon"])):j("",!0)])]),c.value?j("",!0):(f(),C("div",mn,[lt(d.$slots,"default",{},void 0,!0)]))],2)}}}),wn=J(vn,[["__scopeId","data-v-3120dd55"]]);export{wn as B,De as C,xn as T,Cn as _,bn as a,vt as b,kt as c,tn as u};
|
|
1
|
+
import{d as R,r as I,c as C,o as f,b as y,aw as Te,w as x,x as J,h as w,A as D,U as ue,F as H,a7 as G,f as Z,t as M,aK as de,u as T,k as pe,ax as fe,a as g,j as S,aa as Le,n as j,D as me,b4 as ze,b5 as Pe,b6 as Re,a5 as ce,T as Ae,p as Be,av as Fe,a2 as Y,X as be,Y as Ce,b7 as Ne,E as ee,b1 as W,R as le,af as ae,b2 as xe,b8 as Ve,b9 as je,b3 as Ue,ba as We,bb as He,bc as Ge,aV as Ie,bd as Ye,be as k,bf as te,i as re,a1 as qe,a0 as Xe,G as Ke,aq as Ze,ar as Je,bg as Qe,bh as et,bi as tt,bj as we,bk as nt,bl as ot,ao as lt}from"./index-C26Rl450.js";import{a as at,c as st,_ as it,E as ct,G as rt}from"./index-ShGF-65v.js";import{_ as ut}from"./index.vue_vue_type_script_setup_true_lang-B_QtQDll.js";import{_ as dt}from"./index.vue_vue_type_script_setup_true_lang-BvP8OIHp.js";const pt={class:"collect"},ft=R({__name:"index",props:{isCollect:{type:Boolean,default:!1}},emits:["collect"],setup(t,{emit:o}){const n=t,e=o;function i(){e("collect",!n.isCollect)}return(c,u)=>{const s=I("StarFilled"),l=I("el-icon");return f(),C("div",pt,[y(l,{class:Te(["collect-icon",{"is-collect":t.isCollect}]),onClick:i},{default:x(()=>[y(s)]),_:1},8,["class"])])}}}),mt=J(ft,[["__scopeId","data-v-25eb2692"]]),vt=R({__name:"index",setup(t,{expose:o}){const n=w(!1),e=w(null),i=s=>{n.value=!0,e.value=s},c=()=>{n.value=!1,e.value=null},u=s=>{e.value&&e.value(s)};return o({open:i,close:c}),(s,l)=>(f(),D(ut,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),title:"项目文件夹",width:"50%","show-close":""},{default:x(()=>[y(at,{onSelect:u})]),_:1},8,["modelValue"]))}}),Se=R({__name:"index",props:{title:{type:String,default:""},column:{type:Number,default:3},items:{type:Array,default:()=>[]}},setup(t){const o=ue();return(n,e)=>{const i=I("el-descriptions-item"),c=I("el-descriptions");return f(),D(c,de({column:t.column,title:t.title},T(o)),{default:x(()=>[(f(!0),C(H,null,G(t.items,(u,s)=>(f(),D(i,{key:s,label:u.label},{default:x(()=>[Z(M(u.value),1)]),_:2},1032,["label"]))),128))]),_:1},16,["column","title"])}}}),_t={class:"comp-desc-container"},ht=R({__name:"index",props:{desc:{type:String,default:""}},setup(t){const o=w(null),n=w(!1),e=t;return pe(async()=>{if(e.desc){await fe();const i=o.value;if(!i)return;n.value=i.scrollHeight>i.clientHeight}}),(i,c)=>{const u=I("el-popover");return f(),C("div",_t,[y(u,{disabled:!n.value,content:t.desc,placement:"bottom",width:"300"},{reference:x(()=>[g("p",{ref_key:"paraRef",ref:o},M(t.desc),513)]),_:1},8,["disabled","content"])])}}}),gt=J(ht,[["__scopeId","data-v-f59630ca"]]),yt={key:0,class:"comp-deps size-full"},bt={key:0,class:"more"},Ct={class:"measure-row"},xt=5,wt=70,St=R({__name:"index",props:{compDeps:{}},setup(t){const o=t,n=w(0),e=w([]);function i(a){n.value=a[0].contentRect.width}function c(a){!a||a instanceof Element||fe().then(()=>{const d=a.$el||a;e.value.push(d.offsetWidth)})}const u=S(()=>{let a=0,d=0;const v=n.value-wt;for(let p=0;p<e.value.length&&(a+=e.value[p]+(p?xt:0),!(a>v));p++)d++;return Math.max(0,d)}),s=S(()=>o.compDeps.slice(0,u.value)),l=S(()=>o.compDeps.length-u.value);return(a,d)=>{const v=I("el-tag");return f(),D(Le,{resize:i},{default:x(()=>[a.compDeps.length?(f(),C("div",yt,[(f(!0),C(H,null,G(s.value,p=>(f(),D(v,{key:p.name,type:"success"},{default:x(()=>[Z(M(p.name)+" "+M(p.version),1)]),_:2},1024))),128)),l.value>0?(f(),C("span",bt,"+"+M(l.value)+" more",1)):j("",!0)])):j("",!0),g("div",Ct,[(f(!0),C(H,null,G(a.compDeps,p=>(f(),D(v,{key:"m-"+p.name,type:"success",ref_for:!0,ref:c},{default:x(()=>[Z(M(p.name)+" "+M(p.version),1)]),_:2},1024))),128))])]),_:1})}}}),De=J(St,[["__scopeId","data-v-a1f79215"]]),Et={class:"w-[100px]"},kt=R({__name:"index",props:{modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(t,{emit:o}){const n=o,e=ue(),i=w([]);async function c(){const l=await ze({compName:e.name});i.value=l.data.map(a=>({value:a.version,label:a.version}))}function u(l){console.log("切换版本号",l),n("update:modelValue",l)}function s(){i.value=[{value:e.version,label:e.version}],n("update:modelValue",e.version)}return me(()=>{s()}),(l,a)=>{const d=I("el-option"),v=I("el-select");return f(),C("div",Et,[y(v,{"model-value":t.modelValue,onChange:u,onVisibleChange:c},{default:x(()=>[(f(!0),C(H,null,G(i.value,p=>(f(),D(d,{key:p.value,label:p.label,value:p.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"])])}}}),Tt={class:"flex justify-center items-center gap-[5px]"},It={class:"text-[12px] text-[#857e7e]"},Dt=R({__name:"index",props:{nickname:{type:String,default:""},avatar:{type:String,default:""}},setup(t){const o=t,n=w(Re);return pe(async()=>{if(!o.avatar)return;const e=await Pe({objectId:o.avatar});n.value=e.data.signUrl}),(e,i)=>{const c=I("el-avatar");return f(),C("div",Tt,[g("span",It,M(t.nickname),1),y(c,{size:15,src:n.value},null,8,["src"])])}}}),Ot=J(Dt,[["__scopeId","data-v-911677f5"]]),Mt={class:"bg-[#fff] flex items-center justify-center flex-col size-full overflow-hidden"},$t={class:"h-[270px] overflow-hidden w-full"},Lt={class:"flex flex-1 justify-start gap-[5px]"},zt={class:"text-left flex-1 flex flex-col w-full overflow-hidden p-[5px] gap-[5px]"},Pt={class:"flex justify-between"},Rt={class:"font-medium"},At={class:"desc-content flex-1"},Bt={class:"h-[30px] p-[5px] overflow-hidden w-full bg-[#ccc] flex items-center justify-between"},Ft={class:"flex gap-[5px]"},Nt={class:"flex"},Vt=R({__name:"index",setup(t){const o=ce("compListStore"),n=ce("callbacks"),e=ue(),i=Ae(),c=Be(),u=w(),s=w([{key:"delete",text:"删除",handler:z,type:"danger"},{key:"update",text:"更新",handler:B,type:"primary"},{key:"preview",text:"预览",handler:q,type:"primary"},{key:"download",text:"下载",handler:P,type:"primary"},{key:"collect",text:"收藏",handler:$}]),l=w(""),a=w([]),d=S(()=>o.operate.length?o.operate.map(r=>s.value.find(m=>m.key===r)):[]),v=S(()=>o.operate.includes("terminal")),p=S(()=>e.previewConfigs.filter(r=>{var m;return(m=r.path)==null?void 0:m.length}).slice(0,3).map(r=>{const m=r.path[r.path.length-1].replace(/[/\\]/g,"/"),h=a.value.find(_=>_.path===m);return{entryUrl:h==null?void 0:h.signedUrl}})),b=S(()=>[{label:"下载:",value:e.downloadCount},{label:"收藏:",value:e.collectCount}]),E=S(()=>Object.keys(e.dep).map(m=>{var h,_;return{name:m,version:(_=(h=e.dep)==null?void 0:h[m])==null?void 0:_.version}})),L=S(()=>({panelType:Fe.MINI,previews:p.value,dep:e.dep,bgColor:e.bgColor,signedUrls:a.value,autoplay:!0,onePageEntryNameToFile:o.onePageEntryNameToFile}));async function z(){!e.name||await ae.confirm(W.CONFIRM.DELETE(e.name),"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"})!=="confirm"||Ve({compId:e.id}).then(()=>ee.success(W.SUCCESS.DELETE)).finally(()=>n.get(le.AFTER_COMP_DEL)(e.id))}function B(){e.id&&je({compId:e.id}).then(r=>{if(!r.data){ee.error("组件不在本地,请先下载后更新");return}i.setSelectedFolder(r.data),n.get(le.BEFORE_COMP_GO_UPDATE)(e.id)})}function q(){console.log("预览"),c.push({path:`/preview/${e.id}`})}async function P(r){var h;!r()||await ae.confirm("当前选择的版本为:"+l.value+",确认下载吗?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).catch(()=>{console.log("取消下载")})!=="confirm"||(h=u.value)==null||h.open(Q)}async function $(r){r()&&(console.log("收藏"),Ne({compId:e.id,isCollect:!e.isCollect}).then(()=>{ee.success(e.isCollect?W.SUCCESS.UNCOLLECT:W.SUCCESS.COLLECT);const m={...e,isCollect:!e.isCollect};o.updateCompListItemById(e.id,m),e.isCollect?(o.updateCompListItemById(e.id,{...m,collectCount:e.collectCount-1}),n.get(le.AFTER_COMP_CANCEL_COLLECT)(e.id)):o.updateCompListItemById(e.id,{...m,collectCount:e.collectCount+1})}))}async function Q(r){var A;if(await ae.confirm(W.CONFIRM.DOWNLOAD(r.path),"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"})!=="confirm")return;const h=await xe({compId:e.id,savePath:r.path,compName:e.name,version:l.value}),{isRepeat:_=!1}=h.data;if(_){if(await ae.confirm(W.CONFIRM.COVER(e.name),"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"})!=="confirm")return;await xe({compId:e.id,savePath:r.path,compName:e.name,isCover:!0,version:l.value})}ee.success(W.SUCCESS.DOWNLOAD),o.updateCompListItemById(e.id,{...e,downloadCount:e.downloadCount+1}),(A=u.value)==null||A.close()}async function ie(){const r={objectId:e.objectId,compName:e.name,version:e.version,files:e.files.map(m=>m.path)};await Ue(r).then(m=>{a.value=m.data.signedUrls})}async function X(r){await We({compName:e.name,version:r}).then(m=>{o.updateCompListItemById(e.id,{...m.data,id:e.id,downloadCount:e.downloadCount,collectCount:e.collectCount,isCollect:e.isCollect})})}function oe(){n.get(le.OPEN_COMP_TERMINAL)(e.id)}return Y(()=>e,async()=>{a.value=[],await ie()},{immediate:!0,deep:!0}),Y(()=>l.value,async r=>{r!==e.version&&await X(r)}),(r,m)=>{const h=I("el-button");return f(),C("div",Mt,[g("div",$t,[y(st,be(Ce(L.value)),{compToolBar:x(()=>[g("div",Lt,[v.value?(f(),D(h,{key:0,color:"#414141",onClick:oe},{default:x(()=>[...m[1]||(m[1]=[Z("终端",-1)])]),_:1})):j("",!0),y(kt,de({modelValue:l.value,"onUpdate:modelValue":m[0]||(m[0]=_=>l.value=_)},T(e)),null,16,["modelValue"])])]),_:1},16)]),g("div",zt,[g("div",Pt,[g("h4",Rt,M(T(e).name),1),g("div",null,[y(Ot,be(Ce(T(e).authorId)),null,16)])]),g("div",At,[y(gt,{desc:T(e).desc},null,8,["desc"])]),y(De,{compDeps:E.value},null,8,["compDeps"])]),g("div",Bt,[g("div",Ft,[y(Se,{column:1,items:[b.value[0]]},null,8,["items"]),y(Se,{column:1,items:[b.value[1]]},null,8,["items"])]),g("div",Nt,[(f(!0),C(H,null,G(d.value,(_,A)=>(f(),D(it,{key:A},{default:x(({isLogin:N})=>[(_==null?void 0:_.key)!=="collect"?(f(),D(h,{key:0,title:_==null?void 0:_.text,type:_==null?void 0:_.type,link:"",onClick:O=>_==null?void 0:_.handler(N)},{default:x(()=>[Z(M(_==null?void 0:_.text),1)]),_:2},1032,["title","type","onClick"])):(f(),D(mt,{key:1,class:"pl-[5px]",isCollect:T(e).isCollect,onCollect:O=>$(N)},null,8,["isCollect","onCollect"]))]),_:2},1024))),128))])]),y(vt,{ref_key:"DialogVueFinderRef",ref:u,onDownload:Q},null,512)])}}});function ve(t){return He()?(Ge(t),!0):!1}const jt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Oe=t=>t!=null,Ut=Object.prototype.toString,Wt=t=>Ut.call(t)==="[object Object]",F=()=>{};function Me(t,o){function n(...e){return new Promise((i,c)=>{Promise.resolve(t(()=>o.apply(this,e),{fn:o,thisArg:this,args:e})).then(i).catch(c)})}return n}function Ht(t,o={}){let n,e,i=F;const c=l=>{clearTimeout(l),i(),i=F};let u;return l=>{const a=k(t),d=k(o.maxWait);return n&&c(n),a<=0||d!==void 0&&d<=0?(e&&(c(e),e=void 0),Promise.resolve(l())):new Promise((v,p)=>{i=o.rejectOnCancel?p:v,u=l,d&&!e&&(e=setTimeout(()=>{n&&c(n),e=void 0,v(u())},d)),n=setTimeout(()=>{e&&c(e),e=void 0,v(l())},a)})}}function Gt(...t){let o=0,n,e=!0,i=F,c,u,s,l,a;!Ye(t[0])&&typeof t[0]=="object"?{delay:u,trailing:s=!0,leading:l=!0,rejectOnCancel:a=!1}=t[0]:[u,s=!0,l=!0,a=!1]=t;const d=()=>{n&&(clearTimeout(n),n=void 0,i(),i=F)};return p=>{const b=k(u),E=Date.now()-o,L=()=>c=p();return d(),b<=0?(o=Date.now(),L()):(E>b&&(l||!e)?(o=Date.now(),L()):s&&(c=new Promise((z,B)=>{i=a?B:z,n=setTimeout(()=>{o=Date.now(),e=!0,z(L()),d()},Math.max(0,b-E))})),!l&&!n&&(n=setTimeout(()=>e=!0,b)),e=!1,c)}}function ne(t){return Array.isArray(t)?t:[t]}function Yt(t){return Ie()}function qt(t,o=200,n={}){return Me(Ht(o,n),t)}function Xt(t,o=200,n=!1,e=!0,i=!1){return Me(Gt(o,n,e,i),t)}function Kt(t,o=!0,n){Yt()?me(t,n):o?t():fe(t)}function Zt(t,o,n){return Y(t,o,{...n,immediate:!0})}const se=jt?window:void 0;function K(t){var o;const n=k(t);return(o=n==null?void 0:n.$el)!=null?o:n}function Ee(...t){const o=[],n=()=>{o.forEach(s=>s()),o.length=0},e=(s,l,a,d)=>(s.addEventListener(l,a,d),()=>s.removeEventListener(l,a,d)),i=S(()=>{const s=ne(k(t[0])).filter(l=>l!=null);return s.every(l=>typeof l!="string")?s:void 0}),c=Zt(()=>{var s,l;return[(l=(s=i.value)==null?void 0:s.map(a=>K(a)))!=null?l:[se].filter(a=>a!=null),ne(k(i.value?t[1]:t[0])),ne(T(i.value?t[2]:t[1])),k(i.value?t[3]:t[2])]},([s,l,a,d])=>{if(n(),!(s!=null&&s.length)||!(l!=null&&l.length)||!(a!=null&&a.length))return;const v=Wt(d)?{...d}:d;o.push(...s.flatMap(p=>l.flatMap(b=>a.map(E=>e(p,b,E,v)))))},{flush:"post"}),u=()=>{c(),n()};return ve(n),u}function Jt(){const t=te(!1),o=Ie();return o&&me(()=>{t.value=!0},o),t}function $e(t){const o=Jt();return S(()=>(o.value,!!t()))}function Qt(t,o,n={}){const{window:e=se,...i}=n;let c;const u=$e(()=>e&&"MutationObserver"in e),s=()=>{c&&(c.disconnect(),c=void 0)},l=S(()=>{const p=k(t),b=ne(p).map(K).filter(Oe);return new Set(b)}),a=Y(l,p=>{s(),u.value&&p.size&&(c=new MutationObserver(o),p.forEach(b=>c.observe(b,i)))},{immediate:!0,flush:"post"}),d=()=>c==null?void 0:c.takeRecords(),v=()=>{a(),s()};return ve(v),{isSupported:u,stop:v,takeRecords:d}}function bn(t,o,n={}){const{root:e,rootMargin:i="0px",threshold:c=0,window:u=se,immediate:s=!0}=n,l=$e(()=>u&&"IntersectionObserver"in u),a=S(()=>{const E=k(t);return ne(E).map(K).filter(Oe)});let d=F;const v=te(s),p=l.value?Y(()=>[a.value,K(e),v.value],([E,L])=>{if(d(),!v.value||!E.length)return;const z=new IntersectionObserver(o,{root:K(L),rootMargin:i,threshold:c});E.forEach(B=>B&&z.observe(B)),d=()=>{z.disconnect(),d=F}},{immediate:s,flush:"post"}):F,b=()=>{d(),p(),v.value=!1};return ve(b),{isSupported:l,isActive:v,pause(){d(),v.value=!1},resume(){v.value=!0},stop:b}}const ke=1;function en(t,o={}){const{throttle:n=0,idle:e=200,onStop:i=F,onScroll:c=F,offset:u={left:0,right:0,top:0,bottom:0},observe:s={mutation:!1},eventListenerOptions:l={capture:!1,passive:!0},behavior:a="auto",window:d=se,onError:v=r=>{console.error(r)}}=o,p=typeof s=="boolean"?{mutation:s}:s,b=te(0),E=te(0),L=S({get(){return b.value},set(r){B(r,void 0)}}),z=S({get(){return E.value},set(r){B(void 0,r)}});function B(r,m){var h,_,A,N;if(!d)return;const O=k(t);if(!O)return;(A=O instanceof Document?d.document.body:O)==null||A.scrollTo({top:(h=k(m))!=null?h:z.value,left:(_=k(r))!=null?_:L.value,behavior:k(a)});const V=((N=O==null?void 0:O.document)==null?void 0:N.documentElement)||(O==null?void 0:O.documentElement)||O;L!=null&&(b.value=V.scrollLeft),z!=null&&(E.value=V.scrollTop)}const q=te(!1),P=re({left:!0,right:!1,top:!0,bottom:!1}),$=re({left:!1,right:!1,top:!1,bottom:!1}),Q=r=>{q.value&&(q.value=!1,$.left=!1,$.right=!1,$.top=!1,$.bottom=!1,i(r))},ie=qt(Q,n+e),X=r=>{var m;if(!d)return;const h=((m=r==null?void 0:r.document)==null?void 0:m.documentElement)||(r==null?void 0:r.documentElement)||K(r),{display:_,flexDirection:A,direction:N}=getComputedStyle(h),O=N==="rtl"?-1:1,V=h.scrollLeft;$.left=V<b.value,$.right=V>b.value;const _e=Math.abs(V*O)<=(u.left||0),he=Math.abs(V*O)+h.clientWidth>=h.scrollWidth-(u.right||0)-ke;_==="flex"&&A==="row-reverse"?(P.left=he,P.right=_e):(P.left=_e,P.right=he),b.value=V;let U=h.scrollTop;r===d.document&&!U&&(U=d.document.body.scrollTop),$.top=U<E.value,$.bottom=U>E.value;const ge=Math.abs(U)<=(u.top||0),ye=Math.abs(U)+h.clientHeight>=h.scrollHeight-(u.bottom||0)-ke;_==="flex"&&A==="column-reverse"?(P.top=ye,P.bottom=ge):(P.top=ge,P.bottom=ye),E.value=U},oe=r=>{var m;if(!d)return;const h=(m=r.target.documentElement)!=null?m:r.target;X(h),q.value=!0,ie(r),c(r)};return Ee(t,"scroll",n?Xt(oe,n,!0,!1):oe,l),Kt(()=>{try{const r=k(t);if(!r)return;X(r)}catch(r){v(r)}}),p!=null&&p.mutation&&t!=null&&t!==d&&t!==document&&Qt(t,()=>{const r=k(t);r&&X(r)},{attributes:!0,childList:!0,subtree:!0}),Ee(t,"scrollend",Q,l),{x:L,y:z,isScrolling:q,arrivedState:P,directions:$,measure(){const r=k(t);d&&r&&X(r)}}}function tn(t){const o=w(0),n=typeof t=="string"?w(document.querySelector(t)):t,{y:e}=en(n,{behavior:"auto"});return qe(()=>{o.value=T(e)??0}),Xe(async()=>{setTimeout(()=>{e.value=o.value},0)}),{memoryY:o}}function nn(t,o=10,n=50){const e=w([]);let i=0,c=0;const u=l=>{for(;i<t.value.length&&(l.timeRemaining()>0||l.didTimeout);){const a=Math.min(i+o,t.value.length);e.value.push(...t.value.slice(i,a)),i=a}i<t.value.length&&(c=requestIdleCallback(u,{timeout:n}))};return Y(t,()=>{cancelIdleCallback(c),e.value=[],i=0,c=requestIdleCallback(u,{timeout:n})},{immediate:!0}),Ke(()=>cancelIdleCallback(c)),e}const on={class:"h-full flex flex-col overflow-hidden gap-[10px]"},ln={key:0,class:"flex justify-center p-[5px]"},Cn=R({__name:"index",props:{isPagination:{type:Boolean,default:!0}},setup(t){const o=w(null);tn(o);const n=ce("compListStore"),e=S(()=>n.loading),i=nn(S(()=>n.list),1),c=re({total:n.pagination.total,background:!0,layout:"total, sizes, prev, pager, next, jumper",pageSizes:[10,20,30],page:n.pagination.page,pageSize:n.pagination.pageSize});function u(l){Qe(l.toString()),n.setPagination({...n.pagination,pageSize:l})}function s(l){n.setPagination({...n.pagination,page:l})}return Y([()=>n.pagination.pageSize,()=>n.pagination.page],async()=>{await n.getComps()}),(l,a)=>{const d=I("el-pagination"),v=Je("loading");return Ze((f(),C("div",on,[g("div",{class:"flex-1 overflow-auto",ref_key:"compListEl",ref:o},[y(ct,{isEmpty:T(i).length===0&&!e.value},{default:x(()=>[y(rt,{itemMinWidth:310},{default:x(()=>[(f(!0),C(H,null,G(T(i),p=>(f(),C("div",{key:p.id,class:"h-[400px] overflow-hidden rounded-md"},[y(Vt,de({ref_for:!0},p),null,16)]))),128))]),_:1})]),_:1},8,["isEmpty"])],512),t.isPagination?(f(),C("div",ln,[y(d,{"current-page":c.page,"onUpdate:currentPage":a[0]||(a[0]=p=>c.page=p),"page-size":c.pageSize,"onUpdate:pageSize":a[1]||(a[1]=p=>c.pageSize=p),"page-sizes":c.pageSizes,background:c.background,layout:c.layout,total:T(n).pagination.total,onSizeChange:u,onCurrentChange:s},null,8,["current-page","page-size","page-sizes","background","layout","total"])])):j("",!0)])),[[v,e.value]])}}}),an={class:"terminal-pane-container"},sn={class:"deps-content"},cn={class:"comp-name"},rn={class:"cli-list"},un=R({__name:"index",props:{compId:{},getCompDetail:{type:Function}},setup(t){const o=t,n=w(),e=S(()=>n.value?Object.keys(n.value.dep).map(s=>{var l,a,d;return{name:s,version:(d=(a=(l=n.value)==null?void 0:l.dep)==null?void 0:a[s])==null?void 0:d.version}}):[]),i=(u,s)=>`npm install ${u}@${s}`,c=async u=>{const s=await et(i(u.name,u.version));s&&ee.success(s)};return pe(async()=>{const u=await o.getCompDetail(o.compId);u&&(n.value=u)}),(u,s)=>{const l=I("el-button"),a=I("el-splitter-panel"),d=I("el-splitter");return f(),C("div",an,[y(d,{layout:"vertical"},{default:x(()=>[y(a,{size:"30%",min:200},{default:x(()=>{var v;return[g("div",sn,[g("h4",null,[g("span",cn,M((v=n.value)==null?void 0:v.name),1)]),g("div",null,[y(De,{compDeps:e.value},null,8,["compDeps"])]),s[1]||(s[1]=g("h4",null,"安装命令",-1)),g("div",rn,[(f(!0),C(H,null,G(e.value,p=>(f(),C("div",{key:p.name,class:"cli-item"},[g("span",null,M(i(p.name,p.version)),1),y(l,{type:"primary",onClick:b=>c(p)},{default:x(()=>[...s[0]||(s[0]=[Z("复制",-1)])]),_:1},8,["onClick"])]))),128))])])]}),_:1}),y(a,{min:200},{default:x(()=>[y(dt)]),_:1})]),_:1})])}}}),xn=J(un,[["__scopeId","data-v-88ef56f4"]]),dn={class:"base-pane-pane-header"},pn={class:"base-pane-pane-header-title"},fn={class:"base-pane-pane-header-actions"},mn={key:0,class:"base-pane-pane-body"},vn=R({__name:"index",props:{title:{type:String,default:""},actions:{type:Array,default:()=>["close","maximize","minimize"]}},emits:["close","maximize","minimize"],setup(t,{emit:o}){const n=t,e=o,i=w(!1),c=w(!1);function u(){e("close")}function s(){i.value=!i.value,e("maximize",i.value)}function l(){c.value=!c.value,e("minimize",c.value)}function a(d){return n.actions.includes(d)}return(d,v)=>{const p=I("el-button");return f(),C("div",{class:Te(["base-pane-pane rounded-sm",{"is-maximized":i.value,"is-minimized":c.value}])},[g("div",dn,[g("div",pn,M(t.title),1),g("div",fn,[a("close")?(f(),D(p,{key:0,type:"primary",icon:T(tt),circle:"",onClick:u},null,8,["icon"])):j("",!0),a("maximize")?(f(),D(p,{key:1,type:"primary",icon:i.value?T(we):T(nt),circle:"",onClick:s},null,8,["icon"])):j("",!0),a("minimize")?(f(),D(p,{key:2,type:"primary",icon:c.value?T(we):T(ot),circle:"",onClick:l},null,8,["icon"])):j("",!0)])]),c.value?j("",!0):(f(),C("div",mn,[lt(d.$slots,"default",{},void 0,!0)]))],2)}}}),wn=J(vn,[["__scopeId","data-v-3120dd55"]]);export{wn as B,De as C,xn as T,Cn as _,bn as a,vt as b,kt as c,tn as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e}from"./index.vue_vue_type_script_setup_true_lang-BvP8OIHp.js";import{d as a,c as o,o as t,b as s,x as n}from"./index-C26Rl450.js";const c={class:"terminal-container"},_=a({__name:"index",setup(r){return(d,i)=>(t(),o("div",c,[s(e)]))}}),f=n(_,[["__scopeId","data-v-45a9da26"]]);export{f as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as an,c as tt,o as ze,a as ht,
|
|
1
|
+
import{x as an,c as tt,o as ze,a as ht,bm as _s,y as ha,h as He,j as ut,bn as us,bo as On,bp as cs,d as Ct,F as da,a7 as fa,n as sn,t as $s,a2 as ps,a5 as hs,R as Jn,aV as ds,G as fs,aw as ms,u as br,av as ma,b as Vt,T as gs,k as Ss,ao as gt,U as ys,D as vs,A as Or,w as mr,aa as bs,bq as Cs,aK as Jr,f as xs,r as xr,br as ws,bs as Es,Z as As,E as Dn,g as Is,bt as Ms}from"./index-C26Rl450.js";/**
|
|
2
2
|
* @license
|
|
3
3
|
* MIT License
|
|
4
4
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as S,c as w,o as p,a as y,t as $,A as k,r as b,F as z,ao as se,n as J,w as l,b as e,u as I,ap as fe,f as F,x as X,h as P,D as _e,T as G,j as L,k as ae,a2 as H,a5 as q,R as M,aq as ue,ar as ve,as as he,E as Y,at as ye,au as be,ag as ge,al as Ce,am as xe,M as Ee,an as Ie,B as le,i as ne,av as A,G as ke,aw as we,ax as Ve,ay as re,N as ie,az as oe,a7 as W,aA as j,aB as Oe,Z as ce,aC as Re,aD as Fe,aE as Pe,X as Te,Y as De,aF as $e,aG as Ne,aH as Ae,$ as Me,Q as Ue}from"./index-C26Rl450.js";import{C as Le}from"./index-Blp6T7rl.js";import{G as Se,b as de,E as je,c as He}from"./index-ShGF-65v.js";import{_ as Be}from"./index.vue_vue_type_script_setup_true_lang-C1Sc5-oi.js";const ze={class:"flex items-baseline"},Je={class:"w-[120px] flex items-center"},Ge={class:"flex-1 flex items-center"},Ke={class:"text-error"},We=S({__name:"CheckItem",props:{label:{},status:{},errorText:{},showRetry:{type:Boolean},showIcon:{type:Boolean}},emits:["retry"],setup(E,{emit:g}){const h=g,n=()=>{h("retry")};return(u,r)=>{const i=b("el-button"),x=b("el-icon");return p(),w("div",ze,[y("div",Je,$(u.label),1),y("div",Ge,[u.status.loading?(p(),k(i,{key:0,link:"",loading:u.status.loading},null,8,["loading"])):u.status.value?(p(),w(z,{key:1},[se(u.$slots,"success",{},()=>[y("span",null,$(u.status.value),1)],!0),u.showIcon?(p(),k(x,{key:0,class:"is-ok ml-2"},{default:l(()=>[e(I(fe))]),_:1})):J("",!0)],64)):(p(),w(z,{key:2},[y("span",Ke,[se(u.$slots,"error",{},()=>[F($(u.errorText||"内容有误!"),1)],!0)]),u.showRetry?(p(),k(i,{key:0,plain:"",onClick:n},{default:l(()=>[...r[0]||(r[0]=[F(" 生成 ",-1)])]),_:1})):J("",!0)],64))])])}}}),te=X(We,[["__scopeId","data-v-d7f6835b"]]),Ye={class:"version-input"},Xe=S({__name:"VersionInput",props:{initialVersion:{},disabled:{type:Boolean}},emits:["confirm"],setup(E,{emit:g}){const h=E,n=g,u=P(""),r=P(""),i=P("");_e(()=>{u.value=h.initialVersion.major,r.value=h.initialVersion.minor,i.value=h.initialVersion.patch});function x(){n("confirm",{major:u.value,minor:r.value,patch:i.value})}return(_,o)=>{const s=b("el-input"),m=b("el-button");return p(),w("div",Ye,[e(s,{modelValue:u.value,"onUpdate:modelValue":o[0]||(o[0]=a=>u.value=a),style:{width:"60px"},min:0,type:"number"},null,8,["modelValue"]),o[4]||(o[4]=y("span",{class:"separator"},".",-1)),e(s,{modelValue:r.value,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value=a),style:{width:"60px"},min:0,type:"number"},null,8,["modelValue"]),o[5]||(o[5]=y("span",{class:"separator"},".",-1)),e(s,{modelValue:i.value,"onUpdate:modelValue":o[2]||(o[2]=a=>i.value=a),style:{width:"60px"},min:0,type:"number"},null,8,["modelValue"]),e(m,{style:{"margin-left":"8px"},onClick:x},{default:l(()=>[...o[3]||(o[3]=[F("确认",-1)])]),_:1})])}}}),qe=X(Xe,[["__scopeId","data-v-1a77fb6c"]]),Qe={class:"size-full flex flex-col gap-2 overflow-auto config-container"},Ze={key:0,class:"flex items-center"},et=S({__name:"index",setup(E){const g=G(),h=P(!0),n=P({major:"",minor:"",patch:""}),u=q("callbacks"),r=P({entryIndex:{loading:!0,value:""},compHash:{loading:!0,value:""},compJsonIsOk:{loading:!0,value:""}}),i=L(()=>{var a;return(a=g.selectedFolder)==null?void 0:a.path}),x=L(()=>Object.values(r.value).every(a=>a.value)),_=async()=>{if(i.value)try{await he({compPath:i.value}),Y.success("生成组件指纹成功"),o()}catch(a){console.error(a)}},o=async()=>{if(!i.value)return!1;Object.keys(r.value).forEach(a=>{r.value[a]={loading:!0,value:""}});try{const f=(await ye({compPath:i.value})).data;if(f)return r.value.entryIndex={loading:!1,value:f.entryIndex},r.value.compHash={loading:!1,value:f.compHash},r.value.compJsonIsOk={loading:!1,value:f.compJsonIsOk},f.compJsonIsOk&&s(f.compJsonIsOk),!!(f.entryIndex&&f.compHash&&f.compJsonIsOk)}catch(a){return console.error(a),!1}finally{h.value=!1}},s=a=>{const f=JSON.parse(a),[T,V,B]=f.version.split(".");n.value={major:T,minor:V,patch:B}},m=async({major:a,minor:f,patch:T})=>{if(i.value){h.value=!0;try{const V=`${a}.${f}.${T}`;await be({compPath:i.value,version:V}),Y.success("修改版本号成功"),o()}catch(V){console.error(V)}finally{h.value=!1}}};return ae(()=>{i.value&&o()}),H(()=>r.value,a=>{const f={entryIndex:a.entryIndex.value,compHash:a.compHash.value,compJsonIsOk:a.compJsonIsOk.value};g.setConfigStatus(f)},{immediate:!0,deep:!0}),u.set(M.CHECK_COMP_CONFIG,o),(a,f)=>{const T=ve("loading");return ue((p(),w("div",Qe,[e(te,{label:"入口文件:",status:r.value.entryIndex,showIcon:!0,"error-text":"缺少入口文件!"},null,8,["status"]),e(te,{label:"组件指纹:",status:r.value.compHash,onRetry:_,"error-text":"缺少组件指纹文件!","show-retry":!r.value.compHash.value,showIcon:!0},null,8,["status","show-retry"]),x.value?(p(),w("div",Ze,[f[0]||(f[0]=y("div",{class:"w-[120px]"},"本地版本号:",-1)),e(qe,{"initial-version":n.value,onConfirm:m,disabled:h.value},null,8,["initial-version","disabled"])])):J("",!0),e(te,{label:"comp.json内容:",status:r.value.compJsonIsOk,"show-icon":!0,"error-text":"comp.json文件内容有误!"},{success:l(()=>[e(Le,{code:r.value.compJsonIsOk.value},null,8,["code"])]),_:1},8,["status"])])),[[T,h.value]])}}}),tt=X(et,[["__scopeId","data-v-21953d50"]]),lt={class:"size-full overflow-auto tree-container"},ot={class:"flex items-center gap-[50px]"},at=S({__name:"index",setup(E){const g={children:"children",label:"name"},h=G(),n=P([]),u=L(()=>{var r;return(r=h.selectedFolder)==null?void 0:r.path});return H(()=>h.directory,r=>{n.value=le.cloneDeep(r)},{deep:!0,immediate:!0}),ae(async()=>{var a,f,T;if(!u.value||(a=h.directory)!=null&&a.length)return;const r=await ge({compPath:u.value}),i=await Ce(),x=await xe(),{srcPath:_}=i.data,{pathSeparator:o}=x.data,s=(f=u.value)==null?void 0:f.replace(Ee.dirname,"").replaceAll("/",o),m=Ie(r.data||[],V=>(V.path=V.path.replace(`${_}${o}${s}`,""),V));(T=m.children)!=null&&T.length&&h.setDirectory(m.children)}),(r,i)=>{const x=b("View"),_=b("el-icon"),o=b("router-link"),s=b("el-tree");return p(),w("div",lt,[e(s,{data:n.value,props:g},{default:l(({node:m,data:a})=>[y("div",ot,[y("span",null,$(m.label),1),m.label==="README.md"?(p(),k(o,{key:0,to:{name:"mdPreview",query:{mdPath:a==null?void 0:a.path,compPath:u.value}},target:"_blank",class:"flex"},{default:l(()=>[e(_,null,{default:l(()=>[e(x)]),_:1})]),_:1},8,["to"])):J("",!0)])]),_:1},8,["data"])])}}}),nt=S({__name:"PreviewItem",props:{modelValue:{},index:{}},emits:["update:modelValue"],setup(E,{expose:g,emit:h}){const n=G(),u=q("callbacks"),r=h,i=E,x=P({...i.modelValue}),_=P(),o=L(()=>n.previewList.findIndex(t=>t.uuid===i.modelValue.uuid)),s=L(()=>{var t;return(t=n.selectedFolder)==null?void 0:t.path}),m=ne({path:[{required:!0,message:"请选择预览文件",trigger:"change"}],desc:[{required:!0,message:"请填写备注说明",trigger:"blur"}]}),a=L(()=>{const t=JSON.parse(JSON.stringify(n.directory));return V(t),t}),f={value:"path",label:"name"};function T(t){r("update:modelValue",{...i.modelValue,desc:t})}function V(t){Array.isArray(t)&&t.forEach(v=>{v.disabled=v.type==="file"&&!v.name.endsWith(".vue"),Array.isArray(v.children)&&v.children.length>0&&V(v.children)})}function B(){n.delPreviewCompItemByUuid(i.modelValue.uuid)}async function c(t){r("update:modelValue",{...i.modelValue,path:t}),_.value&&(await Ve(),_.value.validateField("path"))}async function d(t){r("update:modelValue",{...i.modelValue,fullPath:t})}function C(){const t=n.previewList.findIndex(v=>v.uuid===i.modelValue.uuid);n.setCompCarouselIndex(t)}function U(){var t;return(t=_.value)==null?void 0:t.validate()}async function O(){var D;if(!((D=i.modelValue.path)!=null&&D.length)){x.value.entryUrl="",r("update:modelValue",{...x.value});return}const t=re((s==null?void 0:s.value)||"",i.modelValue.path),v=t?ie+"/"+t+"?v="+oe():"";x.value.entryUrl=v,r("update:modelValue",{...x.value})}async function N(){const t=re((s==null?void 0:s.value)||"",i.modelValue.fullPath||[]),v=t?ie+"/"+t+"?v="+oe():"";x.value.fullEntryUrl=v,r("update:modelValue",{...x.value})}return u.set(`${M.AFTER_COMP_RENDER_RETRY}_${i.modelValue.uuid}`,t=>{var v,D;if(t===A.MINI&&((v=i.modelValue.path)!=null&&v.length)){O();return}if(t===A.FULL&&((D=i.modelValue.fullPath)!=null&&D.length)){N();return}}),H(()=>i.modelValue,t=>{x.value={...t}},{deep:!0,immediate:!0}),H(()=>i.modelValue.path,async(t,v)=>{t!==v&&await O()},{immediate:!0}),H(()=>i.modelValue.fullPath,async(t,v)=>{t!==v&&await N()},{immediate:!0}),ke(()=>{u.delete(`${M.AFTER_COMP_RENDER_RETRY}_${i.modelValue.uuid}`)}),g({validateForm:U}),(t,v)=>{const D=b("el-cascader"),R=b("el-form-item"),K=b("el-input"),Q=b("el-button"),Z=b("el-form");return p(),w("div",{class:we(["cursor-pointer w-full p-[5px] rounded-sm overflow-auto border-1 border-[#ccc]",{active:I(n).compCarouselIndex===o.value}]),onClick:C},[e(Z,{ref_key:"ruleFormRef",ref:_,model:t.modelValue,rules:m,"label-width":"130px"},{default:l(()=>[e(R,{label:"小窗预览文件:",prop:t.index===0?"path":""},{default:l(()=>[e(D,{"model-value":t.modelValue.path,options:a.value,props:f,placeholder:"请选择预览文件",onChange:c,clearable:t.index!==0},null,8,["model-value","options","clearable"])]),_:1},8,["prop"]),e(R,{label:"全屏预览文件:",prop:"fullPath"},{default:l(()=>[e(D,{"model-value":t.modelValue.fullPath,options:a.value,props:f,placeholder:"请选择预览文件",onChange:d,clearable:""},null,8,["model-value","options"])]),_:1}),e(R,{label:"备注说明:",prop:"desc"},{default:l(()=>[e(K,{"model-value":t.modelValue.desc,type:"textarea",onInput:T},null,8,["model-value"])]),_:1}),e(R,null,{default:l(()=>[e(Q,{type:"danger",onClick:B},{default:l(()=>[...v[0]||(v[0]=[F("删除",-1)])]),_:1})]),_:1})]),_:1},8,["model","rules"])],2)}}}),st=X(nt,[["__scopeId","data-v-0505e089"]]),rt={class:"size-full overflow-auto flex flex-col"},it={class:"pb-[5px]"},ut={class:"flex-1 overflow-auto"},ct=S({__name:"index",setup(E){const g=G(),h=q("callbacks"),n=ne({});function u(_,o){if(!o||o instanceof Element){delete n[_];return}n[_]=o}function r(){if(g.previewList.length>=5){Y.error("最多添加5个预览入口");return}g.addPreviewCompItem({uuid:oe(),desc:"",path:[],fullPath:[]})}async function i(){if(!g.previewList.length)return Y.error("请添加预览入口"),!1;const _=Object.values(n).map(s=>s==null?void 0:s.validateForm()),o=await Promise.all(_).then(s=>s.every(m=>m)).catch(s=>(console.error(s),!1));return o||g.setActiveName(j.PREVIEW),o}function x(_){const{uuid:o}=_;g.updatePreviewCompItemByUuid(o,_)}return h.set(M.CHECK_PREVIEW_LIST_FORM,i),(_,o)=>{const s=b("el-button");return p(),w("div",rt,[y("div",it,[e(s,{type:"primary",onClick:r},{default:l(()=>[...o[0]||(o[0]=[F(" 添加预览入口 ",-1)])]),_:1})]),y("div",ut,[e(Se,{"item-min-width":360},{default:l(()=>[(p(!0),w(z,null,W(I(g).previewList,(m,a)=>(p(),k(st,{ref_for:!0,ref:f=>u(m.uuid,f),key:m.uuid,index:a,"model-value":m,"onUpdate:modelValue":x},null,8,["index","model-value"]))),128))]),_:1})])])}}}),dt=S({__name:"index",props:{modelValue:{}},setup(E){const g=G(),h=q("callbacks"),n=P(),u=P(200),r={description:[{required:!0,message:"请输入备注说明",trigger:"blur"},{min:3,max:u.value,message:`长度在 3 到 ${u.value} 个字符`,trigger:"blur"}]};async function i(){var _;try{return await((_=n.value)==null?void 0:_.validate()),!0}catch(o){return console.error(o),g.setActiveName(j.EXTRA),!1}}function x(_){g.setExtraInfo({...g.extraInfo,description:_})}return h.set(M.CHECK_EXTRA_INFO_FORM,i),(_,o)=>{const s=b("el-input"),m=b("el-form-item");return p(),k(I(Oe),{ref_key:"formRef",ref:n,class:"description-form","label-width":"80px",model:_.modelValue,rules:r},{default:l(()=>[e(m,{label:"备注说明",prop:"description"},{default:l(()=>[e(s,{maxlength:u.value,"show-word-limit":"","model-value":_.modelValue.description,placeholder:"请输入备注,有助于组件市场检索",rows:4,type:"textarea",onInput:x},null,8,["maxlength","model-value"])]),_:1})]),_:1},8,["model"])}}}),pt={class:"size-full flex justify-center items-center overflow-hidden"},mt=S({__name:"PanelMini",props:{isLoadDeps:{type:Boolean,default:()=>!1},allDepEntryNameToFile:{type:Object,default:()=>({})},bg:{type:String,default:()=>"#f5f7fa"},compItem:{type:Object,default:()=>({})},dep:{type:Object,default:()=>({})},signedUrls:{type:Array,default:()=>[]},onePageEntryNameToFile:{type:Object,default:()=>({})},bgColor:{type:String,default:()=>"#f5f7fa"}},setup(E){return(g,h)=>(p(),w("div",pt,[y("div",{class:"border-1 border-[#e4e7ed] rounded-md h-full max-h-[230px] w-[400px]",style:ce({backgroundColor:E.bg})},[E.isLoadDeps?(p(),k(de,{key:0,previewItem:E.compItem,dep:E.dep,signedUrls:E.signedUrls,allDepEntryNameToFile:E.allDepEntryNameToFile,panelType:I(A).MINI},null,8,["previewItem","dep","signedUrls","allDepEntryNameToFile","panelType"])):J("",!0)],4)]))}}),ft=S({__name:"PanelFull",props:{isLoadDeps:{type:Boolean,default:()=>!1},allDepEntryNameToFile:{type:Object,default:()=>({})},bg:{type:String,default:()=>"#f5f7fa"},compItem:{type:Object,default:()=>({})},dep:{type:Object,default:()=>({})},signedUrls:{type:Array,default:()=>[]},onePageEntryNameToFile:{type:Object,default:()=>({})},bgColor:{type:String,default:()=>"#f5f7fa"}},setup(E){return(g,h)=>(p(),w("div",{class:"flex-1 border-1 border-[#e4e7ed] overflow-hidden rounded-md size-full",style:ce({backgroundColor:E.bg})},[E.isLoadDeps?(p(),k(de,{key:0,previewItem:E.compItem,dep:E.dep,signedUrls:E.signedUrls,allDepEntryNameToFile:E.allDepEntryNameToFile,panelType:I(A).FULL},null,8,["previewItem","dep","signedUrls","allDepEntryNameToFile","panelType"])):J("",!0)],4))}}),_t={class:"flex flex-col size-full overflow-auto"},vt={class:"flex flex-1 gap-[10px]"},ht={class:"flex-1 border-[1px] rounded-sm border-[#ccc] p-[5px]"},yt={class:"inline-block"},bt={class:"flex-1 border-[1px] rounded-sm border-[#ccc] p-[5px]"},gt={class:"inline-block"},Ct={class:"text-center"},xt={class:"flex-1 border-[1px] rounded-sm border-[#ccc] p-[5px]"},Et={class:"inline-block"},It={class:"flex"},kt={class:"w-[300px]"},wt={key:0},Vt=S({__name:"index",setup(E){const g=q("callbacks"),h=G(),n=P({}),u=L(()=>h.compDep),r=L(()=>h.onlineCompDep),i=L(()=>{const o={};if(le.keys(r.value).length===0&&h.compDialogType==="EDIT")return o;for(const s in u.value){const m=u.value[s],a={},f=r.value[s];f?f.version!==m.version?(a.type="change",a.selectedVersion=n.value[s]||"",a.versions=[{version:m.version,type:"local"},{version:f.version,type:"online"}]):(a.selectedVersion=m.version,a.type="consistent"):(a.selectedVersion=m.version,a.type="add"),o[s]=a}return o});function x(o,s){n.value[o]=s}function _(){const o=Object.keys(u.value),s=Object.keys(n.value);return s.length===0||o.length!==s.length?!1:Object.values(n.value).every(m=>!!m)}return H(()=>i.value,o=>{for(const s in o){const m=o[s];m.type!=="change"&&(n.value[s]=m.selectedVersion)}},{immediate:!0,deep:!0}),ae(()=>{h.setAffirmCompDep(le.cloneDeep(n.value))}),g.set(M.CHECK_AFFIRM_VERSION,_),(o,s)=>{const m=b("el-descriptions-item"),a=b("el-descriptions"),f=b("Bottom"),T=b("el-icon"),V=b("el-radio"),B=b("el-radio-group"),c=b("el-tag");return p(),w("div",_t,[y("div",vt,[y("div",ht,[y("div",null,[e(a,{title:"本地依赖",column:1,border:"","label-width":"auto"},{default:l(()=>[(p(!0),w(z,null,W(u.value,(d,C)=>(p(),k(m,{key:C},{label:l(()=>[y("div",yt,$(C),1)]),default:l(()=>[F(" "+$(d.version),1)]),_:2},1024))),128))]),_:1})])]),y("div",bt,[e(je,{isEmpty:Object.keys(r.value).length===0},{"empty-content":l(()=>[...s[0]||(s[0]=[y("div",{class:"size-full flex justify-center items-center text-[#999]"},"暂无数据!",-1)])]),default:l(()=>[e(a,{title:"线上依赖",column:1,border:"","label-width":"auto"},{default:l(()=>[(p(!0),w(z,null,W(r.value,(d,C)=>(p(),k(m,{key:C},{label:l(()=>[y("div",gt,$(C),1)]),default:l(()=>[F(" "+$(d.version),1)]),_:2},1024))),128))]),_:1})]),_:1},8,["isEmpty"])])]),y("div",Ct,[e(T,{style:{"font-size":"34px"}},{default:l(()=>[e(f)]),_:1})]),y("div",xt,[e(a,{title:"最终依赖",column:1,border:"","label-width":"auto"},{default:l(()=>[(p(!0),w(z,null,W(i.value,(d,C)=>(p(),k(m,{key:C},{label:l(()=>[y("div",Et,$(C),1)]),default:l(()=>{var U;return[y("div",It,[y("div",kt,[(U=d.versions)!=null&&U.length?(p(),k(B,{key:1,"model-value":d.selectedVersion,onChange:O=>x(C,O),size:"small",class:"ml-[10px]"},{default:l(()=>[(p(!0),w(z,null,W(d.versions,O=>(p(),k(V,{key:O.version,label:O.version},{default:l(()=>[y("span",null,$(O.type==="local"?"本地:":"线上:")+" "+$(O.version),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["model-value","onChange"])):(p(),w("span",wt,$(d.selectedVersion),1))]),y("div",null,[d.type==="consistent"?(p(),k(c,{key:0,type:"info"},{default:l(()=>[...s[1]||(s[1]=[F("版本一致",-1)])]),_:1})):d.type==="change"?(p(),k(c,{key:1,type:"danger"},{default:l(()=>[...s[2]||(s[2]=[F("版本变化,请手动选择最终版本",-1)])]),_:1})):d.type==="add"?(p(),k(c,{key:2,type:"success"},{default:l(()=>[...s[3]||(s[3]=[F("新增依赖",-1)])]),_:1})):J("",!0)])])]}),_:2},1024))),128))]),_:1})])])}}}),Ot=["id"],Rt={class:"custom-style flex w-full justify-start gap-[10px] items-center mb-[2px] mt-[5px] h-[30px]"},Ft={class:"flex-1 overflow-auto"},Pt={class:"flex justify-end mt-[5px]"},Tt=S({__name:"index",emits:["confirmUpload"],setup(E,{emit:g}){const h=g,n=G(),u=ne(new Map);Ue("callbacks",u);const r=P({}),i=P(),x=P([{label:"小窗面板",value:A.MINI},{label:"全屏面板",value:A.FULL}]),_=L(()=>n.previewList.map(c=>{const d=r.value[c.uuid]||A.MINI;let C="";return d===A.MINI&&c.entryUrl?C=c.entryUrl:d===A.FULL&&c.fullEntryUrl&&(C=c.fullEntryUrl),{uuid:c.uuid,entryUrl:C,activeTab:d}})),o=L(()=>n.compDep||{});function s(c){var C;if(!c)return;const d=r.value[c]||A.MINI;(C=u.get(`${M.AFTER_COMP_RENDER_RETRY}_${c}`))==null||C(d)}function m(c){if(!c)return;const d=document.getElementById(c);$e(d)?Ae():Ne(d)}function a(c,d){c.uuid&&(r.value[c.uuid]=d)}function f(c){n.setActiveName(c)}function T(c){n.setCompCarouselIndex(c)}async function V(){var c;for(const d of u.keys())if(d.startsWith(M.GET_COMP_ERROR)&&((c=u.get(d))==null?void 0:c()))return!0;return!1}async function B(c){var N,t,v,D;if(c.start(),!await((N=u.get(M.CHECK_COMP_CONFIG))==null?void 0:N())){n.setActiveName(j.CONFIG),c.end();return}if(await V()){Y.error("请先处理编译错误"),c.end();return}if(!await((t=u.get(M.CHECK_PREVIEW_LIST_FORM))==null?void 0:t())){c.end();return}if(!await((v=u.get(M.CHECK_EXTRA_INFO_FORM))==null?void 0:v())){c.end();return}if(!await((D=u.get(M.CHECK_AFFIRM_VERSION))==null?void 0:D())){n.setActiveName(j.DEPS),c.end();return}h("confirmUpload",{end:c.end})}return H(()=>n.compCarouselIndex,async(c,d)=>{var C;c!==d&&((C=i.value)==null||C.setActiveItem(c))}),H(()=>n.editCompId,async c=>{if(!c)return;const d=await Me({compId:c}),{desc:C,previewConfigs:U,bgColor:O,dep:N}=d.data;n.setExtraInfo({description:C});const t=U.map(v=>({uuid:v.id,desc:v.desc,path:v.path||[],fullPath:v.fullPath||[]}));n.setPreviewCompList(t),n.setCompBgColor(O??"#fff"),n.setOnlineCompDep(N||{})},{immediate:!0}),(c,d)=>{const C=b("el-segmented"),U=b("el-button"),O=b("el-splitter-panel"),N=b("el-badge"),t=b("el-tab-pane"),v=b("el-tabs"),D=b("el-splitter");return p(),k(D,{class:"size-full",layout:"vertical"},{default:l(()=>[e(O,{class:"h-full border-1 border-[#ccc] rounded-sm",size:400,min:400},{default:l(()=>[e(He,{previews:_.value,dep:o.value,bgColor:I(n).compBgColor,ref_key:"compCarouselRef",ref:i,arrow:"always",type:"card","card-scale":.7,onChange:T},{editMode:l(({compItem:R,dep:K,signedUrls:Q,bg:Z,allDepEntryNameToFile:pe,isLoadDeps:me})=>[y("div",{class:"size-full border-1 border-[#ccc] rounded-md flex flex-col items-start bg-[#fff] overflow-hidden",id:R.uuid},[y("div",Rt,[e(C,{"model-value":R.activeTab,onChange:ee=>a(R,ee),options:x.value},null,8,["model-value","onChange","options"]),e(U,{class:"ml-auto",circle:"",icon:"refreshLeft",onClick:ee=>s(R.uuid)},null,8,["onClick"]),ue(e(U,{class:"ml-auto",circle:"",icon:"fullScreen",onClick:ee=>m(R.uuid)},null,8,["onClick"]),[[Re,R.activeTab===I(A).FULL]])]),(p(),k(Fe,null,[(p(),k(Pe(R.activeTab===I(A).MINI?mt:ft),Te(De({compItem:R,dep:K,signedUrls:Q,bg:Z,allDepEntryNameToFile:pe,isLoadDeps:me})),null,16))],1024))],8,Ot)]),_:1},8,["previews","dep","bgColor"])]),_:1}),e(O,{class:"flex flex-col size-full border-1 border-[#ccc] rounded-sm p-[5px]",min:200},{default:l(()=>[y("div",Ft,[e(v,{"model-value":I(n).activeName,class:"h-full",onTabChange:f,type:"border-card"},{default:l(()=>[e(t,{class:"h-full",name:I(j).PREVIEW},{label:l(()=>[e(N,{"is-dot":I(n).previewIsError},{default:l(()=>[...d[0]||(d[0]=[F("预览配置",-1)])]),_:1},8,["is-dot"])]),default:l(()=>[e(ct)]),_:1},8,["name"]),e(t,{class:"h-full",name:I(j).EXTRA},{label:l(()=>[e(N,{"is-dot":I(n).extraIsError},{default:l(()=>[...d[1]||(d[1]=[F("附加信息",-1)])]),_:1},8,["is-dot"])]),default:l(()=>[e(dt,{modelValue:I(n).extraInfo},null,8,["modelValue"])]),_:1},8,["name"]),e(t,{class:"h-full",name:I(j).CONFIG},{label:l(()=>[e(N,{"is-dot":I(n).configIsError},{default:l(()=>[...d[2]||(d[2]=[F("配置检查",-1)])]),_:1},8,["is-dot"])]),default:l(()=>[e(tt)]),_:1},8,["name"]),e(t,{class:"h-full",label:"组件目录",name:I(j).DIR},{default:l(()=>[e(at)]),_:1},8,["name"]),e(t,{class:"h-full",name:I(j).DEPS},{label:l(()=>[e(N,{"is-dot":I(n).compDepIsError},{default:l(()=>[...d[3]||(d[3]=[F("组件依赖",-1)])]),_:1},8,["is-dot"])]),default:l(()=>[e(Vt)]),_:1},8,["name"])]),_:1},8,["model-value"])]),y("div",Pt,[e(Be,null,{default:l(({instance:R,loading:K})=>[e(U,{loading:K,type:"primary",onClick:Q=>B(R)},{default:l(()=>[F($(I(n).compSubmitBtnText),1)]),_:1},8,["loading","onClick"])]),_:1})])]),_:1})]),_:1})}}}),Mt=X(Tt,[["__scopeId","data-v-ff11e7d6"]]);export{Mt as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t}from"./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{_ as t}from"./index.vue_vue_type_script_setup_true_lang-Bw9f5ewL.js";import{d as s,O as a,D as c,G as r,c as n,o as p,b as i,P as m,Q as o,x as _}from"./index-C26Rl450.js";import"./index-DiHk_mns.js";import"./index-ShGF-65v.js";import"./index.vue_vue_type_script_setup_true_lang-B_QtQDll.js";import"./index.vue_vue_type_script_setup_true_lang-BvP8OIHp.js";const d={class:"share-container"},l=s({__name:"index",setup(f){const e=a(m.SHARE)();return o("compListStore",e),o("callbacks",new Map),c(()=>{e.setOperate(["download","preview","collect","terminal"]),e.getCompList()}),r(()=>{e.$reset()}),(x,b)=>(p(),n("div",d,[i(t)]))}}),w=_(l,[["__scopeId","data-v-509b8290"]]);export{w as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as r,bu as c,j as u,A as p,o as m,aE as d,aT as f,u as l,bv as _,aV as i}from"./index-C26Rl450.js";const A=r({__name:"index",setup(x){const s=i(),t=c(),o={modal:!0,appendToBody:!0},a=u(()=>({...o,...t}));function n(e){s&&(s.exposed=e||{},s.exposeProxy=e||{})}return(e,g)=>(m(),p(d(f(l(_),{...a.value,ref:n},e.$slots))))}});export{A as _};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as de,j as Te,
|
|
1
|
+
import{h as de,j as Te,bw as ie,al as Me,bx as Oe,d as Pe,by as Ie,k as Fe,D as He,G as We,A as Ue,o as Ne,w as $e,aa as je,bz as ze,a as Ke}from"./index-C26Rl450.js";var Se={exports:{}},xe;function qe(){return xe||(xe=1,(function(Q,J){(function(Y,K){Q.exports=K()})(globalThis,(()=>(()=>{var Y={4567:function(d,s,o){var h=this&&this.__decorate||function(e,i,a,v){var p,m=arguments.length,u=m<3?i:v===null?v=Object.getOwnPropertyDescriptor(i,a):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(e,i,a,v);else for(var S=e.length-1;S>=0;S--)(p=e[S])&&(u=(m<3?p(u):m>3?p(i,a,u):p(i,a))||u);return m>3&&u&&Object.defineProperty(i,a,u),u},f=this&&this.__param||function(e,i){return function(a,v){i(a,v,e)}};Object.defineProperty(s,"__esModule",{value:!0}),s.AccessibilityManager=void 0;const n=o(9042),l=o(9924),_=o(844),g=o(4725),c=o(2585),t=o(3656);let r=s.AccessibilityManager=class extends _.Disposable{constructor(e,i,a,v){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=v,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let p=0;p<this._terminal.rows;p++)this._rowElements[p]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[p]);if(this._topBoundaryFocusListener=p=>this._handleBoundaryFocus(p,0),this._bottomBoundaryFocusListener=p=>this._handleBoundaryFocus(p,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new l.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((p=>this._handleResize(p.rows)))),this.register(this._terminal.onRender((p=>this._refreshRows(p.start,p.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((p=>this._handleChar(p)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
2
2
|
`)))),this.register(this._terminal.onA11yTab((p=>this._handleTab(p)))),this.register(this._terminal.onKey((p=>this._handleKey(p.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,t.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,_.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(e){for(let i=0;i<e;i++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,i){this._liveRegionDebouncer.refresh(e,i,this._terminal.rows)}_renderRows(e,i){const a=this._terminal.buffer,v=a.lines.length.toString();for(let p=e;p<=i;p++){const m=a.lines.get(a.ydisp+p),u=[],S=(m==null?void 0:m.translateToString(!0,void 0,void 0,u))||"",k=(a.ydisp+p+1).toString(),L=this._rowElements[p];L&&(S.length===0?(L.innerText=" ",this._rowColumns.set(L,[0,1])):(L.textContent=S,this._rowColumns.set(L,u)),L.setAttribute("aria-posinset",k),L.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,i){const a=e.target,v=this._rowElements[i===0?1:this._rowElements.length-2];if(a.getAttribute("aria-posinset")===(i===0?"1":`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==v)return;let p,m;if(i===0?(p=a,m=this._rowElements.pop(),this._rowContainer.removeChild(m)):(p=this._rowElements.shift(),m=a,this._rowContainer.removeChild(p)),p.removeEventListener("focus",this._topBoundaryFocusListener),m.removeEventListener("focus",this._bottomBoundaryFocusListener),i===0){const u=this._createAccessibilityTreeNode();this._rowElements.unshift(u),this._rowContainer.insertAdjacentElement("afterbegin",u)}else{const u=this._createAccessibilityTreeNode();this._rowElements.push(u),this._rowContainer.appendChild(u)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(i===0?-1:1),this._rowElements[i===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var S;if(this._rowElements.length===0)return;const e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error("anchorNode and/or focusNode are null");let i={node:e.anchorNode,offset:e.anchorOffset},a={node:e.focusNode,offset:e.focusOffset};if((i.node.compareDocumentPosition(a.node)&Node.DOCUMENT_POSITION_PRECEDING||i.node===a.node&&i.offset>a.offset)&&([i,a]=[a,i]),i.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(i={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(i.node))return;const v=this._rowElements.slice(-1)[0];if(a.node.compareDocumentPosition(v)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(a={node:v,offset:((S=v.textContent)==null?void 0:S.length)??0}),!this._rowContainer.contains(a.node))return;const p=({node:k,offset:L})=>{const x=k instanceof Text?k.parentNode:k;let w=parseInt(x==null?void 0:x.getAttribute("aria-posinset"),10)-1;if(isNaN(w))return console.warn("row is invalid. Race condition?"),null;const B=this._rowColumns.get(x);if(!B)return console.warn("columns is null. Race condition?"),null;let M=L<B.length?B[L]:B.slice(-1)[0]+1;return M>=this._terminal.cols&&(++w,M=0),{row:w,column:M}},m=p(i),u=p(a);if(m&&u){if(m.row>u.row||m.row===u.row&&m.column>=u.column)throw new Error("invalid range");this._terminal.select(m.column,m.row,(u.row-m.row)*this._terminal.cols-m.column+u.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let i=this._rowContainer.children.length;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};s.AccessibilityManager=r=h([f(1,c.IInstantiationService),f(2,g.ICoreBrowserService),f(3,g.IRenderService)],r)},3614:(d,s)=>{function o(l){return l.replace(/\r?\n/g,"\r")}function h(l,_){return _?"\x1B[200~"+l+"\x1B[201~":l}function f(l,_,g,c){l=h(l=o(l),g.decPrivateModes.bracketedPasteMode&&c.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(l,!0),_.value=""}function n(l,_,g){const c=g.getBoundingClientRect(),t=l.clientX-c.left-10,r=l.clientY-c.top-10;_.style.width="20px",_.style.height="20px",_.style.left=`${t}px`,_.style.top=`${r}px`,_.style.zIndex="1000",_.focus()}Object.defineProperty(s,"__esModule",{value:!0}),s.rightClickHandler=s.moveTextAreaUnderMouseCursor=s.paste=s.handlePasteEvent=s.copyHandler=s.bracketTextForPaste=s.prepareTextForTerminal=void 0,s.prepareTextForTerminal=o,s.bracketTextForPaste=h,s.copyHandler=function(l,_){l.clipboardData&&l.clipboardData.setData("text/plain",_.selectionText),l.preventDefault()},s.handlePasteEvent=function(l,_,g,c){l.stopPropagation(),l.clipboardData&&f(l.clipboardData.getData("text/plain"),_,g,c)},s.paste=f,s.moveTextAreaUnderMouseCursor=n,s.rightClickHandler=function(l,_,g,c,t){n(l,_,g),t&&c.rightClickSelect(l),_.value=c.selectionText,_.select()}},7239:(d,s,o)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ColorContrastCache=void 0;const h=o(1505);s.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(f,n,l){this._css.set(f,n,l)}getCss(f,n){return this._css.get(f,n)}setColor(f,n,l){this._color.set(f,n,l)}getColor(f,n){return this._color.get(f,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(d,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.addDisposableDomListener=void 0,s.addDisposableDomListener=function(o,h,f,n){o.addEventListener(h,f,n);let l=!1;return{dispose:()=>{l||(l=!0,o.removeEventListener(h,f,n))}}}},3551:function(d,s,o){var h=this&&this.__decorate||function(r,e,i,a){var v,p=arguments.length,m=p<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,i):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(r,e,i,a);else for(var u=r.length-1;u>=0;u--)(v=r[u])&&(m=(p<3?v(m):p>3?v(e,i,m):v(e,i))||m);return p>3&&m&&Object.defineProperty(e,i,m),m},f=this&&this.__param||function(r,e){return function(i,a){e(i,a,r)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Linkifier=void 0;const n=o(3656),l=o(8460),_=o(844),g=o(2585),c=o(4725);let t=s.Linkifier=class extends _.Disposable{get currentLink(){return this._currentLink}constructor(r,e,i,a,v){super(),this._element=r,this._mouseService=e,this._renderService=i,this._bufferService=a,this._linkProviderService=v,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new l.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new l.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,_.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,_.toDisposable)((()=>{var p;this._lastMouseEvent=void 0,(p=this._activeProviderReplies)==null||p.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(r){this._lastMouseEvent=r;const e=this._positionFromMouseEvent(r,this._element,this._mouseService);if(!e)return;this._isMouseOut=!1;const i=r.composedPath();for(let a=0;a<i.length;a++){const v=i[a];if(v.classList.contains("xterm"))break;if(v.classList.contains("xterm-hover"))return}this._lastBufferCell&&e.x===this._lastBufferCell.x&&e.y===this._lastBufferCell.y||(this._handleHover(e),this._lastBufferCell=e)}_handleHover(r){if(this._activeLine!==r.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(r,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,r)||(this._clearCurrentLink(),this._askForLink(r,!0))}_askForLink(r,e){var a,v;this._activeProviderReplies&&e||((a=this._activeProviderReplies)==null||a.forEach((p=>{p==null||p.forEach((m=>{m.link.dispose&&m.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=r.y);let i=!1;for(const[p,m]of this._linkProviderService.linkProviders.entries())e?(v=this._activeProviderReplies)!=null&&v.get(p)&&(i=this._checkLinkProviderResult(p,r,i)):m.provideLinks(r.y,(u=>{var k,L;if(this._isMouseOut)return;const S=u==null?void 0:u.map((x=>({link:x})));(k=this._activeProviderReplies)==null||k.set(p,S),i=this._checkLinkProviderResult(p,r,i),((L=this._activeProviderReplies)==null?void 0:L.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(r.y,this._activeProviderReplies)}))}_removeIntersectingLinks(r,e){const i=new Set;for(let a=0;a<e.size;a++){const v=e.get(a);if(v)for(let p=0;p<v.length;p++){const m=v[p],u=m.link.range.start.y<r?0:m.link.range.start.x,S=m.link.range.end.y>r?this._bufferService.cols:m.link.range.end.x;for(let k=u;k<=S;k++){if(i.has(k)){v.splice(p--,1);break}i.add(k)}}}}_checkLinkProviderResult(r,e,i){var p;if(!this._activeProviderReplies)return i;const a=this._activeProviderReplies.get(r);let v=!1;for(let m=0;m<r;m++)this._activeProviderReplies.has(m)&&!this._activeProviderReplies.get(m)||(v=!0);if(!v&&a){const m=a.find((u=>this._linkAtPosition(u.link,e)));m&&(i=!0,this._handleNewLink(m))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!i)for(let m=0;m<this._activeProviderReplies.size;m++){const u=(p=this._activeProviderReplies.get(m))==null?void 0:p.find((S=>this._linkAtPosition(S.link,e)));if(u){i=!0,this._handleNewLink(u);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(r){if(!this._currentLink)return;const e=this._positionFromMouseEvent(r,this._element,this._mouseService);e&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,e)&&this._currentLink.link.activate(r,this._currentLink.link.text)}_clearCurrentLink(r,e){this._currentLink&&this._lastMouseEvent&&(!r||!e||this._currentLink.link.range.start.y>=r&&this._currentLink.link.range.end.y<=e)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,_.disposeArray)(this._linkCacheDisposables))}_handleNewLink(r){if(!this._lastMouseEvent)return;const e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._linkAtPosition(r.link,e)&&(this._currentLink=r,this._currentLink.state={decorations:{underline:r.link.decorations===void 0||r.link.decorations.underline,pointerCursor:r.link.decorations===void 0||r.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,r.link,this._lastMouseEvent),r.link.decorations={},Object.defineProperties(r.link.decorations,{pointerCursor:{get:()=>{var i,a;return(a=(i=this._currentLink)==null?void 0:i.state)==null?void 0:a.decorations.pointerCursor},set:i=>{var a;(a=this._currentLink)!=null&&a.state&&this._currentLink.state.decorations.pointerCursor!==i&&(this._currentLink.state.decorations.pointerCursor=i,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",i))}},underline:{get:()=>{var i,a;return(a=(i=this._currentLink)==null?void 0:i.state)==null?void 0:a.decorations.underline},set:i=>{var a,v,p;(a=this._currentLink)!=null&&a.state&&((p=(v=this._currentLink)==null?void 0:v.state)==null?void 0:p.decorations.underline)!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(r.link,i))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((i=>{if(!this._currentLink)return;const a=i.start===0?0:i.start+1+this._bufferService.buffer.ydisp,v=this._bufferService.buffer.ydisp+1+i.end;if(this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=v&&(this._clearCurrentLink(a,v),this._lastMouseEvent)){const p=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);p&&this._askForLink(p,!1)}}))))}_linkHover(r,e,i){var a;(a=this._currentLink)!=null&&a.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!0),this._currentLink.state.decorations.pointerCursor&&r.classList.add("xterm-cursor-pointer")),e.hover&&e.hover(i,e.text)}_fireUnderlineEvent(r,e){const i=r.range,a=this._bufferService.buffer.ydisp,v=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-a-1,i.end.x,i.end.y-a-1,void 0);(e?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(v)}_linkLeave(r,e,i){var a;(a=this._currentLink)!=null&&a.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!1),this._currentLink.state.decorations.pointerCursor&&r.classList.remove("xterm-cursor-pointer")),e.leave&&e.leave(i,e.text)}_linkAtPosition(r,e){const i=r.range.start.y*this._bufferService.cols+r.range.start.x,a=r.range.end.y*this._bufferService.cols+r.range.end.x,v=e.y*this._bufferService.cols+e.x;return i<=v&&v<=a}_positionFromMouseEvent(r,e,i){const a=i.getCoords(r,e,this._bufferService.cols,this._bufferService.rows);if(a)return{x:a[0],y:a[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(r,e,i,a,v){return{x1:r,y1:e,x2:i,y2:a,cols:this._bufferService.cols,fg:v}}};s.Linkifier=t=h([f(1,c.IMouseService),f(2,c.IRenderService),f(3,g.IBufferService),f(4,c.ILinkProviderService)],t)},9042:(d,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.tooMuchOutput=s.promptLabel=void 0,s.promptLabel="Terminal input",s.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(d,s,o){var h=this&&this.__decorate||function(c,t,r,e){var i,a=arguments.length,v=a<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,r):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(c,t,r,e);else for(var p=c.length-1;p>=0;p--)(i=c[p])&&(v=(a<3?i(v):a>3?i(t,r,v):i(t,r))||v);return a>3&&v&&Object.defineProperty(t,r,v),v},f=this&&this.__param||function(c,t){return function(r,e){t(r,e,c)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OscLinkProvider=void 0;const n=o(511),l=o(2585);let _=s.OscLinkProvider=class{constructor(c,t,r){this._bufferService=c,this._optionsService=t,this._oscLinkService=r}provideLinks(c,t){var S;const r=this._bufferService.buffer.lines.get(c-1);if(!r)return void t(void 0);const e=[],i=this._optionsService.rawOptions.linkHandler,a=new n.CellData,v=r.getTrimmedLength();let p=-1,m=-1,u=!1;for(let k=0;k<v;k++)if(m!==-1||r.hasContent(k)){if(r.loadCell(k,a),a.hasExtendedAttrs()&&a.extended.urlId){if(m===-1){m=k,p=a.extended.urlId;continue}u=a.extended.urlId!==p}else m!==-1&&(u=!0);if(u||m!==-1&&k===v-1){const L=(S=this._oscLinkService.getLinkData(p))==null?void 0:S.uri;if(L){const x={start:{x:m+1,y:c},end:{x:k+(u||k!==v-1?0:1),y:c}};let w=!1;if(!(i!=null&&i.allowNonHttpProtocols))try{const B=new URL(L);["http:","https:"].includes(B.protocol)||(w=!0)}catch{w=!0}w||e.push({text:L,range:x,activate:(B,M)=>i?i.activate(B,M,x):g(0,M),hover:(B,M)=>{var I;return(I=i==null?void 0:i.hover)==null?void 0:I.call(i,B,M,x)},leave:(B,M)=>{var I;return(I=i==null?void 0:i.leave)==null?void 0:I.call(i,B,M,x)}})}u=!1,a.hasExtendedAttrs()&&a.extended.urlId?(m=k,p=a.extended.urlId):(m=-1,p=-1)}}t(e)}};function g(c,t){if(confirm(`Do you want to navigate to ${t}?
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as g,T as A,B as L}from"./index-
|
|
1
|
+
import{_ as g,T as A,B as L}from"./index-DiHk_mns.js";import{h as k,a0 as P,a1 as M,d as x,i as N,a2 as S,A as f,o as m,r as c,a3 as I,w as r,b as n,a4 as h,f as C,a5 as v,k as b,a6 as z,c as E,F as B,a7 as D,u as O,t as V,R as G,a8 as $,a9 as q,n as K,a as R}from"./index-C26Rl450.js";function T(){const _=k(!0);return P(()=>{_.value=!0}),M(()=>{_.value=!1}),_}const j=x({__name:"index",setup(_){const t=N({keyword:""}),s=v("compListStore"),l=T(),i=()=>{s.setQuery({...s.query,keyword:t.keyword})},a=()=>{t.keyword="",s.setQuery({...s.query,keyword:""})};return S(()=>s.query.keyword,(u,e)=>{u!==e&&l.value&&s.getCompList()}),(u,e)=>{const o=c("el-input"),p=c("el-form-item"),d=c("el-button"),y=c("el-form");return m(),f(y,{inline:!0,model:t,"label-width":"auto",onSubmit:e[1]||(e[1]=I(()=>{},["prevent"]))},{default:r(()=>[n(p,{label:"关键词:"},{default:r(()=>[n(o,{modelValue:t.keyword,"onUpdate:modelValue":e[0]||(e[0]=w=>t.keyword=w),modelModifiers:{trim:!0},placeholder:"组件名/组件描述",onKeyup:h(i,["enter"])},null,8,["modelValue"])]),_:1}),n(p,null,{default:r(()=>[n(d,{type:"primary",onClick:i},{default:r(()=>[...e[2]||(e[2]=[C("查询",-1)])]),_:1}),n(d,{type:"primary",onClick:a},{default:r(()=>[...e[3]||(e[3]=[C("重置",-1)])]),_:1})]),_:1})]),_:1},8,["model"])}}}),F={class:"flex justify-start mb-[5px]"},Q=x({__name:"index",setup(_){const t=v("compListStore"),s=T();function l(a){return a.value===t.selectTag}const i=a=>{t.setSelectTag(a.value)};return S(()=>t.selectTag,(a,u)=>{!a||a===u||s.value&&t.getCompList()}),b(()=>{t.selectTag&&z(t.selectTag)}),(a,u)=>{const e=c("el-button");return m(),E("div",F,[(m(!0),E(B,null,D(O(t).tagGroup,o=>(m(),f(e,{type:l(o)?"primary":"default",text:"",key:o.label,value:o.value,onClick:p=>i(o)},{default:r(()=>[C(V(o.label),1)]),_:2},1032,["type","value","onClick"]))),128))])}}}),U={class:"bg-[#fff] rounded-sm p-[10px]"},Y=x({__name:"index",setup(_){const t=v("callbacks"),s=v("compListStore"),l=k(0),i=k("");function a(){l.value=0}async function u(e){return await s.getCompDetail(e||"")}return b(()=>{const e=l.value;e&&q(e.toString())}),t.set(G.OPEN_COMP_TERMINAL,e=>{const o=Number($());l.value=Math.max(o,500),i.value=e}),(e,o)=>{const p=c("el-splitter-panel"),d=c("el-splitter");return m(),f(d,null,{default:r(()=>[n(p,{min:400,class:"h-full min-w-[400px] flex flex-col gap-[10px]"},{default:r(()=>[R("div",U,[n(j),n(Q)]),n(g,{class:"flex-1"})]),_:1}),l.value?(m(),f(p,{key:0,size:l.value,"onUpdate:size":o[0]||(o[0]=y=>l.value=y),collapsible:""},{default:r(()=>[n(L,{title:"依赖安装",onClose:a},{default:r(()=>[n(A,{compId:i.value,getCompDetail:u},null,8,["compId"])]),_:1})]),_:1},8,["size"])):K("",!0)]),_:1})}}});export{Y as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as o,h as s,ao as r}from"./index-
|
|
1
|
+
import{d as o,h as s,ao as r}from"./index-C26Rl450.js";const i=o({__name:"index",setup(l){const e=s(!1);function n(){e.value=!0}function a(){e.value=!1}return(t,u)=>r(t.$slots,"default",{instance:{start:n,end:a},loading:e.value})}});export{i as _};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var pt=Object.defineProperty;var gt=(t,e,n)=>e in t?pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var A=(t,e,n)=>gt(t,typeof e!="symbol"?e+"":e,n);import{H as Y}from"./atom-one-dark-
|
|
1
|
+
var pt=Object.defineProperty;var gt=(t,e,n)=>e in t?pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var A=(t,e,n)=>gt(t,typeof e!="symbol"?e+"":e,n);import{H as Y}from"./atom-one-dark-C3G4SyfT.js";import{d as qe,h as ae,G as Dt,a2 as ft,a0 as mt,c as Ft,o as Ue,a as oe,ao as Ze,B as bt,p as kt,K as Et,k as Ct,A as At,w as xt,ax as wt,n as yt,aw as Bt}from"./index-C26Rl450.js";function Ae(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var X=Ae();function Ge(t){X=t}var te={exec:()=>null};function k(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(B.caret,"$1"),n=n.replace(r,o),s},getRegex:()=>new RegExp(n,e)};return s}var B={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},St=/^(?:[ \t]*(?:\n|$))+/,Tt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,vt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,re=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_t=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,xe=/(?:[*+-]|\d{1,9}[.)])/,je=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Qe=k(je).replace(/bull/g,xe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Rt=k(je).replace(/bull/g,xe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),we=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Nt=/^[^\n]+/,ye=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,$t=k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ye).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Lt=k(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xe).getRegex(),pe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Be=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,It=k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Be).replace("tag",pe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xe=k(we).replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),Ot=k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Xe).getRegex(),Se={blockquote:Ot,code:Tt,def:$t,fences:vt,heading:_t,hr:re,html:It,lheading:Qe,list:Lt,newline:St,paragraph:Xe,table:te,text:Nt},Ne=k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),zt={...Se,lheading:Rt,table:Ne,paragraph:k(we).replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ne).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex()},Mt={...Se,html:k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Be).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:te,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(we).replace("hr",re).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",Qe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Pt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ht=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,We=/^( {2,}|\\)\n(?!\s*$)/,qt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ge=/[\p{P}\p{S}]/u,Te=/[\s\p{P}\p{S}]/u,Ke=/[^\s\p{P}\p{S}]/u,Ut=k(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Te).getRegex(),Ve=/(?!~)[\p{P}\p{S}]/u,Zt=/(?!~)[\s\p{P}\p{S}]/u,Gt=/(?:[^\s\p{P}\p{S}]|~)/u,jt=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,Ye=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Qt=k(Ye,"u").replace(/punct/g,ge).getRegex(),Xt=k(Ye,"u").replace(/punct/g,Ve).getRegex(),Je="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Wt=k(Je,"gu").replace(/notPunctSpace/g,Ke).replace(/punctSpace/g,Te).replace(/punct/g,ge).getRegex(),Kt=k(Je,"gu").replace(/notPunctSpace/g,Gt).replace(/punctSpace/g,Zt).replace(/punct/g,Ve).getRegex(),Vt=k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ke).replace(/punctSpace/g,Te).replace(/punct/g,ge).getRegex(),Yt=k(/\\(punct)/,"gu").replace(/punct/g,ge).getRegex(),Jt=k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),en=k(Be).replace("(?:-->|$)","-->").getRegex(),tn=k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",en).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ce=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,nn=k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ce).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),et=k(/^!?\[(label)\]\[(ref)\]/).replace("label",ce).replace("ref",ye).getRegex(),tt=k(/^!?\[(ref)\](?:\[\])?/).replace("ref",ye).getRegex(),rn=k("reflink|nolink(?!\\()","g").replace("reflink",et).replace("nolink",tt).getRegex(),ve={_backpedal:te,anyPunctuation:Yt,autolink:Jt,blockSkip:jt,br:We,code:Ht,del:te,emStrongLDelim:Qt,emStrongRDelimAst:Wt,emStrongRDelimUnd:Vt,escape:Pt,link:nn,nolink:tt,punctuation:Ut,reflink:et,reflinkSearch:rn,tag:tn,text:qt,url:te},sn={...ve,link:k(/^!?\[(label)\]\((.*?)\)/).replace("label",ce).getRegex(),reflink:k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ce).getRegex()},be={...ve,emStrongRDelimAst:Kt,emStrongLDelim:Xt,url:k(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},ln={...be,br:k(We).replace("{2,}","*").getRegex(),text:k(be.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},le={normal:Se,gfm:zt,pedantic:Mt},J={normal:ve,gfm:be,breaks:ln,pedantic:sn},an={"&":"&","<":"<",">":">",'"':""","'":"'"},$e=t=>an[t];function I(t,e){if(e){if(B.escapeTest.test(t))return t.replace(B.escapeReplace,$e)}else if(B.escapeTestNoEncode.test(t))return t.replace(B.escapeReplaceNoEncode,$e);return t}function Le(t){try{t=encodeURI(t).replace(B.percentDecode,"%")}catch{return null}return t}function Ie(t,e){var i;let n=t.replace(B.findPipe,(o,a,u)=>{let l=!1,c=a;for(;--c>=0&&u[c]==="\\";)l=!l;return l?"|":" |"}),s=n.split(B.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!((i=s.at(-1))!=null&&i.trim())&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(B.slashPipe,"|");return s}function ee(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s&&t.charAt(s-r-1)===e;)r++;return t.slice(0,s-r)}function on(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function Oe(t,e,n,s,r){let i=e.href,o=e.title||null,a=t[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let u={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,u}function un(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
|
|
3
3
|
`).map(i=>{let o=i.match(n.other.beginningSpace);if(o===null)return i;let[a]=o;return a.length>=r.length?i.slice(r.length):i}).join(`
|
|
4
4
|
`)}var de=class{constructor(t){A(this,"options");A(this,"rules");A(this,"lexer");this.options=t||X}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:ee(n,`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aW as E,a_ as H}from"./index-C26Rl450.js";async function $(p,l){return E("/__remote__/api/v1/email/sendCode",{method:"POST",headers:{"Content-Type":"application/json"},data:p})}var g={exports:{}},x={exports:{}},_;function O(){return _||(_=1,(function(){var p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l={rotl:function(f,i){return f<<i|f>>>32-i},rotr:function(f,i){return f<<32-i|f>>>i},endian:function(f){if(f.constructor==Number)return l.rotl(f,8)&16711935|l.rotl(f,24)&4278255360;for(var i=0;i<f.length;i++)f[i]=l.endian(f[i]);return f},randomBytes:function(f){for(var i=[];f>0;f--)i.push(Math.floor(Math.random()*256));return i},bytesToWords:function(f){for(var i=[],c=0,a=0;c<f.length;c++,a+=8)i[a>>>5]|=f[c]<<24-a%32;return i},wordsToBytes:function(f){for(var i=[],c=0;c<f.length*32;c+=8)i.push(f[c>>>5]>>>24-c%32&255);return i},bytesToHex:function(f){for(var i=[],c=0;c<f.length;c++)i.push((f[c]>>>4).toString(16)),i.push((f[c]&15).toString(16));return i.join("")},hexToBytes:function(f){for(var i=[],c=0;c<f.length;c+=2)i.push(parseInt(f.substr(c,2),16));return i},bytesToBase64:function(f){for(var i=[],c=0;c<f.length;c+=3)for(var a=f[c]<<16|f[c+1]<<8|f[c+2],h=0;h<4;h++)c*8+h*6<=f.length*8?i.push(p.charAt(a>>>6*(3-h)&63)):i.push("=");return i.join("")},base64ToBytes:function(f){f=f.replace(/[^A-Z0-9+\/]/ig,"");for(var i=[],c=0,a=0;c<f.length;a=++c%4)a!=0&&i.push((p.indexOf(f.charAt(c-1))&Math.pow(2,-2*a+8)-1)<<a*2|p.indexOf(f.charAt(c))>>>6-a*2);return i}};x.exports=l})()),x.exports}var B,S;function C(){if(S)return B;S=1;var p={utf8:{stringToBytes:function(l){return p.bin.stringToBytes(unescape(encodeURIComponent(l)))},bytesToString:function(l){return decodeURIComponent(escape(p.bin.bytesToString(l)))}},bin:{stringToBytes:function(l){for(var f=[],i=0;i<l.length;i++)f.push(l.charCodeAt(i)&255);return f},bytesToString:function(l){for(var f=[],i=0;i<l.length;i++)f.push(String.fromCharCode(l[i]));return f.join("")}}};return B=p,B}/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
<script src="/dist/js/vue3-sfc-loader.js"></script>
|
|
10
10
|
<script src="/dist/font/iconfont.js"></script>
|
|
11
11
|
|
|
12
|
-
<script type="module" crossorigin src="/dist/assets/index-
|
|
13
|
-
<link rel="stylesheet" crossorigin href="/dist/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/dist/assets/index-C26Rl450.js"></script>
|
|
13
|
+
<link rel="stylesheet" crossorigin href="/dist/assets/index-BVsVzL5c.css">
|
|
14
14
|
</head>
|
|
15
15
|
|
|
16
16
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comp-hub",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"bin": {
|
|
6
6
|
"comphub": "bin/cli.js"
|
|
@@ -12,7 +12,18 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"esbuild": "^0.25.9"
|
|
14
14
|
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"vue",
|
|
17
|
+
"vue-components",
|
|
18
|
+
"component-hub",
|
|
19
|
+
"component-share",
|
|
20
|
+
"vue-component-platform",
|
|
21
|
+
"component-library",
|
|
22
|
+
"vue-ui",
|
|
23
|
+
"component-sharing",
|
|
24
|
+
"vue-components-share"
|
|
25
|
+
],
|
|
15
26
|
"volta": {
|
|
16
27
|
"node": "22.19.0"
|
|
17
28
|
}
|
|
18
|
-
}
|
|
29
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e}from"./index.vue_vue_type_script_setup_true_lang-lxfAk1Lj.js";import{d as a,c as o,o as t,b as s,x as n}from"./index-DniNqRWl.js";const c={class:"terminal-container"},_=a({__name:"index",setup(r){return(d,i)=>(t(),o("div",c,[s(e)]))}}),f=n(_,[["__scopeId","data-v-45a9da26"]]);export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as pe}from"./index-Bgx8NSCi.js";import{d as L,c as V,o as d,a as y,t as N,A as w,r as b,F as z,ao as ne,n as J,w as e,b as t,u as E,ap as me,f as T,x as Y,h as D,D as fe,T as G,j as U,k as oe,a2 as B,a5 as X,R as A,aq as _e,ar as ve,as as ye,E as W,at as he,au as be,ag as ge,al as Ce,am as xe,M as Ie,an as Ee,B as te,i as ae,av as M,G as ke,aw as we,ax as Ve,ay as se,N as re,az as le,a7 as K,aA as H,aB as Oe,Z as ie,aC as Re,aD as Pe,X as Te,Y as De,$ as Fe,Q as $e}from"./index-DniNqRWl.js";import{G as Ne,b as ue,E as Ae,c as Me}from"./index-DbQbVPgg.js";import{_ as Ue}from"./index.vue_vue_type_script_setup_true_lang-BgvR8MEN.js";const Le={class:"flex items-baseline"},je={class:"w-[120px] flex items-center"},Se={class:"flex-1 flex items-center"},He={class:"text-error"},Be=L({__name:"CheckItem",props:{label:{},status:{},errorText:{},showRetry:{type:Boolean},showIcon:{type:Boolean}},emits:["retry"],setup(I,{emit:g}){const v=g,n=()=>{v("retry")};return(u,r)=>{const i=b("el-button"),x=b("el-icon");return d(),V("div",Le,[y("div",je,N(u.label),1),y("div",Se,[u.status.loading?(d(),w(i,{key:0,link:"",loading:u.status.loading},null,8,["loading"])):u.status.value?(d(),V(z,{key:1},[ne(u.$slots,"success",{},()=>[y("span",null,N(u.status.value),1)],!0),u.showIcon?(d(),w(x,{key:0,class:"is-ok ml-2"},{default:e(()=>[t(E(me))]),_:1})):J("",!0)],64)):(d(),V(z,{key:2},[y("span",He,[ne(u.$slots,"error",{},()=>[T(N(u.errorText||"内容有误!"),1)],!0)]),u.showRetry?(d(),w(i,{key:0,plain:"",onClick:n},{default:e(()=>[...r[0]||(r[0]=[T(" 生成 ",-1)])]),_:1})):J("",!0)],64))])])}}}),ee=Y(Be,[["__scopeId","data-v-d7f6835b"]]),ze={class:"version-input"},Je=L({__name:"VersionInput",props:{initialVersion:{},disabled:{type:Boolean}},emits:["confirm"],setup(I,{emit:g}){const v=I,n=g,u=D(""),r=D(""),i=D("");fe(()=>{u.value=v.initialVersion.major,r.value=v.initialVersion.minor,i.value=v.initialVersion.patch});function x(){n("confirm",{major:u.value,minor:r.value,patch:i.value})}return(f,l)=>{const s=b("el-input"),p=b("el-button");return d(),V("div",ze,[t(s,{modelValue:u.value,"onUpdate:modelValue":l[0]||(l[0]=o=>u.value=o),style:{width:"60px"},min:0,type:"number"},null,8,["modelValue"]),l[4]||(l[4]=y("span",{class:"separator"},".",-1)),t(s,{modelValue:r.value,"onUpdate:modelValue":l[1]||(l[1]=o=>r.value=o),style:{width:"60px"},min:0,type:"number"},null,8,["modelValue"]),l[5]||(l[5]=y("span",{class:"separator"},".",-1)),t(s,{modelValue:i.value,"onUpdate:modelValue":l[2]||(l[2]=o=>i.value=o),style:{width:"60px"},min:0,type:"number"},null,8,["modelValue"]),t(p,{style:{"margin-left":"8px"},onClick:x},{default:e(()=>[...l[3]||(l[3]=[T("确认",-1)])]),_:1})])}}}),Ge=Y(Je,[["__scopeId","data-v-1a77fb6c"]]),Ke={class:"size-full flex flex-col gap-2 overflow-auto config-container"},We={key:0,class:"flex items-center"},Ye=L({__name:"index",setup(I){const g=G(),v=D(!0),n=D({major:"",minor:"",patch:""}),u=X("callbacks"),r=D({entryIndex:{loading:!0,value:""},compHash:{loading:!0,value:""},compJsonIsOk:{loading:!0,value:""}}),i=U(()=>{var o;return(o=g.selectedFolder)==null?void 0:o.path}),x=U(()=>Object.values(r.value).every(o=>o.value)),f=async()=>{if(i.value)try{await ye({compPath:i.value}),W.success("生成组件指纹成功"),l()}catch(o){console.error(o)}},l=async()=>{if(!i.value)return!1;Object.keys(r.value).forEach(o=>{r.value[o]={loading:!0,value:""}});try{const m=(await he({compPath:i.value})).data;if(m)return r.value.entryIndex={loading:!1,value:m.entryIndex},r.value.compHash={loading:!1,value:m.compHash},r.value.compJsonIsOk={loading:!1,value:m.compJsonIsOk},m.compJsonIsOk&&s(m.compJsonIsOk),!!(m.entryIndex&&m.compHash&&m.compJsonIsOk)}catch(o){return console.error(o),!1}finally{v.value=!1}},s=o=>{const m=JSON.parse(o),[F,R,c]=m.version.split(".");n.value={major:F,minor:R,patch:c}},p=async({major:o,minor:m,patch:F})=>{if(i.value){v.value=!0;try{const R=`${o}.${m}.${F}`;await be({compPath:i.value,version:R}),W.success("修改版本号成功"),l()}catch(R){console.error(R)}finally{v.value=!1}}};return oe(()=>{i.value&&l()}),B(()=>r.value,o=>{const m={entryIndex:o.entryIndex.value,compHash:o.compHash.value,compJsonIsOk:o.compJsonIsOk.value};g.setConfigStatus(m)},{immediate:!0,deep:!0}),u.set(A.CHECK_COMP_CONFIG,l),(o,m)=>{const F=ve("loading");return _e((d(),V("div",Ke,[t(ee,{label:"入口文件:",status:r.value.entryIndex,showIcon:!0,"error-text":"缺少入口文件!"},null,8,["status"]),t(ee,{label:"组件指纹:",status:r.value.compHash,onRetry:f,"error-text":"缺少组件指纹文件!","show-retry":!r.value.compHash.value,showIcon:!0},null,8,["status","show-retry"]),x.value?(d(),V("div",We,[m[0]||(m[0]=y("div",{class:"w-[120px]"},"本地版本号:",-1)),t(Ge,{"initial-version":n.value,onConfirm:p,disabled:v.value},null,8,["initial-version","disabled"])])):J("",!0),t(ee,{label:"comp.json内容:",status:r.value.compJsonIsOk,"show-icon":!0,"error-text":"comp.json文件内容有误!"},{success:e(()=>[t(pe,{code:r.value.compJsonIsOk.value},null,8,["code"])]),_:1},8,["status"])])),[[F,v.value]])}}}),Xe=Y(Ye,[["__scopeId","data-v-21953d50"]]),qe={class:"size-full overflow-auto tree-container"},Qe={class:"flex items-center gap-[50px]"},Ze=L({__name:"index",setup(I){const g={children:"children",label:"name"},v=G(),n=D([]),u=U(()=>{var r;return(r=v.selectedFolder)==null?void 0:r.path});return B(()=>v.directory,r=>{n.value=te.cloneDeep(r)},{deep:!0,immediate:!0}),oe(async()=>{var o,m,F;if(!u.value||(o=v.directory)!=null&&o.length)return;const r=await ge({compPath:u.value}),i=await Ce(),x=await xe(),{srcPath:f}=i.data,{pathSeparator:l}=x.data,s=(m=u.value)==null?void 0:m.replace(Ie.dirname,"").replaceAll("/",l),p=Ee(r.data||[],R=>(R.path=R.path.replace(`${f}${l}${s}`,""),R));(F=p.children)!=null&&F.length&&v.setDirectory(p.children)}),(r,i)=>{const x=b("View"),f=b("el-icon"),l=b("router-link"),s=b("el-tree");return d(),V("div",qe,[t(s,{data:n.value,props:g},{default:e(({node:p,data:o})=>[y("div",Qe,[y("span",null,N(p.label),1),p.label==="README.md"?(d(),w(l,{key:0,to:{name:"mdPreview",query:{mdPath:o==null?void 0:o.path,compPath:u.value}},target:"_blank",class:"flex"},{default:e(()=>[t(f,null,{default:e(()=>[t(x)]),_:1})]),_:1},8,["to"])):J("",!0)])]),_:1},8,["data"])])}}}),et=L({__name:"PreviewItem",props:{modelValue:{},index:{}},emits:["update:modelValue"],setup(I,{expose:g,emit:v}){const n=G(),u=X("callbacks"),r=v,i=I,x=D({...i.modelValue}),f=D(),l=U(()=>n.previewList.findIndex(a=>a.uuid===i.modelValue.uuid)),s=U(()=>{var a;return(a=n.selectedFolder)==null?void 0:a.path}),p=ae({path:[{required:!0,message:"请选择预览文件",trigger:"change"}],desc:[{required:!0,message:"请填写备注说明",trigger:"blur"}]}),o=U(()=>{const a=JSON.parse(JSON.stringify(n.directory));return R(a),a}),m={value:"path",label:"name"};function F(a){r("update:modelValue",{...i.modelValue,desc:a})}function R(a){Array.isArray(a)&&a.forEach(C=>{C.disabled=C.type==="file"&&!C.name.endsWith(".vue"),Array.isArray(C.children)&&C.children.length>0&&R(C.children)})}function c(){n.delPreviewCompItemByUuid(i.modelValue.uuid)}async function _(a){r("update:modelValue",{...i.modelValue,path:a}),f.value&&(await Ve(),f.value.validateField("path"))}async function h(a){r("update:modelValue",{...i.modelValue,fullPath:a})}function P(){const a=n.previewList.findIndex(C=>C.uuid===i.modelValue.uuid);n.setCompCarouselIndex(a)}function j(){var a;return(a=f.value)==null?void 0:a.validate()}async function k(){var O;if(!((O=i.modelValue.path)!=null&&O.length)){x.value.entryUrl="",r("update:modelValue",{...x.value});return}const a=se((s==null?void 0:s.value)||"",i.modelValue.path),C=a?re+"/"+a+"?v="+le():"";x.value.entryUrl=C,r("update:modelValue",{...x.value})}async function $(){const a=se((s==null?void 0:s.value)||"",i.modelValue.fullPath||[]),C=a?re+"/"+a+"?v="+le():"";x.value.fullEntryUrl=C,r("update:modelValue",{...x.value})}return u.set(`${A.AFTER_COMP_RENDER_RETRY}_${i.modelValue.uuid}`,a=>{var C,O;if(a===M.MINI&&((C=i.modelValue.path)!=null&&C.length)){k();return}if(a===M.FULL&&((O=i.modelValue.fullPath)!=null&&O.length)){$();return}}),B(()=>i.modelValue,a=>{x.value={...a}},{deep:!0,immediate:!0}),B(()=>i.modelValue.path,async(a,C)=>{a!==C&&await k()},{immediate:!0}),B(()=>i.modelValue.fullPath,async(a,C)=>{a!==C&&await $()},{immediate:!0}),ke(()=>{u.delete(`${A.AFTER_COMP_RENDER_RETRY}_${i.modelValue.uuid}`)}),g({validateForm:j}),(a,C)=>{const O=b("el-cascader"),S=b("el-form-item"),q=b("el-input"),Q=b("el-button"),Z=b("el-form");return d(),V("div",{class:we(["cursor-pointer w-full p-[5px] rounded-sm overflow-auto border-1 border-[#ccc]",{active:E(n).compCarouselIndex===l.value}]),onClick:P},[t(Z,{ref_key:"ruleFormRef",ref:f,model:a.modelValue,rules:p,"label-width":"130px"},{default:e(()=>[t(S,{label:"小窗预览文件:",prop:a.index===0?"path":""},{default:e(()=>[t(O,{"model-value":a.modelValue.path,options:o.value,props:m,placeholder:"请选择预览文件",onChange:_,clearable:a.index!==0},null,8,["model-value","options","clearable"])]),_:1},8,["prop"]),t(S,{label:"全屏预览文件:",prop:"fullPath"},{default:e(()=>[t(O,{"model-value":a.modelValue.fullPath,options:o.value,props:m,placeholder:"请选择预览文件",onChange:h,clearable:""},null,8,["model-value","options"])]),_:1}),t(S,{label:"备注说明:",prop:"desc"},{default:e(()=>[t(q,{"model-value":a.modelValue.desc,type:"textarea",onInput:F},null,8,["model-value"])]),_:1}),t(S,null,{default:e(()=>[t(Q,{type:"danger",onClick:c},{default:e(()=>[...C[0]||(C[0]=[T("删除",-1)])]),_:1})]),_:1})]),_:1},8,["model","rules"])],2)}}}),tt=Y(et,[["__scopeId","data-v-0505e089"]]),lt={class:"size-full overflow-auto flex flex-col"},ot={class:"pb-[5px]"},at={class:"flex-1 overflow-auto"},nt=L({__name:"index",setup(I){const g=G(),v=X("callbacks"),n=ae({});function u(f,l){if(!l||l instanceof Element){delete n[f];return}n[f]=l}function r(){if(g.previewList.length>=5){W.error("最多添加5个预览入口");return}g.addPreviewCompItem({uuid:le(),desc:"",path:[],fullPath:[]})}async function i(){if(!g.previewList.length)return W.error("请添加预览入口"),!1;const f=Object.values(n).map(s=>s==null?void 0:s.validateForm()),l=await Promise.all(f).then(s=>s.every(p=>p)).catch(s=>(console.error(s),!1));return l||g.setActiveName(H.PREVIEW),l}function x(f){const{uuid:l}=f;g.updatePreviewCompItemByUuid(l,f)}return v.set(A.CHECK_PREVIEW_LIST_FORM,i),(f,l)=>{const s=b("el-button");return d(),V("div",lt,[y("div",ot,[t(s,{type:"primary",onClick:r},{default:e(()=>[...l[0]||(l[0]=[T(" 添加预览入口 ",-1)])]),_:1})]),y("div",at,[t(Ne,{"item-min-width":360},{default:e(()=>[(d(!0),V(z,null,K(E(g).previewList,(p,o)=>(d(),w(tt,{ref_for:!0,ref:m=>u(p.uuid,m),key:p.uuid,index:o,"model-value":p,"onUpdate:modelValue":x},null,8,["index","model-value"]))),128))]),_:1})])])}}}),st=L({__name:"index",props:{modelValue:{}},setup(I){const g=G(),v=X("callbacks"),n=D(),u=D(200),r={description:[{required:!0,message:"请输入备注说明",trigger:"blur"},{min:3,max:u.value,message:`长度在 3 到 ${u.value} 个字符`,trigger:"blur"}]};async function i(){var f;try{return await((f=n.value)==null?void 0:f.validate()),!0}catch(l){return console.error(l),g.setActiveName(H.EXTRA),!1}}function x(f){g.setExtraInfo({...g.extraInfo,description:f})}return v.set(A.CHECK_EXTRA_INFO_FORM,i),(f,l)=>{const s=b("el-input"),p=b("el-form-item");return d(),w(E(Oe),{ref_key:"formRef",ref:n,class:"description-form","label-width":"80px",model:f.modelValue,rules:r},{default:e(()=>[t(p,{label:"备注说明",prop:"description"},{default:e(()=>[t(s,{maxlength:u.value,"show-word-limit":"","model-value":f.modelValue.description,placeholder:"请输入备注,有助于组件市场检索",rows:4,type:"textarea",onInput:x},null,8,["maxlength","model-value"])]),_:1})]),_:1},8,["model"])}}}),rt={class:"size-full flex justify-center items-center overflow-hidden"},it=L({__name:"PanelMini",props:{isLoadDeps:{type:Boolean,default:()=>!1},allDepEntryNameToFile:{type:Object,default:()=>({})},bg:{type:String,default:()=>"#f5f7fa"},compItem:{type:Object,default:()=>({})},dep:{type:Object,default:()=>({})},signedUrls:{type:Array,default:()=>[]},onePageEntryNameToFile:{type:Object,default:()=>({})},bgColor:{type:String,default:()=>"#f5f7fa"}},setup(I){return(g,v)=>(d(),V("div",rt,[y("div",{class:"border-1 border-[#e4e7ed] rounded-md h-full max-h-[230px] w-[400px]",style:ie({backgroundColor:I.bg})},[I.isLoadDeps?(d(),w(ue,{key:0,previewItem:I.compItem,dep:I.dep,signedUrls:I.signedUrls,allDepEntryNameToFile:I.allDepEntryNameToFile,panelType:E(M).MINI},null,8,["previewItem","dep","signedUrls","allDepEntryNameToFile","panelType"])):J("",!0)],4)]))}}),ut=L({__name:"PanelFull",props:{isLoadDeps:{type:Boolean,default:()=>!1},allDepEntryNameToFile:{type:Object,default:()=>({})},bg:{type:String,default:()=>"#f5f7fa"},compItem:{type:Object,default:()=>({})},dep:{type:Object,default:()=>({})},signedUrls:{type:Array,default:()=>[]},onePageEntryNameToFile:{type:Object,default:()=>({})},bgColor:{type:String,default:()=>"#f5f7fa"}},setup(I){return(g,v)=>(d(),V("div",{class:"flex-1 border-1 border-[#e4e7ed] overflow-hidden rounded-md size-full",style:ie({backgroundColor:I.bg})},[I.isLoadDeps?(d(),w(ue,{key:0,previewItem:I.compItem,dep:I.dep,signedUrls:I.signedUrls,allDepEntryNameToFile:I.allDepEntryNameToFile,panelType:E(M).FULL},null,8,["previewItem","dep","signedUrls","allDepEntryNameToFile","panelType"])):J("",!0)],4))}}),ct={class:"flex flex-col size-full overflow-auto"},dt={class:"flex flex-1 gap-[10px]"},pt={class:"flex-1 border-[1px] rounded-sm border-[#ccc] p-[5px]"},mt={class:"inline-block"},ft={class:"flex-1 border-[1px] rounded-sm border-[#ccc] p-[5px]"},_t={class:"inline-block"},vt={class:"text-center"},yt={class:"flex-1 border-[1px] rounded-sm border-[#ccc] p-[5px]"},ht={class:"inline-block"},bt={class:"flex"},gt={class:"w-[300px]"},Ct={key:0},xt=L({__name:"index",setup(I){const g=X("callbacks"),v=G(),n=D({}),u=U(()=>v.compDep),r=U(()=>v.onlineCompDep),i=U(()=>{const l={};if(te.keys(r.value).length===0&&v.compDialogType==="EDIT")return l;for(const s in u.value){const p=u.value[s],o={},m=r.value[s];m?m.version!==p.version?(o.type="change",o.selectedVersion=n.value[s]||"",o.versions=[{version:p.version,type:"local"},{version:m.version,type:"online"}]):(o.selectedVersion=p.version,o.type="consistent"):(o.selectedVersion=p.version,o.type="add"),l[s]=o}return l});function x(l,s){n.value[l]=s}function f(){const l=Object.keys(u.value),s=Object.keys(n.value);return s.length===0||l.length!==s.length?!1:Object.values(n.value).every(p=>!!p)}return B(()=>i.value,l=>{for(const s in l){const p=l[s];p.type!=="change"&&(n.value[s]=p.selectedVersion)}},{immediate:!0,deep:!0}),oe(()=>{v.setAffirmCompDep(te.cloneDeep(n.value))}),g.set(A.CHECK_AFFIRM_VERSION,f),(l,s)=>{const p=b("el-descriptions-item"),o=b("el-descriptions"),m=b("Bottom"),F=b("el-icon"),R=b("el-radio"),c=b("el-radio-group"),_=b("el-tag");return d(),V("div",ct,[y("div",dt,[y("div",pt,[y("div",null,[t(o,{title:"本地依赖",column:1,border:"","label-width":"auto"},{default:e(()=>[(d(!0),V(z,null,K(u.value,(h,P)=>(d(),w(p,{key:P},{label:e(()=>[y("div",mt,N(P),1)]),default:e(()=>[T(" "+N(h.version),1)]),_:2},1024))),128))]),_:1})])]),y("div",ft,[t(Ae,{isEmpty:Object.keys(r.value).length===0},{"empty-content":e(()=>[...s[0]||(s[0]=[y("div",{class:"size-full flex justify-center items-center text-[#999]"},"暂无数据!",-1)])]),default:e(()=>[t(o,{title:"线上依赖",column:1,border:"","label-width":"auto"},{default:e(()=>[(d(!0),V(z,null,K(r.value,(h,P)=>(d(),w(p,{key:P},{label:e(()=>[y("div",_t,N(P),1)]),default:e(()=>[T(" "+N(h.version),1)]),_:2},1024))),128))]),_:1})]),_:1},8,["isEmpty"])])]),y("div",vt,[t(F,{style:{"font-size":"34px"}},{default:e(()=>[t(m)]),_:1})]),y("div",yt,[t(o,{title:"最终依赖",column:1,border:"","label-width":"auto"},{default:e(()=>[(d(!0),V(z,null,K(i.value,(h,P)=>(d(),w(p,{key:P},{label:e(()=>[y("div",ht,N(P),1)]),default:e(()=>{var j;return[y("div",bt,[y("div",gt,[(j=h.versions)!=null&&j.length?(d(),w(c,{key:1,"model-value":h.selectedVersion,onChange:k=>x(P,k),size:"small",class:"ml-[10px]"},{default:e(()=>[(d(!0),V(z,null,K(h.versions,k=>(d(),w(R,{key:k.version,label:k.version},{default:e(()=>[y("span",null,N(k.type==="local"?"本地:":"线上:")+" "+N(k.version),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["model-value","onChange"])):(d(),V("span",Ct,N(h.selectedVersion),1))]),y("div",null,[h.type==="consistent"?(d(),w(_,{key:0,type:"info"},{default:e(()=>[...s[1]||(s[1]=[T("版本一致",-1)])]),_:1})):h.type==="change"?(d(),w(_,{key:1,type:"danger"},{default:e(()=>[...s[2]||(s[2]=[T("版本变化,请手动选择最终版本",-1)])]),_:1})):h.type==="add"?(d(),w(_,{key:2,type:"success"},{default:e(()=>[...s[3]||(s[3]=[T("新增依赖",-1)])]),_:1})):J("",!0)])])]}),_:2},1024))),128))]),_:1})])])}}}),It={class:"flex justify-end p-[5px]"},Et={class:"size-full border-1 border-[#ccc] rounded-md flex flex-col items-start bg-[#fff] overflow-hidden"},kt={class:"custom-style flex w-full justify-center items-center mb-[2px] mt-[5px] h-[30px]"},wt={class:"flex-1 overflow-auto"},Vt={class:"flex justify-end mt-[5px]"},Ot=L({__name:"index",emits:["confirmUpload"],setup(I,{emit:g}){const v=g,n=G(),u=ae(new Map);$e("callbacks",u);const r=D({}),i=D(),x=D([{label:"小窗面板",value:M.MINI},{label:"全屏面板",value:M.FULL}]),f=U(()=>n.previewList.map(c=>{const _=r.value[c.uuid]||M.MINI;let h="";return _===M.MINI&&c.entryUrl?h=c.entryUrl:_===M.FULL&&c.fullEntryUrl&&(h=c.fullEntryUrl),{uuid:c.uuid,entryUrl:h,activeTab:_}})),l=U(()=>n.compDep||{});function s(c){var h;if(!c)return;const _=r.value[c]||M.MINI;(h=u.get(`${A.AFTER_COMP_RENDER_RETRY}_${c}`))==null||h(_)}function p(c,_){c.uuid&&(r.value[c.uuid]=_)}function o(c){n.setActiveName(c)}function m(c){n.setCompCarouselIndex(c)}async function F(){var c;for(const _ of u.keys())if(_.startsWith(A.GET_COMP_ERROR)&&((c=u.get(_))==null?void 0:c()))return!0;return!1}async function R(c){var k,$,a,C;if(c.start(),!await((k=u.get(A.CHECK_COMP_CONFIG))==null?void 0:k())){n.setActiveName(H.CONFIG),c.end();return}if(await F()){W.error("请先处理编译错误"),c.end();return}if(!await(($=u.get(A.CHECK_PREVIEW_LIST_FORM))==null?void 0:$())){c.end();return}if(!await((a=u.get(A.CHECK_EXTRA_INFO_FORM))==null?void 0:a())){c.end();return}if(!await((C=u.get(A.CHECK_AFFIRM_VERSION))==null?void 0:C())){n.setActiveName(H.DEPS),c.end();return}v("confirmUpload",{end:c.end})}return B(()=>n.compCarouselIndex,async(c,_)=>{var h;c!==_&&((h=i.value)==null||h.setActiveItem(c))}),B(()=>n.editCompId,async c=>{if(!c)return;const _=await Fe({compId:c}),{desc:h,previewConfigs:P,bgColor:j,dep:k}=_.data;n.setExtraInfo({description:h});const $=P.map(a=>({uuid:a.id,desc:a.desc,path:a.path||[],fullPath:a.fullPath||[]}));n.setPreviewCompList($),n.setCompBgColor(j??"#fff"),n.setOnlineCompDep(k||{})},{immediate:!0}),(c,_)=>{const h=b("el-button"),P=b("el-segmented"),j=b("el-splitter-panel"),k=b("el-badge"),$=b("el-tab-pane"),a=b("el-tabs"),C=b("el-splitter");return d(),w(C,{class:"size-full",layout:"vertical"},{default:e(()=>[t(j,{class:"h-full border-1 border-[#ccc] rounded-sm",size:400,min:400},{default:e(()=>[t(Me,{previews:f.value,dep:l.value,bgColor:E(n).compBgColor,ref_key:"compCarouselRef",ref:i,arrow:"always",type:"card","card-scale":.7,onChange:m},{entryToolBar:e(({compItem:O})=>[y("div",It,[t(h,{type:"warning",icon:"refreshLeft",onClick:S=>s(O.uuid)},{default:e(()=>[..._[0]||(_[0]=[T("刷新",-1)])]),_:1},8,["onClick"])])]),editMode:e(({compItem:O,dep:S,signedUrls:q,bg:Q,allDepEntryNameToFile:Z,isLoadDeps:ce})=>[y("div",Et,[y("div",kt,[t(P,{"model-value":O.activeTab,onChange:de=>p(O,de),options:x.value},null,8,["model-value","onChange","options"])]),(d(),w(Re,null,[(d(),w(Pe(O.activeTab===E(M).MINI?it:ut),Te(De({compItem:O,dep:S,signedUrls:q,bg:Q,allDepEntryNameToFile:Z,isLoadDeps:ce})),null,16))],1024))])]),_:1},8,["previews","dep","bgColor"])]),_:1}),t(j,{class:"flex flex-col size-full border-1 border-[#ccc] rounded-sm p-[5px]",min:200},{default:e(()=>[y("div",wt,[t(a,{"model-value":E(n).activeName,class:"h-full",onTabChange:o,type:"border-card"},{default:e(()=>[t($,{class:"h-full",name:E(H).PREVIEW},{label:e(()=>[t(k,{"is-dot":E(n).previewIsError},{default:e(()=>[..._[1]||(_[1]=[T("预览配置",-1)])]),_:1},8,["is-dot"])]),default:e(()=>[t(nt)]),_:1},8,["name"]),t($,{class:"h-full",name:E(H).EXTRA},{label:e(()=>[t(k,{"is-dot":E(n).extraIsError},{default:e(()=>[..._[2]||(_[2]=[T("附加信息",-1)])]),_:1},8,["is-dot"])]),default:e(()=>[t(st,{modelValue:E(n).extraInfo},null,8,["modelValue"])]),_:1},8,["name"]),t($,{class:"h-full",name:E(H).CONFIG},{label:e(()=>[t(k,{"is-dot":E(n).configIsError},{default:e(()=>[..._[3]||(_[3]=[T("配置检查",-1)])]),_:1},8,["is-dot"])]),default:e(()=>[t(Xe)]),_:1},8,["name"]),t($,{class:"h-full",label:"组件目录",name:E(H).DIR},{default:e(()=>[t(Ze)]),_:1},8,["name"]),t($,{class:"h-full",name:E(H).DEPS},{label:e(()=>[t(k,{"is-dot":E(n).compDepIsError},{default:e(()=>[..._[4]||(_[4]=[T("组件依赖",-1)])]),_:1},8,["is-dot"])]),default:e(()=>[t(xt)]),_:1},8,["name"])]),_:1},8,["model-value"])]),y("div",Vt,[t(Ue,null,{default:e(({instance:O,loading:S})=>[t(h,{loading:S,type:"primary",onClick:q=>R(O)},{default:e(()=>[T(N(E(n).compSubmitBtnText),1)]),_:1},8,["loading","onClick"])]),_:1})])]),_:1})]),_:1})}}}),Ft=Y(Ot,[["__scopeId","data-v-d1aef1ef"]]);export{Ft as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as r,bq as c,j as p,A as u,o as m,aD as d,aP as f,u as l,br as _,aR as i}from"./index-DniNqRWl.js";const h=r({__name:"index",setup(x){const s=i(),t=c(),o={modal:!0,appendToBody:!0},a=p(()=>({...o,...t}));function n(e){s&&(s.exposed=e||{},s.exposeProxy=e||{})}return(e,g)=>(m(),u(d(f(l(_),{...a.value,ref:n},e.$slots))))}});export{h as _};
|