hermes-web-ui 0.2.2 → 0.2.3
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 +30 -6
- package/bin/hermes-web-ui.mjs +34 -4
- package/dist/assets/Button-CQLKwjHl.js +109 -0
- package/dist/assets/ChannelsView-Bdv3P2Rv.js +1 -0
- package/dist/assets/ChatView-BGSDL0hI.js +142 -0
- package/dist/assets/{ChatView-BVHQ6KhU.css → ChatView-CGsFaSiv.css} +1 -1
- package/dist/assets/Close-inn9RP7R.js +45 -0
- package/dist/assets/FormItem-BvJieJmq.js +110 -0
- package/dist/assets/Input-edKmVCeM.js +234 -0
- package/dist/assets/InputNumber-BpYEJnKY.js +13 -0
- package/dist/assets/JobsView-Dx4HmGC6.js +2 -0
- package/dist/assets/LoginView-BHThbj0n.css +1 -0
- package/dist/assets/LoginView-CIQSZ6bh.js +1 -0
- package/dist/assets/LogsView-nn7t6RGX.js +1 -0
- package/dist/assets/{MarkdownRenderer-C2pkccH2.js → MarkdownRenderer-Yw5JS7CE.js} +9 -9
- package/dist/assets/MemoryView-CE9P7mef.js +5 -0
- package/dist/assets/Modal-CDRYujZp.js +232 -0
- package/dist/assets/ModelsView-B72PAvvd.js +1 -0
- package/dist/assets/Popover-CRhyj79I.js +117 -0
- package/dist/assets/Select-CXQmv_5e.js +340 -0
- package/dist/assets/SettingRow-B3O4TYKh.js +1 -0
- package/dist/assets/SettingsView-BF2Uh-Eo.js +352 -0
- package/dist/assets/SkillsView-Abm6Dt2r.css +1 -0
- package/dist/assets/SkillsView-CeUPV9g8.js +1 -0
- package/dist/assets/Spin-COypV4Iq.js +43 -0
- package/dist/assets/Suffix-Bs0SC_yA.js +101 -0
- package/dist/assets/Switch-BcUqwhfi.js +102 -0
- package/dist/assets/Tag-CVO-_zgr.js +71 -0
- package/dist/assets/Tooltip-BljrRE17.js +1 -0
- package/dist/assets/UsageView-CFH6hwxE.js +1 -0
- package/dist/assets/_plugin-vue_export-helper-DJRCopG_.js +3 -0
- package/dist/assets/app-BcCNNvPk.js +1 -0
- package/dist/assets/app-CMJknO_z.js +1 -0
- package/dist/assets/browser-BuJOvks2.js +47 -0
- package/dist/assets/chat-DIeO-6BT.js +6 -0
- package/dist/assets/context-C8Jv60vX.js +1 -0
- package/dist/assets/index-BZ3NfTDJ.css +1 -0
- package/dist/assets/index-Bj9YOu02.js +306 -0
- package/dist/assets/jobs-CnB9OiiZ.js +1 -0
- package/dist/assets/logo-CiQBpLPw.js +1 -0
- package/dist/assets/pinia-YU9i-6Bb.js +1 -0
- package/dist/assets/router--r9mOZY5.js +4 -0
- package/dist/assets/{sessions-DYkP_X2v.js → sessions-COjIc6fz.js} +1 -1
- package/dist/assets/{skills-C6QBmS9j.js → skills-C4yD0aCK.js} +1 -1
- package/dist/assets/use-message-D8bO1GLN.js +1 -0
- package/dist/index.html +18 -18
- package/dist/server/index.js +104 -61
- package/dist/server/routes/filesystem.js +38 -0
- package/dist/server/services/auth.d.ts +9 -0
- package/dist/server/services/auth.js +65 -0
- package/dist/server/services/hermes-cli.js +13 -1
- package/package.json +2 -2
- package/dist/assets/Button-CpNld4Mc.js +0 -109
- package/dist/assets/ChannelsView-BGXB46ZU.js +0 -1
- package/dist/assets/ChatView-CaO-j1NR.js +0 -142
- package/dist/assets/Close-BAvirVyH.js +0 -45
- package/dist/assets/FormItem-DUC1YCrh.js +0 -110
- package/dist/assets/Input-CCmp4iGM.js +0 -234
- package/dist/assets/InputNumber-DpIdrMEW.js +0 -13
- package/dist/assets/JobsView-t5o1pB0r.js +0 -2
- package/dist/assets/LogsView-QqOV3ZEf.js +0 -1
- package/dist/assets/MemoryView-oeAn8ZfB.js +0 -5
- package/dist/assets/Modal-BljFqAJF.js +0 -232
- package/dist/assets/ModelsView-DvK44HBy.js +0 -1
- package/dist/assets/Popover-BQMR8Xxo.js +0 -117
- package/dist/assets/Select-D33SMWcz.js +0 -340
- package/dist/assets/SettingRow-BxCsRfGG.js +0 -102
- package/dist/assets/SettingsView-CK9ArFcg.js +0 -352
- package/dist/assets/SkillsView-BvNhRbMq.css +0 -1
- package/dist/assets/SkillsView-_z2SQ9kJ.js +0 -1
- package/dist/assets/Spin-CwbBDHwW.js +0 -43
- package/dist/assets/Suffix-CKUJBJSi.js +0 -101
- package/dist/assets/Tag-87KswiOb.js +0 -71
- package/dist/assets/Tooltip-CuLVJgy8.js +0 -1
- package/dist/assets/UsageView-COiUupLe.js +0 -1
- package/dist/assets/_plugin-vue_export-helper-C7dadZ10.js +0 -49
- package/dist/assets/app-DX-WvBe8.js +0 -1
- package/dist/assets/app-DwI_Lyfm.js +0 -1
- package/dist/assets/chat-De2jGIM6.js +0 -6
- package/dist/assets/client-D-w1KhaU.js +0 -1
- package/dist/assets/context-vjXbZCu8.js +0 -1
- package/dist/assets/index-D3MGnlpF.js +0 -307
- package/dist/assets/index-DCNlSGk-.css +0 -1
- package/dist/assets/jobs-B2WdYQNb.js +0 -1
- package/dist/assets/pinia-B4dETPKk.js +0 -1
- package/dist/assets/preload-helper-D4M6sveU.js +0 -1
- package/dist/assets/use-message-BeTKmVAO.js +0 -1
- package/dist/assets/vue.runtime.esm-bundler-BoqZ7fRe.js +0 -3
- /package/dist/{assets/logo-BAarh-tH.png → logo.png} +0 -0
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
import{$ as e,E as t,H as n,I as r,L as i,O as a,P as o,S as s,U as c,V as l,W as u,at as d,ct as f,h as p,k as m,m as h,o as g,p as _,r as v,rt as y,u as b,v as x,w as S,x as C}from"./vue.runtime.esm-bundler-BoqZ7fRe.js";import{$ as w,B as ee,J as T,L as E,M as D,V as te,Y as O,Z as ne,dt as k,ft as A,l as re,lt as j,ot as M,q as N,r as P,st as F,t as I,ut as L,vt as R}from"./_plugin-vue_export-helper-C7dadZ10.js";import{N as ie,b as ae,f as oe,l as se,y as z}from"./Popover-BQMR8Xxo.js";import{b as B,c as ce,f as le,g as ue,m as V,y as de}from"./Suffix-CKUJBJSi.js";import{n as fe,t as pe}from"./Close-BAvirVyH.js";import{t as H}from"./Select-D33SMWcz.js";import{t as U}from"./omit-QZj0aLfU.js";import{n as me,t as W}from"./InputNumber-DpIdrMEW.js";import{t as G}from"./Input-CCmp4iGM.js";import{t as K}from"./use-message-BeTKmVAO.js";import{t as he}from"./Spin-CwbBDHwW.js";import{n as q,s as J,t as Y}from"./SettingRow-BxCsRfGG.js";var ge=z(`.v-x-scroll`,{overflow:`auto`,scrollbarWidth:`none`},[z(`&::-webkit-scrollbar`,{width:0,height:0})]),_e=s({name:`XScroll`,props:{disabled:Boolean,onScroll:Function},setup(){let t=e(null);function n(e){!(e.currentTarget.offsetWidth<e.currentTarget.scrollWidth)||e.deltaY===0||(e.currentTarget.scrollLeft+=e.deltaY+e.deltaX,e.preventDefault())}let r=ne();return ge.mount({id:`vueuc/x-scroll`,head:!0,anchorMetaName:ae,ssr:r}),Object.assign({selfRef:t,handleWheel:n},{scrollTo(...e){var n;(n=t.value)==null||n.scrollTo(...e)}})},render(){return S(`div`,{ref:`selfRef`,onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:`v-x-scroll`},this.$slots)}}),X=/\s/;function ve(e){for(var t=e.length;t--&&X.test(e.charAt(t)););return t}var ye=/^\s+/;function be(e){return e&&e.slice(0,ve(e)+1).replace(ye,``)}var Z=NaN,xe=/^[-+]0x[0-9a-f]+$/i,Se=/^0b[01]+$/i,Ce=/^0o[0-7]+$/i,we=parseInt;function Te(e){if(typeof e==`number`)return e;if(le(e))return Z;if(D(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=D(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=be(e);var n=Se.test(e);return n||Ce.test(e)?we(e.slice(2),n?2:8):xe.test(e)?Z:+e}var Ee=function(){return E.Date.now()},De=`Expected a function`,Oe=Math.max,ke=Math.min;function Ae(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(De);t=Te(t)||0,D(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?Oe(Te(n.maxWait)||0,t):a,f=`trailing`in n?!!n.trailing:f);function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function m(e){return l=e,s=setTimeout(_,t),u?p(e):o}function h(e){var n=e-c,r=e-l,i=t-n;return d?ke(i,a-r):i}function g(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function _(){var e=Ee();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(Ee())}function x(){var e=Ee(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return x.cancel=y,x.flush=b,x}var je=`Expected a function`;function Me(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw TypeError(je);return D(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),Ae(e,t,{leading:r,maxWait:t,trailing:i})}var Ne={tabFontSizeSmall:`14px`,tabFontSizeMedium:`14px`,tabFontSizeLarge:`16px`,tabGapSmallLine:`36px`,tabGapMediumLine:`36px`,tabGapLargeLine:`36px`,tabGapSmallLineVertical:`8px`,tabGapMediumLineVertical:`8px`,tabGapLargeLineVertical:`8px`,tabPaddingSmallLine:`6px 0`,tabPaddingMediumLine:`10px 0`,tabPaddingLargeLine:`14px 0`,tabPaddingVerticalSmallLine:`6px 12px`,tabPaddingVerticalMediumLine:`8px 16px`,tabPaddingVerticalLargeLine:`10px 20px`,tabGapSmallBar:`36px`,tabGapMediumBar:`36px`,tabGapLargeBar:`36px`,tabGapSmallBarVertical:`8px`,tabGapMediumBarVertical:`8px`,tabGapLargeBarVertical:`8px`,tabPaddingSmallBar:`4px 0`,tabPaddingMediumBar:`6px 0`,tabPaddingLargeBar:`10px 0`,tabPaddingVerticalSmallBar:`6px 12px`,tabPaddingVerticalMediumBar:`8px 16px`,tabPaddingVerticalLargeBar:`10px 20px`,tabGapSmallCard:`4px`,tabGapMediumCard:`4px`,tabGapLargeCard:`4px`,tabGapSmallCardVertical:`4px`,tabGapMediumCardVertical:`4px`,tabGapLargeCardVertical:`4px`,tabPaddingSmallCard:`8px 16px`,tabPaddingMediumCard:`10px 20px`,tabPaddingLargeCard:`12px 24px`,tabPaddingSmallSegment:`4px 0`,tabPaddingMediumSegment:`6px 0`,tabPaddingLargeSegment:`8px 0`,tabPaddingVerticalLargeSegment:`0 8px`,tabPaddingVerticalSmallCard:`8px 12px`,tabPaddingVerticalMediumCard:`10px 16px`,tabPaddingVerticalLargeCard:`12px 20px`,tabPaddingVerticalSmallSegment:`0 4px`,tabPaddingVerticalMediumSegment:`0 6px`,tabGapSmallSegment:`0`,tabGapMediumSegment:`0`,tabGapLargeSegment:`0`,tabGapSmallSegmentVertical:`0`,tabGapMediumSegmentVertical:`0`,tabGapLargeSegmentVertical:`0`,panePaddingSmall:`8px 0 0 0`,panePaddingMedium:`12px 0 0 0`,panePaddingLarge:`16px 0 0 0`,closeSize:`18px`,closeIconSize:`14px`};function Pe(e){let{textColor2:t,primaryColor:n,textColorDisabled:r,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:o,closeColorHover:s,closeColorPressed:c,tabColor:l,baseColor:u,dividerColor:d,fontWeight:f,textColor1:p,borderRadius:m,fontSize:h,fontWeightStrong:g}=e;return Object.assign(Object.assign({},Ne),{colorSegment:l,tabFontSizeCard:h,tabTextColorLine:p,tabTextColorActiveLine:n,tabTextColorHoverLine:n,tabTextColorDisabledLine:r,tabTextColorSegment:p,tabTextColorActiveSegment:t,tabTextColorHoverSegment:t,tabTextColorDisabledSegment:r,tabTextColorBar:p,tabTextColorActiveBar:n,tabTextColorHoverBar:n,tabTextColorDisabledBar:r,tabTextColorCard:p,tabTextColorHoverCard:p,tabTextColorActiveCard:n,tabTextColorDisabledCard:r,barColor:n,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:o,closeColorHover:s,closeColorPressed:c,closeBorderRadius:m,tabColor:l,tabColorSegment:u,tabBorderColor:d,tabFontWeightActive:f,tabFontWeight:f,tabBorderRadius:m,paneTextColor:t,fontWeightStrong:g})}var Fe={name:`Tabs`,common:P,self:Pe},Q=w(`n-tabs`),Ie={tab:[String,Number,Object,Function],name:{type:[String,Number],required:!0},disabled:Boolean,displayDirective:{type:String,default:`if`},closable:{type:Boolean,default:void 0},tabProps:Object,label:[String,Number,Object,Function]},$=s({__TAB_PANE__:!0,name:`TabPane`,alias:[`TabPanel`],props:Ie,slots:Object,setup(e){let n=t(Q,null);return n||O(`tab-pane`,"`n-tab-pane` must be placed inside `n-tabs`."),{style:n.paneStyleRef,class:n.paneClassRef,mergedClsPrefix:n.mergedClsPrefixRef}},render(){return S(`div`,{class:[`${this.mergedClsPrefix}-tab-pane`,this.class],style:this.style},this.$slots)}}),Le=s({__TAB__:!0,inheritAttrs:!1,name:`Tab`,props:Object.assign({internalLeftPadded:Boolean,internalAddable:Boolean,internalCreatedByPane:Boolean},U(Ie,[`displayDirective`])),setup(e){let{mergedClsPrefixRef:n,valueRef:r,typeRef:i,closableRef:a,tabStyleRef:o,addTabStyleRef:s,tabClassRef:c,addTabClassRef:l,tabChangeIdRef:u,onBeforeLeaveRef:d,triggerRef:f,handleAdd:p,activateTab:m,handleClose:g}=t(Q);return{trigger:f,mergedClosable:h(()=>{if(e.internalAddable)return!1;let{closable:t}=e;return t===void 0?a.value:t}),style:o,addStyle:s,tabClass:c,addTabClass:l,clsPrefix:n,value:r,type:i,handleClose(t){t.stopPropagation(),!e.disabled&&g(e.name)},activateTab(){if(e.disabled)return;if(e.internalAddable){p();return}let{name:t}=e,n=++u.id;if(t!==r.value){let{value:i}=d;i?Promise.resolve(i(e.name,r.value)).then(e=>{e&&u.id===n&&m(t)}):m(t)}}}},render(){let{internalAddable:e,clsPrefix:t,name:n,disabled:r,label:i,tab:o,value:s,mergedClosable:c,trigger:l,$slots:{default:u}}=this,d=i??o;return S(`div`,{class:`${t}-tabs-tab-wrapper`},this.internalLeftPadded?S(`div`,{class:`${t}-tabs-tab-pad`}):null,S(`div`,Object.assign({key:n,"data-name":n,"data-disabled":r?!0:void 0},a({class:[`${t}-tabs-tab`,s===n&&`${t}-tabs-tab--active`,r&&`${t}-tabs-tab--disabled`,c&&`${t}-tabs-tab--closable`,e&&`${t}-tabs-tab--addable`,e?this.addTabClass:this.tabClass],onClick:l===`click`?this.activateTab:void 0,onMouseenter:l===`hover`?this.activateTab:void 0,style:e?this.addStyle:this.style},this.internalCreatedByPane?this.tabProps||{}:this.$attrs)),S(`span`,{class:`${t}-tabs-tab__label`},e?S(b,null,S(`div`,{class:`${t}-tabs-tab__height-placeholder`},`\xA0`),S(ce,{clsPrefix:t},{default:()=>S(me,null)})):u?u():typeof d==`object`?d:se(d??n)),c&&this.type===`card`?S(pe,{clsPrefix:t,class:`${t}-tabs-tab__close`,onClick:this.handleClose,disabled:r}):null))}}),Re=F(`tabs`,`
|
|
2
|
-
box-sizing: border-box;
|
|
3
|
-
width: 100%;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
transition:
|
|
7
|
-
background-color .3s var(--n-bezier),
|
|
8
|
-
border-color .3s var(--n-bezier);
|
|
9
|
-
`,[L(`segment-type`,[F(`tabs-rail`,[M(`&.transition-disabled`,[F(`tabs-capsule`,`
|
|
10
|
-
transition: none;
|
|
11
|
-
`)])])]),L(`top`,[F(`tab-pane`,`
|
|
12
|
-
padding: var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left);
|
|
13
|
-
`)]),L(`left`,[F(`tab-pane`,`
|
|
14
|
-
padding: var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left) var(--n-pane-padding-top);
|
|
15
|
-
`)]),L(`left, right`,`
|
|
16
|
-
flex-direction: row;
|
|
17
|
-
`,[F(`tabs-bar`,`
|
|
18
|
-
width: 2px;
|
|
19
|
-
right: 0;
|
|
20
|
-
transition:
|
|
21
|
-
top .2s var(--n-bezier),
|
|
22
|
-
max-height .2s var(--n-bezier),
|
|
23
|
-
background-color .3s var(--n-bezier);
|
|
24
|
-
`),F(`tabs-tab`,`
|
|
25
|
-
padding: var(--n-tab-padding-vertical);
|
|
26
|
-
`)]),L(`right`,`
|
|
27
|
-
flex-direction: row-reverse;
|
|
28
|
-
`,[F(`tab-pane`,`
|
|
29
|
-
padding: var(--n-pane-padding-left) var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom);
|
|
30
|
-
`),F(`tabs-bar`,`
|
|
31
|
-
left: 0;
|
|
32
|
-
`)]),L(`bottom`,`
|
|
33
|
-
flex-direction: column-reverse;
|
|
34
|
-
justify-content: flex-end;
|
|
35
|
-
`,[F(`tab-pane`,`
|
|
36
|
-
padding: var(--n-pane-padding-bottom) var(--n-pane-padding-right) var(--n-pane-padding-top) var(--n-pane-padding-left);
|
|
37
|
-
`),F(`tabs-bar`,`
|
|
38
|
-
top: 0;
|
|
39
|
-
`)]),F(`tabs-rail`,`
|
|
40
|
-
position: relative;
|
|
41
|
-
padding: 3px;
|
|
42
|
-
border-radius: var(--n-tab-border-radius);
|
|
43
|
-
width: 100%;
|
|
44
|
-
background-color: var(--n-color-segment);
|
|
45
|
-
transition: background-color .3s var(--n-bezier);
|
|
46
|
-
display: flex;
|
|
47
|
-
align-items: center;
|
|
48
|
-
`,[F(`tabs-capsule`,`
|
|
49
|
-
border-radius: var(--n-tab-border-radius);
|
|
50
|
-
position: absolute;
|
|
51
|
-
pointer-events: none;
|
|
52
|
-
background-color: var(--n-tab-color-segment);
|
|
53
|
-
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .08);
|
|
54
|
-
transition: transform 0.3s var(--n-bezier);
|
|
55
|
-
`),F(`tabs-tab-wrapper`,`
|
|
56
|
-
flex-basis: 0;
|
|
57
|
-
flex-grow: 1;
|
|
58
|
-
display: flex;
|
|
59
|
-
align-items: center;
|
|
60
|
-
justify-content: center;
|
|
61
|
-
`,[F(`tabs-tab`,`
|
|
62
|
-
overflow: hidden;
|
|
63
|
-
border-radius: var(--n-tab-border-radius);
|
|
64
|
-
width: 100%;
|
|
65
|
-
display: flex;
|
|
66
|
-
align-items: center;
|
|
67
|
-
justify-content: center;
|
|
68
|
-
`,[L(`active`,`
|
|
69
|
-
font-weight: var(--n-font-weight-strong);
|
|
70
|
-
color: var(--n-tab-text-color-active);
|
|
71
|
-
`),M(`&:hover`,`
|
|
72
|
-
color: var(--n-tab-text-color-hover);
|
|
73
|
-
`)])])]),L(`flex`,[F(`tabs-nav`,`
|
|
74
|
-
width: 100%;
|
|
75
|
-
position: relative;
|
|
76
|
-
`,[F(`tabs-wrapper`,`
|
|
77
|
-
width: 100%;
|
|
78
|
-
`,[F(`tabs-tab`,`
|
|
79
|
-
margin-right: 0;
|
|
80
|
-
`)])])]),F(`tabs-nav`,`
|
|
81
|
-
box-sizing: border-box;
|
|
82
|
-
line-height: 1.5;
|
|
83
|
-
display: flex;
|
|
84
|
-
transition: border-color .3s var(--n-bezier);
|
|
85
|
-
`,[j(`prefix, suffix`,`
|
|
86
|
-
display: flex;
|
|
87
|
-
align-items: center;
|
|
88
|
-
`),j(`prefix`,`padding-right: 16px;`),j(`suffix`,`padding-left: 16px;`)]),L(`top, bottom`,[M(`>`,[F(`tabs-nav`,[F(`tabs-nav-scroll-wrapper`,[M(`&::before`,`
|
|
89
|
-
top: 0;
|
|
90
|
-
bottom: 0;
|
|
91
|
-
left: 0;
|
|
92
|
-
width: 20px;
|
|
93
|
-
`),M(`&::after`,`
|
|
94
|
-
top: 0;
|
|
95
|
-
bottom: 0;
|
|
96
|
-
right: 0;
|
|
97
|
-
width: 20px;
|
|
98
|
-
`),L(`shadow-start`,[M(`&::before`,`
|
|
99
|
-
box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, .12);
|
|
100
|
-
`)]),L(`shadow-end`,[M(`&::after`,`
|
|
101
|
-
box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, .12);
|
|
102
|
-
`)])])])])]),L(`left, right`,[F(`tabs-nav-scroll-content`,`
|
|
103
|
-
flex-direction: column;
|
|
104
|
-
`),M(`>`,[F(`tabs-nav`,[F(`tabs-nav-scroll-wrapper`,[M(`&::before`,`
|
|
105
|
-
top: 0;
|
|
106
|
-
left: 0;
|
|
107
|
-
right: 0;
|
|
108
|
-
height: 20px;
|
|
109
|
-
`),M(`&::after`,`
|
|
110
|
-
bottom: 0;
|
|
111
|
-
left: 0;
|
|
112
|
-
right: 0;
|
|
113
|
-
height: 20px;
|
|
114
|
-
`),L(`shadow-start`,[M(`&::before`,`
|
|
115
|
-
box-shadow: inset 0 10px 8px -8px rgba(0, 0, 0, .12);
|
|
116
|
-
`)]),L(`shadow-end`,[M(`&::after`,`
|
|
117
|
-
box-shadow: inset 0 -10px 8px -8px rgba(0, 0, 0, .12);
|
|
118
|
-
`)])])])])]),F(`tabs-nav-scroll-wrapper`,`
|
|
119
|
-
flex: 1;
|
|
120
|
-
position: relative;
|
|
121
|
-
overflow: hidden;
|
|
122
|
-
`,[F(`tabs-nav-y-scroll`,`
|
|
123
|
-
height: 100%;
|
|
124
|
-
width: 100%;
|
|
125
|
-
overflow-y: auto;
|
|
126
|
-
scrollbar-width: none;
|
|
127
|
-
`,[M(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,`
|
|
128
|
-
width: 0;
|
|
129
|
-
height: 0;
|
|
130
|
-
display: none;
|
|
131
|
-
`)]),M(`&::before, &::after`,`
|
|
132
|
-
transition: box-shadow .3s var(--n-bezier);
|
|
133
|
-
pointer-events: none;
|
|
134
|
-
content: "";
|
|
135
|
-
position: absolute;
|
|
136
|
-
z-index: 1;
|
|
137
|
-
`)]),F(`tabs-nav-scroll-content`,`
|
|
138
|
-
display: flex;
|
|
139
|
-
position: relative;
|
|
140
|
-
min-width: 100%;
|
|
141
|
-
min-height: 100%;
|
|
142
|
-
width: fit-content;
|
|
143
|
-
box-sizing: border-box;
|
|
144
|
-
`),F(`tabs-wrapper`,`
|
|
145
|
-
display: inline-flex;
|
|
146
|
-
flex-wrap: nowrap;
|
|
147
|
-
position: relative;
|
|
148
|
-
`),F(`tabs-tab-wrapper`,`
|
|
149
|
-
display: flex;
|
|
150
|
-
flex-wrap: nowrap;
|
|
151
|
-
flex-shrink: 0;
|
|
152
|
-
flex-grow: 0;
|
|
153
|
-
`),F(`tabs-tab`,`
|
|
154
|
-
cursor: pointer;
|
|
155
|
-
white-space: nowrap;
|
|
156
|
-
flex-wrap: nowrap;
|
|
157
|
-
display: inline-flex;
|
|
158
|
-
align-items: center;
|
|
159
|
-
color: var(--n-tab-text-color);
|
|
160
|
-
font-size: var(--n-tab-font-size);
|
|
161
|
-
background-clip: padding-box;
|
|
162
|
-
padding: var(--n-tab-padding);
|
|
163
|
-
transition:
|
|
164
|
-
box-shadow .3s var(--n-bezier),
|
|
165
|
-
color .3s var(--n-bezier),
|
|
166
|
-
background-color .3s var(--n-bezier),
|
|
167
|
-
border-color .3s var(--n-bezier);
|
|
168
|
-
`,[L(`disabled`,{cursor:`not-allowed`}),j(`close`,`
|
|
169
|
-
margin-left: 6px;
|
|
170
|
-
transition:
|
|
171
|
-
background-color .3s var(--n-bezier),
|
|
172
|
-
color .3s var(--n-bezier);
|
|
173
|
-
`),j(`label`,`
|
|
174
|
-
display: flex;
|
|
175
|
-
align-items: center;
|
|
176
|
-
z-index: 1;
|
|
177
|
-
`)]),F(`tabs-bar`,`
|
|
178
|
-
position: absolute;
|
|
179
|
-
bottom: 0;
|
|
180
|
-
height: 2px;
|
|
181
|
-
border-radius: 1px;
|
|
182
|
-
background-color: var(--n-bar-color);
|
|
183
|
-
transition:
|
|
184
|
-
left .2s var(--n-bezier),
|
|
185
|
-
max-width .2s var(--n-bezier),
|
|
186
|
-
opacity .3s var(--n-bezier),
|
|
187
|
-
background-color .3s var(--n-bezier);
|
|
188
|
-
`,[M(`&.transition-disabled`,`
|
|
189
|
-
transition: none;
|
|
190
|
-
`),L(`disabled`,`
|
|
191
|
-
background-color: var(--n-tab-text-color-disabled)
|
|
192
|
-
`)]),F(`tabs-pane-wrapper`,`
|
|
193
|
-
position: relative;
|
|
194
|
-
overflow: hidden;
|
|
195
|
-
transition: max-height .2s var(--n-bezier);
|
|
196
|
-
`),F(`tab-pane`,`
|
|
197
|
-
color: var(--n-pane-text-color);
|
|
198
|
-
width: 100%;
|
|
199
|
-
transition:
|
|
200
|
-
color .3s var(--n-bezier),
|
|
201
|
-
background-color .3s var(--n-bezier),
|
|
202
|
-
opacity .2s var(--n-bezier);
|
|
203
|
-
left: 0;
|
|
204
|
-
right: 0;
|
|
205
|
-
top: 0;
|
|
206
|
-
`,[M(`&.next-transition-leave-active, &.prev-transition-leave-active, &.next-transition-enter-active, &.prev-transition-enter-active`,`
|
|
207
|
-
transition:
|
|
208
|
-
color .3s var(--n-bezier),
|
|
209
|
-
background-color .3s var(--n-bezier),
|
|
210
|
-
transform .2s var(--n-bezier),
|
|
211
|
-
opacity .2s var(--n-bezier);
|
|
212
|
-
`),M(`&.next-transition-leave-active, &.prev-transition-leave-active`,`
|
|
213
|
-
position: absolute;
|
|
214
|
-
`),M(`&.next-transition-enter-from, &.prev-transition-leave-to`,`
|
|
215
|
-
transform: translateX(32px);
|
|
216
|
-
opacity: 0;
|
|
217
|
-
`),M(`&.next-transition-leave-to, &.prev-transition-enter-from`,`
|
|
218
|
-
transform: translateX(-32px);
|
|
219
|
-
opacity: 0;
|
|
220
|
-
`),M(`&.next-transition-leave-from, &.next-transition-enter-to, &.prev-transition-leave-from, &.prev-transition-enter-to`,`
|
|
221
|
-
transform: translateX(0);
|
|
222
|
-
opacity: 1;
|
|
223
|
-
`)]),F(`tabs-tab-pad`,`
|
|
224
|
-
box-sizing: border-box;
|
|
225
|
-
width: var(--n-tab-gap);
|
|
226
|
-
flex-grow: 0;
|
|
227
|
-
flex-shrink: 0;
|
|
228
|
-
`),L(`line-type, bar-type`,[F(`tabs-tab`,`
|
|
229
|
-
font-weight: var(--n-tab-font-weight);
|
|
230
|
-
box-sizing: border-box;
|
|
231
|
-
vertical-align: bottom;
|
|
232
|
-
`,[M(`&:hover`,{color:`var(--n-tab-text-color-hover)`}),L(`active`,`
|
|
233
|
-
color: var(--n-tab-text-color-active);
|
|
234
|
-
font-weight: var(--n-tab-font-weight-active);
|
|
235
|
-
`),L(`disabled`,{color:`var(--n-tab-text-color-disabled)`})])]),F(`tabs-nav`,[L(`line-type`,[L(`top`,[j(`prefix, suffix`,`
|
|
236
|
-
border-bottom: 1px solid var(--n-tab-border-color);
|
|
237
|
-
`),F(`tabs-nav-scroll-content`,`
|
|
238
|
-
border-bottom: 1px solid var(--n-tab-border-color);
|
|
239
|
-
`),F(`tabs-bar`,`
|
|
240
|
-
bottom: -1px;
|
|
241
|
-
`)]),L(`left`,[j(`prefix, suffix`,`
|
|
242
|
-
border-right: 1px solid var(--n-tab-border-color);
|
|
243
|
-
`),F(`tabs-nav-scroll-content`,`
|
|
244
|
-
border-right: 1px solid var(--n-tab-border-color);
|
|
245
|
-
`),F(`tabs-bar`,`
|
|
246
|
-
right: -1px;
|
|
247
|
-
`)]),L(`right`,[j(`prefix, suffix`,`
|
|
248
|
-
border-left: 1px solid var(--n-tab-border-color);
|
|
249
|
-
`),F(`tabs-nav-scroll-content`,`
|
|
250
|
-
border-left: 1px solid var(--n-tab-border-color);
|
|
251
|
-
`),F(`tabs-bar`,`
|
|
252
|
-
left: -1px;
|
|
253
|
-
`)]),L(`bottom`,[j(`prefix, suffix`,`
|
|
254
|
-
border-top: 1px solid var(--n-tab-border-color);
|
|
255
|
-
`),F(`tabs-nav-scroll-content`,`
|
|
256
|
-
border-top: 1px solid var(--n-tab-border-color);
|
|
257
|
-
`),F(`tabs-bar`,`
|
|
258
|
-
top: -1px;
|
|
259
|
-
`)]),j(`prefix, suffix`,`
|
|
260
|
-
transition: border-color .3s var(--n-bezier);
|
|
261
|
-
`),F(`tabs-nav-scroll-content`,`
|
|
262
|
-
transition: border-color .3s var(--n-bezier);
|
|
263
|
-
`),F(`tabs-bar`,`
|
|
264
|
-
border-radius: 0;
|
|
265
|
-
`)]),L(`card-type`,[j(`prefix, suffix`,`
|
|
266
|
-
transition: border-color .3s var(--n-bezier);
|
|
267
|
-
`),F(`tabs-pad`,`
|
|
268
|
-
flex-grow: 1;
|
|
269
|
-
transition: border-color .3s var(--n-bezier);
|
|
270
|
-
`),F(`tabs-tab-pad`,`
|
|
271
|
-
transition: border-color .3s var(--n-bezier);
|
|
272
|
-
`),F(`tabs-tab`,`
|
|
273
|
-
font-weight: var(--n-tab-font-weight);
|
|
274
|
-
border: 1px solid var(--n-tab-border-color);
|
|
275
|
-
background-color: var(--n-tab-color);
|
|
276
|
-
box-sizing: border-box;
|
|
277
|
-
position: relative;
|
|
278
|
-
vertical-align: bottom;
|
|
279
|
-
display: flex;
|
|
280
|
-
justify-content: space-between;
|
|
281
|
-
font-size: var(--n-tab-font-size);
|
|
282
|
-
color: var(--n-tab-text-color);
|
|
283
|
-
`,[L(`addable`,`
|
|
284
|
-
padding-left: 8px;
|
|
285
|
-
padding-right: 8px;
|
|
286
|
-
font-size: 16px;
|
|
287
|
-
justify-content: center;
|
|
288
|
-
`,[j(`height-placeholder`,`
|
|
289
|
-
width: 0;
|
|
290
|
-
font-size: var(--n-tab-font-size);
|
|
291
|
-
`),k(`disabled`,[M(`&:hover`,`
|
|
292
|
-
color: var(--n-tab-text-color-hover);
|
|
293
|
-
`)])]),L(`closable`,`padding-right: 8px;`),L(`active`,`
|
|
294
|
-
background-color: #0000;
|
|
295
|
-
font-weight: var(--n-tab-font-weight-active);
|
|
296
|
-
color: var(--n-tab-text-color-active);
|
|
297
|
-
`),L(`disabled`,`color: var(--n-tab-text-color-disabled);`)])]),L(`left, right`,`
|
|
298
|
-
flex-direction: column;
|
|
299
|
-
`,[j(`prefix, suffix`,`
|
|
300
|
-
padding: var(--n-tab-padding-vertical);
|
|
301
|
-
`),F(`tabs-wrapper`,`
|
|
302
|
-
flex-direction: column;
|
|
303
|
-
`),F(`tabs-tab-wrapper`,`
|
|
304
|
-
flex-direction: column;
|
|
305
|
-
`,[F(`tabs-tab-pad`,`
|
|
306
|
-
height: var(--n-tab-gap-vertical);
|
|
307
|
-
width: 100%;
|
|
308
|
-
`)])]),L(`top`,[L(`card-type`,[F(`tabs-scroll-padding`,`border-bottom: 1px solid var(--n-tab-border-color);`),j(`prefix, suffix`,`
|
|
309
|
-
border-bottom: 1px solid var(--n-tab-border-color);
|
|
310
|
-
`),F(`tabs-tab`,`
|
|
311
|
-
border-top-left-radius: var(--n-tab-border-radius);
|
|
312
|
-
border-top-right-radius: var(--n-tab-border-radius);
|
|
313
|
-
`,[L(`active`,`
|
|
314
|
-
border-bottom: 1px solid #0000;
|
|
315
|
-
`)]),F(`tabs-tab-pad`,`
|
|
316
|
-
border-bottom: 1px solid var(--n-tab-border-color);
|
|
317
|
-
`),F(`tabs-pad`,`
|
|
318
|
-
border-bottom: 1px solid var(--n-tab-border-color);
|
|
319
|
-
`)])]),L(`left`,[L(`card-type`,[F(`tabs-scroll-padding`,`border-right: 1px solid var(--n-tab-border-color);`),j(`prefix, suffix`,`
|
|
320
|
-
border-right: 1px solid var(--n-tab-border-color);
|
|
321
|
-
`),F(`tabs-tab`,`
|
|
322
|
-
border-top-left-radius: var(--n-tab-border-radius);
|
|
323
|
-
border-bottom-left-radius: var(--n-tab-border-radius);
|
|
324
|
-
`,[L(`active`,`
|
|
325
|
-
border-right: 1px solid #0000;
|
|
326
|
-
`)]),F(`tabs-tab-pad`,`
|
|
327
|
-
border-right: 1px solid var(--n-tab-border-color);
|
|
328
|
-
`),F(`tabs-pad`,`
|
|
329
|
-
border-right: 1px solid var(--n-tab-border-color);
|
|
330
|
-
`)])]),L(`right`,[L(`card-type`,[F(`tabs-scroll-padding`,`border-left: 1px solid var(--n-tab-border-color);`),j(`prefix, suffix`,`
|
|
331
|
-
border-left: 1px solid var(--n-tab-border-color);
|
|
332
|
-
`),F(`tabs-tab`,`
|
|
333
|
-
border-top-right-radius: var(--n-tab-border-radius);
|
|
334
|
-
border-bottom-right-radius: var(--n-tab-border-radius);
|
|
335
|
-
`,[L(`active`,`
|
|
336
|
-
border-left: 1px solid #0000;
|
|
337
|
-
`)]),F(`tabs-tab-pad`,`
|
|
338
|
-
border-left: 1px solid var(--n-tab-border-color);
|
|
339
|
-
`),F(`tabs-pad`,`
|
|
340
|
-
border-left: 1px solid var(--n-tab-border-color);
|
|
341
|
-
`)])]),L(`bottom`,[L(`card-type`,[F(`tabs-scroll-padding`,`border-top: 1px solid var(--n-tab-border-color);`),j(`prefix, suffix`,`
|
|
342
|
-
border-top: 1px solid var(--n-tab-border-color);
|
|
343
|
-
`),F(`tabs-tab`,`
|
|
344
|
-
border-bottom-left-radius: var(--n-tab-border-radius);
|
|
345
|
-
border-bottom-right-radius: var(--n-tab-border-radius);
|
|
346
|
-
`,[L(`active`,`
|
|
347
|
-
border-top: 1px solid #0000;
|
|
348
|
-
`)]),F(`tabs-tab-pad`,`
|
|
349
|
-
border-top: 1px solid var(--n-tab-border-color);
|
|
350
|
-
`),F(`tabs-pad`,`
|
|
351
|
-
border-top: 1px solid var(--n-tab-border-color);
|
|
352
|
-
`)])])])]),ze=Me,Be=s({name:`Tabs`,props:Object.assign(Object.assign({},re.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:`click`},type:{type:String,default:`bar`},closable:Boolean,justifyContent:String,size:String,placement:{type:String,default:`top`},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),slots:Object,setup(t,{slots:r}){let{mergedClsPrefixRef:a,inlineThemeDisabled:s,mergedComponentPropsRef:c}=te(t),u=re(`Tabs`,`-tabs`,Re,Fe,t,a),d=e(null),f=e(null),p=e(null),g=e(null),_=e(null),v=e(null),b=e(!0),x=e(!0),S=fe(t,[`labelSize`,`size`]),C=h(()=>S.value?S.value:c?.value?.Tabs?.size||`medium`),w=fe(t,[`activeName`,`value`]),E=e(w.value??t.defaultValue??(r.default?oe(r.default())[0]?.props?.name:null)),D=ue(w,E),O={id:0},ne=h(()=>{if(!(!t.justifyContent||t.type===`card`))return{display:`flex`,justifyContent:t.justifyContent}});l(D,()=>{O.id=0,P(),F()});function k(){let{value:e}=D;return e===null?null:d.value?.querySelector(`[data-name="${e}"]`)}function j(e){if(t.type===`card`)return;let{value:n}=f;if(!n)return;let r=n.style.opacity===`0`;if(e){let i=`${a.value}-tabs-bar--disabled`,{barWidth:o,placement:s}=t;if(e.dataset.disabled===`true`?n.classList.add(i):n.classList.remove(i),[`top`,`bottom`].includes(s)){if(N([`top`,`maxHeight`,`height`]),typeof o==`number`&&e.offsetWidth>=o){let t=Math.floor((e.offsetWidth-o)/2)+e.offsetLeft;n.style.left=`${t}px`,n.style.maxWidth=`${o}px`}else n.style.left=`${e.offsetLeft}px`,n.style.maxWidth=`${e.offsetWidth}px`;n.style.width=`8192px`,r&&(n.style.transition=`none`),n.offsetWidth,r&&(n.style.transition=``,n.style.opacity=`1`)}else{if(N([`left`,`maxWidth`,`width`]),typeof o==`number`&&e.offsetHeight>=o){let t=Math.floor((e.offsetHeight-o)/2)+e.offsetTop;n.style.top=`${t}px`,n.style.maxHeight=`${o}px`}else n.style.top=`${e.offsetTop}px`,n.style.maxHeight=`${e.offsetHeight}px`;n.style.height=`8192px`,r&&(n.style.transition=`none`),n.offsetHeight,r&&(n.style.transition=``,n.style.opacity=`1`)}}}function M(){if(t.type===`card`)return;let{value:e}=f;e&&(e.style.opacity=`0`)}function N(e){let{value:t}=f;if(t)for(let n of e)t.style[n]=``}function P(){if(t.type===`card`)return;let e=k();e?j(e):M()}function F(){let e=_.value?.$el;if(!e)return;let t=k();if(!t)return;let{scrollLeft:n,offsetWidth:r}=e,{offsetLeft:i,offsetWidth:a}=t;n>i?e.scrollTo({top:0,left:i,behavior:`smooth`}):i+a>n+r&&e.scrollTo({top:0,left:i+a-r,behavior:`smooth`})}let I=e(null),L=0,R=null;function ae(e){let t=I.value;if(t){L=e.getBoundingClientRect().height;let n=`${L}px`,r=()=>{t.style.height=n,t.style.maxHeight=n};R?(r(),R(),R=null):R=r}}function se(e){let t=I.value;if(t){let n=e.getBoundingClientRect().height,r=()=>{document.body.offsetHeight,t.style.maxHeight=`${n}px`,t.style.height=`${Math.max(L,n)}px`};R?(R(),R=null,r()):R=r}}function z(){let e=I.value;if(e){e.style.maxHeight=``,e.style.height=``;let{paneWrapperStyle:n}=t;if(typeof n==`string`)e.style.cssText=n;else if(n){let{maxHeight:t,height:r}=n;t!==void 0&&(e.style.maxHeight=t),r!==void 0&&(e.style.height=r)}}}let ce={value:[]},le=e(`next`);function V(e){let t=D.value,n=`next`;for(let r of ce.value){if(r===t)break;if(r===e){n=`prev`;break}}le.value=n,pe(e)}function pe(e){let{onActiveNameChange:n,onUpdateValue:r,"onUpdate:value":i}=t;n&&T(n,e),r&&T(r,e),i&&T(i,e),E.value=e}function H(e){let{onClose:n}=t;n&&T(n,e)}let U=!0;function me(){let{value:e}=f;if(!e)return;U||=!1;let t=`transition-disabled`;e.classList.add(t),P(),e.classList.remove(t)}let W=e(null);function G({transitionDisabled:e}){let t=d.value;if(!t)return;e&&t.classList.add(`transition-disabled`);let n=k();n&&W.value&&(W.value.style.width=`${n.offsetWidth}px`,W.value.style.height=`${n.offsetHeight}px`,W.value.style.transform=`translateX(${n.offsetLeft-de(getComputedStyle(t).paddingLeft)}px)`,e&&W.value.offsetWidth),e&&t.classList.remove(`transition-disabled`)}l([D],()=>{t.type===`segment`&&m(()=>{G({transitionDisabled:!1})})}),o(()=>{t.type===`segment`&&G({transitionDisabled:!0})});let K=0;function he(e){if(e.contentRect.width===0&&e.contentRect.height===0||K===e.contentRect.width)return;K=e.contentRect.width;let{type:n}=t;if((n===`line`||n===`bar`)&&(U||t.justifyContent?.startsWith(`space`))&&me(),n!==`segment`){let{placement:e}=t;X((e===`top`||e===`bottom`?_.value?.$el:v.value)||null)}}let q=ze(he,64);l([()=>t.justifyContent,()=>t.size],()=>{m(()=>{let{type:e}=t;(e===`line`||e===`bar`)&&me()})});let J=e(!1);function Y(e){let{target:n,contentRect:{width:r,height:i}}=e,a=n.parentElement.parentElement.offsetWidth,o=n.parentElement.parentElement.offsetHeight,{placement:s}=t;if(!J.value)s===`top`||s===`bottom`?a<r&&(J.value=!0):o<i&&(J.value=!0);else{let{value:e}=g;if(!e)return;s===`top`||s===`bottom`?a-r>e.$el.offsetWidth&&(J.value=!1):o-i>e.$el.offsetHeight&&(J.value=!1)}X(_.value?.$el||null)}let ge=ze(Y,64);function _e(){let{onAdd:e}=t;e&&e(),m(()=>{let e=k(),{value:t}=_;!e||!t||t.scrollTo({left:e.offsetLeft,top:0,behavior:`smooth`})})}function X(e){if(!e)return;let{placement:n}=t;if(n===`top`||n===`bottom`){let{scrollLeft:t,scrollWidth:n,offsetWidth:r}=e;b.value=t<=0,x.value=t+r>=n}else{let{scrollTop:t,scrollHeight:n,offsetHeight:r}=e;b.value=t<=0,x.value=t+r>=n}}let ve=ze(e=>{X(e.target)},64);i(Q,{triggerRef:y(t,`trigger`),tabStyleRef:y(t,`tabStyle`),tabClassRef:y(t,`tabClass`),addTabStyleRef:y(t,`addTabStyle`),addTabClassRef:y(t,`addTabClass`),paneClassRef:y(t,`paneClass`),paneStyleRef:y(t,`paneStyle`),mergedClsPrefixRef:a,typeRef:y(t,`type`),closableRef:y(t,`closable`),valueRef:D,tabChangeIdRef:O,onBeforeLeaveRef:y(t,`onBeforeLeave`),activateTab:V,handleClose:H,handleAdd:_e}),ie(()=>{P(),F()}),n(()=>{let{value:e}=p;if(!e)return;let{value:t}=a,n=`${t}-tabs-nav-scroll-wrapper--shadow-start`,r=`${t}-tabs-nav-scroll-wrapper--shadow-end`;b.value?e.classList.remove(n):e.classList.add(n),x.value?e.classList.remove(r):e.classList.add(r)});let ye={syncBarPosition:()=>{P()}},be=()=>{G({transitionDisabled:!0})},Z=h(()=>{let{value:e}=C,{type:n}=t,r=`${e}${{card:`Card`,bar:`Bar`,line:`Line`,segment:`Segment`}[n]}`,{self:{barColor:i,closeIconColor:a,closeIconColorHover:o,closeIconColorPressed:s,tabColor:c,tabBorderColor:l,paneTextColor:d,tabFontWeight:f,tabBorderRadius:p,tabFontWeightActive:m,colorSegment:h,fontWeightStrong:g,tabColorSegment:_,closeSize:v,closeIconSize:y,closeColorHover:b,closeColorPressed:x,closeBorderRadius:S,[A(`panePadding`,e)]:w,[A(`tabPadding`,r)]:ee,[A(`tabPaddingVertical`,r)]:T,[A(`tabGap`,r)]:E,[A(`tabGap`,`${r}Vertical`)]:D,[A(`tabTextColor`,n)]:te,[A(`tabTextColorActive`,n)]:O,[A(`tabTextColorHover`,n)]:ne,[A(`tabTextColorDisabled`,n)]:k,[A(`tabFontSize`,e)]:re},common:{cubicBezierEaseInOut:j}}=u.value;return{"--n-bezier":j,"--n-color-segment":h,"--n-bar-color":i,"--n-tab-font-size":re,"--n-tab-text-color":te,"--n-tab-text-color-active":O,"--n-tab-text-color-disabled":k,"--n-tab-text-color-hover":ne,"--n-pane-text-color":d,"--n-tab-border-color":l,"--n-tab-border-radius":p,"--n-close-size":v,"--n-close-icon-size":y,"--n-close-color-hover":b,"--n-close-color-pressed":x,"--n-close-border-radius":S,"--n-close-icon-color":a,"--n-close-icon-color-hover":o,"--n-close-icon-color-pressed":s,"--n-tab-color":c,"--n-tab-font-weight":f,"--n-tab-font-weight-active":m,"--n-tab-padding":ee,"--n-tab-padding-vertical":T,"--n-tab-gap":E,"--n-tab-gap-vertical":D,"--n-pane-padding-left":B(w,`left`),"--n-pane-padding-right":B(w,`right`),"--n-pane-padding-top":B(w,`top`),"--n-pane-padding-bottom":B(w,`bottom`),"--n-font-weight-strong":g,"--n-tab-color-segment":_}}),xe=s?ee(`tabs`,h(()=>`${C.value[0]}${t.type[0]}`),Z,t):void 0;return Object.assign({mergedClsPrefix:a,mergedValue:D,renderedNames:new Set,segmentCapsuleElRef:W,tabsPaneWrapperRef:I,tabsElRef:d,barElRef:f,addTabInstRef:g,xScrollInstRef:_,scrollWrapperElRef:p,addTabFixed:J,tabWrapperStyle:ne,handleNavResize:q,mergedSize:C,handleScroll:ve,handleTabsResize:ge,cssVars:s?void 0:Z,themeClass:xe?.themeClass,animationDirection:le,renderNameListRef:ce,yScrollElRef:v,handleSegmentResize:be,onAnimationBeforeLeave:ae,onAnimationEnter:se,onAnimationAfterEnter:z,onRender:xe?.onRender},ye)},render(){let{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:i,mergedSize:a,renderNameListRef:o,onRender:s,paneWrapperClass:c,paneWrapperStyle:l,$slots:{default:u,prefix:d,suffix:f}}=this;s?.();let p=u?oe(u()).filter(e=>e.type.__TAB_PANE__===!0):[],m=u?oe(u()).filter(e=>e.type.__TAB__===!0):[],h=!m.length,g=t===`card`,_=t===`segment`,v=!g&&!_&&this.justifyContent;o.value=[];let y=()=>{let t=S(`div`,{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},v?null:S(`div`,{class:`${e}-tabs-scroll-padding`,style:n===`top`||n===`bottom`?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),h?p.map((e,t)=>(o.value.push(e.props.name),We(S(Le,Object.assign({},e.props,{internalCreatedByPane:!0,internalLeftPadded:t!==0&&(!v||v===`center`||v===`start`||v===`end`)}),e.children?{default:e.children.tab}:void 0)))):m.map((e,t)=>(o.value.push(e.props.name),We(t!==0&&!v?Ue(e):e))),!r&&i&&g?He(i,(h?p.length:m.length)!==0):null,v?null:S(`div`,{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return S(`div`,{ref:`tabsElRef`,class:`${e}-tabs-nav-scroll-content`},g&&i?S(V,{onResize:this.handleTabsResize},{default:()=>t}):t,g?S(`div`,{class:`${e}-tabs-pad`}):null,g?null:S(`div`,{ref:`barElRef`,class:`${e}-tabs-bar`}))},b=_?`top`:n;return S(`div`,{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${a}-size`,v&&`${e}-tabs--flex`,`${e}-tabs--${b}`],style:this.cssVars},S(`div`,{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${b}`,`${e}-tabs-nav`]},N(d,t=>t&&S(`div`,{class:`${e}-tabs-nav__prefix`},t)),_?S(V,{onResize:this.handleSegmentResize},{default:()=>S(`div`,{class:`${e}-tabs-rail`,ref:`tabsElRef`},S(`div`,{class:`${e}-tabs-capsule`,ref:`segmentCapsuleElRef`},S(`div`,{class:`${e}-tabs-wrapper`},S(`div`,{class:`${e}-tabs-tab`}))),h?p.map((e,t)=>(o.value.push(e.props.name),S(Le,Object.assign({},e.props,{internalCreatedByPane:!0,internalLeftPadded:t!==0}),e.children?{default:e.children.tab}:void 0))):m.map((e,t)=>(o.value.push(e.props.name),t===0?e:Ue(e))))}):S(V,{onResize:this.handleNavResize},{default:()=>S(`div`,{class:`${e}-tabs-nav-scroll-wrapper`,ref:`scrollWrapperElRef`},[`top`,`bottom`].includes(b)?S(_e,{ref:`xScrollInstRef`,onScroll:this.handleScroll},{default:y}):S(`div`,{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:`yScrollElRef`},y()))}),r&&i&&g?He(i,!0):null,N(f,t=>t&&S(`div`,{class:`${e}-tabs-nav__suffix`},t))),h&&(this.animated&&(b===`top`||b===`bottom`)?S(`div`,{ref:`tabsPaneWrapperRef`,style:l,class:[`${e}-tabs-pane-wrapper`,c]},Ve(p,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):Ve(p,this.mergedValue,this.renderedNames)))}});function Ve(e,t,n,r,i,a,o){let s=[];return e.forEach(e=>{let{name:r,displayDirective:i,"display-directive":a}=e.props,o=e=>i===e||a===e,c=t===r;if(e.key!==void 0&&(e.key=r),c||o(`show`)||o(`show:lazy`)&&n.has(r)){n.has(r)||n.add(r);let t=!o(`if`);s.push(t?u(e,[[g,c]]):e)}}),o?S(v,{name:`${o}-transition`,onBeforeLeave:r,onEnter:i,onAfterEnter:a},{default:()=>s}):s}function He(e,t){return S(Le,{ref:`addTabInstRef`,key:`__addable`,name:`__addable`,internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e==`object`&&e.disabled})}function Ue(e){let t=_(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function We(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes(`internalLeftPadded`)||e.dynamicProps.push(`internalLeftPadded`):e.dynamicProps=[`internalLeftPadded`],e}var Ge={class:`settings-section`},Ke=I(s({__name:`DisplaySettings`,setup(e){let t=q(),n=K(),{t:i}=R();async function a(e){try{await t.saveSection(`display`,e),n.success(i(`settings.saved`))}catch{n.error(i(`settings.saveFailed`))}}return(e,n)=>(r(),x(`section`,Ge,[C(Y,{label:d(i)(`settings.display.streaming`),hint:d(i)(`settings.display.streamingHint`)},{default:c(()=>[C(d(J),{value:d(t).display.streaming,"onUpdate:value":n[0]||=e=>a({streaming:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.display.compact`),hint:d(i)(`settings.display.compactHint`)},{default:c(()=>[C(d(J),{value:d(t).display.compact,"onUpdate:value":n[1]||=e=>a({compact:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.display.showReasoning`),hint:d(i)(`settings.display.showReasoningHint`)},{default:c(()=>[C(d(J),{value:d(t).display.show_reasoning,"onUpdate:value":n[2]||=e=>a({show_reasoning:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.display.showCost`),hint:d(i)(`settings.display.showCostHint`)},{default:c(()=>[C(d(J),{value:d(t).display.show_cost,"onUpdate:value":n[3]||=e=>a({show_cost:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.display.inlineDiffs`),hint:d(i)(`settings.display.inlineDiffsHint`)},{default:c(()=>[C(d(J),{value:d(t).display.inline_diffs,"onUpdate:value":n[4]||=e=>a({inline_diffs:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.display.bellOnComplete`),hint:d(i)(`settings.display.bellOnCompleteHint`)},{default:c(()=>[C(d(J),{value:d(t).display.bell_on_complete,"onUpdate:value":n[5]||=e=>a({bell_on_complete:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.display.busyInputMode`),hint:d(i)(`settings.display.busyInputModeHint`)},{default:c(()=>[C(d(J),{value:d(t).display.busy_input_mode===`interrupt`,"onUpdate:value":n[6]||=e=>a({busy_input_mode:e?`interrupt`:`off`})},null,8,[`value`])]),_:1},8,[`label`,`hint`])]))}}),[[`__scopeId`,`data-v-c8db8205`]]),qe={class:`settings-section`},Je=I(s({__name:`AgentSettings`,setup(e){let t=q(),n=K(),{t:i}=R();async function a(e){try{await t.saveSection(`agent`,e),n.success(i(`settings.saved`))}catch{n.error(i(`settings.saveFailed`))}}return(e,n)=>(r(),x(`section`,qe,[C(Y,{label:d(i)(`settings.agent.maxTurns`),hint:d(i)(`settings.agent.maxTurnsHint`)},{default:c(()=>[C(d(W),{value:d(t).agent.max_turns,min:1,max:200,step:5,size:`small`,style:{width:`120px`},"onUpdate:value":n[0]||=e=>e!=null&&a({max_turns:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.agent.gatewayTimeout`),hint:d(i)(`settings.agent.gatewayTimeoutHint`)},{default:c(()=>[C(d(W),{value:d(t).agent.gateway_timeout,min:60,max:7200,step:60,size:`small`,style:{width:`120px`},"onUpdate:value":n[1]||=e=>e!=null&&a({gateway_timeout:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.agent.restartDrainTimeout`),hint:d(i)(`settings.agent.restartDrainTimeoutHint`)},{default:c(()=>[C(d(W),{value:d(t).agent.restart_drain_timeout,min:10,max:300,step:10,size:`small`,style:{width:`120px`},"onUpdate:value":n[2]||=e=>e!=null&&a({restart_drain_timeout:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.agent.toolEnforcement`),hint:d(i)(`settings.agent.toolEnforcementHint`)},{default:c(()=>[C(d(H),{value:d(t).agent.tool_use_enforcement||`auto`,options:[{label:d(i)(`settings.agent.auto`),value:`auto`},{label:d(i)(`settings.agent.always`),value:`always`},{label:d(i)(`settings.agent.never`),value:`never`}],size:`small`,style:{width:`120px`},"onUpdate:value":n[3]||=e=>a({tool_use_enforcement:e})},null,8,[`value`,`options`])]),_:1},8,[`label`,`hint`])]))}}),[[`__scopeId`,`data-v-7c41cbf5`]]),Ye={class:`settings-section`},Xe=I(s({__name:`MemorySettings`,setup(e){let t=q(),n=K(),{t:i}=R();async function a(e){try{await t.saveSection(`memory`,e),n.success(i(`settings.saved`))}catch{n.error(i(`settings.saveFailed`))}}return(e,n)=>(r(),x(`section`,Ye,[C(Y,{label:d(i)(`settings.memory.enabled`),hint:d(i)(`settings.memory.enabledHint`)},{default:c(()=>[C(d(J),{value:d(t).memory.memory_enabled,"onUpdate:value":n[0]||=e=>a({memory_enabled:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.memory.userProfile`),hint:d(i)(`settings.memory.userProfileHint`)},{default:c(()=>[C(d(J),{value:d(t).memory.user_profile_enabled,"onUpdate:value":n[1]||=e=>a({user_profile_enabled:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.memory.charLimit`),hint:d(i)(`settings.memory.charLimitHint`)},{default:c(()=>[C(d(W),{value:d(t).memory.memory_char_limit,min:100,max:1e4,step:100,size:`small`,style:{width:`120px`},"onUpdate:value":n[2]||=e=>e!=null&&a({memory_char_limit:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.memory.userCharLimit`),hint:d(i)(`settings.memory.userCharLimitHint`)},{default:c(()=>[C(d(W),{value:d(t).memory.user_char_limit,min:100,max:1e4,step:100,size:`small`,style:{width:`120px`},"onUpdate:value":n[3]||=e=>e!=null&&a({user_char_limit:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`])]))}}),[[`__scopeId`,`data-v-8fb90a20`]]),Ze={class:`settings-section`},Qe=I(s({__name:`SessionSettings`,setup(e){let t=q(),n=K(),{t:i}=R();async function a(e){try{await t.saveSection(`session_reset`,e),n.success(i(`settings.saved`))}catch{n.error(i(`settings.saveFailed`))}}return(e,n)=>(r(),x(`section`,Ze,[C(Y,{label:d(i)(`settings.session.mode`),hint:d(i)(`settings.session.modeHint`)},{default:c(()=>[C(d(H),{value:d(t).sessionReset.mode||`both`,options:[{label:d(i)(`settings.session.modeBoth`),value:`both`},{label:d(i)(`settings.session.modeIdle`),value:`idle`},{label:d(i)(`settings.session.modeHourly`),value:`hourly`}],size:`small`,style:{width:`140px`},"onUpdate:value":n[0]||=e=>a({mode:e})},null,8,[`value`,`options`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.session.idleMinutes`),hint:d(i)(`settings.session.idleMinutesHint`)},{default:c(()=>[C(d(W),{value:d(t).sessionReset.idle_minutes,min:10,max:10080,step:30,size:`small`,style:{width:`120px`},"onUpdate:value":n[1]||=e=>e!=null&&a({idle_minutes:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.session.atHour`),hint:d(i)(`settings.session.atHourHint`)},{default:c(()=>[C(d(W),{value:d(t).sessionReset.at_hour,min:0,max:23,step:1,size:`small`,style:{width:`120px`},"onUpdate:value":n[2]||=e=>e!=null&&a({at_hour:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`])]))}}),[[`__scopeId`,`data-v-f01b7f59`]]),$e={class:`settings-section`},et=I(s({__name:`PrivacySettings`,setup(e){let t=q(),n=K(),{t:i}=R();async function a(e){try{await t.saveSection(`privacy`,e),n.success(i(`settings.saved`))}catch{n.error(i(`settings.saveFailed`))}}return(e,n)=>(r(),x(`section`,$e,[C(Y,{label:d(i)(`settings.privacy.redactPii`),hint:d(i)(`settings.privacy.redactPiiHint`)},{default:c(()=>[C(d(J),{value:d(t).privacy.redact_pii,"onUpdate:value":n[0]||=e=>a({redact_pii:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`])]))}}),[[`__scopeId`,`data-v-eecbcbf4`]]),tt={class:`settings-view`},nt={class:`settings-header`},rt={class:`header-title`},it={class:`settings-content`},at={class:`settings-section`},ot=I(s({__name:`SettingsView`,setup(e){let t=q(),n=K(),{t:i}=R();o(()=>{t.fetchSettings()});async function a(e){try{await t.saveSection(`platforms`,{api_server:e}),n.success(i(`settings.saved`))}catch{n.error(i(`settings.saveFailed`))}}return(e,n)=>(r(),x(`div`,tt,[p(`header`,nt,[p(`h2`,rt,f(d(i)(`settings.title`)),1)]),p(`div`,it,[C(d(he),{show:d(t).loading},{default:c(()=>[C(d(Be),{type:`line`,animated:``},{default:c(()=>[C(d($),{name:`display`,tab:d(i)(`settings.tabs.display`)},{default:c(()=>[C(Ke)]),_:1},8,[`tab`]),C(d($),{name:`agent`,tab:d(i)(`settings.tabs.agent`)},{default:c(()=>[C(Je)]),_:1},8,[`tab`]),C(d($),{name:`memory`,tab:d(i)(`settings.tabs.memory`)},{default:c(()=>[C(Xe)]),_:1},8,[`tab`]),C(d($),{name:`session`,tab:d(i)(`settings.tabs.session`)},{default:c(()=>[C(Qe)]),_:1},8,[`tab`]),C(d($),{name:`privacy`,tab:d(i)(`settings.tabs.privacy`)},{default:c(()=>[C(et)]),_:1},8,[`tab`]),C(d($),{name:`api_server`,tab:d(i)(`settings.tabs.apiServer`)},{default:c(()=>[p(`section`,at,[C(Y,{label:d(i)(`settings.apiServer.enable`),hint:d(i)(`settings.apiServer.enableHint`)},{default:c(()=>[C(d(J),{value:d(t).platforms?.api_server?.enabled,"onUpdate:value":n[0]||=e=>a({enabled:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.apiServer.host`),hint:d(i)(`settings.apiServer.hostHint`)},{default:c(()=>[C(d(G),{value:d(t).platforms?.api_server?.host||``,size:`small`,style:{width:`200px`},"onUpdate:value":n[1]||=e=>a({host:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.apiServer.port`),hint:d(i)(`settings.apiServer.portHint`)},{default:c(()=>[C(d(W),{value:d(t).platforms?.api_server?.port,min:1024,max:65535,size:`small`,style:{width:`120px`},"onUpdate:value":n[2]||=e=>e!=null&&a({port:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.apiServer.key`),hint:d(i)(`settings.apiServer.keyHint`)},{default:c(()=>[C(d(G),{value:d(t).platforms?.api_server?.key||``,type:`password`,"show-password-on":`click`,size:`small`,style:{width:`200px`},"onUpdate:value":n[3]||=e=>a({key:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),C(Y,{label:d(i)(`settings.apiServer.cors`),hint:d(i)(`settings.apiServer.corsHint`)},{default:c(()=>[C(d(G),{value:d(t).platforms?.api_server?.cors_origins||``,size:`small`,style:{width:`200px`},"onUpdate:value":n[4]||=e=>a({cors_origins:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`])])]),_:1},8,[`tab`])]),_:1})]),_:1},8,[`show`])])]))}}),[[`__scopeId`,`data-v-3f799a0b`]]);export{ot as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.skill-list[data-v-3f6a9b66]{flex:1;padding:8px;overflow-y:auto}.skill-empty[data-v-3f6a9b66]{color:#999;text-align:center;padding:24px 16px;font-size:13px}.skill-category[data-v-3f6a9b66]{margin-bottom:4px}.category-header[data-v-3f6a9b66]{color:#666;text-transform:uppercase;letter-spacing:.3px;cursor:pointer;background:0 0;border:none;border-radius:6px;align-items:center;gap:6px;width:100%;padding:6px 10px;font-size:12px;font-weight:600;display:flex}.category-header[data-v-3f6a9b66]:hover{background:#3333330a}.category-arrow[data-v-3f6a9b66]{flex-shrink:0;transition:transform .15s}.category-arrow.collapsed[data-v-3f6a9b66]{transform:rotate(-90deg)}.category-name[data-v-3f6a9b66]{text-align:left;text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.category-count[data-v-3f6a9b66]{color:#999;background:#3333330f;border-radius:8px;padding:1px 6px;font-size:11px}.category-skills[data-v-3f6a9b66]{padding:2px 0 4px}.skill-item[data-v-3f6a9b66]{color:#666;text-align:left;cursor:pointer;background:0 0;border:none;border-radius:6px;flex-direction:column;width:100%;padding:6px 10px 6px 28px;font-size:13px;transition:all .15s;display:flex}.skill-item[data-v-3f6a9b66]:hover{color:#1a1a1a;background:#3333330f}.skill-item.active[data-v-3f6a9b66]{color:#1a1a1a;background:#3333331a;font-weight:500}.skill-name[data-v-3f6a9b66]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.skill-desc[data-v-3f6a9b66]{color:#999;white-space:nowrap;text-overflow:ellipsis;margin-top:1px;font-size:11px;overflow:hidden}.skill-detail[data-v-b84bbe48]{flex-direction:column;height:100%;display:flex}.detail-title[data-v-b84bbe48]{border-bottom:1px solid #e0e0e0;flex-shrink:0;margin-bottom:12px;padding-bottom:12px;font-size:15px}.detail-category[data-v-b84bbe48]{color:#999;font-size:13px}.detail-separator[data-v-b84bbe48]{color:#999;margin:0 6px}.detail-name[data-v-b84bbe48]{color:#1a1a1a;font-weight:600}.detail-loading[data-v-b84bbe48]{color:#999;flex:1;justify-content:center;align-items:center;font-size:13px;display:flex}.detail-breadcrumb[data-v-b84bbe48]{border-bottom:1px solid #e0e0e0;flex-shrink:0;align-items:center;gap:8px;margin-bottom:12px;padding:8px 0 12px;display:flex}.back-btn[data-v-b84bbe48]{color:#333;cursor:pointer;background:0 0;border:none;border-radius:4px;align-items:center;gap:4px;padding:2px 6px;font-size:13px;display:flex}.back-btn[data-v-b84bbe48]:hover{background:#3333330f}.breadcrumb-path[data-v-b84bbe48]{color:#999;font-size:13px}.detail-content[data-v-b84bbe48]{flex:1;min-height:0;padding-bottom:12px;overflow-y:auto}.detail-content[data-v-b84bbe48] hr{border:none;margin:12px 0}.detail-files[data-v-b84bbe48]{border-top:1px solid #e0e0e0;flex-shrink:0;margin-top:12px;padding-top:12px}.files-header[data-v-b84bbe48]{color:#999;text-transform:uppercase;letter-spacing:.3px;margin-bottom:6px;font-size:12px;font-weight:600}.files-list[data-v-b84bbe48]{flex-wrap:wrap;gap:4px;display:flex}.file-item[data-v-b84bbe48]{color:#666;cursor:pointer;background:#f0f0f0;border:1px solid #e0e0e0;border-radius:6px;align-items:center;gap:4px;padding:4px 8px;font-size:12px;transition:all .15s;display:flex}.file-item[data-v-b84bbe48]:hover{color:#333;border-color:#333}.skills-view[data-v-de212856]{flex-direction:column;height:100vh;display:flex}.skills-header[data-v-de212856]{border-bottom:1px solid #e0e0e0;flex-shrink:0;justify-content:space-between;align-items:center;gap:12px;padding:12px 20px;display:flex}.header-title[data-v-de212856]{color:#1a1a1a;flex-shrink:0;font-size:16px;font-weight:600}.search-input[data-v-de212856]{width:220px}.skills-content[data-v-de212856]{flex:1;overflow:hidden}.skills-loading[data-v-de212856]{color:#999;justify-content:center;align-items:center;height:100%;font-size:13px;display:flex}.skills-layout[data-v-de212856]{height:100%;display:flex}.skills-sidebar[data-v-de212856]{border-right:1px solid #e0e0e0;flex-direction:column;flex-shrink:0;width:280px;min-height:0;display:flex;overflow:hidden}.skills-main[data-v-de212856]{flex:1;min-width:0;min-height:0;padding:16px 20px;overflow-y:auto}.empty-detail[data-v-de212856]{color:#999;flex-direction:column;justify-content:center;align-items:center;gap:12px;height:100%;font-size:13px;display:flex}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,I as t,P as n,R as r,S as i,V as a,_ as o,at as s,b as c,ct as l,g as u,h as d,m as f,ot as p,u as m,v as h,x as g}from"./vue.runtime.esm-bundler-BoqZ7fRe.js";import{t as _,vt as v}from"./_plugin-vue_export-helper-C7dadZ10.js";import{t as y}from"./Input-CCmp4iGM.js";import{t as b}from"./MarkdownRenderer-C2pkccH2.js";import{i as x,n as S,r as C}from"./skills-C6QBmS9j.js";var w={class:`skill-list`},T={key:0,class:`skill-empty`},E=[`onClick`],D={class:`category-name`},O={class:`category-count`},k={key:0,class:`category-skills`},A=[`onClick`],j={class:`skill-name`},M={key:0,class:`skill-desc`},N=_(i({__name:`SkillList`,props:{categories:{},selectedSkill:{},searchQuery:{}},emits:[`select`],setup(n,{emit:i}){let{t:a}=v(),c=n,u=i,g=e(new Set),_=f(()=>{if(!c.searchQuery)return c.categories;let e=c.searchQuery.toLowerCase();return c.categories.map(t=>({...t,skills:t.skills.filter(t=>t.name.toLowerCase().includes(e)||t.description.toLowerCase().includes(e))})).filter(t=>t.skills.length>0||t.name.toLowerCase().includes(e))});function y(e){g.value.has(e)?g.value.delete(e):g.value.add(e)}function b(e,t){u(`select`,e,t)}return(e,i)=>(t(),h(`div`,w,[_.value.length===0?(t(),h(`div`,T,l(n.searchQuery?s(a)(`skills.noMatch`):s(a)(`skills.noSkills`)),1)):o(``,!0),(t(!0),h(m,null,r(_.value,e=>(t(),h(`div`,{key:e.name,class:`skill-category`},[d(`button`,{class:`category-header`,onClick:t=>y(e.name)},[(t(),h(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,class:p([`category-arrow`,{collapsed:g.value.has(e.name)}])},[...i[0]||=[d(`polyline`,{points:`6 9 12 15 18 9`},null,-1)]],2)),d(`span`,D,l(e.name),1),d(`span`,O,l(e.skills.length),1)],8,E),g.value.has(e.name)?o(``,!0):(t(),h(`div`,k,[(t(!0),h(m,null,r(e.skills,r=>(t(),h(`button`,{key:r.name,class:p([`skill-item`,{active:n.selectedSkill===`${e.name}/${r.name}`}]),onClick:t=>b(e.name,r.name)},[d(`span`,j,l(r.name),1),r.description?(t(),h(`span`,M,l(r.description),1)):o(``,!0)],10,A))),128))]))]))),128))]))}}),[[`__scopeId`,`data-v-3f6a9b66`]]),P={class:`skill-detail`},F={class:`detail-title`},I={class:`detail-category`},L={class:`detail-name`},R={key:0,class:`detail-loading`},z={key:0,class:`detail-breadcrumb`},B={class:`breadcrumb-path`},V={class:`detail-content`},H={key:1,class:`detail-files`},U={class:`files-header`},W={class:`files-list`},G=[`onClick`],K=_(i({__name:`SkillDetail`,props:{category:{},skill:{}},setup(n){let{t:i}=v(),f=n,p=e(``),g=e([]),_=e(!1),y=e(``),x=e(null),w=e(!1);async function T(){_.value=!0,x.value=null,y.value=``,g.value=[],p.value=``;try{let e=`${f.category}/${f.skill}/SKILL.md`,[t,n]=await Promise.all([S(e),C(f.category,f.skill)]);p.value=t,g.value=n.filter(e=>!e.isDir&&e.path!==`SKILL.md`)}catch(e){p.value=i(`skills.loadFailed`)+`: ${e.message}`}finally{_.value=!1}}async function E(e){w.value=!0,x.value=e;try{let t=`${f.category}/${f.skill}/`,n=e;if(e.startsWith(`/`)){let t=e.split(`/.hermes/skills/`)[1];t&&(n=t.split(`/`).slice(2).join(`/`))}y.value=await S(`${t}${n}`)}catch(e){y.value=i(`skills.fileLoadFailed`)+`: ${e.message}`}finally{w.value=!1}}function D(){x.value=null,y.value=``}return a(()=>`${f.category}/${f.skill}`,T,{immediate:!0}),(e,a)=>(t(),h(`div`,P,[d(`div`,F,[d(`span`,I,l(n.category),1),a[0]||=d(`span`,{class:`detail-separator`},`/`,-1),d(`span`,L,l(n.skill),1)]),_.value&&!p.value?(t(),h(`div`,R,l(s(i)(`common.loading`)),1)):(t(),h(m,{key:1},[x.value?(t(),h(`div`,z,[d(`button`,{class:`back-btn`,onClick:D},[a[1]||=d(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[d(`polyline`,{points:`15 18 9 12 15 6`})],-1),c(` `+l(s(i)(`skills.backTo`))+` `+l(n.skill),1)]),d(`span`,B,l(x.value),1)])):o(``,!0),d(`div`,V,[x.value?(t(),u(b,{key:0,content:y.value},null,8,[`content`])):(t(),u(b,{key:1,content:p.value},null,8,[`content`]))]),!x.value&&g.value.length>0?(t(),h(`div`,H,[d(`div`,U,l(s(i)(`skills.attachedFiles`)),1),d(`div`,W,[(t(!0),h(m,null,r(g.value,e=>(t(),h(`button`,{key:e.path,class:`file-item`,onClick:t=>E(e.path)},[a[2]||=d(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},[d(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),d(`polyline`,{points:`14 2 14 8 20 8`})],-1),d(`span`,null,l(e.path),1)],8,G))),128))])])):o(``,!0)],64))]))}}),[[`__scopeId`,`data-v-b84bbe48`]]),q={class:`skills-view`},J={class:`skills-header`},Y={class:`header-title`},X={class:`skills-content`},Z={key:0,class:`skills-loading`},Q={key:1,class:`skills-layout`},$={class:`skills-sidebar`},ee={class:`skills-main`},te={key:1,class:`empty-detail`},ne=_(i({__name:`SkillsView`,setup(r){let{t:i}=v(),a=e([]),o=e(!1),c=e(``),f=e(``),p=e(``);n(m);async function m(){o.value=!0;try{a.value=await x()}catch(e){console.error(`Failed to load skills:`,e)}finally{o.value=!1}}function _(e,t){c.value=e,f.value=t}return(e,n)=>(t(),h(`div`,q,[d(`header`,J,[d(`h2`,Y,l(s(i)(`skills.title`)),1),g(s(y),{value:p.value,"onUpdate:value":n[0]||=e=>p.value=e,placeholder:s(i)(`skills.searchPlaceholder`),size:`small`,clearable:``,class:`search-input`},null,8,[`value`,`placeholder`])]),d(`div`,X,[o.value&&a.value.length===0?(t(),h(`div`,Z,`Loading...`)):(t(),h(`div`,Q,[d(`div`,$,[g(N,{categories:a.value,"selected-skill":c.value&&f.value?`${c.value}/${f.value}`:null,"search-query":p.value,onSelect:_},null,8,[`categories`,`selected-skill`,`search-query`])]),d(`div`,ee,[c.value&&f.value?(t(),u(K,{key:0,category:c.value,skill:f.value},null,8,[`category`,`skill`])):(t(),h(`div`,te,[...n[1]||=[d(`svg`,{width:`48`,height:`48`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1`,opacity:`0.2`},[d(`polygon`,{points:`12 2 2 7 12 12 22 7 12 2`}),d(`polyline`,{points:`2 17 12 22 22 17`}),d(`polyline`,{points:`2 12 12 17 22 12`})],-1),d(`span`,null,`Select a skill from the list`,-1)]]))])]))])]))}}),[[`__scopeId`,`data-v-de212856`]]);export{ne as default};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import{$ as e,H as t,S as n,m as r,n as i,w as a}from"./vue.runtime.esm-bundler-BoqZ7fRe.js";import{B as o,V as s,a as c,ft as l,i as u,l as d,ot as f,r as p,st as m,ut as h}from"./_plugin-vue_export-helper-C7dadZ10.js";import{a as g,x as _}from"./Suffix-CKUJBJSi.js";import{n as v}from"./Close-BAvirVyH.js";function y(e){let{opacityDisabled:t,heightTiny:n,heightSmall:r,heightMedium:i,heightLarge:a,heightHuge:o,primaryColor:s,fontSize:c}=e;return{fontSize:c,textColor:s,sizeTiny:n,sizeSmall:r,sizeMedium:i,sizeLarge:a,sizeHuge:o,color:s,opacitySpinning:t}}var b={name:`Spin`,common:p,self:y},x=f([f(`@keyframes spin-rotate`,`
|
|
2
|
-
from {
|
|
3
|
-
transform: rotate(0);
|
|
4
|
-
}
|
|
5
|
-
to {
|
|
6
|
-
transform: rotate(360deg);
|
|
7
|
-
}
|
|
8
|
-
`),m(`spin-container`,`
|
|
9
|
-
position: relative;
|
|
10
|
-
`,[m(`spin-body`,`
|
|
11
|
-
position: absolute;
|
|
12
|
-
top: 50%;
|
|
13
|
-
left: 50%;
|
|
14
|
-
transform: translateX(-50%) translateY(-50%);
|
|
15
|
-
`,[g()])]),m(`spin-body`,`
|
|
16
|
-
display: inline-flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
`),m(`spin`,`
|
|
21
|
-
display: inline-flex;
|
|
22
|
-
height: var(--n-size);
|
|
23
|
-
width: var(--n-size);
|
|
24
|
-
font-size: var(--n-size);
|
|
25
|
-
color: var(--n-color);
|
|
26
|
-
`,[h(`rotate`,`
|
|
27
|
-
animation: spin-rotate 2s linear infinite;
|
|
28
|
-
`)]),m(`spin-description`,`
|
|
29
|
-
display: inline-block;
|
|
30
|
-
font-size: var(--n-font-size);
|
|
31
|
-
color: var(--n-text-color);
|
|
32
|
-
transition: color .3s var(--n-bezier);
|
|
33
|
-
margin-top: 8px;
|
|
34
|
-
`),m(`spin-content`,`
|
|
35
|
-
opacity: 1;
|
|
36
|
-
transition: opacity .3s var(--n-bezier);
|
|
37
|
-
pointer-events: all;
|
|
38
|
-
`,[h(`spinning`,`
|
|
39
|
-
user-select: none;
|
|
40
|
-
-webkit-user-select: none;
|
|
41
|
-
pointer-events: none;
|
|
42
|
-
opacity: var(--n-opacity-spinning);
|
|
43
|
-
`)])]),S={small:20,medium:18,large:16},C=n({name:`Spin`,props:Object.assign(Object.assign(Object.assign({},d.props),{contentClass:String,contentStyle:[Object,String],description:String,size:{type:[String,Number],default:`medium`},show:{type:Boolean,default:!0},rotate:{type:Boolean,default:!0},spinning:{type:Boolean,validator:()=>!0,default:void 0},delay:Number}),c),slots:Object,setup(n){let{mergedClsPrefixRef:i,inlineThemeDisabled:a}=s(n),c=d(`Spin`,`-spin`,x,b,n,i),u=r(()=>{let{size:e}=n,{common:{cubicBezierEaseInOut:t},self:r}=c.value,{opacitySpinning:i,color:a,textColor:o}=r;return{"--n-bezier":t,"--n-opacity-spinning":i,"--n-size":typeof e==`number`?_(e):r[l(`size`,e)],"--n-color":a,"--n-text-color":o}}),f=a?o(`spin`,r(()=>{let{size:e}=n;return typeof e==`number`?String(e):e[0]}),u,n):void 0,p=v(n,[`spinning`,`show`]),m=e(!1);return t(e=>{let t;if(p.value){let{delay:r}=n;if(r){t=window.setTimeout(()=>{m.value=!0},r),e(()=>{clearTimeout(t)});return}}m.value=p.value}),{mergedClsPrefix:i,active:m,mergedStrokeWidth:r(()=>{let{strokeWidth:e}=n;if(e!==void 0)return e;let{size:t}=n;return S[typeof t==`number`?`medium`:t]}),cssVars:a?void 0:u,themeClass:f?.themeClass,onRender:f?.onRender}},render(){var e;let{$slots:t,mergedClsPrefix:n,description:r}=this,o=t.icon&&this.rotate,s=(r||t.description)&&a(`div`,{class:`${n}-spin-description`},r||t.description?.call(t)),c=t.icon?a(`div`,{class:[`${n}-spin-body`,this.themeClass]},a(`div`,{class:[`${n}-spin`,o&&`${n}-spin--rotate`],style:t.default?``:this.cssVars},t.icon()),s):a(`div`,{class:[`${n}-spin-body`,this.themeClass]},a(u,{clsPrefix:n,style:t.default?``:this.cssVars,stroke:this.stroke,"stroke-width":this.mergedStrokeWidth,radius:this.radius,scale:this.scale,class:`${n}-spin`}),s);return(e=this.onRender)==null||e.call(this),t.default?a(`div`,{class:[`${n}-spin-container`,this.themeClass],style:this.cssVars},a(`div`,{class:[`${n}-spin-content`,this.active&&`${n}-spin-content--spinning`,this.contentClass],style:this.contentStyle},t),a(i,{name:`fade-in-transition`},{default:()=>this.active?c:null})):c}});export{C as t};
|