@decocms/mesh 1.0.0-alpha.1 → 1.0.0-alpha.12

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.
Files changed (103) hide show
  1. package/dist/README.md +288 -0
  2. package/dist/client/assets/{alert-dialog-DsYjmjQa.js → alert-dialog-Hgs2tcw0.js} +3 -3
  3. package/dist/client/assets/{auth-dQSMuI_r.js → auth-Dfo88onv.js} +1 -1
  4. package/dist/client/assets/{auth-catchall-vTieIyKZ.js → auth-catchall-pzDMkYZ_.js} +1 -1
  5. package/dist/client/assets/{avatar-DFNVHH7B.js → avatar-Dw1KHXJf.js} +1 -1
  6. package/dist/client/assets/{badge-D0svJbIE.js → badge-C29ypR-2.js} +1 -1
  7. package/dist/client/assets/{button-CB7Gt-Ba.js → button-Cv1rgJOF.js} +1 -1
  8. package/dist/client/assets/{card-BZePxfHz.js → card-BggFBtGd.js} +1 -1
  9. package/dist/client/assets/{checkbox-CJwRElzS.js → checkbox-Ay9B68Cb.js} +1 -1
  10. package/dist/client/assets/{circle-alert-FONBIc_T.js → circle-alert-C3-3ZyHM.js} +1 -1
  11. package/dist/client/assets/collection-detail-BihTkJuQ.js +1 -0
  12. package/dist/client/assets/{collection-display-button-Ccjj22Xn.js → collection-display-button-grM851Xd.js} +1 -1
  13. package/dist/client/assets/{collection-header-C3vTyWNy.js → collection-header-DsMf-88h.js} +1 -1
  14. package/dist/client/assets/{collection-page-BplXISpO.js → collection-page-C6Lt30BH.js} +1 -1
  15. package/dist/client/assets/{collection-search-BpPEPb0j.js → collection-search-CXcLRFBk.js} +1 -1
  16. package/dist/client/assets/{collection-table-wrapper-CJdrG443.js → collection-table-wrapper-DIAaiM6K.js} +1 -1
  17. package/dist/client/assets/{connection-card-B7VMSnFz.js → connection-card-BSv7-QCW.js} +1 -1
  18. package/dist/client/assets/connection-detail-B1R8nv6U.js +1 -0
  19. package/dist/client/assets/connections-hz-ahAKO.js +1 -0
  20. package/dist/client/assets/{create-organization-dialog-Mq1L8DSD.js → create-organization-dialog-Bvkdjwsj.js} +1 -1
  21. package/dist/client/assets/dialog-rRH3MQkl.js +1 -0
  22. package/dist/client/assets/{dropdown-menu-zoKN8fKM.js → dropdown-menu-dUgjswGX.js} +1 -1
  23. package/dist/client/assets/{empty-state-BCgOYCyG.js → empty-state-CCq1QaCi.js} +1 -1
  24. package/dist/client/assets/{error-boundary-L4NxoU-J.js → error-boundary-COxhsLlB.js} +1 -1
  25. package/dist/client/assets/{extract-connection-data-mJfi2GDs.js → extract-connection-data-DyKjnzFA.js} +1 -1
  26. package/dist/client/assets/{form-BmhZau8F.js → form-xpLXXjk9.js} +1 -1
  27. package/dist/client/assets/gateway-detail-DIqZF9Yz.js +1 -0
  28. package/dist/client/assets/gateways-BEpD9ssC.js +1 -0
  29. package/dist/client/assets/{home-RT_Ssleq.js → home-BP87nVNG.js} +1 -1
  30. package/dist/client/assets/{icon-Zm7eEeKG.js → icon-KZI-tyY2.js} +1 -1
  31. package/dist/client/assets/{index-CBL6DTCM.js → index-3kbMatbv.js} +15 -15
  32. package/dist/client/assets/{index-CoeZDSQf.js → index-B6JW-QRO.js} +1 -1
  33. package/dist/client/assets/{index-BAut7b_p.js → index-C3w_QZu6.js} +1 -1
  34. package/dist/client/assets/index-CMNfZDn2.css +1 -0
  35. package/dist/client/assets/index-kuMaGV9U.js +118 -0
  36. package/dist/client/assets/{input-DWY0hRYC.js → input-C0U94pom.js} +1 -1
  37. package/dist/client/assets/integration-icon-Dv-2D552.js +2 -0
  38. package/dist/client/assets/{layout-C75gYFRR.js → layout-B4csW0zk.js} +1 -1
  39. package/dist/client/assets/{lazy-highlighter-V_ETf5s5.js → lazy-highlighter-BeM-KnKF.js} +1 -1
  40. package/dist/client/assets/{localstorage-keys-CdMYd__a.js → localstorage-keys-BY-fTuiw.js} +1 -1
  41. package/dist/client/assets/login-Dl_POp8A.js +1 -0
  42. package/dist/client/assets/mcp-oauth-C8lkjJJ-.js +1 -0
  43. package/dist/client/assets/members-sRtGjt4B.js +1 -0
  44. package/dist/client/assets/{monitoring-stats-row-DiSEgwHP.js → monitoring-stats-row-Bmw8lKAo.js} +9 -9
  45. package/dist/client/assets/monitoring-wqV_ck_J.js +1 -0
  46. package/dist/client/assets/oauth-callback-D4bjzxVG.js +1 -0
  47. package/dist/client/assets/page-Dm4c28Rt.js +1 -0
  48. package/dist/client/assets/{popover-B7GJHYd2.js → popover-BLX5hifQ.js} +1 -1
  49. package/dist/client/assets/{prism-BsII3tZL.js → prism-a2E9dRRh.js} +1 -1
  50. package/dist/client/assets/{resource-tabs-Djqhz6PB.js → resource-tabs-C2-m37Rp.js} +1 -1
  51. package/dist/client/assets/{schema-CJRWBwzd.js → schema-DLIeWQJ0.js} +1 -1
  52. package/dist/client/assets/{select-CrueAR2N.js → select-BFyzpZOm.js} +1 -1
  53. package/dist/client/assets/settings-KJAP4FWc.js +1 -0
  54. package/dist/client/assets/{shell-layout-CwcEMEv3.js → shell-layout-DqWy6R9v.js} +4 -4
  55. package/dist/client/assets/{spinner-R42f7AVH.js → spinner-CYHX4tj_.js} +1 -1
  56. package/dist/client/assets/store-DoIp_x0L.js +1 -0
  57. package/dist/client/assets/store-app-detail-CkhxmJHm.js +1 -0
  58. package/dist/client/assets/switch-B0GAK0hk.js +1 -0
  59. package/dist/client/assets/{textarea-CAmjTm6l.js → textarea-7TwZjOJN.js} +1 -1
  60. package/dist/client/assets/tool-set-selector-BxJYXzYX.js +1 -0
  61. package/dist/client/assets/{tooltip-BLbXpJcn.js → tooltip-CyTpNpEt.js} +1 -1
  62. package/dist/client/assets/{upload-CG7PZ6WF.js → upload-CedwcKCT.js} +1 -1
  63. package/dist/client/assets/{use-binding-CeSgmpzj.js → use-binding-Dlf98XSv.js} +2 -2
  64. package/dist/client/assets/use-gateway-C6ADI4VP.js +1 -0
  65. package/dist/client/assets/{use-list-state-BTIryg2o.js → use-list-state-Cu8fsSjR.js} +1 -1
  66. package/dist/client/assets/use-mcp-Z1amXXTK.js +1 -0
  67. package/dist/client/assets/use-members-dDzJ30ii.js +1 -0
  68. package/dist/client/assets/{use-mobile-BPQzOCZP.js → use-mobile-Ct-F04sM.js} +1 -1
  69. package/dist/client/assets/use-organization-settings-D7E3skEu.js +1 -0
  70. package/dist/client/assets/{use-tool-call-BsMTRGjQ.js → use-tool-call-DSlbFKjt.js} +1 -1
  71. package/dist/client/assets/useQuery-DJ7WNdWe.js +1 -0
  72. package/dist/client/assets/utils-dJ2GyoL3.js +1 -0
  73. package/dist/client/index.html +2 -2
  74. package/dist/server/cli.js +169 -169
  75. package/dist/server/migrate.js +204 -204
  76. package/dist/server/server.js +232 -232
  77. package/package.json +18 -19
  78. package/dist/client/assets/chunk-2RRQPJJO-DGhxLrrR.js +0 -1
  79. package/dist/client/assets/collection-detail-CFf2hZjF.js +0 -1
  80. package/dist/client/assets/connection-detail-DGFMHZQW.js +0 -1
  81. package/dist/client/assets/connections-BFxMYtuo.js +0 -1
  82. package/dist/client/assets/dialog-DhrfZsqb.js +0 -1
  83. package/dist/client/assets/gateway-detail-BEN_sL0j.js +0 -1
  84. package/dist/client/assets/gateways-DPfP8fjF.js +0 -1
  85. package/dist/client/assets/index-CfNAXm02.js +0 -1
  86. package/dist/client/assets/index-VCe1FY3E.js +0 -118
  87. package/dist/client/assets/index-feMggVqN.css +0 -1
  88. package/dist/client/assets/integration-icon-Dgf9Pzxc.js +0 -1
  89. package/dist/client/assets/login-CaI2gNh0.js +0 -1
  90. package/dist/client/assets/members-BD990Z5F.js +0 -1
  91. package/dist/client/assets/monitoring-s9rrPP3V.js +0 -1
  92. package/dist/client/assets/oauth-callback-ChC_4XSg.js +0 -10
  93. package/dist/client/assets/page-BauA0SPJ.js +0 -1
  94. package/dist/client/assets/settings-85tu13fN.js +0 -1
  95. package/dist/client/assets/store-app-detail-D89e4NIX.js +0 -1
  96. package/dist/client/assets/store-zixro3Vs.js +0 -1
  97. package/dist/client/assets/tool-set-selector-BfScgRcK.js +0 -1
  98. package/dist/client/assets/use-connection-D5nZyekX.js +0 -2
  99. package/dist/client/assets/use-gateway-pRk3-ua4.js +0 -1
  100. package/dist/client/assets/use-members-OyBpbFn0.js +0 -1
  101. package/dist/client/assets/use-organization-settings-CMP1q4u_.js +0 -1
  102. package/dist/client/assets/useQuery-DEUZMq4A.js +0 -1
  103. package/dist/client/assets/utils-B-QWwgyW.js +0 -1
