@snagset/server 0.1.34 → 0.1.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/routes/account.js +9 -1
- package/dist/routes/account.js.map +1 -1
- package/dist/routes/assignees.js +47 -9
- package/dist/routes/assignees.js.map +1 -1
- package/package.json +1 -1
- package/static/dashboard/assets/{CompositeItem-DOjAZOIw.js → CompositeItem-DpSaUtYZ.js} +1 -1
- package/static/dashboard/assets/{ConfirmDialog-YHdRCMuk.js → ConfirmDialog-s6KLZt6w.js} +1 -1
- package/static/dashboard/assets/{CopyButton-BPFFhzYZ.js → CopyButton-Cqz1MLVB.js} +1 -1
- package/static/dashboard/assets/{FieldItemContext-CvuTIqbu.js → FieldItemContext-4dJ9QpEG.js} +1 -1
- package/static/dashboard/assets/{InstallTag-Dyle6Z7u.js → InstallTag-B4frNgVO.js} +1 -1
- package/static/dashboard/assets/{SaveState-zx4IRIWV.js → SaveState-DfBHRtEq.js} +1 -1
- package/static/dashboard/assets/{_app-BT2PvVrr.js → _app-5y2NMiTw.js} +1 -1
- package/static/dashboard/assets/{_app-CATs1X1F.js → _app-CnifsCfr.js} +1 -1
- package/static/dashboard/assets/{activity-Ja8jqvTl.js → activity-DX3WrmQt.js} +1 -1
- package/static/dashboard/assets/{arrow-left-D-J1WDaF.js → arrow-left-iXAzDNV6.js} +1 -1
- package/static/dashboard/assets/{avatar-JYCiU767.js → avatar-DkFTIwsR.js} +1 -1
- package/static/dashboard/assets/{badge-NV2UvVlq.js → badge-CrUHZwEL.js} +1 -1
- package/static/dashboard/assets/{card-PWIpee1m.js → card-C4v3pSqd.js} +1 -1
- package/static/dashboard/assets/{check-fUN7a3GX.js → check-BKP4SJjJ.js} +1 -1
- package/static/dashboard/assets/{chevron-right-D_gtsnlu.js → chevron-right-BVbfidnK.js} +1 -1
- package/static/dashboard/assets/{copy-ZBdagSqO.js → copy-nRZWPHR1.js} +1 -1
- package/static/dashboard/assets/{dialog-B_kwIiUp.js → dialog-lgIL_ZCX.js} +1 -1
- package/static/dashboard/assets/{dropdown-menu-D5UGpMWY.js → dropdown-menu-DyLLQk8L.js} +1 -1
- package/static/dashboard/assets/{image-off-kQWiBpm4.js → image-off-B6flKQEZ.js} +1 -1
- package/static/dashboard/assets/{index-BCjjK9dr.js → index-DMCyFEmS.js} +3 -3
- package/static/dashboard/assets/{invite-Cn7ntzp8.js → invite-CrR7zqFd.js} +1 -1
- package/static/dashboard/assets/{label-CU7jvj5k.js → label-CL3Ivlhy.js} +1 -1
- package/static/dashboard/assets/{layout-grid-DgutVVEL.js → layout-grid-B-9bb2Av.js} +1 -1
- package/static/dashboard/assets/me-6-FBHysO.js +1 -0
- package/static/dashboard/assets/{parts-Oxy1krsw.js → parts-b71WkkoI.js} +1 -1
- package/static/dashboard/assets/{plus-Cl722ZH_.js → plus-BOeukd4A.js} +1 -1
- package/static/dashboard/assets/s._site-MtCDp62_.js +1 -0
- package/static/dashboard/assets/s._site.comments-vNVUqPN4.js +54 -0
- package/static/dashboard/assets/{s._site.reviewers-BuxVEObS.js → s._site.reviewers-BMYyb10D.js} +1 -1
- package/static/dashboard/assets/{s._site.settings-BLyC2Ix8.js → s._site.settings-BaBm7RJi.js} +1 -1
- package/static/dashboard/assets/{setup-BUjOodJm.js → setup-DjA-0YhC.js} +1 -1
- package/static/dashboard/assets/{sign-in-CppGynIo.js → sign-in-vMnULz18.js} +1 -1
- package/static/dashboard/assets/{sign-up-BGy3UTxi.js → sign-up-K_HV-_C8.js} +1 -1
- package/static/dashboard/assets/{sites-CzRwDpMY.js → sites-Dw-qQxr1.js} +1 -1
- package/static/dashboard/assets/{studio-DepK2GJ4.js → studio-CBGrW0G1.js} +1 -1
- package/static/dashboard/assets/studio-DcijgVQL.js +1 -0
- package/static/dashboard/assets/{studio.index-C4hVZYkE.js → studio.index-D-9QUrvv.js} +1 -1
- package/static/dashboard/assets/{studio.integrations-2-WJQjiK.js → studio.integrations-Djhl8gKq.js} +1 -1
- package/static/dashboard/assets/{studio.members-CMxEJYg1.js → studio.members-DaS0HWwE.js} +1 -1
- package/static/dashboard/assets/{sun-DDSRise2.js → sun-ygOg7Lon.js} +1 -1
- package/static/dashboard/assets/{switch-L2_Pf-6w.js → switch-CYLwE1-9.js} +1 -1
- package/static/dashboard/assets/{table-fR4tWQ4-.js → table-BgojscGP.js} +1 -1
- package/static/dashboard/assets/{useAriaLabelledBy-Bk7BENOF.js → useAriaLabelledBy-Ce10PDSC.js} +1 -1
- package/static/dashboard/assets/{useBaseQuery-CoqlgX-x.js → useBaseQuery-BI_bJwNl.js} +1 -1
- package/static/dashboard/assets/useQuery-Cl9FITTP.js +1 -0
- package/static/dashboard/assets/useRender-Ck8DP-Z3.js +1 -0
- package/static/dashboard/assets/{useValueChanged-BhvEiD3-.js → useValueChanged-Dh5Yg1r8.js} +1 -1
- package/static/dashboard/assets/{users-STxJg0L8.js → users-BXCV1C3P.js} +1 -1
- package/static/dashboard/assets/{welcome-D7-mGhDy.js → welcome-C9fdUqeW.js} +1 -1
- package/static/dashboard/assets/{widget-signin-jj3P3IbD.js → widget-signin-DiXxk1Ln.js} +1 -1
- package/static/dashboard/assets/{you-BMCOM6zE.js → you-CZGeTvq7.js} +1 -1
- package/static/dashboard/assets/{zod-DbWDuTiO.js → zod-khKoKeAB.js} +1 -1
- package/static/dashboard/index.html +1 -1
- package/static/widget/build.json +2 -2
- package/static/widget/snag.js +1 -1
- package/static/widget/snag.runtime.js +1 -1
- package/static/dashboard/assets/me-ttfbX4Cb.js +0 -1
- package/static/dashboard/assets/s._site-DI7lRsnw.js +0 -1
- package/static/dashboard/assets/s._site.comments-BLiaZNHo.js +0 -54
- package/static/dashboard/assets/studio-BJa7hKy2.js +0 -1
- package/static/dashboard/assets/useQuery-6QR_MT4t.js +0 -1
- package/static/dashboard/assets/useRender-BybHPfHo.js +0 -1
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import{c as Q,r as x,h as zs,a4 as Ts,a5 as Es,d as Je,a6 as Qe,a7 as Is,m as Ps,E as _s,i as ns,j as e,a8 as Bs,g as Fs,f as D,B as M,a9 as as,aa as Ls,$ as Xe,ab as Os,_ as rs,A as Vs,ac as Ze,o as qs,ad as Us,ae as Ye,af as Ks,ag as Hs,ah as Ws,ai as Gs,aj as Js,ak as Qs,al as Xs,am as Zs,an as Ys,ao as et,ap as be,L as os,F as st,a1 as es,H as je,aq as tt,y as Se}from"./index-BCjjK9dr.js";import{u as ve}from"./useQuery-6QR_MT4t.js";import{C as is}from"./check-fUN7a3GX.js";import{f as nt,e as at,h as rt,j as ot,u as ss,k as it,l as lt,c as dt,n as ct,L as qe,I as De}from"./label-CU7jvj5k.js";import{L as ut,M as mt,N as ht,A as xt,O as pt,E as ls,G as ds,I as cs,H as us,J as ms,K as hs,X as ft}from"./dialog-B_kwIiUp.js";import{u as gt}from"./FieldItemContext-CvuTIqbu.js";import{u as bt}from"./useAriaLabelledBy-Bk7BENOF.js";import{u as jt}from"./useValueChanged-BhvEiD3-.js";import{D as se,i as te,j as ne,k as me,l as Re,m as G,n as xs,E as ts,o as Ue,p as de,S as vt}from"./dropdown-menu-D5UGpMWY.js";import{A as he,a as xe}from"./avatar-JYCiU767.js";import{C as ps}from"./ConfirmDialog-YHdRCMuk.js";import{b as Ke,S as fs,E as Oe}from"./parts-Oxy1krsw.js";import{S as pe,i as yt,b as ze,c as $e,a as ye}from"./labels--UUyt9uB.js";import{C as kt}from"./copy-ZBdagSqO.js";import{I as Nt}from"./image-off-kQWiBpm4.js";import{C as wt}from"./chevron-right-D_gtsnlu.js";import{I as Ct}from"./InstallTag-Dyle6Z7u.js";import{u as St}from"./me-ttfbX4Cb.js";import{A as $t}from"./arrow-left-D-J1WDaF.js";import"./useBaseQuery-CoqlgX-x.js";import"./CompositeItem-DOjAZOIw.js";import"./card-PWIpee1m.js";/**
|
|
2
|
-
* @license lucide-react v1.39.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Mt=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Me=Q("chevron-down",Mt);/**
|
|
7
|
-
* @license lucide-react v1.39.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const At=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],Dt=Q("columns-2",At);/**
|
|
12
|
-
* @license lucide-react v1.39.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Rt=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],zt=Q("ellipsis",Rt);/**
|
|
17
|
-
* @license lucide-react v1.39.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const Tt=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],Et=Q("inbox",Tt);/**
|
|
22
|
-
* @license lucide-react v1.39.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const It=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Pt=Q("list",It);/**
|
|
27
|
-
* @license lucide-react v1.39.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const _t=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Bt=Q("pencil",_t);/**
|
|
32
|
-
* @license lucide-react v1.39.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const Ft=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Lt=Q("rotate-cw",Ft);/**
|
|
37
|
-
* @license lucide-react v1.39.0 - ISC
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the ISC license.
|
|
40
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const Ot=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],gs=Q("trash-2",Ot);/**
|
|
42
|
-
* @license lucide-react v1.39.0 - ISC
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the ISC license.
|
|
45
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const Vt=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],qt=Q("user-plus",Vt);/**
|
|
47
|
-
* @license lucide-react v1.39.0 - ISC
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the ISC license.
|
|
50
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const Ut=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],Kt=Q("user-round",Ut);function Ht(s){if(!s)return null;for(const n of s.elements){const r=n.tagName;if(r==="BUTTON"||r==="INPUT"){const o=n;if(o.type==="submit")return o}}return null}function bs(s){return{checked(n){return s.indeterminate?{}:n?{"data-checked":""}:{"data-unchecked":""}},...nt}}const Wt=x.createContext(void 0);function Gt(){return x.useContext(Wt)}const js=x.createContext(void 0);function Jt(){const s=x.useContext(js);if(s===void 0)throw new Error(zs(14));return s}const Qt="data-parent",Xt=x.forwardRef(function(n,r){const{checked:o,className:h,defaultChecked:i=!1,"aria-labelledby":d,disabled:v=!1,form:c,id:m,indeterminate:k=!1,inputRef:l,name:y,onCheckedChange:S,parent:a=!1,readOnly:w=!1,render:N,required:A=!1,uncheckedValue:j,value:z,nativeButton:E=!1,style:_,...I}=n,{clearErrors:p}=at(),{disabled:L,name:Z,setDirty:U,setFilled:K,setFocused:$,setTouched:T,state:V,validationMode:ce,validityData:ue,validation:B}=rt(),f=gt(),{labelId:g,controlId:q,registerControlId:Y,getDescriptionProps:Te}=ot(),R=Gt(),J=R?.allValues===void 0?void 0:R.parent,ae=J!==void 0,F=L||f.disabled||R?.disabled||v,O=Z??y,P=z??O,t=ss(),u=ss();let C=m||q;ae&&(a?C=u:P!==void 0?C=`${J.id}-${P}`:C||=u);let H={};ae&&(a?H=J.getParentProps():P!==void 0&&(H=J.getChildProps(P)));const{checked:ee=o,indeterminate:re=k,onCheckedChange:ke,...Ee}=H,Ie=R?.value,Ne=x.useRef(null),we=Ts(()=>Symbol()),Pe=x.useRef(!1),{getButtonProps:Ns,buttonRef:ws}=Es({disabled:F,native:E}),fe=R?.validation??B,[W,Cs]=it({controlled:P!==void 0&&Ie!==void 0&&!a?Ie.includes(P):ee,default:i,name:"Checkbox",state:"checked"}),_e=ae?!!ee:W,ge=ae&&re||k;Je(()=>{Y!==Qe&&(Pe.current=!0,Y(we.current,C))},[C,Y,we]),x.useEffect(()=>{const b=we.current;return()=>{!Pe.current||Y===Qe||(Pe.current=!1,Y(b,void 0))}},[Y,we]),lt(Ne,t,W,void 0,!R&&!F,y);const oe=x.useRef(null),We=fe.registerInput,Ge=R?P:void 0,Ss=x.useCallback(b=>We(b,{controlRef:Ne,value:Ge}),[We,Ge]),$s=Is(l,oe,a?void 0:Ss),Ms=bt(d,g,oe,!E,C??void 0);Je(()=>{oe.current&&(oe.current.indeterminate=ge,W&&K(!0))},[W,ge,K]),jt(W,()=>{R||(p(O),K(W),U(W!==ue.initialValue),fe.change(W))});const As=Ps({checked:W,disabled:F,form:c,name:a?void 0:O,id:E?void 0:C??void 0,required:A,ref:$s,style:O?ut:mt,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(b){if(b.nativeEvent.defaultPrevented)return;if(w){b.preventDefault();return}const X=b.currentTarget.checked,ie=dt(ct,b.nativeEvent);if(S?.(X,ie),!ie.isCanceled&&(ke?.(X,ie),!ie.isCanceled&&(Cs(X),P!==void 0&&R!==void 0&&!a&&!ae))){const le=X?[...R.value,P]:R.value.filter(Ce=>Ce!==P);R.setValue(le,ie)}},onClick(b){b.stopPropagation()},onFocus(){Ne.current?.focus()}},z!==void 0?{value:(R?W&&z:z)||""}:_s,Te,b=>fe.getValidationProps(F,b));x.useEffect(()=>{if(!J||P===void 0)return;const b=J.disabledStatesRef.current;return b.set(P,F),()=>{b.delete(P)}},[J,F,P]);const Be=x.useMemo(()=>({...V,checked:_e,disabled:F,readOnly:w,required:A,indeterminate:ge}),[V,_e,F,w,A,ge]),Ds=bs(Be),Rs=ns("span",n,{state:Be,ref:[ws,Ne,r],props:[{id:E?C??void 0:t,role:"checkbox","aria-checked":ge?"mixed":_e,"aria-readonly":w||void 0,"aria-required":A||void 0,"aria-labelledby":Ms,[Qt]:a?"":void 0,onFocus(){F||$(!0)},onBlur(){const b=oe.current;b&&(T(!0),$(!1),ce==="onBlur"&&fe.commit(R?Ie:b.checked))},onKeyDown(b){if(b.key!=="Enter"||(b.preventBaseUIHandler(),b.defaultPrevented))return;const X=oe.current?.form??null,ie=b.currentTarget,le=b.nativeEvent,Ce=b.preventDefault,Fe=le.preventDefault;let Le=!1;b.preventDefault=()=>{Le=!0,Ce.call(b)},le.preventDefault=()=>{Le=!0,Fe.call(le)},Fe.call(le),Fs(ie).queueMicrotask(()=>{b.preventDefault=Ce,le.preventDefault=Fe,Le||Ht(X)?.click()})},onClick(b){if(w||F)return;b.preventDefault();const X=oe.current;X&&Bs(X,b)}},I,Ee,Ns,Te,b=>fe.getValidationProps(F,b)],stateAttributesMapping:Ds});return e.jsxs(js.Provider,{value:Be,children:[Rs,!W&&!R&&O&&!a&&j!==void 0&&e.jsx("input",{type:"hidden",form:c,name:O,value:j,disabled:F}),e.jsx("input",{...As,suppressHydrationWarning:!0})]})}),Zt=x.forwardRef(function(n,r){const{render:o,className:h,style:i,keepMounted:d=!1,...v}=n,c=Jt(),m=c.checked||c.indeterminate,{mounted:k,transitionStatus:l,setMounted:y}=ht(m),S=x.useRef(null),a={...c,transitionStatus:l};xt({open:m,ref:S,onComplete(){m||y(!1)}});const N={...bs(c),...pt},A=d||k,j=ns("span",n,{ref:[r,S],state:a,stateAttributesMapping:N,props:v});return A?j:null});function Yt({className:s,...n}){return e.jsx(Xt,{"data-slot":"checkbox",className:D("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",s),...n,children:e.jsx(Zt,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:e.jsx(is,{})})})}function vs({className:s,...n}){return e.jsx("textarea",{"data-slot":"textarea",className:D("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",s),...n})}function en({rounds:s,active:n,onPick:r,onStart:o,starting:h}){const i=s.find(l=>l.number===n),d=(s[0]?.number??0)+1,[v,c]=x.useState(!1),[m,k]=x.useState("");return e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsxs(te,{render:e.jsx("button",{type:"button",className:"inline-flex h-7 items-center gap-1.5 rounded-md border border-line-strong bg-muted px-2.5 text-[12.5px] font-semibold text-foreground","aria-label":"Round"}),children:[e.jsx(Lt,{className:"size-3.5"}),i?.name??`Round ${n}`,e.jsx(Me,{className:"size-3 text-muted-foreground"})]}),e.jsxs(ne,{align:"start",className:"w-[260px]",children:[e.jsxs(me,{children:[e.jsx(Re,{children:"Rounds"}),s.map(l=>e.jsxs(G,{onClick:()=>r(l.number),children:[e.jsx("span",{className:"truncate",children:l.name}),e.jsxs("span",{className:"ml-auto text-[11.5px] text-muted-foreground",children:[l.closed?"closed":"open",l.unresolved>0?` · ${l.unresolved} to go`:""]})]},l.id))]}),e.jsx(xs,{}),e.jsx(G,{onClick:()=>{k(`Round ${d}`),c(!0)},children:"Start a new round…"})]})]}),i&&e.jsxs("span",{className:"text-[12px] text-muted-foreground",children:[i.closed?"closed":"open",i.unresolved>0?` · ${i.unresolved} to go`:i.closed?"":" · all clear"]}),e.jsx(ls,{open:v,onOpenChange:c,children:e.jsx(ds,{children:e.jsxs("form",{className:"flex flex-col gap-4",onSubmit:l=>{l.preventDefault(),!(!m.trim()||h)&&(o(m.trim()),c(!1))},children:[e.jsxs(cs,{children:[e.jsx(us,{children:"Start a new round"}),e.jsx(ms,{children:"A round is one pass of feedback, and it runs beside the others: starting one closes none of them. Reviewers pick a round in the widget and their comments go to it. Close or archive rounds in Settings."})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(qe,{htmlFor:"round-name",children:"Name"}),e.jsx(De,{id:"round-name",value:m,onChange:l=>k(l.target.value),autoFocus:!0})]}),e.jsxs(hs,{children:[e.jsx(M,{type:"button",variant:"outline",onClick:()=>c(!1),children:"Cancel"}),e.jsx(M,{type:"submit",disabled:!m.trim()||h,children:h?"Starting…":"Start the round"})]})]})})})]})}function ys({rounds:s,onMove:n,busy:r}){return s.length===0?null:e.jsxs(se,{children:[e.jsx(te,{render:e.jsx(M,{variant:"outline",size:"sm",disabled:r}),children:"Move to round…"}),e.jsx(ne,{align:"start",className:"w-[240px]",children:e.jsxs(me,{children:[e.jsx(Re,{children:"Move to round"}),s.map(o=>e.jsxs(G,{onClick:()=>n(o.number),children:[e.jsx("span",{className:"truncate",children:o.name}),e.jsx("span",{className:"ml-auto text-[11.5px] text-muted-foreground",children:o.closed?"closed":"open"})]},o.id))]})})]})}const sn={open:"Open",progress:"In progress",review:"In review",resolved:"Resolved"};function tn(s,n,r={}){const o=r.fence??((p,L)=>L),h=r.statusLabel??(p=>sn[p]??p),i=s.anchor??{},d=s.context??{},v=i.page,c=v?.route??s.route??"/",m=v?.origin??n.origin??"",k=v?.pathname??c,l=m?`${m}${k}`:k,y=typeof i.label=="string"?o("label",i.label):"",S=i.element??i,a=[];a.push(`# ${s.key}${y?` — ${y}`:""}`),a.push(""),a.push(`${n.name} · ${h(s.status)} · left by ${s.createdBy?.name?o("name",s.createdBy.name):"someone"} on ${s.createdAt.slice(0,10)}`+(s.assignee?` · assigned to ${o("name",s.assignee.name)}`:"")),a.push(""),a.push("## Where to look"),a.push(""),a.push(`- Page: ${l}`),m&&a.push(`- Open on the page: ${m}${k}?${as("t")}=${encodeURIComponent(s.key)}`),y&&a.push(`- Element: ${y}`);const w=typeof i.css=="string"?i.css:typeof S.selector=="string"?S.selector:"";if(w&&a.push(`- Selector: \`${o("selector",w)}\``),typeof i.domid=="string"&&a.push(`- DOM id: \`#${o("selector",i.domid)}\``),typeof S.role=="string"){const p=typeof S.accessibleName=="string"?` “${o("label",S.accessibleName)}”`:"";a.push(`- Role: ${o("label",S.role)}${p}`)}typeof S.testId=="string"&&a.push(`- Test id: ${o("label",S.testId)}`);const N=i.text;N?.exact&&a.push(`- Text: “${o("label",N.exact)}”`),a.push(`- Anchor: ${s.anchorState??"unknown"}`),a.push(""),a.push("## What's wrong"),a.push("");const A=(s.comments??[]).filter(p=>p.body!==null);A.length===0&&a.push("> (no comment — a pin with no words)");for(const p of A){const L=p.author?.name?o("name",p.author.name):"Anonymous";a.push(`> **${L}${p.author?.kind==="agent"?" (agent)":""}** — ${p.createdAt.slice(0,16).replace("T"," ")}`);for(const Z of o("body",String(p.body)).split(`
|
|
52
|
-
`))a.push(`> ${Z}`);a.push(">")}a[a.length-1]===">"&&a.pop(),a.push(""),a.push("## Environment"),a.push("");const j=d.derived,z=d.viewport;(j?.browser||j?.os)&&a.push(`- Browser: ${[j.browser,j.os,j.device].filter(Boolean).join(" · ")}`),z?.w&&a.push(`- Viewport: ${z.w} × ${z.h}${z.dpr?` @${Math.round(z.dpr*10)/10}x`:""}`),d.prefersColorScheme&&a.push(`- Colour scheme: ${d.prefersColorScheme}`),d.language&&a.push(`- Language: ${d.language}`),d.ua&&a.push(`- User agent: ${o("label",String(d.ua))}`);const E=d.build;E&&Object.keys(E).length&&a.push(`- Build: ${Object.entries(E).map(([p,L])=>`${p}=${o("label",String(L))}`).join(", ")}`),a.push("");const _=d.breadcrumbs;if(_?.length){a.push(`## Breadcrumbs (${_.length}, oldest first)`),a.push("");for(const p of _)a.push(`- \`${String(p.t).slice(11,19)}\` ${p.type}${p.level?`/${p.level}`:""}: ${o("breadcrumb",String(p.message))}`);a.push("")}const I=s.attachments?.find(p=>p.kind==="screenshot")??s.attachments?.[0];if(I){a.push("## Screenshot"),a.push(""),a.push("Examine this screenshot for visual context — it is the viewport at the moment of the click."),a.push("");const p=I.url.startsWith("http")?I.url:`${n.dashboardOrigin??""}${I.url}`;a.push(``),a.push("")}return a.join(`
|
|
53
|
-
`).trimEnd()+`
|
|
54
|
-
`}function nn(s,n){return tn(s,n,{statusLabel:r=>yt(r)?pe[r]:r})}function an({thread:s,site:n,onStatus:r,onReply:o,replying:h,onClose:i,pool:d,onAssign:v,onAddPerson:c,trackers:m,onCreateIssue:k,creatingIssue:l,onEditComment:y,onDeleteComment:S,onDeleteThread:a,move:w}){const N=s.anchor??{},A=s.context??{},j=typeof N.label=="string"?N.label:"",z=N.page,E=z?.route??s.route??"/",_=z?.origin??n.origin,I=_?`${_}${z?.pathname??E}?${as("t")}=${encodeURIComponent(s.key)}`:"",p=s.attachments?.find(f=>f.kind==="screenshot")??s.attachments?.[0],[L,Z]=x.useState(""),[U,K]=x.useState(""),[$,T]=x.useState(!1),[V,ce]=x.useState(!1),ue=d.find(f=>f.isMe)?.id,B=()=>{navigator.clipboard?.writeText(nn(s,{name:n.name,..._?{origin:_}:{},dashboardOrigin:location.origin})),rs.success("Copied as a brief")};return e.jsxs("article",{className:"flex min-h-0 flex-1 flex-col","aria-label":`${s.key} — ${j||"a comment"}`,children:[e.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b border-border/60 px-4 py-2.5",children:[e.jsx("span",{className:"font-mono text-[12px] text-muted-foreground",children:s.key}),e.jsx(on,{status:s.status,onStatus:r}),e.jsx(mn,{assignee:s.assignee??null,pool:d,onAssign:v,onAddPerson:c}),(m??[]).map(f=>{const g=s.refs?.find(q=>q.provider===f&&q.kind===Ls[f]&&q.status!=="detached");if(g){const q=f==="github"?`Issue #${g.externalId}`:f==="jira"?g.externalId:f==="slack"?"Slack message":/\/issue\/([A-Z][A-Z0-9]*-\d+)/.exec(g.url)?.[1]??`${Xe[f]} issue`;return e.jsxs(M,{variant:"ghost",size:"sm",render:e.jsx("a",{href:g.url,target:"_blank",rel:"noreferrer"}),children:[e.jsx(ts,{}),q]},f)}return k?e.jsx(M,{variant:"ghost",size:"sm",disabled:!!l,onClick:()=>k(f),children:l===f?f==="slack"?"Posting…":"Creating…":f==="slack"?"Post to Slack":`Create ${Xe[f]} issue`},f):null}),e.jsx("div",{className:"flex-1"}),w&&e.jsx(ys,{rounds:w.rounds,onMove:w.onMove,busy:w.busy}),e.jsxs(M,{variant:"ghost",size:"sm",onClick:B,children:[e.jsx(kt,{}),"Copy as brief"]}),a&&e.jsx(M,{variant:"ghost",size:"icon-sm","aria-label":`Delete ${s.key}`,title:"Delete this thread",onClick:()=>T(!0),children:e.jsx(gs,{})}),e.jsx(M,{variant:"ghost",size:"icon-sm","aria-label":"Close",onClick:i,children:e.jsx(ft,{})})]}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-5 overflow-auto px-4 py-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"m-0 text-[16px] font-semibold leading-snug tracking-tight",children:j||"A comment on this page"}),e.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-[12.5px] text-muted-foreground",children:[e.jsx("span",{className:"font-mono",children:E}),_&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("a",{href:`${_}${z?.pathname??E}`,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-brand hover:underline",children:[_.replace(/^https?:\/\//,""),e.jsx(ts,{className:"size-3"})]})]}),I&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("a",{href:I,target:"_blank",rel:"noreferrer",className:"text-brand hover:underline",children:"Open on the page"})]})]})]}),e.jsxs("section",{className:"flex flex-col gap-3",children:[!s.comments[0]?.body&&e.jsx("p",{className:"m-0 text-muted-foreground",children:"A pin with no words — the element says what it is about."}),s.comments.filter(f=>f.body!==null).map(f=>e.jsx(rn,{comment:f,reply:f!==s.comments[0],mine:Os(f,ue),...y?{onEdit:g=>y(f.id,g)}:{},...S?{onDelete:()=>S(f.id)}:{}},f.id)),e.jsxs("form",{className:"flex gap-2.5",onSubmit:async f=>{f.preventDefault();const g=L.trim();if(!(!g||h)){K("");try{await o(g),Z("")}catch(q){K(q instanceof Error?q.message:"Could not send that reply.")}}},children:[e.jsx(he,{className:"size-6 shrink-0",children:e.jsx(xe,{className:"bg-primary text-[10px] font-semibold text-primary-foreground",children:"you"})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-2 rounded-md border border-input bg-card p-2",children:[e.jsx(vs,{"aria-label":"Reply",placeholder:`Reply to ${s.createdBy.name||"the reviewer"}…`,value:L,onChange:f=>Z(f.target.value),rows:2,className:"min-h-0 resize-none border-0 bg-transparent p-1 shadow-none focus-visible:ring-0"}),U&&e.jsx("p",{role:"alert",className:"m-0 text-[12px] text-destructive",children:U}),e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.status==="resolved"?e.jsx(M,{type:"button",variant:"ghost",size:"sm",onClick:()=>r("open"),children:"Reopen"}):e.jsxs(e.Fragment,{children:[s.status!=="review"&&e.jsx(M,{type:"button",variant:"ghost",size:"sm",onClick:()=>r("review"),children:"Mark in review"}),e.jsx(M,{type:"button",variant:"ghost",size:"sm",onClick:()=>r("resolved"),children:"Mark resolved"})]}),e.jsx(M,{type:"submit",size:"sm",disabled:!L.trim()||h,children:h?"Sending…":"Reply"})]})]})]})]}),e.jsxs("section",{className:"flex flex-col gap-2",children:[e.jsx(Ke,{children:"Screenshot"}),p?e.jsxs(e.Fragment,{children:[e.jsx("a",{href:p.url,target:"_blank",rel:"noreferrer",className:"block overflow-hidden rounded-lg border border-border bg-background",children:e.jsx("img",{src:p.url,alt:`The page when ${s.key} was left`,width:p.width,height:p.height,loading:"lazy",className:"block h-auto w-full"})}),e.jsxs("p",{className:"m-0 text-[12px] text-muted-foreground",children:[p.width??"?"," × ",p.height??"?",A.prefersColorScheme?` · ${A.prefersColorScheme}`:""," · taken at the click, ",ze(s.createdAt)," ·"," ",e.jsx("a",{href:p.url,target:"_blank",rel:"noreferrer",className:"text-brand hover:underline",children:"open full size"})]})]}):e.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-dashed border-border px-3 py-3 text-[12.5px] text-muted-foreground",children:[e.jsx(Nt,{className:"size-4 shrink-0"}),e.jsx("span",{children:"No screenshot for this one — either no bucket was connected when it was left, or the reviewer turned the picture off. The element and the environment below are unaffected."})]}),e.jsx(dn,{ctx:A})]}),e.jsxs("section",{className:"flex flex-col gap-2",children:[e.jsx(Ke,{children:"Element"}),e.jsxs("dl",{className:"m-0 grid grid-cols-[110px_1fr] gap-x-3 gap-y-1.5 text-[13px]",children:[j&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"text-muted-foreground",children:"Label"}),e.jsx("dd",{className:"m-0",children:j})]}),typeof N.css=="string"&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"text-muted-foreground",children:"Selector"}),e.jsx("dd",{className:"m-0 break-all font-mono text-[12px] text-ink-soft",children:N.css})]}),typeof N.domid=="string"&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"text-muted-foreground",children:"DOM id"}),e.jsxs("dd",{className:"m-0 font-mono text-[12px] text-ink-soft",children:["#",N.domid]})]}),typeof N.role=="string"&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"text-muted-foreground",children:"Role"}),e.jsxs("dd",{className:"m-0",children:[N.role,typeof N.accessibleName=="string"?` “${N.accessibleName}”`:""]})]}),N.text?.exact&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{className:"text-muted-foreground",children:"Text"}),e.jsxs("dd",{className:"m-0",children:["“",String(N.text.exact),"”"]})]}),e.jsx("dt",{className:"text-muted-foreground",children:"Anchor"}),e.jsx("dd",{className:"m-0",children:e.jsx(ln,{state:s.anchorState})})]})]}),e.jsx(cn,{ctx:A}),e.jsx(un,{ctx:A})]}),a&&e.jsx(ps,{open:$,onOpenChange:T,title:`Delete ${s.key}?`,description:"Removes this comment thread and its screenshot for everyone. Linked issues in your tracker are not deleted.",confirmLabel:"Delete thread",busy:V,onConfirm:async()=>{ce(!0);try{await a(),T(!1)}catch{}finally{ce(!1)}}})]})}function rn({comment:s,reply:n,mine:r,onEdit:o,onDelete:h}){const[i,d]=x.useState(!1),[v,c]=x.useState(""),[m,k]=x.useState(!1),[l,y]=x.useState(!1),[S,a]=x.useState(!1),w=r&&!!o,N=!!h,A=async()=>{const j=v.trim();if(!(!j||m||!o)){if(j===s.body){d(!1);return}k(!0);try{await o(j),d(!1)}catch{}finally{k(!1)}}};return e.jsxs("div",{className:"flex gap-2.5",children:[e.jsx(he,{className:"size-6 shrink-0",children:e.jsx(xe,{className:D("text-[10px] font-semibold",s.author.kind==="agent"?"bg-muted text-ink-soft":"bg-brand-soft text-brand"),children:ye(s.author.name,"?")})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-baseline gap-2 text-[12px] text-muted-foreground",children:[e.jsx("b",{className:"text-[13px] font-semibold text-foreground",children:s.author.name||"Anonymous"}),s.author.kind==="agent"&&e.jsx("span",{className:"rounded-sm bg-muted px-1 text-[10.5px] font-medium uppercase tracking-wide",children:"agent"}),e.jsx("span",{children:ze(s.createdAt)}),(w||N)&&!i&&e.jsxs(se,{children:[e.jsx(te,{render:e.jsx(M,{variant:"ghost",size:"icon-xs",className:"ml-auto self-center text-muted-foreground","aria-label":`Actions for ${s.author.name||"Anonymous"}’s comment`}),children:e.jsx(zt,{})}),e.jsxs(ne,{align:"end",className:"min-w-36",children:[w&&e.jsxs(G,{onClick:()=>{c(s.body??""),d(!0)},children:[e.jsx(Bt,{}),"Edit"]}),N&&e.jsxs(G,{variant:"destructive",onClick:()=>y(!0),children:[e.jsx(gs,{}),"Delete"]})]})]})]}),i?e.jsxs("form",{className:"mt-1 flex flex-col gap-2",onSubmit:j=>{j.preventDefault(),A()},children:[e.jsx(vs,{"aria-label":"Edit your comment",value:v,autoFocus:!0,rows:3,disabled:m,onChange:j=>c(j.target.value),onKeyDown:j=>{j.key==="Enter"&&(j.metaKey||j.ctrlKey)&&(j.preventDefault(),A()),j.key==="Escape"&&!m&&(j.preventDefault(),d(!1))}}),e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx(M,{type:"button",variant:"ghost",size:"sm",disabled:m,onClick:()=>d(!1),children:"Cancel"}),e.jsx(M,{type:"submit",size:"sm",loading:m,disabled:!v.trim(),children:m?"Saving…":"Save"})]})]}):e.jsx("p",{className:"m-0 whitespace-pre-wrap text-[13.5px] leading-normal",children:s.body})]}),N&&e.jsx(ps,{open:l,onOpenChange:y,title:"Delete this comment?",description:n?"The reply is removed for everyone.":"The comment is removed for everyone. The pin and its replies stay.",confirmLabel:"Delete comment",busy:S,onConfirm:async()=>{a(!0);try{await h(),y(!1)}catch{}finally{a(!1)}}})]})}function on({status:s,onStatus:n}){return e.jsxs(se,{children:[e.jsx(te,{render:e.jsx("button",{type:"button",className:"inline-flex items-center rounded-full","aria-label":"Status"}),children:e.jsx(fs,{status:s})}),e.jsx(ne,{align:"start",className:"w-[180px]",children:e.jsx(Ue,{value:s,onValueChange:r=>n(r),children:$e.map(r=>e.jsx(de,{value:r,children:pe[r]},r))})})]})}function ln({state:s}){const n=s==="anchored"?"bg-ok-soft text-ok":s==="approximate"?"bg-muted text-ink-soft":"bg-warn-soft text-destructive",r=s==="anchored"?"Anchored":s==="approximate"?"Approximate":s==="orphaned"?"Orphaned":s;return e.jsx("span",{className:D("rounded-full px-2 py-0.5 text-[11.5px] font-medium",n),children:r})}function dn({ctx:s}){const n=s.capture;if(!n)return null;const r=[];return n.screenshot&&n.screenshot!=="ok"&&r.push(`Screenshot ${n.screenshot}${n.reasons?.length?` — ${n.reasons.join("; ")}`:""}`),n.breadcrumbs&&n.breadcrumbs!=="ok"&&r.push(`Breadcrumbs ${n.breadcrumbs}`),n.blindSpots?.length&&r.push(`${n.blindSpots.length} blind spot${n.blindSpots.length===1?"":"s"}: ${n.blindSpots.join("; ")}`),n.droppedCategories?.length&&r.push(`Dropped: ${n.droppedCategories.join(", ")}`),r.length?e.jsx("ul",{className:"m-0 list-none p-0 text-[12px] text-caution",children:r.map(o=>e.jsx("li",{children:o},o))}):null}function cn({ctx:s}){const n=s.derived,r=s.viewport,o=s.build,h=[];return n?.browser||n?.os?h.push(["Browser",[n.browser,n.os,n.device].filter(Boolean).join(" · ")]):s.ua&&h.push(["User agent",String(s.ua)]),r?.w&&h.push(["Viewport",`${r.w} × ${r.h}${r.dpr?` @${Math.round(r.dpr*10)/10}x`:""}`]),s.language&&h.push(["Language",String(s.language)]),o&&Object.keys(o).length&&h.push(["Build",Object.entries(o).map(([i,d])=>`${i} ${String(d)}`).join(" · ")]),h.length?e.jsxs("section",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ke,{children:"Environment"}),e.jsx("button",{type:"button",className:"text-[11.5px] text-brand hover:underline",onClick:()=>{navigator.clipboard?.writeText(JSON.stringify(s,null,2)),rs.success("Copied the environment")},children:"copy as JSON"})]}),e.jsx("dl",{className:"m-0 grid grid-cols-[110px_1fr] gap-x-3 gap-y-1.5 text-[13px]",children:h.map(([i,d])=>e.jsxs("span",{className:"contents",children:[e.jsx("dt",{className:"text-muted-foreground",children:i}),e.jsx("dd",{className:D("m-0",i==="Build"&&"font-mono text-[12px] text-ink-soft"),children:d})]},i))})]}):null}function un({ctx:s}){const n=s.breadcrumbs,[r,o]=x.useState(!1);if(!n?.length)return null;const h=n.filter(i=>i.level==="error"||i.type==="error").length;return e.jsxs("section",{className:"flex flex-col gap-2",children:[e.jsxs("button",{type:"button",className:"flex items-center gap-2 rounded-md border border-border px-3 py-2 text-left text-[13px] text-ink-soft","aria-expanded":r,onClick:()=>o(!r),children:[e.jsx(wt,{className:D("size-3.5 text-muted-foreground transition-transform",r&&"rotate-90")}),n.length," breadcrumb",n.length===1?"":"s",h>0?` · ${h} error${h===1?"":"s"} before the click`:"",e.jsx("span",{className:"ml-auto text-[12px] text-muted-foreground",children:r?"hide":"show"})]}),r&&e.jsx("ol",{className:"m-0 flex list-none flex-col gap-1 p-0 font-mono text-[11.5px]",children:n.map((i,d)=>e.jsxs("li",{className:D("flex gap-2",(i.level==="error"||i.type==="error")&&"text-destructive"),children:[e.jsx("span",{className:"shrink-0 text-muted-foreground",children:i.t.slice(11,19)}),e.jsxs("span",{className:"shrink-0 w-14 text-muted-foreground",children:[i.type,i.level?`/${i.level}`:""]}),e.jsx("span",{className:"min-w-0 break-words",children:i.message})]},d))})]})}function mn({assignee:s,pool:n,onAssign:r,onAddPerson:o}){const[h,i]=x.useState(!1),d=n.find(l=>l.isMe),v=n.filter(l=>l.isTeam),c=n.filter(l=>!l.isTeam),m=l=>r({id:l.id,name:l.name,kind:l.kind,isTeam:l.isTeam}),k=l=>e.jsxs(G,{onClick:()=>m(l),children:[e.jsx(he,{className:"size-4",children:e.jsx(xe,{className:D("text-[8px] font-semibold",l.isTeam?"bg-brand-soft text-brand":"bg-muted text-ink-soft"),children:ye(l.name,l.email)})}),e.jsx("span",{className:"truncate",children:l.isMe?`${l.name} (you)`:l.name}),s?.id===l.id&&e.jsx(is,{className:"ml-auto size-3.5"})]},l.id);return e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(te,{render:e.jsx(M,{variant:"ghost",size:"sm","aria-label":s?`Assignee: ${s.name}`:"Assignee"}),children:s?e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"size-4",children:e.jsx(xe,{className:D("text-[8px] font-semibold",s.isTeam?"bg-brand-soft text-brand":"bg-muted text-ink-soft"),children:ye(s.name)})}),e.jsx("span",{className:"max-w-[150px] truncate",children:s.name})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{}),"Assign"]})}),e.jsxs(ne,{align:"start",className:"min-w-56",children:[d&&s?.id!==d.id||s?e.jsxs(me,{children:[d&&s?.id!==d.id&&e.jsx(G,{onClick:()=>m(d),children:"Assign to me"}),s&&e.jsx(G,{onClick:()=>r(null),children:"Unassign"})]}):null,v.length>0&&e.jsxs(me,{children:[e.jsx(Re,{children:"The studio"}),v.map(k)]}),c.length>0&&e.jsxs(me,{children:[e.jsx(Re,{children:"People who commented"}),c.map(k)]}),e.jsx(xs,{}),e.jsx(me,{children:e.jsxs(G,{onClick:()=>i(!0),children:[e.jsx(qt,{}),"Add a person…"]})})]})]}),e.jsx(hn,{open:h,onOpenChange:i,onAdd:async l=>{const y=await o(l);m(y)}})]})}function hn({open:s,onOpenChange:n,onAdd:r}){const[o,h]=x.useState(""),[i,d]=x.useState(""),[v,c]=x.useState(!1),[m,k]=x.useState(""),l=async y=>{if(y.preventDefault(),!(!o.trim()||v)){c(!0),k("");try{await r({name:o.trim(),...i.trim()?{email:i.trim()}:{}}),h(""),d(""),n(!1)}catch(S){k(S instanceof Vs?S.message:"Could not add the person.")}finally{c(!1)}}};return e.jsx(ls,{open:s,onOpenChange:n,children:e.jsx(ds,{children:e.jsxs("form",{onSubmit:y=>void l(y),className:"flex flex-col gap-4",noValidate:!0,children:[e.jsxs(cs,{children:[e.jsx(us,{children:"Add a person"}),e.jsx(ms,{children:"Somebody to assign comments to who has not commented yet — your client, before they have said anything. If they later open a review link with this email, their comments join up."})]}),m&&e.jsx("p",{role:"alert",className:"m-0 rounded-md border border-destructive/40 bg-warn-soft px-3 py-2 text-[13px] text-destructive",children:m}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(qe,{htmlFor:"person-name",children:"Name"}),e.jsx(De,{id:"person-name",placeholder:"Sofia",value:o,onChange:y=>h(y.target.value),autoFocus:!0})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(qe,{htmlFor:"person-email",children:"Email (optional)"}),e.jsx(De,{id:"person-email",type:"email",placeholder:"sofia@acme.com",value:i,onChange:y=>d(y.target.value)})]}),e.jsxs(hs,{children:[e.jsx(M,{type:"button",variant:"outline",onClick:()=>n(!1),children:"Cancel"}),e.jsx(M,{type:"submit",loading:v,disabled:!o.trim(),children:v?"Adding…":"Add and assign"})]})]})})})}st({thread:je().optional(),status:je().optional(),page:je().optional(),q:je().optional(),sort:es(["newest","oldest"]).optional(),round:tt().int().positive().optional(),assignee:je().optional(),view:es(["board"]).optional()});const ks={open:"bg-status-open",progress:"bg-status-progress",review:"bg-status-review",resolved:"bg-status-resolved"};function On(){const{site:s}=Ze.useParams(),n=Ze.useSearch(),r=qs(),o=St(),h=o.projects.find(t=>t.uid===s),i=ve(Se.origins(s)),d=ve(Se.rounds(s)),v=ve(Se.assignees(s)),c=ve(Se.siteIntegrations(s)),m=v.data?.data??[],k=m.find(t=>t.isMe)?.id,l=n.round??(d.data?Us(d.data.data):void 0),y=(d.data?.data??[]).filter(t=>!t.archived||t.number===l),S=x.useMemo(()=>({...l!==void 0?{round:l}:{},...n.page?{route:n.page}:{},...n.q?{q:n.q}:{}}),[l,n.page,n.q]),a=ve({...Ye(s,S),enabled:d.isSuccess}),w=Ye(s,S).queryKey,N=Ks(s,w),A=Hs(w),j=Ws(s,w),z=Gs(s),E=Js(s,w),_=Qs(s),I=Xs(s),p=Zs(w),L=Ys(w),Z=et(s,w),[U,K]=x.useState(new Set),$=t=>void r({to:"/s/$site/comments",params:{site:s},search:u=>({...u,...t}),replace:!0}),T=a.data?.data??[],V=x.useMemo(()=>new Set((n.status??"").split(",").filter(Boolean)),[n.status]),ce=x.useMemo(()=>{const t=new Map;for(const u of T)t.set(u.status,(t.get(u.status)??0)+1);return t},[T]),ue=x.useMemo(()=>[...new Set(T.map(t=>He(t)))].sort(),[T]),B=x.useMemo(()=>{let t=V.size?T.filter(u=>V.has(u.status)):T;return n.assignee==="unassigned"?t=t.filter(u=>!u.assignee):n.assignee==="me"?t=t.filter(u=>!!k&&u.assignee?.id===k):n.assignee&&(t=t.filter(u=>u.assignee?.id===n.assignee)),n.sort==="oldest"&&(t=[...t].reverse()),t},[T,V,n.sort,n.assignee,k]),f=x.useMemo(()=>{const t=new Map;for(const u of B){const C=He(u);t.has(C)||t.set(C,[]),t.get(C).push(u)}return[...t.entries()]},[B]),g=n.thread?T.find(t=>t.key===n.thread)??null:null,q=V.size>0||!!n.page||!!n.q||!!n.assignee,Y=y.filter(t=>t.number!==l&&t.unresolved>0),R=o.user.role==="owner"||o.user.role==="admin"?y.filter(t=>!t.archived&&t.number!==l):[],J=(t,u)=>I.mutate({ids:t,round:u},{onSuccess:()=>{K(new Set),n.thread&&t.includes(g?.id??"")&&$({thread:void 0})}}),ae=t=>{const u=new Set(V);u.has(t)?u.delete(t):u.add(t),$({status:[...u].join(",")||void 0})},F=async t=>{const u=[...U];K(new Set);for(const C of u)await N.mutateAsync({id:C,status:t}).catch(()=>{})};x.useEffect(()=>{const t=u=>{if(u.metaKey||u.ctrlKey||u.altKey)return;const C=u.target;if(C&&(C.closest("input,textarea,select,[contenteditable]")||C.isContentEditable))return;const H=u.key.toLowerCase();if(H!=="j"&&H!=="k"&&H!=="e"||B.length===0)return;if(u.preventDefault(),H==="e"){if(!g)return;N.mutate({id:g.id,status:g.status==="resolved"?"open":"resolved"});return}const ee=g?B.findIndex(Ee=>Ee.id===g.id):-1,re=H==="j"?Math.min(ee+1,B.length-1):Math.max(ee-1,0),ke=B[ee===-1?0:re];ke&&$({thread:ke.key})};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)});const O=n.view==="board",P=x.useMemo(()=>$e.map(t=>({status:t,items:B.filter(u=>u.status===t)})),[B]);return e.jsxs("div",{className:"flex h-[calc(100dvh-3rem)] min-h-0 flex-col",children:[e.jsx("div",{className:"flex shrink-0 flex-wrap items-center gap-2 border-b border-border/60 px-4 py-2",children:U.size>0?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"text-[13px] font-medium",children:[U.size," selected"]}),e.jsx("span",{className:"text-[12px] text-muted-foreground",children:"Move to"}),$e.map(t=>e.jsx(M,{variant:"outline",size:"sm",onClick:()=>void F(t),children:pe[t]},t)),e.jsx(ys,{rounds:R,busy:I.isPending,onMove:t=>J([...U],t)}),e.jsx(M,{variant:"ghost",size:"sm",onClick:()=>K(new Set),children:"Clear"})]}):e.jsxs(e.Fragment,{children:[y.length>0&&l!==void 0&&e.jsx(en,{rounds:y,active:l,onPick:t=>$({round:t,thread:void 0}),onStart:t=>_.mutate(t,{onSuccess:u=>$({round:u.number,thread:void 0,status:void 0})}),starting:_.isPending}),e.jsx("span",{className:"mx-1 h-[18px] w-px bg-border"}),e.jsxs(Ve,{on:V.size===0,onClick:()=>$({status:void 0}),children:["All ",e.jsx("span",{className:"text-muted-foreground",children:T.length})]}),$e.map(t=>e.jsxs(Ve,{on:V.has(t),onClick:()=>ae(t),children:[e.jsx("span",{className:D("size-[7px] rounded-full",ks[t])}),pe[t]," ",e.jsx("span",{className:"text-muted-foreground",children:ce.get(t)??0})]},t)),e.jsx("div",{className:"flex-1"}),e.jsxs(Ve,{on:O,onClick:()=>$({view:O?void 0:"board"}),children:[O?e.jsx(Pt,{className:"size-3.5"}):e.jsx(Dt,{className:"size-3.5"}),O?"List":"Board"]}),e.jsx(pn,{value:n.q??"",onChange:t=>$({q:t||void 0})}),ue.length>1&&e.jsxs(se,{children:[e.jsxs(te,{render:e.jsx("button",{type:"button",className:Ae(!!n.page)}),children:[n.page??"All pages",e.jsx(Me,{className:"size-3 text-muted-foreground"})]}),e.jsxs(ne,{align:"end",children:[e.jsx(G,{onClick:()=>$({page:void 0}),children:"All pages"}),ue.map(t=>e.jsx(G,{onClick:()=>$({page:t}),children:e.jsx("span",{className:"font-mono text-[12px]",children:t})},t))]})]}),e.jsxs(se,{children:[e.jsxs(te,{render:e.jsx("button",{type:"button",className:Ae(!!n.assignee),"aria-label":"Filter by assignee"}),children:[xn(n.assignee,m),e.jsx(Me,{className:"size-3 text-muted-foreground"})]}),e.jsx(ne,{align:"end",children:e.jsxs(Ue,{value:n.assignee??"any",onValueChange:t=>$({assignee:t==="any"?void 0:t}),children:[e.jsx(de,{value:"any",children:"Anyone"}),e.jsx(de,{value:"unassigned",children:"Unassigned"}),k&&e.jsx(de,{value:"me",children:"Me"}),m.filter(t=>!t.isMe).map(t=>e.jsx(de,{value:t.id,children:t.name},t.id))]})})]}),e.jsxs(se,{children:[e.jsxs(te,{render:e.jsx("button",{type:"button",className:Ae(!1)}),children:[n.sort==="oldest"?"Oldest":"Newest",e.jsx(Me,{className:"size-3 text-muted-foreground"})]}),e.jsx(ne,{align:"end",children:e.jsxs(Ue,{value:n.sort??"newest",onValueChange:t=>$({sort:t==="oldest"?"oldest":void 0}),children:[e.jsx(de,{value:"newest",children:"Newest first"}),e.jsx(de,{value:"oldest",children:"Oldest first"})]})})]})]})}),Y.map(t=>e.jsxs("button",{type:"button",className:"shrink-0 border-b border-border/60 bg-brand-soft px-4 py-1.5 text-left text-[12.5px] text-foreground",onClick:()=>$({round:t.number,thread:void 0}),children:[e.jsxs("b",{className:"font-semibold",children:[t.unresolved," unresolved"]})," in ",t.name," — still open, not carried over."," ",e.jsx("span",{className:"text-brand",children:"Go there"})]},t.id)),e.jsxs("div",{className:D("grid min-h-0 flex-1",g?"grid-cols-1 lg:grid-cols-[minmax(0,1fr)_520px]":"grid-cols-1"),children:[e.jsxs("div",{className:D("min-h-0 overflow-auto lg:border-r lg:border-border",g&&"hidden lg:block"),children:[a.isPending&&e.jsx(gn,{}),a.isError&&e.jsx(Oe,{title:"Could not load the comments",children:a.error.message}),a.isSuccess&&T.length===0&&!q&&e.jsx("div",{className:"mx-auto max-w-[560px] py-8",children:e.jsxs(Oe,{icon:e.jsx(Et,{className:"size-5"}),title:"No comments yet",children:[e.jsxs("p",{className:"m-0",children:["When someone leaves a comment on ",h.name," it appears here, grouped by page."]}),e.jsx("div",{className:"mt-4 text-left",children:e.jsx(Ct,{uid:s})})]})}),a.isSuccess&&T.length>0&&B.length===0&&e.jsx(Oe,{title:"Nothing matches",action:e.jsx(M,{variant:"outline",size:"sm",onClick:()=>$({status:void 0,page:void 0,q:void 0,assignee:void 0}),children:"Show all"}),children:"No comment matches that filter."}),O&&a.isSuccess&&B.length>0&&e.jsx(bn,{columns:P,uid:s,selectedId:g?.id??null,onMove:(t,u)=>N.mutate({id:t,status:u})}),!O&&f.map(([t,u])=>e.jsxs("div",{children:[e.jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-2 border-b border-border/60 bg-background px-4 py-2 font-mono text-[12px] text-ink-soft",children:[t," ",e.jsxs("span",{className:"font-sans text-muted-foreground",children:["· ",u.length]})]}),u.map(C=>e.jsx(fn,{t:C,uid:s,on:g?.id===C.id,picked:U.has(C.id),picking:U.size>0,onPick:H=>K(ee=>{const re=new Set(ee);return H?re.add(C.id):re.delete(C.id),re})},C.id))]},t))]}),g&&e.jsxs("div",{className:"flex min-h-0 flex-col overflow-hidden bg-card",children:[e.jsx("div",{className:"lg:hidden",children:e.jsxs(M,{variant:"ghost",size:"sm",className:"m-2",onClick:()=>$({thread:void 0}),children:[e.jsx($t,{}),"Back to the list"]})}),e.jsx(an,{thread:g,site:{name:h.name,...i.data?.origins[0]?{origin:i.data.origins[0]}:{}},onStatus:t=>N.mutate({id:g.id,status:t}),onReply:t=>A.mutateAsync({id:g.id,body:t}),replying:A.isPending,pool:m,onAssign:t=>j.mutate({id:g.id,assignee:t}),onAddPerson:t=>z.mutateAsync(t),trackers:(c.data?.data??[]).map(t=>t.provider),onCreateIssue:t=>E.mutate({id:g.id,provider:t}),creatingIssue:E.isPending?E.variables?.provider:void 0,onEditComment:(t,u)=>p.mutateAsync({threadId:g.id,commentId:t,body:u}),onDeleteComment:t=>L.mutateAsync({threadId:g.id,commentId:t}),...o.user.role!=="viewer"?{onDeleteThread:async()=>{await Z.mutateAsync(g.id),$({thread:void 0})}}:{},...R.length?{move:{rounds:R,busy:I.isPending,onMove:t=>J([g.id],t)}}:{},onClose:()=>$({thread:void 0})})]})]})]})}function xn(s,n){return s?s==="unassigned"?"Unassigned":s==="me"?"Me":n.find(r=>r.id===s)?.name??"Assignee":"Assignee"}function He(s){return s.anchor?.page?.route??s.route??"/"}function Ae(s){return D("inline-flex h-7 items-center gap-1.5 whitespace-nowrap rounded-md border border-border bg-card px-2.5 text-[12.5px] font-medium text-ink-soft",s&&"border-line-strong bg-muted text-foreground")}function Ve({on:s,onClick:n,children:r}){return e.jsx("button",{type:"button",className:Ae(s),"aria-pressed":s,onClick:n,children:r})}function pn({value:s,onChange:n}){const[r,o]=x.useState(s);return e.jsxs("form",{className:"relative",onSubmit:h=>{h.preventDefault(),n(r.trim())},children:[e.jsx(vt,{className:"pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground"}),e.jsx(De,{type:"search","aria-label":"Search comments",placeholder:"Search",value:r,onChange:h=>o(h.target.value),onBlur:()=>r.trim()!==s&&n(r.trim()),className:"h-7 w-[170px] pl-7 text-[12.5px]"})]})}function fn({t:s,uid:n,on:r,picked:o,picking:h,onPick:i}){const d=s.comments[0]?.body??(typeof s.anchor?.label=="string"?s.anchor.label:"(no comment)"),v=s.comments[0]?.body&&typeof s.anchor?.label=="string"?s.anchor.label:"";return e.jsxs("div",{className:D("group grid h-12 grid-cols-[22px_56px_minmax(0,1fr)_auto] items-center gap-2.5 border-b border-border/60 bg-card px-4 hover:bg-accent/60",r&&"bg-brand-soft hover:bg-brand-soft"),children:[e.jsx("span",{className:D("flex items-center",!h&&"opacity-0 group-hover:opacity-100 focus-within:opacity-100"),children:e.jsx(Yt,{checked:o,onCheckedChange:c=>i(!!c),"aria-label":`Select ${s.key}`})}),e.jsxs(os,{to:"/s/$site/comments",params:{site:n},search:c=>({...c,thread:s.key}),className:"contents text-foreground",children:[e.jsx("span",{className:"font-mono text-[11.5px] text-muted-foreground",children:s.key}),e.jsxs("span",{className:"truncate text-[13.5px]",children:[d,v&&e.jsx("small",{className:"ml-2 text-[12px] text-muted-foreground",children:v})]}),e.jsxs("span",{className:"flex items-center gap-2.5 text-[12px] text-muted-foreground",children:[e.jsx("span",{className:"hidden sm:inline",children:s.createdBy.name||"someone"}),s.assignee&&e.jsx(he,{className:"size-5",title:`Assigned to ${s.assignee.name}`,children:e.jsx(xe,{className:D("text-[9px] font-semibold",s.assignee.isTeam?"bg-brand-soft text-brand":"bg-muted text-ink-soft"),children:ye(s.assignee.name)})}),e.jsx(fs,{status:s.status}),e.jsx("span",{className:"w-11 whitespace-nowrap text-right",children:ze(s.updatedAt)})]})]})]})}function gn(){return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"flex items-center border-b border-border/60 bg-background px-4 py-2",children:e.jsx(be,{className:"h-3 w-16"})}),[70,55,80,62].map((s,n)=>e.jsxs("div",{className:"grid h-12 grid-cols-[22px_56px_minmax(0,1fr)_auto] items-center gap-2.5 border-b border-border/60 px-4",children:[e.jsx("span",{}),e.jsx(be,{className:"h-3 w-10"}),e.jsx(be,{className:"h-3",style:{width:`${s}%`}}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(be,{className:"h-3 w-11"}),e.jsx(be,{className:"h-[18px] w-16 rounded-full"})]})]},n))]})}function bn({columns:s,uid:n,selectedId:r,onMove:o}){const[h,i]=x.useState(null);return e.jsx("div",{className:"flex h-full min-h-0 gap-3 overflow-x-auto p-3",children:s.map(({status:d,items:v})=>e.jsxs("section",{"aria-label":pe[d],onDragOver:c=>{c.preventDefault(),i(d)},onDragLeave:()=>i(c=>c===d?null:c),onDrop:c=>{c.preventDefault(),i(null);const m=c.dataTransfer.getData("text/plain");m&&o(m,d)},className:D("flex w-[280px] shrink-0 flex-col rounded-lg border border-border bg-muted/40",h===d&&"border-brand bg-brand-soft"),children:[e.jsxs("h3",{className:"m-0 flex items-center gap-2 px-3 py-2 text-[12px] font-medium",children:[e.jsx("span",{className:D("size-[7px] rounded-full",ks[d])}),pe[d],e.jsx("span",{className:"text-muted-foreground",children:v.length})]}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-2 pt-0",children:[v.length===0&&e.jsx("p",{className:"m-0 px-1 py-3 text-[12px] text-muted-foreground",children:"Nothing here."}),v.map(c=>e.jsxs(os,{to:"/s/$site/comments",params:{site:n},search:m=>({...m,thread:c.key}),draggable:!0,onDragStart:m=>{m.dataTransfer.setData("text/plain",c.id),m.dataTransfer.effectAllowed="move"},className:D("flex cursor-grab flex-col gap-1.5 rounded-md border border-border bg-card p-2.5 text-foreground no-underline active:cursor-grabbing",r===c.id&&"border-brand ring-1 ring-brand"),children:[e.jsx("span",{className:"line-clamp-3 text-[13px]",children:c.comments[0]?.body??(typeof c.anchor?.label=="string"?c.anchor.label:"(no comment)")}),e.jsxs("span",{className:"flex items-center gap-2 text-[11.5px] text-muted-foreground",children:[e.jsx("span",{className:"font-mono",children:c.key}),e.jsx("span",{className:"truncate",children:He(c)}),e.jsx("span",{className:"flex-1"}),c.assignee&&e.jsx(he,{className:"size-4",title:`Assigned to ${c.assignee.name}`,children:e.jsx(xe,{className:D("text-[8px] font-semibold",c.assignee.isTeam?"bg-brand-soft text-brand":"bg-muted text-ink-soft"),children:ye(c.assignee.name)})}),e.jsx("span",{children:ze(c.updatedAt)})]})]},c.id))]})]},d))})}export{On as component,yt as isStatus};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,O as o}from"./index-BCjjK9dr.js";const n=()=>t.jsx(o,{});export{n as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as r,Q as u}from"./useBaseQuery-CoqlgX-x.js";function a(e,s){return r(e,u)}export{a as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as n}from"./index-BCjjK9dr.js";function u(e){return n(e.defaultTagName??"div",e,e)}export{u};
|