@lacneu/atrium 0.73.0 → 0.74.0

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 (39) hide show
  1. package/dist/assets/{AccessTab-CfqVeF4y.js → AccessTab-C9o_Ckkg.js} +1 -1
  2. package/dist/assets/{AdvancedFilter-DTofOAB2.js → AdvancedFilter-D9g7fwiL.js} +1 -1
  3. package/dist/assets/{AgentFilesTab-Ck8JTlhr.js → AgentFilesTab-B3hXSpOi.js} +1 -1
  4. package/dist/assets/{AnomaliesTab-8gLDlV_x.js → AnomaliesTab-C7qsqP2t.js} +1 -1
  5. package/dist/assets/{AuditTab-DfxVHS4p.js → AuditTab-pBpbZL3I.js} +1 -1
  6. package/dist/assets/{BridgeTab-CDWQaAxq.js → BridgeTab-CNk_ujiv.js} +1 -1
  7. package/dist/assets/{ChatDefaultsTab-BHHSLO8V.js → ChatDefaultsTab-CGEqS-Q0.js} +1 -1
  8. package/dist/assets/{DataTableShell-BmVOWlFf.js → DataTableShell-kyasJLlY.js} +1 -1
  9. package/dist/assets/{DetailChips-DGjzT7c0.js → DetailChips-DpHp26Ty.js} +1 -1
  10. package/dist/assets/{FeedbacksTab-dVhXFVZw.js → FeedbacksTab-BGypr0zN.js} +1 -1
  11. package/dist/assets/{FieldLabel-DaMxfgug.js → FieldLabel-DkF9SVg7.js} +1 -1
  12. package/dist/assets/{FilesTab-DNBWMEcq.js → FilesTab-Bfk5Ln6A.js} +1 -1
  13. package/dist/assets/{FilterBar-Cn8lOUAM.js → FilterBar-BBlpxKV_.js} +1 -1
  14. package/dist/assets/{GroupsTab-BMHBpz3c.js → GroupsTab-BRxeaLls.js} +1 -1
  15. package/dist/assets/{InstancesTab-VRNqbnIX.js → InstancesTab-yJDi-6OT.js} +1 -1
  16. package/dist/assets/{IntegrationsTab-x4dnhsnN.js → IntegrationsTab-B_mCX8gK.js} +1 -1
  17. package/dist/assets/{KpiTab-BuTr1ccB.js → KpiTab-DoxtVPJc.js} +1 -1
  18. package/dist/assets/{PreferencesTab-Ktn0uVxJ.js → PreferencesTab-qgOPGoL2.js} +1 -1
  19. package/dist/assets/{ProjectPage-BO3uLCsu.js → ProjectPage-Cs0ieV_G.js} +1 -1
  20. package/dist/assets/{PromptInjectionsTab-CXpPFktX.js → PromptInjectionsTab-zAV-FCw4.js} +1 -1
  21. package/dist/assets/{RolesTab-C9U0KD0V.js → RolesTab-DneLJW4r.js} +1 -1
  22. package/dist/assets/{ScheduledTab-BFThohPS.js → ScheduledTab-CMh_USdN.js} +1 -1
  23. package/dist/assets/ServiceAccountsTab-BrPe5Tq0.js +1 -0
  24. package/dist/assets/{SubAgentReportsTab-DotJe534.js → SubAgentReportsTab-CCWUsAMk.js} +1 -1
  25. package/dist/assets/{ThemeShowroom-BcQAtrFI.js → ThemeShowroom-BjXETsOz.js} +1 -1
  26. package/dist/assets/{TimeRangePicker-ztWnALaX.js → TimeRangePicker-VLppLLzi.js} +1 -1
  27. package/dist/assets/{TimezoneCombobox-BwnXUF_S.js → TimezoneCombobox-D5Zah5Na.js} +1 -1
  28. package/dist/assets/{TracesTab-DfURv-jj.js → TracesTab-VZ3kBC-t.js} +1 -1
  29. package/dist/assets/{UsersTab-DdJSmbLb.js → UsersTab-D-P072G1.js} +1 -1
  30. package/dist/assets/{VoiceTab-D6Hd4PVF.js → VoiceTab-WUzzL7ba.js} +1 -1
  31. package/dist/assets/{highlighted-body-OFNGDK62-DFqPjMD-.js → highlighted-body-OFNGDK62-BzEfEzSy.js} +1 -1
  32. package/dist/assets/{index-BDdtuQUA.js → index-prfprCdu.js} +5 -5
  33. package/dist/assets/mermaid-GHXKKRXX-CKrctCra.js +1 -0
  34. package/dist/assets/{pdf-O6f4BqH2.js → pdf-BX_kvnaA.js} +1 -1
  35. package/dist/assets/{tabs-BBRUdl3Q.js → tabs-C3uY_Euz.js} +1 -1
  36. package/dist/index.html +1 -1
  37. package/package.json +1 -1
  38. package/dist/assets/ServiceAccountsTab-B4_K98EY.js +0 -1
  39. package/dist/assets/mermaid-GHXKKRXX-C491UnMZ.js +0 -1
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{b as r,d as i,f as a,g as o,n as s,p as c,r as l,y as u}from"./api-BDOBe_HI.js";import{t as d}from"./dist-Ct8KdJzy.js";import{Gt as f,Kt as p,qt as m}from"./index-BDdtuQUA.js";var h=t(e(),1),g=n(),_=`Tabs`,[v,y]=o(_,[m]),b=m(),[x,S]=v(_),C=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:a,onValueChange:o,defaultValue:s,orientation:l=`horizontal`,dir:u,activationMode:f=`automatic`,...p}=e,m=d(u),[h,v]=c({prop:a,onChange:o,defaultProp:s??``,caller:_});return(0,g.jsx)(x,{scope:n,baseId:i(),value:h,onValueChange:v,orientation:l,dir:m,activationMode:f,children:(0,g.jsx)(r.div,{dir:m,"data-orientation":l,...p,ref:t})})});C.displayName=_;var w=`TabsList`,T=h.forwardRef((e,t)=>{let{__scopeTabs:n,loop:i=!0,...a}=e,o=S(w,n),s=b(n);return(0,g.jsx)(p,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:i,children:(0,g.jsx)(r.div,{role:`tablist`,"aria-orientation":o.orientation,...a,ref:t})})});T.displayName=w;var E=`TabsTrigger`,D=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,disabled:a=!1,...o}=e,s=S(E,n),c=b(n),l=A(s.baseId,i),d=j(s.baseId,i),p=i===s.value;return(0,g.jsx)(f,{asChild:!0,...c,focusable:!a,active:p,children:(0,g.jsx)(r.button,{type:`button`,role:`tab`,"aria-selected":p,"aria-controls":d,"data-state":p?`active`:`inactive`,"data-disabled":a?``:void 0,disabled:a,id:l,...o,ref:t,onMouseDown:u(e.onMouseDown,e=>{!a&&e.button===0&&e.ctrlKey===!1?s.onValueChange(i):e.preventDefault()}),onKeyDown:u(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&s.onValueChange(i)}),onFocus:u(e.onFocus,()=>{let e=s.activationMode!==`manual`;!p&&!a&&e&&s.onValueChange(i)})})})});D.displayName=E;var O=`TabsContent`,k=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,forceMount:o,children:s,...c}=e,l=S(O,n),u=A(l.baseId,i),d=j(l.baseId,i),f=i===l.value,p=h.useRef(f);return h.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,g.jsx)(a,{present:o||f,children:({present:n})=>(0,g.jsx)(r.div,{"data-state":f?`active`:`inactive`,"data-orientation":l.orientation,role:`tabpanel`,"aria-labelledby":u,hidden:!n,id:d,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:p.current?`0s`:void 0},children:n&&s})})});k.displayName=O;function A(e,t){return`${e}-trigger-${t}`}function j(e,t){return`${e}-content-${t}`}var M=C,N=T,P=D,F=k;function I({className:e,orientation:t=`horizontal`,...n}){return(0,g.jsx)(M,{"data-slot":`tabs`,"data-orientation":t,className:l(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var L=s(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function R({className:e,variant:t=`default`,...n}){return(0,g.jsx)(N,{"data-slot":`tabs-list`,"data-variant":t,className:l(L({variant:t}),e),...n})}function z({className:e,...t}){return(0,g.jsx)(P,{"data-slot":`tabs-trigger`,className:l(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function B({className:e,...t}){return(0,g.jsx)(F,{"data-slot":`tabs-content`,className:l(`flex-1 text-sm outline-none`,e),...t})}export{z as i,B as n,R as r,I as t};
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{b as r,d as i,f as a,g as o,n as s,p as c,r as l,y as u}from"./api-BDOBe_HI.js";import{t as d}from"./dist-Ct8KdJzy.js";import{Gt as f,Kt as p,qt as m}from"./index-prfprCdu.js";var h=t(e(),1),g=n(),_=`Tabs`,[v,y]=o(_,[m]),b=m(),[x,S]=v(_),C=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:a,onValueChange:o,defaultValue:s,orientation:l=`horizontal`,dir:u,activationMode:f=`automatic`,...p}=e,m=d(u),[h,v]=c({prop:a,onChange:o,defaultProp:s??``,caller:_});return(0,g.jsx)(x,{scope:n,baseId:i(),value:h,onValueChange:v,orientation:l,dir:m,activationMode:f,children:(0,g.jsx)(r.div,{dir:m,"data-orientation":l,...p,ref:t})})});C.displayName=_;var w=`TabsList`,T=h.forwardRef((e,t)=>{let{__scopeTabs:n,loop:i=!0,...a}=e,o=S(w,n),s=b(n);return(0,g.jsx)(p,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:i,children:(0,g.jsx)(r.div,{role:`tablist`,"aria-orientation":o.orientation,...a,ref:t})})});T.displayName=w;var E=`TabsTrigger`,D=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,disabled:a=!1,...o}=e,s=S(E,n),c=b(n),l=A(s.baseId,i),d=j(s.baseId,i),p=i===s.value;return(0,g.jsx)(f,{asChild:!0,...c,focusable:!a,active:p,children:(0,g.jsx)(r.button,{type:`button`,role:`tab`,"aria-selected":p,"aria-controls":d,"data-state":p?`active`:`inactive`,"data-disabled":a?``:void 0,disabled:a,id:l,...o,ref:t,onMouseDown:u(e.onMouseDown,e=>{!a&&e.button===0&&e.ctrlKey===!1?s.onValueChange(i):e.preventDefault()}),onKeyDown:u(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&s.onValueChange(i)}),onFocus:u(e.onFocus,()=>{let e=s.activationMode!==`manual`;!p&&!a&&e&&s.onValueChange(i)})})})});D.displayName=E;var O=`TabsContent`,k=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,forceMount:o,children:s,...c}=e,l=S(O,n),u=A(l.baseId,i),d=j(l.baseId,i),f=i===l.value,p=h.useRef(f);return h.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,g.jsx)(a,{present:o||f,children:({present:n})=>(0,g.jsx)(r.div,{"data-state":f?`active`:`inactive`,"data-orientation":l.orientation,role:`tabpanel`,"aria-labelledby":u,hidden:!n,id:d,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:p.current?`0s`:void 0},children:n&&s})})});k.displayName=O;function A(e,t){return`${e}-trigger-${t}`}function j(e,t){return`${e}-content-${t}`}var M=C,N=T,P=D,F=k;function I({className:e,orientation:t=`horizontal`,...n}){return(0,g.jsx)(M,{"data-slot":`tabs`,"data-orientation":t,className:l(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var L=s(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function R({className:e,variant:t=`default`,...n}){return(0,g.jsx)(N,{"data-slot":`tabs-list`,"data-variant":t,className:l(L({variant:t}),e),...n})}function z({className:e,...t}){return(0,g.jsx)(P,{"data-slot":`tabs-trigger`,className:l(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function B({className:e,...t}){return(0,g.jsx)(F,{"data-slot":`tabs-content`,className:l(`flex-1 text-sm outline-none`,e),...t})}export{z as i,B as n,R as r,I as t};
package/dist/index.html CHANGED
@@ -62,7 +62,7 @@
62
62
  document.documentElement.dataset.motion = "static";
63
63
  })();
64
64
  </script>
65
- <script type="module" crossorigin src="/assets/index-BDdtuQUA.js"></script>
65
+ <script type="module" crossorigin src="/assets/index-prfprCdu.js"></script>
66
66
  <link rel="modulepreload" crossorigin href="/assets/bundle-mjs-C73ZY4La.js">
67
67
  <link rel="modulepreload" crossorigin href="/assets/api-BDOBe_HI.js">
68
68
  <link rel="modulepreload" crossorigin href="/assets/dist-CRehd3tT.js">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lacneu/atrium",
3
- "version": "0.73.0",
3
+ "version": "0.74.0",
4
4
  "description": "Atrium — public, self-hostable, Convex-backed web chat UI for AI agent gateways (OpenClaw today, Hermes next). Ships an origin-agnostic static bundle (Convex URL injected at runtime via /config.json).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1 +0,0 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$M as r,$j as i,AM as ee,BM as te,CM as ne,DM as re,EM as ie,FM as ae,GM as oe,HM as se,IM as ce,JM as le,KM as ue,LM as de,MM as fe,NM as pe,OM as me,PM as he,QM as ge,Qj as a,RM as _e,SM as ve,TM as ye,UM as be,VM as xe,WM as Se,XM as Ce,Xj as o,YM as we,Yj as Te,ZM as Ee,Zj as De,_M as Oe,aM as s,aN as ke,az as c,bM as Ae,cM as l,cN as je,dM as u,dN as Me,eM as d,eN as Ne,fM as f,fN as Pe,gM as p,hM as m,hN as Fe,iM as h,iN as Ie,iz as g,jM as Le,kM as Re,lM as _,lN as v,mM as y,mN as ze,nM as b,nN as Be,nz as Ve,oM as x,oN as He,pM as S,pN as Ue,qM as We,rM as C,rN as Ge,sM as w,sN as Ke,t as T,tM as E,tN as qe,uM as D,uN as O,vM as k,wM as Je,xM as Ye,yM as Xe,zM as Ze}from"./api-BDOBe_HI.js";import{t as A}from"./check-BbblETdU.js";import{r as Qe}from"./dist-Ct8KdJzy.js";import{t as j}from"./button-BXoUycz-.js";import{$ as M,Dt as $e,Et as N,Fn as et,On as P,Pn as tt,Q as F,U as nt,X as I,Z as L,_ as rt,at as R,ct as z,et as B,it as V,jn as it,jt as H,nt as U,ot as W,rt as at,st as G,tt as K}from"./index-BDdtuQUA.js";import{t as ot}from"./FilterBar-Cn8lOUAM.js";import{t as st}from"./DataTableShell-BmVOWlFf.js";import{t as ct}from"./roleDescriptions-BJHinaor.js";var q=t(e(),1),J=n(),lt=[{value:`never`,label:()=>E(),days:null},{value:`30`,label:()=>d(),days:30},{value:`90`,label:()=>i(),days:90}],Y=720*60*60*1e3,X=`__all__`,Z={name:``,roleKey:``,description:``};function Q(){let e=et({from:`/settings/serviceAccounts`}),t=tt({from:`/settings/serviceAccounts`}),n=e.q??``,i=e.status??X,[a,o]=(0,q.useState)(X),Te=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),De=e=>void t({search:t=>({...t,status:e===X?void 0:e})}),Oe=c(T.apiKeys.listServiceAccounts,{filter:{q:n||void 0,role:a===X?void 0:a,disabled:i===X?void 0:i===`disabled`}}),s=c(T.apiKeys.listKeys,{}),l=c(T.apiKeys.listRoles,{}),u=g(T.apiKeys.createServiceAccount),d=g(T.apiKeys.updateServiceAccount),f=g(T.apiKeys.deleteServiceAccount),p=Ve(T.apiKeys.mintApiKey),m=g(T.apiKeys.revokeApiKey),h=nt(),_=$e(),y=n!==``||a!==X||i!==X;function b(){o(X),t({search:{},replace:!0})}let[x,S]=(0,q.useState)(!1),[C,w]=(0,q.useState)(Z),[E,D]=(0,q.useState)(null),[k,A]=(0,q.useState)(new Set),[P,R]=(0,q.useState)(null),z=(0,q.useRef)(!1),[V,U]=(0,q.useState)(new Set),[W,at]=(0,q.useState)({}),[G,K]=(0,q.useState)(null),Y=(0,q.useMemo)(()=>{let e=new Map;for(let t of s??[]){let n=e.get(t.serviceAccountId)??[];n.push(t),e.set(t.serviceAccountId,n)}return e},[s]);function Q(e){A(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}async function ft(){try{E?(await d({serviceAccountId:E,name:C.name,roleKey:C.roleKey,description:C.description}),_.success(pe())):await u({name:C.name,roleKey:C.roleKey,description:C.description||void 0}),w(Z),D(null),S(!1)}catch(e){_.error(E?he():ae(),e)}}function pt(e){w({name:e.name,roleKey:e.roleKey,description:e.description??``}),D(e._id),S(!0)}async function mt(e){if(z.current)return;z.current=!0;let t=W[e._id]??`never`,n=lt.find(e=>e.value===t)?.days??null,r=n?Date.now()+n*24*60*60*1e3:void 0;R(e._id);try{let t=await p({serviceAccountId:e._id,expiresAt:r});K({accountName:e.name,plaintext:t.plaintext,prefix:t.prefix,lastFour:t.lastFour})}catch(e){_.error(fe(),e)}finally{z.current=!1,R(null)}}async function $(e){if(await h({title:Le(),description:(0,J.jsxs)(J.Fragment,{children:[ee(),` `,(0,J.jsx)(`span`,{className:`font-mono`,children:e.name}),` `,Re(),` `,(0,J.jsx)(`strong`,{children:me()}),` `,re()]}),confirmWord:e.name,confirmLabel:ie(),destructive:!0}))try{await f({serviceAccountId:e._id}),_.success(ye(),e.name)}catch(e){_.error(Je(),e)}}async function ht(e){if(await h({title:ne(),description:(0,J.jsxs)(J.Fragment,{children:[ve(),` `,(0,J.jsxs)(`span`,{className:`font-mono`,children:[e.prefix,`…`,e.lastFour]}),` `,Ye()]}),confirmLabel:Ae(),destructive:!0})&&!V.has(e._id)){U(t=>new Set(t).add(e._id));try{await m({keyId:e._id})}catch(e){_.error(Xe(),e)}finally{U(t=>{let n=new Set(t);return n.delete(e._id),n})}}}return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Fe()}),(0,J.jsxs)(ot,{q:n,onQChange:Te,searchPlaceholder:ze(),onReset:b,canReset:y,children:[(0,J.jsxs)(I,{value:a,onValueChange:o,children:[(0,J.jsx)(M,{size:`sm`,className:`w-40`,children:(0,J.jsx)(B,{placeholder:Ue()})}),(0,J.jsxs)(L,{children:[(0,J.jsx)(F,{value:X,children:Pe()}),(l??[]).map(e=>(0,J.jsx)(F,{value:e.key,children:e.key},e._id))]})]}),(0,J.jsxs)(I,{value:i,onValueChange:De,children:[(0,J.jsx)(M,{size:`sm`,className:`w-36`,children:(0,J.jsx)(B,{})}),(0,J.jsxs)(L,{children:[(0,J.jsx)(F,{value:X,children:Me()}),(0,J.jsx)(F,{value:`active`,children:O()}),(0,J.jsx)(F,{value:`disabled`,children:v()})]})]})]}),(0,J.jsx)(st,{title:je(),rows:Oe,addLabel:Ke(),onAdd:()=>{w(Z),D(null),S(!0)},emptyHint:He(),isExpanded:e=>k.has(e._id),renderExpanded:e=>(0,J.jsx)(ut,{account:e,keys:Y.get(e._id)??[],onRevoke:ht,revoking:V}),rowActions:e=>[{label:Be(),onSelect:()=>pt(e)},{label:ke(),onSelect:()=>void mt(e)},{label:k.has(e._id)?Ie():Ge(),onSelect:()=>Q(e._id)},{label:qe(),variant:`destructive`,onSelect:()=>void $(e)}],columns:[{header:``,className:`w-8`,cell:e=>(0,J.jsx)(j,{variant:`ghost`,size:`icon-sm`,"aria-label":k.has(e._id)?Ne():r(),onClick:()=>Q(e._id),children:k.has(e._id)?(0,J.jsx)(Qe,{}):(0,J.jsx)(it,{})})},{header:ge(),sort:e=>e.name,cell:e=>(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`span`,{children:e.name}),e.description?(0,J.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:e.description}):null]})},{header:Ee(),sort:e=>e.roleKey,cell:e=>(0,J.jsx)(N,{variant:`secondary`,children:e.roleKey})},{header:Ce(),sort:e=>+!!e.disabled,cell:e=>e.disabled?(0,J.jsx)(N,{variant:`destructive`,children:v()}):(0,J.jsx)(N,{variant:`outline`,children:O()})},{header:we(),cell:e=>(0,J.jsxs)(I,{value:W[e._id]??`never`,onValueChange:t=>at(n=>({...n,[e._id]:t})),children:[(0,J.jsx)(M,{size:`sm`,className:`w-32`,children:(0,J.jsx)(B,{})}),(0,J.jsx)(L,{children:lt.map(e=>(0,J.jsx)(F,{value:e.value,children:e.label()},e.value))})]})},{header:le(),sort:e=>(Y.get(e._id)??[]).filter(e=>!e.disabled).length,cell:e=>{let t=(Y.get(e._id)??[]).filter(e=>!e.disabled).length;return(0,J.jsx)(`span`,{className:`oc-sa__keycount`,children:P===e._id?We():ue({count:t})})}}]}),(0,J.jsx)(rt,{open:x,onOpenChange:e=>{S(e),e||D(null)},title:E?oe():se(),description:E?Se():xe(),canSubmit:!!(C.name&&C.roleKey),onSubmit:ft,submitLabel:E?be():te(),children:(0,J.jsxs)(`div`,{className:`oc-form`,children:[(0,J.jsxs)(`label`,{className:`oc-field`,children:[(0,J.jsx)(`span`,{className:`oc-field__label`,children:Ze()}),(0,J.jsx)(H,{value:C.name,onChange:e=>w({...C,name:e.target.value})})]}),(0,J.jsxs)(`label`,{className:`oc-field`,children:[(0,J.jsx)(`span`,{className:`oc-field__label`,children:_e()}),(0,J.jsxs)(I,{value:C.roleKey||void 0,onValueChange:e=>w({...C,roleKey:e}),children:[(0,J.jsx)(M,{className:`w-full`,children:(0,J.jsx)(B,{placeholder:de()})}),(0,J.jsx)(L,{children:(l??[]).map(e=>(0,J.jsxs)(F,{value:e.key,children:[e.name,` (`,e.key,`)`]},e._id))})]}),(()=>{let e=(l??[]).find(e=>e.key===C.roleKey),t=e?ct(e):null;return t?(0,J.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:t}):null})()]}),(0,J.jsxs)(`label`,{className:`oc-field`,children:[(0,J.jsx)(`span`,{className:`oc-field__label`,children:ce()}),(0,J.jsx)(H,{value:C.description,onChange:e=>w({...C,description:e.target.value})})]})]})}),(0,J.jsx)(dt,{minted:G,onClose:()=>K(null)})]})}function ut({account:e,keys:t,onRevoke:n,revoking:r}){return(0,J.jsxs)(`div`,{className:`oc-sa__keys`,children:[(0,J.jsxs)(`div`,{className:`oc-sa__keys-head`,children:[k(),` `,(0,J.jsx)(`span`,{className:`font-medium`,children:e.name})]}),t.length===0?(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Oe()}):(0,J.jsxs)(`table`,{className:`oc-sa__keytable`,children:[(0,J.jsx)(`thead`,{children:(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`th`,{children:p()}),(0,J.jsx)(`th`,{children:m()}),(0,J.jsx)(`th`,{children:y()}),(0,J.jsx)(`th`,{children:S()}),(0,J.jsx)(`th`,{children:f()}),(0,J.jsx)(`th`,{children:u()}),(0,J.jsx)(`th`,{})]})}),(0,J.jsx)(`tbody`,{children:t.map(t=>(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`td`,{children:(0,J.jsxs)(`code`,{className:`oc-sa__keyid`,children:[t.prefix,`…`,t.lastFour]})}),(0,J.jsx)(`td`,{children:(0,J.jsx)(N,{variant:`secondary`,children:e.roleKey})}),(0,J.jsx)(`td`,{children:z(t.createdAt)}),(0,J.jsx)(`td`,{className:ft(t.lastUsedAt)?`oc-sa__stale`:``,children:pt(t.lastUsedAt)}),(0,J.jsx)(`td`,{children:mt(t.expiresAt)}),(0,J.jsx)(`td`,{children:$(t)}),(0,J.jsx)(`td`,{className:`text-right`,children:t.disabled?null:(0,J.jsx)(j,{variant:`destructive`,size:`sm`,disabled:r.has(t._id),onClick:()=>n(t),children:r.has(t._id)?D():_()})})]},t._id))})]})]})}function dt({minted:e,onClose:t}){let[n,r]=(0,q.useState)(!1);async function i(){if(e)try{await navigator.clipboard.writeText(e.plaintext),r(!0),window.setTimeout(()=>r(!1),2e3)}catch{}}return(0,J.jsx)(K,{open:e!==null,onOpenChange:e=>{e||(r(!1),t())},children:e?(0,J.jsxs)(U,{className:`max-w-lg`,showCloseButton:!1,onInteractOutside:e=>e.preventDefault(),onEscapeKeyDown:e=>e.preventDefault(),children:[(0,J.jsxs)(R,{children:[(0,J.jsx)(W,{children:l()}),(0,J.jsx)(at,{children:w({name:e.accountName})})]}),(0,J.jsx)(`div`,{className:`oc-sa__minted-warning`,children:x()}),(0,J.jsxs)(`div`,{className:`oc-sa__minted-box`,children:[(0,J.jsx)(`code`,{className:`oc-sa__minted-plain`,children:e.plaintext}),(0,J.jsxs)(j,{variant:`outline`,size:`sm`,onClick:()=>void i(),"aria-label":s(),children:[n?(0,J.jsx)(A,{}):(0,J.jsx)(P,{}),n?h():C()]})]}),(0,J.jsx)(V,{children:(0,J.jsx)(j,{onClick:()=>{r(!1),t()},children:b()})})]}):null})}function ft(e){return e===null?!1:Date.now()-e>Y}function pt(e){return e===null?a():z(e)}function mt(e){return e===null?`—`:G(e)}function $(e){return e.disabled?(0,J.jsx)(N,{variant:`destructive`,children:De()}):e.expiresAt!==null&&e.expiresAt<Date.now()?(0,J.jsx)(N,{variant:`outline`,children:o()}):(0,J.jsx)(N,{variant:`outline`,children:Te()})}export{Q as ServiceAccountsTab};
@@ -1 +0,0 @@
1
- import{mt as e}from"./index-BDdtuQUA.js";export{e as Mermaid};