@wpic/ui 0.9.26 → 0.9.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/wpic-ui.cjs +1 -1
- package/dist/wpic-ui.js +10 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# 0.9.28
|
|
2
|
+
|
|
3
|
+
- Expand the minimized chat launcher without opening conversation history.
|
|
4
|
+
|
|
5
|
+
# 0.9.27
|
|
6
|
+
|
|
7
|
+
- Use base text size throughout the chat history menu, including empty states.
|
|
8
|
+
|
|
1
9
|
## 0.9.26
|
|
2
10
|
|
|
3
11
|
- Keep the chat scroll viewport above the composer so its scrollbar and last message stay visible.
|
package/dist/wpic-ui.cjs
CHANGED
|
@@ -9316,4 +9316,4 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
|
|
|
9316
9316
|
395 0 194 -4 347 -10 361 -8 23 -15 26 -60 26 -46 0 -51 -3 -61 -27z M7748
|
|
9317
9317
|
1329 c-17 -9 -18 -43 -18 -489 0 -464 1 -480 19 -490 25 -13 77 -13 102 0 18
|
|
9318
9318
|
10 19 26 19 490 0 464 -1 480 -19 490 -25 13 -81 13 -103 -1z`})],-1)])],8,Yt)):(e.openBlock(),e.createElementBlock("span",Qt,e.toDisplayString(i.value.slice(0,2)),1))}}),Xt=v1(Jt,[["__scopeId","data-v-eb1a885f"]]),Gt=["width","height"],_t=["width","height"],ec=["width","height"],nc=["width","height"],tc=["width","height"],cc=["width","height"],ic=["width","height"],lc=["width","height"],ac=["width","height"],oc=["width","height"],rc=["width","height"],sc=["width","height"],pc=["width","height"],dc=["width","height"],wc={key:14,class:"wpic:text-[10px] wpic:font-bold wpic:leading-none wpic:shrink-0 wpic:opacity-60 wpic:uppercase"},uc=e.defineComponent({__name:"ProviderLogo",props:{model:{},size:{}},setup(n){const s=n,t=s.size??14,l=(s.model??"").split(":")[0].toLowerCase();return(o,c)=>e.unref(l)==="openai"?(e.openBlock(),e.createElementBlock("svg",{key:0,width:e.unref(t),height:e.unref(t),viewBox:"0 0 24 24",fill:"currentColor","fill-rule":"evenodd",class:"wpic:shrink-0"},[...c[0]||(c[0]=[e.createElementVNode("path",{d:"M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"},null,-1)])],8,Gt)):e.unref(l)==="google"?(e.openBlock(),e.createElementBlock("svg",{key:1,width:e.unref(t),height:e.unref(t),viewBox:"0 0 24 24",fill:"currentColor","fill-rule":"evenodd",class:"wpic:shrink-0"},[...c[1]||(c[1]=[e.createElementVNode("path",{d:"M23 12.245c0-.905-.075-1.565-.236-2.25h-10.54v4.083h6.186c-.124 1.014-.797 2.542-2.294 3.569l-.021.136 3.332 2.53.23.022C21.779 18.417 23 15.593 23 12.245z"},null,-1),e.createElementVNode("path",{d:"M12.225 23c3.03 0 5.574-.978 7.433-2.665l-3.542-2.688c-.948.648-2.22 1.1-3.891 1.1a6.745 6.745 0 01-6.386-4.572l-.132.011-3.465 2.628-.045.124C4.043 20.531 7.835 23 12.225 23z"},null,-1),e.createElementVNode("path",{d:"M5.84 14.175A6.65 6.65 0 015.463 12c0-.758.138-1.491.361-2.175l-.006-.147-3.508-2.67-.115.054A10.831 10.831 0 001 12c0 1.772.436 3.447 1.197 4.938l3.642-2.763z"},null,-1),e.createElementVNode("path",{d:"M12.225 5.253c2.108 0 3.529.892 4.34 1.638l3.167-3.031C17.787 2.088 15.255 1 12.225 1 7.834 1 4.043 3.469 2.197 7.062l3.63 2.763a6.77 6.77 0 016.398-4.572z"},null,-1)])],8,_t)):e.unref(l)==="anthropic"?(e.openBlock(),e.createElementBlock("svg",{key:2,width:e.unref(t),height:e.unref(t),viewBox:"0 0 24 24",fill:"currentColor","fill-rule":"evenodd",class:"wpic:shrink-0"},[...c[2]||(c[2]=[e.createElementVNode("path",{d:"M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z"},null,-1)])],8,ec)):e.unref(l)==="bfl"?(e.openBlock(),e.createElementBlock("svg",{key:3,width:e.unref(t),height:e.unref(t),viewBox:"0 0 24 24",fill:"currentColor","fill-rule":"evenodd",class:"wpic:shrink-0"},[...c[3]||(c[3]=[e.createElementVNode("path",{d:"M0 20.683L12.01 2.5 24 20.683h-2.233L12.009 5.878 3.471 18.806h12.122l1.239 1.877H0z"},null,-1),e.createElementVNode("path",{d:"M8.069 16.724l2.073-3.115 2.074 3.115H8.069zM18.24 20.683l-5.668-8.707h2.177l5.686 8.707h-2.196zM19.74 11.676l2.13-3.19 2.13 3.19h-4.26z"},null,-1)])],8,nc)):e.unref(l)==="runway"?(e.openBlock(),e.createElementBlock("svg",{key:4,width:e.unref(t),height:e.unref(t),viewBox:"0 0 24 24",fill:"currentColor","fill-rule":"evenodd",class:"wpic:shrink-0"},[...c[4]||(c[4]=[e.createElementVNode("path",{d:"M17.86 22.992c-2.669.245-4.887-2.876-6.597-4.454C10.398 24.759 1 24.177 1 17.86V6.15c0-.921.244-1.861.733-2.65C2.635 1.977 4.383.98 6.15 1h11.71c6.316 0 6.918 9.398.677 10.243l2.97 2.951c3.252 3.064.808 8.929-3.646 8.797zm-1.428-3.721c1.842 1.898 4.774-1.034 2.876-2.876l-5.132-5.132H11.3v2.876l4.436 4.436.696.696zM4.12 17.842c-.037 2.632 4.117 2.632 4.06 0V6.132c.038-1.316-1.353-2.35-2.612-1.955-.057.019-.113.037-.15.056-.79.301-1.335 1.09-1.317 1.936v11.673h.02zm13.74-9.68c2.632.037 2.632-4.098 0-4.06h-6.973c.526 1.109.395 2.857.413 4.06h6.56z"},null,-1)])],8,tc)):e.unref(l)==="kling"?(e.openBlock(),e.createElementBlock("svg",{key:5,width:e.unref(t),height:e.unref(t),viewBox:"0 0 24 24",fill:"currentColor","fill-rule":"evenodd",class:"wpic:shrink-0"},[...c[5]||(c[5]=[e.createElementVNode("path",{d:"M5.493 21.234c-1.112-1.451-1.109-4.263-.081-7.459l-4.557-2.63a1.683 1.683 0 01-.85-1.304 1.505 1.505 0 01.08-.622 13.18 13.18 0 011.037-2.255c3.476-6.02 10.916-8.23 16.619-4.938.46.266.82.67 1.081 1.184.785 1.545.685 4.096-.234 6.954l4.557 2.631c.339.196.596.492.736.832a1.53 1.53 0 01.034 1.093 13.146 13.146 0 01-1.037 2.255c-3.476 6.02-10.916 8.23-16.619 4.938a2.6 2.6 0 01-.766-.68zm11.096-6.615c-2.073 3.591-5.808 5.316-8.343 3.852-1.267-.731-1.994-2.122-2.145-3.778-.095-1.035.036-2.173.4-3.32.217-.684.517-1.37.902-2.039l.008-.014c2.073-3.59 5.808-5.315 8.343-3.852.633.366 1.13.895 1.49 1.54.986 1.772.922 4.415-.285 6.914-.111.23-.232.457-.362.683l-.008.014z"},null,-1)])],8,cc)):e.unref(l)==="elevenlabs"?(e.openBlock(),e.createElementBlock("svg",{key:6,width:e.unref(t),height:e.unref(t),viewBox:"0 0 24 24",fill:"currentColor","fill-rule":"evenodd",class:"wpic:shrink-0"},[...c[6]||(c[6]=[e.createElementVNode("path",{d:"M5 0h5v24H5V0zM14 0h5v24h-5V0z"},null,-1)])],8,ic)):e.unref(l)==="ideogram"?(e.openBlock(),e.createElementBlock("svg",{key:7,width:e.unref(t),height:e.unref(t),viewBox:"0 0 24 24",fill:"currentColor","fill-rule":"evenodd",class:"wpic:shrink-0"},[...c[7]||(c[7]=[e.createElementVNode("path",{d:"M17.768 1.482a6.4 6.4 0 012.988 3.78c.19.068.377.154.555.257.026.015.05.03.073.047.226.137.436.301.627.49a3.377 3.377 0 01-.105 4.875 3.376 3.376 0 01-.216 5.158l-.037.029.021.032c.39.602.585 1.324.534 2.065l-.009.11a3.377 3.377 0 01-4.658 2.777 3.377 3.377 0 01-5.846.971 4.052 4.052 0 01-1.635.397c-.04.005-.082.008-.125.008h-.897l-.068-.003c-1.116-.067-1.093-1.775.068-1.775h.804l.046-.004.047-.001a2.3 2.3 0 00.079-4.6.735.735 0 01-.08.005H2.808a.889.889 0 010-1.778h7.034l.046-.004.048-.001a2.3 2.3 0 00.509-4.544l-.141-.031a2.188 2.188 0 00-.299-.046.759.759 0 01-.07.003H2.808a.889.889 0 110-1.777h7.035l.046-.004.047-.001a2.3 2.3 0 00.087-4.6.972.972 0 01-.087.004h-.897L8.97 3.32c-1.116-.067-1.093-1.775.068-1.775h.8a.9.9 0 01.097-.005c.402 0 .79.058 1.157.166l.031-.02a6.399 6.399 0 016.645-.203zm-3.737 11.484l-.068.036-.083.051a4.08 4.08 0 01-1.404 2.153 4.07 4.07 0 011.537 3.189 4.06 4.06 0 01-.92 2.579 1.599 1.599 0 002.824-1.322l-.03-.124-.013-.079-.005-.056-.001-.042.001-.058.005-.053.013-.078.018-.072.022-.064.035-.079.005-.01a.869.869 0 01.158-.217l.055-.052.041-.032.05-.035.042-.026.055-.03.073-.03.056-.02.04-.011.078-.016.073-.009.045-.002h.048l.041.002.058.006.056.01.062.015.031.01.049.017.054.023.044.021.053.031.035.023c.06.042.114.09.163.147l.038.046.034.048a1.6 1.6 0 102.4-2.07 3.256 3.256 0 01-.473.007l-.057-.005-.026-.005h-.016a3.376 3.376 0 01-2.985-2.568l-.026-.116a1.6 1.6 0 00-2.285-1.133zm-4.416 4.595a.889.889 0 110 1.777H5.939a.889.889 0 010-1.777h3.676zm9.208-10.503a1.6 1.6 0 00-.797 1.3l-.002.085a.889.889 0 01-.83.887l-.059.002a.889.889 0 01-.887-.83l-.002-.059a1.6 1.6 0 00-2.528-1.301 4.089 4.089 0 01-1.255 1.674 4.083 4.083 0 011.451 2.308 3.374 3.374 0 014.125 2.532l.02.093a1.6 1.6 0 001.395 1.26l.124.01.042.002c.06 0 .12-.003.18-.01l.085-.011.062-.015a1.6 1.6 0 00-.245-3.163l-.079-.002a.887.887 0 01-.683-.32l-.034-.044a.884.884 0 01-.154-.702.889.889 0 01.807-.71l.064-.001a1.6 1.6 0 001.134-2.728 1.6 1.6 0 00-.786-.426l-.102-.019a.856.856 0 01-.076-.016 1.592 1.592 0 00-.97.204zm-9.199 4.08a.889.889 0 010 1.778H.89a.889.889 0 010-1.777h8.735zm-.01-6.432a.889.889 0 110 1.777H5.94a.889.889 0 110-1.777h3.676zm3.297-1.954l-.053.021a4.065 4.065 0 011.126 2.36 3.375 3.375 0 013.151 1.027 3.366 3.366 0 011.695-1 4.621 4.621 0 00-5.919-2.408z"},null,-1)])],8,lc)):e.unref(l)==="recraft"?(e.openBlock(),e.createElementBlock("svg",{key:8,width:e.unref(t),height:e.unref(t),viewBox:"0 0 24 24",fill:"currentColor","fill-rule":"evenodd",class:"wpic:shrink-0"},[...c[8]||(c[8]=[e.createElementVNode("path",{d:"M19.667 8.275c0-4.57-4.15-8.275-9.27-8.275-1.774 0-3.213 3.705-3.213 8.275 0 1.143.09 2.233.253 3.224H4.29L1 23h9.4v-6.447c5.117 0 9.266-3.707 9.266-8.275l.001-.002zm-9.27-6.76c.93 0 1.682 3.028 1.682 6.76 0 3.733-.752 6.76-1.681 6.76-.93 0-1.681-3.027-1.681-6.76 0-3.732.752-6.76 1.68-6.76z"},null,-1),e.createElementVNode("path",{d:"M19.848 16.552h-9.44L14.028 23h9.438l-3.618-6.448z"},null,-1)])],8,ac)):e.unref(l)==="fal"?(e.openBlock(),e.createElementBlock("svg",{key:9,width:e.unref(t),height:e.unref(t),viewBox:"0 0 24 24",fill:"currentColor","fill-rule":"evenodd",class:"wpic:shrink-0"},[...c[9]||(c[9]=[e.createElementVNode("path",{d:"M15.477 0c.415 0 .749.338.788.752a7.775 7.775 0 006.985 6.984c.413.04.752.373.752.788v6.952c0 .415-.338.748-.752.788a7.775 7.775 0 00-6.985 6.984c-.04.414-.373.752-.788.752H8.525c-.416 0-.749-.338-.789-.752a7.775 7.775 0 00-6.984-6.984c-.414-.04-.752-.373-.752-.788V8.524c0-.415.338-.748.752-.788A7.775 7.775 0 007.736.752C7.776.338 8.11 0 8.526 0h6.95zM4.819 11.98a7.226 7.226 0 007.223 7.23 7.226 7.226 0 007.223-7.23c0-3.994-3.234-7.23-7.223-7.23a7.227 7.227 0 00-7.223 7.23z"},null,-1)])],8,oc)):e.unref(l)==="replicate"?(e.openBlock(),e.createElementBlock("svg",{key:10,width:e.unref(t),height:e.unref(t),viewBox:"0 0 24 24",fill:"currentColor","fill-rule":"evenodd",class:"wpic:shrink-0"},[...c[10]||(c[10]=[e.createElementVNode("path",{d:"M22 10.552v2.26h-7.932V22H11.54V10.552H22zM22 2v2.264H4.528V22H2V2h20zm0 4.276V8.54H9.296V22H6.768V6.276H22z"},null,-1)])],8,rc)):e.unref(l)==="jimeng"?(e.openBlock(),e.createElementBlock("svg",{key:11,width:e.unref(t),height:e.unref(t),viewBox:"0 0 24 24",fill:"currentColor","fill-rule":"evenodd",class:"wpic:shrink-0"},[...c[11]||(c[11]=[e.createElementVNode("path",{d:"M5.257 1.808C8.768 6.74 14.431 9.45 20.064 8.403a7.398 7.398 0 001.281-.38c.855-.33 1.975 1.01 1.326 1.658-.43.428-.84.82-1.208 1.147a51.149 51.149 0 01-8.389 6.044 51.146 51.146 0 01-9.49 4.263c-.453.15-.98.304-1.546.457-.885.238-1.484-1.4-.77-1.975.378-.306.713-.617.978-.927C5.969 14.336 6.299 8.174 3.717 2.697a18.2 18.2 0 01-.364-.84C2.995.98 4.042.335 4.656 1.055c.243.284.453.545.601.753zM19.53 13.695c-2.324 2.863-2.816 5.944-2.378 8.583l.024.16c.117.79-.816 1.277-1.448.788a12.813 12.813 0 00-.093-.072c-2.12-1.614-4.62-2.828-7.948-2.446a27.95 27.95 0 006.086-2.627c2.21-1.275 4.147-2.774 5.756-4.386z"},null,-1)])],8,sc)):e.unref(l)==="liblibai"?(e.openBlock(),e.createElementBlock("svg",{key:12,width:e.unref(t),height:e.unref(t),viewBox:"0 0 121 111",fill:"currentColor",class:"wpic:shrink-0"},[...c[12]||(c[12]=[e.createElementVNode("path",{d:"M 53.0 0.0 L 0.0 86.0 L 4.0 88.0 L 33.0 80.0 L 41.0 81.0 L 14.0 111.0 L 121.0 111.0 L 89.0 78.0 L 50.0 75.0 L 67.0 46.0 L 56.0 2.0 Z"},null,-1)])],8,pc)):e.unref(l)==="canvas"?(e.openBlock(),e.createElementBlock("svg",{key:13,width:e.unref(t),height:e.unref(t),viewBox:"0 0 24 24",fill:"currentColor",class:"wpic:shrink-0"},[...c[13]||(c[13]=[e.createElementVNode("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",fill:"none",stroke:"currentColor","stroke-width":"2"},null,-1),e.createElementVNode("path",{d:"M3 9h18M9 3v18"},null,-1)])],8,dc)):(e.openBlock(),e.createElementBlock("span",wc,e.toDisplayString(e.unref(l).slice(0,2)),1))}}),mc=["data-wpic-theme"],hc=e.defineComponent({__name:"WThemeProvider",props:{mode:{default:"auto"},preset:{default:"ui5"},colors:{}},setup(n){const s=n,t=F1(),l=e.ref("light");let o;e.onMounted(()=>{const w=()=>{l.value=document.documentElement.classList.contains("dark")?"dark":"light"};w(),o=new MutationObserver(w),o.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}),e.onBeforeUnmount(()=>o?.disconnect());const c=e.computed(()=>s.mode==="auto"?t.value?.mode??l.value:s.mode),i=e.computed(()=>({mode:c.value,variables:S2(c.value,s.colors?.[c.value])}));return e.provide(L2,i),(w,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"wpic-theme":i.value,dark:i.value?.mode==="dark"}),"data-wpic-theme":i.value?.mode,style:e.normalizeStyle(i.value?.variables)},[e.renderSlot(w.$slots,"default")],14,mc))}}),fc={class:"wpic-page-header wpic:min-w-0 wpic:text-[var(--wpic-legacy-text-main)]"},vc={class:"wpic:flex wpic:flex-wrap wpic:items-start wpic:justify-between wpic:gap-x-6 wpic:gap-y-4"},bc={class:"wpic:min-w-0 wpic:flex-1 wpic:basis-64"},gc={key:0,class:"wpic:mt-2 wpic:max-w-3xl wpic:text-sm wpic:leading-6 wpic:text-[var(--wpic-legacy-text-muted)]"},kc={key:1,class:"wpic:mt-2 wpic:text-xs wpic:text-[var(--wpic-legacy-text-muted)]"},Cc={key:0,class:"wpic:flex wpic:max-w-full wpic:flex-wrap wpic:items-center wpic:gap-2 wpic:[&>*]:max-w-full"},zc={key:0,class:"wpic:mt-5 wpic:min-w-0"},yc=e.defineComponent({__name:"WPageHeader",props:{title:{},description:{},headingLevel:{default:1}},setup(n){return(s,t)=>(e.openBlock(),e.createElementBlock("header",fc,[e.createElementVNode("div",vc,[e.createElementVNode("div",bc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(`h${n.headingLevel}`),{class:"wpic:text-2xl wpic:font-semibold wpic:leading-tight wpic:tracking-tight wpic:[overflow-wrap:anywhere]"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)])]),_:3})),n.description?(e.openBlock(),e.createElementBlock("p",gc,e.toDisplayString(n.description),1)):e.createCommentVNode("",!0),s.$slots.metadata?(e.openBlock(),e.createElementBlock("div",kc,[e.renderSlot(s.$slots,"metadata")])):e.createCommentVNode("",!0)]),s.$slots.actions?(e.openBlock(),e.createElementBlock("div",Cc,[e.renderSlot(s.$slots,"actions")])):e.createCommentVNode("",!0)]),s.$slots.filters?(e.openBlock(),e.createElementBlock("div",zc,[e.renderSlot(s.$slots,"filters")])):e.createCommentVNode("",!0)]))}}),xc=e.defineComponent({__name:"WEditableText",props:{modelValue:{},label:{},placeholder:{default:""},disabled:{type:Boolean,default:!1},maxLength:{default:160}},emits:["update:modelValue","commit"],setup(n,{emit:s}){const t=n,l=s,o=w=>({type:"doc",content:[{type:"paragraph",content:w?[{type:"text",text:w}]:[]}]});let c=t.modelValue;const i=q1.useEditor({extensions:[h0.extend({content:"paragraph"}),f0.extend({renderHTML:()=>["span",0]}),v0,b0.configure({limit:t.maxLength})],content:o(t.modelValue),editable:!t.disabled,editorProps:{attributes:{role:"textbox","aria-label":t.label,"aria-multiline":"false","data-placeholder":t.placeholder,spellcheck:"true"},handleKeyDown:(w,u)=>u.isComposing?!1:u.key==="Enter"?(u.preventDefault(),w.dom.blur(),!0):u.key==="Escape"?(u.preventDefault(),i.value?.commands.setContent(o(c)),w.dom.blur(),!0):!1,handlePaste:(w,u)=>{const C=u.clipboardData?.getData("text/plain");if(C==null)return!1;const{from:a,to:B}=w.state.selection,g=Math.max(0,t.maxLength-(w.state.doc.textContent.length-(B-a)));return w.dispatch(w.state.tr.insertText(C.replace(/\s*\r?\n\s*/g," ").slice(0,g),a,B)),!0}},onFocus:()=>{c=t.modelValue},onUpdate:({editor:w})=>l("update:modelValue",w.getText()),onBlur:({editor:w})=>{const u=w.getText().trim()||c;w.commands.setContent(o(u),{emitUpdate:!1}),l("update:modelValue",u),l("commit",u)}});return e.watch(()=>t.modelValue,w=>{i.value&&i.value.getText()!==w&&i.value.commands.setContent(o(w),{emitUpdate:!1})}),e.watch(()=>[t.disabled,t.label,t.placeholder],()=>{i.value?.setEditable(!t.disabled),i.value?.setOptions({editorProps:{attributes:{role:"textbox","aria-label":t.label,"aria-multiline":"false","aria-readonly":String(t.disabled),"data-placeholder":t.placeholder,spellcheck:"true",tabindex:t.disabled?"-1":"0"}}})}),(w,u)=>(e.openBlock(),e.createBlock(e.unref(q1.EditorContent),{editor:e.unref(i),class:"wpic-editable-text","data-empty":!n.modelValue},null,8,["editor","data-empty"]))}}),Bc=v1(xc,[["__scopeId","data-v-73472c2e"]]),U2=e.defineComponent({__name:"WChatEditor",props:{modelValue:{},placeholder:{},disabled:{type:Boolean},minLines:{},maxLines:{}},emits:["update:modelValue","submit"],setup(n,{expose:s,emit:t}){const l=n,o=t;function c(w){return{type:"doc",content:w.split(`
|
|
9319
|
-
`).map(u=>({type:"paragraph",content:u?[{type:"text",text:u}]:[]}))}}const i=q1.useEditor({extensions:[g0.configure({heading:!1,blockquote:!1,bulletList:!1,orderedList:!1,codeBlock:!1,horizontalRule:!1}),k0.configure({placeholder:()=>l.placeholder})],content:c(l.modelValue),editable:!l.disabled,editorProps:{attributes:{class:"wpic-chat-tiptap wpic:overflow-y-auto wpic:outline-none","aria-label":l.placeholder},handleKeyDown:(w,u)=>u.key!=="Enter"||u.shiftKey||u.isComposing||l.disabled?!1:(u.preventDefault(),o("submit"),!0)},onUpdate:({editor:w})=>{o("update:modelValue",w.getText())}});return e.watch(()=>l.modelValue,w=>{!i.value||i.value.getText()===w||i.value.commands.setContent(c(w),{emitUpdate:!1})}),e.watch(()=>l.placeholder,w=>{i.value?.setOptions({editorProps:{attributes:{class:"wpic-chat-tiptap wpic:overflow-y-auto wpic:outline-none","aria-label":w}}}),i.value&&i.value.view.dispatch(i.value.state.tr)}),e.watch(()=>l.disabled,w=>{i.value?.setEditable(!w)}),s({focus:()=>i.value?.commands.focus("end")}),(w,u)=>(e.openBlock(),e.createBlock(e.unref(q1.EditorContent),{editor:e.unref(i),class:"wpic-chat-editor wpic:min-w-0 wpic:flex-1 wpic:px-4 wpic:pb-3 wpic:pt-1.5 wpic:text-base wpic:leading-7 wpic:text-zinc-900 wpic:dark:text-zinc-100",style:e.normalizeStyle(`--chat-min-lines:${l.minLines??3};--chat-max-lines:${l.maxLines??6}`),onClick:u[0]||(u[0]=C=>e.unref(i)?.commands.focus())},null,8,["editor","style"]))}}),Mc={key:0,class:"wpic-chat-composer-corner-border","aria-hidden":"true"},Vc={key:1,class:"wpic:pointer-events-none wpic:absolute wpic:inset-px wpic:-z-10 wpic:rounded-[calc(1.5rem-1px)] wpic:bg-gradient-to-br wpic:from-white/25 wpic:via-white/25 wpic:to-indigo-50/25 wpic:backdrop-blur-md wpic:dark:from-zinc-900/80 wpic:dark:via-zinc-900/70 wpic:dark:to-indigo-950/50"},Ec=["aria-label","aria-expanded"],Nc={key:"editor",class:"wpic:min-w-0 wpic:flex-1 wpic:self-start wpic:px-1"},Sc={key:0,class:"wpic:flex wpic:max-h-14 wpic:flex-wrap wpic:gap-1.5 wpic:overflow-y-auto wpic:px-4 wpic:pb-1"},Lc={class:"wpic:truncate"},$c={key:2,class:"wpic:shrink-0 wpic:text-zinc-400"},Dc=["title","aria-label","onClick"],Fc=["aria-label","title"],Tc=["disabled","aria-label"],Ac=["accept"],Hc=["disabled","title","aria-label"],Pc={class:"wpic-chat-composer-menu wpic:py-1"},jc={key:0,class:"wpic:flex wpic:items-center wpic:gap-2 wpic:px-3 wpic:py-3 wpic:text-sm wpic:text-zinc-500 wpic:dark:text-zinc-400",role:"status"},Wc={key:1,class:"wpic:px-3 wpic:py-2 wpic:text-sm wpic:text-zinc-400 wpic:dark:text-zinc-500"},Ic={key:0,class:"wpic:border-b wpic:border-zinc-100 wpic:pb-1 wpic:dark:border-zinc-800"},Rc={class:"wpic:px-4 wpic:py-2 wpic:text-sm wpic:font-medium wpic:text-zinc-400 wpic:dark:text-zinc-500"},Zc=["aria-expanded","onFocus","onClick","onKeydown","onMouseenter"],Uc={class:"wpic:min-w-0 wpic:flex-1 wpic:truncate wpic:font-medium"},Kc={class:"wpic:text-zinc-400"},Oc={class:"wpic:px-4 wpic:py-2 wpic:text-sm wpic:font-medium wpic:text-zinc-400 wpic:dark:text-zinc-500"},qc=["onClick"],Yc={class:"wpic:min-w-0"},Qc={class:"wpic:flex wpic:items-center wpic:gap-2"},Jc={class:"wpic:truncate wpic:font-medium"},Xc={key:0,class:"wpic:shrink-0 wpic:rounded-full wpic:bg-indigo-100 wpic:px-1.5 wpic:py-0.5 wpic:text-[10px] wpic:font-semibold wpic:uppercase wpic:tracking-wide wpic:text-indigo-600 wpic:dark:bg-indigo-900/60 wpic:dark:text-indigo-300"},Gc={class:"wpic:mt-0.5 wpic:block wpic:truncate wpic:text-sm wpic:text-zinc-400 wpic:dark:text-zinc-500"},_c=["datetime"],ei={key:0,class:"wpic:px-3 wpic:py-2 wpic:text-sm wpic:text-zinc-400"},ni=["onClick"],ti={class:"wpic:truncate"},ci=["datetime"],ii=e.defineComponent({__name:"WChatComposer",props:{placeholder:{},disabled:{type:Boolean},showAttachments:{type:Boolean,default:!0},showHistory:{type:Boolean,default:!0},attachments:{default:()=>[]},projects:{default:()=>[]},sessions:{default:()=>[]},historyLoading:{type:Boolean},locale:{default:"en"},minimized:{type:Boolean,default:!1},accept:{default:".txt,.md,.csv,.json,.py,.ts,.vue,.js,.html,.css,.xml,.yaml,.yml,.xlsx,.xls"},conversationsLabel:{default:"Conversations"},removeAttachmentLabel:{default:"Remove attachment"},minimizeLabel:{default:"Minimize"},sendLabel:{default:"Send"},attachFilesLabel:{default:"Attach files"},loadingLabel:{default:"Loading"},noConversationsLabel:{default:"No conversations"},projectsLabel:{default:"Projects"},generalConversationLabel:{default:"General conversation"}},emits:["submit","select-session","request-history","files-selected","remove-attachment","update:minimized"],setup(n,{expose:s,emit:t}){const l=n,o=t,c=`wpic-chat-composer-${e.getCurrentInstance().uid}`,i=`url(#${c})`,w=e.ref(""),u=e.computed(()=>!l.attachments.some(h=>h.status==="loading")),C=e.computed(()=>!!w.value.trim()&&!l.disabled&&u.value),a=e.ref(null),B=e.ref(null),g=e.ref(null),z=e.ref(!1),M=e.computed({get:()=>l.minimized,set:h=>o("update:minimized",h)}),v=e.computed(()=>z.value||!M.value),f=e.computed(()=>w.value.trim()||l.placeholder),T=e.ref(!1);let U=null;const Y=e.ref(!1),Q=e.ref(null),R=e.ref(null);let F=null;e.watch(Y,h=>{h||(F&&clearTimeout(F),Q.value=null,R.value=null)});const N=e.computed(()=>{const h=new Map;for(const L of l.projects)h.set(L.id,[]);for(const L of l.sessions)L.projectId&&h.get(L.projectId)?.push(L);return h}),A=e.computed(()=>l.sessions.filter(h=>!h.projectId)),m=e.computed(()=>Q.value?N.value.get(Q.value)??[]:[]);function W(h,L){F&&clearTimeout(F),Q.value=h,R.value=L.currentTarget}function J(){F&&clearTimeout(F)}function l1(){F&&clearTimeout(F),F=setTimeout(()=>{Q.value=null,R.value=null},140)}function E(){Y.value=!Y.value,Y.value&&o("request-history")}function Z(){v.value||(M.value=!1),l.showHistory?E():e1()}function P(){Y.value=!1,z.value=!1,T.value=!1,M.value=!0}function a1(h){if(!h)return"";const L=new Date(h);return Number.isNaN(L.getTime())?"":new Intl.DateTimeFormat(l.locale,{month:"short",day:"numeric",year:L.getFullYear()===new Date().getFullYear()?void 0:"numeric"}).format(L)}function i1(h){Y.value=!1,o("select-session",h)}function X(){const h=w.value.trim();!h||l.disabled||!u.value||(o("submit",h),w.value="")}function j(h){B.value?.focus(),o("remove-attachment",h)}function D(){l.disabled||g.value?.click()}async function x(h){const L=h.target,y=Array.from(L.files??[]);L.value="",y.length&&(z.value=!0,o("files-selected",y),await e.nextTick(),B.value?.focus())}function I(h){return h?h<1024?`${h} B`:h<1024*1024?`${Math.round(h/1024)} KB`:`${(h/(1024*1024)).toFixed(1)} MB`:""}async function e1(){z.value||(z.value=!0,T.value=!1,U&&clearTimeout(U),U=setTimeout(()=>{T.value=!0,U=null},500)),await e.nextTick(),requestAnimationFrame(()=>B.value?.focus())}async function t1(h){w.value=h,await e1()}s({openWithPrompt:t1});function d1(h){if(Y.value||h&&!h.relatedTarget)return;const L=h?.relatedTarget;L instanceof Node&&a.value?.contains(L)||!h&&document.activeElement instanceof Node&&a.value?.contains(document.activeElement)||(z.value=!1,T.value=!1)}return e.onBeforeUnmount(()=>{U&&clearTimeout(U),F&&clearTimeout(F)}),(h,L)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wpic:pointer-events-none wpic-chat-composer-position wpic:fixed wpic:inset-x-3 wpic:bottom-20 wpic:z-[9100] wpic:flex wpic:sm:bottom-5",v.value?"wpic:justify-center":"wpic:justify-end"])},[e.createElementVNode("div",{ref_key:"composer",ref:a,class:e.normalizeClass(["wpic-chat-composer-surface wpic:pointer-events-auto wpic:relative wpic:isolate wpic:flex wpic:items-center wpic:overflow-visible wpic:transition-[width,max-width,height,padding,box-shadow,border-radius] wpic:duration-500 wpic:ease-[cubic-bezier(0.22,1,0.36,1)]",z.value?`${T.value?"wpic:h-auto":l.attachments.length?"wpic:h-[14.25rem]":"wpic:h-[10.75rem]"} wpic:min-h-[10.75rem] wpic:w-full wpic:max-w-2xl wpic:rounded-[1.5rem] wpic:border wpic:border-zinc-200/80 wpic:bg-transparent wpic:p-3 wpic:pb-14 wpic:shadow-xl wpic:shadow-zinc-950/10 wpic:dark:border-white/[0.08] wpic:dark:shadow-[0_20px_55px_-18px_rgba(99,102,241,0.22)]`:v.value?"wpic:h-16 wpic:w-full wpic:max-w-md wpic:rounded-[1.5rem] wpic:border wpic:border-zinc-200/80 wpic:bg-transparent wpic:p-3 wpic:shadow-xl wpic:shadow-zinc-950/10 wpic:dark:border-white/[0.08] wpic:dark:shadow-[0_18px_55px_-18px_rgba(0,0,0,0.7)]":"wpic:h-12 wpic:w-12 wpic:rounded-full wpic:border wpic:border-indigo-400/30 wpic:bg-gradient-to-br wpic:from-indigo-500 wpic:to-violet-600 wpic:p-0 wpic:text-white wpic:shadow-lg wpic:shadow-indigo-500/30 wpic:transition-transform wpic:hover:-translate-y-0.5 wpic:hover:shadow-xl wpic:hover:shadow-indigo-500/35 wpic:dark:from-indigo-400 wpic:dark:to-violet-500 wpic:dark:shadow-indigo-950/50"]),onFocusout:d1},[v.value?(e.openBlock(),e.createElementBlock("svg",Mc,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:c,x1:"0",y1:"0",x2:"1",y2:"1"},[...L[2]||(L[2]=[e.createStaticVNode('<stop offset="0%" stop-color="#38bdf8" stop-opacity="1"></stop><stop offset="18%" stop-color="#6366f1" stop-opacity="0.8"></stop><stop offset="38%" stop-color="#6366f1" stop-opacity="0"></stop><stop offset="62%" stop-color="#6366f1" stop-opacity="0"></stop><stop offset="82%" stop-color="#6366f1" stop-opacity="0.7"></stop><stop offset="100%" stop-color="#8b5cf6" stop-opacity="1"></stop>',6)])])]),e.createElementVNode("rect",{width:"100%",height:"100%",rx:"24",style:e.normalizeStyle({stroke:i})},null,4)])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("span",Vc)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["wpic:flex wpic:flex-none wpic:items-center wpic:justify-center wpic:transition-colors wpic:duration-200",v.value?`wpic:h-10 wpic:w-10 wpic:self-start wpic:text-zinc-500 wpic:hover:text-indigo-600 wpic:dark:text-zinc-100 wpic:dark:hover:text-violet-300 ${Y.value?"wpic:text-indigo-600 wpic:dark:text-violet-300":""}`:"wpic:h-full wpic:w-full wpic:self-center wpic:text-white"]),"aria-label":n.showHistory?n.conversationsLabel:n.placeholder,"aria-expanded":Y.value,onClick:Z},[e.createVNode(e.unref(k.Bot),{size:21})],10,Ec),e.createVNode(e.Transition,{name:"wpic-composer-content"},{default:e.withCtx(()=>[!z.value&&v.value?(e.openBlock(),e.createElementBlock("button",{key:"compact",type:"button",class:"wpic:min-w-0 wpic:flex-1 wpic:truncate wpic:px-4 wpic:py-2.5 wpic:text-left wpic:text-base wpic:text-zinc-500 wpic:transition-colors wpic:hover:text-zinc-900 wpic:dark:text-zinc-500 wpic:dark:hover:text-zinc-300",onClick:e1},e.toDisplayString(f.value),1)):z.value?(e.openBlock(),e.createElementBlock("div",Nc,[e.createVNode(U2,{ref_key:"editor",ref:B,modelValue:w.value,"onUpdate:modelValue":L[0]||(L[0]=y=>w.value=y),placeholder:n.placeholder,disabled:n.disabled,"min-lines":3,"max-lines":6,onSubmit:X},null,8,["modelValue","placeholder","disabled"]),l.attachments.length?(e.openBlock(),e.createElementBlock("div",Sc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.attachments,y=>(e.openBlock(),e.createElementBlock("span",{key:y.id,class:e.normalizeClass(["wpic:inline-flex wpic:max-w-56 wpic:items-center wpic:gap-1.5 wpic:rounded-lg wpic:bg-white/60 wpic:px-2 wpic:py-1 wpic:text-xs wpic:text-zinc-600 wpic:ring-1 wpic:ring-indigo-900/[0.06] wpic:dark:bg-black/20 wpic:dark:text-zinc-300 wpic:dark:ring-white/[0.06]",y.status==="error"?"wpic:bg-red-50/80 wpic:text-red-700 wpic:dark:bg-red-950/40 wpic:dark:text-red-300":""])},[y.status==="loading"?(e.openBlock(),e.createBlock(e.unref(k.Loader2),{key:0,size:12,class:"wpic:shrink-0 wpic:animate-spin"})):(e.openBlock(),e.createBlock(e.unref(k.Paperclip),{key:1,size:12,class:"wpic:shrink-0"})),e.createElementVNode("span",Lc,e.toDisplayString(y.name),1),I(y.bytes)?(e.openBlock(),e.createElementBlock("span",$c,e.toDisplayString(I(y.bytes)),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"wpic:ml-0.5 wpic:inline-flex wpic:h-4 wpic:w-4 wpic:shrink-0 wpic:items-center wpic:justify-center wpic:rounded-full wpic:text-zinc-400 wpic:transition wpic:hover:bg-black/5 wpic:hover:text-zinc-700 wpic:dark:hover:bg-white/10 wpic:dark:hover:text-zinc-100",title:n.removeAttachmentLabel,"aria-label":n.removeAttachmentLabel,onClick:q=>j(y)},[e.createVNode(e.unref(k.X),{size:10})],8,Dc)],2))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1}),v.value?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:e.normalizeClass(["wpic:flex wpic:h-10 wpic:w-10 wpic:flex-none wpic:items-center wpic:justify-center wpic:rounded-xl wpic:text-zinc-400 wpic:transition wpic:hover:bg-black/5 wpic:hover:text-zinc-700 wpic:dark:text-zinc-500 wpic:dark:hover:bg-white/10 wpic:dark:hover:text-zinc-200",z.value?"wpic:absolute wpic:right-3 wpic:top-3":""]),"aria-label":n.minimizeLabel,title:n.minimizeLabel,onClick:P},[e.createVNode(e.unref(k.MoveDownRight),{size:17})],10,Fc)):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"wpic-composer-send"},{default:e.withCtx(()=>[z.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"wpic:absolute wpic:bottom-3 wpic:right-3 wpic:flex wpic:h-10 wpic:w-10 wpic:items-center wpic:justify-center wpic:rounded-xl wpic:bg-gradient-to-br wpic:from-indigo-500 wpic:to-violet-600 wpic:text-white wpic:shadow-md wpic:shadow-indigo-500/25 wpic:transition wpic:duration-200 wpic:hover:-translate-y-0.5 wpic:hover:shadow-lg wpic:hover:shadow-indigo-500/30 wpic:active:translate-y-0 wpic:disabled:translate-y-0 wpic:disabled:cursor-default wpic:disabled:from-zinc-300 wpic:disabled:to-zinc-300 wpic:disabled:shadow-none wpic:dark:from-indigo-400 wpic:dark:to-violet-500 wpic:dark:shadow-indigo-950/40 wpic:dark:hover:shadow-indigo-500/20 wpic:dark:disabled:from-indigo-950 wpic:dark:disabled:to-violet-950 wpic:dark:disabled:text-indigo-300/40 wpic:dark:disabled:ring-1 wpic:dark:disabled:ring-inset wpic:dark:disabled:ring-indigo-400/10",disabled:!C.value,"aria-label":n.sendLabel,onClick:X},[n.disabled?(e.openBlock(),e.createBlock(e.unref(k.Loader2),{key:0,size:17,class:"wpic:animate-spin"})):(e.openBlock(),e.createBlock(e.unref(k.ArrowUp),{key:1,size:17,"stroke-width":"2.5"}))],8,Tc)):e.createCommentVNode("",!0)]),_:1}),n.showAttachments?(e.openBlock(),e.createElementBlock("input",{key:3,ref_key:"fileInput",ref:g,type:"file",multiple:"",class:"wpic:sr-only",accept:n.accept,onChange:x},null,40,Ac)):e.createCommentVNode("",!0),z.value&&n.showAttachments?(e.openBlock(),e.createElementBlock("button",{key:4,type:"button",class:"wpic:absolute wpic:bottom-3 wpic:left-3 wpic:flex wpic:h-10 wpic:w-10 wpic:items-center wpic:justify-center wpic:text-zinc-400 wpic:transition wpic:hover:text-zinc-700 wpic:disabled:opacity-40 wpic:dark:text-zinc-500 wpic:dark:hover:text-indigo-300",disabled:n.disabled,title:n.attachFilesLabel,"aria-label":n.attachFilesLabel,onClick:D},[e.createVNode(e.unref(k.Paperclip),{size:17})],8,Hc)):e.createCommentVNode("",!0)],34),e.createVNode(h1,{open:Y.value,anchor:a.value,placement:"top",width:"min(520px, calc(100vw - 16px))","max-height":"320px",onClose:L[1]||(L[1]=y=>Y.value=!1)},{default:e.withCtx(()=>[e.createElementVNode("div",Pc,[n.historyLoading?(e.openBlock(),e.createElementBlock("div",jc,[e.createVNode(e.unref(k.Loader2),{size:15,class:"wpic:animate-spin"}),e.createTextVNode(" "+e.toDisplayString(n.loadingLabel),1)])):l.sessions.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.projects.length?(e.openBlock(),e.createElementBlock("div",Ic,[e.createElementVNode("p",Rc,e.toDisplayString(n.projectsLabel),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.projects,y=>(e.openBlock(),e.createElementBlock("div",{key:y.id,class:"wpic:flex wpic:items-center wpic:gap-2 wpic:px-4 wpic:py-2 wpic:text-base wpic:text-zinc-700 wpic:hover:bg-zinc-50 wpic:dark:text-zinc-200 wpic:dark:hover:bg-zinc-800",tabindex:"0",role:"button","aria-expanded":Q.value===y.id,onFocus:q=>W(y.id,q),onClick:q=>W(y.id,q),onKeydown:[e.withKeys(e.withModifiers(q=>W(y.id,q),["prevent"]),["enter"]),e.withKeys(e.withModifiers(q=>W(y.id,q),["prevent"]),["space"])],onMouseenter:q=>W(y.id,q),onMouseleave:l1},[e.createElementVNode("span",Uc,e.toDisplayString(y.name),1),e.createElementVNode("span",Kc,e.toDisplayString(N.value.get(y.id)?.length??0),1),e.createVNode(e.unref(k.ChevronRight),{size:14,class:"wpic:text-zinc-400"})],40,Zc))),128))])):e.createCommentVNode("",!0),e.createElementVNode("p",Oc,e.toDisplayString(n.conversationsLabel),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,y=>(e.openBlock(),e.createElementBlock("button",{key:y.id,type:"button",class:e.normalizeClass(["wpic:grid wpic:w-full wpic:grid-cols-[minmax(0,1fr)_auto] wpic:items-center wpic:gap-5 wpic:px-4 wpic:py-3 wpic:text-left wpic:text-base wpic:text-zinc-700 wpic:transition wpic:hover:bg-zinc-50 wpic:dark:text-zinc-200 wpic:dark:hover:bg-zinc-800",y.highlighted?"wpic:bg-indigo-50/70 wpic:dark:bg-indigo-950/30":""]),onClick:q=>i1(y.id)},[e.createElementVNode("span",Yc,[e.createElementVNode("span",Qc,[e.createElementVNode("span",Jc,e.toDisplayString(y.title),1),y.badge?(e.openBlock(),e.createElementBlock("span",Xc,e.toDisplayString(y.badge),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",Gc,e.toDisplayString(y.subtitle||n.generalConversationLabel),1)]),y.updatedAt?(e.openBlock(),e.createElementBlock("time",{key:0,datetime:y.updatedAt,class:"wpic:whitespace-nowrap wpic:text-base wpic:text-zinc-400 wpic:dark:text-zinc-500"},e.toDisplayString(a1(y.updatedAt)),9,_c)):e.createCommentVNode("",!0)],10,qc))),128))],64)):(e.openBlock(),e.createElementBlock("p",Wc,e.toDisplayString(n.noConversationsLabel),1))]),e.createVNode(h1,{open:Y.value&&!!Q.value,anchor:R.value,placement:"right",width:"min(360px, calc(100vw - 16px))","max-height":"320px",offset:4,onClose:l1},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"wpic-chat-composer-menu wpic:py-1",onMouseenter:J,onMouseleave:l1},[m.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("p",ei,e.toDisplayString(n.noConversationsLabel),1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,y=>(e.openBlock(),e.createElementBlock("button",{key:y.id,type:"button",class:"wpic:grid wpic:w-full wpic:grid-cols-[minmax(0,1fr)_auto] wpic:gap-4 wpic:px-3 wpic:py-2 wpic:text-left wpic:text-base wpic:text-zinc-700 wpic:hover:bg-zinc-50 wpic:dark:text-zinc-200 wpic:dark:hover:bg-zinc-800",onClick:q=>i1(y.id)},[e.createElementVNode("span",ti,e.toDisplayString(y.title),1),y.updatedAt?(e.openBlock(),e.createElementBlock("time",{key:0,datetime:y.updatedAt,class:"wpic:whitespace-nowrap wpic:text-zinc-400"},e.toDisplayString(a1(y.updatedAt)),9,ci)):e.createCommentVNode("",!0)],8,ni))),128))],32)]),_:1},8,["open","anchor"])]),_:1},8,["open","anchor"])],2))}});exports.CollapseToggle=e7;exports.ConfirmModal=a7;exports.FormDate=P9;exports.FormInput=v9;exports.FormLabel=u9;exports.FormSelect=k9;exports.FormTextarea=h9;exports.MarketplaceIcon=Xt;exports.Modal=V6;exports.ProviderLogo=uc;exports.SearchSelect=Z7;exports.Table=Z9;exports.TableBody=J9;exports.TableCell=G9;exports.TableHead=q9;exports.TableRow=X9;exports.ToastContainer=j6;exports.TreeSelect=_7;exports.WActionMenu=o2;exports.WActionMenuItem=L1;exports.WActionPanel=w6;exports.WAlert=R8;exports.WAvatar=I8;exports.WBadge=C8;exports.WBanner=T2;exports.WBatchActionBar=Xe;exports.WBottomSheet=p2;exports.WButton=D1;exports.WButtonGroup=E2;exports.WCard=A2;exports.WChatComposer=ii;exports.WChatEditor=U2;exports.WChatPanel=t4;exports.WCheckbox=a2;exports.WDatePicker=Z2;exports.WDateRangePicker=Pe;exports.WEditableText=Bc;exports.WEmptyState=g8;exports.WEmptyValue=B4;exports.WFileList=l8;exports.WFilter=B0;exports.WFilterBar=ae;exports.WFormActions=i9;exports.WFormLabel=r2;exports.WImageTile=K8;exports.WInput=s2;exports.WLoader=f6;exports.WModal=B6;exports.WMonthPicker=qe;exports.WOptionPopover=F2;exports.WPageHeader=yc;exports.WPagination=p4;exports.WPillGroup=R2;exports.WPopover=h1;exports.WProgress=M8;exports.WSearchSelect=P2;exports.WSegmentedControl=_e;exports.WSelect=Y1;exports.WSelectOption=D2;exports.WSkeleton=u6;exports.WSlidePanel=w7;exports.WSlider=V4;exports.WSpinner=Q1;exports.WSplitButton=re;exports.WSpreadsheet=v3;exports.WStatCard=v8;exports.WTable=i3;exports.WTabs=O6;exports.WTag=S1;exports.WTagInput=R7;exports.WTailwindColorPicker=fe;exports.WTextarea=P8;exports.WThemeProvider=hc;exports.WToggle=b6;exports.WTooltip=W2;exports.WTrendBadge=I2;exports.WTwoColumnFormSection=s9;exports.WWorkflowNav=_6;exports.chartPalettes=z3;exports.themeVariables=S2;exports.ui5Theme=N2;exports.useRecentItems=j2;exports.useToastStore=H2;exports.useWTheme=F1;
|
|
9319
|
+
`).map(u=>({type:"paragraph",content:u?[{type:"text",text:u}]:[]}))}}const i=q1.useEditor({extensions:[g0.configure({heading:!1,blockquote:!1,bulletList:!1,orderedList:!1,codeBlock:!1,horizontalRule:!1}),k0.configure({placeholder:()=>l.placeholder})],content:c(l.modelValue),editable:!l.disabled,editorProps:{attributes:{class:"wpic-chat-tiptap wpic:overflow-y-auto wpic:outline-none","aria-label":l.placeholder},handleKeyDown:(w,u)=>u.key!=="Enter"||u.shiftKey||u.isComposing||l.disabled?!1:(u.preventDefault(),o("submit"),!0)},onUpdate:({editor:w})=>{o("update:modelValue",w.getText())}});return e.watch(()=>l.modelValue,w=>{!i.value||i.value.getText()===w||i.value.commands.setContent(c(w),{emitUpdate:!1})}),e.watch(()=>l.placeholder,w=>{i.value?.setOptions({editorProps:{attributes:{class:"wpic-chat-tiptap wpic:overflow-y-auto wpic:outline-none","aria-label":w}}}),i.value&&i.value.view.dispatch(i.value.state.tr)}),e.watch(()=>l.disabled,w=>{i.value?.setEditable(!w)}),s({focus:()=>i.value?.commands.focus("end")}),(w,u)=>(e.openBlock(),e.createBlock(e.unref(q1.EditorContent),{editor:e.unref(i),class:"wpic-chat-editor wpic:min-w-0 wpic:flex-1 wpic:px-4 wpic:pb-3 wpic:pt-1.5 wpic:text-base wpic:leading-7 wpic:text-zinc-900 wpic:dark:text-zinc-100",style:e.normalizeStyle(`--chat-min-lines:${l.minLines??3};--chat-max-lines:${l.maxLines??6}`),onClick:u[0]||(u[0]=C=>e.unref(i)?.commands.focus())},null,8,["editor","style"]))}}),Mc={key:0,class:"wpic-chat-composer-corner-border","aria-hidden":"true"},Vc={key:1,class:"wpic:pointer-events-none wpic:absolute wpic:inset-px wpic:-z-10 wpic:rounded-[calc(1.5rem-1px)] wpic:bg-gradient-to-br wpic:from-white/25 wpic:via-white/25 wpic:to-indigo-50/25 wpic:backdrop-blur-md wpic:dark:from-zinc-900/80 wpic:dark:via-zinc-900/70 wpic:dark:to-indigo-950/50"},Ec=["aria-label","aria-expanded"],Nc={key:"editor",class:"wpic:min-w-0 wpic:flex-1 wpic:self-start wpic:px-1"},Sc={key:0,class:"wpic:flex wpic:max-h-14 wpic:flex-wrap wpic:gap-1.5 wpic:overflow-y-auto wpic:px-4 wpic:pb-1"},Lc={class:"wpic:truncate"},$c={key:2,class:"wpic:shrink-0 wpic:text-zinc-400"},Dc=["title","aria-label","onClick"],Fc=["aria-label","title"],Tc=["disabled","aria-label"],Ac=["accept"],Hc=["disabled","title","aria-label"],Pc={class:"wpic-chat-composer-menu wpic:py-1"},jc={key:0,class:"wpic:flex wpic:items-center wpic:gap-2 wpic:px-3 wpic:py-3 wpic:text-base wpic:text-zinc-500 wpic:dark:text-zinc-400",role:"status"},Wc={key:1,class:"wpic:px-3 wpic:py-2 wpic:text-base wpic:text-zinc-400 wpic:dark:text-zinc-500"},Ic={key:0,class:"wpic:border-b wpic:border-zinc-100 wpic:pb-1 wpic:dark:border-zinc-800"},Rc={class:"wpic:px-4 wpic:py-2 wpic:text-base wpic:font-medium wpic:text-zinc-400 wpic:dark:text-zinc-500"},Zc=["aria-expanded","onFocus","onClick","onKeydown","onMouseenter"],Uc={class:"wpic:min-w-0 wpic:flex-1 wpic:truncate wpic:font-medium"},Kc={class:"wpic:text-zinc-400"},Oc={class:"wpic:px-4 wpic:py-2 wpic:text-base wpic:font-medium wpic:text-zinc-400 wpic:dark:text-zinc-500"},qc=["onClick"],Yc={class:"wpic:min-w-0"},Qc={class:"wpic:flex wpic:items-center wpic:gap-2"},Jc={class:"wpic:truncate wpic:font-medium"},Xc={key:0,class:"wpic:shrink-0 wpic:rounded-full wpic:bg-indigo-100 wpic:px-1.5 wpic:py-0.5 wpic:text-[10px] wpic:font-semibold wpic:uppercase wpic:tracking-wide wpic:text-indigo-600 wpic:dark:bg-indigo-900/60 wpic:dark:text-indigo-300"},Gc={class:"wpic:mt-0.5 wpic:block wpic:truncate wpic:text-base wpic:text-zinc-400 wpic:dark:text-zinc-500"},_c=["datetime"],ei={key:0,class:"wpic:px-3 wpic:py-2 wpic:text-base wpic:text-zinc-400"},ni=["onClick"],ti={class:"wpic:truncate"},ci=["datetime"],ii=e.defineComponent({__name:"WChatComposer",props:{placeholder:{},disabled:{type:Boolean},showAttachments:{type:Boolean,default:!0},showHistory:{type:Boolean,default:!0},attachments:{default:()=>[]},projects:{default:()=>[]},sessions:{default:()=>[]},historyLoading:{type:Boolean},locale:{default:"en"},minimized:{type:Boolean,default:!1},accept:{default:".txt,.md,.csv,.json,.py,.ts,.vue,.js,.html,.css,.xml,.yaml,.yml,.xlsx,.xls"},conversationsLabel:{default:"Conversations"},removeAttachmentLabel:{default:"Remove attachment"},minimizeLabel:{default:"Minimize"},sendLabel:{default:"Send"},attachFilesLabel:{default:"Attach files"},loadingLabel:{default:"Loading"},noConversationsLabel:{default:"No conversations"},projectsLabel:{default:"Projects"},generalConversationLabel:{default:"General conversation"}},emits:["submit","select-session","request-history","files-selected","remove-attachment","update:minimized"],setup(n,{expose:s,emit:t}){const l=n,o=t,c=`wpic-chat-composer-${e.getCurrentInstance().uid}`,i=`url(#${c})`,w=e.ref(""),u=e.computed(()=>!l.attachments.some(h=>h.status==="loading")),C=e.computed(()=>!!w.value.trim()&&!l.disabled&&u.value),a=e.ref(null),B=e.ref(null),g=e.ref(null),z=e.ref(!1),M=e.computed({get:()=>l.minimized,set:h=>o("update:minimized",h)}),v=e.computed(()=>z.value||!M.value),f=e.computed(()=>w.value.trim()||l.placeholder),T=e.ref(!1);let U=null;const Y=e.ref(!1),Q=e.ref(null),R=e.ref(null);let F=null;e.watch(Y,h=>{h||(F&&clearTimeout(F),Q.value=null,R.value=null)});const N=e.computed(()=>{const h=new Map;for(const L of l.projects)h.set(L.id,[]);for(const L of l.sessions)L.projectId&&h.get(L.projectId)?.push(L);return h}),A=e.computed(()=>l.sessions.filter(h=>!h.projectId)),m=e.computed(()=>Q.value?N.value.get(Q.value)??[]:[]);function W(h,L){F&&clearTimeout(F),Q.value=h,R.value=L.currentTarget}function J(){F&&clearTimeout(F)}function l1(){F&&clearTimeout(F),F=setTimeout(()=>{Q.value=null,R.value=null},140)}function E(){Y.value=!Y.value,Y.value&&o("request-history")}function Z(){if(!v.value){M.value=!1;return}l.showHistory?E():e1()}function P(){Y.value=!1,z.value=!1,T.value=!1,M.value=!0}function a1(h){if(!h)return"";const L=new Date(h);return Number.isNaN(L.getTime())?"":new Intl.DateTimeFormat(l.locale,{month:"short",day:"numeric",year:L.getFullYear()===new Date().getFullYear()?void 0:"numeric"}).format(L)}function i1(h){Y.value=!1,o("select-session",h)}function X(){const h=w.value.trim();!h||l.disabled||!u.value||(o("submit",h),w.value="")}function j(h){B.value?.focus(),o("remove-attachment",h)}function D(){l.disabled||g.value?.click()}async function x(h){const L=h.target,y=Array.from(L.files??[]);L.value="",y.length&&(z.value=!0,o("files-selected",y),await e.nextTick(),B.value?.focus())}function I(h){return h?h<1024?`${h} B`:h<1024*1024?`${Math.round(h/1024)} KB`:`${(h/(1024*1024)).toFixed(1)} MB`:""}async function e1(){z.value||(z.value=!0,T.value=!1,U&&clearTimeout(U),U=setTimeout(()=>{T.value=!0,U=null},500)),await e.nextTick(),requestAnimationFrame(()=>B.value?.focus())}async function t1(h){w.value=h,await e1()}s({openWithPrompt:t1});function d1(h){if(Y.value||h&&!h.relatedTarget)return;const L=h?.relatedTarget;L instanceof Node&&a.value?.contains(L)||!h&&document.activeElement instanceof Node&&a.value?.contains(document.activeElement)||(z.value=!1,T.value=!1)}return e.onBeforeUnmount(()=>{U&&clearTimeout(U),F&&clearTimeout(F)}),(h,L)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["wpic:pointer-events-none wpic-chat-composer-position wpic:fixed wpic:inset-x-3 wpic:bottom-20 wpic:z-[9100] wpic:flex wpic:sm:bottom-5",v.value?"wpic:justify-center":"wpic:justify-end"])},[e.createElementVNode("div",{ref_key:"composer",ref:a,class:e.normalizeClass(["wpic-chat-composer-surface wpic:pointer-events-auto wpic:relative wpic:isolate wpic:flex wpic:items-center wpic:overflow-visible wpic:transition-[width,max-width,height,padding,box-shadow,border-radius] wpic:duration-500 wpic:ease-[cubic-bezier(0.22,1,0.36,1)]",z.value?`${T.value?"wpic:h-auto":l.attachments.length?"wpic:h-[14.25rem]":"wpic:h-[10.75rem]"} wpic:min-h-[10.75rem] wpic:w-full wpic:max-w-2xl wpic:rounded-[1.5rem] wpic:border wpic:border-zinc-200/80 wpic:bg-transparent wpic:p-3 wpic:pb-14 wpic:shadow-xl wpic:shadow-zinc-950/10 wpic:dark:border-white/[0.08] wpic:dark:shadow-[0_20px_55px_-18px_rgba(99,102,241,0.22)]`:v.value?"wpic:h-16 wpic:w-full wpic:max-w-md wpic:rounded-[1.5rem] wpic:border wpic:border-zinc-200/80 wpic:bg-transparent wpic:p-3 wpic:shadow-xl wpic:shadow-zinc-950/10 wpic:dark:border-white/[0.08] wpic:dark:shadow-[0_18px_55px_-18px_rgba(0,0,0,0.7)]":"wpic:h-12 wpic:w-12 wpic:rounded-full wpic:border wpic:border-indigo-400/30 wpic:bg-gradient-to-br wpic:from-indigo-500 wpic:to-violet-600 wpic:p-0 wpic:text-white wpic:shadow-lg wpic:shadow-indigo-500/30 wpic:transition-transform wpic:hover:-translate-y-0.5 wpic:hover:shadow-xl wpic:hover:shadow-indigo-500/35 wpic:dark:from-indigo-400 wpic:dark:to-violet-500 wpic:dark:shadow-indigo-950/50"]),onFocusout:d1},[v.value?(e.openBlock(),e.createElementBlock("svg",Mc,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:c,x1:"0",y1:"0",x2:"1",y2:"1"},[...L[2]||(L[2]=[e.createStaticVNode('<stop offset="0%" stop-color="#38bdf8" stop-opacity="1"></stop><stop offset="18%" stop-color="#6366f1" stop-opacity="0.8"></stop><stop offset="38%" stop-color="#6366f1" stop-opacity="0"></stop><stop offset="62%" stop-color="#6366f1" stop-opacity="0"></stop><stop offset="82%" stop-color="#6366f1" stop-opacity="0.7"></stop><stop offset="100%" stop-color="#8b5cf6" stop-opacity="1"></stop>',6)])])]),e.createElementVNode("rect",{width:"100%",height:"100%",rx:"24",style:e.normalizeStyle({stroke:i})},null,4)])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("span",Vc)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["wpic:flex wpic:flex-none wpic:items-center wpic:justify-center wpic:transition-colors wpic:duration-200",v.value?`wpic:h-10 wpic:w-10 wpic:self-start wpic:text-zinc-500 wpic:hover:text-indigo-600 wpic:dark:text-zinc-100 wpic:dark:hover:text-violet-300 ${Y.value?"wpic:text-indigo-600 wpic:dark:text-violet-300":""}`:"wpic:h-full wpic:w-full wpic:self-center wpic:text-white"]),"aria-label":n.showHistory?n.conversationsLabel:n.placeholder,"aria-expanded":Y.value,onClick:Z},[e.createVNode(e.unref(k.Bot),{size:21})],10,Ec),e.createVNode(e.Transition,{name:"wpic-composer-content"},{default:e.withCtx(()=>[!z.value&&v.value?(e.openBlock(),e.createElementBlock("button",{key:"compact",type:"button",class:"wpic:min-w-0 wpic:flex-1 wpic:truncate wpic:px-4 wpic:py-2.5 wpic:text-left wpic:text-base wpic:text-zinc-500 wpic:transition-colors wpic:hover:text-zinc-900 wpic:dark:text-zinc-500 wpic:dark:hover:text-zinc-300",onClick:e1},e.toDisplayString(f.value),1)):z.value?(e.openBlock(),e.createElementBlock("div",Nc,[e.createVNode(U2,{ref_key:"editor",ref:B,modelValue:w.value,"onUpdate:modelValue":L[0]||(L[0]=y=>w.value=y),placeholder:n.placeholder,disabled:n.disabled,"min-lines":3,"max-lines":6,onSubmit:X},null,8,["modelValue","placeholder","disabled"]),l.attachments.length?(e.openBlock(),e.createElementBlock("div",Sc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.attachments,y=>(e.openBlock(),e.createElementBlock("span",{key:y.id,class:e.normalizeClass(["wpic:inline-flex wpic:max-w-56 wpic:items-center wpic:gap-1.5 wpic:rounded-lg wpic:bg-white/60 wpic:px-2 wpic:py-1 wpic:text-xs wpic:text-zinc-600 wpic:ring-1 wpic:ring-indigo-900/[0.06] wpic:dark:bg-black/20 wpic:dark:text-zinc-300 wpic:dark:ring-white/[0.06]",y.status==="error"?"wpic:bg-red-50/80 wpic:text-red-700 wpic:dark:bg-red-950/40 wpic:dark:text-red-300":""])},[y.status==="loading"?(e.openBlock(),e.createBlock(e.unref(k.Loader2),{key:0,size:12,class:"wpic:shrink-0 wpic:animate-spin"})):(e.openBlock(),e.createBlock(e.unref(k.Paperclip),{key:1,size:12,class:"wpic:shrink-0"})),e.createElementVNode("span",Lc,e.toDisplayString(y.name),1),I(y.bytes)?(e.openBlock(),e.createElementBlock("span",$c,e.toDisplayString(I(y.bytes)),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"wpic:ml-0.5 wpic:inline-flex wpic:h-4 wpic:w-4 wpic:shrink-0 wpic:items-center wpic:justify-center wpic:rounded-full wpic:text-zinc-400 wpic:transition wpic:hover:bg-black/5 wpic:hover:text-zinc-700 wpic:dark:hover:bg-white/10 wpic:dark:hover:text-zinc-100",title:n.removeAttachmentLabel,"aria-label":n.removeAttachmentLabel,onClick:q=>j(y)},[e.createVNode(e.unref(k.X),{size:10})],8,Dc)],2))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1}),v.value?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:e.normalizeClass(["wpic:flex wpic:h-10 wpic:w-10 wpic:flex-none wpic:items-center wpic:justify-center wpic:rounded-xl wpic:text-zinc-400 wpic:transition wpic:hover:bg-black/5 wpic:hover:text-zinc-700 wpic:dark:text-zinc-500 wpic:dark:hover:bg-white/10 wpic:dark:hover:text-zinc-200",z.value?"wpic:absolute wpic:right-3 wpic:top-3":""]),"aria-label":n.minimizeLabel,title:n.minimizeLabel,onClick:P},[e.createVNode(e.unref(k.MoveDownRight),{size:17})],10,Fc)):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"wpic-composer-send"},{default:e.withCtx(()=>[z.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"wpic:absolute wpic:bottom-3 wpic:right-3 wpic:flex wpic:h-10 wpic:w-10 wpic:items-center wpic:justify-center wpic:rounded-xl wpic:bg-gradient-to-br wpic:from-indigo-500 wpic:to-violet-600 wpic:text-white wpic:shadow-md wpic:shadow-indigo-500/25 wpic:transition wpic:duration-200 wpic:hover:-translate-y-0.5 wpic:hover:shadow-lg wpic:hover:shadow-indigo-500/30 wpic:active:translate-y-0 wpic:disabled:translate-y-0 wpic:disabled:cursor-default wpic:disabled:from-zinc-300 wpic:disabled:to-zinc-300 wpic:disabled:shadow-none wpic:dark:from-indigo-400 wpic:dark:to-violet-500 wpic:dark:shadow-indigo-950/40 wpic:dark:hover:shadow-indigo-500/20 wpic:dark:disabled:from-indigo-950 wpic:dark:disabled:to-violet-950 wpic:dark:disabled:text-indigo-300/40 wpic:dark:disabled:ring-1 wpic:dark:disabled:ring-inset wpic:dark:disabled:ring-indigo-400/10",disabled:!C.value,"aria-label":n.sendLabel,onClick:X},[n.disabled?(e.openBlock(),e.createBlock(e.unref(k.Loader2),{key:0,size:17,class:"wpic:animate-spin"})):(e.openBlock(),e.createBlock(e.unref(k.ArrowUp),{key:1,size:17,"stroke-width":"2.5"}))],8,Tc)):e.createCommentVNode("",!0)]),_:1}),n.showAttachments?(e.openBlock(),e.createElementBlock("input",{key:3,ref_key:"fileInput",ref:g,type:"file",multiple:"",class:"wpic:sr-only",accept:n.accept,onChange:x},null,40,Ac)):e.createCommentVNode("",!0),z.value&&n.showAttachments?(e.openBlock(),e.createElementBlock("button",{key:4,type:"button",class:"wpic:absolute wpic:bottom-3 wpic:left-3 wpic:flex wpic:h-10 wpic:w-10 wpic:items-center wpic:justify-center wpic:text-zinc-400 wpic:transition wpic:hover:text-zinc-700 wpic:disabled:opacity-40 wpic:dark:text-zinc-500 wpic:dark:hover:text-indigo-300",disabled:n.disabled,title:n.attachFilesLabel,"aria-label":n.attachFilesLabel,onClick:D},[e.createVNode(e.unref(k.Paperclip),{size:17})],8,Hc)):e.createCommentVNode("",!0)],34),e.createVNode(h1,{open:Y.value,anchor:a.value,placement:"top",width:"min(520px, calc(100vw - 16px))","max-height":"320px",onClose:L[1]||(L[1]=y=>Y.value=!1)},{default:e.withCtx(()=>[e.createElementVNode("div",Pc,[n.historyLoading?(e.openBlock(),e.createElementBlock("div",jc,[e.createVNode(e.unref(k.Loader2),{size:15,class:"wpic:animate-spin"}),e.createTextVNode(" "+e.toDisplayString(n.loadingLabel),1)])):l.sessions.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.projects.length?(e.openBlock(),e.createElementBlock("div",Ic,[e.createElementVNode("p",Rc,e.toDisplayString(n.projectsLabel),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.projects,y=>(e.openBlock(),e.createElementBlock("div",{key:y.id,class:"wpic:flex wpic:items-center wpic:gap-2 wpic:px-4 wpic:py-2 wpic:text-base wpic:text-zinc-700 wpic:hover:bg-zinc-50 wpic:dark:text-zinc-200 wpic:dark:hover:bg-zinc-800",tabindex:"0",role:"button","aria-expanded":Q.value===y.id,onFocus:q=>W(y.id,q),onClick:q=>W(y.id,q),onKeydown:[e.withKeys(e.withModifiers(q=>W(y.id,q),["prevent"]),["enter"]),e.withKeys(e.withModifiers(q=>W(y.id,q),["prevent"]),["space"])],onMouseenter:q=>W(y.id,q),onMouseleave:l1},[e.createElementVNode("span",Uc,e.toDisplayString(y.name),1),e.createElementVNode("span",Kc,e.toDisplayString(N.value.get(y.id)?.length??0),1),e.createVNode(e.unref(k.ChevronRight),{size:14,class:"wpic:text-zinc-400"})],40,Zc))),128))])):e.createCommentVNode("",!0),e.createElementVNode("p",Oc,e.toDisplayString(n.conversationsLabel),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,y=>(e.openBlock(),e.createElementBlock("button",{key:y.id,type:"button",class:e.normalizeClass(["wpic:grid wpic:w-full wpic:grid-cols-[minmax(0,1fr)_auto] wpic:items-center wpic:gap-5 wpic:px-4 wpic:py-3 wpic:text-left wpic:text-base wpic:text-zinc-700 wpic:transition wpic:hover:bg-zinc-50 wpic:dark:text-zinc-200 wpic:dark:hover:bg-zinc-800",y.highlighted?"wpic:bg-indigo-50/70 wpic:dark:bg-indigo-950/30":""]),onClick:q=>i1(y.id)},[e.createElementVNode("span",Yc,[e.createElementVNode("span",Qc,[e.createElementVNode("span",Jc,e.toDisplayString(y.title),1),y.badge?(e.openBlock(),e.createElementBlock("span",Xc,e.toDisplayString(y.badge),1)):e.createCommentVNode("",!0)]),e.createElementVNode("span",Gc,e.toDisplayString(y.subtitle||n.generalConversationLabel),1)]),y.updatedAt?(e.openBlock(),e.createElementBlock("time",{key:0,datetime:y.updatedAt,class:"wpic:whitespace-nowrap wpic:text-base wpic:text-zinc-400 wpic:dark:text-zinc-500"},e.toDisplayString(a1(y.updatedAt)),9,_c)):e.createCommentVNode("",!0)],10,qc))),128))],64)):(e.openBlock(),e.createElementBlock("p",Wc,e.toDisplayString(n.noConversationsLabel),1))]),e.createVNode(h1,{open:Y.value&&!!Q.value,anchor:R.value,placement:"right",width:"min(360px, calc(100vw - 16px))","max-height":"320px",offset:4,onClose:l1},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"wpic-chat-composer-menu wpic:py-1",onMouseenter:J,onMouseleave:l1},[m.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("p",ei,e.toDisplayString(n.noConversationsLabel),1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,y=>(e.openBlock(),e.createElementBlock("button",{key:y.id,type:"button",class:"wpic:grid wpic:w-full wpic:grid-cols-[minmax(0,1fr)_auto] wpic:gap-4 wpic:px-3 wpic:py-2 wpic:text-left wpic:text-base wpic:text-zinc-700 wpic:hover:bg-zinc-50 wpic:dark:text-zinc-200 wpic:dark:hover:bg-zinc-800",onClick:q=>i1(y.id)},[e.createElementVNode("span",ti,e.toDisplayString(y.title),1),y.updatedAt?(e.openBlock(),e.createElementBlock("time",{key:0,datetime:y.updatedAt,class:"wpic:whitespace-nowrap wpic:text-zinc-400"},e.toDisplayString(a1(y.updatedAt)),9,ci)):e.createCommentVNode("",!0)],8,ni))),128))],32)]),_:1},8,["open","anchor"])]),_:1},8,["open","anchor"])],2))}});exports.CollapseToggle=e7;exports.ConfirmModal=a7;exports.FormDate=P9;exports.FormInput=v9;exports.FormLabel=u9;exports.FormSelect=k9;exports.FormTextarea=h9;exports.MarketplaceIcon=Xt;exports.Modal=V6;exports.ProviderLogo=uc;exports.SearchSelect=Z7;exports.Table=Z9;exports.TableBody=J9;exports.TableCell=G9;exports.TableHead=q9;exports.TableRow=X9;exports.ToastContainer=j6;exports.TreeSelect=_7;exports.WActionMenu=o2;exports.WActionMenuItem=L1;exports.WActionPanel=w6;exports.WAlert=R8;exports.WAvatar=I8;exports.WBadge=C8;exports.WBanner=T2;exports.WBatchActionBar=Xe;exports.WBottomSheet=p2;exports.WButton=D1;exports.WButtonGroup=E2;exports.WCard=A2;exports.WChatComposer=ii;exports.WChatEditor=U2;exports.WChatPanel=t4;exports.WCheckbox=a2;exports.WDatePicker=Z2;exports.WDateRangePicker=Pe;exports.WEditableText=Bc;exports.WEmptyState=g8;exports.WEmptyValue=B4;exports.WFileList=l8;exports.WFilter=B0;exports.WFilterBar=ae;exports.WFormActions=i9;exports.WFormLabel=r2;exports.WImageTile=K8;exports.WInput=s2;exports.WLoader=f6;exports.WModal=B6;exports.WMonthPicker=qe;exports.WOptionPopover=F2;exports.WPageHeader=yc;exports.WPagination=p4;exports.WPillGroup=R2;exports.WPopover=h1;exports.WProgress=M8;exports.WSearchSelect=P2;exports.WSegmentedControl=_e;exports.WSelect=Y1;exports.WSelectOption=D2;exports.WSkeleton=u6;exports.WSlidePanel=w7;exports.WSlider=V4;exports.WSpinner=Q1;exports.WSplitButton=re;exports.WSpreadsheet=v3;exports.WStatCard=v8;exports.WTable=i3;exports.WTabs=O6;exports.WTag=S1;exports.WTagInput=R7;exports.WTailwindColorPicker=fe;exports.WTextarea=P8;exports.WThemeProvider=hc;exports.WToggle=b6;exports.WTooltip=W2;exports.WTrendBadge=I2;exports.WTwoColumnFormSection=s9;exports.WWorkflowNav=_6;exports.chartPalettes=z3;exports.themeVariables=S2;exports.ui5Theme=N2;exports.useRecentItems=j2;exports.useToastStore=H2;exports.useWTheme=F1;
|
package/dist/wpic-ui.js
CHANGED
|
@@ -18386,20 +18386,20 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
|
|
|
18386
18386
|
class: "wpic:shrink-0 wpic:text-zinc-400"
|
|
18387
18387
|
}, fi = ["title", "aria-label", "onClick"], bi = ["aria-label", "title"], gi = ["disabled", "aria-label"], zi = ["accept"], Ci = ["disabled", "title", "aria-label"], ki = { class: "wpic-chat-composer-menu wpic:py-1" }, xi = {
|
|
18388
18388
|
key: 0,
|
|
18389
|
-
class: "wpic:flex wpic:items-center wpic:gap-2 wpic:px-3 wpic:py-3 wpic:text-
|
|
18389
|
+
class: "wpic:flex wpic:items-center wpic:gap-2 wpic:px-3 wpic:py-3 wpic:text-base wpic:text-zinc-500 wpic:dark:text-zinc-400",
|
|
18390
18390
|
role: "status"
|
|
18391
18391
|
}, yi = {
|
|
18392
18392
|
key: 1,
|
|
18393
|
-
class: "wpic:px-3 wpic:py-2 wpic:text-
|
|
18393
|
+
class: "wpic:px-3 wpic:py-2 wpic:text-base wpic:text-zinc-400 wpic:dark:text-zinc-500"
|
|
18394
18394
|
}, Mi = {
|
|
18395
18395
|
key: 0,
|
|
18396
18396
|
class: "wpic:border-b wpic:border-zinc-100 wpic:pb-1 wpic:dark:border-zinc-800"
|
|
18397
|
-
}, Li = { class: "wpic:px-4 wpic:py-2 wpic:text-
|
|
18397
|
+
}, Li = { class: "wpic:px-4 wpic:py-2 wpic:text-base wpic:font-medium wpic:text-zinc-400 wpic:dark:text-zinc-500" }, Vi = ["aria-expanded", "onFocus", "onClick", "onKeydown", "onMouseenter"], $i = { class: "wpic:min-w-0 wpic:flex-1 wpic:truncate wpic:font-medium" }, Bi = { class: "wpic:text-zinc-400" }, Si = { class: "wpic:px-4 wpic:py-2 wpic:text-base wpic:font-medium wpic:text-zinc-400 wpic:dark:text-zinc-500" }, Ai = ["onClick"], Fi = { class: "wpic:min-w-0" }, Hi = { class: "wpic:flex wpic:items-center wpic:gap-2" }, Pi = { class: "wpic:truncate wpic:font-medium" }, Ti = {
|
|
18398
18398
|
key: 0,
|
|
18399
18399
|
class: "wpic:shrink-0 wpic:rounded-full wpic:bg-indigo-100 wpic:px-1.5 wpic:py-0.5 wpic:text-[10px] wpic:font-semibold wpic:uppercase wpic:tracking-wide wpic:text-indigo-600 wpic:dark:bg-indigo-900/60 wpic:dark:text-indigo-300"
|
|
18400
|
-
}, ji = { class: "wpic:mt-0.5 wpic:block wpic:truncate wpic:text-
|
|
18400
|
+
}, ji = { class: "wpic:mt-0.5 wpic:block wpic:truncate wpic:text-base wpic:text-zinc-400 wpic:dark:text-zinc-500" }, Ei = ["datetime"], Wi = {
|
|
18401
18401
|
key: 0,
|
|
18402
|
-
class: "wpic:px-3 wpic:py-2 wpic:text-
|
|
18402
|
+
class: "wpic:px-3 wpic:py-2 wpic:text-base wpic:text-zinc-400"
|
|
18403
18403
|
}, Di = ["onClick"], Ii = { class: "wpic:truncate" }, Ri = ["datetime"], ea = /* @__PURE__ */ X({
|
|
18404
18404
|
__name: "WChatComposer",
|
|
18405
18405
|
props: {
|
|
@@ -18455,7 +18455,11 @@ c36 -78 76 -117 152 -146 53 -20 76 -23 190 -22 137 2 262 27 295 59 10 11 17
|
|
|
18455
18455
|
o1.value = !o1.value, o1.value && r("request-history");
|
|
18456
18456
|
}
|
|
18457
18457
|
function e1() {
|
|
18458
|
-
|
|
18458
|
+
if (!x.value) {
|
|
18459
|
+
H.value = !1;
|
|
18460
|
+
return;
|
|
18461
|
+
}
|
|
18462
|
+
o.showHistory ? j() : m1();
|
|
18459
18463
|
}
|
|
18460
18464
|
function Q() {
|
|
18461
18465
|
o1.value = !1, B.value = !1, O.value = !1, H.value = !0;
|