@decocms/mesh 1.0.0-alpha.34 → 1.0.0-alpha.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/AlertCircle-VUVelpvY.js +1 -0
- package/dist/client/assets/ArrowLeft-B4oC_h6K.js +1 -0
- package/dist/client/assets/CheckCircle-DH6YWObN.js +1 -0
- package/dist/client/assets/ChevronDown-CLC0yxsk.js +1 -0
- package/dist/client/assets/ChevronRight-YHVS_LDJ.js +1 -0
- package/dist/client/assets/Clock-CUnbQKPM.js +1 -0
- package/dist/client/assets/Copy01-vEIIJ5sE.js +1 -0
- package/dist/client/assets/CpuChip02-Ckd82HIH.js +1 -0
- package/dist/client/assets/File06-sb4CceKn.js +1 -0
- package/dist/client/assets/Inbox01-CJr3WKtd.js +1 -0
- package/dist/client/assets/InfoCircle-BBnXokyi.js +1 -0
- package/dist/client/assets/Key01-BUTMet0-.js +1 -0
- package/dist/client/assets/LinkExternal01-jU0XrMVD.js +1 -0
- package/dist/client/assets/Loading01-Dp6sT3Mq.js +1 -0
- package/dist/client/assets/Plus-LcofPC9C.js +1 -0
- package/dist/client/assets/SearchMd-3u9z3FIP.js +1 -0
- package/dist/client/assets/Trash01-CNckizo2.js +1 -0
- package/dist/client/assets/Upload01-Bxain8td.js +1 -0
- package/dist/client/assets/X-Bo13gg4P.js +1 -0
- package/dist/client/assets/{alert-dialog-DucVRGId.js → alert-dialog-yp0b0MDg.js} +3 -3
- package/dist/client/assets/{auth-BaVMGGfx.js → auth-C8rltTUE.js} +1 -1
- package/dist/client/assets/{auth-catchall-DmPLtJXt.js → auth-catchall-VFRahgSj.js} +1 -1
- package/dist/client/assets/avatar-i3GM_9o4.js +1 -0
- package/dist/client/assets/{badge-DAqf2QcS.js → badge-gmsvp75V.js} +1 -1
- package/dist/client/assets/{button-UfWqfnW6.js → button-eIETQb0Y.js} +1 -1
- package/dist/client/assets/{card-sOD0ZSWO.js → card-BeaxjjFM.js} +1 -1
- package/dist/client/assets/checkbox-BO8-3DdS.js +1 -0
- package/dist/client/assets/collection-detail-B-fRum6Q.js +1 -0
- package/dist/client/assets/collection-display-button--hU2cKng.js +1 -0
- package/dist/client/assets/{collection-header-DqX3M1ox.js → collection-header-LJs-cTFu.js} +1 -1
- package/dist/client/assets/{collection-page-iotK2mh3.js → collection-page-QhbCfH_v.js} +1 -1
- package/dist/client/assets/collection-search-uhjPIekp.js +1 -0
- package/dist/client/assets/collection-table-wrapper-DqGkk2i2.js +1 -0
- package/dist/client/assets/{connection-card-C-M_OhaM.js → connection-card-BQ92NHJ6.js} +1 -1
- package/dist/client/assets/connection-detail-Doa-5y7y.js +1 -0
- package/dist/client/assets/connections-CKgEGrXv.js +1 -0
- package/dist/client/assets/{core-Bc2cJJ2B.js → core-BUY47BFk.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-D5OVpWvl.js → create-organization-dialog-ELVAlnoy.js} +1 -1
- package/dist/client/assets/dialog-BNPGtupv.js +1 -0
- package/dist/client/assets/dropdown-menu-DKiYuSii.js +1 -0
- package/dist/client/assets/error-boundary-CBpLdCwg.js +1 -0
- package/dist/client/assets/{extract-connection-data-CegZyyXr.js → extract-connection-data-DNQ4aWdY.js} +1 -1
- package/dist/client/assets/{form-qod6mSHT.js → form-B0VrU06h.js} +1 -1
- package/dist/client/assets/gateway-detail-CHVOIkdN.js +1 -0
- package/dist/client/assets/gateways-CYwdvgYO.js +1 -0
- package/dist/client/assets/home-CEeMX4S7.js +1 -0
- package/dist/client/assets/index-BxZYaQlu.css +1 -0
- package/dist/client/assets/{index-CbCySsU3.js → index-CF_OPzOB.js} +1 -1
- package/dist/client/assets/{index-BNPz145B.js → index-CQXdtGjW.js} +18 -18
- package/dist/client/assets/{index-ckOjSsbf.js → index-Dbugj1Qf.js} +15 -15
- package/dist/client/assets/{index-C3PHf_xm.js → index-qnfTBZZC.js} +1 -1
- package/dist/client/assets/{input-CwErI3qM.js → input-BWvhkgtS.js} +1 -1
- package/dist/client/assets/json-CdX173bs.js +1 -0
- package/dist/client/assets/layout-CX25ELhh.js +1 -0
- package/dist/client/assets/{lazy-highlighter-C8GswYw8.js → lazy-highlighter-CYdbIXwO.js} +1 -1
- package/dist/client/assets/{localstorage-keys-D96DvQfm.js → localstorage-keys-7rhieZF2.js} +1 -1
- package/dist/client/assets/{login-Bg1NB9rR.js → login-BGPiojdD.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D8oBlZpZ.js → mcp-oauth-jtPwlXEu.js} +1 -1
- package/dist/client/assets/members--_b0JG9-.js +3 -0
- package/dist/client/assets/monitoring-DQbjjkaJ.js +1 -0
- package/dist/client/assets/oauth-callback-W0Zj4QZg.js +1 -0
- package/dist/client/assets/page-B1COFi93.js +21 -0
- package/dist/client/assets/{popover-B66u-nYn.js → popover-Cyo3vdtr.js} +1 -1
- package/dist/client/assets/prism-light-Dkb0faFA.js +1 -0
- package/dist/client/assets/resource-tabs-DMxDPvak.js +1 -0
- package/dist/client/assets/{schema-DVGSbEVo.js → schema-CcVe4fys.js} +1 -1
- package/dist/client/assets/select-BoIpHU2H.js +1 -0
- package/dist/client/assets/settings-DjDQwsDk.js +1 -0
- package/dist/client/assets/shell-layout-t3dkCYaC.js +124 -0
- package/dist/client/assets/{spinner-B5hpYDWD.js → spinner-BgLCN9p1.js} +1 -1
- package/dist/client/assets/store-D8WGhqyG.js +1 -0
- package/dist/client/assets/store-app-detail-BaZsMlnc.js +1 -0
- package/dist/client/assets/{switch-YzLtFOTn.js → switch-nOTvNKSU.js} +1 -1
- package/dist/client/assets/{textarea-DdWHnTcH.js → textarea-GonRChaT.js} +1 -1
- package/dist/client/assets/tool-set-selector-BbP0pfb9.js +1 -0
- package/dist/client/assets/tooltip-C_Is8XE4.js +1 -0
- package/dist/client/assets/types-Kjt4sgIB.js +45 -0
- package/dist/client/assets/{use-binding-BDNnvRc3.js → use-binding-FqyuxtmF.js} +1 -1
- package/dist/client/assets/use-connection-BcR9UFbs.js +2 -0
- package/dist/client/assets/{use-gateway-CQn5-Udm.js → use-gateway-DARIvLcH.js} +1 -1
- package/dist/client/assets/use-list-state-DTFI-io6.js +1 -0
- package/dist/client/assets/{use-mcp-sqfwIh1y.js → use-mcp-BHfi5-go.js} +1 -1
- package/dist/client/assets/{use-members-B55Npjtk.js → use-members-C4kUxhI6.js} +1 -1
- package/dist/client/assets/{use-mobile-c3XFiGhb.js → use-mobile-BAgI68xi.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CbNhltyL.js → use-organization-settings-Bdum0zz2.js} +1 -1
- package/dist/client/assets/{use-tool-call-DtbPDnAJ.js → use-tool-call-rEALkXUX.js} +1 -1
- package/dist/client/assets/useQuery-BrB4rOUi.js +1 -0
- package/dist/client/assets/utils-C9RgqtL7.js +1 -0
- package/dist/client/assets/well-known-mcp-D-VmC-4r.js +1 -0
- package/dist/client/index.html +2 -2
- package/package.json +2 -2
- package/dist/client/assets/avatar-Bv1o4qKK.js +0 -1
- package/dist/client/assets/checkbox-D7oSBQoW.js +0 -1
- package/dist/client/assets/circle-alert-Bqyf_cFr.js +0 -1
- package/dist/client/assets/collection-detail-CFaEtQUQ.js +0 -1
- package/dist/client/assets/collection-display-button-CwZeJFt8.js +0 -1
- package/dist/client/assets/collection-search-Bjsljx6L.js +0 -1
- package/dist/client/assets/collection-table-wrapper-D98e-gOY.js +0 -1
- package/dist/client/assets/connection-detail-DyrpnaaF.js +0 -1
- package/dist/client/assets/connections-9V8o8mb9.js +0 -1
- package/dist/client/assets/dialog-B9ivHqL_.js +0 -1
- package/dist/client/assets/dropdown-menu-B7djqSa8.js +0 -1
- package/dist/client/assets/empty-state-1y2EWg7D.js +0 -1
- package/dist/client/assets/error-boundary-CcJOnlMu.js +0 -1
- package/dist/client/assets/gateway-detail-Btwy-2lU.js +0 -1
- package/dist/client/assets/gateways-CjCjBtBk.js +0 -1
- package/dist/client/assets/home-GbOyPoEE.js +0 -1
- package/dist/client/assets/icon-DrnCTy8O.js +0 -1
- package/dist/client/assets/index-jCYwKfly.css +0 -1
- package/dist/client/assets/json-CwrUFc5m.js +0 -1
- package/dist/client/assets/layout-CRWUQVBf.js +0 -1
- package/dist/client/assets/members-KUdSr0Tz.js +0 -3
- package/dist/client/assets/monitoring-bEF5gLc4.js +0 -1
- package/dist/client/assets/oauth-callback-r_srb_7W.js +0 -1
- package/dist/client/assets/page-DTw69DsB.js +0 -21
- package/dist/client/assets/prism-light-gvcLvWKy.js +0 -1
- package/dist/client/assets/resource-tabs-C-xGyATo.js +0 -1
- package/dist/client/assets/select-CccYpzrg.js +0 -1
- package/dist/client/assets/settings-BrO1nb9m.js +0 -1
- package/dist/client/assets/shell-layout-H6nBvEMc.js +0 -124
- package/dist/client/assets/store-aQG8A1DY.js +0 -1
- package/dist/client/assets/store-app-detail-Cb0AL9io.js +0 -1
- package/dist/client/assets/tool-set-selector-DHYjwwOX.js +0 -1
- package/dist/client/assets/tooltip-BEGc6-ta.js +0 -1
- package/dist/client/assets/types-DZHDmJVB.js +0 -45
- package/dist/client/assets/upload-ROO0Hq6M.js +0 -1
- package/dist/client/assets/use-connection-IoNoQwc6.js +0 -2
- package/dist/client/assets/use-list-state-DRmAmaM0.js +0 -1
- package/dist/client/assets/useQuery-CBshJqa8.js +0 -1
- package/dist/client/assets/utils-pyEEdArk.js +0 -1
- package/dist/client/assets/well-known-mcp-Dg77mwx9.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,
|
|
1
|
+
import{r as i,aO as A,at as $,j as c,aP as L,ax as z,aQ as G,aL as _,au as j,av as P,aR as w,aM as E,aS as H,aT as K,aU as U,aV as V,aW as W,aX as Z,aY as Q,aZ as X,a_ as Y,c as R}from"./index-Dbugj1Qf.js";import{c as q}from"./utils-C9RgqtL7.js";var m="Popover",[b]=z(m,[A]),g=A(),[B,d]=b(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:a,modal:s=!1}=t,p=g(e),l=i.useRef(null),[u,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:a,caller:m});return c.jsx(L,{...p,children:c.jsx(B,{scope:e,contentId:G(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(C=>!C),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:s,children:o})})};N.displayName=m;var F="PopoverAnchor",J=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),a=g(o),{onCustomAnchorAdd:s,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(s(),()=>p()),[s,p]),c.jsx(w,{...a,...r,ref:e})});J.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(S,o),a=g(o),s=_(e,n.triggerRef),p=c.jsx(j.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:s,onClick:P(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(w,{asChild:!0,...a,children:p})});y.displayName=S;var O="PopoverPortal",[ee,oe]=b(O,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,a=d(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(E,{present:o||a.open,children:c.jsx(H,{asChild:!0,container:n,children:r})})})};M.displayName=O;var v="PopoverContent",D=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,a=d(v,t.__scopePopover);return c.jsx(E,{present:r||a.open,children:a.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});D.displayName=v;var te=V("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=_(e,r),a=i.useRef(!1);return i.useEffect(()=>{const s=r.current;if(s)return K(s)},[]),c.jsx(U,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(t.onCloseAutoFocus,s=>{s.preventDefault(),a.current||o.triggerRef.current?.focus()}),onPointerDownOutside:P(t.onPointerDownOutside,s=>{const p=s.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:P(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||o.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const s=a.target;o.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...x}=t,f=d(v,o),C=g(o);return W(),c.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:c.jsx(Q,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(X,{"data-state":I(f.open),role:"dialog",id:f.contentId,...C,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",ae=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(k,o);return c.jsx(j.button,{type:"button",...r,ref:e,onClick:P(t.onClick,()=>n.onOpenChange(!1))})});ae.displayName=k;var se="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=g(o);return c.jsx(Y,{...n,...r,ref:e})});ce.displayName=se;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=M,ue=D;function ve(t){const e=R.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=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.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=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,a;e[0]!==t?({className:o,align:n,sideOffset:a,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=a):(o=e[1],r=e[2],n=e[3],a=e[4]);const s=n===void 0?"center":n,p=a===void 0?4:a;let l;e[5]!==o?(l=q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==s||e[8]!==r||e[9]!==p||e[10]!==l?(u=c.jsx(le,{children:c.jsx(ue,{"data-slot":"popover-content",align:s,sideOffset:p,className:l,...r})}),e[7]=s,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}export{ve as P,Pe as a,ge as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as i}from"./core-BUY47BFk.js";import{X as s}from"./index-Dbugj1Qf.js";var g=o();const t=s(g);var a=i(t,{});a.registerLanguage=function(e,r){return t.register(r)};a.alias=function(e,r){return t.alias(e,r)};export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a2 as Q,j as t,c as H,a5 as U,r as L}from"./index-Dbugj1Qf.js";import{u as W}from"./useQuery-BrB4rOUi.js";import{i as Y}from"./File06-sb4CceKn.js";import{i as J}from"./Loading01-Dp6sT3Mq.js";import{e as P}from"./registry-utils-ulDDT0d8.js";import{C as X}from"./collection-display-button--hU2cKng.js";import{C as Z}from"./collection-search-uhjPIekp.js";import{C as ee}from"./collection-table-wrapper-DqGkk2i2.js";import{E as K}from"./SearchMd-3u9z3FIP.js";import{I as te}from"./use-connection-BcR9UFbs.js";import{C as oe}from"./card-BeaxjjFM.js";import{V as re}from"./layout-CX25ELhh.js";import{c as M}from"./utils-C9RgqtL7.js";import{B as se}from"./badge-gmsvp75V.js";import{B as ne}from"./button-eIETQb0Y.js";function ae(o){return o.replace(/<a[^>]*class="[^"]*anchor[^"]*"[^>]*>.*?<\/a>/gi,"")}function ie(o){return o.replace(/<a\s+([^>]*href="[^"]*"[^>]*)>/gi,(e,a)=>a.includes("target=")?e.replace(/target="[^"]*"/gi,'target="_blank"'):`<a ${a} target="_blank" rel="noopener noreferrer">`)}function le(o){let e=ae(o);return e=ie(e),e}function ke({repository:o}){const e=o?P(o):null,{data:a,isLoading:c}=W({queryKey:Q.githubReadme(e?.owner,e?.repo),queryFn:async()=>{if(!e)return null;try{const s=await fetch(`https://api.github.com/repos/${e.owner}/${e.repo}/readme`,{headers:{Accept:"application/vnd.github.v3.html"}});if(!s.ok){if(s.status===404)return null;throw new Error(`Failed to fetch README: ${s.statusText}`)}const m=await s.text();return le(m)}catch(s){return console.error("Error fetching README:",s),null}},enabled:!!e&&!!o,staleTime:3600*1e3,gcTime:1440*60*1e3});return c?t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx(J,{size:32,className:"animate-spin text-muted-foreground"})}):a?t.jsx("div",{className:"p-5 markdown-body",style:{backgroundColor:"transparent"},dangerouslySetInnerHTML:{__html:a}}):t.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center p-6",children:[t.jsx(Y,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"README not found"}),t.jsx("p",{className:"text-muted-foreground max-w-md",children:"This repository doesn't have a README file, or it's not publicly accessible."})]})}function $e(o){const e=H.c(39),{tools:a,connectionId:c,org:s,onToolClick:m,showToolbar:u,emptyMessage:f}=o,h=u===void 0?!0:u,p=f===void 0?"This connection doesn't have any tools yet.":f,d=U(),[n,A]=L.useState(""),[x,F]=L.useState("table"),[i,_]=L.useState("name"),[l,V]=L.useState("asc");let C;e[0]!==l||e[1]!==i?(C=r=>{i===r?(V(fe),l==="desc"&&_(void 0)):(_(r),V("asc"))},e[0]=l,e[1]=i,e[2]=C):C=e[2];const g=C;let S;e[3]!==c||e[4]!==d||e[5]!==m||e[6]!==s?(S=r=>{m?m(r):c&&s&&d({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:s,connectionId:c,collectionName:"tools",itemId:encodeURIComponent(r.name)}})},e[3]=c,e[4]=d,e[5]=m,e[6]=s,e[7]=S):S=e[7];const T=S;let E;if(e[8]!==n||e[9]!==l||e[10]!==i||e[11]!==a){const r=!a||a.length===0?[]:n.trim()?(()=>{const I=n.toLowerCase();return a.filter(w=>w.name.toLowerCase().includes(I)||w.description&&w.description.toLowerCase().includes(I))})():a;E=!i||!l?r:[...r].sort((I,w)=>{const G=I[i]||"",O=w[i]||"",B=String(G).localeCompare(String(O));return l==="asc"?B:-B}),e[8]=n,e[9]=l,e[10]=i,e[11]=a,e[12]=E}else E=e[12];const v=E;let R;e[13]===Symbol.for("react.memo_cache_sentinel")?(R=[{id:"name",header:"Name",render:ue,sortable:!0},{id:"description",header:"Description",render:de,cellClassName:"flex-1",sortable:!0}],e[13]=R):R=e[13];const z=R;let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=z.filter(me).map(ce),e[14]=k):k=e[14];const q=k;let b;e[15]!==g||e[16]!==h||e[17]!==l||e[18]!==i||e[19]!==x?(b=h&&t.jsx(re,{children:t.jsx(X,{viewMode:x,onViewModeChange:F,sortKey:i,sortDirection:l,onSort:g,sortOptions:q})}),e[15]=g,e[16]=h,e[17]=l,e[18]=i,e[19]=x,e[20]=b):b=e[20];let $;e[21]===Symbol.for("react.memo_cache_sentinel")?($=r=>{r.key==="Escape"&&(A(""),r.target.blur())},e[21]=$):$=e[21];let j;e[22]!==n?(j=t.jsx(Z,{value:n,onChange:A,placeholder:"Search tools...",onKeyDown:$}),e[22]=n,e[23]=j):j=e[23];let N;e[24]!==p||e[25]!==g||e[26]!==T||e[27]!==n||e[28]!==l||e[29]!==i||e[30]!==v||e[31]!==x?(N=x==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:v.length===0?t.jsx(K,{image:null,title:n?"No tools found":"No tools available",description:n?"Try adjusting your search terms":p}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:v.map(r=>t.jsx(oe,{className:"cursor-pointer transition-colors",onClick:()=>T(r),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(te,{icon:null,name:r.name,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:r.name}),t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:r.description||"No description"})]})]})},r.name))})}):t.jsx(ee,{columns:z,data:v,isLoading:!1,sortKey:i,sortDirection:l,onSort:g,onRowClick:r=>T(r),emptyState:t.jsx(K,{image:null,title:n?"No tools found":"No tools available",description:n?"Try adjusting your search terms":p})}),e[24]=p,e[25]=g,e[26]=T,e[27]=n,e[28]=l,e[29]=i,e[30]=v,e[31]=x,e[32]=N):N=e[32];let y;e[33]!==j||e[34]!==N?(y=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[j,N]}),e[33]=j,e[34]=N,e[35]=y):y=e[35];let D;return e[36]!==y||e[37]!==b?(D=t.jsxs(t.Fragment,{children:[b,y]}),e[36]=y,e[37]=b,e[38]=D):D=e[38],D}function ce(o){return{id:o.id,label:typeof o.header=="string"?o.header:o.id}}function me(o){return o.sortable}function de(o){return t.jsx("span",{className:"text-sm text-foreground",children:o.description||"—"})}function ue(o){return t.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:o.name})}function fe(o){return o==="asc"?"desc":o==="desc"?null:"asc"}function De(o){const e=H.c(12),{tabs:a,activeTab:c,onTabChange:s,className:m}=o;let u;e[0]!==m?(u=M("flex items-center gap-2 overflow-x-auto no-scrollbar",m),e[0]=m,e[1]=u):u=e[1];let f;if(e[2]!==c||e[3]!==s||e[4]!==a){let p;e[6]!==c||e[7]!==s?(p=d=>{const n=c===d.id;return t.jsxs(ne,{variant:"outline",size:"sm",onClick:()=>s(d.id),className:M("h-8 rounded-lg border border-transparent bg-transparent px-3 py-1 hover:bg-muted",n&&"bg-muted border-input text-foreground font-medium",!n&&"text-muted-foreground font-normal"),children:[d.label,d.count!==void 0&&t.jsx(se,{variant:"secondary",className:M("ml-2 h-5 min-w-5 px-1 rounded-full text-[10px] font-mono",n?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:d.count})]},d.id)},e[6]=c,e[7]=s,e[8]=p):p=e[8],f=a.map(p),e[2]=c,e[3]=s,e[4]=a,e[5]=f}else f=e[5];let h;return e[9]!==u||e[10]!==f?(h=t.jsx("div",{className:u,children:f}),e[9]=u,e[10]=f,e[11]=h):h=e[11],h}export{De as R,$e as T,ke as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ap as a,
|
|
1
|
+
import{ap as a,by as i,aE as n,aF as t,aq as e,bz as o}from"./index-Dbugj1Qf.js";const r=a({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:n(e()),grantType:i(["authorization_code","client_credentials"])}),s=a({name:e(),description:e().optional(),inputSchema:t(o()),outputSchema:t(o()).optional()}),c=a({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),connection_type:i(["HTTP","SSE","Websocket"]).describe("Type of connection"),connection_url:e().describe("URL for the connection"),connection_token:e().nullable().describe("Authentication token"),connection_headers:t(e(),e()).nullable().describe("Custom headers"),oauth_config:r.nullable().describe("OAuth configuration"),configuration_state:t(o()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:n(e()).nullable().optional().describe("Configuration scopes"),metadata:t(o()).nullable().describe("Additional metadata (includes repository info)"),tools:n(s).nullable().describe("Discovered tools from MCP"),bindings:n(e()).nullable().describe("Detected bindings"),status:i(["active","inactive","error"]).describe("Current status")});c.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0});c.partial();export{c as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,aO as Pe,aA as rt,at as _e,j as d,aP as st,ax as lt,aQ as Ie,bx as at,aL as k,aR as it,au as j,av as N,aN as $,aS as ct,b1 as Ee,bv as dt,a0 as ut,aT as pt,aW as ft,aU as mt,aV as ht,aX as vt,aY as gt,aZ as xt,a_ as St,c as ee}from"./index-Dbugj1Qf.js";import{V as wt,i as yt}from"./tooltip-C_Is8XE4.js";import{t as Re}from"./ChevronDown-CLC0yxsk.js";import{c as oe}from"./utils-C9RgqtL7.js";function Ne(n,[e,t]){return Math.min(t,Math.max(e,n))}var Ct=[" ","Enter","ArrowUp","ArrowDown"],bt=[" ","Enter"],Q="Select",[de,ue,It]=at(Q),[ne]=lt(Q,[It,Pe]),pe=Pe(),[Tt,G]=ne(Q),[_t,Nt]=ne(Q),je=n=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:r,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:w,required:y,form:S}=n,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[U,M]=c.useState(!1),re=rt(u),[P,O]=_e({prop:o,defaultProp:r??!1,onChange:i,caller:Q}),[W,q]=_e({prop:s,defaultProp:l,onChange:a,caller:Q}),L=c.useRef(null),B=v?S||!!v.closest("form"):!0,[F,V]=c.useState(new Set),H=Array.from(F).map(E=>E.props.value).join(";");return d.jsx(st,{...p,children:d.jsxs(Tt,{required:y,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:U,onValueNodeHasChildrenChange:M,contentId:Ie(),value:W,onValueChange:q,open:P,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:w,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(_t,{scope:n.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Je,{"aria-hidden":!0,required:y,tabIndex:-1,name:h,autoComplete:g,value:W,onChange:E=>q(E.target.value),disabled:w,form:S,children:[W===void 0?d.jsx("option",{value:""}):null,Array.from(F)]},H):null]})})};je.displayName=Q;var Me="SelectTrigger",Ae=c.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:o=!1,...r}=n,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[g,w,y]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),y()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(it,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...r,ref:a,onClick:N(r.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:N(r.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(r.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&w(p.key),!(v&&p.key===" ")&&Ct.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,children:i,placeholder:s="",...l}=n,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var Pt="SelectIcon",ke=c.forwardRef((n,e)=>{const{__scopeSelect:t,children:o,...r}=n;return d.jsx(j.span,{"aria-hidden":!0,...r,ref:e,children:o||"▼"})});ke.displayName=Pt;var Et="SelectPortal",Le=n=>d.jsx(ct,{asChild:!0,...n});Le.displayName=Et;var J="SelectContent",Be=c.forwardRef((n,e)=>{const t=G(J,n.__scopeSelect),[o,r]=c.useState();if($(()=>{r(new DocumentFragment)},[]),!t.open){const i=o;return i?Ee.createPortal(d.jsx(Ve,{scope:n.__scopeSelect,children:d.jsx(de.Slot,{scope:n.__scopeSelect,children:d.jsx("div",{children:n.children})})}),i):null}return d.jsx(He,{...n,ref:e})});Be.displayName=J;var A=10,[Ve,Y]=ne(J),Rt="SelectContentImpl",jt=ht("SelectContent.RemoveScroll"),He=c.forwardRef((n,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=n,m=G(J,t),[x,U]=c.useState(null),[M,re]=c.useState(null),P=k(e,f=>U(f)),[O,W]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[F,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return pt(x)},[x]),ft();const E=c.useCallback(f=>{const[T,...R]=B().map(_=>_.ref.current),[b]=R.slice(-1),I=document.activeElement;for(const _ of f)if(_===I||(_?.scrollIntoView({block:"nearest"}),_===T&&M&&(M.scrollTop=0),_===b&&M&&(M.scrollTop=M.scrollHeight),_?.focus(),document.activeElement!==I))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{F&&D()},[F,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=b=>{f={x:Math.abs(Math.round(b.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(b.pageY)-(K.current?.y??0))}},R=b=>{f.x<=10&&f.y<=10?b.preventDefault():x.contains(b.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),b=ot(T,f,R);b&&setTimeout(()=>b.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const b=!H.current&&!R;(m.value!==void 0&&m.value===T||b)&&(W(f),b&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const b=!H.current&&!R;(m.value!==void 0&&m.value===T||b)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:F,searchRef:fe,children:d.jsx(mt,{as:jt,allowPinchZoom:!0,children:d.jsx(vt,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:N(r,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(gt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:N(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let b=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(b=b.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,_=b.indexOf(I);b=b.slice(_+1)}setTimeout(()=>E(b)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:o,...r}=n,i=G(J,t),s=Y(J,t),[l,a]=c.useState(null),[u,h]=c.useState(null),g=k(e,P=>h(P)),w=ue(t),y=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&v&&C){const P=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),W=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,_=W.left-I,X=P.left-_,Z=P.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,_=window.innerWidth-W.right-I,X=window.innerWidth-P.right-_,Z=P.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=w(),B=window.innerHeight-A*2,F=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+F+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=P.top+P.height/2-A,ie=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const _=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(I?he:0)+_+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>y.current=!0)}},[w,i.trigger,i.valueNode,l,u,p,v,C,i.dir,o]);$(()=>x(),[x]);const[U,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(P=>{P&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:y,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:U},children:d.jsx(j.div,{...r,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((n,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:r=A,...i}=n,s=pe(t);return d.jsx(xt,{...s,...i,ref:e,align:o,collisionPadding:r,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(J,{}),we="SelectViewport",Ue=c.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:o,...r}=n,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:N(r.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:w}=s;if(w?.current&&g){const y=Math.abs(a.current-h.scrollTop);if(y>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+y,x=Math.min(S,m),U=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=U>0?U:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Ue.displayName=we;var We="SelectGroup",[Dt,kt]=ne(We),Lt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=Ie();return d.jsx(Dt,{scope:t,id:r,children:d.jsx(j.div,{role:"group","aria-labelledby":r,...o,ref:e})})});Lt.displayName=We;var Fe="SelectLabel",Bt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=kt(Fe,t);return d.jsx(j.div,{id:r.id,...o,ref:e})});Bt.displayName=Fe;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((n,e)=>{const{__scopeSelect:t,value:o,disabled:r=!1,textValue:i,...s}=n,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,g]=c.useState(i??""),[w,y]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,r)),p=Ie(),v=c.useRef("touch"),C=()=>{r||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:r,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:r,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>y(!0)),onBlur:N(s.onBlur,()=>y(!1)),onClick:N(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:N(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:N(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:N(s.onPointerMove,m=>{v.current=m.pointerType,r?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(bt.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,...i}=n,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Nt(le,t),[h,g]=c.useState(null),w=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),y=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:y},a.value),[a.disabled,a.value,y]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:w}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ee.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var ye="SelectScrollUpButton",Xe=c.forwardRef((n,e)=>{const t=Y(ye,n.__scopeSelect),o=Te(ye,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Qe,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=ye;var Ce="SelectScrollDownButton",Ze=c.forwardRef((n,e)=>{const t=Y(Ce,n.__scopeSelect),o=Te(Ce,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Qe,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=Ce;var Qe=c.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:o,...r}=n,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:N(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(r.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(r.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var be="SelectArrow",Ut=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=pe(t),i=G(be,t),s=Y(be,t);return i.open&&s.position==="popper"?d.jsx(St,{...r,...o,ref:e}):null});Ut.displayName=be;var Wt="SelectBubbleInput",Je=c.forwardRef(({__scopeSelect:n,value:e,...t},o)=>{const r=c.useRef(null),i=k(o,r),s=dt(e);return c.useEffect(()=>{const l=r.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...wt,...t.style},ref:i,defaultValue:e})});Je.displayName=Wt;function et(n){return n===""||n===void 0}function tt(n){const e=ut(n),t=c.useRef(""),o=c.useRef(0),r=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,r,i]}function ot(n,e,t){const r=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?n.indexOf(t):-1;let s=Ft(n,Math.max(i,0));r.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return a!==t?a:void 0}function Ft(n,e){return n.map((t,o)=>n[(e+o)%n.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Ue,Qt=$e,Jt=Ge,eo=qe,to=Xe,oo=Ze;const nt=({size:n=24,color:e="currentColor",...t})=>c.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},c.createElement("path",{d:"m18 15-6-6-6 6"}));nt.displayName="ChevronUp";function co(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(n){const e=ee.c(13);let t,o,r,i;e[0]!==n?({className:o,size:i,children:t,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]: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 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-xl border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-8 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...r,children:[t,a]}),e[8]=t,e[9]=r,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function fo(n){const e=ee.c(20);let t,o,r,i;e[0]!==n?({className:o,children:t,position:i,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?"popper":i,l=s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let a;e[5]!==o||e[6]!==l?(a=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border shadow-md",l,o),e[5]=o,e[6]=l,e[7]=a):a=e[7];let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=d.jsx(no,{}),e[8]=u):u=e[8];const h=s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let g;e[9]!==h?(g=oe("p-1",h),e[9]=h,e[10]=g):g=e[10];let w;e[11]!==t||e[12]!==g?(w=d.jsx(Zt,{className:g,children:t}),e[11]=t,e[12]=g,e[13]=w):w=e[13];let y;e[14]===Symbol.for("react.memo_cache_sentinel")?(y=d.jsx(ro,{}),e[14]=y):y=e[14];let S;return e[15]!==s||e[16]!==r||e[17]!==a||e[18]!==w?(S=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:a,position:s,...r,children:[u,w,y]})}),e[15]=s,e[16]=r,e[17]=a,e[18]=w,e[19]=S):S=e[19],S}function mo(n){const e=ee.c(16);let t,o,r,i;e[0]!==n?({className:o,children:t,hideCheck:i,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-xl py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(yt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Jt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==r||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Qt,{"data-slot":"select-item",className:l,...r,children:[a,u]}),e[11]=r,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(nt,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}function ro(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}export{uo as S,po as a,fo as b,co as c,mo as d,Ne as e,nt as n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a5 as U,a1 as D,r as M,as as B,ar as P,j as s,ap as $,c as K,a6 as y,a2 as q,a as Q,aq as F}from"./index-Dbugj1Qf.js";import{C as T}from"./collection-header-LJs-cTFu.js";import{C as A}from"./collection-page-QhbCfH_v.js";import{u as H}from"./tooltip-C_Is8XE4.js";import{u as Y,B as N}from"./button-eIETQb0Y.js";import{a as G,F as R,b as O,c as E,d as L,f as k,e as J}from"./form-B0VrU06h.js";import{I}from"./input-BWvhkgtS.js";import{i as V}from"./Upload01-Bxain8td.js";import{i as W}from"./X-Bo13gg4P.js";import"./collection-display-button--hU2cKng.js";import"./dropdown-menu-DKiYuSii.js";import"./ChevronRight-YHVS_LDJ.js";import"./utils-C9RgqtL7.js";const X=$({name:F().min(1,"Name is required").max(255,"Name is too long"),slug:F().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:F().optional()});function Z(C){const e=K.c(24),{value:n,onChange:o,name:d}=C,a=M.useRef(null);let m;e[0]!==o?(m=z=>{const w=z.target.files?.[0];if(w){if(w.size>2097152){y.error("Image must be smaller than 2MB");return}const c=new FileReader;c.onerror=()=>{const b=c.error;console.error("FileReader error:",b),y.error(b?.message||"Failed to read image file. Please try again."),a.current&&(a.current.value="")},c.onloadend=()=>{if(c.readyState===FileReader.DONE&&c.result){const b=c.result;o(b)}},c.readAsDataURL(w)}},e[0]=o,e[1]=m):m=e[1];const p=m;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{a.current?.click()},e[2]=i):i=e[2];const t=i;let l;e[3]!==o?(l=z=>{z.stopPropagation(),o("")},e[3]=o,e[4]=l):l=e[4];const r=l;let u;e[5]!==p?(u=s.jsx("input",{type:"file",ref:a,className:"hidden",accept:"image/*",onChange:p}),e[5]=p,e[6]=u):u=e[6];let g;e[7]!==r||e[8]!==d||e[9]!==n?(g=n?s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:s.jsx("img",{src:n,alt:d||"Organization logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:r,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:s.jsx(W,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:t,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground",children:[s.jsx(V,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),e[7]=r,e[8]=d,e[9]=n,e[10]=g):g=e[10];const S=n?"Change Logo":"Upload Logo";let x;e[11]!==S?(x=s.jsx(N,{type:"button",variant:"outline",size:"sm",onClick:t,className:"mb-2",children:S}),e[11]=S,e[12]=x):x=e[12];let h;e[13]!==r||e[14]!==n?(h=n&&s.jsx(N,{type:"button",variant:"ghost",size:"sm",onClick:r,className:"ml-2",children:"Remove"}),e[13]=r,e[14]=n,e[15]=h):h=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),e[16]=j):j=e[16];let f;e[17]!==x||e[18]!==h?(f=s.jsxs("div",{className:"flex-1",children:[x,h,j]}),e[17]=x,e[18]=h,e[19]=f):f=e[19];let v;return e[20]!==f||e[21]!==u||e[22]!==g?(v=s.jsxs("div",{className:"flex items-start gap-4",children:[u,g,f]}),e[20]=f,e[21]=u,e[22]=g,e[23]=v):v=e[23],v}function ue(){const C=U(),{org:e}=H(),n=D(),[o,d]=M.useState(!1),a=B({resolver:P(X),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),m=Y({mutationFn:async t=>{const l={name:t.name,slug:t.slug};t.logo!==void 0&&(l.logo=t.logo||null);const r=await Q.organization.update({organizationId:e.id,data:l});if(r?.error)throw new Error(r.error.message||"Failed to update organization");return r},onSuccess:t=>{n.invalidateQueries({queryKey:q.organizations()}),n.invalidateQueries({queryKey:q.activeOrganization(e.slug)}),y.success("Organization settings updated successfully"),t?.data?.slug&&t.data.slug!==e.slug&&C({to:"/$org/settings",params:{org:t.data.slug}})},onError:t=>{y.error(t instanceof Error?t.message:"Failed to update organization")},onSettled:()=>{d(!1)}}),p=t=>{d(!0),m.mutate(t)},i=a.formState.isDirty;return s.jsxs(A,{children:[s.jsx(T,{title:"Settings"}),s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx("div",{className:"p-5 max-w-2xl",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Organization"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Update your organization's name, slug, and logo."})]}),s.jsx(G,{...a,children:s.jsxs("form",{onSubmit:a.handleSubmit(p),className:"space-y-6",children:[s.jsx(R,{control:a.control,name:"name",render:({field:t})=>s.jsxs(O,{children:[s.jsx(E,{children:"Organization Name"}),s.jsx(L,{children:s.jsx(I,{placeholder:"My Organization",...t,disabled:o})}),s.jsx(k,{})]})}),s.jsx(R,{control:a.control,name:"slug",render:({field:t})=>s.jsxs(O,{children:[s.jsx(E,{children:"Organization Slug"}),s.jsx(L,{children:s.jsx(I,{placeholder:"my-organization",...t,disabled:o,onChange:l=>{const r=l.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");t.onChange(r)}})}),s.jsx(J,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(k,{})]})}),s.jsx(R,{control:a.control,name:"logo",render:({field:t})=>s.jsxs(O,{children:[s.jsx(E,{children:"Logo"}),s.jsx(L,{children:s.jsx(Z,{value:t.value,onChange:t.onChange,name:a.watch("name")})}),s.jsx(k,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(N,{type:"submit",disabled:!i||o,className:"min-w-24",children:o?"Saving...":"Save Changes"}),i&&s.jsx(N,{type:"button",variant:"outline",onClick:()=>a.reset(),disabled:o,children:"Cancel"})]})]})})]})})})})})]})}export{ue as default};
|