@decocms/mesh 1.0.0-alpha.33 → 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-Bj3sxji2.js → alert-dialog-yp0b0MDg.js} +3 -3
- package/dist/client/assets/{auth-bF2_ysdG.js → auth-C8rltTUE.js} +1 -1
- package/dist/client/assets/{auth-catchall-BRnZAoYY.js → auth-catchall-VFRahgSj.js} +1 -1
- package/dist/client/assets/avatar-i3GM_9o4.js +1 -0
- package/dist/client/assets/{badge-Ba7oj8pn.js → badge-gmsvp75V.js} +1 -1
- package/dist/client/assets/{button-8a8UdvyR.js → button-eIETQb0Y.js} +1 -1
- package/dist/client/assets/{card-Cyeg7tCo.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-B92Inaku.js → collection-header-LJs-cTFu.js} +1 -1
- package/dist/client/assets/{collection-page-BfXTrpEI.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-xMF7zskf.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-DHnxmqjc.js → core-BUY47BFk.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-Cz9P_oQD.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-BpMaEsIX.js → extract-connection-data-DNQ4aWdY.js} +1 -1
- package/dist/client/assets/{form-DU90-O_I.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-DCY07ujJ.js → index-CF_OPzOB.js} +1 -1
- package/dist/client/assets/{index-jKafgZHH.js → index-CQXdtGjW.js} +18 -18
- package/dist/client/assets/{index-HoRNE_Oj.js → index-Dbugj1Qf.js} +15 -15
- package/dist/client/assets/{index-Bgo9U3qs.js → index-qnfTBZZC.js} +1 -1
- package/dist/client/assets/{input-GtBoan0u.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-BAj2Mxm0.js → lazy-highlighter-CYdbIXwO.js} +1 -1
- package/dist/client/assets/{localstorage-keys-DdRmNbGe.js → localstorage-keys-7rhieZF2.js} +1 -1
- package/dist/client/assets/{login-DHkcl1CZ.js → login-BGPiojdD.js} +1 -1
- package/dist/client/assets/{mcp-oauth-pvU53iS3.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-DdVvJgdl.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-zp4LhQ6R.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-BDhhfHrp.js → shell-layout-t3dkCYaC.js} +41 -41
- package/dist/client/assets/{spinner-Uc4IX4M6.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-8wTpXb1-.js → switch-nOTvNKSU.js} +1 -1
- package/dist/client/assets/{textarea-CTPqKmyI.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-BPQhbEIl.js → use-binding-FqyuxtmF.js} +1 -1
- package/dist/client/assets/use-connection-BcR9UFbs.js +2 -0
- package/dist/client/assets/{use-gateway-DN4bQAAB.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-CQqxPDky.js → use-mcp-BHfi5-go.js} +1 -1
- package/dist/client/assets/{use-members-C17JGpEk.js → use-members-C4kUxhI6.js} +1 -1
- package/dist/client/assets/{use-mobile-BnwnARpl.js → use-mobile-BAgI68xi.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CTBiXWgx.js → use-organization-settings-Bdum0zz2.js} +1 -1
- package/dist/client/assets/{use-tool-call-BxgOuqkM.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/dist/server/cli.js +166 -164
- package/dist/server/migrate.js +119 -117
- package/dist/server/server.js +160 -158
- package/package.json +2 -2
- package/dist/client/assets/avatar-B9zSDca0.js +0 -1
- package/dist/client/assets/checkbox-DCjoNloy.js +0 -1
- package/dist/client/assets/circle-alert-DVLBfxyX.js +0 -1
- package/dist/client/assets/collection-detail-ieEvVULW.js +0 -1
- package/dist/client/assets/collection-display-button-CGcY64sw.js +0 -1
- package/dist/client/assets/collection-search-C7G2QK3t.js +0 -1
- package/dist/client/assets/collection-table-wrapper-DdGYlOCN.js +0 -1
- package/dist/client/assets/connection-detail-CKuTnq-B.js +0 -1
- package/dist/client/assets/connections-Bm36z6Kn.js +0 -1
- package/dist/client/assets/dialog-DOdwpjqP.js +0 -1
- package/dist/client/assets/dropdown-menu-BTTzlaf4.js +0 -1
- package/dist/client/assets/empty-state-CwiQR0XJ.js +0 -1
- package/dist/client/assets/error-boundary-8a3_at8W.js +0 -1
- package/dist/client/assets/gateway-detail-B2bI_bIU.js +0 -1
- package/dist/client/assets/gateways-BxMjTmO6.js +0 -1
- package/dist/client/assets/home-CSzEs1Rf.js +0 -1
- package/dist/client/assets/icon-CzxeHWBl.js +0 -1
- package/dist/client/assets/index-ChN7etWB.css +0 -1
- package/dist/client/assets/json-CFpQXyKn.js +0 -1
- package/dist/client/assets/layout-DtdXVJv4.js +0 -1
- package/dist/client/assets/members-CX-ziwX2.js +0 -3
- package/dist/client/assets/monitoring-5rf2nLo0.js +0 -1
- package/dist/client/assets/oauth-callback-NjwvQ7fr.js +0 -1
- package/dist/client/assets/page-DQXzmwPi.js +0 -21
- package/dist/client/assets/prism-light-CixH9adM.js +0 -1
- package/dist/client/assets/resource-tabs-D-d1_s9d.js +0 -1
- package/dist/client/assets/select-gKhGAtmi.js +0 -1
- package/dist/client/assets/settings-DOjDcDAR.js +0 -1
- package/dist/client/assets/store-B09vXexU.js +0 -1
- package/dist/client/assets/store-app-detail-BqI8KTAM.js +0 -1
- package/dist/client/assets/tool-set-selector-B9UyeKAH.js +0 -1
- package/dist/client/assets/tooltip-ocFCU6ZE.js +0 -1
- package/dist/client/assets/types-CqJfCRYk.js +0 -45
- package/dist/client/assets/upload-CXce3aGG.js +0 -1
- package/dist/client/assets/use-connection-DbdMBpCj.js +0 -2
- package/dist/client/assets/use-list-state-DhZmck5D.js +0 -1
- package/dist/client/assets/useQuery-CeKP0W1d.js +0 -1
- package/dist/client/assets/utils-oBMoklwF.js +0 -1
- package/dist/client/assets/well-known-mcp-Dg77mwx9.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as C,
|
|
1
|
+
import{c as C,ae as d,j as a}from"./index-Dbugj1Qf.js";import{c as m}from"./utils-C9RgqtL7.js";const u=d("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",special:"fill-special text-backround"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=m(u({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=a.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let s;e[5]!==t?(s=a.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=a.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b4 as U,b5 as _,b6 as H,b7 as G,b8 as Y,b9 as Z,r as M,c as T,j as s,a5 as q,a2 as J,a as X,ba as ee,ao as te}from"./index-Dbugj1Qf.js";import{i as se,g as ie,a as le}from"./well-known-mcp-D-VmC-4r.js";import{C as ne}from"./collection-header-LJs-cTFu.js";import{I as re,a as oe,c as ae,d as V,b as ce}from"./use-connection-BcR9UFbs.js";import{T as de,a as me,b as fe,u as D}from"./tooltip-C_Is8XE4.js";import{s as ue}from"./slugify-CEUa2lfQ.js";import{n as he}from"./Inbox01-CJr3WKtd.js";import{i as z}from"./Loading01-Dp6sT3Mq.js";import{i as xe,E as pe}from"./SearchMd-3u9z3FIP.js";import{C as ge}from"./collection-search-uhjPIekp.js";import{C as ve}from"./card-BeaxjjFM.js";import{g as je,f as Ne,a as ye}from"./registry-utils-ulDDT0d8.js";import{e as Ce}from"./app-name-gTETL9So.js";import{d as we,a as be,S as Se,b as Pe,c as Re}from"./select-BoIpHU2H.js";import{s as W}from"./Plus-LcofPC9C.js";import{C as Ie}from"./connection-card-BQ92NHJ6.js";import{B as ke}from"./button-eIETQb0Y.js";import{a as Ee}from"./use-binding-FqyuxtmF.js";import{L as Le,u as Te}from"./localstorage-keys-7rhieZF2.js";import"./collection-display-button--hU2cKng.js";import"./dropdown-menu-DKiYuSii.js";import"./ChevronRight-YHVS_LDJ.js";import"./utils-C9RgqtL7.js";import"./input-BWvhkgtS.js";import"./ChevronDown-CLC0yxsk.js";import"./auth-C8rltTUE.js";import"./useQuery-BrB4rOUi.js";var $e=class extends U{constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t){super.setOptions({...t,behavior:_()})}getOptimisticResult(t){return t.behavior=_(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"backward"}}})}createResult(t,e){const{state:l}=t,m=super.createResult(t,e),{isFetching:r,isRefetching:h,isError:d,isRefetchError:a}=m,c=l.fetchMeta?.fetchMore?.direction,i=d&&c==="forward",n=r&&c==="forward",o=d&&c==="backward",f=r&&c==="backward";return{...m,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:G(e,l.data),hasPreviousPage:H(e,l.data),isFetchNextPageError:i,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:f,isRefetchError:a&&!i&&!o,isRefetching:h&&!n&&!f}}};function Me(t,e){return Y({...t,enabled:!0,suspense:!0,throwOnError:Z},$e,e)}const Q=({size:t=24,color:e="currentColor",...l})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},M.createElement("path",{d:"m9 12 2 2 4.5-4.5m2.401-4.501a2.03 2.03 0 0 0 1.1 1.1l1.744.723a2.033 2.033 0 0 1 1.1 2.656l-.722 1.744a2.03 2.03 0 0 0 0 1.556l.722 1.744a2.033 2.033 0 0 1-1.1 2.656L19 17.901A2.033 2.033 0 0 0 17.9 19l-.723 1.745a2.032 2.032 0 0 1-2.656 1.1l-1.744-.722a2.032 2.032 0 0 0-1.555 0l-1.745.723a2.033 2.033 0 0 1-2.654-1.1L6.1 19.001A2.033 2.033 0 0 0 5 17.9l-1.744-.723a2.033 2.033 0 0 1-1.1-2.654l.721-1.744a2.033 2.033 0 0 0 0-1.556l-.722-1.746a2.033 2.033 0 0 1 1.1-2.657L5 6.098A2.03 2.03 0 0 0 6.1 5l.723-1.745a2.033 2.033 0 0 1 2.656-1.1l1.744.722a2.033 2.033 0 0 0 1.555-.001l1.746-.72a2.032 2.032 0 0 1 2.655 1.1l.723 1.746v-.003Z"}));Q.displayName="CheckVerified02";function Ae(t){const e=t.title||t.server.title||t.id||"Unnamed Item",l=t.server.description||null,m=t.server.icons?.[0]?.src||je(t.server.repository)||null,r=t._meta?.["mcp.mesh"]?.verified??!1,h=t.server.version,a=(t.server.remotes?.length??0)>0;let c=e,i=null;if(e.includes("/")){const n=e.split("/");n.length>=2&&(i=n[0]||null,c=Ce(e))}if(!i){const n=t._meta?.["mcp.mesh"]?.scopeName,o=t._meta?.["mcp.mesh"]?.appName;n&&o?i=`${n}/${o}`:n&&(i=n)}return{icon:m,scopeName:i,displayName:c,description:l,version:h||null,isVerified:r,canInstall:a}}function Ke(t){const e=T.c(39),{icon:l,scopeName:m,displayName:r,description:h,isVerified:d,canInstall:a,onClick:c}=t;let i;e[0]!==r||e[1]!==l?(i=s.jsx(re,{icon:l,name:r,size:"md",className:"shadow-sm"}),e[0]=r,e[1]=l,e[2]=i):i=e[2];let n;e[3]!==r?(n=s.jsx("span",{className:"truncate",children:r}),e[3]=r,e[4]=n):n=e[4];let o;e[5]!==d?(o=d&&s.jsx(Q,{size:16,className:"text-success shrink-0"}),e[5]=d,e[6]=o):o=e[6];let f;e[7]!==a?(f=!a&&s.jsx(se,{size:16,className:"text-muted-foreground shrink-0"}),e[7]=a,e[8]=f):f=e[8];let p;e[9]!==n||e[10]!==o||e[11]!==f?(p=s.jsx(de,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2 text-base font-medium min-w-0",children:[n,o,f]})}),e[9]=n,e[10]=o,e[11]=f,e[12]=p):p=e[12];let u;e[13]!==r?(u=s.jsx("p",{children:r}),e[13]=r,e[14]=u):u=e[14];let g;e[15]!==a?(g=!a&&s.jsx("p",{className:"text-xs mt-1",children:"No connection available"}),e[15]=a,e[16]=g):g=e[16];let v;e[17]!==u||e[18]!==g?(v=s.jsxs(me,{children:[u,g]}),e[17]=u,e[18]=g,e[19]=v):v=e[19];let y;e[20]!==p||e[21]!==v?(y=s.jsxs(fe,{children:[p,v]}),e[20]=p,e[21]=v,e[22]=y):y=e[22];let C;e[23]!==m?(C=m&&s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:m}),e[23]=m,e[24]=C):C=e[24];let S;e[25]!==C||e[26]!==y?(S=s.jsx("div",{className:"flex gap-2 items-start min-w-0 flex-1",children:s.jsxs("div",{className:"min-w-0 flex-1",children:[y,C]})}),e[25]=C,e[26]=y,e[27]=S):S=e[27];let w;e[28]!==i||e[29]!==S?(w=s.jsxs("div",{className:"flex gap-3",children:[i,S]}),e[28]=i,e[29]=S,e[30]=w):w=e[30];const P=h||"No description available";let j;e[31]!==P?(j=s.jsx("div",{className:"grid grid-cols-1 gap-1 min-w-0",children:s.jsx("div",{className:"text-sm text-muted-foreground line-clamp-2",children:P})}),e[31]=P,e[32]=j):j=e[32];let x;e[33]!==w||e[34]!==j?(x=s.jsxs("div",{className:"flex flex-col gap-4 h-full relative",children:[w,j]}),e[33]=w,e[34]=j,e[35]=x):x=e[35];let b;return e[36]!==c||e[37]!==x?(b=s.jsx(ve,{className:"p-6 cursor-pointer hover:bg-muted/50 transition-colors",onClick:c,children:x}),e[36]=c,e[37]=x,e[38]=b):b=e[38],b}function B(t){const e=T.c(12),{items:l,title:m,onItemClick:r}=t;if(l.length===0)return null;let h;e[0]!==m?(h=m&&s.jsx("div",{className:"flex items-center justify-between w-max gap-2",children:s.jsx("h2",{className:"text-lg font-medium",children:m})}),e[0]=m,e[1]=h):h=e[1];let d;if(e[2]!==l||e[3]!==r){let i;e[5]!==r?(i=n=>{const o=Ae(n);return s.jsx(Ke,{...o,onClick:()=>r(n)},n.id)},e[5]=r,e[6]=i):i=e[6],d=l.map(i),e[2]=l,e[3]=r,e[4]=d}else d=e[4];let a;e[7]!==d?(a=s.jsx("div",{className:"grid grid-cols-4 gap-4",children:d}),e[7]=d,e[8]=a):a=e[8];let c;return e[9]!==h||e[10]!==a?(c=s.jsxs("div",{className:"flex flex-col gap-4",children:[h,a]}),e[9]=h,e[10]=a,e[11]=c):c=e[11],c}function Oe(t,e){if(!e)return t;const l=e.toLowerCase();return t.filter(m=>(m.name||m.title||"").toLowerCase().includes(l)||(m.description||m.server.description||"").toLowerCase().includes(l))}function Fe(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0||t.server._meta?.["mcp.mesh"]?.verified===!0}function De(t){const e=T.c(32),{items:l,isLoadingMore:m,registryId:r,hasMore:h,onLoadMore:d}=t,a=m===void 0?!1:m,c=h===void 0?!1:h,[i,n]=M.useState(""),o=q(),{org:f}=D(),p=M.useRef(null);let u,g,v;e[0]!==l||e[1]!==i?(u=Oe(l,i),v=u.filter(Fe),g=u.filter(R=>!v.find(I=>I.id===R.id)),e[0]=l,e[1]=i,e[2]=u,e[3]=g,e[4]=v):(u=e[2],g=e[3],v=e[4]);const y=g;let C;e[5]!==o||e[6]!==f.slug||e[7]!==r?(C=R=>{const I=ue(R.name||R.title||R.server.title||""),L=R.server.name;o({to:"/$org/store/$appName",params:{org:f.slug,appName:I},search:{registryId:r,serverName:L}})},e[5]=o,e[6]=f.slug,e[7]=r,e[8]=C):C=e[8];const S=C;let w;e[9]!==c||e[10]!==a||e[11]!==d||e[12]!==i?(w=R=>{if(!c||!d||i||a)return;const I=R.currentTarget;I.scrollHeight-I.scrollTop-I.clientHeight<200&&d()},e[9]=c,e[10]=a,e[11]=d,e[12]=i,e[13]=w):w=e[13];const P=w;let j;e[14]===Symbol.for("react.memo_cache_sentinel")?(j=R=>{R.key==="Enter"&&n(R.currentTarget.value)},e[14]=j):j=e[14];let x;e[15]!==i?(x=s.jsx(ge,{value:i,onChange:n,placeholder:"Search for an MCP Server...",onKeyDown:j}),e[15]=i,e[16]=x):x=e[16];let b;e[17]!==y||e[18]!==u||e[19]!==S||e[20]!==c||e[21]!==a||e[22]!==l.length||e[23]!==i||e[24]!==v?(b=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:l.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(he,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):i&&u.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(xe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[v.length>0&&s.jsx(B,{items:v,title:"Verified",onItemClick:S}),y.length>0&&s.jsx(B,{items:y,title:v.length>0?"All":"",onItemClick:S}),c&&!i&&a&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(z,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[17]=y,e[18]=u,e[19]=S,e[20]=c,e[21]=a,e[22]=l.length,e[23]=i,e[24]=v,e[25]=b):b=e[25];let k;e[26]!==P||e[27]!==b?(k=s.jsx("div",{ref:p,className:"flex-1 overflow-y-auto",onScroll:P,children:b}),e[26]=P,e[27]=b,e[28]=k):k=e[28];let E;return e[29]!==x||e[30]!==k?(E=s.jsxs("div",{className:"flex flex-col h-full",children:[x,k]}),e[29]=x,e[30]=k,e[31]=E):E=e[31],E}const F=24;function ze(t){const e=T.c(27),{registryId:l}=t,m=oe(l);let r,h,d,a;if(e[0]!==m?.tools||e[1]!==l){if(r=Ne(m?.tools),!r)throw new Error("This registry does not support listing store items.");let x;e[6]!==l?(x=ae(l),e[6]=l,e[7]=x):x=e[7],a=x,d=Me,h=J.toolCall(l,r,JSON.stringify({limit:F})),e[0]=m?.tools,e[1]=l,e[2]=r,e[3]=h,e[4]=d,e[5]=a}else r=e[2],h=e[3],d=e[4],a=e[5];let c;e[8]!==r||e[9]!==a?(c=async x=>{const{pageParam:b}=x;return await a(r,b?{cursor:b,limit:F}:{limit:F})},e[8]=r,e[9]=a,e[10]=c):c=e[10];let i;e[11]!==h||e[12]!==c?(i={queryKey:h,queryFn:c,initialPageParam:void 0,getNextPageParam:_e,staleTime:36e5},e[11]=h,e[12]=c,e[13]=i):i=e[13];const{data:n,fetchNextPage:o,hasNextPage:f,isFetchingNextPage:p}=d(i);let u;e:{if(!n?.pages||n.pages.length===0){u=null;break e}const x=n.pages[0];if(typeof x=="object"&&x!==null&&"totalCount"in x&&typeof x.totalCount=="number"){u=x.totalCount;break e}u=null}const g=u,v=n?.pages;let y;e[14]!==v?(y=ye(v),e[14]=v,e[15]=y):y=e[15];const C=y;let S;e[16]!==o||e[17]!==f||e[18]!==p?(S=()=>{f&&!p&&o()},e[16]=o,e[17]=f,e[18]=p,e[19]=S):S=e[19];const w=S,P=f??!1;let j;return e[20]!==C||e[21]!==w||e[22]!==p||e[23]!==l||e[24]!==P||e[25]!==g?(j=s.jsx(De,{items:C,isLoadingMore:p,registryId:l,hasMore:P,onLoadMore:w,totalCount:g}),e[20]=C,e[21]=w,e[22]=p,e[23]=l,e[24]=P,e[25]=g,e[26]=j):j=e[26],j}function _e(t){if(typeof t=="object"&&t!==null){const e=t.nextCursor||t.cursor;if(e)return e}}function Be(t){const e=T.c(15),{registries:l,value:m,onValueChange:r,onAddWellKnown:h,wellKnownRegistries:d,placeholder:a}=t,c=a===void 0?"Select a registry...":a;let i;e[0]!==c?(i=s.jsx(be,{className:"w-[200px] h-8!",children:s.jsx(Se,{placeholder:c})}),e[0]=c,e[1]=i):i=e[1];let n;e[2]!==l?(n=l.map(Ve),e[2]=l,e[3]=n):n=e[3];let o;e[4]!==h||e[5]!==d?(o=d.length>0&&s.jsxs("div",{className:"border-t border-border pt-1",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),d.map(u=>s.jsxs("button",{onClick:g=>{g.preventDefault(),g.stopPropagation(),h(u)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-xl py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[u.icon?s.jsx("img",{src:u.icon,alt:u.title,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:u.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:u.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(W,{size:16})})]},u.id??u.title))]}),e[4]=h,e[5]=d,e[6]=o):o=e[6];let f;e[7]!==n||e[8]!==o?(f=s.jsxs(Pe,{children:[n,o]}),e[7]=n,e[8]=o,e[9]=f):f=e[9];let p;return e[10]!==r||e[11]!==i||e[12]!==f||e[13]!==m?(p=s.jsxs(Re,{value:m,onValueChange:r,children:[i,f]}),e[10]=r,e[11]=i,e[12]=f,e[13]=m,e[14]=p):p=e[14],p}function Ve(t){return s.jsx(we,{className:"cursor-pointer",value:t.id??t.name,children:s.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?s.jsx("img",{src:t.icon,alt:t.name,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:t.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:t.name})]})},t.id??t.name)}function We(t){const e=T.c(13),{registries:l,onConnected:m}=t,r=l.length===1;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:423,height:279,className:"max-w-full h-auto"}),e[0]=h):h=e[0];const d=r?"Connect to registry":"Connect to a store",a=r?"Connect to discover and use MCP Servers from the community.":"Choose a registry to discover and connect MCP Servers from the community.",c=`grid gap-4 w-full ${r?"grid-cols-1 justify-items-center":"grid-cols-1 md:grid-cols-2"}`;let i;if(e[1]!==m||e[2]!==l){let f;e[4]!==m?(f=(p,u)=>{const g=p.id??`registry-${u}`;return s.jsx(Qe,{registry:{...p,id:g},onConnected:m},g)},e[4]=m,e[5]=f):f=e[5],i=l.map(f),e[1]=m,e[2]=l,e[3]=i}else i=e[3];let n;e[6]!==c||e[7]!==i?(n=s.jsx("div",{className:c,children:i}),e[6]=c,e[7]=i,e[8]=n):n=e[8];let o;return e[9]!==d||e[10]!==a||e[11]!==n?(o=s.jsx(pe,{image:h,title:d,description:a,descriptionClassName:"max-w-[500px]",actionsClassName:"w-full max-w-2xl",actions:n}),e[9]=d,e[10]=a,e[11]=n,e[12]=o):o=e[12],o}function Qe(t){const e=T.c(15),{registry:l,onConnected:m}=t,r=V(),{org:h}=D(),{data:d}=X.useSession(),a=!!h&&!!d?.user?.id;let c;e[0]!==r.create||e[1]!==a||e[2]!==m||e[3]!==l?(c=async()=>{if(!a)return;const u=await r.create.mutateAsync(l);m?.(u.id)},e[0]=r.create,e[1]=a,e[2]=m,e[3]=l,e[4]=c):c=e[4];const i=c,n=!a||r.create.isPending;let o;e[5]!==r.create.isPending?(o=r.create.isPending?s.jsxs(s.Fragment,{children:[s.jsx(z,{className:"animate-spin"}),"Connecting..."]}):s.jsxs(s.Fragment,{children:[s.jsx(W,{}),"Connect"]}),e[5]=r.create.isPending,e[6]=o):o=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==o?(f=s.jsx(ke,{variant:"outline",className:"w-full",disabled:n,onClick:i,children:o}),e[7]=i,e[8]=n,e[9]=o,e[10]=f):f=e[10];let p;return e[11]!==i||e[12]!==l||e[13]!==f?(p=s.jsx(Ie,{connection:l,onClick:i,footer:f,className:"transition-all hover:border-primary/50 hover:shadow-md"}),e[11]=i,e[12]=l,e[13]=f,e[14]=p):p=e[14],p}function Ct(){const t=T.c(41),{org:e}=D(),l=ce(),m=V(),r=ee(),h=r.location.pathname.includes("/store/")&&r.location.pathname.split("/").length>3,d=Ee(l);let a;t[0]!==d?(a=d.map(Ge),t[0]=d,t[1]=a):a=t[1];const c=a;let i;t[2]!==e.slug?(i=Le.selectedRegistry(e.slug),t[2]=e.slug,t[3]=i):i=t[3];const[n,o]=Te(i,He);let f;if(t[4]!==d||t[5]!==n){let N;t[7]!==n?(N=O=>O.id===n,t[7]=n,t[8]=N):N=t[8],f=d.find(N),t[4]=d,t[5]=n,t[6]=f}else f=t[6];const u=f?.id||d[0]?.id||"";let g;t[9]!==e.id?(g=ie(e.id),t[9]=e.id,t[10]=g):g=t[10];let v;t[11]!==g?(v=[g],t[11]=g,t[12]=v):v=t[12];const y=v;let C;t[13]===Symbol.for("react.memo_cache_sentinel")?(C=[le()],t[13]=C):C=t[13];const S=C;let w;t[14]!==m.create||t[15]!==o?(w=async N=>{const O=await m.create.mutateAsync(N);o(O.id)},t[14]=m.create,t[15]=o,t[16]=w):w=t[16];const P=w;let j;t[17]!==d?(j=new Set(d.map(Ue)),t[17]=d,t[18]=j):j=t[18];const x=j;let b;t[19]!==x||t[20]!==y?(b=y.filter(N=>N.id&&!x.has(N.id)),t[19]=x,t[20]=y,t[21]=b):b=t[21];const k=b;let E;t[22]!==x?(E=S.filter(N=>N.id&&!x.has(N.id)),t[22]=x,t[23]=E):E=t[23];const R=E;if(h){let N;return t[24]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(te,{}),t[24]=N):N=t[24],N}let I;t[25]!==P?(I=async N=>P(N),t[25]=P,t[26]=I):I=t[26];let L;t[27]!==k||t[28]!==u||t[29]!==c||t[30]!==o||t[31]!==I?(L=s.jsx(ne,{title:"Store",ctaButton:s.jsx(Be,{wellKnownRegistries:k,registries:c,value:u,onValueChange:o,onAddWellKnown:I,placeholder:"Select store..."})}),t[27]=k,t[28]=u,t[29]=c,t[30]=o,t[31]=I,t[32]=L):L=t[32];let A;t[33]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(z,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[33]=A):A=t[33];let $;t[34]!==R||t[35]!==u||t[36]!==o?($=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx(M.Suspense,{fallback:A,children:u?s.jsx(ze,{registryId:u}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(We,{registries:R,onConnected:N=>{o(N)}})})})}),t[34]=R,t[35]=u,t[36]=o,t[37]=$):$=t[37];let K;return t[38]!==L||t[39]!==$?(K=s.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[L,$]}),t[38]=L,t[39]=$,t[40]=K):K=t[40],K}function Ue(t){return t.id}function He(){return""}function Ge(t){return{id:t.id,name:t.title,icon:t.icon||void 0}}export{Ct as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as q,c as _,j as s,a5 as ve,d as ke,b as Se,a as Ie,a6 as he}from"./index-Dbugj1Qf.js";import{i as _e}from"./AlertCircle-VUVelpvY.js";import{i as je}from"./Loading01-Dp6sT3Mq.js";import{B as ie}from"./button-eIETQb0Y.js";import{i as Le}from"./ArrowLeft-B4oC_h6K.js";import{I as ye,d as Ae,b as De,a as Ee,c as Me}from"./use-connection-BcR9UFbs.js";import{i as Ue}from"./CheckCircle-DH6YWObN.js";import{t as Ve}from"./ChevronDown-CLC0yxsk.js";import{s as ge}from"./Plus-LcofPC9C.js";import{b as $e,D as Pe,a as Re,d as ze}from"./dropdown-menu-DKiYuSii.js";import{n as be}from"./LinkExternal01-jU0XrMVD.js";import{E as Be}from"./SearchMd-3u9z3FIP.js";import{R as Ge,T as Fe,a as Oe}from"./resource-tabs-DMxDPvak.js";import{a as He}from"./use-binding-FqyuxtmF.js";import{u as We}from"./use-tool-call-rEALkXUX.js";import{u as Ke}from"./use-mcp-BHfi5-go.js";import{u as Ne}from"./tooltip-C_Is8XE4.js";import{e as Ze}from"./extract-connection-data-DNQ4aWdY.js";import{s as qe}from"./slugify-CEUa2lfQ.js";import{f as Je,e as Qe,b as Xe,c as Ye,g as et}from"./registry-utils-ulDDT0d8.js";import{e as tt}from"./app-name-gTETL9So.js";import{i as st}from"./InfoCircle-BBnXokyi.js";import"./utils-C9RgqtL7.js";import"./ChevronRight-YHVS_LDJ.js";import"./useQuery-BrB4rOUi.js";import"./File06-sb4CceKn.js";import"./collection-display-button--hU2cKng.js";import"./collection-search-uhjPIekp.js";import"./input-BWvhkgtS.js";import"./collection-table-wrapper-DqGkk2i2.js";import"./card-BeaxjjFM.js";import"./layout-CX25ELhh.js";import"./badge-gmsvp75V.js";import"./auth-C8rltTUE.js";import"./generate-id-Dyweu44Y.js";const we=({size:t=24,color:e="currentColor",...o})=>q.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},q.createElement("path",{d:"m21 21-3.5-3.5m2.5-6a8.5 8.5 0 1 1-17 0 8.5 8.5 0 0 1 17 0Z"}));we.displayName="SearchLg";function ot(t){const e=_.c(3),{message:o}=t,n=o===void 0?"Loading app details...":o;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(je,{size:48,className:"animate-spin mb-4"}),e[0]=r):r=e[0];let i;return e[1]!==n?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[r,s.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),e[1]=n,e[2]=i):i=e[2],i}function rt(t){const e=_.c(9),{error:o,onBack:n}=t,r=o instanceof Error?o.message:o;let i,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(_e,{size:48,className:"text-destructive mb-4"}),d=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading app"}),e[0]=i,e[1]=d):(i=e[0],d=e[1]);let a;e[2]!==r?(a=s.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:r}),e[2]=r,e[3]=a):a=e[3];let l;e[4]!==n?(l=s.jsx("button",{onClick:n,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back"}),e[4]=n,e[5]=l):l=e[5];let m;return e[6]!==a||e[7]!==l?(m=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[i,d,a,l]}),e[6]=a,e[7]=l,e[8]=m):m=e[8],m}function nt(t){const e=_.c(5),{onBack:o}=t;let n,r,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(we,{size:48,className:"text-muted-foreground mb-4"}),r=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"App not found"}),i=s.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:"The app you're looking for doesn't exist in this store."}),e[0]=n,e[1]=r,e[2]=i):(n=e[0],r=e[1],i=e[2]);let d;return e[3]!==o?(d=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n,r,i,s.jsx("button",{onClick:o,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back to Store"})]}),e[3]=o,e[4]=d):d=e[4],d}function it(t){const e=_.c(3),{onBack:o}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Le,{}),e[0]=n):n=e[0];let r;return e[1]!==o?(r=s.jsx("div",{className:"flex items-center h-12 border-b border-border shrink-0",children:s.jsx("div",{className:"flex h-full px-2 border-r items-center",children:s.jsx(ie,{variant:"ghost",size:"icon",className:"items-center size-8 text-muted-foreground",onClick:o,"aria-label":"Go back",children:n})})}),e[1]=o,e[2]=r):r=e[2],r}function lt(t){const e=_.c(25),{data:o,itemVersions:n,onInstall:r,canInstall:i,isInstalling:d}=t,a=i===void 0?!0:i,l=d===void 0?!1:d,[m,p]=q.useState(0);let x;e[0]!==r?(x=S=>{p(S),r(S)},e[0]=r,e[1]=x):x=e[1];const f=x;let h;e[2]!==o.icon||e[3]!==o.name?(h=s.jsx(ye,{icon:o.icon,name:o.name,size:"lg",className:"shrink-0 shadow-sm"}),e[2]=o.icon,e[3]=o.name,e[4]=h):h=e[4];let g;e[5]!==o.name?(g=s.jsx("h1",{className:"text-3xl font-medium",children:o.name}),e[5]=o.name,e[6]=g):g=e[6];let b;e[7]!==o.verified?(b=o.verified&&s.jsx("img",{src:"/verified-badge.svg",alt:"Verified",className:"w-5 h-5 shrink-0"}),e[7]=o.verified,e[8]=b):b=e[8];let y;e[9]!==g||e[10]!==b?(y=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsxs("div",{className:"flex items-center gap-2",children:[g,b]})}),e[9]=g,e[10]=b,e[11]=y):y=e[11];let N;e[12]!==a||e[13]!==f||e[14]!==l||e[15]!==n||e[16]!==r||e[17]!==m?(N=a?s.jsx("div",{className:"shrink-0",children:n.length>1?s.jsxs("div",{className:"flex",children:[s.jsxs(ie,{variant:"brand",onClick:()=>f(0),disabled:l,className:"shrink-0 rounded-r-none cursor-pointer",children:[s.jsx(ge,{size:20}),l?"Connecting...":"Connect MCP Server"]}),s.jsxs($e,{children:[s.jsx(Pe,{asChild:!0,children:s.jsx(ie,{variant:"brand",disabled:l,className:"shrink-0 rounded-l-none px-2 border-l-2 border-l-white/50 cursor-pointer",children:s.jsx(Ve,{size:20})})}),s.jsx(Re,{align:"end",className:"w-56 max-h-[300px] overflow-y-auto",children:n.map((S,C)=>{const I=S._meta?.["io.modelcontextprotocol.registry/official"];return s.jsx(ze,{onClick:()=>f(C),disabled:l,className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center justify-between gap-2 w-full",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"font-medium text-sm",children:["v",S.server?.version||"unknown"]}),I?.isLatest&&s.jsx("div",{className:"text-xs text-muted-foreground/50 font-semibold",children:"LATEST"})]}),C===m&&s.jsx(Ue,{size:16,className:"text-muted-foreground shrink-0"})]})},C)})})]})]}):s.jsxs(ie,{variant:"brand",onClick:()=>r(),disabled:n.length===0||l,className:"shrink-0",children:[s.jsx(ge,{size:20}),l?"Connecting...":"Connect MCP Server"]})}):s.jsx("div",{className:"shrink-0 px-4 py-2 text-sm text-muted-foreground bg-muted rounded-lg",children:"Cannot be connected"}),e[12]=a,e[13]=f,e[14]=l,e[15]=n,e[16]=r,e[17]=m,e[18]=N):N=e[18];let w;e[19]!==y||e[20]!==N?(w=s.jsxs("div",{className:"flex-1 min-w-0 flex items-center justify-between",children:[y,N]}),e[19]=y,e[20]=N,e[21]=w):w=e[21];let k;return e[22]!==h||e[23]!==w?(k=s.jsxs("div",{className:"flex items-center gap-4 py-8 px-5 border-b border-border",children:[h,w]}),e[22]=h,e[23]=w,e[24]=k):k=e[24],k}function at(t){if(!t)return"—";try{const e=new Date(t);return isNaN(e.getTime())?"—":e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function ct(t){const e=_.c(45),{data:o,publisherInfo:n,selectedItem:r}=t;let i;e[0]!==o.description?(i=o.description&&s.jsxs("div",{className:"px-5 pb-5 border-b border-border",children:[s.jsx("h2",{className:"text-base font-medium mb-3",children:"Overview"}),s.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:o.description})]}),e[0]=o.description,e[1]=i):i=e[1];const d=o.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":o.publisher;let a;e[2]!==n.logo||e[3]!==d?(a=s.jsx(ye,{icon:n.logo,name:d,size:"sm",className:"shrink-0 shadow-sm"}),e[2]=n.logo,e[3]=d,e[4]=a):a=e[4];let l;e[5]!==o.publisher?(l=o.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":o.publisher.charAt(0).toUpperCase()+o.publisher.slice(1),e[5]=o.publisher,e[6]=l):l=e[6];let m;e[7]!==l?(m=s.jsx("div",{className:"font-medium",children:l}),e[7]=l,e[8]=m):m=e[8];let p;e[9]!==n.count?(p=n.count>0?s.jsxs(s.Fragment,{children:[s.jsx("img",{src:"/globe.svg",alt:"globe",className:"w-3 h-3"}),s.jsxs("span",{children:[n.count," ",n.count===1?"published app":"published apps"]})]}):"Publisher",e[9]=n.count,e[10]=p):p=e[10];let x;e[11]!==p?(x=s.jsx("div",{className:"text-xs text-muted-foreground flex items-center gap-1",children:p}),e[11]=p,e[12]=x):x=e[12];let f;e[13]!==m||e[14]!==x?(f=s.jsxs("div",{children:[m,x]}),e[13]=m,e[14]=x,e[15]=f):f=e[15];let h;e[16]!==a||e[17]!==f?(h=s.jsx("div",{className:"px-5 border-b border-border",children:s.jsxs("div",{className:"flex items-center gap-3 py-5",children:[a,f]})}),e[16]=a,e[17]=f,e[18]=h):h=e[18];let g;e[19]!==o.version?(g=o.version&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Version"}),s.jsxs("span",{className:"text-muted-foreground uppercase text-xs",children:["v",o.version]})]}),e[19]=o.version,e[20]=g):g=e[20];let b;e[21]!==o.connectionType?(b=o.connectionType&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Connection Type"}),s.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:o.connectionType})]}),e[21]=o.connectionType,e[22]=b):b=e[22];let y;e[23]!==o.schemaVersion?(y=o.schemaVersion&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Schema Version"}),s.jsx("span",{className:"text-muted-foreground text-xs",children:o.schemaVersion})]}),e[23]=o.schemaVersion,e[24]=y):y=e[24];let N;e[25]!==o.websiteUrl?(N=o.websiteUrl&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Website"}),s.jsxs("a",{href:o.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[s.jsx("span",{children:"Visit"}),s.jsx(be,{size:14})]})]}),e[25]=o.websiteUrl,e[26]=N):N=e[26];let w;e[27]!==o.repository?(w=o.repository?.url&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-foreground text-sm",children:"Source"}),s.jsxs("a",{href:o.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[s.jsx("span",{children:"GitHub"}),s.jsx(be,{size:14})]})]}),e[27]=o.repository,e[28]=w):w=e[28];let k;e[29]!==g||e[30]!==b||e[31]!==y||e[32]!==N||e[33]!==w?(k=s.jsxs("div",{className:"px-5 py-5 border-b border-border space-y-4",children:[g,b,y,N,w]}),e[29]=g,e[30]=b,e[31]=y,e[32]=N,e[33]=w,e[34]=k):k=e[34];let S;e[35]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("span",{className:"text-foreground text-sm",children:"Last Updated"}),e[35]=S):S=e[35];let C;e[36]!==r.updated_at?(C=at(r.updated_at),e[36]=r.updated_at,e[37]=C):C=e[37];let I;e[38]!==C?(I=s.jsxs("div",{className:"px-5 py-5 text-sm flex justify-between items-center border-b border-border",children:[S,s.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:C})]}),e[38]=C,e[39]=I):I=e[39];let u;return e[40]!==i||e[41]!==k||e[42]!==I||e[43]!==h?(u=s.jsxs("div",{className:"lg:col-span-1 flex flex-col pt-5",children:[i,h,k,I]}),e[40]=i,e[41]=k,e[42]=I,e[43]=h,e[44]=u):u=e[44],u}function dt(t){const e=_.c(18),{data:o,availableTabs:n,effectiveActiveTabId:r,effectiveTools:i,isLoadingTools:d,onTabChange:a}=t,l=d===void 0?!1:d;let m;e[0]!==i?(m=i.map(mt),e[0]=i,e[1]=m):m=e[1];const p=m;let x;e[2]!==n||e[3]!==r||e[4]!==a?(x=n.length>0&&s.jsx("div",{className:"px-4 py-2 border-b border-border bg-background",children:s.jsx(Ge,{tabs:n,activeTab:r,onTabChange:a})}),e[2]=n,e[3]=r,e[4]=a,e[5]=x):x=e[5];let f;e[6]!==r||e[7]!==i.length||e[8]!==l||e[9]!==p?(f=r==="tools"&&s.jsx("div",{className:"flex flex-col flex-1",children:l?s.jsxs("div",{className:"flex items-center justify-center p-8",children:[s.jsx(je,{size:24,className:"animate-spin"}),s.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:"Loading tools..."})]}):i.length>0?s.jsx(Fe,{tools:p,showToolbar:!1,emptyMessage:"This app doesn't have any tools."}):s.jsx(Be,{image:null,title:"No tools available",description:"This app doesn't have any tools."})}),e[6]=r,e[7]=i.length,e[8]=l,e[9]=p,e[10]=f):f=e[10];let h;e[11]!==o?.repository||e[12]!==r?(h=r==="readme"&&s.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:s.jsx(Oe,{repository:o?.repository})}),e[11]=o?.repository,e[12]=r,e[13]=h):h=e[13];let g;return e[14]!==x||e[15]!==f||e[16]!==h?(g=s.jsxs("div",{className:"lg:col-span-2 flex flex-col border-l border-border",children:[x,f,h]}),e[14]=x,e[15]=f,e[16]=h,e[17]=g):g=e[17],g}function mt(t){const e=t;return{name:e.name||"",description:e.description||void 0}}function ft(t,e){if(!t||!e)return;const o=e.toLowerCase();return t.find(n=>n.app_name?.toLowerCase()===o||n.app_id?.toLowerCase()===o||n.title.toLowerCase()===o)||t.find(n=>n.title.toLowerCase().includes(o))}function ut(t,e,o,n,r){if(!e||e==="Unknown")return{count:0};if(e==="io.modelcontextprotocol.registry/official")return{logo:n?.icon||void 0,count:r??t.length};const i=e.toLowerCase(),d=t.filter(l=>(l._meta?.["io.modelcontextprotocol.registry/official"]?"io.modelcontextprotocol.registry/official":l.publisher||l._meta?.["mcp.mesh"]?.scopeName||"Unknown").toLowerCase()===i);return{logo:o?.icon||d[0]?.publisher_logo||d[0]?.icon||void 0,count:d.length}}function pt(t){const e=t.server._meta?.["mcp.mesh/publisher-provided"],o=t._meta?.["mcp.mesh"],n=t._meta?.["io.modelcontextprotocol.registry/official"],r=t.server,i=Xe(r.remotes?.[0]?.type),d=Ye(r.$schema),a=n?"io.modelcontextprotocol.registry/official":t.publisher||o?.scopeName||"Unknown",l=et(r.repository),m=t.icon||t.image||t.logo||r.icons?.[0]?.src||l||null,p=t.name||t.title||t.server?.title||"Unnamed Item";return{name:tt(p),description:t.description||t.summary||t.server?.description||"",icon:m,verified:t.verified||o?.verified,publisher:a,version:r.version||null,websiteUrl:r.websiteUrl||null,repository:r.repository||null,schemaVersion:d??null,connectionType:i,connectionUrl:null,remoteUrl:null,tools:t.tools||r.tools||e?.tools||[],models:t.models||r.models||e?.models||[],emails:t.emails||r.emails||e?.emails||[],analytics:t.analytics||r.analytics||e?.analytics,cdn:t.cdn||r.cdn||e?.cdn}}class xt extends q.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,o){console.error("Store app detail error:",e,o)}render(){return this.state.hasError?s.jsx(rt,{error:this.state.error||new Error("Unknown error"),onBack:this.props.onBack}):this.props.children}}function ht(){const t=_.c(70),{org:e}=Ne(),o=ve();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const{appName:r}=ke(n);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[1]=i):i=t[1];const{registryId:d,serverName:a}=Se(i),[l,m]=q.useState("readme"),p=Ae(),x=De(),{data:f}=Ie.useSession(),h=He(x),g=d||h[0]?.id||"",b=Ee(g),y=Je(b?.tools),N=b?.tools&&b.tools.find(yt)?.name||"",w=b?.tools&&b.tools.find(jt)?.name||"",k=Me(g),S=!!a;let C,I;S?(C=N||w,I={name:a}):(C=y,I={});const{data:u}=We({toolCaller:k,toolName:C,toolInputParams:I,scope:g});let E=[],L=[],pe=null;if(u){if(Array.isArray(u))E=u;else if(typeof u=="object"&&u!==null)if("totalCount"in u&&typeof u.totalCount=="number"&&(pe=u.totalCount),"item"in u&&u.item){const c=u.item,T=c.id||"",M=c.server,U=c._meta;let D;t[2]!==c.title||t[3]!==T||t[4]!==M||t[5]!==U?(D=[{id:T,title:c.title,server:M,_meta:U}],t[2]=c.title,t[3]=T,t[4]=M,t[5]=U,t[6]=D):D=t[6],E=D}else{let c;"versions"in u&&Array.isArray(u.versions)?c="versions":"servers"in u&&Array.isArray(u.servers)?c="servers":c=Object.keys(u).find(T=>Array.isArray(u[T])),c&&(E=u[c],(c==="versions"||C?.includes("VERSIONS"))&&(L=E))}}let X;t[7]!==r?(X=c=>{const T=c.name||c.title||c.server.title||"";return qe(T)===r},t[7]=r,t[8]=X):X=t[8];let j=E.find(X);if(!j&&a){let c;t[9]!==a?(c=T=>T.server.name===a||T.name===a||T.title===a,t[9]=a,t[10]=c):c=t[10],j=E.find(c)}const v=j?pt(j):null,le=(v?.tools?.length||0)>0,ae=j?.server?.remotes?.[0]?.url||null,J=!le&&!!ae,Q=Ke({url:J?ae:""}),Y=J&&Q.state==="connecting";let ee;t[11]!==Q||t[12]!==J?(ee=J&&Q.state==="ready"?(Q.tools||[]).map(vt):[],t[11]=Q,t[12]=J,t[13]=ee):ee=t[13];const xe=ee,V=le?v?.tools||[]:xe,Ce=ft(x,v?.publisher),ce=v?ut(E,v.publisher,Ce,b??null,pe):{count:0},Te=v?.repository?Qe(v.repository):null,de=!!v?.repository&&!!Te;let $;t[14]!==de?($={id:"readme",label:"README",visible:de},t[14]=de,t[15]=$):$=t[15];const me=le||xe.length>0||Y&&!!ae;let P;t[16]!==V.length||t[17]!==me?(P={id:"tools",label:"Tools",count:V.length,visible:me},t[16]=V.length,t[17]=me,t[18]=P):P=t[18];let te;t[19]!==$||t[20]!==P?(te=[$,P].filter(bt),t[19]=$,t[20]=P,t[21]=te):te=t[21];const A=te;let se;t[22]!==l||t[23]!==A?(se=A.find(c=>c.id===l)?l:A.find(gt)?.id||A[0]?.id||"overview",t[22]=l,t[23]=A,t[24]=se):se=t[24];const fe=se;let oe;t[25]!==p||t[26]!==L||t[27]!==o||t[28]!==e||t[29]!==j||t[30]!==f?(oe=async c=>{const T=L[c??0]||j;if(!T||!e||!f?.user?.id)return;const M=Ze(T,e.id,f.user.id);if(!M.connection_url){he.error("This MCP Server cannot be connected: no connection URL available");return}try{const{id:U}=await p.create.mutateAsync(M);o({to:"/$org/mcps/$connectionId",params:{org:e.slug,connectionId:U}})}catch(U){const D=U;he.error(`Failed to connect MCP Server: ${D instanceof Error?D.message:String(D)}`)}},t[25]=p,t[26]=L,t[27]=o,t[28]=e,t[29]=j,t[30]=f,t[31]=oe):oe=t[31];const ue=oe;let re;t[32]!==o||t[33]!==e.slug?(re=()=>{o({to:"/$org/store",params:{org:e.slug}})},t[32]=o,t[33]=e.slug,t[34]=re):re=t[34];const R=re;if(!j){let c;return t[35]!==R?(c=s.jsx(nt,{onBack:R}),t[35]=R,t[36]=c):c=t[36],c}if(!v)return null;const z=(j?.server?.remotes?.length??0)>0;let B;t[37]!==R?(B=s.jsx(it,{onBack:R}),t[37]=R,t[38]=B):B=t[38];let G;t[39]!==z?(G=!z&&s.jsxs("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-900",children:[s.jsx(st,{size:16,className:"inline mr-2"}),"This MCP Server cannot be connected - no connection method available."]}),t[39]=z,t[40]=G):G=t[40];let F;t[41]!==L||t[42]!==j?(F=L.length>0?L:[j],t[41]=L,t[42]=j,t[43]=F):F=t[43];let O;t[44]!==p.create.isPending||t[45]!==z||t[46]!==v||t[47]!==ue||t[48]!==F?(O=s.jsx(lt,{data:v,itemVersions:F,onInstall:ue,canInstall:z,isInstalling:p.create.isPending}),t[44]=p.create.isPending,t[45]=z,t[46]=v,t[47]=ue,t[48]=F,t[49]=O):O=t[49];let H;t[50]!==v||t[51]!==ce||t[52]!==j?(H=s.jsx(ct,{data:v,publisherInfo:ce,selectedItem:j}),t[50]=v,t[51]=ce,t[52]=j,t[53]=H):H=t[53];let W;t[54]!==A||t[55]!==v||t[56]!==fe||t[57]!==V||t[58]!==Y?(W=s.jsx(dt,{data:v,availableTabs:A,effectiveActiveTabId:fe,effectiveTools:V,isLoadingTools:Y,onTabChange:m}),t[54]=A,t[55]=v,t[56]=fe,t[57]=V,t[58]=Y,t[59]=W):W=t[59];let K;t[60]!==H||t[61]!==W?(K=s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 min-h-[677px]",children:[H,W]}),t[60]=H,t[61]=W,t[62]=K):K=t[62];let Z;t[63]!==G||t[64]!==O||t[65]!==K?(Z=s.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:s.jsx("div",{className:"h-full",children:s.jsxs("div",{className:"h-full",children:[G,O,K]})})}),t[63]=G,t[64]=O,t[65]=K,t[66]=Z):Z=t[66];let ne;return t[67]!==B||t[68]!==Z?(ne=s.jsxs("div",{className:"flex flex-col h-full border-l border-border",children:[B,Z]}),t[67]=B,t[68]=Z,t[69]=ne):ne=t[69],ne}function gt(t){return t.id==="readme"}function bt(t){return t.visible}function vt(t){return{name:t.name,description:t.description}}function jt(t){return t.name.endsWith("_GET")}function yt(t){return t.name.endsWith("_VERSIONS")}function os(){const t=_.c(6),{org:e}=Ne(),o=ve();let n;t[0]!==o||t[1]!==e.slug?(n=()=>{o({to:"/$org/store",params:{org:e.slug}})},t[0]=o,t[1]=e.slug,t[2]=n):n=t[2];const r=n;let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(q.Suspense,{fallback:s.jsx(ot,{}),children:s.jsx(ht,{})}),t[3]=i):i=t[3];let d;return t[4]!==r?(d=s.jsx(xt,{onBack:r,children:i}),t[4]=r,t[5]=d):d=t[5],d}export{os as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,ax as T,j as i,au as C,
|
|
1
|
+
import{r as c,ax as T,j as i,au as C,aL as y,at as I,av as M,bv as H,bw as z,c as A}from"./index-Dbugj1Qf.js";import{c as g}from"./utils-C9RgqtL7.js";var m="Switch",[L]=T(m),[U,q]=L(m),E=c.forwardRef((s,e)=>{const{__scopeSwitch:t,name:r,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:w,form:l,...k}=s,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=I({prop:a,defaultProp:n??!1,onChange:w,caller:m});return i.jsxs(U,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...k,ref:v,onClick:M(s.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((s,e)=>{const{__scopeSwitch:t,...r}=s,a=q(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:s,control:e,checked:t,bubbles:r=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=H(t),w=z(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const k=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(k,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(s){return s?"checked":"unchecked"}var $=E,D=R;function X(s){const e=A.c(9);let t,r;e[0]!==s?({className:t,...r}=s,e[0]=s,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==a?(o=i.jsx($,{"data-slot":"switch",className:a,...r,children:n}),e[6]=r,e[7]=a,e[8]=o):o=e[8],o}export{X as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,j as n}from"./index-
|
|
1
|
+
import{c as o,j as n}from"./index-Dbugj1Qf.js";import{c as l}from"./utils-C9RgqtL7.js";function u(s){const e=o.c(8);let r,i;e[0]!==s?({className:r,...i}=s,e[0]=s,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let t;e[3]!==r?(t=l("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-xl border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),e[3]=r,e[4]=t):t=e[4];let a;return e[5]!==i||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...i}),e[5]=i,e[6]=t,e[7]=a):a=e[7],a}export{u as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as v,c as z,j as t}from"./index-Dbugj1Qf.js";import{I as F,b as R}from"./use-connection-BcR9UFbs.js";import{C as I}from"./checkbox-BO8-3DdS.js";import{B as A}from"./button-eIETQb0Y.js";import{i as U}from"./ArrowLeft-B4oC_h6K.js";import{c as T}from"./utils-C9RgqtL7.js";import{C as V}from"./collection-search-uhjPIekp.js";const q=v.memo(function(S){const e=z.c(21),{connection:o,isSelected:m,hasToolsEnabled:r,activeToolsCount:h,totalToolsCount:p,onSelect:g,onToggle:u}=S,x=m?"bg-accent/50":"hover:bg-muted/50";let i;e[0]!==x?(i=T("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",x),e[0]=x,e[1]=i):i=e[1];let c;e[2]!==o.icon||e[3]!==o.title?(c=t.jsx(F,{icon:o.icon,name:o.title,size:"xs"}),e[2]=o.icon,e[3]=o.title,e[4]=c):c=e[4];let f;e[5]!==o.title?(f=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:o.title})}),e[5]=o.title,e[6]=f):f=e[6];let n;e[7]!==g||e[8]!==c||e[9]!==f?(n=t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:g,children:[c,f]}),e[7]=g,e[8]=c,e[9]=f,e[10]=n):n=e[10];let a;e[11]!==h||e[12]!==o.tools||e[13]!==r||e[14]!==u||e[15]!==p?(a=o.tools&&o.tools.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[h,"/",p]}),t.jsx(I,{checked:r,onCheckedChange:u,onClick:H})]}),e[11]=h,e[12]=o.tools,e[13]=r,e[14]=u,e[15]=p,e[16]=a):a=e[16];let N;return e[17]!==i||e[18]!==n||e[19]!==a?(N=t.jsxs("div",{className:i,children:[n,a]}),e[17]=i,e[18]=n,e[19]=a,e[20]=N):N=e[20],N}),G=v.memo(function(S){const e=z.c(18),{connectionId:o,tool:m,isSelected:r,onToggle:h}=S,p=`tool-${o}-${m.name}`,g=r?"text-foreground":"text-muted-foreground";let u;e[0]!==g?(u=T("text-sm font-medium",g),e[0]=g,e[1]=u):u=e[1];let x;e[2]!==u||e[3]!==m.name?(x=t.jsx("div",{className:"flex items-center gap-2 mb-1",children:t.jsx("span",{className:u,children:m.name})}),e[2]=u,e[3]=m.name,e[4]=x):x=e[4];let i;e[5]!==m.description?(i=m.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:m.description}),e[5]=m.description,e[6]=i):i=e[6];let c;e[7]!==x||e[8]!==i?(c=t.jsxs("div",{className:"flex-1 min-w-0",children:[x,i]}),e[7]=x,e[8]=i,e[9]=c):c=e[9];const f=`tool-${o}-${m.name}`;let n;e[10]!==r||e[11]!==h||e[12]!==f?(n=t.jsx("div",{className:"flex items-center shrink-0",children:t.jsx(I,{id:f,checked:r,onCheckedChange:h,onClick:J})}),e[10]=r,e[11]=h,e[12]=f,e[13]=n):n=e[13];let a;return e[14]!==p||e[15]!==c||e[16]!==n?(a=t.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:p,children:[c,n]}),e[14]=p,e[15]=c,e[16]=n,e[17]=a):a=e[17],a});function ee({toolSet:d,onToolSetChange:S}){const[e,o]=v.useState(""),m=v.useDeferredValue(e),[r,h]=v.useState("all"),[p,g]=v.useState(!1),u=v.useRef(new Set(Object.keys(d))),x=R({searchTerm:m.trim()||void 0}),i=u.current,c=[...i.values()].map(s=>x.find(l=>l.id===s)).filter(s=>s!==void 0),f=x.filter(s=>!i.has(s.id)),n=[...c,...f],a=s=>{const l=d[s];return l!==void 0&&l.length>0},N=n.filter(s=>{if(r==="all")return!0;const l=a(s.id);return r==="selected"?l:r==="unselected"?!l:!0}),[M,$]=v.useState(n[0]?.id??null),b=M?n.find(s=>s.id===M)??null:null,E=b?.tools??[],B=(s,l)=>d[s]?.includes(l)??!1,D=(s,l)=>{const j=d[s]??[],k=j.includes(l),w={...d};if(k){const y=j.filter(C=>C!==l);y.length===0?delete w[s]:w[s]=y}else w[s]=[...j,l];S(w)},O=s=>{const l=n.find(C=>C.id===s);if(!l?.tools)return;const j=d[s]??[],k=l.tools.map(C=>C.name),w=j.length>0&&k.every(C=>j.includes(C)),y={...d};w?delete y[s]:(y[s]=k,$(s)),S(y)},P=s=>{$(s),g(!0)},Q=()=>{g(!1)};return t.jsxs("div",{className:"flex h-full",children:[t.jsxs("div",{className:T("w-full md:w-80 border-r border-border flex flex-col",p&&"hidden md:flex"),children:[t.jsx(V,{value:e,onChange:o,placeholder:"Search MCP Servers..."}),t.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[t.jsx("button",{onClick:()=>h("all"),className:T("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),t.jsx("button",{onClick:()=>h("selected"),className:T("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),t.jsx("button",{onClick:()=>h("unselected"),className:T("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),t.jsx("div",{className:"flex-1 overflow-auto",children:N.length===0?t.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:e?"No connections found":r==="selected"?"No servers selected":r==="unselected"?"No unselected servers":"No connections available"}):t.jsx("div",{className:"p-2 space-y-1",children:N.map(s=>{const l=s.tools?.length??0,j=d[s.id]?.length??0;return t.jsx(q,{connection:s,isSelected:M===s.id,hasToolsEnabled:a(s.id),activeToolsCount:j,totalToolsCount:l,onSelect:()=>P(s.id),onToggle:()=>O(s.id)},s.id)})})})]}),t.jsx("div",{className:T("flex-1 flex-col",p?"flex":"hidden md:flex"),children:b?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[t.jsx(A,{variant:"ghost",size:"sm",onClick:Q,className:"h-8 w-8 p-0 shrink-0",children:t.jsx(U,{size:20})}),t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx(F,{icon:b.icon,name:b.title,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:b.title}),b.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:b.description})]})]})]}),t.jsx("div",{className:"flex-1 overflow-auto p-4",children:E.length===0?t.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"This connection has no tools available"}):t.jsx("div",{className:"space-y-2",children:E.map(s=>t.jsx(G,{connectionId:b.id,tool:s,isSelected:B(b.id,s.name),onToggle:()=>D(b.id,s.name)},s.name))})})]}):t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"Select a connection to view its tools"})})})]})}function H(d){return d.stopPropagation()}function J(d){return d.stopPropagation()}export{ee as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,j as d,au as H,c as j,ax as Z,aO as $,aL as G,aR as ee,av as C,aM as z,aS as te,aY as oe,aZ as re,bP as ne,aQ as se,at as ae,aP as ie,a_ as le}from"./index-Dbugj1Qf.js";import{c as ce}from"./utils-C9RgqtL7.js";var ue=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),de="VisuallyHidden",V=a.forwardRef((o,e)=>d.jsx(H.span,{...o,ref:e,style:{...ue,...o.style}}));V.displayName=de;var pe=V;const fe=({size:o=24,color:e="currentColor",...t})=>a.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},a.createElement("path",{d:"M20 6 9 17l-5-5"}));fe.displayName="Check";const S="org-admin",ve={from({org:o,project:e}){if(o.includes("/")||e.includes("/"))throw new Error("Org or project cannot contain slashes");return`${o}/${e}`},parse(o){o.startsWith("/")&&(o=o.slice(1));const[e,t]=o.split("/");if(!e||!t)throw new Error("Invalid locator");return{org:e,project:t}},isOrgAdminProject(o){return o.split("/")[1]===S},adminProject(o){return`${o}/${S}`}},F=a.createContext(void 0),$e=()=>{const o=a.useContext(F);if(!o)throw new Error("useProjectContext must be used within a ProjectContextProvider");return o},Ge=o=>{const e=j.c(10),{children:t,org:r,project:n}=o;let s;e[0]!==r.slug||e[1]!==n.slug?(s=ve.from({org:r.slug,project:n.slug}),e[0]=r.slug,e[1]=n.slug,e[2]=s):s=e[2];const l=s;let c;e[3]!==l||e[4]!==r||e[5]!==n?(c={org:r,project:n,locator:l},e[3]=l,e[4]=r,e[5]=n,e[6]=c):c=e[6];const i=c;let u;return e[7]!==t||e[8]!==i?(u=d.jsx(F.Provider,{value:i,children:t}),e[7]=t,e[8]=i,e[9]=u):u=e[9],u};var[O]=Z("Tooltip",[$]),L=$(),Y="TooltipProvider",xe=700,D="tooltip.open",[he,A]=O(Y),B=o=>{const{__scopeTooltip:e,delayDuration:t=xe,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=a.useRef(!0),c=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const u=i.current;return()=>window.clearTimeout(u)},[]),d.jsx(he,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:a.useCallback(u=>{c.current=u},[]),disableHoverableContent:n,children:s})};B.displayName=Y;var R="Tooltip",[ge,_]=O(R),U=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=o,i=A(R,o.__scopeTooltip),u=L(e),[p,v]=a.useState(null),x=se(),f=a.useRef(0),h=l??i.disableHoverableContent,m=c??i.delayDuration,g=a.useRef(!1),[y,T]=ae({prop:r,defaultProp:n??!1,onChange:I=>{I?(i.onOpen(),document.dispatchEvent(new CustomEvent(D))):i.onClose(),s?.(I)},caller:R}),b=a.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,T(!0)},[T]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,T(!1)},[T]),M=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,T(!0),f.current=0},m)},[m,T]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),d.jsx(ie,{...u,children:d.jsx(ge,{scope:e,contentId:x,open:y,stateAttribute:b,trigger:p,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?M():P()},[i.isOpenDelayedRef,M,P]),onTriggerLeave:a.useCallback(()=>{h?E():(window.clearTimeout(f.current),f.current=0)},[E,h]),onOpen:P,onClose:E,disableHoverableContent:h,children:t})})};U.displayName=R;var k="TooltipTrigger",W=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(k,t),s=A(k,t),l=L(t),c=a.useRef(null),i=G(e,c,n.onTriggerChange),u=a.useRef(!1),p=a.useRef(!1),v=a.useCallback(()=>u.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),d.jsx(ee,{asChild:!0,...l,children:d.jsx(H.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:C(o.onPointerMove,x=>{x.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),p.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),p.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{u.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});W.displayName=k;var N="TooltipPortal",[me,Te]=O(N,{forceMount:void 0}),q=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(N,e);return d.jsx(me,{scope:e,forceMount:t,children:d.jsx(z,{present:t||s.open,children:d.jsx(te,{asChild:!0,container:n,children:r})})})};q.displayName=N;var w="TooltipContent",X=a.forwardRef((o,e)=>{const t=Te(w,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(w,o.__scopeTooltip);return d.jsx(z,{present:r||l.open,children:l.disableHoverableContent?d.jsx(J,{side:n,...s,ref:e}):d.jsx(ye,{side:n,...s,ref:e})})}),ye=a.forwardRef((o,e)=>{const t=_(w,o.__scopeTooltip),r=A(w,o.__scopeTooltip),n=a.useRef(null),s=G(e,n),[l,c]=a.useState(null),{trigger:i,onClose:u}=t,p=n.current,{onPointerInTransitChange:v}=r,x=a.useCallback(()=>{c(null),v(!1)},[v]),f=a.useCallback((h,m)=>{const g=h.currentTarget,y={x:h.clientX,y:h.clientY},T=Pe(y,g.getBoundingClientRect()),b=Ee(y,T),P=Re(m.getBoundingClientRect()),E=_e([...b,...P]);c(E),v(!0)},[v]);return a.useEffect(()=>()=>x(),[x]),a.useEffect(()=>{if(i&&p){const h=g=>f(g,p),m=g=>f(g,i);return i.addEventListener("pointerleave",h),p.addEventListener("pointerleave",m),()=>{i.removeEventListener("pointerleave",h),p.removeEventListener("pointerleave",m)}}},[i,p,f,x]),a.useEffect(()=>{if(l){const h=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},T=i?.contains(g)||p?.contains(g),b=!je(y,l);T?x():b&&(x(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[i,p,l,u,x]),d.jsx(J,{...o,ref:s})}),[Ce,we]=O(R,{isInside:!1}),be=ne("TooltipContent"),J=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...c}=o,i=_(w,t),u=L(t),{onClose:p}=i;return a.useEffect(()=>(document.addEventListener(D,p),()=>document.removeEventListener(D,p)),[p]),a.useEffect(()=>{if(i.trigger){const v=x=>{x.target?.contains(i.trigger)&&p()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,p]),d.jsx(oe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:p,children:d.jsxs(re,{"data-state":i.stateAttribute,...u,...c,ref:e,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(be,{children:r}),d.jsx(Ce,{scope:t,isInside:!0,children:d.jsx(pe,{id:i.contentId,role:"tooltip",children:n||r})})]})})});X.displayName=w;var K="TooltipArrow",Q=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=L(t);return we(K,t).isInside?null:d.jsx(le,{...n,...r,ref:e})});Q.displayName=K;function Pe(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ee(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function Re(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function je(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const c=e[s],i=e[l],u=c.x,p=c.y,v=i.x,x=i.y;p>r!=x>r&&t<(v-u)*(r-p)/(x-p)+u&&(n=!n)}return n}function _e(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Oe(e)}function Oe(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Le=B,De=U,ke=W,Ae=q,Ne=X,Me=Q;function Ie(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=d.jsx(Le,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function ze(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=d.jsx(Ie,{children:d.jsx(De,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Ve(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=d.jsx(ke,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function Fe(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let c;e[5]!==r?(c=ce("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=c):c=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Me,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=i):i=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==c?(u=d.jsx(Ae,{children:d.jsxs(Ne,{"data-slot":"tooltip-content",sideOffset:l,className:c,...n,children:[t,i]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=c,e[12]=u):u=e[12],u}export{ve as L,S as O,Ge as P,Ve as T,ue as V,Fe as a,ze as b,Ie as c,fe as i,$e as u};
|