PageSourceSearch

https://nullshot.ai/_next/static/chunks/user-list-DftZCcFj.js

js nullshot.ai collected 2026-10-05 12:22:19 UTC 6,874 bytes, 10 lines download raw bytes

1import"./rolldown-runtime--c01j_DQ.js";import{a as e,o as t}from"./framework-CuztCL5H.js";import{t as n}from"./check-CjjFxo53.js";import{t as r}from"./chevron-down-HnHkNIBw.js";import{t as i}from"./globe-BG43-0Yn.js";import{t as a}from"./lock-Bh0_ElZi.js";import{t as o}from"./utils-cKLDJQbe.js";import{t as s}from"./useQuery-6_5udpSh.js";import{n as c}from"./profile-avatar-zDKpvsg7.js";import{a as l,h as u,l as d,p as f,r as p,t as m}from"./dropdown-menu-CmeqQ_0U.js";import"./useJamChatState-B_MCbKBf.js";import"./useJamAppSelection-Ci9Gb5VB.js";import"./useJamAppPreview-Bg-iLGNG.js";import"./usePreviewRefresh-BIypmgai.js";import"./useJamRoom-CbyGrNQ8.js";import"./useJamMerge-DdVVRABW.js";import"./useDeploymentVersions-D76y2Ijl.js";import"./useJamReview-2IIsJM3V.js";import"./useJamPublish-BjkGaw3l.js";import"./useJamShareModals-02Ic_6tg.js";import"./useJamGithubUrl-CA94PaCe.js";import"./useJamAppsContainer-BRl2sj7E.js";import"./useJamRoomData-CtHrjq4m.js";import"./useJamRoomClient-rfhrnLwh.js";import"./useVisitedJams-CeCEA3XL.js";import"./useJamMembers-CF6PcN5N.js";import"./useJamMessages-CcyhfCk3.js";import"./useJamChatPermissions-D1dDBh5w.js";import"./useRoomPresence-Bvm-Vw_1.js";import"./useJamChat-D-v2NhA7.js";import"./useJamChatMessageActions-Blv7vXWe.js";import"./useJamChatSend-UdQJfoqU.js";import"./useJamResumeSession-C5UeyyS2.js";import"./useTodos-Chr1dyvN.js";import"./useJamAppPathname-Bp6oRq6g.js";import"./useJamAppRouter-BdntjG3b.js";import"./useJamAppsSession-w7unwDuy.js";import"./useJamAppsFeatureFlags-Ujz07E5K.js";import"./useJamInputFeatureGateProps-B_bmcYfd.js";import"./useClawCommandComposerPrefill-DZqTFeIk.js";import"./useJamRoomBetaAccessAllowed-H0GF7R78.js";import"./useFetchedJson-MzP2m-LB.js";import"./useJamSkills-CI2ns044.js";import{t as h}from"./RoomAvatar-B9zHvaej.js";var g={all:[`roomViewerCount`],room:e=>[...g.all,e]},_=`
2  query GetRoomViewerCount($roomId: ID!) {
3    roomViewerCount(roomId: $roomId) {
4      total
5      anonymous
6      authenticated
7      roomId
8    }
9  }
10`;async function v(e){let t=await(await fetch(`/api/graphql`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({query:_,variables:{roomId:e}})})).json();return t.errors?(console.warn(`[useRoomViewerCount] Query error:`,t.errors[0].message),{total:0,anonymous:0,authenticated:0}):t.data?.roomViewerCount||{total:0,anonymous:0,authenticated:0}}function y({roomId:e,enabled:t=!0,pollInterval:n=3e4}){let r=s({queryKey:g.room(e),queryFn:()=>v(e),enabled:t&&!!e,refetchInterval:n,staleTime:n/2});return{viewerCount:r.data??null,total:r.data?.total??0,anonymous:r.data?.anonymous??0,authenticated:r.data?.authenticated??0,isLoading:r.isLoading,error:r.error,refetch:()=>r.refetch()}}var b=e();function x({isPublic:e}){return(0,b.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,height:24,padding:`0 12px`,background:e?`#0D525B`:`#144A78`,borderRadius:4,flexShrink:0},children:[e?(0,b.jsx)(i,{size:14,strokeWidth:1.5,style:{color:`#00e0a8`,flexShrink:0}}):(0,b.jsx)(a,{size:14,strokeWidth:1.5,style:{color:`#90B7FF`,flexShrink:0}}),(0,b.jsx)(`span`,{style:{fontFamily:`"Space Grotesk", sans-serif`,fontSize:12,fontWeight:700,lineHeight:`normal`,color:e?`#00e0a8`:`#90B7FF`,whiteSpace:`nowrap`},children:e?`Public`:`Private`})]})}t();var S=[`Viewer`,`Co-Owner`,`Editor`],C={fontFamily:`"Space Grotesk", sans-serif`,lineHeight:`normal`};function w({initials:e,avatarSrc:t,avatarRole:n}){return t===`nullshot-ai`?(0,b.jsx)(c,{role:`nullshot-ai`,size:`sm`}):(0,b.jsx)(h,{src:t,name:e,role:n??`default`,size:`sm`})}function T({label:e,value:t,isOwner:i,viewerRole:a,isSelf:s,onSelect:c,onRemove:h}){if(i)return(0,b.jsx)(`span`,{style:{...C,fontSize:12,fontWeight:400,color:`rgba(255,255,255,0.4)`},children:`Owner`});let g=t===`Co-Owner`,_=a===`CO_OWNER`&&g&&!s,v=s?t===`Co-Owner`?new Set([`Co-Owner`]):t===`Editor`?new Set([`Co-Owner`,`Editor`]):new Set(S):new Set(a===`CO_OWNER`?[`Co-Owner`]:[]),y=!(a===`CO_OWNER`&&g&&!s);if(!(c&&!_||s&&y&&h))return(0,b.jsx)(`span`,{style:{...C,fontSize:12,fontWeight:400,color:`hsl(var(--neutral-white-80))`},children:t});let x=S.filter(s?e=>
10!v.has(e):e=>!(v.has(e)&&e===t));return(0,b.jsxs)(m,{children:[(0,b.jsx)(f,{asChild:!0,children:(0,b.jsxs)(`button`,{type:`button`,"aria-label":`Change role for ${e}`,className:`flex items-center gap-1 rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--tertiary-base))]`,style:{cursor:`pointer`,userSelect:`none`},children:[(0,b.jsx)(`span`,{style:{...C,fontSize:12,fontWeight:400,color:`hsl(var(--neutral-white-80))`},children:t}),(0,b.jsx)(r,{"aria-hidden":`true`,style:{width:12,height:12,color:`hsl(var(--neutral-white-80))`}})]})}),(0,b.jsxs)(p,{align:`end`,sideOffset:4,className:`z-[999999999] !p-2 border-white/10 bg-[hsl(var(--dropdown-content))] dropdown-menu-content-base`,style:u,children:[c&&x.map(e=>{let r=e===t,i=v.has(e);return(0,b.jsxs)(l,{disabled:i,onSelect:()=>!i&&c(e),className:o(`flex items-center justify-between rounded-[8px] gap-2 cursor-pointer outline-none select-none`,`font-['Space_Grotesk'] text-[14px] text-white/80 focus:bg-[#43475E] focus:text-white/80`,r?`font-medium !p-2`:`font-normal !px-2 !py-1`,i&&`cursor-not-allowed opacity-40`),children:[(0,b.jsx)(`span`,{children:e}),r&&(0,b.jsx)(n,{size:12,className:`text-white flex-shrink-0`})]},e)}),y&&h&&(0,b.jsxs)(b.Fragment,{children:[c&&x.length>0&&(0,b.jsx)(d,{className:`my-2 bg-white/[0.12]`}),(0,b.jsx)(l,{onSelect:()=>h(),className:`flex items-center rounded-[8px] gap-2 !px-2 !py-1 cursor-pointer outline-none font-['Space_Grotesk'] font-normal text-[14px] text-[hsl(var(--destructive))] focus:bg-[#43475E] focus:text-[hsl(var(--destructive))]`,children:`Remove`})]})]})]})}function E({items:e,viewerRole:t,onRoleChange:n,onRemove:r,className:i}){return(0,b.jsx)(`div`,{className:o(`flex flex-col gap-3 w-full`,i),children:e.map((i,a)=>(0,b.jsxs)(`div`,{className:`flex flex-col gap-3 w-full`,children:[(0,b.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,height:24},children:[(0,b.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,b.jsx)(w,{initials:i.initials,avatarSrc:i.avatarSrc,avatarRole:i.avatarRole}),(0,b.jsxs)(`span`,{style:{...C,fontSize:12,fontWeight:400,color:`#fff`},children:[i.email,i.inviteSent&&(0,b.jsx)(`span`,{style:{color:`rgba(255,255,255,0.4)`},children:` (Invite Sent)`})]})]}),(0,b.jsx)(T,{label:i.email,value:i.role,isOwner:i.isOwner,viewerRole:t,isSelf:i.isSelf,onSelect:i.isOwner||!n?void 0:i.isSelf||t===`OWNER`||t===`CO_OWNER`?e=>n(a,e):void 0,onRemove:i.isOwner||!r?void 0:i.isSelf||t===`OWNER`||t===`CO_OWNER`?()=>r(a):void 0})]}),a<e.length-1&&(0,b.jsx)(`div`,{style:{width:`100%`,height:1,background:`rgba(255,255,255,0.08)`}})]},i.id??`${i.email}:${i.inviteSent?`invite`:`member`}`))})}export{x as n,y as r,E as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.