@@ -1 +1 @@
1
- import{c as C,af as d,j as a}from"./index-VCe1FY3E.js";import{c as m}from"./utils-B-QWwgyW.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};
1
+ import{c as C,af as d,j as a}from"./index-kuMaGV9U.js";import{c as m}from"./utils-dJ2GyoL3.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{b1 as V,b2 as D,b3 as W,b4 as Q,b5 as U,b6 as H,c as M,j as s,r as O,a5 as G,a2 as Y,a as q,b7 as J,ao as Z}from"./index-kuMaGV9U.js";import{g as X,a as ee}from"./well-known-mcp-Dq2j3ucM.js";import{C as te}from"./collection-header-DsMf-88h.js";import{I as se,a as ie,c as ne,d as B,b as le}from"./integration-icon-Dv-2D552.js";import{a as re,T as oe,b as ae,u as A}from"./tooltip-CyTpNpEt.js";import{e as ce,s as de}from"./app-name-DQPOjnhR.js";import{I as T}from"./icon-KZI-tyY2.js";import{C as me}from"./collection-search-CXcLRFBk.js";import{C as fe}from"./card-BggFBtGd.js";import{g as ue,f as he,a as xe}from"./registry-utils-ulDDT0d8.js";import{d as ge,a as pe,S as ve,b as je,c as Ne}from"./select-BFyzpZOm.js";import{C as ye}from"./connection-card-BSv7-QCW.js";import{B as Ce}from"./button-Cv1rgJOF.js";import{E as we}from"./empty-state-CCq1QaCi.js";import{a as be}from"./use-binding-Dlf98XSv.js";import{L as Se,u as Pe}from"./localstorage-keys-BY-fTuiw.js";import"./collection-display-button-grM851Xd.js";import"./dropdown-menu-dUgjswGX.js";import"./utils-dJ2GyoL3.js";import"./input-C0U94pom.js";import"./badge-C29ypR-2.js";import"./auth-Dfo88onv.js";import"./useQuery-DJ7WNdWe.js";var Re=class extends V{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:D()})}getOptimisticResult(t){return t.behavior=D(),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:n}=t,c=super.createResult(t,e),{isFetching:r,isRefetching:h,isError:d,isRefetchError:m}=c,a=n.fetchMeta?.fetchMore?.direction,i=d&&a==="forward",l=r&&a==="forward",o=d&&a==="backward",f=r&&a==="backward";return{...c,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Q(e,n.data),hasPreviousPage:W(e,n.data),isFetchNextPageError:i,isFetchingNextPage:l,isFetchPreviousPageError:o,isFetchingPreviousPage:f,isRefetchError:m&&!i&&!o,isRefetching:h&&!l&&!f}}};function Ie(t,e){return U({...t,enabled:!0,suspense:!0,throwOnError:H},Re,e)}function Ee(t){const e=t.title||t.server.title||t.id||"Unnamed Item",n=t.server.description||null,c=t.server.icons?.[0]?.src||ue(t.server.repository)||null,r=t._meta?.["mcp.mesh"]?.verified??!1,h=t.server.version,m=(t.server.remotes?.length??0)>0;let a=e,i=null;if(e.includes("/")){const l=e.split("/");l.length>=2&&(i=l[0]||null,a=ce(e))}if(!i){const l=t._meta?.["mcp.mesh"]?.scopeName,o=t._meta?.["mcp.mesh"]?.appName;l&&o?i=`${l}/${o}`:l&&(i=l)}return{icon:c,scopeName:i,displayName:a,description:n,version:h||null,isVerified:r,canInstall:m}}function ke(t){const e=M.c(45),{icon:n,scopeName:c,displayName:r,description:h,version:d,isVerified:m,canInstall:a,onClick:i}=t;let l;e[0]!==r||e[1]!==n?(l=s.jsx(se,{icon:n,name:r,size:"md",className:"shadow-sm"}),e[0]=r,e[1]=n,e[2]=l):l=e[2];let o;e[3]!==r?(o=s.jsx("span",{className:"truncate",children:r}),e[3]=r,e[4]=o):o=e[4];let f;e[5]!==m?(f=m&&s.jsx(T,{name:"verified",size:16,className:"text-success shrink-0"}),e[5]=m,e[6]=f):f=e[6];let g;e[7]!==a?(g=!a&&s.jsx(T,{name:"lock",size:16,className:"text-muted-foreground shrink-0",title:"This MCP Server cannot be connected"}),e[7]=a,e[8]=g):g=e[8];let u;e[9]!==o||e[10]!==f||e[11]!==g?(u=s.jsx(re,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2 text-base font-semibold min-w-0",children:[o,f,g]})}),e[9]=o,e[10]=f,e[11]=g,e[12]=u):u=e[12];let p;e[13]!==r?(p=s.jsx("p",{children:r}),e[13]=r,e[14]=p):p=e[14];let N;e[15]!==a?(N=!a&&s.jsx("p",{className:"text-xs mt-1",children:"No connection available"}),e[15]=a,e[16]=N):N=e[16];let y;e[17]!==p||e[18]!==N?(y=s.jsxs(oe,{children:[p,N]}),e[17]=p,e[18]=N,e[19]=y):y=e[19];let R;e[20]!==u||e[21]!==y?(R=s.jsxs(ae,{children:[u,y]}),e[20]=u,e[21]=y,e[22]=R):R=e[22];let C;e[23]!==c?(C=c&&s.jsx("span",{className:"truncate",children:c}),e[23]=c,e[24]=C):C=e[24];let b;e[25]!==c||e[26]!==d?(b=d&&s.jsxs(s.Fragment,{children:[c&&s.jsx("span",{children:"•"}),s.jsxs("span",{className:"shrink-0",children:["v",d]})]}),e[25]=c,e[26]=d,e[27]=b):b=e[27];let S;e[28]!==C||e[29]!==b?(S=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[C,b]}),e[28]=C,e[29]=b,e[30]=S):S=e[30];let v;e[31]!==S||e[32]!==R?(v=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:[R,S]})}),e[31]=S,e[32]=R,e[33]=v):v=e[33];let x;e[34]!==l||e[35]!==v?(x=s.jsxs("div",{className:"flex gap-3",children:[l,v]}),e[34]=l,e[35]=v,e[36]=x):x=e[36];const I=h||"No description available";let P;e[37]!==I?(P=s.jsx("div",{className:"grid grid-cols-1 gap-1 min-w-0",children:s.jsx("div",{className:"text-base text-muted-foreground line-clamp-2",children:I})}),e[37]=I,e[38]=P):P=e[38];let E;e[39]!==x||e[40]!==P?(E=s.jsxs("div",{className:"flex flex-col gap-4 h-full relative",children:[x,P]}),e[39]=x,e[40]=P,e[41]=E):E=e[41];let j;return e[42]!==i||e[43]!==E?(j=s.jsx(fe,{className:"p-6 cursor-pointer hover:shadow-md transition-shadow",onClick:i,children:E}),e[42]=i,e[43]=E,e[44]=j):j=e[44],j}function z(t){const e=M.c(12),{items:n,title:c,onItemClick:r}=t;if(n.length===0)return null;let h;e[0]!==c?(h=c&&s.jsx("div",{className:"flex items-center justify-between w-max gap-2",children:s.jsx("h2",{className:"text-lg font-medium",children:c})}),e[0]=c,e[1]=h):h=e[1];let d;if(e[2]!==n||e[3]!==r){let i;e[5]!==r?(i=l=>{const o=Ee(l);return s.jsx(ke,{...o,onClick:()=>r(l)},l.id)},e[5]=r,e[6]=i):i=e[6],d=n.map(i),e[2]=n,e[3]=r,e[4]=d}else d=e[4];let m;e[7]!==d?(m=s.jsx("div",{className:"grid grid-cols-4 gap-4",children:d}),e[7]=d,e[8]=m):m=e[8];let a;return e[9]!==h||e[10]!==m?(a=s.jsxs("div",{className:"flex flex-col gap-4",children:[h,m]}),e[9]=h,e[10]=m,e[11]=a):a=e[11],a}function Te(t,e){if(!e)return t;const n=e.toLowerCase();return t.filter(c=>(c.name||c.title||"").toLowerCase().includes(n)||(c.description||c.server.description||"").toLowerCase().includes(n))}function Me(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0||t.server._meta?.["mcp.mesh"]?.verified===!0}function Le(t){const e=M.c(32),{items:n,isLoadingMore:c,registryId:r,hasMore:h,onLoadMore:d}=t,m=c===void 0?!1:c,a=h===void 0?!1:h,[i,l]=O.useState(""),o=G(),{org:f}=A(),g=O.useRef(null);let u,p,N;e[0]!==n||e[1]!==i?(u=Te(n,i),N=u.filter(Me),p=u.filter(j=>!N.find(k=>k.id===j.id)),e[0]=n,e[1]=i,e[2]=u,e[3]=p,e[4]=N):(u=e[2],p=e[3],N=e[4]);const y=p;let R;e[5]!==o||e[6]!==f.slug||e[7]!==r?(R=j=>{const k=de(j.name||j.title||j.server.title||""),L=j.server.name;o({to:"/$org/store/$appName",params:{org:f.slug,appName:k},search:{registryId:r,serverName:L}})},e[5]=o,e[6]=f.slug,e[7]=r,e[8]=R):R=e[8];const C=R;let b;e[9]!==a||e[10]!==m||e[11]!==d||e[12]!==i?(b=j=>{if(!a||!d||i||m)return;const k=j.currentTarget;k.scrollHeight-k.scrollTop-k.clientHeight<200&&d()},e[9]=a,e[10]=m,e[11]=d,e[12]=i,e[13]=b):b=e[13];const S=b;let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=j=>{j.key==="Enter"&&l(j.currentTarget.value)},e[14]=v):v=e[14];let x;e[15]!==i?(x=s.jsx(me,{value:i,onChange:l,placeholder:"Search for an MCP Server...",onKeyDown:v}),e[15]=i,e[16]=x):x=e[16];let I;e[17]!==y||e[18]!==u||e[19]!==C||e[20]!==a||e[21]!==m||e[22]!==n.length||e[23]!==i||e[24]!==N?(I=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:n.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(T,{name:"inbox",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(T,{name:"search",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:[N.length>0&&s.jsx(z,{items:N,title:"Verified",onItemClick:C}),y.length>0&&s.jsx(z,{items:y,title:N.length>0?"All":"",onItemClick:C}),a&&!i&&m&&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(T,{name:"progress_activity",size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[17]=y,e[18]=u,e[19]=C,e[20]=a,e[21]=m,e[22]=n.length,e[23]=i,e[24]=N,e[25]=I):I=e[25];let P;e[26]!==S||e[27]!==I?(P=s.jsx("div",{ref:g,className:"flex-1 overflow-y-auto",onScroll:S,children:I}),e[26]=S,e[27]=I,e[28]=P):P=e[28];let E;return e[29]!==x||e[30]!==P?(E=s.jsxs("div",{className:"flex flex-col h-full",children:[x,P]}),e[29]=x,e[30]=P,e[31]=E):E=e[31],E}const F=24;function $e(t){const e=M.c(27),{registryId:n}=t,c=ie(n);let r,h,d,m;if(e[0]!==c?.tools||e[1]!==n){if(r=he(c?.tools),!r)throw new Error("This registry does not support listing store items.");let x;e[6]!==n?(x=ne(n),e[6]=n,e[7]=x):x=e[7],m=x,d=Ie,h=Y.toolCall(n,r,JSON.stringify({limit:F})),e[0]=c?.tools,e[1]=n,e[2]=r,e[3]=h,e[4]=d,e[5]=m}else r=e[2],h=e[3],d=e[4],m=e[5];let a;e[8]!==r||e[9]!==m?(a=async x=>{const{pageParam:I}=x;return await m(r,I?{cursor:I,limit:F}:{limit:F})},e[8]=r,e[9]=m,e[10]=a):a=e[10];let i;e[11]!==h||e[12]!==a?(i={queryKey:h,queryFn:a,initialPageParam:void 0,getNextPageParam:Ke,staleTime:36e5},e[11]=h,e[12]=a,e[13]=i):i=e[13];const{data:l,fetchNextPage:o,hasNextPage:f,isFetchingNextPage:g}=d(i);let u;e:{if(!l?.pages||l.pages.length===0){u=null;break e}const x=l.pages[0];if(typeof x=="object"&&x!==null&&"totalCount"in x&&typeof x.totalCount=="number"){u=x.totalCount;break e}u=null}const p=u,N=l?.pages;let y;e[14]!==N?(y=xe(N),e[14]=N,e[15]=y):y=e[15];const R=y;let C;e[16]!==o||e[17]!==f||e[18]!==g?(C=()=>{f&&!g&&o()},e[16]=o,e[17]=f,e[18]=g,e[19]=C):C=e[19];const b=C,S=f??!1;let v;return e[20]!==R||e[21]!==b||e[22]!==g||e[23]!==n||e[24]!==S||e[25]!==p?(v=s.jsx(Le,{items:R,isLoadingMore:g,registryId:n,hasMore:S,onLoadMore:b,totalCount:p}),e[20]=R,e[21]=b,e[22]=g,e[23]=n,e[24]=S,e[25]=p,e[26]=v):v=e[26],v}function Ke(t){if(typeof t=="object"&&t!==null){const e=t.nextCursor||t.cursor;if(e)return e}}function _e(t){const e=M.c(15),{registries:n,value:c,onValueChange:r,onAddWellKnown:h,wellKnownRegistries:d,placeholder:m}=t,a=m===void 0?"Select a registry...":m;let i;e[0]!==a?(i=s.jsx(pe,{className:"w-[200px] h-8!",children:s.jsx(ve,{placeholder:a})}),e[0]=a,e[1]=i):i=e[1];let l;e[2]!==n?(l=n.map(Fe),e[2]=n,e[3]=l):l=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:p=>{p.preventDefault(),p.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(T,{name:"add",size:16})})]},u.id??u.title))]}),e[4]=h,e[5]=d,e[6]=o):o=e[6];let f;e[7]!==l||e[8]!==o?(f=s.jsxs(je,{children:[l,o]}),e[7]=l,e[8]=o,e[9]=f):f=e[9];let g;return e[10]!==r||e[11]!==i||e[12]!==f||e[13]!==c?(g=s.jsxs(Ne,{value:c,onValueChange:r,children:[i,f]}),e[10]=r,e[11]=i,e[12]=f,e[13]=c,e[14]=g):g=e[14],g}function Fe(t){return s.jsx(ge,{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 Oe(t){const e=M.c(13),{registries:n,onConnected:c}=t,r=n.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",m=r?"Connect to discover and use MCP Servers from the community.":"Choose a registry to discover and connect MCP Servers from the community.",a=`grid gap-4 w-full ${r?"grid-cols-1 justify-items-center":"grid-cols-1 md:grid-cols-2"}`;let i;if(e[1]!==c||e[2]!==n){let f;e[4]!==c?(f=(g,u)=>{const p=g.id??`registry-${u}`;return s.jsx(Ae,{registry:{...g,id:p},onConnected:c},p)},e[4]=c,e[5]=f):f=e[5],i=n.map(f),e[1]=c,e[2]=n,e[3]=i}else i=e[3];let l;e[6]!==a||e[7]!==i?(l=s.jsx("div",{className:a,children:i}),e[6]=a,e[7]=i,e[8]=l):l=e[8];let o;return e[9]!==d||e[10]!==m||e[11]!==l?(o=s.jsx(we,{image:h,title:d,description:m,descriptionClassName:"max-w-[500px]",actionsClassName:"w-full max-w-2xl",actions:l}),e[9]=d,e[10]=m,e[11]=l,e[12]=o):o=e[12],o}function Ae(t){const e=M.c(15),{registry:n,onConnected:c}=t,r=B(),{org:h}=A(),{data:d}=q.useSession(),m=!!h&&!!d?.user?.id;let a;e[0]!==r.create||e[1]!==m||e[2]!==c||e[3]!==n?(a=async()=>{if(!m)return;const u=await r.create.mutateAsync(n);c?.(u.id)},e[0]=r.create,e[1]=m,e[2]=c,e[3]=n,e[4]=a):a=e[4];const i=a,l=!m||r.create.isPending;let o;e[5]!==r.create.isPending?(o=r.create.isPending?s.jsxs(s.Fragment,{children:[s.jsx(T,{name:"progress_activity",className:"animate-spin"}),"Connecting..."]}):s.jsxs(s.Fragment,{children:[s.jsx(T,{name:"add"}),"Connect"]}),e[5]=r.create.isPending,e[6]=o):o=e[6];let f;e[7]!==i||e[8]!==l||e[9]!==o?(f=s.jsx(Ce,{variant:"outline",className:"w-full",disabled:l,onClick:i,children:o}),e[7]=i,e[8]=l,e[9]=o,e[10]=f):f=e[10];let g;return e[11]!==i||e[12]!==n||e[13]!==f?(g=s.jsx(ye,{connection:n,onClick:i,footer:f,className:"transition-all hover:border-primary/50 hover:shadow-md"}),e[11]=i,e[12]=n,e[13]=f,e[14]=g):g=e[14],g}function ft(){const t=M.c(37),{org:e}=A(),n=le(),c=B(),r=J(),h=r.location.pathname.includes("/store/")&&r.location.pathname.split("/").length>3,d=be(n);let m;t[0]!==d?(m=d.map(Be),t[0]=d,t[1]=m):m=t[1];const a=m;let i;t[2]!==e.slug?(i=Se.selectedRegistry(e.slug),t[2]=e.slug,t[3]=i):i=t[3];const[l,o]=Pe(i,ze);let f;if(t[4]!==d||t[5]!==l){let w;t[7]!==l?(w=_=>_.id===l,t[7]=l,t[8]=w):w=t[8],f=d.find(w),t[4]=d,t[5]=l,t[6]=f}else f=t[6];const u=f?.id||d[0]?.id||"";let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=[X()],t[9]=p):p=t[9];const N=p;let y;t[10]===Symbol.for("react.memo_cache_sentinel")?(y=[ee()],t[10]=y):y=t[10];const R=y;let C;t[11]!==c.create||t[12]!==o?(C=async w=>{const _=await c.create.mutateAsync(w);o(_.id)},t[11]=c.create,t[12]=o,t[13]=C):C=t[13];const b=C;let S;t[14]!==d?(S=new Set(d.map(De)),t[14]=d,t[15]=S):S=t[15];const v=S;let x;t[16]!==v?(x=N.filter(w=>w.id&&!v.has(w.id)),t[16]=v,t[17]=x):x=t[17];const I=x;let P;t[18]!==v?(P=R.filter(w=>w.id&&!v.has(w.id)),t[18]=v,t[19]=P):P=t[19];const E=P;if(h){let w;return t[20]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Z,{}),t[20]=w):w=t[20],w}let j;t[21]!==b?(j=async w=>b(w),t[21]=b,t[22]=j):j=t[22];let k;t[23]!==I||t[24]!==u||t[25]!==a||t[26]!==o||t[27]!==j?(k=s.jsx(te,{title:"Store",ctaButton:s.jsx(_e,{wellKnownRegistries:I,registries:a,value:u,onValueChange:o,onAddWellKnown:j,placeholder:"Select store..."})}),t[23]=I,t[24]=u,t[25]=a,t[26]=o,t[27]=j,t[28]=k):k=t[28];let L;t[29]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(T,{name:"progress_activity",size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[29]=L):L=t[29];let $;t[30]!==E||t[31]!==u||t[32]!==o?($=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx(O.Suspense,{fallback:L,children:u?s.jsx($e,{registryId:u}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(Oe,{registries:E,onConnected:w=>{o(w)}})})})}),t[30]=E,t[31]=u,t[32]=o,t[33]=$):$=t[33];let K;return t[34]!==k||t[35]!==$?(K=s.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[k,$]}),t[34]=k,t[35]=$,t[36]=K):K=t[36],K}function De(t){return t.id}function ze(){return""}function Be(t){return{id:t.id,name:t.title,icon:t.icon||void 0}}export{ft as default};
@@ -0,0 +1 @@
1
+ import{c as E,j as s,r as le,a5 as be,d as Ne,b as we,a as Ce,a6 as ge}from"./index-kuMaGV9U.js";import{I as L}from"./icon-KZI-tyY2.js";import{B as xe}from"./button-Cv1rgJOF.js";import{b as Te,D as _e,a as ke,c as Se}from"./dropdown-menu-dUgjswGX.js";import{E as Ie}from"./empty-state-CCq1QaCi.js";import{R as Ae,T as Le,a as Ee}from"./resource-tabs-C2-m37Rp.js";import{d as Ue,b as De,a as Me,c as Ve}from"./integration-icon-Dv-2D552.js";import{a as Pe}from"./use-binding-Dlf98XSv.js";import{u as Re}from"./use-tool-call-DSlbFKjt.js";import{u as Be}from"./use-mcp-Z1amXXTK.js";import{u as ve}from"./tooltip-CyTpNpEt.js";import{e as $e}from"./extract-connection-data-DyKjnzFA.js";import{e as ze,s as Oe}from"./app-name-DQPOjnhR.js";import{f as He,e as Fe,b as Ge,c as We,g as Ke}from"./registry-utils-ulDDT0d8.js";import"./utils-dJ2GyoL3.js";import"./useQuery-DJ7WNdWe.js";import"./collection-display-button-grM851Xd.js";import"./collection-search-CXcLRFBk.js";import"./input-C0U94pom.js";import"./collection-table-wrapper-DIAaiM6K.js";import"./card-BggFBtGd.js";import"./layout-B4csW0zk.js";import"./badge-C29ypR-2.js";import"./auth-Dfo88onv.js";import"./generate-id-Dyweu44Y.js";function qe(t){const e=E.c(3),{message:r}=t,n=r===void 0?"Loading app details...":r;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(L,{name:"progress_activity",size:48,className:"animate-spin mb-4"}),e[0]=o):o=e[0];let i;return e[1]!==n?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[o,s.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),e[1]=n,e[2]=i):i=e[2],i}function Je(t){const e=E.c(9),{error:r,onBack:n}=t,o=r instanceof Error?r.message:r;let i,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(L,{name:"error",size:48,className:"text-destructive mb-4"}),a=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading app"}),e[0]=i,e[1]=a):(i=e[0],a=e[1]);let c;e[2]!==o?(c=s.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:o}),e[2]=o,e[3]=c):c=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 f;return e[6]!==c||e[7]!==l?(f=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[i,a,c,l]}),e[6]=c,e[7]=l,e[8]=f):f=e[8],f}function Qe(t){const e=E.c(5),{onBack:r}=t;let n,o,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(L,{name:"search_off",size:48,className:"text-muted-foreground mb-4"}),o=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]=o,e[2]=i):(n=e[0],o=e[1],i=e[2]);let a;return e[3]!==r?(a=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n,o,i,s.jsx("button",{onClick:r,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]=r,e[4]=a):a=e[4],a}function Xe(t){const e=E.c(3),{onBack:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(L,{name:"arrow_back",size:20}),e[0]=n):n=e[0];let o;return e[1]!==r?(o=s.jsx("div",{className:"shrink-0 bg-background border-b border-border px-4 py-3",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs("button",{onClick:r,className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[n,"Back"]})})}),e[1]=r,e[2]=o):o=e[2],o}function Ye(t){const e=E.c(32),{data:r,itemVersions:n,onInstall:o,canInstall:i,isInstalling:a}=t,c=i===void 0?!0:i,l=a===void 0?!1:a,[f,u]=le.useState(0);let x;e[0]!==o?(x=d=>{u(d),o(d)},e[0]=o,e[1]=x):x=e[1];const p=x;let h;e[2]!==r.icon||e[3]!==r.name?(h=r.icon?s.jsx("img",{src:r.icon,alt:r.name,crossOrigin:"anonymous",referrerPolicy:"no-referrer",onError:d=>{const v=d.target;v.style.display="none";const I=v.parentElement;I&&(I.innerHTML=r.name.substring(0,2).toUpperCase())},className:"w-full h-full object-cover rounded-2xl"}):r.name.substring(0,2).toUpperCase(),e[2]=r.icon,e[3]=r.name,e[4]=h):h=e[4];let g;e[5]!==h?(g=s.jsx("div",{className:"shrink-0 w-16 h-16 rounded-2xl bg-linear-to-br from-primary/20 to-primary/10 flex items-center justify-center text-3xl font-bold text-primary overflow-hidden",children:h}),e[5]=h,e[6]=g):g=e[6];let b;e[7]!==r.name?(b=s.jsx("h1",{className:"text-3xl font-bold",children:r.name}),e[7]=r.name,e[8]=b):b=e[8];let w;e[9]!==r.verified?(w=r.verified&&s.jsx("img",{src:"/verified-badge.svg",alt:"Verified",className:"w-5 h-5 shrink-0"}),e[9]=r.verified,e[10]=w):w=e[10];let C;e[11]!==b||e[12]!==w?(C=s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[b,w]}),e[11]=b,e[12]=w,e[13]=C):C=e[13];let T;e[14]!==r.description?(T=r.description&&s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:r.description}),e[14]=r.description,e[15]=T):T=e[15];let _;e[16]!==C||e[17]!==T?(_=s.jsxs("div",{className:"flex-1 min-w-0",children:[C,T]}),e[16]=C,e[17]=T,e[18]=_):_=e[18];let k;e[19]!==c||e[20]!==p||e[21]!==l||e[22]!==n||e[23]!==o||e[24]!==f?(k=c?s.jsx("div",{className:"shrink-0",children:n.length>1?s.jsxs("div",{className:"flex",children:[s.jsxs(xe,{variant:"brand",onClick:()=>p(0),disabled:l,className:"shrink-0 rounded-r-none cursor-pointer",children:[s.jsx(L,{name:"add",size:20}),l?"Connecting...":"Connect MCP Server"]}),s.jsxs(Te,{children:[s.jsx(_e,{asChild:!0,children:s.jsx(xe,{variant:"brand",disabled:l,className:"shrink-0 rounded-l-none px-2 border-l-2 border-l-white/50 cursor-pointer",children:s.jsx(L,{name:"expand_more",size:20})})}),s.jsx(ke,{align:"end",className:"w-56",children:n.map((d,v)=>{const I=d._meta?.["io.modelcontextprotocol.registry/official"];return s.jsx(Se,{onClick:()=>p(v),disabled:l,className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-start justify-between gap-2 w-full",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"font-medium text-sm",children:["v",d.server?.version||"unknown"]}),I?.isLatest&&s.jsx("div",{className:"text-xs text-primary font-semibold mt-1",children:"LATEST"})]}),v===f&&s.jsx(L,{name:"check_circle",size:16,className:"text-primary shrink-0 mt-1"})]})},v)})})]})]}):s.jsxs(xe,{variant:"brand",onClick:()=>o(),disabled:n.length===0||l,className:"shrink-0",children:[s.jsx(L,{name:"add",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[19]=c,e[20]=p,e[21]=l,e[22]=n,e[23]=o,e[24]=f,e[25]=k):k=e[25];let N;e[26]!==_||e[27]!==k?(N=s.jsxs("div",{className:"flex-1 min-w-0 flex items-center justify-between",children:[_,k]}),e[26]=_,e[27]=k,e[28]=N):N=e[28];let S;return e[29]!==N||e[30]!==g?(S=s.jsxs("div",{className:"pl-10 flex items-start gap-6 pb-12 pr-10 border-b border-border",children:[g,N]}),e[29]=N,e[30]=g,e[31]=S):S=e[31],S}function Ze(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 et(t){const e=E.c(48),{data:r,publisherInfo:n,selectedItem:o}=t;let i;e[0]!==r.description?(i=r.description&&s.jsxs("div",{className:"px-5 pb-5 border-b border-border",children:[s.jsx("h2",{className:"text-lg font-medium mb-3",children:"Overview"}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:r.description})]}),e[0]=r.description,e[1]=i):i=e[1];let a;e[2]!==r.publisher||e[3]!==n.logo?(a=n.logo?s.jsx("img",{src:n.logo,alt:r.publisher,crossOrigin:"anonymous",referrerPolicy:"no-referrer",onError:I=>{const X=I.target;X.style.display="none";const M=X.parentElement;if(M){const y=r.publisher==="io.modelcontextprotocol.registry/official"?"OR":r.publisher.substring(0,2).toUpperCase();M.innerHTML=y}},className:"w-full h-full object-cover"}):r.publisher==="io.modelcontextprotocol.registry/official"?"OR":r.publisher.substring(0,2).toUpperCase(),e[2]=r.publisher,e[3]=n.logo,e[4]=a):a=e[4];let c;e[5]!==a?(c=s.jsx("div",{className:"w-12 h-12 rounded-lg bg-linear-to-br from-primary/20 to-primary/10 flex items-center justify-center text-sm font-semibold text-primary shrink-0 overflow-hidden",children:a}),e[5]=a,e[6]=c):c=e[6];let l;e[7]!==r.publisher?(l=r.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":r.publisher.charAt(0).toUpperCase()+r.publisher.slice(1),e[7]=r.publisher,e[8]=l):l=e[8];let f;e[9]!==l?(f=s.jsx("div",{className:"font-medium",children:l}),e[9]=l,e[10]=f):f=e[10];let u;e[11]!==n.count?(u=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[11]=n.count,e[12]=u):u=e[12];let x;e[13]!==u?(x=s.jsx("div",{className:"text-xs text-muted-foreground flex items-center gap-1",children:u}),e[13]=u,e[14]=x):x=e[14];let p;e[15]!==f||e[16]!==x?(p=s.jsxs("div",{children:[f,x]}),e[15]=f,e[16]=x,e[17]=p):p=e[17];let h;e[18]!==c||e[19]!==p?(h=s.jsx("div",{className:"px-5 border-b border-border",children:s.jsxs("div",{className:"flex items-center gap-3 py-5",children:[c,p]})}),e[18]=c,e[19]=p,e[20]=h):h=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("h2",{className:"text-lg font-medium mb-3",children:"Technical Details"}),e[21]=g):g=e[21];let b;e[22]!==r.version?(b=r.version&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Version"}),s.jsxs("span",{className:"text-foreground font-medium",children:["v",r.version]})]}),e[22]=r.version,e[23]=b):b=e[23];let w;e[24]!==r.connectionType?(w=r.connectionType&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Connection Type"}),s.jsx("span",{className:"text-foreground font-medium",children:r.connectionType})]}),e[24]=r.connectionType,e[25]=w):w=e[25];let C;e[26]!==r.schemaVersion?(C=r.schemaVersion&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Schema Version"}),s.jsx("span",{className:"text-foreground font-medium",children:r.schemaVersion})]}),e[26]=r.schemaVersion,e[27]=C):C=e[27];let T;e[28]!==r.websiteUrl?(T=r.websiteUrl&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Website"}),s.jsxs("a",{href:r.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline flex items-center gap-1",children:[s.jsx("span",{children:"Visit"}),s.jsx(L,{name:"open_in_new",size:14})]})]}),e[28]=r.websiteUrl,e[29]=T):T=e[29];let _;e[30]!==r.repository?(_=r.repository?.url&&s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Source"}),s.jsxs("a",{href:r.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline flex items-center gap-1",children:[s.jsx("span",{children:"GitHub"}),s.jsx(L,{name:"open_in_new",size:14})]})]}),e[30]=r.repository,e[31]=_):_=e[31];let k;e[32]!==b||e[33]!==w||e[34]!==C||e[35]!==T||e[36]!==_?(k=s.jsxs("div",{className:"px-5 py-5 border-b border-border space-y-4",children:[g,b,w,C,T,_]}),e[32]=b,e[33]=w,e[34]=C,e[35]=T,e[36]=_,e[37]=k):k=e[37];let N;e[38]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("span",{className:"text-foreground text-sm",children:"Last Updated"}),e[38]=N):N=e[38];let S;e[39]!==o.updated_at?(S=Ze(o.updated_at),e[39]=o.updated_at,e[40]=S):S=e[40];let d;e[41]!==S?(d=s.jsxs("div",{className:"px-5 py-5 text-sm flex justify-between items-center border-b border-border",children:[N,s.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:S})]}),e[41]=S,e[42]=d):d=e[42];let v;return e[43]!==i||e[44]!==k||e[45]!==d||e[46]!==h?(v=s.jsxs("div",{className:"lg:col-span-1 flex flex-col pt-5",children:[i,h,k,d]}),e[43]=i,e[44]=k,e[45]=d,e[46]=h,e[47]=v):v=e[47],v}function tt(t){const e=E.c(18),{data:r,availableTabs:n,effectiveActiveTabId:o,effectiveTools:i,isLoadingTools:a,onTabChange:c}=t,l=a===void 0?!1:a;let f;e[0]!==i?(f=i.map(st),e[0]=i,e[1]=f):f=e[1];const u=f;let x;e[2]!==n||e[3]!==o||e[4]!==c?(x=n.length>0&&s.jsx("div",{className:"px-4 py-2 border-b border-border bg-background",children:s.jsx(Ae,{tabs:n,activeTab:o,onTabChange:c})}),e[2]=n,e[3]=o,e[4]=c,e[5]=x):x=e[5];let p;e[6]!==o||e[7]!==i.length||e[8]!==l||e[9]!==u?(p=o==="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(L,{name:"progress_activity",size:24,className:"animate-spin"}),s.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:"Loading tools..."})]}):i.length>0?s.jsx(Le,{tools:u,showToolbar:!1,emptyMessage:"This app doesn't have any tools."}):s.jsx(Ie,{image:null,title:"No tools available",description:"This app doesn't have any tools."})}),e[6]=o,e[7]=i.length,e[8]=l,e[9]=u,e[10]=p):p=e[10];let h;e[11]!==r?.repository||e[12]!==o?(h=o==="readme"&&s.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:s.jsx(Ee,{repository:r?.repository})}),e[11]=r?.repository,e[12]=o,e[13]=h):h=e[13];let g;return e[14]!==x||e[15]!==p||e[16]!==h?(g=s.jsxs("div",{className:"lg:col-span-2 flex flex-col border-l border-border",children:[x,p,h]}),e[14]=x,e[15]=p,e[16]=h,e[17]=g):g=e[17],g}function st(t){const e=t;return{name:e.name||"",description:e.description||void 0}}function rt(t,e){if(!t||!e)return;const r=e.toLowerCase();return t.find(n=>n.app_name?.toLowerCase()===r||n.app_id?.toLowerCase()===r||n.title.toLowerCase()===r)||t.find(n=>n.title.toLowerCase().includes(r))}function ot(t,e,r,n,o){if(!e||e==="Unknown")return{count:0};if(e==="io.modelcontextprotocol.registry/official")return{logo:n?.icon||void 0,count:o??t.length};const i=e.toLowerCase(),a=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:r?.icon||a[0]?.publisher_logo||a[0]?.icon||void 0,count:a.length}}function nt(t){const e=t.server._meta?.["mcp.mesh/publisher-provided"],r=t._meta?.["mcp.mesh"],n=t._meta?.["io.modelcontextprotocol.registry/official"],o=t.server,i=Ge(o.remotes?.[0]?.type),a=We(o.$schema),c=n?"io.modelcontextprotocol.registry/official":t.publisher||r?.scopeName||"Unknown",l=Ke(o.repository),f=t.icon||t.image||t.logo||o.icons?.[0]?.src||l||null,u=t.name||t.title||t.server?.title||"Unnamed Item";return{name:ze(u),description:t.description||t.summary||t.server?.description||"",icon:f,verified:t.verified||r?.verified,publisher:c,version:o.version||null,websiteUrl:o.websiteUrl||null,repository:o.repository||null,schemaVersion:a??null,connectionType:i,connectionUrl:null,remoteUrl:null,tools:t.tools||o.tools||e?.tools||[],models:t.models||o.models||e?.models||[],emails:t.emails||o.emails||e?.emails||[],analytics:t.analytics||o.analytics||e?.analytics,cdn:t.cdn||o.cdn||e?.cdn}}class it extends le.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,r){console.error("Store app detail error:",e,r)}render(){return this.state.hasError?s.jsx(Je,{error:this.state.error||new Error("Unknown error"),onBack:this.props.onBack}):this.props.children}}function lt(){const t=E.c(70),{org:e}=ve(),r=be();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const{appName:o}=Ne(n);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[1]=i):i=t[1];const{registryId:a,serverName:c}=we(i),[l,f]=le.useState("readme"),u=Ue(),x=De(),{data:p}=Ce.useSession(),h=Pe(x),g=a||h[0]?.id||"",b=Me(g),w=He(b?.tools),C=b?.tools&&b.tools.find(ft)?.name||"",T=b?.tools&&b.tools.find(mt)?.name||"",_=Ve(g),k=!!c;let N,S;k?(N=C||T,S={name:c}):(N=w,S={});const{data:d}=Re({toolCaller:_,toolName:N,toolInputParams:S,scope:g});let v=[],I=[],X=null;if(d){if(Array.isArray(d))v=d;else if(typeof d=="object"&&d!==null)if("totalCount"in d&&typeof d.totalCount=="number"&&(X=d.totalCount),"item"in d&&d.item){const m=d.item,A=m.id||"",V=m.server,P=m._meta;let D;t[2]!==m.title||t[3]!==A||t[4]!==V||t[5]!==P?(D=[{id:A,title:m.title,server:V,_meta:P}],t[2]=m.title,t[3]=A,t[4]=V,t[5]=P,t[6]=D):D=t[6],v=D}else{let m;"versions"in d&&Array.isArray(d.versions)?m="versions":"servers"in d&&Array.isArray(d.servers)?m="servers":m=Object.keys(d).find(A=>Array.isArray(d[A])),m&&(v=d[m],(m==="versions"||N?.includes("VERSIONS"))&&(I=v))}}let M;t[7]!==o?(M=m=>{const A=m.name||m.title||m.server.title||"";return Oe(A)===o},t[7]=o,t[8]=M):M=t[8];let y=v.find(M);if(!y&&c){let m;t[9]!==c?(m=A=>A.server.name===c||A.name===c||A.title===c,t[9]=c,t[10]=m):m=t[10],y=v.find(m)}const j=y?nt(y):null,ae=(j?.tools?.length||0)>0,ce=y?.server?.remotes?.[0]?.url||null,Y=!ae&&!!ce,Z=Be({url:Y?ce:""}),ee=Y&&Z.state==="connecting";let te;t[11]!==Z||t[12]!==Y?(te=Y&&Z.state==="ready"?(Z.tools||[]).map(dt):[],t[11]=Z,t[12]=Y,t[13]=te):te=t[13];const he=te,R=ae?j?.tools||[]:he,ye=rt(x,j?.publisher),de=j?ot(v,j.publisher,ye,b??null,X):{count:0},je=j?.repository?Fe(j.repository):null,me=!!j?.repository&&!!je;let B;t[14]!==me?(B={id:"readme",label:"README",visible:me},t[14]=me,t[15]=B):B=t[15];const fe=ae||he.length>0||ee&&!!ce;let $;t[16]!==R.length||t[17]!==fe?($={id:"tools",label:"Tools",count:R.length,visible:fe},t[16]=R.length,t[17]=fe,t[18]=$):$=t[18];let se;t[19]!==B||t[20]!==$?(se=[B,$].filter(ct),t[19]=B,t[20]=$,t[21]=se):se=t[21];const U=se;let re;t[22]!==l||t[23]!==U?(re=U.find(m=>m.id===l)?l:U.find(at)?.id||U[0]?.id||"overview",t[22]=l,t[23]=U,t[24]=re):re=t[24];const pe=re;let oe;t[25]!==u||t[26]!==I||t[27]!==r||t[28]!==e||t[29]!==y||t[30]!==p?(oe=async m=>{const A=I[m??0]||y;if(!A||!e||!p?.user?.id)return;const V=$e(A,e.id,p.user.id);if(!V.connection_url){ge.error("This MCP Server cannot be connected: no connection URL available");return}try{const{id:P}=await u.create.mutateAsync(V);r({to:"/$org/mcps/$connectionId",params:{org:e.slug,connectionId:P}})}catch(P){const D=P;ge.error(`Failed to connect MCP Server: ${D instanceof Error?D.message:String(D)}`)}},t[25]=u,t[26]=I,t[27]=r,t[28]=e,t[29]=y,t[30]=p,t[31]=oe):oe=t[31];const ue=oe;let ne;t[32]!==r||t[33]!==e.slug?(ne=()=>{r({to:"/$org/store",params:{org:e.slug}})},t[32]=r,t[33]=e.slug,t[34]=ne):ne=t[34];const z=ne;if(!y){let m;return t[35]!==z?(m=s.jsx(Qe,{onBack:z}),t[35]=z,t[36]=m):m=t[36],m}if(!j)return null;const O=(y?.server?.remotes?.length??0)>0;let H;t[37]!==z?(H=s.jsx(Xe,{onBack:z}),t[37]=z,t[38]=H):H=t[38];let F;t[39]!==O?(F=!O&&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(L,{name:"info",size:16,className:"inline mr-2"}),"This MCP Server cannot be connected - no connection method available."]}),t[39]=O,t[40]=F):F=t[40];let G;t[41]!==I||t[42]!==y?(G=I.length>0?I:[y],t[41]=I,t[42]=y,t[43]=G):G=t[43];let W;t[44]!==u.create.isPending||t[45]!==O||t[46]!==j||t[47]!==ue||t[48]!==G?(W=s.jsx(Ye,{data:j,itemVersions:G,onInstall:ue,canInstall:O,isInstalling:u.create.isPending}),t[44]=u.create.isPending,t[45]=O,t[46]=j,t[47]=ue,t[48]=G,t[49]=W):W=t[49];let K;t[50]!==j||t[51]!==de||t[52]!==y?(K=s.jsx(et,{data:j,publisherInfo:de,selectedItem:y}),t[50]=j,t[51]=de,t[52]=y,t[53]=K):K=t[53];let q;t[54]!==U||t[55]!==j||t[56]!==pe||t[57]!==R||t[58]!==ee?(q=s.jsx(tt,{data:j,availableTabs:U,effectiveActiveTabId:pe,effectiveTools:R,isLoadingTools:ee,onTabChange:f}),t[54]=U,t[55]=j,t[56]=pe,t[57]=R,t[58]=ee,t[59]=q):q=t[59];let J;t[60]!==K||t[61]!==q?(J=s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 min-h-[677px]",children:[K,q]}),t[60]=K,t[61]=q,t[62]=J):J=t[62];let Q;t[63]!==F||t[64]!==W||t[65]!==J?(Q=s.jsx("div",{className:"flex-1 overflow-y-auto pt-10 h-full",children:s.jsx("div",{className:"h-full",children:s.jsxs("div",{className:"max-w-7xl mx-auto h-full",children:[F,W,J]})})}),t[63]=F,t[64]=W,t[65]=J,t[66]=Q):Q=t[66];let ie;return t[67]!==H||t[68]!==Q?(ie=s.jsxs("div",{className:"flex flex-col h-full border-l border-border",children:[H,Q]}),t[67]=H,t[68]=Q,t[69]=ie):ie=t[69],ie}function at(t){return t.id==="readme"}function ct(t){return t.visible}function dt(t){return{name:t.name,description:t.description}}function mt(t){return t.name.endsWith("_GET")}function ft(t){return t.name.endsWith("_VERSIONS")}function Rt(){const t=E.c(6),{org:e}=ve(),r=be();let n;t[0]!==r||t[1]!==e.slug?(n=()=>{r({to:"/$org/store",params:{org:e.slug}})},t[0]=r,t[1]=e.slug,t[2]=n):n=t[2];const o=n;let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(le.Suspense,{fallback:s.jsx(qe,{}),children:s.jsx(lt,{})}),t[3]=i):i=t[3];let a;return t[4]!==o?(a=s.jsx(it,{onBack:o,children:i}),t[4]=o,t[5]=a):a=t[5],a}export{Rt as default};
@@ -0,0 +1 @@
1
+ import{r as c,aE as T,j as i,aF as C,aC as y,aK as I,aH as H,bi as M,bj as z,c as A}from"./index-kuMaGV9U.js";import{c as g}from"./utils-dJ2GyoL3.js";var m="Switch",[U]=T(m),[q,F]=U(m),E=c.forwardRef((s,e)=>{const{__scopeSwitch:t,name:r,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=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:k,caller:m});return i.jsxs(q,{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,...w,ref:v,onClick:H(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=F(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 L="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:s,control:e,checked:t,bubbles:r=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=z(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"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,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=L;function j(s){return s?"checked":"unchecked"}var O=E,$=R;function W(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($,{"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(O,{"data-slot":"switch",className:a,...r,children:n}),e[6]=r,e[7]=a,e[8]=o):o=e[8],o}export{W as S};
@@ -1 +1 @@
1
- import{c as o,j as n}from"./index-VCe1FY3E.js";import{c as l}from"./utils-B-QWwgyW.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};
1
+ import{c as o,j as n}from"./index-kuMaGV9U.js";import{c as l}from"./utils-dJ2GyoL3.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 E,j as t}from"./index-kuMaGV9U.js";import{I as z,b as R}from"./integration-icon-Dv-2D552.js";import{C as F}from"./checkbox-Ay9B68Cb.js";import{B as A}from"./button-Cv1rgJOF.js";import{I as U}from"./icon-KZI-tyY2.js";import{c as T}from"./utils-dJ2GyoL3.js";import{C as V}from"./collection-search-CXcLRFBk.js";const q=v.memo(function(S){const e=E.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(z,{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(F,{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=E.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(F,{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}),[I,M]=v.useState(n[0]?.id??null),b=I?n.find(s=>s.id===I)??null:null,$=b?.tools??[],B=(s,l)=>d[s]?.includes(l)??!1,D=(s,l)=>{const j=d[s]??[],y=j.includes(l),w={...d};if(y){const k=j.filter(C=>C!==l);k.length===0?delete w[s]:w[s]=k}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]??[],y=l.tools.map(C=>C.name),w=j.length>0&&y.every(C=>j.includes(C)),k={...d};w?delete k[s]:(k[s]=y,M(s)),S(k)},P=s=>{M(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:I===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,{name:"arrow_back",size:20})}),t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx(z,{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:$.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:$.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};
@@ -1 +1 @@
1
- import{r as a,j as d,aC as $,c as j,aB as te,aD as G,aR as oe,aM as B,aX as re,aY as ne,bC as se,az as U,aN as ae,aE as T,aQ as ie,aO as le,aP as ce,aZ as ue}from"./index-VCe1FY3E.js";import{c as de}from"./utils-B-QWwgyW.js";var pe=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"}),fe="VisuallyHidden",V=a.forwardRef((t,e)=>d.jsx($.span,{...t,ref:e,style:{...pe,...t.style}}));V.displayName=fe;var ve=V;const S="org-admin",xe={from({org:t,project:e}){if(t.includes("/")||e.includes("/"))throw new Error("Org or project cannot contain slashes");return`${t}/${e}`},parse(t){t.startsWith("/")&&(t=t.slice(1));const[e,o]=t.split("/");if(!e||!o)throw new Error("Invalid locator");return{org:e,project:o}},isOrgAdminProject(t){return t.split("/")[1]===S},adminProject(t){return`${t}/${S}`}},z=a.createContext(void 0),ze=()=>{const t=a.useContext(z);if(!t)throw new Error("useProjectContext must be used within a ProjectContextProvider");return t},Fe=t=>{const e=j.c(10),{children:o,org:r,project:n}=t;let s;e[0]!==r.slug||e[1]!==n.slug?(s=xe.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]!==o||e[8]!==i?(u=d.jsx(z.Provider,{value:i,children:o}),e[7]=o,e[8]=i,e[9]=u):u=e[9],u};const he=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ge=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,o,r)=>r?r.toUpperCase():o.toLowerCase()),H=t=>{const e=ge(t);return e.charAt(0).toUpperCase()+e.slice(1)},F=(...t)=>t.filter((e,o,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===o).join(" ").trim();var me={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ce=a.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:n="",children:s,iconNode:l,...c},i)=>a.createElement("svg",{ref:i,...me,width:e,height:e,stroke:t,strokeWidth:r?Number(o)*24/Number(e):o,className:F("lucide",n),...c},[...l.map(([u,p])=>a.createElement(u,p)),...Array.isArray(s)?s:[s]]));const Ye=(t,e)=>{const o=a.forwardRef(({className:r,...n},s)=>a.createElement(Ce,{ref:s,iconNode:e,className:F(`lucide-${he(H(t))}`,`lucide-${t}`,r),...n}));return o.displayName=H(t),o};var[O]=te("Tooltip",[B]),L=B(),Y="TooltipProvider",ye=700,A="tooltip.open",[Te,k]=O(Y),W=t=>{const{__scopeTooltip:e,delayDuration:o=ye,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=t,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(Te,{scope:e,isOpenDelayedRef:l,delayDuration:o,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})};W.displayName=Y;var R="Tooltip",[we,_]=O(R),X=t=>{const{__scopeTooltip:e,children:o,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=t,i=k(R,t.__scopeTooltip),u=L(e),[p,v]=a.useState(null),x=ie(),f=a.useRef(0),h=l??i.disableHoverableContent,m=c??i.delayDuration,g=a.useRef(!1),[y,C]=le({prop:r,defaultProp:n??!1,onChange:M=>{M?(i.onOpen(),document.dispatchEvent(new CustomEvent(A))):i.onClose(),s?.(M)},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,C(!0)},[C]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,C(!1)},[C]),I=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,C(!0),f.current=0},m)},[m,C]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),d.jsx(ce,{...u,children:d.jsx(we,{scope:e,contentId:x,open:y,stateAttribute:b,trigger:p,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?I():P()},[i.isOpenDelayedRef,I,P]),onTriggerLeave:a.useCallback(()=>{h?E():(window.clearTimeout(f.current),f.current=0)},[E,h]),onOpen:P,onClose:E,disableHoverableContent:h,children:o})})};X.displayName=R;var D="TooltipTrigger",Z=a.forwardRef((t,e)=>{const{__scopeTooltip:o,...r}=t,n=_(D,o),s=k(D,o),l=L(o),c=a.useRef(null),i=U(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(ae,{asChild:!0,...l,children:d.jsx($.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:T(t.onPointerMove,x=>{x.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),p.current=!0)}),onPointerLeave:T(t.onPointerLeave,()=>{n.onTriggerLeave(),p.current=!1}),onPointerDown:T(t.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:T(t.onFocus,()=>{u.current||n.onOpen()}),onBlur:T(t.onBlur,n.onClose),onClick:T(t.onClick,n.onClose)})})});Z.displayName=D;var N="TooltipPortal",[be,Pe]=O(N,{forceMount:void 0}),q=t=>{const{__scopeTooltip:e,forceMount:o,children:r,container:n}=t,s=_(N,e);return d.jsx(be,{scope:e,forceMount:o,children:d.jsx(G,{present:o||s.open,children:d.jsx(oe,{asChild:!0,container:n,children:r})})})};q.displayName=N;var w="TooltipContent",K=a.forwardRef((t,e)=>{const o=Pe(w,t.__scopeTooltip),{forceMount:r=o.forceMount,side:n="top",...s}=t,l=_(w,t.__scopeTooltip);return d.jsx(G,{present:r||l.open,children:l.disableHoverableContent?d.jsx(J,{side:n,...s,ref:e}):d.jsx(Ee,{side:n,...s,ref:e})})}),Ee=a.forwardRef((t,e)=>{const o=_(w,t.__scopeTooltip),r=k(w,t.__scopeTooltip),n=a.useRef(null),s=U(e,n),[l,c]=a.useState(null),{trigger:i,onClose:u}=o,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},C=Oe(y,g.getBoundingClientRect()),b=Le(y,C),P=Ae(m.getBoundingClientRect()),E=ke([...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},C=i?.contains(g)||p?.contains(g),b=!De(y,l);C?x():b&&(x(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[i,p,l,u,x]),d.jsx(J,{...t,ref:s})}),[Re,je]=O(R,{isInside:!1}),_e=se("TooltipContent"),J=a.forwardRef((t,e)=>{const{__scopeTooltip:o,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...c}=t,i=_(w,o),u=L(o),{onClose:p}=i;return a.useEffect(()=>(document.addEventListener(A,p),()=>document.removeEventListener(A,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(re,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:p,children:d.jsxs(ne,{"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(_e,{children:r}),d.jsx(Re,{scope:o,isInside:!0,children:d.jsx(ve,{id:i.contentId,role:"tooltip",children:n||r})})]})})});K.displayName=w;var Q="TooltipArrow",ee=a.forwardRef((t,e)=>{const{__scopeTooltip:o,...r}=t,n=L(o);return je(Q,o).isInside?null:d.jsx(ue,{...n,...r,ref:e})});ee.displayName=Q;function Oe(t,e){const o=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),n=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(o,r,n,s)){case s:return"left";case n:return"right";case o:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Le(t,e,o=5){const r=[];switch(e){case"top":r.push({x:t.x-o,y:t.y+o},{x:t.x+o,y:t.y+o});break;case"bottom":r.push({x:t.x-o,y:t.y-o},{x:t.x+o,y:t.y-o});break;case"left":r.push({x:t.x+o,y:t.y-o},{x:t.x+o,y:t.y+o});break;case"right":r.push({x:t.x-o,y:t.y-o},{x:t.x-o,y:t.y+o});break}return r}function Ae(t){const{top:e,right:o,bottom:r,left:n}=t;return[{x:n,y:e},{x:o,y:e},{x:o,y:r},{x:n,y:r}]}function De(t,e){const{x:o,y:r}=t;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&&o<(v-u)*(r-p)/(x-p)+u&&(n=!n)}return n}function ke(t){const e=t.slice();return e.sort((o,r)=>o.x<r.x?-1:o.x>r.x?1:o.y<r.y?-1:o.y>r.y?1:0),Ne(e)}function Ne(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const n=t[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 o=[];for(let r=t.length-1;r>=0;r--){const n=t[r];for(;o.length>=2;){const s=o[o.length-1],l=o[o.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))o.pop();else break}o.push(n)}return o.pop(),e.length===1&&o.length===1&&e[0].x===o[0].x&&e[0].y===o[0].y?e:e.concat(o)}var Ie=W,Me=X,Se=Z,He=q,$e=K,Ge=ee;function Be(t){const e=j.c(6);let o,r;e[0]!==t?({delayDuration:r,...o}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==o?(s=d.jsx(Ie,{"data-slot":"tooltip-provider",delayDuration:n,...o}),e[3]=n,e[4]=o,e[5]=s):s=e[5],s}function We(t){const e=j.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=d.jsx(Be,{children:d.jsx(Me,{"data-slot":"tooltip",...o})}),e[2]=o,e[3]=r):r=e[3],r}function Xe(t){const e=j.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=d.jsx(Se,{"data-slot":"tooltip-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function Ze(t){const e=j.c(13);let o,r,n,s;e[0]!==t?({className:r,sideOffset:s,children:o,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let c;e[5]!==r?(c=de("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(Ge,{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]!==o||e[9]!==n||e[10]!==l||e[11]!==c?(u=d.jsx(He,{children:d.jsxs($e,{"data-slot":"tooltip-content",sideOffset:l,className:c,...n,children:[o,i]})}),e[8]=o,e[9]=n,e[10]=l,e[11]=c,e[12]=u):u=e[12],u}export{xe as L,S as O,Fe as P,Ze as T,pe as V,Xe as a,We as b,Ye as c,Be as d,ze as u};
1
+ import{r as a,j as d,aF as $,c as j,aE as te,aG as G,aO as oe,aJ as U,aU as re,aV as ne,bC as se,aC as V,aN as ae,aH as T,aM as ie,aK as le,aL as ce,aW as ue}from"./index-kuMaGV9U.js";import{c as de}from"./utils-dJ2GyoL3.js";var pe=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"}),fe="VisuallyHidden",F=a.forwardRef((t,e)=>d.jsx($.span,{...t,ref:e,style:{...pe,...t.style}}));F.displayName=fe;var ve=F;const S="org-admin",xe={from({org:t,project:e}){if(t.includes("/")||e.includes("/"))throw new Error("Org or project cannot contain slashes");return`${t}/${e}`},parse(t){t.startsWith("/")&&(t=t.slice(1));const[e,o]=t.split("/");if(!e||!o)throw new Error("Invalid locator");return{org:e,project:o}},isOrgAdminProject(t){return t.split("/")[1]===S},adminProject(t){return`${t}/${S}`}},B=a.createContext(void 0),Be=()=>{const t=a.useContext(B);if(!t)throw new Error("useProjectContext must be used within a ProjectContextProvider");return t},ze=t=>{const e=j.c(10),{children:o,org:r,project:n}=t;let s;e[0]!==r.slug||e[1]!==n.slug?(s=xe.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]!==o||e[8]!==i?(u=d.jsx(B.Provider,{value:i,children:o}),e[7]=o,e[8]=i,e[9]=u):u=e[9],u};const he=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ge=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,o,r)=>r?r.toUpperCase():o.toLowerCase()),H=t=>{const e=ge(t);return e.charAt(0).toUpperCase()+e.slice(1)},z=(...t)=>t.filter((e,o,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===o).join(" ").trim();var me={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ce=a.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:n="",children:s,iconNode:l,...c},i)=>a.createElement("svg",{ref:i,...me,width:e,height:e,stroke:t,strokeWidth:r?Number(o)*24/Number(e):o,className:z("lucide",n),...c},[...l.map(([u,p])=>a.createElement(u,p)),...Array.isArray(s)?s:[s]]));const We=(t,e)=>{const o=a.forwardRef(({className:r,...n},s)=>a.createElement(Ce,{ref:s,iconNode:e,className:z(`lucide-${he(H(t))}`,`lucide-${t}`,r),...n}));return o.displayName=H(t),o};var[O]=te("Tooltip",[U]),L=U(),W="TooltipProvider",ye=700,A="tooltip.open",[Te,k]=O(W),Y=t=>{const{__scopeTooltip:e,delayDuration:o=ye,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=t,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(Te,{scope:e,isOpenDelayedRef:l,delayDuration:o,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})};Y.displayName=W;var R="Tooltip",[we,_]=O(R),K=t=>{const{__scopeTooltip:e,children:o,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=t,i=k(R,t.__scopeTooltip),u=L(e),[p,v]=a.useState(null),x=ie(),f=a.useRef(0),h=l??i.disableHoverableContent,m=c??i.delayDuration,g=a.useRef(!1),[y,C]=le({prop:r,defaultProp:n??!1,onChange:M=>{M?(i.onOpen(),document.dispatchEvent(new CustomEvent(A))):i.onClose(),s?.(M)},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,C(!0)},[C]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,C(!1)},[C]),I=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,C(!0),f.current=0},m)},[m,C]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),d.jsx(ce,{...u,children:d.jsx(we,{scope:e,contentId:x,open:y,stateAttribute:b,trigger:p,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?I():P()},[i.isOpenDelayedRef,I,P]),onTriggerLeave:a.useCallback(()=>{h?E():(window.clearTimeout(f.current),f.current=0)},[E,h]),onOpen:P,onClose:E,disableHoverableContent:h,children:o})})};K.displayName=R;var D="TooltipTrigger",q=a.forwardRef((t,e)=>{const{__scopeTooltip:o,...r}=t,n=_(D,o),s=k(D,o),l=L(o),c=a.useRef(null),i=V(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(ae,{asChild:!0,...l,children:d.jsx($.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:T(t.onPointerMove,x=>{x.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),p.current=!0)}),onPointerLeave:T(t.onPointerLeave,()=>{n.onTriggerLeave(),p.current=!1}),onPointerDown:T(t.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:T(t.onFocus,()=>{u.current||n.onOpen()}),onBlur:T(t.onBlur,n.onClose),onClick:T(t.onClick,n.onClose)})})});q.displayName=D;var N="TooltipPortal",[be,Pe]=O(N,{forceMount:void 0}),J=t=>{const{__scopeTooltip:e,forceMount:o,children:r,container:n}=t,s=_(N,e);return d.jsx(be,{scope:e,forceMount:o,children:d.jsx(G,{present:o||s.open,children:d.jsx(oe,{asChild:!0,container:n,children:r})})})};J.displayName=N;var w="TooltipContent",X=a.forwardRef((t,e)=>{const o=Pe(w,t.__scopeTooltip),{forceMount:r=o.forceMount,side:n="top",...s}=t,l=_(w,t.__scopeTooltip);return d.jsx(G,{present:r||l.open,children:l.disableHoverableContent?d.jsx(Z,{side:n,...s,ref:e}):d.jsx(Ee,{side:n,...s,ref:e})})}),Ee=a.forwardRef((t,e)=>{const o=_(w,t.__scopeTooltip),r=k(w,t.__scopeTooltip),n=a.useRef(null),s=V(e,n),[l,c]=a.useState(null),{trigger:i,onClose:u}=o,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},C=Oe(y,g.getBoundingClientRect()),b=Le(y,C),P=Ae(m.getBoundingClientRect()),E=ke([...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},C=i?.contains(g)||p?.contains(g),b=!De(y,l);C?x():b&&(x(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[i,p,l,u,x]),d.jsx(Z,{...t,ref:s})}),[Re,je]=O(R,{isInside:!1}),_e=se("TooltipContent"),Z=a.forwardRef((t,e)=>{const{__scopeTooltip:o,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...c}=t,i=_(w,o),u=L(o),{onClose:p}=i;return a.useEffect(()=>(document.addEventListener(A,p),()=>document.removeEventListener(A,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(re,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:p,children:d.jsxs(ne,{"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(_e,{children:r}),d.jsx(Re,{scope:o,isInside:!0,children:d.jsx(ve,{id:i.contentId,role:"tooltip",children:n||r})})]})})});X.displayName=w;var Q="TooltipArrow",ee=a.forwardRef((t,e)=>{const{__scopeTooltip:o,...r}=t,n=L(o);return je(Q,o).isInside?null:d.jsx(ue,{...n,...r,ref:e})});ee.displayName=Q;function Oe(t,e){const o=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),n=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(o,r,n,s)){case s:return"left";case n:return"right";case o:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Le(t,e,o=5){const r=[];switch(e){case"top":r.push({x:t.x-o,y:t.y+o},{x:t.x+o,y:t.y+o});break;case"bottom":r.push({x:t.x-o,y:t.y-o},{x:t.x+o,y:t.y-o});break;case"left":r.push({x:t.x+o,y:t.y-o},{x:t.x+o,y:t.y+o});break;case"right":r.push({x:t.x-o,y:t.y-o},{x:t.x-o,y:t.y+o});break}return r}function Ae(t){const{top:e,right:o,bottom:r,left:n}=t;return[{x:n,y:e},{x:o,y:e},{x:o,y:r},{x:n,y:r}]}function De(t,e){const{x:o,y:r}=t;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&&o<(v-u)*(r-p)/(x-p)+u&&(n=!n)}return n}function ke(t){const e=t.slice();return e.sort((o,r)=>o.x<r.x?-1:o.x>r.x?1:o.y<r.y?-1:o.y>r.y?1:0),Ne(e)}function Ne(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const n=t[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 o=[];for(let r=t.length-1;r>=0;r--){const n=t[r];for(;o.length>=2;){const s=o[o.length-1],l=o[o.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))o.pop();else break}o.push(n)}return o.pop(),e.length===1&&o.length===1&&e[0].x===o[0].x&&e[0].y===o[0].y?e:e.concat(o)}var Ie=Y,Me=K,Se=q,He=J,$e=X,Ge=ee;function Ue(t){const e=j.c(6);let o,r;e[0]!==t?({delayDuration:r,...o}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==o?(s=d.jsx(Ie,{"data-slot":"tooltip-provider",delayDuration:n,...o}),e[3]=n,e[4]=o,e[5]=s):s=e[5],s}function Ye(t){const e=j.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=d.jsx(Ue,{children:d.jsx(Me,{"data-slot":"tooltip",...o})}),e[2]=o,e[3]=r):r=e[3],r}function Ke(t){const e=j.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=d.jsx(Se,{"data-slot":"tooltip-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function qe(t){const e=j.c(13);let o,r,n,s;e[0]!==t?({className:r,sideOffset:s,children:o,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let c;e[5]!==r?(c=de("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(Ge,{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]!==o||e[9]!==n||e[10]!==l||e[11]!==c?(u=d.jsx(He,{children:d.jsxs($e,{"data-slot":"tooltip-content",sideOffset:l,className:c,...n,children:[o,i]})}),e[8]=o,e[9]=n,e[10]=l,e[11]=c,e[12]=u):u=e[12],u}export{xe as L,S as O,ze as P,qe as T,pe as V,Ke as a,Ye as b,We as c,Ue as d,Be as u};
@@ -1 +1 @@
1
- import{b6 as a}from"./index-VCe1FY3E.js";const o=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],t=a("upload",o);export{t as U};
1
+ import{b9 as a}from"./index-kuMaGV9U.js";const o=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],t=a("upload",o);export{t as U};