@decocms/mesh 1.0.0-alpha.34 → 1.0.0-alpha.35
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/dist/client/assets/AlertCircle-VUVelpvY.js +1 -0
- package/dist/client/assets/ArrowLeft-B4oC_h6K.js +1 -0
- package/dist/client/assets/CheckCircle-DH6YWObN.js +1 -0
- package/dist/client/assets/ChevronDown-CLC0yxsk.js +1 -0
- package/dist/client/assets/ChevronRight-YHVS_LDJ.js +1 -0
- package/dist/client/assets/Clock-CUnbQKPM.js +1 -0
- package/dist/client/assets/Copy01-vEIIJ5sE.js +1 -0
- package/dist/client/assets/CpuChip02-Ckd82HIH.js +1 -0
- package/dist/client/assets/File06-sb4CceKn.js +1 -0
- package/dist/client/assets/Inbox01-CJr3WKtd.js +1 -0
- package/dist/client/assets/InfoCircle-BBnXokyi.js +1 -0
- package/dist/client/assets/Key01-BUTMet0-.js +1 -0
- package/dist/client/assets/LinkExternal01-jU0XrMVD.js +1 -0
- package/dist/client/assets/Loading01-Dp6sT3Mq.js +1 -0
- package/dist/client/assets/Plus-LcofPC9C.js +1 -0
- package/dist/client/assets/SearchMd-3u9z3FIP.js +1 -0
- package/dist/client/assets/Trash01-CNckizo2.js +1 -0
- package/dist/client/assets/Upload01-Bxain8td.js +1 -0
- package/dist/client/assets/X-Bo13gg4P.js +1 -0
- package/dist/client/assets/{alert-dialog-DucVRGId.js → alert-dialog-yp0b0MDg.js} +3 -3
- package/dist/client/assets/{auth-BaVMGGfx.js → auth-C8rltTUE.js} +1 -1
- package/dist/client/assets/{auth-catchall-DmPLtJXt.js → auth-catchall-VFRahgSj.js} +1 -1
- package/dist/client/assets/avatar-i3GM_9o4.js +1 -0
- package/dist/client/assets/{badge-DAqf2QcS.js → badge-gmsvp75V.js} +1 -1
- package/dist/client/assets/{button-UfWqfnW6.js → button-eIETQb0Y.js} +1 -1
- package/dist/client/assets/{card-sOD0ZSWO.js → card-BeaxjjFM.js} +1 -1
- package/dist/client/assets/checkbox-BO8-3DdS.js +1 -0
- package/dist/client/assets/collection-detail-B-fRum6Q.js +1 -0
- package/dist/client/assets/collection-display-button--hU2cKng.js +1 -0
- package/dist/client/assets/{collection-header-DqX3M1ox.js → collection-header-LJs-cTFu.js} +1 -1
- package/dist/client/assets/{collection-page-iotK2mh3.js → collection-page-QhbCfH_v.js} +1 -1
- package/dist/client/assets/collection-search-uhjPIekp.js +1 -0
- package/dist/client/assets/collection-table-wrapper-DqGkk2i2.js +1 -0
- package/dist/client/assets/{connection-card-C-M_OhaM.js → connection-card-BQ92NHJ6.js} +1 -1
- package/dist/client/assets/connection-detail-Doa-5y7y.js +1 -0
- package/dist/client/assets/connections-CKgEGrXv.js +1 -0
- package/dist/client/assets/{core-Bc2cJJ2B.js → core-BUY47BFk.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-D5OVpWvl.js → create-organization-dialog-ELVAlnoy.js} +1 -1
- package/dist/client/assets/dialog-BNPGtupv.js +1 -0
- package/dist/client/assets/dropdown-menu-DKiYuSii.js +1 -0
- package/dist/client/assets/error-boundary-CBpLdCwg.js +1 -0
- package/dist/client/assets/{extract-connection-data-CegZyyXr.js → extract-connection-data-DNQ4aWdY.js} +1 -1
- package/dist/client/assets/{form-qod6mSHT.js → form-B0VrU06h.js} +1 -1
- package/dist/client/assets/gateway-detail-CHVOIkdN.js +1 -0
- package/dist/client/assets/gateways-CYwdvgYO.js +1 -0
- package/dist/client/assets/home-CEeMX4S7.js +1 -0
- package/dist/client/assets/index-BxZYaQlu.css +1 -0
- package/dist/client/assets/{index-CbCySsU3.js → index-CF_OPzOB.js} +1 -1
- package/dist/client/assets/{index-BNPz145B.js → index-CQXdtGjW.js} +18 -18
- package/dist/client/assets/{index-ckOjSsbf.js → index-Dbugj1Qf.js} +15 -15
- package/dist/client/assets/{index-C3PHf_xm.js → index-qnfTBZZC.js} +1 -1
- package/dist/client/assets/{input-CwErI3qM.js → input-BWvhkgtS.js} +1 -1
- package/dist/client/assets/json-CdX173bs.js +1 -0
- package/dist/client/assets/layout-CX25ELhh.js +1 -0
- package/dist/client/assets/{lazy-highlighter-C8GswYw8.js → lazy-highlighter-CYdbIXwO.js} +1 -1
- package/dist/client/assets/{localstorage-keys-D96DvQfm.js → localstorage-keys-7rhieZF2.js} +1 -1
- package/dist/client/assets/{login-Bg1NB9rR.js → login-BGPiojdD.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D8oBlZpZ.js → mcp-oauth-jtPwlXEu.js} +1 -1
- package/dist/client/assets/members--_b0JG9-.js +3 -0
- package/dist/client/assets/monitoring-DQbjjkaJ.js +1 -0
- package/dist/client/assets/oauth-callback-W0Zj4QZg.js +1 -0
- package/dist/client/assets/page-B1COFi93.js +21 -0
- package/dist/client/assets/{popover-B66u-nYn.js → popover-Cyo3vdtr.js} +1 -1
- package/dist/client/assets/prism-light-Dkb0faFA.js +1 -0
- package/dist/client/assets/resource-tabs-DMxDPvak.js +1 -0
- package/dist/client/assets/{schema-DVGSbEVo.js → schema-CcVe4fys.js} +1 -1
- package/dist/client/assets/select-BoIpHU2H.js +1 -0
- package/dist/client/assets/settings-DjDQwsDk.js +1 -0
- package/dist/client/assets/shell-layout-t3dkCYaC.js +124 -0
- package/dist/client/assets/{spinner-B5hpYDWD.js → spinner-BgLCN9p1.js} +1 -1
- package/dist/client/assets/store-D8WGhqyG.js +1 -0
- package/dist/client/assets/store-app-detail-BaZsMlnc.js +1 -0
- package/dist/client/assets/{switch-YzLtFOTn.js → switch-nOTvNKSU.js} +1 -1
- package/dist/client/assets/{textarea-DdWHnTcH.js → textarea-GonRChaT.js} +1 -1
- package/dist/client/assets/tool-set-selector-BbP0pfb9.js +1 -0
- package/dist/client/assets/tooltip-C_Is8XE4.js +1 -0
- package/dist/client/assets/types-Kjt4sgIB.js +45 -0
- package/dist/client/assets/{use-binding-BDNnvRc3.js → use-binding-FqyuxtmF.js} +1 -1
- package/dist/client/assets/use-connection-BcR9UFbs.js +2 -0
- package/dist/client/assets/{use-gateway-CQn5-Udm.js → use-gateway-DARIvLcH.js} +1 -1
- package/dist/client/assets/use-list-state-DTFI-io6.js +1 -0
- package/dist/client/assets/{use-mcp-sqfwIh1y.js → use-mcp-BHfi5-go.js} +1 -1
- package/dist/client/assets/{use-members-B55Npjtk.js → use-members-C4kUxhI6.js} +1 -1
- package/dist/client/assets/{use-mobile-c3XFiGhb.js → use-mobile-BAgI68xi.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CbNhltyL.js → use-organization-settings-Bdum0zz2.js} +1 -1
- package/dist/client/assets/{use-tool-call-DtbPDnAJ.js → use-tool-call-rEALkXUX.js} +1 -1
- package/dist/client/assets/useQuery-BrB4rOUi.js +1 -0
- package/dist/client/assets/utils-C9RgqtL7.js +1 -0
- package/dist/client/assets/well-known-mcp-D-VmC-4r.js +1 -0
- package/dist/client/index.html +2 -2
- package/package.json +2 -2
- package/dist/client/assets/avatar-Bv1o4qKK.js +0 -1
- package/dist/client/assets/checkbox-D7oSBQoW.js +0 -1
- package/dist/client/assets/circle-alert-Bqyf_cFr.js +0 -1
- package/dist/client/assets/collection-detail-CFaEtQUQ.js +0 -1
- package/dist/client/assets/collection-display-button-CwZeJFt8.js +0 -1
- package/dist/client/assets/collection-search-Bjsljx6L.js +0 -1
- package/dist/client/assets/collection-table-wrapper-D98e-gOY.js +0 -1
- package/dist/client/assets/connection-detail-DyrpnaaF.js +0 -1
- package/dist/client/assets/connections-9V8o8mb9.js +0 -1
- package/dist/client/assets/dialog-B9ivHqL_.js +0 -1
- package/dist/client/assets/dropdown-menu-B7djqSa8.js +0 -1
- package/dist/client/assets/empty-state-1y2EWg7D.js +0 -1
- package/dist/client/assets/error-boundary-CcJOnlMu.js +0 -1
- package/dist/client/assets/gateway-detail-Btwy-2lU.js +0 -1
- package/dist/client/assets/gateways-CjCjBtBk.js +0 -1
- package/dist/client/assets/home-GbOyPoEE.js +0 -1
- package/dist/client/assets/icon-DrnCTy8O.js +0 -1
- package/dist/client/assets/index-jCYwKfly.css +0 -1
- package/dist/client/assets/json-CwrUFc5m.js +0 -1
- package/dist/client/assets/layout-CRWUQVBf.js +0 -1
- package/dist/client/assets/members-KUdSr0Tz.js +0 -3
- package/dist/client/assets/monitoring-bEF5gLc4.js +0 -1
- package/dist/client/assets/oauth-callback-r_srb_7W.js +0 -1
- package/dist/client/assets/page-DTw69DsB.js +0 -21
- package/dist/client/assets/prism-light-gvcLvWKy.js +0 -1
- package/dist/client/assets/resource-tabs-C-xGyATo.js +0 -1
- package/dist/client/assets/select-CccYpzrg.js +0 -1
- package/dist/client/assets/settings-BrO1nb9m.js +0 -1
- package/dist/client/assets/shell-layout-H6nBvEMc.js +0 -124
- package/dist/client/assets/store-aQG8A1DY.js +0 -1
- package/dist/client/assets/store-app-detail-Cb0AL9io.js +0 -1
- package/dist/client/assets/tool-set-selector-DHYjwwOX.js +0 -1
- package/dist/client/assets/tooltip-BEGc6-ta.js +0 -1
- package/dist/client/assets/types-DZHDmJVB.js +0 -45
- package/dist/client/assets/upload-ROO0Hq6M.js +0 -1
- package/dist/client/assets/use-connection-IoNoQwc6.js +0 -2
- package/dist/client/assets/use-list-state-DRmAmaM0.js +0 -1
- package/dist/client/assets/useQuery-CBshJqa8.js +0 -1
- package/dist/client/assets/utils-pyEEdArk.js +0 -1
- package/dist/client/assets/well-known-mcp-Dg77mwx9.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as N,c as O,j as L,a1 as Q,a3 as P,a2 as S,a6 as b}from"./index-Dbugj1Qf.js";import{c as F}from"./utils-C9RgqtL7.js";import{u as j}from"./tooltip-C_Is8XE4.js";import{u as I}from"./button-eIETQb0Y.js";const z=({size:n=24,color:s="currentColor",...r})=>N.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:s,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},N.createElement("path",{d:"M20.5 7.278 12 12m0 0L3.5 7.278M12 12v9.5m9-5.441V7.942c0-.343 0-.514-.05-.667a1 1 0 0 0-.215-.364c-.109-.119-.258-.202-.558-.368l-7.4-4.111c-.284-.158-.425-.237-.575-.267a1 1 0 0 0-.403 0c-.15.03-.292.11-.576.267l-7.4 4.11c-.3.167-.45.25-.558.369a1 1 0 0 0-.215.364C3 7.428 3 7.599 3 7.942v8.117c0 .342 0 .514.05.666a1 1 0 0 0 .215.364c.109.119.258.202.558.368l7.4 4.111c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l7.4-4.11c.3-.167.45-.25.558-.369a.999.999 0 0 0 .215-.364c.05-.152.05-.324.05-.666Z"}));z.displayName="Container";function X(n){const s=O.c(12),{icon:r,name:e,size:t,className:i,fallbackIcon:u}=n,a=t===void 0?"md":t,[l,f]=N.useState(!r);let o,c;if(s[0]!==i||s[1]!==u||s[2]!==r||s[3]!==l||s[4]!==e||s[5]!==a){c=Symbol.for("react.early_return_sentinel");e:{const p={xs:"h-6 w-6",sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16"},C={xs:"min-w-6",sm:"min-w-8",md:"min-w-12",lg:"min-w-16"};let d;s[8]===Symbol.for("react.memo_cache_sentinel")?(d={xs:12,sm:16,md:24,lg:32},s[8]=d):d=s[8];const g=d[a];let y;s[9]!==g?(y=L.jsx(z,{size:g,className:"text-muted-foreground"}),s[9]=g,s[10]=y):y=s[10];const E=y;if(o=L.jsx("div",{className:F("rounded-lg flex items-center justify-center bg-muted border border-border shrink-0",p[a],C[a],i),children:u??E}),r&&!l){let m;s[11]===Symbol.for("react.memo_cache_sentinel")?(m=()=>f(!0),s[11]=m):m=s[11],c=L.jsx("img",{src:r,alt:e,onError:m,className:F("rounded-lg object-cover border border-border shrink-0",p[a],C[a],i)});break e}}s[0]=i,s[1]=u,s[2]=r,s[3]=l,s[4]=e,s[5]=a,s[6]=o,s[7]=c}else o=s[6],c=s[7];return c!==Symbol.for("react.early_return_sentinel")?c:o}const U="UNKNOWN_CONNECTION_ID",A=async n=>{const r=(await n.text()).split(`
|
|
2
|
+
`).find(t=>t.startsWith("data: "));if(!r)throw new Error("No data received from the server");return JSON.parse(r.replace("data: ",""))};function $(n){if(n===U)return(async()=>{});const s=n?`/mcp/${n}`:"/mcp";return async(r,e)=>{const t=await fetch(s,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:"tools/call",params:{name:r,arguments:e}}),headers:{"Content-Type":"application/json",Accept:"application/json, text/event-stream"},credentials:"include"});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const i=t.headers.get("Content-Type")==="application/json"?await t.json():await A(t);if(i.result?.isError)throw new Error(i.result.content?.[0]?.text||"Tool call failed");return i.result?.structuredContent||i.result}}function W(n,s,r){const e=[];if(n?.trim()){const t=n.trim(),i=r.map(u=>({field:[String(u)],operator:"contains",value:t}));i.length===1&&i[0]?e.push(i[0]):i.length>1&&e.push({operator:"or",conditions:i})}if(s&&s.length>0)for(const t of s)e.push({field:[t.column],operator:"eq",value:t.value});if(e.length!==0)return e.length===1?e[0]:{operator:"and",conditions:e}}function D(n,s,r){const e=n??r,t=s??"asc";return[{field:[String(e)],direction:t}]}function J(n,s,r,e){const t=O.c(13);let i;t[0]!==s?(i=s.toUpperCase(),t[0]=s,t[1]=i):i=t[1];const a=`COLLECTION_${i}_GET`;let l;t[2]!==s||t[3]!==r||t[4]!==n?(l=S.collectionItem(n,s,r??""),t[2]=s,t[3]=r,t[4]=n,t[5]=l):l=t[5];let f;t[6]!==a||t[7]!==r||t[8]!==e?(f=async()=>r?await e(a,{id:r}):{item:null},t[6]=a,t[7]=r,t[8]=e,t[9]=f):f=t[9];let o;t[10]!==l||t[11]!==f?(o={queryKey:l,queryFn:f,staleTime:6e4},t[10]=l,t[11]=f,t[12]=o):o=t[12];const{data:c}=P(o);return c.item}function R(n,s,r,e){const t=O.c(20);let i,u,a,l,f,o;if(t[0]!==s||t[1]!==n||t[2]!==e){const d=e===void 0?{}:e,{searchTerm:h,filters:g,sortKey:y,sortDirection:E,searchFields:m,defaultSortKey:w,pageSize:v}=d,x=m===void 0?["title","description"]:m,_=w===void 0?"updated_at":w;a=v===void 0?100:v;let T;t[9]!==s?(T=s.toUpperCase(),t[9]=s,t[10]=T):T=t[10],i=`COLLECTION_${T}_LIST`,o=W(h,g,x),u=D(y,E,_);const k=JSON.stringify({where:o,orderBy:u,limit:a});f=P,l=S.collectionList(n,s,k),t[0]=s,t[1]=n,t[2]=e,t[3]=i,t[4]=u,t[5]=a,t[6]=l,t[7]=f,t[8]=o}else i=t[3],u=t[4],a=t[5],l=t[6],f=t[7],o=t[8];let c;t[11]!==i||t[12]!==u||t[13]!==a||t[14]!==r||t[15]!==o?(c=async()=>{const d={...o&&{where:o},...u&&{orderBy:u},limit:a,offset:0};return await r(i,d)??[]},t[11]=i,t[12]=u,t[13]=a,t[14]=r,t[15]=o,t[16]=c):c=t[16];let p;t[17]!==l||t[18]!==c?(p={queryKey:l,queryFn:c},t[17]=l,t[18]=c,t[19]=p):p=t[19];const{data:C}=f(p);return C.items}function B(n,s,r){const e=O.c(36),t=Q();let i;e[0]!==s?(i=s.toUpperCase(),e[0]=s,e[1]=i):i=e[1];const u=i,a=`COLLECTION_${u}_CREATE`,l=`COLLECTION_${u}_UPDATE`,f=`COLLECTION_${u}_DELETE`;let o;e[2]!==a||e[3]!==r?(o=async _=>(await r(a,{data:_})).item,e[2]=a,e[3]=r,e[4]=o):o=e[4];let c;e[5]!==s||e[6]!==t||e[7]!==n?(c=()=>{t.invalidateQueries({queryKey:S.collectionListPrefix(n,s)}),t.invalidateQueries({queryKey:S.collectionListInfinitePrefix(n,s)}),b.success("Item created successfully")},e[5]=s,e[6]=t,e[7]=n,e[8]=c):c=e[8];let p;e[9]!==o||e[10]!==c?(p={mutationFn:o,onSuccess:c,onError:H},e[9]=o,e[10]=c,e[11]=p):p=e[11];const C=I(p);let d;e[12]!==r||e[13]!==l?(d=async _=>{const{id:T,data:q}=_;return(await r(l,{id:T,data:q})).item},e[12]=r,e[13]=l,e[14]=d):d=e[14];let h;e[15]!==s||e[16]!==t||e[17]!==n?(h=_=>{t.invalidateQueries({queryKey:S.collectionListPrefix(n,s)}),t.invalidateQueries({queryKey:S.collectionListInfinitePrefix(n,s)}),t.invalidateQueries({queryKey:S.collectionItem(n,s,_.id)}),b.success("Item updated successfully")},e[15]=s,e[16]=t,e[17]=n,e[18]=h):h=e[18];let g;e[19]!==d||e[20]!==h?(g={mutationFn:d,onSuccess:h,onError:G},e[19]=d,e[20]=h,e[21]=g):g=e[21];const y=I(g);let E;e[22]!==f||e[23]!==r?(E=async _=>(await r(f,{id:_})).item.id,e[22]=f,e[23]=r,e[24]=E):E=e[24];let m;e[25]!==s||e[26]!==t||e[27]!==n?(m=()=>{t.invalidateQueries({queryKey:S.collectionListPrefix(n,s)}),t.invalidateQueries({queryKey:S.collectionListInfinitePrefix(n,s)}),b.success("Item deleted successfully")},e[25]=s,e[26]=t,e[27]=n,e[28]=m):m=e[28];let w;e[29]!==E||e[30]!==m?(w={mutationFn:E,onSuccess:m,onError:M},e[29]=E,e[30]=m,e[31]=w):w=e[31];const v=I(w);let x;return e[32]!==C||e[33]!==v||e[34]!==y?(x={create:C,update:y,delete:v},e[32]=C,e[33]=v,e[34]=y,e[35]=x):x=e[35],x}function M(n){const s=n instanceof Error?n.message:String(n);b.error(`Failed to delete item: ${s}`)}function G(n){const s=n instanceof Error?n.message:String(n);b.error(`Failed to update item: ${s}`)}function H(n){const s=n instanceof Error?n.message:String(n);b.error(`Failed to create item: ${s}`)}function ee(n){const s=O.c(3);let r;s[0]!==n?(r=n===void 0?{}:n,s[0]=n,s[1]=r):r=s[1];const e=r,{org:t}=j();let i;s[2]===Symbol.for("react.memo_cache_sentinel")?(i=$(),s[2]=i):i=s[2];const u=i;return R(t.slug,"CONNECTIONS",u,e)}function te(n){const s=O.c(1),{org:r}=j();let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=$(),s[0]=e):e=s[0];const t=e;return J(r.slug,"CONNECTIONS",n,t)}function se(){const n=O.c(1),{org:s}=j();let r;n[0]===Symbol.for("react.memo_cache_sentinel")?(r=$(),n[0]=r):r=n[0];const e=r;return B(s.slug,"CONNECTIONS",e)}export{X as I,U,te as a,ee as b,$ as c,se as d,B as e,J as f,z as n,R as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n}from"./index-
|
|
1
|
+
import{c as n}from"./index-Dbugj1Qf.js";import{u,e as m,f,c as r}from"./use-connection-BcR9UFbs.js";import{u as a}from"./tooltip-C_Is8XE4.js";function g(t){const e=n.c(3);let o;e[0]!==t?(o=t===void 0?{}:t,e[0]=t,e[1]=o):o=e[1];const s=o,{org:c}=a();let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=r(),e[2]=l):l=e[2];const i=l;return u(c.slug,"GATEWAY",i,s)}function y(t){const e=n.c(1),{org:o}=a();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=r(),e[0]=s):s=e[0];const c=s;return f(o.slug,"GATEWAY",t,c)}function G(){const t=n.c(1),{org:e}=a();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r(),t[0]=o):o=t[0];const s=o;return m(e.slug,"GATEWAY",s)}export{G as a,y as b,g as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,c as T}from"./index-Dbugj1Qf.js";import{u as D}from"./use-mobile-BAgI68xi.js";const W=({size:l=24,color:e="currentColor",...t})=>a.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},a.createElement("path",{d:"M2.42 12.713c-.136-.215-.204-.323-.242-.49a1.173 1.173 0 0 1 0-.446c.038-.167.106-.274.242-.49C3.546 9.505 6.895 5 12 5s8.455 4.505 9.58 6.287c.137.215.205.323.243.49.029.125.029.322 0 .446-.038.167-.106.274-.242.49C20.455 14.495 17.105 19 12 19c-5.106 0-8.455-4.505-9.58-6.287Z"}),a.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));W.displayName="Eye";function k(l){const e=`deco-filters-${l}`,[t,c]=a.useState(()=>{try{const o=globalThis.localStorage?.getItem(e);if(o)return JSON.parse(o)}catch(o){console.error("Failed to parse stored filters:",o)}return[]});return[t,o=>{c(o);try{globalThis.localStorage?.setItem(e,JSON.stringify(o))}catch(i){console.error("Failed to save filters:",i)}}]}function C(l){const e=T.c(7),[t,c]=a.useState(l),[s,o]=a.useState(l?"desc":null);let i;e[0]!==s||e[1]!==t?(i=h=>{t!==h?(c(h),o("asc")):s==="asc"?o("desc"):s==="desc"&&(c(void 0),o(null))},e[0]=s,e[1]=t,e[2]=i):i=e[2];const u=i;let r;return e[3]!==u||e[4]!==s||e[5]!==t?(r={sortKey:t,sortDirection:s,handleSort:u},e[3]=u,e[4]=s,e[5]=t,e[6]=r):r=e[6],r}function L(l,e){const t=T.c(12),c=e===void 0?"cards":e,s=D(),o=a.useRef(s),i=l?`deco-view-mode-${l}`:"deco-view-mode";let u;t[0]!==c||t[1]!==i?(u=()=>{const d=globalThis.localStorage?.getItem(i);return d==="cards"||d==="table"?d:c},t[0]=c,t[1]=i,t[2]=u):u=t[2];const[r,h]=a.useState(u);let f;t[3]!==i?(f=d=>{h(d),globalThis.localStorage?.setItem(i,d)},t[3]=i,t[4]=f):f=t[4];const p=f;let S,g;t[5]!==s||t[6]!==r?(S=()=>{!o.current&&s&&r==="table"&&h("cards"),o.current=s},g=[s,r],t[5]=s,t[6]=r,t[7]=S,t[8]=g):(S=t[7],g=t[8]),a.useEffect(S,g);let n;return t[9]!==p||t[10]!==r?(n=[r,p],t[9]=p,t[10]=r,t[11]=n):n=t[11],n}function O(l){const e=T.c(20),{namespace:t,resource:c,defaultSortKey:s,defaultViewMode:o}=l,i=s===void 0?"title":s,u=o===void 0?"table":o,[r,h]=a.useState(""),f=a.useDeferredValue(r),p=`${t}-${c}`,[S,g]=k(p),n=`mesh-${c}-filter-visible-${t}`;let d;e[0]!==n?(d=()=>globalThis.localStorage?.getItem(n)==="true",e[0]=n,e[1]=d):d=e[1];const[m,B]=a.useState(d);let y;e[2]!==n?(y=I=>{B(I),globalThis.localStorage?.setItem(n,String(I))},e[2]=n,e[3]=y):y=e[3];const b=y;let M;e[4]!==m||e[5]!==b?(M=()=>{b(!m)},e[4]=m,e[5]=b,e[6]=M):M=e[6];const w=M,[V,$]=L(`mesh-${c}-${t}`,u),{sortKey:x,sortDirection:F,handleSort:K}=C(i),E=x;let v;return e[7]!==m||e[8]!==S||e[9]!==K||e[10]!==r||e[11]!==f||e[12]!==b||e[13]!==g||e[14]!==$||e[15]!==F||e[16]!==E||e[17]!==w||e[18]!==V?(v={search:r,searchTerm:f,setSearch:h,filters:S,setFilters:g,filterBarVisible:m,setFilterBarVisible:b,toggleFilterBar:w,viewMode:V,setViewMode:$,sortKey:E,sortDirection:F,handleSort:K},e[7]=m,e[8]=S,e[9]=K,e[10]=r,e[11]=f,e[12]=b,e[13]=g,e[14]=$,e[15]=F,e[16]=E,e[17]=w,e[18]=V,e[19]=v):v=e[19],v}export{W as s,O as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as E,a2 as b}from"./index-
|
|
1
|
+
import{c as E,a2 as b}from"./index-Dbugj1Qf.js";import{u as j}from"./useQuery-BrB4rOUi.js";function T(g){const e=E.c(18),{url:o,token:r,enabled:w}=g,$=w===void 0?!0:w;let i;e[0]!==r||e[1]!==o?(i=b.mcpTools(o,r),e[0]=r,e[1]=o,e[2]=i):i=e[2];let s;e[3]!==r||e[4]!==o?(s=async()=>{if(!o)return[];const m={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};r&&(m.Authorization=`Bearer ${r}`);const u=await fetch(o,{method:"POST",headers:m,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mesh-mcp",version:"1.0.0"}}})});if(!u.ok)throw new Error(`MCP initialization failed: ${u.status}`);const h=await u.json();if(h.error)throw new Error(`MCP initialization error: ${h.error.message} (code: ${h.error.code})`);const y=await fetch(o,{method:"POST",headers:m,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"tools/list",params:{}})});if(!y.ok)throw new Error(`Failed to list tools: ${y.status}`);const l=await y.json();if(l.error)throw new Error(`Failed to list tools: ${l.error.message} (code: ${l.error.code})`);return l.result?.tools||[]},e[3]=r,e[4]=o,e[5]=s):s=e[5];const d=$&&!!o;let a;e[6]!==i||e[7]!==s||e[8]!==d?(a={queryKey:i,queryFn:s,enabled:d,staleTime:3e4,retry:!1},e[6]=i,e[7]=s,e[8]=d,e[9]=a):a=e[9];const t=j(a),f=o?t.isLoading?"connecting":t.isError?"error":"ready":"disconnected";let n;e[10]!==t.data?(n=t.data||[],e[10]=t.data,e[11]=n):n=e[11];const p=t.error;let c;return e[12]!==t.isLoading||e[13]!==t.refetch||e[14]!==f||e[15]!==n||e[16]!==p?(c={tools:n,state:f,error:p,isLoading:t.isLoading,refetch:t.refetch},e[12]=t.isLoading,e[13]=t.refetch,e[14]=f,e[15]=n,e[16]=p,e[17]=c):c=e[17],c}export{T as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,a3 as n,a2 as u,a}from"./index-
|
|
1
|
+
import{c as o,a3 as n,a2 as u,a}from"./index-Dbugj1Qf.js";import{u as i}from"./tooltip-C_Is8XE4.js";function p(){const e=o.c(4),{locator:s}=i();let t;e[0]!==s?(t=u.members(s),e[0]=s,e[1]=t):t=e[1];let r;return e[2]!==t?(r={queryKey:t,queryFn:m},e[2]=t,e[3]=r):r=e[3],n(r)}function m(){return a.organization.listMembers()}export{p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,r}from"./index-
|
|
1
|
+
import{c as m,r}from"./index-Dbugj1Qf.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,a3 as y,a1 as T,a2 as f}from"./index-
|
|
1
|
+
import{c as o,a3 as y,a1 as T,a2 as f}from"./index-Dbugj1Qf.js";import{u as p}from"./button-eIETQb0Y.js";import{c as m}from"./use-connection-BcR9UFbs.js";function N(t){const e=o.c(8);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=m(),e[0]=n):n=e[0];const c=n;let r;e[1]!==t?(r=f.organizationSettings(t),e[1]=t,e[2]=r):r=e[2];let s;e[3]!==t?(s=async()=>{const u=await c("ORGANIZATION_SETTINGS_GET",{});return u||{organizationId:t,sidebar_items:null,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}},e[3]=t,e[4]=s):s=e[4];let l;e[5]!==r||e[6]!==s?(l={queryKey:r,queryFn:s,staleTime:6e4},e[5]=r,e[6]=s,e[7]=l):l=e[7];const{data:i}=y(l);return i}function C(t){const e=o.c(11),n=T();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=m(),e[0]=c):c=e[0];const r=c;let s;e[1]!==t?(s=async S=>await r("ORGANIZATION_SETTINGS_UPDATE",{organizationId:t,...S}),e[1]=t,e[2]=s):s=e[2];let l;e[3]!==t||e[4]!==n?(l=()=>{n.invalidateQueries({queryKey:f.organizationSettings(t)})},e[3]=t,e[4]=n,e[5]=l):l=e[5];let i;e[6]!==s||e[7]!==l?(i={mutationFn:s,onSuccess:l},e[6]=s,e[7]=l,e[8]=i):i=e[8];const u=p(i);let a;return e[9]!==u?(a={update:u},e[9]=u,e[10]=a):a=e[10],a}export{C as a,N as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,a3 as q,a2 as C}from"./index-
|
|
1
|
+
import{c as f,a3 as q,a2 as C}from"./index-Dbugj1Qf.js";function S(p){const e=f.c(23);let s,o,a,t,l;e[0]!==p?({toolCaller:a,toolName:l,toolInputParams:t,scope:o,...s}=p,e[0]=p,e[1]=s,e[2]=o,e[3]=a,e[4]=t,e[5]=l):(s=e[1],o=e[2],a=e[3],t=e[4],l=e[5]);let r,u,i,c;if(e[6]!==s||e[7]!==o||e[8]!==t||e[9]!==l){const y=JSON.stringify(t);c=q,r=s,u=s.staleTime??6e4,i=C.toolCall(o,l,y),e[6]=s,e[7]=o,e[8]=t,e[9]=l,e[10]=r,e[11]=u,e[12]=i,e[13]=c}else r=e[10],u=e[11],i=e[12],c=e[13];let n;e[14]!==a||e[15]!==t||e[16]!==l?(n=async()=>await a(l,t),e[14]=a,e[15]=t,e[16]=l,e[17]=n):n=e[17];let m;return e[18]!==r||e[19]!==u||e[20]!==i||e[21]!==n?(m={...r,staleTime:u,queryKey:i,queryFn:n},e[18]=r,e[19]=u,e[20]=i,e[21]=n,e[22]=m):m=e[22],c(m)}export{S as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b8 as u,b4 as s}from"./index-Dbugj1Qf.js";function o(e,r){return u(e,s,r)}export{o as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{br as t,aD as a}from"./index-Dbugj1Qf.js";function e(...r){return t(a(r))}export{e as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n}from"./index-Dbugj1Qf.js";const i=({size:e=24,color:o="currentColor",...c})=>n.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:o,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...c},n.createElement("path",{d:"M17 10V8A5 5 0 0 0 7 8v2m5 4.5v2M8.8 21h6.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 18.72 20 17.88 20 16.2v-1.4c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C17.72 10 16.88 10 15.2 10H8.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C4 12.28 4 13.12 4 14.8v1.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C6.28 21 7.12 21 8.8 21Z"}));i.displayName="Lock01";const t={SELF:"self",REGISTRY:"registry",COMMUNITY_REGISTRY:"community-registry"},r={SELF:e=>`${e}_${t.SELF}`,REGISTRY:e=>`${e}_${t.REGISTRY}`,COMMUNITY_REGISTRY:e=>`${e}_${t.COMMUNITY_REGISTRY}`};function a(e){return{id:r.REGISTRY(e),title:"Deco Store",description:"Official deco MCP registry with curated integrations",connection_type:"HTTP",connection_url:"https://api.decocms.com/mcp/registry",icon:"https://assets.decocache.com/decocms/00ccf6c3-9e13-4517-83b0-75ab84554bb9/596364c63320075ca58483660156b6d9de9b526e.png",app_name:"deco-registry",app_id:null,connection_token:null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{isDefault:!0,type:"registry"}}}function l(){return{id:t.COMMUNITY_REGISTRY,title:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",connection_type:"HTTP",connection_url:"https://sites-registry.decocache.com/mcp",icon:"https://assets.decocache.com/decocms/cd7ca472-0f72-463a-b0de-6e44bdd0f9b4/mcp.png",app_name:"mcp-registry",app_id:null,connection_token:null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{isDefault:!0,type:"registry"}}}export{t as W,l as a,a as g,i};
|
package/dist/client/index.html
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<title>MCP Mesh</title>
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
6
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
6
|
+
<script type="module" crossorigin src="/assets/index-Dbugj1Qf.js"></script>
|
|
7
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BxZYaQlu.css">
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/mesh",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.35",
|
|
4
4
|
"description": "MCP Mesh - Self-hostable MCP Gateway for managing AI connections and tools",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Deco team",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@ai-sdk/mcp": "^1.0.0",
|
|
39
|
+
"@untitledui/icons": "^0.0.19",
|
|
39
40
|
"@xyflow/react": "^12.10.0",
|
|
40
41
|
"kysely": "^0.28.8",
|
|
41
42
|
"kysely-bun-worker": "^0.6.0"
|
|
@@ -96,7 +97,6 @@
|
|
|
96
97
|
"idb-keyval": "^6.2.2",
|
|
97
98
|
"input-otp": "^1.4.2",
|
|
98
99
|
"jose": "^6.0.11",
|
|
99
|
-
"lucide-react": "^0.552.0",
|
|
100
100
|
"nanoid": "^5.1.6",
|
|
101
101
|
"pg": "^8.16.3",
|
|
102
102
|
"react": "^19.2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as k,j as i,r as V,af as R,aH as $,aI as O,aJ as U}from"./index-ckOjSsbf.js";import{c as m}from"./utils-pyEEdArk.js";import{I as L}from"./icon-DrnCTy8O.js";function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(U,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function T(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function _(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(O,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const E=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],D="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function H(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%E.length;return E[s]}const S=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-xs font-semibold","2xs":"w-4 h-4 text-xs font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),J=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),W=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function B(r){const e=k.c(35);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,[f,x]=V.useState(!1);let I;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],I=c;break e}I=t}const C=I;let z;e:{if(j){z=D;break e}if(typeof t=="string"){let c;e[11]!==t?(c=H(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=E[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const A=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=m(S({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==A||e[25]!==f||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&A?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",y),children:i.jsx(L,{name:A,size:W(h)})}):i.jsxs(i.Fragment,{children:[l&&!f&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:m(J({objectFit:u})),onError:()=>x(!0)}),(!l||f)&&i.jsx(_,{className:m(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=A,e[25]=f,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let F;return e[31]!==o||e[32]!==v||e[33]!==w?(F=i.jsx(M,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=F):F=e[34],F}function G(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,f=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==f||e[16]!==l?(x=i.jsx(B,{shape:b,url:l,fallback:t,size:f,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=f,e[16]=l,e[17]=x):x=e[17],x}G.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{G as A};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as d,j as c,bv as n,bw as l}from"./index-ckOjSsbf.js";import{c as m}from"./utils-pyEEdArk.js";import{f as b}from"./select-CccYpzrg.js";function x(o){const e=d.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=m("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(l,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(b,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(n,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{x as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{be as e}from"./index-ckOjSsbf.js";const c=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],y=e("circle-alert",c);export{y as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{be as _,r as N,d as O,as as ee,j as t,c as S,af as te,a6 as se,bd as K}from"./index-ckOjSsbf.js";import{f as oe,c as D,U as B,a as ne,e as re}from"./use-connection-IoNoQwc6.js";import{T as ae}from"./tool-set-selector-DHYjwwOX.js";import{B as ie}from"./badge-DAqf2QcS.js";import{B as I}from"./button-UfWqfnW6.js";import{I as z}from"./icon-DrnCTy8O.js";import{I as U}from"./input-CwErI3qM.js";import{S as le}from"./spinner-B5hpYDWD.js";import{T as W}from"./textarea-DdWHnTcH.js";import{c as k}from"./utils-pyEEdArk.js";import{a as G,u as ce,O as de,M as me,P as ue,E as xe}from"./index-BNPz145B.js";import{b as Z,a as fe,V as H}from"./layout-CRWUQVBf.js";import{U as pe}from"./upload-ROO0Hq6M.js";import{u as he}from"./use-mcp-sqfwIh1y.js";import{C as ge}from"./circle-alert-Bqyf_cFr.js";import{E as be}from"./error-boundary-CcJOnlMu.js";import"./tooltip-BEGc6-ta.js";import"./checkbox-D7oSBQoW.js";import"./select-CccYpzrg.js";import"./collection-search-Bjsljx6L.js";import"./mcp-oauth-D8oBlZpZ.js";import"./auth-BaVMGGfx.js";import"./use-organization-settings-CbNhltyL.js";import"./empty-state-1y2EWg7D.js";import"./use-binding-BDNnvRc3.js";import"./use-tool-call-DtbPDnAJ.js";import"./form-qod6mSHT.js";import"./use-gateway-CQn5-Udm.js";import"./formatDistanceToNow-Ctx6mZEP.js";import"./extract-connection-data-CegZyyXr.js";import"./registry-utils-ulDDT0d8.js";import"./generate-id-Dyweu44Y.js";import"./index-CbCySsU3.js";import"./index-C3PHf_xm.js";import"./schema-DVGSbEVo.js";import"./useQuery-CBshJqa8.js";const je=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],ve=_("box",je);const Ne=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ye=_("clock",Ne);const we=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Se=_("code",we);const Ce=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ke=_("copy",Ce);const $e=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Ie=_("database",$e);const _e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Te=_("info",_e);const Ee=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],q=_("play",Ee);function Ae(s){const e=S.c(14),{value:r,onChange:a,alt:n}=s,o=N.useRef(null);let i;e[0]!==a?(i=j=>{const w=j.target.files?.[0];if(w){const y=new FileReader;y.onloadend=()=>{const g=y.result;a(g)},y.readAsDataURL(w)}},e[0]=a,e[1]=i):i=e[1];const u=i;let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{o.current?.click()},e[2]=l):l=e[2];const m=l;let c;e[3]!==u?(c=t.jsx("input",{type:"file",ref:o,className:"hidden",accept:"image/*",onChange:u}),e[3]=u,e[4]=c):c=e[4];let f;e[5]!==n||e[6]!==r?(f=r?t.jsx("img",{src:r,alt:n||"Avatar",className:"w-full h-full object-cover"}):t.jsx("div",{className:"w-full h-full flex items-center justify-center text-2xl",children:"🤖"}),e[5]=n,e[6]=r,e[7]=f):f=e[7];let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center rounded-xl",children:t.jsx(pe,{className:"h-5 w-5 text-white"})}),e[8]=p):p=e[8];let h;e[9]!==f?(h=t.jsxs("div",{className:"h-full w-full rounded-xl border border-border bg-muted/20 overflow-hidden relative",children:[f,p]}),e[9]=f,e[10]=h):h=e[10];let b;return e[11]!==c||e[12]!==h?(b=t.jsxs("div",{className:"relative h-14 w-14 shrink-0 cursor-pointer group",onClick:m,children:[c,h]}),e[11]=c,e[12]=h,e[13]=b):b=e[13],b}function ze({itemId:s,onBack:e,onUpdate:r}){const[a,n]=N.useState(!1),[o,i]=N.useState("profile"),{connectionId:u}=O({from:"/shell/$org/mcps/$connectionId/$collectionName/$itemId"}),l=u??B,m=D(l),c=oe(l,"AGENT",s,m),{register:f,handleSubmit:p,reset:h,setValue:b,watch:j,formState:{isDirty:w}}=ee({defaultValues:{title:"",description:"",instructions:"",avatar:"",tool_set:{}}}),y=j("avatar"),g=j("tool_set")??{};N.useEffect(()=>{c&&h({title:c.title??"",description:c.description??"",instructions:c.instructions??"",avatar:c.avatar??"",tool_set:c.tool_set??{}})},[c,h]);const x=async $=>{n(!0);try{await r($)}finally{n(!1)}},R=$=>{b("tool_set",$,{shouldDirty:!0})};return c?t.jsxs(Z,{onBack:e,children:[t.jsxs(fe,{children:[t.jsx(I,{variant:o==="profile"?"secondary":"ghost",size:"sm",className:k("h-7 font-normal",o==="profile"?"bg-muted text-foreground":"text-muted-foreground"),onClick:()=>i("profile"),children:"Profile"}),t.jsx(I,{variant:o==="tools"?"secondary":"ghost",size:"sm",className:k("h-7 font-normal",o==="tools"?"bg-muted text-foreground":"text-muted-foreground"),onClick:()=>i("tools"),children:"Tools"}),t.jsx(I,{variant:o==="triggers"?"secondary":"ghost",size:"sm",className:k("h-7 font-normal",o==="triggers"?"bg-muted text-foreground":"text-muted-foreground"),onClick:()=>i("triggers"),disabled:!0,children:"Triggers"}),t.jsx(I,{variant:o==="advanced"?"secondary":"ghost",size:"sm",className:k("h-7 font-normal",o==="advanced"?"bg-muted text-foreground":"text-muted-foreground"),onClick:()=>i("advanced"),disabled:!0,children:"Advanced"})]}),t.jsxs(H,{children:[t.jsx(G,{connectionId:u,title:c.title,icon:c.avatar??"smart_toy"}),t.jsx(I,{className:"bg-[#d0ec1a] text-[#07401a] hover:bg-[#d0ec1a]/90 h-7 text-xs font-medium",onClick:p(x),disabled:!w||a,children:a?t.jsxs(t.Fragment,{children:[t.jsx(z,{name:"progress_activity",size:12,className:"mr-2 animate-spin"}),"Saving..."]}):"Save changes"})]}),o==="profile"&&t.jsx("div",{className:"p-5",children:t.jsxs("div",{className:"max-w-3xl mx-auto space-y-6",children:[t.jsxs("div",{className:"flex gap-4 items-start",children:[t.jsx(Ae,{value:y,onChange:$=>b("avatar",$,{shouldDirty:!0}),alt:j("title")}),t.jsxs("div",{className:"space-y-3 pt-1 flex-1",children:[t.jsx(U,{...f("title"),className:"text-2xl font-medium text-foreground border-transparent hover:border-input focus:border-input px-0 h-auto bg-transparent shadow-none",placeholder:"Agent Name"}),t.jsx(U,{...f("description"),className:"text-sm text-muted-foreground border-transparent hover:border-input focus:border-input px-0 h-auto bg-transparent shadow-none",placeholder:"Brief description"})]})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs(ie,{variant:"secondary",className:"px-2 py-0.5 h-6 gap-1.5 bg-secondary/50 text-muted-foreground font-normal text-xs hover:bg-secondary/50",children:[t.jsx(Te,{className:"h-3.5 w-3.5"}),"Type @ to add tools and more"]}),t.jsx("div",{className:"relative",children:t.jsx(W,{...f("instructions"),className:"min-h-[400px] resize-none text-sm leading-relaxed font-normal border-0 focus-visible:ring-0 px-0 py-0 shadow-none",placeholder:"Enter agent instructions..."})})]})]})}),o==="tools"&&t.jsx(ae,{toolSet:g,onToolSetChange:R}),o==="triggers"&&t.jsx("div",{className:"p-5",children:t.jsx("div",{className:"text-sm text-muted-foreground",children:"Triggers tab coming soon"})}),o==="advanced"&&t.jsx("div",{className:"p-5",children:t.jsx("div",{className:"text-sm text-muted-foreground",children:"Advanced tab coming soon"})})]}):t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(le,{})})}const Oe=te("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/10 text-destructive border-destructive [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function Re(s){const e=S.c(10);let r,a,n;e[0]!==s?({className:r,variant:n,...a}=s,e[0]=s,e[1]=r,e[2]=a,e[3]=n):(r=e[1],a=e[2],n=e[3]);let o;e[4]!==r||e[5]!==n?(o=k(Oe({variant:n}),r),e[4]=r,e[5]=n,e[6]=o):o=e[6];let i;return e[7]!==a||e[8]!==o?(i=t.jsx("div",{"data-slot":"alert",role:"alert",className:o,...a}),e[7]=a,e[8]=o,e[9]=i):i=e[9],i}function Me(s){const e=S.c(8);let r,a;e[0]!==s?({className:r,...a}=s,e[0]=s,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let n;e[3]!==r?(n=k("line-clamp-1 min-h-4 font-medium tracking-tight",r),e[3]=r,e[4]=n):n=e[4];let o;return e[5]!==a||e[6]!==n?(o=t.jsx("div",{"data-slot":"alert-title",className:n,...a}),e[5]=a,e[6]=n,e[7]=o):o=e[7],o}function Pe(s){const e=S.c(8);let r,a;e[0]!==s?({className:r,...a}=s,e[0]=s,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let n;e[3]!==r?(n=k("text-muted-foreground leading-relaxed",r),e[3]=r,e[4]=n):n=e[4];let o;return e[5]!==a||e[6]!==n?(o=t.jsx("div",{"data-slot":"alert-description",className:n,...a}),e[5]=a,e[6]=n,e[7]=o):o=e[7],o}const Ve=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ue(s){const e=S.c(13),{toolName:r,connectionId:a,onBack:n}=s,o=`/mcp/${a}`;let i;e[0]!==o?(i=new URL(o,window.location.origin),e[0]=o,e[1]=i):i=e[1];const u=i;let l;e[2]!==a?(l={connectionId:a},e[2]=a,e[3]=l):l=e[3];const m=ce(l);if(!m.isAuthenticated){let p;return e[4]!==m.supportsOAuth||e[5]!==n?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:m.supportsOAuth?t.jsx(de,{onAuthenticate:()=>n(),buttonText:"Go back to authenticate"}):t.jsx(me,{hasReadme:!1})}),e[4]=m.supportsOAuth,e[5]=n,e[6]=p):p=e[6],p}const c=`${a}:${r}`;let f;return e[7]!==a||e[8]!==u||e[9]!==n||e[10]!==c||e[11]!==r?(f=t.jsx(De,{toolName:r,connectionId:a,mcpProxyUrl:u,onBack:n},c),e[7]=a,e[8]=u,e[9]=n,e[10]=c,e[11]=r,e[12]=f):f=e[12],f}function De({toolName:s,connectionId:e,mcpProxyUrl:r,onBack:a}){const[n,o]=N.useState({}),[i,u]=N.useState("{}"),[l,m]=N.useState(null),[c,f]=N.useState(null),[p,h]=N.useState(!1),[b,j]=N.useState(null),[w,y]=N.useState("json"),g=he({url:r.href});N.useEffect(()=>{g.error&&console.error("MCP Error:",g.error)},[g.error]);const x=g.tools?.find(d=>d.name===s),R=x?.inputSchema?.properties,$=R?Object.keys(R):[],A=$.length>0,M={};if(A&&x?.inputSchema?.properties)for(const d of $)M[d]=x.inputSchema.required?.includes(d)?"":void 0;const J=d=>Object.prototype.hasOwnProperty.call(n,d),Q=async()=>{h(!0),f(null),m(null),j(null);const d=performance.now(),C=D(e);try{const v=A?{...M,...n}:(()=>{const T=i.trim();if(!T)return{};const E=JSON.parse(T);if(E&&typeof E=="object")return E;throw new Error("Raw JSON input must be an object.")})();A&&x?.inputSchema?.properties&&Object.entries(x.inputSchema.properties).forEach(([T,E])=>{if((E.type==="object"||E.type==="array")&&typeof v[T]=="string")try{v[T]=JSON.parse(v[T])}catch{}});const P=await C(s,v),V=performance.now(),X=Math.round(V-d);m(P);const Y=JSON.stringify(P),F=new TextEncoder().encode(Y).length;j({duration:`${X}ms`,bytes:`${F} bytes`,tokens:`~${Math.ceil(F/4)} tokens`,cost:"$0.0000"})}catch(v){const P=v instanceof Error?v.message:String(v);f(P||"Unknown error occurred");const V=performance.now();j({duration:`${Math.round(V-d)}ms`})}finally{h(!1)}},L=(d,C)=>{o(v=>({...v,[d]:C}))};return t.jsxs(Z,{onBack:a,children:[t.jsx(H,{children:t.jsx(G,{connectionId:e,title:x?.name??Ve(s),icon:"build"})}),t.jsxs("div",{className:"flex flex-col items-center w-full max-w-[1500px] mx-auto p-10 gap-4",children:[t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h1",{className:"text-2xl font-medium text-foreground",children:s}),t.jsx("p",{className:"text-muted-foreground text-base",children:x?.description||"No description available"})]}),t.jsxs("div",{className:"flex items-center gap-4 py-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[g.state==="ready"?t.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500 animate-pulse"}):g.state==="connecting"?t.jsx(z,{name:"progress_activity",size:12,className:"animate-spin text-yellow-500"}):t.jsx("div",{className:"h-2 w-2 rounded-full bg-red-500"}),t.jsx("span",{className:"font-mono text-sm capitalize text-muted-foreground",children:g.state.replace("_"," ")})]}),t.jsx("div",{className:"w-px h-4 bg-border"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(ye,{className:"h-4 w-4 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-sm",children:b?.duration||"-"})]}),t.jsx("div",{className:"w-px h-4 bg-border"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(ve,{className:"h-4 w-4 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-sm",children:b?.tokens||"-"})]}),t.jsx("div",{className:"w-px h-4 bg-border"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ie,{className:"h-4 w-4 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-sm",children:b?.bytes||"-"})]})]}),c&&t.jsxs(Re,{variant:"destructive",className:"max-w-[800px] w-full bg-red-50 dark:bg-red-900/10 border-red-200 dark:border-red-900",children:[t.jsx(ge,{className:"h-4 w-4"}),t.jsx(Me,{children:"Execution Failed"}),t.jsx(Pe,{children:c})]}),t.jsxs("div",{className:"flex flex-col gap-4 w-full max-w-[800px] items-center",children:[t.jsxs("div",{className:"w-full bg-card border border-border rounded-xl shadow-sm overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"h-4 w-4 rounded-sm bg-primary/10 flex items-center justify-center",children:t.jsx(q,{className:"h-3 w-3 text-primary"})}),t.jsx("span",{className:"font-medium text-sm",children:"Input"})]}),t.jsxs(I,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Q,disabled:p,children:[p?t.jsx(z,{name:"progress_activity",size:14,className:"animate-spin"}):t.jsx(q,{className:"h-3.5 w-3.5 fill-current"}),"Execute tool"]})]}),t.jsxs("div",{className:"p-4 space-y-4",children:[t.jsx("div",{className:"text-xs font-mono text-muted-foreground uppercase tracking-wider",children:"Arguments"}),A&&x?.inputSchema?.properties?Object.entries(x.inputSchema.properties).map(([d,C])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-baseline gap-2",children:[t.jsx("label",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:d}),x.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"}),t.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:C.type})]}),C.description&&t.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:C.description}),C.type==="object"||C.type==="array"?t.jsx(W,{className:"flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",value:J(d)?n[d]??"":M[d]??"",onChange:v=>L(d,v.target.value),placeholder:`Enter ${d} as JSON...`}):t.jsx(U,{value:J(d)?n[d]??"":M[d]??"",onChange:v=>L(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):t.jsx("div",{className:"text-sm text-muted-foreground italic",children:"No arguments defined in schema."}),x?.inputSchema&&!A&&t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx("textarea",{className:"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",value:i,onChange:d=>u(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]})]})]}),t.jsxs("div",{className:"w-full bg-card border border-border rounded-xl shadow-sm overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border bg-muted/30",children:[t.jsx("span",{className:"text-xs font-mono text-muted-foreground uppercase tracking-wider",children:"Execution Result"}),t.jsxs("div",{className:"flex items-center bg-muted rounded-lg p-1 h-8",children:[t.jsx("button",{onClick:()=>y("json"),className:k("px-3 py-1 text-xs font-medium rounded-md transition-all",w==="json"?"bg-background shadow-sm text-foreground":"text-muted-foreground hover:text-foreground"),children:"JSON"}),t.jsxs("button",{onClick:()=>y("view"),className:k("px-3 py-1 text-xs font-medium rounded-md transition-all flex items-center gap-1",w==="view"?"bg-background shadow-sm text-foreground":"text-muted-foreground hover:text-foreground"),disabled:!0,title:"Coming soon",children:["Create view",t.jsx(ue,{className:"h-3 w-3"})]})]})]}),t.jsxs("div",{className:"relative min-h-[200px] max-h-[500px] overflow-auto bg-zinc-950 text-zinc-50 p-4 font-mono text-xs",children:[l?t.jsx("pre",{className:"whitespace-pre-wrap break-all",children:JSON.stringify(l,null,2)}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-zinc-700",children:[t.jsx(Se,{className:"h-8 w-8 mb-2 opacity-50"}),t.jsx("p",{children:"Run the tool to see results"})]}),l&&t.jsx("div",{className:"absolute top-4 right-4 flex gap-2",children:t.jsx(I,{size:"icon",variant:"secondary",className:"h-8 w-8 bg-zinc-800 text-zinc-400 hover:text-white hover:bg-zinc-700 border-zinc-700",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(l,null,2)),se.success("Copied to clipboard")},children:t.jsx(ke,{className:"h-4 w-4"})})})]})]})]})]})]})}function Be(s){const e=S.c(7),{itemId:r,onBack:a}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const i=O(n).connectionId??B;if(!ne(i)){let c;return e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=c):c=e[1],c}let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(z,{name:"progress_activity",size:32,className:"animate-spin text-muted-foreground"})}),e[2]=l):l=e[2];let m;return e[3]!==i||e[4]!==a||e[5]!==r?(m=t.jsx(N.Suspense,{fallback:l,children:t.jsx(Ue,{toolName:r,connectionId:i,onBack:a})}),e[3]=i,e[4]=a,e[5]=r,e[6]=m):m=e[6],m}const Je={agent:ze};function Le(){const s=S.c(6),e=K();let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/mcps/$connectionId/$collectionName/$itemId"},s[0]=r):r=s[0];const a=O(r),n=decodeURIComponent(a.itemId);let o;s[1]!==e.history?(o=()=>{e.history.back()},s[1]=e.history,s[2]=o):o=s[2];const i=o,u=Fe;let l;return s[3]!==i||s[4]!==n?(l=t.jsx(Be,{itemId:n,onBack:i,onUpdate:u}),s[3]=i,s[4]=n,s[5]=l):l=s[5],l}async function Fe(s){return Promise.resolve()}function qe(){const s=S.c(17),e=K();let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/mcps/$connectionId/$collectionName/$itemId"},s[0]=r):r=s[0];const a=O(r),n=a.connectionId,o=decodeURIComponent(a.collectionName),i=decodeURIComponent(a.itemId);let u;s[1]!==e.history?(u=()=>{e.history.back()},s[1]=e.history,s[2]=u):u=s[2];const l=u,m=n??B;let c;s[3]!==m?(c=D(m),s[3]=m,s[4]=c):c=s[4];const p=re(m,o,c);let h;s[5]!==p||s[6]!==i?(h=async x=>{i&&await p.update.mutateAsync({id:i,data:x})},s[5]=p,s[6]=i,s[7]=h):h=s[7];const b=h;let j;s[8]!==o?(j=o?.toLowerCase(),s[8]=o,s[9]=j):j=s[9];const w=j,y=w&&Je[w];if(y){let x;return s[10]!==y||s[11]!==l||s[12]!==b||s[13]!==i?(x=t.jsx(y,{itemId:i,onBack:l,onUpdate:b}),s[10]=y,s[11]=l,s[12]=b,s[13]=i,s[14]=x):x=s[14],x}let g;return s[15]!==l?(g=t.jsx(xe,{icon:"extension",title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:l,children:"Go back"}}),s[15]=l,s[16]=g):g=s[16],g}function Ke(){const s=S.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/mcps/$connectionId/$collectionName/$itemId"},s[0]=e):e=s[0];const r=O(e);if(decodeURIComponent(r.collectionName)==="tools"){let i;return s[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Le,{}),s[1]=i):i=s[1],i}let o;return s[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(qe,{}),s[2]=o):o=s[2],o}function _t(){const s=S.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(be,{children:t.jsx(N.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(z,{name:"progress_activity",size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ke,{})})}),s[0]=e):e=s[0],e}export{_t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as X,r as O,j as s}from"./index-ckOjSsbf.js";import{B as se}from"./button-UfWqfnW6.js";import{c as oe,D as ne,b as ie,a as le}from"./dropdown-menu-B7djqSa8.js";import{I as E}from"./icon-DrnCTy8O.js";import{d as ae,b as re,a as ce,T as ue}from"./tooltip-BEGc6-ta.js";import{c as u}from"./utils-pyEEdArk.js";const de={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function fe(K){const e=X.c(66),{value:o,onValueChange:l,options:t,size:f,fullWidth:m,className:d}=K,h=f===void 0?"sm":f,a=m===void 0?!1:m,x=O.useRef(null),p=O.useRef(null);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={left:0,width:0,opacity:0},e[0]=i):i=e[0];const[n,b]=O.useState(i);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=P=>{if(!P.current)return;const{offsetLeft:ee,offsetWidth:te}=P.current;b({left:ee,width:te,opacity:1})},e[1]=r):r=e[1];const g=r;let W;e[2]!==t[0].value||e[3]!==o?(W=()=>{const P=o===t[0].value?x:p;g(P)},e[2]=t[0].value,e[3]=o,e[4]=W):W=e[4];let $;e[5]!==t||e[6]!==o?($=[o,t],e[5]=t,e[6]=o,e[7]=$):$=e[7],O.useEffect(W,$);const c=de[h];let v;e[8]!==d?(v=u("relative flex gap-0 bg-muted rounded-lg",d),e[8]=d,e[9]=v):v=e[9];let j;e[10]!==l||e[11]!==t[0].value?(j=()=>l(t[0].value),e[10]=l,e[11]=t[0].value,e[12]=j):j=e[12];const L=a?"flex-1 h-12 px-4":c.button,q=!a&&t[0].label?"px-3":"";let w;e[13]!==q||e[14]!==L?(w=u("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",L,q),e[13]=q,e[14]=L,e[15]=w):w=e[15];const Y=t[0].icon,A=o===t[0].value?"text-foreground":"text-muted-foreground";let y;e[16]!==c.icon||e[17]!==A?(y=u("transition-colors ease-out duration-200",c.icon,A),e[16]=c.icon,e[17]=A,e[18]=y):y=e[18];let N;e[19]!==t[0].icon||e[20]!==y?(N=s.jsx(E,{name:Y,className:y}),e[19]=t[0].icon,e[20]=y,e[21]=N):N=e[21];let z;e[22]!==t[0].label||e[23]!==t[0].value||e[24]!==o?(z=t[0].label&&s.jsx("span",{className:u("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[0].value?"text-foreground":"text-muted-foreground"),children:t[0].label}),e[22]=t[0].label,e[23]=t[0].value,e[24]=o,e[25]=z):z=e[25];let C;e[26]!==w||e[27]!==N||e[28]!==z||e[29]!==j?(C=s.jsxs("button",{ref:x,type:"button",onClick:j,className:w,children:[N,z]}),e[26]=w,e[27]=N,e[28]=z,e[29]=j,e[30]=C):C=e[30];let _;e[31]!==l||e[32]!==t[1].value?(_=()=>l(t[1].value),e[31]=l,e[32]=t[1].value,e[33]=_):_=e[33];const F=a?"flex-1 h-12 px-4":c.button,G=!a&&t[1].label?"px-3":"";let k;e[34]!==F||e[35]!==G?(k=u("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",F,G),e[34]=F,e[35]=G,e[36]=k):k=e[36];const Z=t[1].icon,H=o===t[1].value?"text-foreground":"text-muted-foreground";let S;e[37]!==c.icon||e[38]!==H?(S=u("transition-colors ease-out duration-200",c.icon,H),e[37]=c.icon,e[38]=H,e[39]=S):S=e[39];let T;e[40]!==t[1].icon||e[41]!==S?(T=s.jsx(E,{name:Z,className:S}),e[40]=t[1].icon,e[41]=S,e[42]=T):T=e[42];let D;e[43]!==t[1].label||e[44]!==t[1].value||e[45]!==o?(D=t[1].label&&s.jsx("span",{className:u("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[1].value?"text-foreground":"text-muted-foreground"),children:t[1].label}),e[43]=t[1].label,e[44]=t[1].value,e[45]=o,e[46]=D):D=e[46];let M;e[47]!==_||e[48]!==k||e[49]!==T||e[50]!==D?(M=s.jsxs("button",{ref:p,type:"button",onClick:_,className:k,children:[T,D]}),e[47]=_,e[48]=k,e[49]=T,e[50]=D,e[51]=M):M=e[51];const J=a?"h-12":c.button;let R;e[52]!==J?(R=u("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",J),e[52]=J,e[53]=R):R=e[53];const Q=`${n.left}px`,U=`${n.width}px`;let I;e[54]!==n.opacity||e[55]!==Q||e[56]!==U?(I={left:Q,width:U,opacity:n.opacity},e[54]=n.opacity,e[55]=Q,e[56]=U,e[57]=I):I=e[57];let V;e[58]!==R||e[59]!==I?(V=s.jsx("div",{className:R,style:I}),e[58]=R,e[59]=I,e[60]=V):V=e[60];let B;return e[61]!==C||e[62]!==M||e[63]!==V||e[64]!==v?(B=s.jsxs("div",{className:v,children:[C,M,V]}),e[61]=C,e[62]=M,e[63]=V,e[64]=v,e[65]=B):B=e[65],B}function ve(K){const e=X.c(15),{viewMode:o,onViewModeChange:l,sortKey:t,sortDirection:f,onSort:m,sortOptions:d}=K;let h;e[0]!==d?(h=d===void 0?[]:d,e[0]=d,e[1]=h):h=e[1];const a=h;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ae,{children:s.jsxs(re,{children:[s.jsx(ce,{asChild:!0,children:s.jsx(ne,{asChild:!0,children:s.jsx(se,{variant:"outline",size:"icon",className:"size-7 border border-input",children:s.jsx(E,{name:"tune",size:16})})})}),s.jsx(ue,{children:"Search filters"})]})}),e[2]=x):x=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=[{value:"table",icon:"table_rows"},{value:"cards",icon:"grid_view"}],e[3]=p):p=e[3];let i;e[4]!==l||e[5]!==o?(i=s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(fe,{value:o,onValueChange:l,fullWidth:!0,options:p})}),e[4]=l,e[5]=o,e[6]=i):i=e[6];let n;e[7]!==m||e[8]!==f||e[9]!==t||e[10]!==a?(n=a.length>0&&m&&s.jsxs("div",{className:"p-2",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),a.map(r=>{const g=t===r.id;return s.jsx(oe,{onClick:()=>m(r.id),className:u("h-8 px-2 py-0 cursor-pointer",g&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[g&&s.jsx(E,{name:"check",size:16,className:"text-foreground shrink-0"}),!g&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:r.label}),g&&f&&s.jsx(E,{name:f==="asc"?"arrow_upward":"arrow_downward",size:16,className:"text-foreground shrink-0"})]})},r.id)})]}),e[7]=m,e[8]=f,e[9]=t,e[10]=a,e[11]=n):n=e[11];let b;return e[12]!==i||e[13]!==n?(b=s.jsxs(ie,{children:[x,s.jsxs(le,{align:"end",className:"w-[200px] p-0 gap-0",children:[i,n]})]}),e[12]=i,e[13]=n,e[14]=b):b=e[14],b}export{ve as C,fe as V};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as x,j as a}from"./index-ckOjSsbf.js";import{I as u}from"./icon-DrnCTy8O.js";import{I as b}from"./input-CwErI3qM.js";import{c as g}from"./utils-pyEEdArk.js";function I(h){const e=x.c(13),{value:n,onChange:c,placeholder:d,onKeyDown:i,className:m}=h,f=d===void 0?"Search...":d;let r;e[0]!==m?(r=g("shrink-0 w-full border-b border-border h-12",m),e[0]=m,e[1]=r):r=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(u,{name:"search",size:16,className:"text-muted-foreground shrink-0"}),e[2]=o):o=e[2];let s;e[3]!==c?(s=p=>c(p.target.value),e[3]=c,e[4]=s):s=e[4];let t;e[5]!==i||e[6]!==f||e[7]!==s||e[8]!==n?(t=a.jsxs("div",{className:"flex items-center gap-2.5 h-12 px-4",children:[o,a.jsx(b,{value:n,onChange:s,onKeyDown:i,placeholder:f,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]}),e[5]=i,e[6]=f,e[7]=s,e[8]=n,e[9]=t):t=e[9];let l;return e[10]!==r||e[11]!==t?(l=a.jsx("div",{className:r,children:t}),e[10]=r,e[11]=t,e[12]=l):l=e[12],l}export{I as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as N,j as o}from"./index-ckOjSsbf.js";import{c as u}from"./utils-pyEEdArk.js";import{I as T}from"./icon-DrnCTy8O.js";function $(a){const e=N.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("div",{"data-slot":"table-container",className:"relative w-full min-w-0",children:o.jsx("table",{"data-slot":"table",className:l,...s})}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function R(a){const e=N.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("[&_tr]:border-b",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("thead",{"data-slot":"table-header",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function H(a){const e=N.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("tbody",{"data-slot":"table-body",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function S(a){const e=N.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("tr",{"data-slot":"table-row",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function I(a){const e=N.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("th",{"data-slot":"table-head",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function L(a){const e=N.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("td",{"data-slot":"table-cell",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function z(a){const e=N.c(29),{columns:t,data:s,sortKey:l,sortDirection:r,onSort:m,onRowClick:c,rowClassName:p}=a;let h;e[0]!==r?(h=function(n,w){return o.jsx("div",{className:"w-4 flex items-center justify-center",children:w&&r&&o.jsx(T,{name:r==="asc"?"arrow_upward":"arrow_downward",size:16,className:"text-muted-foreground transition-colors"})})},e[0]=r,e[1]=h):h=e[1];const g=h;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=function(n,w){let C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-xs h-9 uppercase tracking-wider";return n===w-1&&(C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-xs h-9 uppercase tracking-wider w-8"),C},e[2]=x):x=e[2];const i=x;let d;if(e[3]!==t||e[4]!==m||e[5]!==g||e[6]!==l){let f;e[8]!==t.length||e[9]!==m||e[10]!==g||e[11]!==l?(f=(n,w)=>{const C=l===n.id;return o.jsx(I,{className:u(i(w,t.length),"group transition-colors select-none",n.sortable&&"hover:bg-accent cursor-pointer",n.rowClassName,n.cellClassName),onClick:n.sortable&&m?()=>m(n.id):void 0,children:o.jsxs("span",{className:"flex items-center gap-1",children:[n.header,n.sortable&&g(n.id,C)]})},n.id)},e[8]=t.length,e[9]=m,e[10]=g,e[11]=l,e[12]=f):f=e[12],d=t.map(f),e[3]=t,e[4]=m,e[5]=g,e[6]=l,e[7]=d}else d=e[7];let j;e[13]!==d?(j=o.jsx(R,{className:"sticky top-0 z-10 border-b-0 bg-muted/30",children:o.jsx(S,{className:"h-9 hover:bg-transparent border-b border-border",children:d})}),e[13]=d,e[14]=j):j=e[14];let v;if(e[15]!==t||e[16]!==s||e[17]!==c||e[18]!==p){let f;e[20]!==t||e[21]!==c||e[22]!==p?(f=(n,w)=>{const C=p?.(n);return o.jsx(S,{"data-row-index":w,className:u("group/data-row transition-colors border-b-0 hover:bg-accent/50",c?"cursor-pointer":"",C),onClick:c?()=>c(n):void 0,children:t.map(b=>o.jsx(L,{className:u("px-5 py-4 h-16 align-middle text-sm text-foreground",b.cellClassName,b.wrap?"whitespace-normal wrap-break-word":""),children:o.jsx("div",{className:u(b.wrap?"w-full":"min-w-0 w-full",!b.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:b.render?b.render(n):b.accessor?b.accessor(n):null})},b.id))},w)},e[20]=t,e[21]=c,e[22]=p,e[23]=f):f=e[23],v=s.map(f),e[15]=t,e[16]=s,e[17]=c,e[18]=p,e[19]=v}else v=e[19];let y;e[24]!==v?(y=o.jsx(H,{children:v}),e[24]=v,e[25]=y):y=e[25];let k;return e[26]!==j||e[27]!==y?(k=o.jsx("div",{className:"w-full bg-background min-w-0",children:o.jsxs($,{className:"w-full border-collapse",children:[j,y]})}),e[26]=j,e[27]=y,e[28]=k):k=e[28],k}function A(a){const e=N.c(12),{columns:t,data:s,isLoading:l,sortKey:r,sortDirection:m,onSort:c,onRowClick:p,emptyState:h}=a;if(l===void 0?!1:l){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex items-center justify-center h-full",children:o.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=i):i=e[0],i}if(s.length===0){let i;e[1]!==h?(i=h||o.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=h,e[2]=i):i=e[2];let d;return e[3]!==i?(d=o.jsx("div",{className:"flex items-center justify-center h-full",children:i}),e[3]=i,e[4]=d):d=e[4],d}let x;return e[5]!==t||e[6]!==s||e[7]!==p||e[8]!==c||e[9]!==m||e[10]!==r?(x=o.jsx("div",{className:"flex-1 overflow-auto",children:o.jsx(z,{columns:t,data:s,sortKey:r,sortDirection:m,onSort:c,onRowClick:p})}),e[5]=t,e[6]=s,e[7]=p,e[8]=c,e[9]=m,e[10]=r,e[11]=x):x=e[11],x}export{A as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as V,j as s,a5 as ke,a as Ye,r as ze,a6 as Ze,d as et,b as tt,bd as st}from"./index-ckOjSsbf.js";import{E as Ee}from"./empty-state-1y2EWg7D.js";import{E as Fe}from"./error-boundary-CcJOnlMu.js";import{I as ot,a as Ke,e as nt,u as it,c as lt,d as at}from"./use-connection-IoNoQwc6.js";import{b as rt}from"./use-binding-BDNnvRc3.js";import{E as Ve,P as ct,a as dt,u as mt,S as ut}from"./index-BNPz145B.js";import{B as ge}from"./button-UfWqfnW6.js";import{I as U}from"./icon-DrnCTy8O.js";import{a as ft,T as pt,R as ht}from"./resource-tabs-C-xGyATo.js";import{V as gt,a as xt,b as jt}from"./layout-CRWUQVBf.js";import{g as Re}from"./generate-id-Dyweu44Y.js";import{C as Le}from"./collection-display-button-CwZeJFt8.js";import{C as bt}from"./collection-search-Bjsljx6L.js";import{C as Ct}from"./card-sOD0ZSWO.js";import{b as We,D as qe,a as He,c as R}from"./dropdown-menu-B7djqSa8.js";import{C as vt}from"./collection-table-wrapper-D98e-gOY.js";import{u as yt}from"./use-list-state-DRmAmaM0.js";import{B as wt}from"./extract-connection-data-CegZyyXr.js";import{A as St,g as _t,c as Nt,b as Tt,d as It,e as At,a as Dt,f as $t}from"./alert-dialog-DucVRGId.js";import"./utils-pyEEdArk.js";import"./tooltip-BEGc6-ta.js";import"./auth-BaVMGGfx.js";import"./mcp-oauth-D8oBlZpZ.js";import"./use-organization-settings-CbNhltyL.js";import"./use-tool-call-DtbPDnAJ.js";import"./form-qod6mSHT.js";import"./input-CwErI3qM.js";import"./select-CccYpzrg.js";import"./use-gateway-CQn5-Udm.js";import"./formatDistanceToNow-Ctx6mZEP.js";import"./registry-utils-ulDDT0d8.js";import"./index-CbCySsU3.js";import"./index-C3PHf_xm.js";import"./schema-DVGSbEVo.js";import"./useQuery-CBshJqa8.js";import"./badge-DAqf2QcS.js";import"./use-mobile-c3XFiGhb.js";function Pt(t,e){const o=t.properties||{};for(const i in o){const a=o[i];if(a&&a.type==="string"&&(a.format==="url"||a.format==="uri")&&e&&typeof e=="object"&&i in e&&e[i])return e[i]}const l=["image","img","avatar","icon","logo","thumbnail","cover"];for(const i of l)if(e&&typeof e=="object"&&i in e&&typeof e[i]=="string")return e[i]}function Ot(t){const e=V.c(25),{item:o,schema:l,actions:i}=t;let a;e[0]!==o||e[1]!==l?(a=Pt(l,o),e[0]=o,e[1]=l,e[2]=a):a=e[2];const m=a,n=o&&typeof o=="object"&&"description"in o&&typeof o.description=="string"?o.description:void 0;let u;e[3]!==i?(u=i&&Object.keys(i).length>0,e[3]=i,e[4]=u):u=e[4];const h=u;let c;e[5]!==m||e[6]!==o.title?(c=s.jsx(ot,{icon:m,name:o.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=m,e[6]=o.title,e[7]=c):c=e[7];let d;e[8]!==o.title?(d=s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:o.title}),e[8]=o.title,e[9]=d):d=e[9];const g=n||"No description";let y;e[10]!==g?(y=s.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:g}),e[10]=g,e[11]=y):y=e[11];let f;e[12]!==d||e[13]!==y?(f=s.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[d,y]}),e[12]=d,e[13]=y,e[14]=f):f=e[14];let j;e[15]!==c||e[16]!==f?(j=s.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[c,f]}),e[15]=c,e[16]=f,e[17]=j):j=e[17];let r;e[18]!==i||e[19]!==h||e[20]!==o?(r=h&&s.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:Mt,onMouseDown:Et,children:s.jsxs(We,{children:[s.jsx(qe,{asChild:!0,children:s.jsx(ge,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:zt,children:s.jsx(U,{name:"more_vert",size:20})})}),s.jsxs(He,{align:"end",onClick:kt,children:[i.open&&s.jsxs(R,{onClick:C=>{C.stopPropagation(),i.open?.(o)},children:[s.jsx(U,{name:"visibility",size:16}),"Open"]}),i.edit&&s.jsxs(R,{onClick:C=>{C.stopPropagation(),i.edit?.(o)},children:[s.jsx(U,{name:"edit",size:16}),"Edit"]}),i.duplicate&&s.jsxs(R,{onClick:C=>{C.stopPropagation(),i.duplicate?.(o)},children:[s.jsx(U,{name:"content_copy",size:16}),"Duplicate"]}),i.delete&&s.jsxs(R,{variant:"destructive",onClick:C=>{C.stopPropagation(),i.delete?.(o)},children:[s.jsx(U,{name:"delete",size:16}),"Delete"]})]})]})}),e[18]=i,e[19]=h,e[20]=o,e[21]=r):r=e[21];let I;return e[22]!==j||e[23]!==r?(I=s.jsxs(Ct,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[j,r]}),e[22]=j,e[23]=r,e[24]=I):I=e[24],I}function kt(t){return t.stopPropagation()}function zt(t){return t.stopPropagation()}function Et(t){return t.stopPropagation()}function Mt(t){return t.stopPropagation()}function Je(t,e){return Object.keys(t.properties||{}).filter(o=>["id","created_at","updated_at","created_by","updated_by"].includes(o)?!1:e?e.includes(o):!0).map(o=>({id:o,label:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," ")}))}function Ut(t){const e=V.c(32),{data:o,schema:l,viewMode:i,onViewModeChange:a,search:m,sortKey:n,sortDirection:u,onSort:h,actions:c,onItemClick:d,headerActions:g,emptyState:y,readOnly:f,columns:j,hideToolbar:r,sortableFields:I}=t,C=a===void 0?Kt:a,b=u===void 0?"asc":u,P=h===void 0?Ft:h;let w;e[0]!==c?(w=c===void 0?{}:c,e[0]=c,e[1]=w):w=e[1];const p=w,A=d===void 0?Bt:d,D=g===void 0?null:g,v=y===void 0?null:y,O=f===void 0?!1:f,N=j===void 0?void 0:j,k=r===void 0?!1:r,S=I===void 0?void 0:I;let E;e[2]!==N||e[3]!==l||e[4]!==S?(E=N?N.filter(Rt).filter(M=>!S||S.includes(M.id)).map(Vt):Je(l,S),e[2]=N,e[3]=l,e[4]=S,e[5]=E):E=e[5];const T=E;let _;e[6]!==D||e[7]!==k||e[8]!==P||e[9]!==C||e[10]!==b||e[11]!==n||e[12]!==T||e[13]!==i?(_=!k&&s.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:s.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[s.jsx("div",{className:"flex items-center gap-2 flex-1",children:D}),s.jsx("div",{className:"flex items-center gap-2 shrink-0",children:s.jsx(Le,{viewMode:i,onViewModeChange:C,sortKey:n,sortDirection:b,onSort:P,sortOptions:T})})]})}),e[6]=D,e[7]=k,e[8]=P,e[9]=C,e[10]=b,e[11]=n,e[12]=T,e[13]=i,e[14]=_):_=e[14];let z;e[15]!==p||e[16]!==N||e[17]!==o||e[18]!==v||e[19]!==A||e[20]!==P||e[21]!==O||e[22]!==l||e[23]!==m||e[24]!==b||e[25]!==n||e[26]!==S||e[27]!==i?(z=i==="cards"?s.jsx("div",{className:"flex-1 overflow-auto p-5",children:o.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:v||s.jsx(Ve,{icon:"inbox",title:"No items found",description:m?"Try adjusting your search":"No items to display"})}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:o.map(M=>s.jsx("div",{onClick:()=>A?.(M),className:"cursor-pointer h-full",children:s.jsx(Ot,{item:M,schema:l,readOnly:O,actions:p})},M.id))})}):s.jsx(vt,{columns:Ht(N,l,S,p),data:o,sortKey:n,sortDirection:b,onSort:P,onRowClick:A,emptyState:v||s.jsx(Ve,{icon:"inbox",title:"No items found",description:m?"Try adjusting your search":"No items to display"})}),e[15]=p,e[16]=N,e[17]=o,e[18]=v,e[19]=A,e[20]=P,e[21]=O,e[22]=l,e[23]=m,e[24]=b,e[25]=n,e[26]=S,e[27]=i,e[28]=z):z=e[28];let x;return e[29]!==_||e[30]!==z?(x=s.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[_,z]}),e[29]=_,e[30]=z,e[31]=x):x=e[31],x}function Vt(t){return{id:t.id,label:typeof t.header=="string"?t.header:t.id}}function Rt(t){return t.sortable!==!1}function Bt(){}function Ft(){}function Kt(){}function Lt(t){return{id:"actions",header:"",render:e=>s.jsxs(We,{children:[s.jsx(qe,{asChild:!0,children:s.jsx(ge,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:o=>o.stopPropagation(),children:s.jsx(U,{name:"more_vert",size:20})})}),s.jsxs(He,{align:"end",onClick:o=>o.stopPropagation(),children:[t.open&&s.jsxs(R,{onClick:o=>{o.stopPropagation(),t.open?.(e)},children:[s.jsx(U,{name:"visibility",size:16}),"Open"]}),t.edit&&s.jsxs(R,{onClick:o=>{o.stopPropagation(),t.edit?.(e)},children:[s.jsx(U,{name:"edit",size:16}),"Edit"]}),t.duplicate&&s.jsxs(R,{onClick:o=>{o.stopPropagation(),t.duplicate?.(e)},children:[s.jsx(U,{name:"content_copy",size:16}),"Duplicate"]}),t.delete&&s.jsxs(R,{variant:"destructive",onClick:o=>{o.stopPropagation(),t.delete?.(e)},children:[s.jsx(U,{name:"delete",size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function Wt(t){const e=t.type;return e==="string"||e==="number"||e==="integer"||e==="boolean"}function Be(t){return t.type==="string"&&(t.format==="url"||t.format==="uri")}function qt(t,e){const o=t.properties||{},l=Object.keys(o).filter(n=>{const u=o[n];return u&&Wt(u)}),i=l.find(n=>{const u=o[n];return u&&Be(u)}),a=new Set;i&&a.add(i);const m=["title","description","updated_at","updated_by"];for(const n of m)l.includes(n)&&i!==n&&!a.has(n)&&a.add(n);for(const n of l)a.has(n)||a.add(n);return[...a.values()].map(n=>{const u=o[n];if(!u)return{id:n,header:n.charAt(0).toUpperCase()+n.slice(1).replace(/_/g," "),render:c=>{const d=c[n];return d==null?"—":s.jsx("span",{className:"block truncate max-w-full",children:String(d)})},sortable:e?e.includes(n):!["id"].includes(n),cellClassName:"max-w-[200px]"};const h=e?e.includes(n):!["id"].includes(n);return u.format==="date-time"||n.endsWith("_at")?{id:n,header:n.charAt(0).toUpperCase()+n.slice(1).replace(/_/g," "),render:c=>{const d=c[n];return d?s.jsx("span",{className:"block truncate max-w-full",children:new Date(d).toLocaleDateString()}):"—"},sortable:h,cellClassName:"max-w-[200px]"}:i===n&&Be(u)?{id:n,header:n.charAt(0).toUpperCase()+n.slice(1).replace(/_/g," "),render:c=>{const d=c[n];return d?s.jsx("img",{src:String(d),alt:n,className:"h-8 w-8 rounded object-cover"}):"—"},sortable:h,cellClassName:"max-w-[200px]"}:{id:n,header:n.charAt(0).toUpperCase()+n.slice(1).replace(/_/g," "),render:c=>{const d=c[n];return d==null?"—":s.jsx("span",{className:"block truncate max-w-full",children:String(d)})},sortable:h,cellClassName:"max-w-[100px]"}})}function Ht(t,e,o,l){const i=t||qt(e,o);return i.some(n=>n.id==="actions")?i:Object.keys(l).length>0?[...i,Lt(l)]:i}function Jt(t){const e=V.c(117),{connectionId:o,org:l,activeCollection:i}=t,a=i.name,m=i.schema??wt,n=i.hasCreateTool,u=i.hasUpdateTool,h=i.hasDeleteTool,c=ke(),{data:d}=Ye.useSession(),g=d?.user?.id||"unknown",y=Ke(o);let f;e[0]!==o?(f=lt(o),e[0]=o,e[1]=f):f=e[1];const j=f,r=nt(o,a,j),I=`${o}-${a}`;let C;e[2]!==l||e[3]!==I?(C={namespace:l,resource:I,defaultSortKey:"updated_at"},e[2]=l,e[3]=I,e[4]=C):C=e[4];const{search:b,searchTerm:P,setSearch:w,viewMode:p,setViewMode:A,sortKey:D,sortDirection:v,handleSort:O}=yt(C);let N;e[5]!==P||e[6]!==v||e[7]!==D?(N={searchTerm:P,sortKey:D,sortDirection:v},e[5]=P,e[6]=v,e[7]=D,e[8]=N):N=e[8];const k=it(o,a,j,N),S=!n&&!u&&!h;let E;e[9]!==a||e[10]!==o||e[11]!==c||e[12]!==l?(E=$=>{c({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:l,connectionId:o,collectionName:a,itemId:$.id}})},e[9]=a,e[10]=o,e[11]=c,e[12]=l,e[13]=E):E=e[13];const T=E;let _;e[14]!==r.create||e[15]!==g?(_=async $=>{const he=new Date().toISOString();await r.create.mutateAsync({...$,id:Re("conn"),title:`${$.title} (Copy)`,created_at:he,updated_at:he,created_by:g,updated_by:g})},e[14]=r.create,e[15]=g,e[16]=_):_=e[16];const z=_,[x,M]=ze.useState(null);let le;e[17]===Symbol.for("react.memo_cache_sentinel")?(le=$=>{M($)},e[17]=le):le=e[17];const Ge=le;let B;e[18]!==T||e[19]!==u?(B=u&&{edit:T},e[18]=T,e[19]=u,e[20]=B):B=e[20];let F;e[21]!==z||e[22]!==n?(F=n&&{duplicate:z},e[21]=z,e[22]=n,e[23]=F):F=e[23];let K;e[24]!==h?(K=h&&{delete:Ge},e[24]=h,e[25]=K):K=e[25];let ae;e[26]!==K||e[27]!==B||e[28]!==F?(ae={...B,...F,...K},e[26]=K,e[27]=B,e[28]=F,e[29]=ae):ae=e[29];const xe=ae;let re;e[30]!==r.delete||e[31]!==x?(re=async()=>{x&&(await r.delete.mutateAsync(x.id),M(null))},e[30]=r.delete,e[31]=x,e[32]=re):re=e[32];const je=re;let ce;e[33]!==r.create||e[34]!==a||e[35]!==o||e[36]!==n||e[37]!==c||e[38]!==l||e[39]!==g?(ce=async()=>{if(!n){Ze.error("Create operation is not available for this collection");return}const $=new Date().toISOString(),he={id:Re("conn"),title:"New Item",created_at:$,updated_at:$,created_by:g,updated_by:g};try{const Oe=await r.create.mutateAsync(he);c({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:l,connectionId:o,collectionName:a,itemId:Oe.id}})}catch(Oe){console.error("Failed to create item:",Oe)}},e[33]=r.create,e[34]=a,e[35]=o,e[36]=n,e[37]=c,e[38]=l,e[39]=g,e[40]=ce):ce=e[40];const be=ce;let de;e[41]!==m?(de=Je(m),e[41]=m,e[42]=de):de=e[42];const Ce=de,Me=(k?.length??0)>0,Qe=n&&Me,Xe=n&&!Me&&!b;let me;e[43]!==r.create||e[44]!==be||e[45]!==n?(me=n?s.jsxs(ge,{onClick:be,size:"sm",disabled:r.create.isPending,className:"h-7",children:[s.jsx(ct,{className:"mr-2 h-4 w-4"}),r.create.isPending?"Creating...":"Create"]}):null,e[43]=r.create,e[44]=be,e[45]=n,e[46]=me):me=e[46];const Ue=me,ve=D;let L;e[47]!==O||e[48]!==A||e[49]!==v||e[50]!==Ce||e[51]!==ve||e[52]!==p?(L=s.jsx(Le,{viewMode:p,onViewModeChange:A,sortKey:ve,sortDirection:v,onSort:O,sortOptions:Ce}),e[47]=O,e[48]=A,e[49]=v,e[50]=Ce,e[51]=ve,e[52]=p,e[53]=L):L=e[53];const ye=`${a}s`,we=y?.icon??"grid_view";let W;e[54]!==o||e[55]!==ye||e[56]!==we?(W=s.jsx(dt,{connectionId:o,title:ye,icon:we}),e[54]=o,e[55]=ye,e[56]=we,e[57]=W):W=e[57];const Se=Qe&&Ue;let q;e[58]!==L||e[59]!==W||e[60]!==Se?(q=s.jsxs(gt,{children:[L,W,Se]}),e[58]=L,e[59]=W,e[60]=Se,e[61]=q):q=e[61];const _e=`Search ${a}...`;let H;e[62]!==w?(H=$=>{$.key==="Escape"&&(w(""),$.target.blur())},e[62]=w,e[63]=H):H=e[63];let J;e[64]!==b||e[65]!==w||e[66]!==_e||e[67]!==H?(J=s.jsx(bt,{value:b,onChange:w,placeholder:_e,onKeyDown:H}),e[64]=b,e[65]=w,e[66]=_e,e[67]=H,e[68]=J):J=e[68];let G;e[69]!==k?(G=k??[],e[69]=k,e[70]=G):G=e[70];const Ne=D;let Q;e[71]!==T?(Q=$=>T($),e[71]=T,e[72]=Q):Q=e[72];const Te="No items found",Ie=b?"Try adjusting your search terms":"This collection doesn't have any items yet.",Ae=Xe?Ue:void 0;let X;e[73]!==Te||e[74]!==Ie||e[75]!==Ae?(X=s.jsx(Ee,{image:null,title:Te,description:Ie,actions:Ae}),e[73]=Te,e[74]=Ie,e[75]=Ae,e[76]=X):X=e[76];let Y;e[77]!==O||e[78]!==S||e[79]!==xe||e[80]!==m||e[81]!==b||e[82]!==w||e[83]!==A||e[84]!==v||e[85]!==G||e[86]!==Ne||e[87]!==Q||e[88]!==X||e[89]!==p?(Y=s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx(Ut,{hideToolbar:!0,data:G,schema:m,viewMode:p,onViewModeChange:A,search:b,onSearchChange:w,sortKey:Ne,sortDirection:v,onSort:O,actions:xe,onItemClick:Q,readOnly:S,emptyState:X})}),e[77]=O,e[78]=S,e[79]=xe,e[80]=m,e[81]=b,e[82]=w,e[83]=A,e[84]=v,e[85]=G,e[86]=Ne,e[87]=Q,e[88]=X,e[89]=p,e[90]=Y):Y=e[90];let Z;e[91]!==J||e[92]!==Y?(Z=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[J,Y]}),e[91]=J,e[92]=Y,e[93]=Z):Z=e[93];const De=!!x;let ue;e[94]===Symbol.for("react.memo_cache_sentinel")?(ue=$=>{$||M(null)},e[94]=ue):ue=e[94];let fe;e[95]===Symbol.for("react.memo_cache_sentinel")?(fe=s.jsx(Nt,{children:"Delete item?"}),e[95]=fe):fe=e[95];const $e=x?.title;let ee;e[96]!==$e?(ee=s.jsxs(Tt,{children:[fe,s.jsxs(It,{children:['Are you sure you want to delete "',$e,'"? This action cannot be undone.']})]}),e[96]=$e,e[97]=ee):ee=e[97];let te;e[98]!==r.delete.isPending?(te=s.jsx(St,{disabled:r.delete.isPending,children:"Cancel"}),e[98]=r.delete.isPending,e[99]=te):te=e[99];const Pe=r.delete.isPending?"Deleting...":"Delete";let se;e[100]!==r.delete.isPending||e[101]!==je||e[102]!==Pe?(se=s.jsx(_t,{onClick:je,disabled:r.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Pe}),e[100]=r.delete.isPending,e[101]=je,e[102]=Pe,e[103]=se):se=e[103];let oe;e[104]!==te||e[105]!==se?(oe=s.jsxs(At,{children:[te,se]}),e[104]=te,e[105]=se,e[106]=oe):oe=e[106];let ne;e[107]!==ee||e[108]!==oe?(ne=s.jsxs(Dt,{children:[ee,oe]}),e[107]=ee,e[108]=oe,e[109]=ne):ne=e[109];let ie;e[110]!==De||e[111]!==ne?(ie=s.jsx($t,{open:De,onOpenChange:ue,children:ne}),e[110]=De,e[111]=ne,e[112]=ie):ie=e[112];let pe;return e[113]!==q||e[114]!==Z||e[115]!==ie?(pe=s.jsxs(s.Fragment,{children:[q,Z,ie]}),e[113]=q,e[114]=Z,e[115]=ie,e[116]=pe):pe=e[116],pe}function Gt(t){const e=V.c(2),{repository:o}=t;let l;return e[0]!==o?(l=s.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:s.jsx(ft,{repository:o})}),e[0]=o,e[1]=l):l=e[1],l}function Qt(t){const e=V.c(4),{tools:o,connectionId:l,org:i}=t;let a;return e[0]!==l||e[1]!==i||e[2]!==o?(a=s.jsx(pt,{tools:o,connectionId:l,org:i}),e[0]=l,e[1]=i,e[2]=o,e[3]=a):a=e[3],a}function Xt(t){const e=V.c(50),{connection:o,connectionId:l,org:i,requestedTabId:a,collections:m,onUpdate:n,isUpdating:u}=t,h=st();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={from:"/$org/mcps/$connectionId"},e[0]=c):c=e[0];const d=ke(c);let g;e[1]!==l?(g={connectionId:l},e[1]=l,e[2]=g):g=e[2];const y=mt(g),f=y.isAuthenticated,j=o?.metadata?.repository,r=!!j?.url,I=o?.tools?.length??0;let C;e[3]===Symbol.for("react.memo_cache_sentinel")?(C={id:"settings",label:"Settings"},e[3]=C):C=e[3];let b;e[4]!==f||e[5]!==I?(b=f&&I>0?[{id:"tools",label:"Tools",count:I}]:[],e[4]=f,e[5]=I,e[6]=b):b=e[6];let P;if(e[7]!==m||e[8]!==r||e[9]!==f||e[10]!==b){let x;e[12]!==r?(x=r?[{id:"readme",label:"README"}]:[],e[12]=r,e[13]=x):x=e[13],P=[C,...b,...f?(m||[]).map(Yt):[],...x],e[7]=m,e[8]=r,e[9]=f,e[10]=b,e[11]=P}else P=e[11];const w=P,p=w.some(x=>x.id===a)?a:"settings";let A;e[14]!==d?(A=x=>{d({search:M=>({...M,tab:x}),replace:!0})},e[14]=d,e[15]=A):A=e[15];const D=A;let v;e[16]!==m?(v=m||[],e[16]=m,e[17]=v):v=e[17];let O;if(e[18]!==p||e[19]!==v){let x;e[21]!==p?(x=M=>M.name===p,e[21]=p,e[22]=x):x=e[22],O=v.find(x),e[18]=p,e[19]=v,e[20]=O}else O=e[20];const N=O;let k;e[23]!==h.history?(k=()=>h.history.back(),e[23]=h.history,e[24]=k):k=e[24];let S;e[25]!==p||e[26]!==D||e[27]!==w?(S=s.jsx(xt,{children:s.jsx(ht,{tabs:w,activeTab:p,onTabChange:D})}),e[25]=p,e[26]=D,e[27]=w,e[28]=S):S=e[28];let E;e[29]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(U,{size:32,name:"progress_activity",className:"animate-spin text-muted-foreground"})}),e[29]=E):E=e[29];let T;e[30]!==N||e[31]!==p||e[32]!==y.supportsOAuth||e[33]!==o||e[34]!==l||e[35]!==D||e[36]!==r||e[37]!==f||e[38]!==u||e[39]!==n||e[40]!==i||e[41]!==j?(T=s.jsx(ze.Suspense,{fallback:E,children:p==="tools"?s.jsx(Qt,{tools:o.tools??void 0,connectionId:l,org:i}):p==="settings"?s.jsx(ut,{connection:o,onUpdate:n,isUpdating:u,isMCPAuthenticated:f,supportsOAuth:y.supportsOAuth,onViewReadme:r?()=>D("readme"):void 0}):p==="readme"&&r?s.jsx(Gt,{repository:j}):N&&f?s.jsx(Jt,{connectionId:l,org:i,activeCollection:N},p):s.jsx(Ee,{title:"Collection not found",description:"This collection may have been deleted or you may not have access."})}),e[30]=N,e[31]=p,e[32]=y.supportsOAuth,e[33]=o,e[34]=l,e[35]=D,e[36]=r,e[37]=f,e[38]=u,e[39]=n,e[40]=i,e[41]=j,e[42]=T):T=e[42];let _;e[43]!==p||e[44]!==T?(_=s.jsx("div",{className:"flex h-full w-full bg-background overflow-hidden",children:s.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-auto",children:s.jsx(Fe,{children:T},p)})}),e[43]=p,e[44]=T,e[45]=_):_=e[45];let z;return e[46]!==S||e[47]!==_||e[48]!==k?(z=s.jsxs(jt,{onBack:k,children:[S,_]}),e[46]=S,e[47]=_,e[48]=k,e[49]=z):z=e[49],z}function Yt(t){return{id:t.name,label:t.displayName}}function Zt(){const t=V.c(17);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/mcps/$connectionId"},t[0]=e):e=t[0];const o=ke(e);let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/mcps/$connectionId"},t[1]=l):l=t[1];const{connectionId:i,org:a}=et(l);let m;t[2]===Symbol.for("react.memo_cache_sentinel")?(m={from:"/shell/$org/mcps/$connectionId"},t[2]=m):m=t[2];const u=tt(m).tab||"settings",h=Ke(i),c=at(),d=rt(h??void 0);let g;t[3]!==c.update||t[4]!==i?(g=async j=>{await c.update.mutateAsync({id:i,data:j})},t[3]=c.update,t[4]=i,t[5]=g):g=t[5];const y=g;if(!h){let j;return t[6]!==o||t[7]!==a?(j=s.jsx("div",{className:"flex h-full w-full bg-background",children:s.jsx(Ee,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:s.jsx(ge,{variant:"outline",onClick:()=>o({to:"/$org/mcps",params:{org:a}}),children:"Back to connections"})})}),t[6]=o,t[7]=a,t[8]=j):j=t[8],j}let f;return t[9]!==c.update.isPending||t[10]!==d||t[11]!==h||t[12]!==i||t[13]!==y||t[14]!==a||t[15]!==u?(f=s.jsx(Xt,{org:a,connection:h,connectionId:i,requestedTabId:u,collections:d,onUpdate:y,isUpdating:c.update.isPending}),t[9]=c.update.isPending,t[10]=d,t[11]=h,t[12]=i,t[13]=y,t[14]=a,t[15]=u,t[16]=f):f=t[16],f}function es(){const t=V.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Fe,{children:s.jsx(ze.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:s.jsx(U,{name:"progress_activity",size:32,className:"animate-spin text-muted-foreground"})}),children:s.jsx(Zt,{})})}),t[0]=e):e=t[0],e}function Vs(){const t=V.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(es,{}),t[0]=e):e=t[0],e}export{Vs as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as ze,j as t,r as Me,a5 as Fe,b as Ke,a as Be,ar as He,as as Oe}from"./index-ckOjSsbf.js";import{C as Re}from"./schema-DVGSbEVo.js";import{C as Ve}from"./collection-header-DqX3M1ox.js";import{C as Le}from"./collection-page-iotK2mh3.js";import{C as Ue}from"./collection-search-Bjsljx6L.js";import{C as We}from"./collection-table-wrapper-D98e-gOY.js";import{C as qe}from"./connection-card-C-M_OhaM.js";import{E as Ne}from"./empty-state-1y2EWg7D.js";import{E as Ge}from"./error-boundary-CcJOnlMu.js";import{d as Je,b as Qe,I as Xe}from"./use-connection-IoNoQwc6.js";import{u as Ye}from"./use-list-state-DRmAmaM0.js";import{u as Ze}from"./tooltip-BEGc6-ta.js";import{c as et,b as tt,d as nt,A as ot,e as st,g as it,a as rt,f as lt}from"./alert-dialog-DucVRGId.js";import{B as ct}from"./badge-DAqf2QcS.js";import{B as F}from"./button-UfWqfnW6.js";import{a as at,b as dt,D as mt,f as ut,c as pt,d as ht}from"./dialog-B9ivHqL_.js";import{b as Te,D as Ae,a as $e,c as fe}from"./dropdown-menu-B7djqSa8.js";import{F as B,a as ft,b as H,c as O,d as R,f as V}from"./form-qod6mSHT.js";import{I as m}from"./icon-DrnCTy8O.js";import{I as Pe}from"./input-CwErI3qM.js";import{c as gt,a as xt,S as jt,b as Ct,d as Ie}from"./select-CccYpzrg.js";import{T as _t}from"./textarea-DdWHnTcH.js";import{g as St}from"./generate-id-Dyweu44Y.js";import"./collection-display-button-CwZeJFt8.js";import"./utils-pyEEdArk.js";import"./card-sOD0ZSWO.js";import"./use-mobile-c3XFiGhb.js";const yt=Re.pick({title:!0,description:!0,connection_type:!0,connection_url:!0,connection_token:!0}).partial({description:!0,connection_token:!0});function vt(e,n){switch(n.type){case"edit":return{mode:"editing",connection:n.connection};case"delete":return{mode:"deleting",connection:n.connection};case"close":return{mode:"idle"}}}function bt(){const e=ze.c(126),{org:n}=Ze(),r=Fe();let L;e[0]===Symbol.for("react.memo_cache_sentinel")?(L={strict:!1},e[0]=L):L=e[0];const Ee=Ke(L),{data:ge}=Be.useSession();let U;e[1]!==n.slug?(U={namespace:n.slug,resource:"connections"},e[1]=n.slug,e[2]=U):U=e[2];const o=Ye(U),d=Je(),K=Qe(o);let W;e[3]===Symbol.for("react.memo_cache_sentinel")?(W={mode:"idle"},e[3]=W):W=e[3];const[c,u]=Me.useReducer(vt,W),q=Ee.action==="create";let G;e[4]!==r||e[5]!==n.slug?(G=()=>{r({to:"/$org/mcps",params:{org:n.slug},search:{action:"create"}})},e[4]=r,e[5]=n.slug,e[6]=G):G=e[6];const xe=G;let J;e[7]!==r||e[8]!==n.slug?(J=()=>{r({to:"/$org/mcps",params:{org:n.slug},search:{}})},e[7]=r,e[8]=n.slug,e[9]=J):J=e[9];const p=J;let Q;e[10]===Symbol.for("react.memo_cache_sentinel")?(Q={resolver:He(yt),defaultValues:{title:"",description:null,connection_type:"HTTP",connection_url:"",connection_token:null}},e[10]=Q):Q=e[10];const i=Oe(Q),l=c.mode==="editing"?c.connection:null;let X,Y;e[11]!==l||e[12]!==i?(X=()=>{l?i.reset({title:l.title,description:l.description,connection_type:l.connection_type,connection_url:l.connection_url,connection_token:null}):i.reset({title:"",description:null,connection_type:"HTTP",connection_url:"",connection_token:null})},Y=[l,i],e[11]=l,e[12]=i,e[13]=X,e[14]=Y):(X=e[13],Y=e[14]),Me.useEffect(X,Y);let Z;e[15]!==d||e[16]!==c.connection||e[17]!==c.mode?(Z=async()=>{if(c.mode!=="deleting")return;const s=c.connection.id;u({type:"close"});try{await d.delete.mutateAsync(s)}catch{}},e[15]=d,e[16]=c.connection,e[17]=c.mode,e[18]=Z):Z=e[18];const je=Z;let ee;e[19]!==d||e[20]!==p||e[21]!==l||e[22]!==i||e[23]!==r||e[24]!==n.id||e[25]!==n.slug||e[26]!==ge?.user?.id?(ee=async s=>{if(l){await d.update.mutateAsync({id:l.id,data:{title:s.title,description:s.description||null,connection_type:s.connection_type,connection_url:s.connection_url,...s.connection_token&&{connection_token:s.connection_token}}}),u({type:"close"}),i.reset();return}const a=St("conn");await d.create.mutateAsync({id:a,title:s.title,description:s.description||null,connection_type:s.connection_type,connection_url:s.connection_url,connection_token:s.connection_token||null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:ge?.user?.id||"system",organization_id:n.id,icon:null,app_name:null,app_id:null,connection_headers:null,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),p(),i.reset(),r({to:"/$org/mcps/$connectionId",params:{org:n.slug,connectionId:a}})},e[19]=d,e[20]=p,e[21]=l,e[22]=i,e[23]=r,e[24]=n.id,e[25]=n.slug,e[26]=ge?.user?.id,e[27]=ee):ee=e[27];const Ce=ee;let te;e[28]!==p||e[29]!==i||e[30]!==q?(te=s=>{s||(q?p():u({type:"close"}),i.reset())},e[28]=p,e[29]=i,e[30]=q,e[31]=te):te=e[31];const h=te;let ne,oe,se,ie,re,le;e[32]===Symbol.for("react.memo_cache_sentinel")?(ne={id:"icon",header:"",render:Bt,cellClassName:"w-16 shrink-0",wrap:!0},oe={id:"title",header:"Name",render:Kt,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},se={id:"description",header:"Description",render:Ft,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},ie={id:"connection_type",header:"Type",accessor:Et,cellClassName:"w-24 shrink-0",sortable:!0},re={id:"connection_url",header:"URL",render:zt,wrap:!0,cellClassName:"w-48 min-w-0 shrink-0"},le={id:"status",header:"Status",render:$t,cellClassName:"w-24 shrink-0",sortable:!0},e[32]=ne,e[33]=oe,e[34]=se,e[35]=ie,e[36]=re,e[37]=le):(ne=e[32],oe=e[33],se=e[34],ie=e[35],re=e[36],le=e[37]);let ce;e[38]!==r||e[39]!==n.slug?(ce=[ne,oe,se,ie,re,le,{id:"actions",header:"",render:s=>t.jsxs(Te,{children:[t.jsx(Ae,{asChild:!0,children:t.jsx(F,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:At,children:t.jsx(m,{name:"more_vert",size:20})})}),t.jsxs($e,{align:"end",onClick:Tt,children:[t.jsxs(fe,{onClick:a=>{a.stopPropagation(),r({to:"/$org/mcps/$connectionId",params:{org:n.slug,connectionId:s.id}})},children:[t.jsx(m,{name:"visibility",size:16}),"Inspect"]}),t.jsxs(fe,{variant:"destructive",onClick:a=>{a.stopPropagation(),u({type:"delete",connection:s})},children:[t.jsx(m,{name:"delete",size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[38]=r,e[39]=n.slug,e[40]=ce):ce=e[40];const _e=ce;let f;e[41]!==r||e[42]!==n.slug?(f=t.jsx(F,{variant:"outline",onClick:()=>r({to:"/$org/store",params:{org:n.slug}}),size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Browse Store"}),e[41]=r,e[42]=n.slug,e[43]=f):f=e[43];let g;e[44]!==xe?(g=t.jsx(F,{onClick:xe,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Connect MCP Server"}),e[44]=xe,e[45]=g):g=e[45];let ae;e[46]!==f||e[47]!==g?(ae=t.jsxs("div",{className:"flex items-center gap-2",children:[f,g]}),e[46]=f,e[47]=g,e[48]=ae):ae=e[48];const Se=ae,ye=q||c.mode==="editing",ve=l?"Edit Connection":"Create New Connection";let x;e[49]!==ve?(x=t.jsx(at,{children:ve}),e[49]=ve,e[50]=x):x=e[50];const be=l?"Update the connection details below.":"Add a new connection to your organization. Fill in the details below.";let j;e[51]!==be?(j=t.jsx(dt,{children:be}),e[51]=be,e[52]=j):j=e[52];let C;e[53]!==x||e[54]!==j?(C=t.jsxs(mt,{children:[x,j]}),e[53]=x,e[54]=j,e[55]=C):C=e[55];let _;e[56]!==i||e[57]!==Ce?(_=i.handleSubmit(Ce),e[56]=i,e[57]=Ce,e[58]=_):_=e[58];let S;e[59]!==i.control?(S=t.jsxs("div",{className:"grid gap-4 py-4",children:[t.jsx(B,{control:i.control,name:"title",render:Pt}),t.jsx(B,{control:i.control,name:"description",render:Mt}),t.jsx(B,{control:i.control,name:"connection_type",render:It}),t.jsx(B,{control:i.control,name:"connection_url",render:Nt}),t.jsx(B,{control:i.control,name:"connection_token",render:kt})]}),e[59]=i.control,e[60]=S):S=e[60];let y;e[61]!==h?(y=t.jsx(F,{type:"button",variant:"outline",onClick:()=>h(!1),children:"Cancel"}),e[61]=h,e[62]=y):y=e[62];const we=i.formState.isSubmitting?"Saving...":l?"Update Connection":"Create Connection";let v;e[63]!==i.formState.isSubmitting||e[64]!==we?(v=t.jsx(F,{type:"submit",disabled:i.formState.isSubmitting,className:"min-w-40",children:we}),e[63]=i.formState.isSubmitting,e[64]=we,e[65]=v):v=e[65];let b;e[66]!==y||e[67]!==v?(b=t.jsxs(ut,{children:[y,v]}),e[66]=y,e[67]=v,e[68]=b):b=e[68];let w;e[69]!==_||e[70]!==S||e[71]!==b?(w=t.jsxs("form",{onSubmit:_,children:[S,b]}),e[69]=_,e[70]=S,e[71]=b,e[72]=w):w=e[72];let D;e[73]!==i||e[74]!==w?(D=t.jsx(ft,{...i,children:w}),e[73]=i,e[74]=w,e[75]=D):D=e[75];let k;e[76]!==C||e[77]!==D?(k=t.jsxs(pt,{className:"sm:max-w-[525px]",children:[C,D]}),e[76]=C,e[77]=D,e[78]=k):k=e[78];let N;e[79]!==h||e[80]!==ye||e[81]!==k?(N=t.jsx(ht,{open:ye,onOpenChange:h,children:k}),e[79]=h,e[80]=ye,e[81]=k,e[82]=N):N=e[82];const De=c.mode==="deleting";let de;e[83]===Symbol.for("react.memo_cache_sentinel")?(de=s=>!s&&u({type:"close"}),e[83]=de):de=e[83];let me;e[84]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(et,{children:"Delete Connection?"}),e[84]=me):me=e[84];const ke=c.mode==="deleting"&&c.connection.title;let I;e[85]!==ke?(I=t.jsxs(tt,{children:[me,t.jsxs(nt,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:ke}),"."]})]}),e[85]=ke,e[86]=I):I=e[86];let ue;e[87]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx(ot,{children:"Cancel"}),e[87]=ue):ue=e[87];let M;e[88]!==je?(M=t.jsxs(st,{children:[ue,t.jsx(it,{onClick:je,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[88]=je,e[89]=M):M=e[89];let P;e[90]!==I||e[91]!==M?(P=t.jsxs(rt,{children:[I,M]}),e[90]=I,e[91]=M,e[92]=P):P=e[92];let T;e[93]!==De||e[94]!==P?(T=t.jsx(lt,{open:De,onOpenChange:de,children:P}),e[93]=De,e[94]=P,e[95]=T):T=e[95];let pe;e[96]===Symbol.for("react.memo_cache_sentinel")?(pe=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"connection_type",label:"Type"},{id:"status",label:"Status"}],e[96]=pe):pe=e[96];let A;e[97]!==Se||e[98]!==o.handleSort||e[99]!==o.setViewMode||e[100]!==o.sortDirection||e[101]!==o.sortKey||e[102]!==o.viewMode?(A=t.jsx(Ve,{title:"MCP Servers",viewMode:o.viewMode,onViewModeChange:o.setViewMode,sortKey:o.sortKey,sortDirection:o.sortDirection,onSort:o.handleSort,sortOptions:pe,ctaButton:Se}),e[97]=Se,e[98]=o.handleSort,e[99]=o.setViewMode,e[100]=o.sortDirection,e[101]=o.sortKey,e[102]=o.viewMode,e[103]=A):A=e[103];let $;e[104]!==o?($=s=>{s.key==="Escape"&&(o.setSearch(""),s.target.blur())},e[104]=o,e[105]=$):$=e[105];let z;e[106]!==o.search||e[107]!==o.setSearch||e[108]!==$?(z=t.jsx(Ue,{value:o.search,onChange:o.setSearch,placeholder:"Search for an MCP Server...",onKeyDown:$}),e[106]=o.search,e[107]=o.setSearch,e[108]=$,e[109]=z):z=e[109];let E;e[110]!==_e||e[111]!==K||e[112]!==o.handleSort||e[113]!==o.search||e[114]!==o.sortDirection||e[115]!==o.sortKey||e[116]!==o.viewMode||e[117]!==r||e[118]!==n.slug?(E=o.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:K.length===0?t.jsx(Ne,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:500,height:223,"aria-hidden":"true"}),title:(o.search,"No MCP Servers found"),description:o.search?`No MCP Servers match "${o.search}"`:"Create a connection to get started."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:K.map(s=>t.jsx(qe,{connection:s,fallbackIcon:"extension",onClick:()=>r({to:"/$org/mcps/$connectionId",params:{org:n.slug,connectionId:s.id}}),headerActions:t.jsxs(Te,{children:[t.jsx(Ae,{asChild:!0,children:t.jsx(F,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Dt,children:t.jsx(m,{name:"more_vert",size:20})})}),t.jsxs($e,{align:"end",onClick:wt,children:[t.jsxs(fe,{onClick:a=>{a.stopPropagation(),r({to:"/$org/mcps/$connectionId",params:{org:n.slug,connectionId:s.id}})},children:[t.jsx(m,{name:"visibility",size:16}),"Inspect"]}),t.jsxs(fe,{variant:"destructive",onClick:a=>{a.stopPropagation(),u({type:"delete",connection:s})},children:[t.jsx(m,{name:"delete",size:16}),"Delete"]})]})]})},s.id))})}):t.jsx(We,{columns:_e,data:K,isLoading:!1,sortKey:o.sortKey,sortDirection:o.sortDirection,onSort:o.handleSort,onRowClick:s=>r({to:"/$org/mcps/$connectionId",params:{org:n.slug,connectionId:s.id}}),emptyState:o.search?t.jsx(Ne,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:500,height:223,"aria-hidden":"true"}),title:"No MCP Servers found",description:`No MCP Servers match "${o.search}"`}):t.jsx(Ne,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:500,height:223,"aria-hidden":"true"}),title:"No MCP Servers found",description:"Create a connection to get started."})}),e[110]=_e,e[111]=K,e[112]=o.handleSort,e[113]=o.search,e[114]=o.sortDirection,e[115]=o.sortKey,e[116]=o.viewMode,e[117]=r,e[118]=n.slug,e[119]=E):E=e[119];let he;return e[120]!==N||e[121]!==T||e[122]!==A||e[123]!==z||e[124]!==E?(he=t.jsxs(Le,{children:[N,T,A,z,E]}),e[120]=N,e[121]=T,e[122]=A,e[123]=z,e[124]=E,e[125]=he):he=e[125],he}function wt(e){return e.stopPropagation()}function Dt(e){return e.stopPropagation()}function kt(e){const{field:n}=e;return t.jsxs(H,{children:[t.jsx(O,{children:"Token (optional)"}),t.jsx(R,{children:t.jsx(Pe,{type:"password",placeholder:"Bearer token or API key",...n,value:n.value??""})}),t.jsx(V,{})]})}function Nt(e){const{field:n}=e;return t.jsxs(H,{children:[t.jsx(O,{children:"URL *"}),t.jsx(R,{children:t.jsx(Pe,{placeholder:"https://example.com/mcp",...n})}),t.jsx(V,{})]})}function It(e){const{field:n}=e;return t.jsxs(H,{children:[t.jsx(O,{children:"Type *"}),t.jsxs(gt,{value:n.value,onValueChange:n.onChange,children:[t.jsx(R,{children:t.jsx(xt,{children:t.jsx(jt,{})})}),t.jsxs(Ct,{children:[t.jsx(Ie,{value:"HTTP",children:"HTTP"}),t.jsx(Ie,{value:"SSE",children:"SSE"}),t.jsx(Ie,{value:"Websocket",children:"Websocket"})]})]}),t.jsx(V,{})]})}function Mt(e){const{field:n}=e;return t.jsxs(H,{children:[t.jsx(O,{children:"Description"}),t.jsx(R,{children:t.jsx(_t,{placeholder:"A brief description of this connection",rows:3,...n,value:n.value??""})}),t.jsx(V,{})]})}function Pt(e){const{field:n}=e;return t.jsxs(H,{children:[t.jsx(O,{children:"Name *"}),t.jsx(R,{children:t.jsx(Pe,{placeholder:"My Connection",...n})}),t.jsx(V,{})]})}function Tt(e){return e.stopPropagation()}function At(e){return e.stopPropagation()}function $t(e){return t.jsx(ct,{variant:e.status==="active"?"success":"outline",children:e.status})}function zt(e){return t.jsx("span",{className:"text-sm text-muted-foreground block truncate",children:e.connection_url})}function Et(e){return t.jsx("span",{className:"text-sm font-medium",children:e.connection_type})}function Ft(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Kt(e){return t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function Bt(e){return t.jsx(Xe,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:"extension"})}function hn(){const e=ze.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Ge,{children:t.jsx(Me.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(m,{name:"progress_activity",size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(bt,{})})}),e[0]=n):n=e[0],n}export{hn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as n,j as i,a8 as m,aK as u,ab as g,a9 as x,ac as b,aa as j,ae as N,ad as h}from"./index-ckOjSsbf.js";import{c}from"./utils-pyEEdArk.js";import{c as D}from"./tooltip-BEGc6-ta.js";const v=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],y=D("x",v);function T(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(u,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function $(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(b,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function _(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-background/60 backdrop-blur-[0.5px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(N,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function k(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(y,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(h,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function B(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(_,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx(k,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs($,{"data-slot":"dialog-portal",children:[r,i.jsxs(g,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function O(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function P(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function S(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(j,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{E as D,y as X,P as a,S as b,B as c,T as d,R as e,O as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c,j as i,bS as p,bT as f,bU as m,bV as g,bW as x,bX as b,bY as v,bZ as w,b_ as h}from"./index-ckOjSsbf.js";import{c as u}from"./utils-pyEEdArk.js";import{c as j}from"./tooltip-BEGc6-ta.js";const N=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],S=j("chevron-right",N);function M(s){const e=c.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=i.jsx(p,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=o):o=e[3],o}function $(s){const e=c.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=i.jsx(f,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=o):o=e[3],o}function y(s){const e=c.c(10);let t,o,a;e[0]!==s?({className:t,sideOffset:a,...o}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=a):(t=e[1],o=e[2],a=e[3]);const n=a===void 0?4:a;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==o||e[7]!==n||e[8]!==r?(d=i.jsx(m,{children:i.jsx(g,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...o})}),e[6]=o,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function C(s){const e=c.c(12);let t,o,a,n;e[0]!==s?({className:t,inset:o,variant:n,...a}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=a,e[4]=n):(t=e[1],o=e[2],a=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-xl px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==o||e[8]!==a||e[9]!==d||e[10]!==r?(l=i.jsx(x,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":r,className:d,...a}),e[7]=o,e[8]=a,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function T(s){const e=c.c(8);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==o||e[6]!==a?(n=i.jsx(h,{"data-slot":"dropdown-menu-separator",className:a,...o}),e[5]=o,e[6]=a,e[7]=n):n=e[7],n}function R(s){const e=c.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=i.jsx(b,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=o):o=e[3],o}function k(s){const e=c.c(13);let t,o,a,n;e[0]!==s?({className:o,inset:a,children:t,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=a,e[4]=n):(t=e[1],o=e[2],a=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-xl px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(S,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==a||e[10]!==n||e[11]!==r?(l=i.jsxs(v,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:r,...n,children:[t,d]}),e[8]=t,e[9]=a,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function I(s){const e=c.c(8);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==o||e[6]!==a?(n=i.jsx(w,{"data-slot":"dropdown-menu-sub-content",className:a,...o}),e[5]=o,e[6]=a,e[7]=n):n=e[7],n}export{S as C,$ as D,y as a,M as b,C as c,T as d,R as e,k as f,I as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as v,j as t}from"./index-ckOjSsbf.js";import{c as N}from"./utils-pyEEdArk.js";function y(){const f=v.c(1);let e;return f[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:218,height:190,"aria-hidden":"true"}),f[0]=e):e=f[0],e}function S(f){const e=v.c(24),{image:o,title:p,description:u,actions:x,className:h,descriptionClassName:j,actionsClassName:g}=f;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==o?(l=o!==null&&t.jsx("div",{className:"flex items-center justify-center",children:o??t.jsx(y,{})}),e[2]=o,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let r;e[11]!==i||e[12]!==a?(r=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=r):r=e[13];let n;e[14]!==x||e[15]!==g?(n=x&&t.jsx("div",{className:N("flex items-center gap-2",g),children:x}),e[14]=x,e[15]=g,e[16]=n):n=e[16];let m;e[17]!==r||e[18]!==n?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[r,n]}),e[17]=r,e[18]=n,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{S as E};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{be as s,r as a,j as e}from"./index-ckOjSsbf.js";import{B as o}from"./button-UfWqfnW6.js";const n=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],l=s("triangle-alert",n);class h extends a.Component{state={hasError:!1,error:null};static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,t){console.error("Uncaught error:",r,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[e.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:e.jsx(l,{className:"h-6 w-6 text-destructive"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),e.jsx(o,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}export{h as E};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as R,j as t,r as O,a5 as ye,d as _e,ap as be,bB as ne,aq as ie,bd as ve,ar as we,as as Ce,a6 as re}from"./index-ckOjSsbf.js";import{E as Ne}from"./empty-state-1y2EWg7D.js";import{E as ce}from"./error-boundary-CcJOnlMu.js";import{b as Se,I as Te}from"./use-connection-IoNoQwc6.js";import{T as ke}from"./tool-set-selector-DHYjwwOX.js";import{b as Ie,a as $e}from"./use-gateway-CQn5-Udm.js";import{B as q}from"./button-UfWqfnW6.js";import{I as B}from"./icon-DrnCTy8O.js";import{I as de}from"./input-CwErI3qM.js";import{S as Ee}from"./switch-YzLtFOTn.js";import{F as M,a as Fe,b as Y,d as Z,f as ee,c as me}from"./form-qod6mSHT.js";import{c as fe,a as ue,S as xe,b as he,d as W}from"./select-CccYpzrg.js";import{d as H,b as K,a as Q,T as X}from"./tooltip-BEGc6-ta.js";import{s as Ge}from"./slugify-CEUa2lfQ.js";import{V as Ae,b as Ve}from"./layout-CRWUQVBf.js";import{f as ze}from"./formatDistanceToNow-Ctx6mZEP.js";import"./utils-pyEEdArk.js";import"./checkbox-D7oSBQoW.js";import"./collection-search-Bjsljx6L.js";function De(o){const s=new TextEncoder().encode(o),l=Array.from(s,a=>String.fromCharCode(a)).join("");return btoa(l)}function Pe(o){const e=R.c(52),{serverName:s,gatewayUrl:l}=o,[a,c]=O.useState(!1),[i,m]=O.useState(null),n=Ge(s);let r,d,p,g;if(e[0]!==l||e[1]!==n){const se={type:"http",url:l},oe={[n]:se};r=JSON.stringify(oe,null,2);const ae=je=>JSON.stringify({...se,headers:{"x-mesh-client":je}},null,2),pe=De(ae("Cursor"));d=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(n)}&config=${encodeURIComponent(pe)}`;const ge=ae("Claude Code");p=n;let le;e[6]===Symbol.for("react.memo_cache_sentinel")?(le=/'/g,e[6]=le):le=e[6],g=ge.replace(le,"'\\''"),e[0]=l,e[1]=n,e[2]=r,e[3]=d,e[4]=p,e[5]=g}else r=e[2],d=e[3],p=e[4],g=e[5];const C=`claude mcp add "${p}" --config '${g}'`;let u;e[7]!==r?(u=async()=>{await navigator.clipboard.writeText(r),c(!0),re.success("Configuration copied to clipboard"),setTimeout(()=>c(!1),2e3)},e[7]=r,e[8]=u):u=e[8];const x=u;let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=async(se,oe)=>{await navigator.clipboard.writeText(se),m(oe),re.success(`${oe} command copied`),setTimeout(()=>m(null),2e3)},e[9]=h):h=e[9];const J=h,L=Be;let V;e[10]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:"Install in your IDE"})}),e[10]=V):V=e[10];const w=a?"check":"content_copy";let P;e[11]!==w?(P=t.jsx(B,{name:w,size:14}),e[11]=w,e[12]=P):P=e[12];let F;e[13]!==x||e[14]!==P?(F=t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 shrink-0",onClick:x,children:P})}),e[13]=x,e[14]=P,e[15]=F):F=e[15];let z;e[16]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(X,{children:"Copy configuration"}),e[16]=z):z=e[16];let G;e[17]!==F?(G=t.jsx("div",{className:"absolute top-2 right-2",children:t.jsx(H,{children:t.jsxs(K,{children:[F,z]})})}),e[17]=F,e[18]=G):G=e[18];let j;e[19]!==r||e[20]!==x?(j=t.jsx("pre",{className:"text-xs font-mono text-foreground overflow-auto max-h-40 whitespace-pre-wrap wrap-break-word cursor-pointer",onClick:x,children:r}),e[19]=r,e[20]=x,e[21]=j):j=e[21];let y;e[22]!==G||e[23]!==j?(y=t.jsxs("div",{className:"relative flex flex-col gap-2 p-3 bg-muted/50 rounded-lg",children:[G,j]}),e[22]=G,e[23]=j,e[24]=y):y=e[24];let _;e[25]!==d?(_=()=>L(d),e[25]=d,e[26]=_):_=e[26];let N,S;e[27]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-6 w-6",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),S=t.jsx("span",{className:"text-sm font-medium",children:"Cursor"}),e[27]=N,e[28]=S):(N=e[27],S=e[28]);let A;e[29]!==_?(A=t.jsx(Q,{asChild:!0,children:t.jsxs(q,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:_,children:[N,S]})}),e[29]=_,e[30]=A):A=e[30];let T;e[31]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(X,{children:"Add to Cursor"}),e[31]=T):T=e[31];let k;e[32]!==A?(k=t.jsx(H,{children:t.jsxs(K,{children:[A,T]})}),e[32]=A,e[33]=k):k=e[33];let b;e[34]!==C?(b=()=>J(C,"Claude"),e[34]=C,e[35]=b):b=e[35];let I,$;e[36]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-6 w-6",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),$=t.jsx("span",{className:"text-sm font-medium",children:"Claude Code"}),e[36]=I,e[37]=$):(I=e[36],$=e[37]);let v;e[38]!==i?(v=i==="Claude"&&t.jsx(B,{name:"check",size:14,className:"ml-2 text-green-500"}),e[38]=i,e[39]=v):v=e[39];let E;e[40]!==b||e[41]!==v?(E=t.jsx(Q,{asChild:!0,children:t.jsxs(q,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:b,children:[I,$,v]})}),e[40]=b,e[41]=v,e[42]=E):E=e[42];let f;e[43]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(X,{children:"Add to Claude Code"}),e[43]=f):f=e[43];let D;e[44]!==E?(D=t.jsx(H,{children:t.jsxs(K,{children:[E,f]})}),e[44]=E,e[45]=D):D=e[45];let U;e[46]!==k||e[47]!==D?(U=t.jsxs("div",{className:"flex flex-wrap gap-2",children:[k,D]}),e[46]=k,e[47]=D,e[48]=U):U=e[48];let te;return e[49]!==y||e[50]!==U?(te=t.jsxs("div",{className:"flex flex-col gap-4",children:[V,y,U]}),e[49]=y,e[50]=U,e[51]=te):te=e[51],te}function Be(o){window.open(o,"_blank")}const Ue=be({title:ie().min(1,"Name is required").max(255),description:ie().nullable(),status:ne(["active","inactive"]),tool_selection_mode:ne(["inclusion","exclusion"]),tool_selection_strategy:ne(["passthrough","smart_tool_selection","code_execution"])});function Oe(o,e){const s={};for(const l of o.connections)if(l.selected_tools===null){const a=e.get(l.connection_id)??[];a.length>0&&(s[l.connection_id]=a)}else l.selected_tools.length>0&&(s[l.connection_id]=l.selected_tools);return s}function Re(o,e){return Object.entries(o).map(([s,l])=>{const a=e.get(s)??[],c=a.length>0&&a.every(i=>l.includes(i));return{connection_id:s,selected_tools:c?null:l}})}function Je(o){const e=R.c(28),{form:s,toolSet:l,onToolSetChange:a,icon:c}=o;let i;e[0]!==s?(i=s.watch("title")||"Gateway",e[0]=s,e[1]=i):i=e[1];let m;e[2]!==c||e[3]!==i?(m=t.jsx(Te,{icon:c,name:i,size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:"network_node"}),e[2]=c,e[3]=i,e[4]=m):m=e[4];let n;e[5]!==s.control?(n=t.jsx(M,{control:s.control,name:"status",render:He}),e[5]=s.control,e[6]=n):n=e[6];let r;e[7]!==m||e[8]!==n?(r=t.jsxs("div",{className:"flex items-start justify-between",children:[m,n]}),e[7]=m,e[8]=n,e[9]=r):r=e[9];let d;e[10]!==s.control?(d=t.jsxs("div",{className:"flex flex-col",children:[t.jsx(M,{control:s.control,name:"title",render:We}),t.jsx(M,{control:s.control,name:"description",render:qe})]}),e[10]=s.control,e[11]=d):d=e[11];let p;e[12]!==r||e[13]!==d?(p=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[r,d]}),e[12]=r,e[13]=d,e[14]=p):p=e[14];let g;e[15]!==s.control?(g=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[t.jsx(M,{control:s.control,name:"tool_selection_mode",render:Me}),t.jsx(M,{control:s.control,name:"tool_selection_strategy",render:Le})]}),e[15]=s.control,e[16]=g):g=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"flex-1 flex items-center justify-center p-5",children:t.jsx(B,{name:"progress_activity",size:32,className:"animate-spin text-muted-foreground"})}),e[17]=C):C=e[17];let u;e[18]!==a||e[19]!==l?(u=t.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:t.jsx(ce,{children:t.jsx(O.Suspense,{fallback:C,children:t.jsx(ke,{toolSet:l,onToolSetChange:a})})})}),e[18]=a,e[19]=l,e[20]=u):u=e[20];let x;e[21]!==p||e[22]!==g||e[23]!==u?(x=t.jsxs("div",{className:"flex flex-col h-full",children:[p,g,u]}),e[21]=p,e[22]=g,e[23]=u,e[24]=x):x=e[24];let h;return e[25]!==s||e[26]!==x?(h=t.jsx(Fe,{...s,children:x}),e[25]=s,e[26]=x,e[27]=h):h=e[27],h}function Le(o){const{field:e}=o;return t.jsxs(Y,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx(me,{className:"mb-0",children:"Gateway Strategy"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(H,{children:t.jsxs(K,{children:[t.jsx(Q,{asChild:!0,children:t.jsx("button",{type:"button",className:"cursor-help flex items-center",children:t.jsx(B,{name:"info",size:14,className:"text-muted-foreground"})})}),t.jsx(X,{side:"left",className:"max-w-sm",children:t.jsxs("div",{className:"text-xs space-y-1",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Passthrough:"})," Pass tools through as-is (default)."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Smart Tool Selection:"})," Intelligent tool selection behavior."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Code Execution:"})," Code execution behavior."]})]})})]})}),t.jsxs(fe,{value:e.value,onValueChange:e.onChange,children:[t.jsx(Z,{children:t.jsx(ue,{className:"w-[180px]",children:t.jsx(xe,{})})}),t.jsxs(he,{children:[t.jsx(W,{value:"passthrough",children:"Passthrough"}),t.jsx(W,{value:"smart_tool_selection",children:"Smart Tool Selection"}),t.jsx(W,{value:"code_execution",children:"Code Execution"})]})]})]})]}),t.jsx(ee,{})]})}function Me(o){const{field:e}=o;return t.jsxs(Y,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx(me,{className:"mb-0",children:"Tool Selection Mode"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(H,{children:t.jsxs(K,{children:[t.jsx(Q,{asChild:!0,children:t.jsx("button",{type:"button",className:"cursor-help flex items-center",children:t.jsx(B,{name:"info",size:14,className:"text-muted-foreground"})})}),t.jsx(X,{side:"left",className:"max-w-sm",children:t.jsxs("div",{className:"text-xs space-y-1",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Include:"})," Only selected connections/tools are exposed."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Exclude:"})," All connections/tools except selected ones are exposed."]})]})})]})}),t.jsxs(fe,{value:e.value,onValueChange:e.onChange,children:[t.jsx(Z,{children:t.jsx(ue,{className:"w-[180px]",children:t.jsx(xe,{})})}),t.jsxs(he,{children:[t.jsx(W,{value:"inclusion",children:"Include Selected"}),t.jsx(W,{value:"exclusion",children:"Exclude Selected"})]})]})]})]}),t.jsx(ee,{})]})}function qe(o){const{field:e}=o;return t.jsxs(Y,{className:"w-full space-y-0",children:[t.jsx(Z,{children:t.jsx(de,{...e,value:e.value||"",className:"h-auto text-base text-muted-foreground leading-6 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})}),t.jsx(ee,{})]})}function We(o){const{field:e}=o;return t.jsxs(Y,{className:"w-full space-y-0",children:[t.jsx(Z,{children:t.jsx(de,{...e,className:"h-auto text-lg! font-medium leading-7 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Gateway Name"})}),t.jsx(ee,{})]})}function He(o){const{field:e}=o;return t.jsxs(Y,{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:e.value==="active"?"Active":"Inactive"}),t.jsx(Z,{children:t.jsx(Ee,{checked:e.value==="active",onCheckedChange:s=>e.onChange(s?"active":"inactive")})})]}),t.jsx(ee,{})]})}function Ke(o){const e=R.c(53),{gateway:s,gatewayId:l}=o,a=ve(),c=$e();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={},e[0]=i):i=e[0];const m=Se(i);let n;if(e[1]!==m){n=new Map;for(const f of m)f.tools&&f.tools.length>0&&n.set(f.id,f.tools.map(Qe));e[1]=m,e[2]=n}else n=e[2];let r;e[3]!==n||e[4]!==s?(r=()=>Oe(s,n),e[3]=n,e[4]=s,e[5]=r):r=e[5];const[d,p]=O.useState(r),[g,C]=O.useState(!1);let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=f=>{p(f),C(!0)},e[6]=u):u=e[6];const x=u;let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=we(Ue),e[7]=h):h=e[7];const J=s.tool_selection_mode??"inclusion",L=s.tool_selection_strategy??"passthrough";let V;e[8]!==s.description||e[9]!==s.status||e[10]!==s.title||e[11]!==J||e[12]!==L?(V={resolver:h,defaultValues:{title:s.title,description:s.description,status:s.status,tool_selection_mode:J,tool_selection_strategy:L}},e[8]=s.description,e[9]=s.status,e[10]=s.title,e[11]=J,e[12]=L,e[13]=V):V=e[13];const w=Ce(V),F=w.formState.isDirty||g;let z;e[14]!==c.update||e[15]!==n||e[16]!==w||e[17]!==l||e[18]!==d?(z=async()=>{const f=w.getValues(),D=Re(d,n);await c.update.mutateAsync({id:l,data:{title:f.title,description:f.description,status:f.status,tool_selection_mode:f.tool_selection_mode,tool_selection_strategy:f.tool_selection_strategy,connections:D}}),w.reset(f),C(!1)},e[14]=c.update,e[15]=n,e[16]=w,e[17]=l,e[18]=d,e[19]=z):z=e[19];const G=z;let j;e[20]!==a.history?(j=()=>a.history.back(),e[20]=a.history,e[21]=j):j=e[21];let y;e[22]!==c.update.isPending||e[23]!==G||e[24]!==F?(y=F&&t.jsxs(q,{onClick:G,disabled:c.update.isPending,size:"sm",className:"h-7",children:[c.update.isPending&&t.jsx(B,{name:"progress_activity",size:16,className:"mr-2 animate-spin"}),"Save Changes"]}),e[22]=c.update.isPending,e[23]=G,e[24]=F,e[25]=y):y=e[25];let _;e[26]!==y?(_=t.jsx(Ae,{children:y}),e[26]=y,e[27]=_):_=e[27];let N;e[28]!==w||e[29]!==s.icon||e[30]!==d?(N=t.jsx("div",{className:"lg:border-r border-b lg:border-b-0 border-border overflow-auto",children:t.jsx(Je,{form:w,toolSet:d,onToolSetChange:x,icon:s.icon})}),e[28]=w,e[29]=s.icon,e[30]=d,e[31]=N):N=e[31];let S;e[32]!==s.id||e[33]!==s.title?(S=s.title||`gateway-${s.id.slice(0,8)}`,e[32]=s.id,e[33]=s.title,e[34]=S):S=e[34];const A=`${window.location.origin}/mcp/gateway/${s.id}`;let T;e[35]!==S||e[36]!==A?(T=t.jsx("div",{className:"p-5",children:t.jsx(Pe,{serverName:S,gatewayUrl:A})}),e[35]=S,e[36]=A,e[37]=T):T=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("span",{className:"flex-1 text-sm text-foreground",children:"Last Updated"}),e[38]=k):k=e[38];let b;e[39]!==s.updated_at?(b=s.updated_at?ze(new Date(s.updated_at),{addSuffix:!1}):"Unknown",e[39]=s.updated_at,e[40]=b):b=e[40];let I;e[41]!==b?(I=t.jsxs("div",{className:"flex items-center gap-4 p-5 border-t border-border",children:[k,t.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:b})]}),e[41]=b,e[42]=I):I=e[42];let $;e[43]!==T||e[44]!==I?($=t.jsxs("div",{className:"flex flex-col overflow-auto",children:[T,I]}),e[43]=T,e[44]=I,e[45]=$):$=e[45];let v;e[46]!==N||e[47]!==$?(v=t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[2fr_1fr] h-full",children:[N,$]}),e[46]=N,e[47]=$,e[48]=v):v=e[48];let E;return e[49]!==_||e[50]!==v||e[51]!==j?(E=t.jsxs(Ve,{onBack:j,children:[_,v]}),e[49]=_,e[50]=v,e[51]=j,e[52]=E):E=e[52],E}function Qe(o){return o.name}function Xe(){const o=R.c(8);let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/gateways/$gatewayId"},o[0]=e):e=o[0];const s=ye(e);let l;o[1]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/gateways/$gatewayId"},o[1]=l):l=o[1];const{gatewayId:a,org:c}=_e(l),i=Ie(a);if(!i){let n;return o[2]!==s||o[3]!==c?(n=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ne,{title:"Gateway not found",description:"This gateway may have been deleted or you may not have access.",actions:t.jsx(q,{variant:"outline",onClick:()=>s({to:"/$org/gateways",params:{org:c}}),children:"Back to gateways"})})}),o[2]=s,o[3]=c,o[4]=n):n=o[4],n}let m;return o[5]!==i||o[6]!==a?(m=t.jsx(Ke,{gateway:i,gatewayId:a}),o[5]=i,o[6]=a,o[7]=m):m=o[7],m}function Ye(){const o=R.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ce,{children:t.jsx(O.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(B,{name:"progress_activity",size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Xe,{})})}),o[0]=e):e=o[0],e}function jt(){const o=R.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ye,{}),o[0]=e):e=o[0],e}export{jt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as Y,j as t,r as Z,a5 as te,a6 as se}from"./index-ckOjSsbf.js";import{C as oe}from"./collection-header-DqX3M1ox.js";import{C as ae}from"./collection-page-iotK2mh3.js";import{C as ne}from"./collection-search-Bjsljx6L.js";import{C as re}from"./collection-table-wrapper-D98e-gOY.js";import{C as ie}from"./connection-card-C-M_OhaM.js";import{E as q}from"./empty-state-1y2EWg7D.js";import{E as le}from"./error-boundary-CcJOnlMu.js";import{b as ce,I as de}from"./use-connection-IoNoQwc6.js";import{a as me,u as ue}from"./use-gateway-CQn5-Udm.js";import{u as ge}from"./use-list-state-DRmAmaM0.js";import{u as pe}from"./tooltip-BEGc6-ta.js";import{c as he,b as fe,d as xe,A as we,e as ye,g as je,a as Ce,f as Ne}from"./alert-dialog-DucVRGId.js";import{B as ee}from"./badge-DAqf2QcS.js";import{B as J}from"./button-UfWqfnW6.js";import{b as Q,D as U,a as X,c as B}from"./dropdown-menu-B7djqSa8.js";import{I as i}from"./icon-DrnCTy8O.js";import"./collection-display-button-CwZeJFt8.js";import"./utils-pyEEdArk.js";import"./input-CwErI3qM.js";import"./card-sOD0ZSWO.js";import"./use-mobile-c3XFiGhb.js";function ve(e,a){switch(a.type){case"delete":return{mode:"deleting",gateway:a.gateway};case"close":return{mode:"idle"}}}function De(){const e=Y.c(68),{org:a}=pe(),n=te();let y;e[0]!==a.slug?(y={namespace:a.slug,resource:"gateways"},e[0]=a.slug,e[1]=y):y=e[1];const s=ge(y),r=me(),w=ue(s);let j;e[2]===Symbol.for("react.memo_cache_sentinel")?(j={},e[2]=j):j=e[2];const R=ce(j);let C;e[3]===Symbol.for("react.memo_cache_sentinel")?(C={mode:"idle"},e[3]=C):C=e[3];const[l,N]=Z.useReducer(ve,C);let v;e[4]!==r.create||e[5]!==R.length||e[6]!==n||e[7]!==a.slug?(v=async()=>{if(R.length===0){se.error("Create at least one MCP connection first");return}const o=await r.create.mutateAsync({title:"New Gateway",description:"Gateways let you securely expose integrated tools to the outside world.",status:"active",tool_selection_strategy:"passthrough",tool_selection_mode:"inclusion",connections:[]});n({to:"/$org/gateways/$gatewayId",params:{org:a.slug,gatewayId:o.id}})},e[4]=r.create,e[5]=R.length,e[6]=n,e[7]=a.slug,e[8]=v):v=e[8];const T=v;let D;e[9]!==r.delete||e[10]!==l.gateway||e[11]!==l.mode?(D=async()=>{if(l.mode!=="deleting")return;const o=l.gateway.id;N({type:"close"});try{await r.delete.mutateAsync(o)}catch{}},e[9]=r.delete,e[10]=l.gateway,e[11]=l.mode,e[12]=D):D=e[12];const O=D;let S,_,b,k,I,M;e[13]===Symbol.for("react.memo_cache_sentinel")?(_={id:"icon",header:"",render:$e,cellClassName:"w-16 shrink-0",wrap:!0},b={id:"title",header:"Name",render:Ae,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},k={id:"description",header:"Description",render:ze,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},I={id:"mode",header:"Mode",accessor:Pe,cellClassName:"w-[100px]"},M={id:"connections",header:"Connections",render:Me,cellClassName:"w-24 shrink-0"},S={id:"status",header:"Status",render:Ie,cellClassName:"w-24 shrink-0",sortable:!0},e[13]=S,e[14]=_,e[15]=b,e[16]=k,e[17]=I,e[18]=M):(S=e[13],_=e[14],b=e[15],k=e[16],I=e[17],M=e[18]);let P;e[19]!==n||e[20]!==a.slug?(P=[_,b,k,I,M,S,{id:"actions",header:"",render:o=>t.jsxs(Q,{children:[t.jsx(U,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ke,children:t.jsx(i,{name:"more_vert",size:20})})}),t.jsxs(X,{align:"end",onClick:be,children:[t.jsxs(B,{onClick:c=>{c.stopPropagation(),n({to:"/$org/gateways/$gatewayId",params:{org:a.slug,gatewayId:o.id}})},children:[t.jsx(i,{name:"visibility",size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:c=>{c.stopPropagation(),N({type:"delete",gateway:o})},children:[t.jsx(i,{name:"delete",size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[19]=n,e[20]=a.slug,e[21]=P):P=e[21];const V=P,H=r.create.isPending?"Creating...":"Create MCP Gateway";let z;e[22]!==r.create.isPending||e[23]!==T||e[24]!==H?(z=t.jsx(J,{onClick:T,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:r.create.isPending,children:H}),e[22]=r.create.isPending,e[23]=T,e[24]=H,e[25]=z):z=e[25];const L=z,F=l.mode==="deleting";let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=o=>!o&&N({type:"close"}),e[26]=A):A=e[26];let $;e[27]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(he,{children:"Delete Gateway?"}),e[27]=$):$=e[27];const W=l.mode==="deleting"&&l.gateway.title;let d;e[28]!==W?(d=t.jsxs(fe,{children:[$,t.jsxs(xe,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:W}),"."]})]}),e[28]=W,e[29]=d):d=e[29];let E;e[30]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(we,{children:"Cancel"}),e[30]=E):E=e[30];let m;e[31]!==O?(m=t.jsxs(ye,{children:[E,t.jsx(je,{onClick:O,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[31]=O,e[32]=m):m=e[32];let u;e[33]!==d||e[34]!==m?(u=t.jsxs(Ce,{children:[d,m]}),e[33]=d,e[34]=m,e[35]=u):u=e[35];let g;e[36]!==F||e[37]!==u?(g=t.jsx(Ne,{open:F,onOpenChange:A,children:u}),e[36]=F,e[37]=u,e[38]=g):g=e[38];let G;e[39]===Symbol.for("react.memo_cache_sentinel")?(G=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"status",label:"Status"}],e[39]=G):G=e[39];let p;e[40]!==L||e[41]!==s.handleSort||e[42]!==s.setViewMode||e[43]!==s.sortDirection||e[44]!==s.sortKey||e[45]!==s.viewMode?(p=t.jsx(oe,{title:"MCP Gateways",viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:G,ctaButton:L}),e[40]=L,e[41]=s.handleSort,e[42]=s.setViewMode,e[43]=s.sortDirection,e[44]=s.sortKey,e[45]=s.viewMode,e[46]=p):p=e[46];let h;e[47]!==s?(h=o=>{o.key==="Escape"&&(s.setSearch(""),o.target.blur())},e[47]=s,e[48]=h):h=e[48];let f;e[49]!==s.search||e[50]!==s.setSearch||e[51]!==h?(f=t.jsx(ne,{value:s.search,onChange:s.setSearch,placeholder:"Search for a gateway...",onKeyDown:h}),e[49]=s.search,e[50]=s.setSearch,e[51]=h,e[52]=f):f=e[52];let x;e[53]!==V||e[54]!==w||e[55]!==s.handleSort||e[56]!==s.search||e[57]!==s.sortDirection||e[58]!==s.sortKey||e[59]!==s.viewMode||e[60]!==n||e[61]!==a.slug?(x=s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:w.length===0?t.jsx(q,{image:t.jsx(i,{name:"network_node",size:48,className:"text-muted-foreground"}),title:s.search?"No gateways found":"No gateways yet",description:s.search?`No gateways match "${s.search}"`:"Create a gateway to aggregate tools from multiple MCP connections."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:w.map(o=>t.jsx(ie,{connection:{id:o.id,title:o.title,description:o.description,icon:o.icon,status:o.status},fallbackIcon:"network_node",onClick:()=>n({to:"/$org/gateways/$gatewayId",params:{org:a.slug,gatewayId:o.id}}),footer:t.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[t.jsxs("span",{children:[o.connections.length," connection",o.connections.length!==1?"s":""]}),t.jsx("span",{children:"•"}),t.jsx("span",{children:o.tool_selection_mode==="exclusion"?"Exclude":"Include"})]}),headerActions:t.jsxs(Q,{children:[t.jsx(U,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:_e,children:t.jsx(i,{name:"more_vert",size:20})})}),t.jsxs(X,{align:"end",onClick:Se,children:[t.jsxs(B,{onClick:c=>{c.stopPropagation(),n({to:"/$org/gateways/$gatewayId",params:{org:a.slug,gatewayId:o.id}})},children:[t.jsx(i,{name:"visibility",size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:c=>{c.stopPropagation(),N({type:"delete",gateway:o})},children:[t.jsx(i,{name:"delete",size:16}),"Delete"]})]})]})},o.id))})}):t.jsx(re,{columns:V,data:w,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:o=>n({to:"/$org/gateways/$gatewayId",params:{org:a.slug,gatewayId:o.id}}),emptyState:s.search?t.jsx(q,{image:t.jsx(i,{name:"network_node",size:48,className:"text-muted-foreground"}),title:"No gateways found",description:`No gateways match "${s.search}"`}):t.jsx(q,{image:t.jsx(i,{name:"network_node",size:48,className:"text-muted-foreground"}),title:"No gateways yet",description:"Create a gateway to aggregate tools from multiple MCP connections."})}),e[53]=V,e[54]=w,e[55]=s.handleSort,e[56]=s.search,e[57]=s.sortDirection,e[58]=s.sortKey,e[59]=s.viewMode,e[60]=n,e[61]=a.slug,e[62]=x):x=e[62];let K;return e[63]!==g||e[64]!==p||e[65]!==f||e[66]!==x?(K=t.jsxs(ae,{children:[g,p,f,x]}),e[63]=g,e[64]=p,e[65]=f,e[66]=x,e[67]=K):K=e[67],K}function Se(e){return e.stopPropagation()}function _e(e){return e.stopPropagation()}function be(e){return e.stopPropagation()}function ke(e){return e.stopPropagation()}function Ie(e){return t.jsx(ee,{variant:e.status==="active"?"default":"outline",children:e.status})}function Me(e){return t.jsx("span",{className:"text-sm text-muted-foreground",children:e.connections.length})}function Pe(e){return t.jsx(ee,{variant:"outline",className:"text-xs",children:e.tool_selection_mode==="exclusion"?"Exclude":"Include"})}function ze(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Ae(e){return t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function $e(e){return t.jsx(de,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:"network_node"})}function ot(){const e=Y.c(1);let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(le,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(i,{name:"progress_activity",size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(De,{})})}),e[0]=a):a=e[0],a}export{ot as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as u,j as i,a as w,r as C,a5 as $}from"./index-ckOjSsbf.js";import{C as _}from"./card-sOD0ZSWO.js";import{c as v}from"./utils-pyEEdArk.js";import{A as k}from"./avatar-Bv1o4qKK.js";import{I as z}from"./icon-DrnCTy8O.js";import{B as A}from"./button-UfWqfnW6.js";import{I as O}from"./input-CwErI3qM.js";import{C as L}from"./create-organization-dialog-D5OVpWvl.js";import"./alert-dialog-DucVRGId.js";import"./form-qod6mSHT.js";import"./spinner-B5hpYDWD.js";function D(t){const e=u.c(10),{children:n,className:l,onNavigate:s,showHoverRing:r}=t,x=r===void 0?!1:r;let o;e[0]!==s?(o=p=>{s&&s(p)},e[0]=s,e[1]=o):o=e[1];const m=o,d=s&&"cursor-pointer",a=x&&"hover:ring-2 hover:ring-primary";let c;e[2]!==l||e[3]!==d||e[4]!==a?(c=v("group transition-all flex flex-col gap-0",d,a,l),e[2]=l,e[3]=d,e[4]=a,e[5]=c):c=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==c?(g=i.jsx(_,{className:c,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=c,e[9]=g):g=e[9],g}function F(t){const e=u.c(7),{url:n,fallback:l,shape:s,size:r,objectFit:x,className:o}=t,m=s===void 0?"square":s,d=r===void 0?"lg":r,a=x===void 0?"contain":x;let c;return e[0]!==o||e[1]!==l||e[2]!==a||e[3]!==m||e[4]!==d||e[5]!==n?(c=i.jsx(k,{url:n,fallback:l,shape:m,size:d,objectFit:a,className:o}),e[0]=o,e[1]=l,e[2]=a,e[3]=m,e[4]=d,e[5]=n,e[6]=c):c=e[6],c}function H(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function R(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("font-medium truncate",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("p",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function I(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("h3",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function B(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex flex-col gap-[2px]",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function G(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex justify-between items-start",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function q(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function M(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function Q(){const t=u.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"flex justify-between items-start",children:i.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,i.jsxs("div",{className:"flex flex-col gap-[2px]",children:[i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),i.jsx("div",{className:"h-4 w-40 bg-muted rounded-lg animate-pulse"})]})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsxs(_,{className:"group transition-colors flex flex-col",children:[n,i.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const b=Object.assign(D,{Avatar:F,AvatarSection:G,Header:H,Title:R,Subtitle:I,Content:B,Footer:q,Badge:M,Skeleton:Q}),T={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},P={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},V={1:"@min-3xl:grid-cols-1",2:"@min-3xl:grid-cols-2",3:"@min-3xl:grid-cols-3",4:"@min-3xl:grid-cols-4",5:"@min-3xl:grid-cols-5",6:"@min-3xl:grid-cols-6",7:"@min-3xl:grid-cols-7",8:"@min-3xl:grid-cols-8"},X={1:"@min-6xl:grid-cols-1",2:"@min-6xl:grid-cols-2",3:"@min-6xl:grid-cols-3",4:"@min-6xl:grid-cols-4",5:"@min-6xl:grid-cols-5",6:"@min-6xl:grid-cols-6",7:"@min-6xl:grid-cols-7",8:"@min-6xl:grid-cols-8"},J={1:"@min-7xl:grid-cols-1",2:"@min-7xl:grid-cols-2",3:"@min-7xl:grid-cols-3",4:"@min-7xl:grid-cols-4",5:"@min-7xl:grid-cols-5",6:"@min-7xl:grid-cols-6",7:"@min-7xl:grid-cols-7",8:"@min-7xl:grid-cols-8"},K={1:"@min-8xl:grid-cols-1",2:"@min-8xl:grid-cols-2",3:"@min-8xl:grid-cols-3",4:"@min-8xl:grid-cols-4",5:"@min-8xl:grid-cols-5",6:"@min-8xl:grid-cols-6",7:"@min-8xl:grid-cols-7",8:"@min-8xl:grid-cols-8"};function E(t){const e=u.c(13),{children:n,columns:l,gap:s,className:r}=t;let x;e[0]!==l?(x=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=x):x=e[1];const o=x,d=T[s===void 0?4:s],a=o.sm&&P[o.sm],c=o.md&&V[o.md],g=o.lg&&X[o.lg],p=o.xl&&J[o.xl],j=o["2xl"]&&K[o["2xl"]];let h;e[2]!==r||e[3]!==d||e[4]!==a||e[5]!==c||e[6]!==g||e[7]!==p||e[8]!==j?(h=v("w-full grid",d,a,c,g,p,j,r),e[2]=r,e[3]=d,e[4]=a,e[5]=c,e[6]=g,e[7]=p,e[8]=j,e[9]=h):h=e[9];const N=h;let f;return e[10]!==n||e[11]!==N?(f=i.jsx("div",{className:N,children:n}),e[10]=n,e[11]=N,e[12]=f):f=e[12],f}function U(t){const e=u.c(9),{count:n,columns:l,gap:s,className:r}=t,x=n===void 0?8:n;let o;e[0]!==l?(o=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=o):o=e[1];const m=o,d=s===void 0?4:s;let a;e[2]!==x?(a=Array.from({length:x}).map(W),e[2]=x,e[3]=a):a=e[3];let c;return e[4]!==r||e[5]!==m||e[6]!==d||e[7]!==a?(c=i.jsx(E,{columns:m,gap:d,className:r,children:a}),e[4]=r,e[5]=m,e[6]=d,e[7]=a,e[8]=c):c=e[8],c}function W(t,e){return i.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[i.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[i.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),i.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const S=Object.assign(E,{Skeleton:U});function Y(t){const e=u.c(14),{query:n}=t,{data:l}=w.useListOrganizations(),s=$();let r;e[0]!==l||e[1]!==n?(r=l?n?(()=>{const a=n.toLowerCase();return l.filter(c=>c.name.toLowerCase().includes(a)||c.slug.toLowerCase().includes(a))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const x=r;if(!l||l.length===0){let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:i.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=a):a=e[3],a}if(x.length===0){let a;return e[4]!==n?(a=i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:i.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=a):a=e[5],a}let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o={sm:2,md:3,lg:4},e[6]=o):o=e[6];let m;if(e[7]!==x||e[8]!==s){let a;e[10]!==s?(a=c=>i.jsxs(b,{onNavigate:()=>s({to:"/$org",params:{org:c.slug}}),children:[i.jsxs(b.Header,{children:[i.jsx(b.AvatarSection,{children:i.jsx(b.Avatar,{url:c.logo||"",fallback:c.name,size:"lg",objectFit:"contain"})}),i.jsxs(b.Content,{children:[i.jsxs(b.Subtitle,{children:["@",c.slug]}),i.jsx(b.Title,{children:c.name})]})]}),i.jsx(b.Footer,{children:i.jsxs("div",{className:"text-xs text-muted-foreground",children:["Created:"," ",new Date(c.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},c.id),e[10]=s,e[11]=a):a=e[11],m=x.map(a),e[7]=x,e[8]=s,e[9]=m}else m=e[9];let d;return e[12]!==m?(d=i.jsx(S,{columns:o,children:m}),e[12]=m,e[13]=d):d=e[13],d}function Z(t){const e=u.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(z,{name:"error",size:24,className:"text-destructive"}),e[0]=l):l=e[0];let s;return e[1]!==n.message?(s=i.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:[l,i.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=s):s=e[2],s}function ee(){const t=u.c(20),{error:e,isPending:n}=w.useListOrganizations(),[l,s]=C.useState(""),[r,x]=C.useState(!1),o=C.useDeferredValue(l);if(n){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx("div",{className:"flex items-center justify-between mb-8",children:i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"})}),t[0]=f):f=t[0];let y;return t[1]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[f,i.jsx("div",{className:"@container",children:i.jsx(S.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})]}),t[1]=y):y=t[1],y}if(e){let f;return t[2]!==e?(f=i.jsx(Z,{error:e}),t[2]=e,t[3]=f):f=t[3],f}let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"}),t[4]=m):m=t[4];let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=f=>s(f.target.value),t[5]=d):d=t[5];let a;t[6]!==l?(a=i.jsx(O,{className:"max-w-xs",placeholder:"Search",value:l,onChange:d}),t[6]=l,t[7]=a):a=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsxs(A,{variant:"default",onClick:()=>x(!0),children:[i.jsx(z,{name:"add",size:16}),i.jsx("span",{children:"New organization"})]}),t[8]=c):c=t[8];let g;t[9]!==a?(g=i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[m,i.jsxs("div",{className:"flex items-center gap-2",children:[a,c]})]}),t[9]=a,t[10]=g):g=t[10];let p;t[11]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(S.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[11]=p):p=t[11];let j;t[12]!==o?(j=i.jsx("div",{className:"@container",children:i.jsx(C.Suspense,{fallback:p,children:i.jsx(Y,{query:o})})}),t[12]=o,t[13]=j):j=t[13];let h;t[14]!==r?(h=i.jsx(L,{open:r,onOpenChange:x}),t[14]=r,t[15]=h):h=t[15];let N;return t[16]!==g||t[17]!==j||t[18]!==h?(N=i.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[g,j,h]}),t[16]=g,t[17]=j,t[18]=h,t[19]=N):N=t[19],N}function xe(){const t=u.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"min-h-full",children:i.jsx(ee,{})}),t[0]=e):e=t[0],e}export{xe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as w,j as z}from"./index-ckOjSsbf.js";import{c as I}from"./utils-pyEEdArk.js";function L(a){const t=w.c(28);let e,s,l,i,c,r,f,m;t[0]!==a?({name:s,filled:c,weight:r,grade:f,size:m,style:i,className:e,...l}=a,t[0]=a,t[1]=e,t[2]=s,t[3]=l,t[4]=i,t[5]=c,t[6]=r,t[7]=f,t[8]=m):(e=t[1],s=t[2],l=t[3],i=t[4],c=t[5],r=t[6],f=t[7],m=t[8]);const j=c===void 0?!1:c,p=r===void 0?400:r,d=f===void 0?0:f,$=m===void 0?16:m;let o;t[9]!==e?(o=I("material-symbols-outlined",e),t[9]=e,t[10]=o):o=t[10];let u;if(t[11]!==j||t[12]!==d||t[13]!==p){const y=j?"1":"0";let x;t[15]!==d||t[16]!==y||t[17]!==p?(x={FILL:y,wght:p,GRAD:d},t[15]=d,t[16]=y,t[17]=p,t[18]=x):x=t[18],u=Object.entries(x).map(R),t[11]=j,t[12]=d,t[13]=p,t[14]=u}else u=t[14];const v=u.join(", "),h=`${$}px`;let n;t[19]!==i||t[20]!==v||t[21]!==h?(n={fontVariationSettings:v,...i,fontSize:h},t[19]=i,t[20]=v,t[21]=h,t[22]=n):n=t[22];let g;return t[23]!==s||t[24]!==l||t[25]!==o||t[26]!==n?(g=z.jsx("span",{translate:"no",className:o,style:n,...l,children:s}),t[23]=s,t[24]=l,t[25]=o,t[26]=n,t[27]=g):g=t[27],g}function R(a){const[t,e]=a;return`'${t}' ${e}`}export{L as I};
|