@snagset/server 0.1.41 → 0.1.42

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 (76) hide show
  1. package/dist/routes/invites.js +19 -7
  2. package/dist/routes/invites.js.map +1 -1
  3. package/package.json +1 -1
  4. package/static/dashboard/assets/{CompositeItem-B_Ebe9qQ.js → CompositeItem-LCGvVtac.js} +1 -1
  5. package/static/dashboard/assets/{CompositeList-CDAPQTbv.js → CompositeList-Cty0rzq_.js} +1 -1
  6. package/static/dashboard/assets/{ConfirmDialog-D1II2uNE.js → ConfirmDialog-DIwxuqY9.js} +1 -1
  7. package/static/dashboard/assets/{CopyButton-qbA2ZHWn.js → CopyButton-DDGcA3Xd.js} +1 -1
  8. package/static/dashboard/assets/{FieldItemContext-BM_KzVUj.js → FieldItemContext-EmJLiYBJ.js} +1 -1
  9. package/static/dashboard/assets/{InstallTag-DTpNoMn9.js → InstallTag-DnVvf8zx.js} +1 -1
  10. package/static/dashboard/assets/{InstanceRows-B1z-L92-.js → InstanceRows-376JOINE.js} +1 -1
  11. package/static/dashboard/assets/{McpTokens-DE2t0iiS.js → McpTokens-C6CW9eYK.js} +1 -1
  12. package/static/dashboard/assets/{SaveState-QQHqDSgx.js → SaveState-R4390int.js} +1 -1
  13. package/static/dashboard/assets/{_app-CaDt6CPJ.js → _app-CAb1BtpQ.js} +1 -1
  14. package/static/dashboard/assets/{_app-B_DiSFIt.js → _app-DaKVP1n8.js} +13 -13
  15. package/static/dashboard/assets/activity-rK4Sf6B2.js +1 -0
  16. package/static/dashboard/assets/{arrow-left-RqdORgcq.js → arrow-left-6KOxG0mI.js} +1 -1
  17. package/static/dashboard/assets/{avatar-D8S5EME4.js → avatar-BHXI3Cxz.js} +1 -1
  18. package/static/dashboard/assets/{badge-anHWhPFa.js → badge-BVeGUvW4.js} +1 -1
  19. package/static/dashboard/assets/{card-C01exIzZ.js → card-CQykn6b-.js} +1 -1
  20. package/static/dashboard/assets/{check-Gm9Xu4rH.js → check-C5gLbOCB.js} +1 -1
  21. package/static/dashboard/assets/{chevron-down-C-pVPOKU.js → chevron-down-CNIHPCcw.js} +1 -1
  22. package/static/dashboard/assets/{chevron-right-BQmYcugl.js → chevron-right-voH028MP.js} +1 -1
  23. package/static/dashboard/assets/{copy-Ckk__4oN.js → copy-2WiQI5_8.js} +1 -1
  24. package/static/dashboard/assets/{dialog-D5G50pSW.js → dialog-I_D8p4LG.js} +1 -1
  25. package/static/dashboard/assets/{dropdown-menu-Bm_opJ2p.js → dropdown-menu-BD3iKpyK.js} +1 -1
  26. package/static/dashboard/assets/{forgot-R7JqXxs5.js → forgot-Buk2U0Iq.js} +1 -1
  27. package/static/dashboard/assets/{image-off-BtbHLgOM.js → image-off-pz0vPmjw.js} +1 -1
  28. package/static/dashboard/assets/{index-p-qD6BlY.js → index-DGJgBiEe.js} +15 -15
  29. package/static/dashboard/assets/invite-8sNxyTpF.js +1 -0
  30. package/static/dashboard/assets/{label-CuvYMIVd.js → label-ClUOe0Qf.js} +1 -1
  31. package/static/dashboard/assets/{labels-DLMjYGNJ.js → labels-ToSuNGQl.js} +1 -1
  32. package/static/dashboard/assets/{layout-grid-D5ek58h7.js → layout-grid-DLRb1zmb.js} +1 -1
  33. package/static/dashboard/assets/{parts-CN1uQywE.js → parts-CeW0gqpG.js} +1 -1
  34. package/static/dashboard/assets/{plus-BsxOLtMA.js → plus-DMA0pE49.js} +1 -1
  35. package/static/dashboard/assets/reset-citpUr97.js +1 -0
  36. package/static/dashboard/assets/s._site-BVRYrqWc.js +1 -0
  37. package/static/dashboard/assets/{s._site.comments-DmrtKLHb.js → s._site.comments-CupTJMag.js} +1 -1
  38. package/static/dashboard/assets/{s._site.reviewers-CGKj-NQo.js → s._site.reviewers-CgBIszUX.js} +1 -1
  39. package/static/dashboard/assets/{s._site.settings-DvWbfMac.js → s._site.settings-CEuj_wJ1.js} +1 -1
  40. package/static/dashboard/assets/{setup-BDZJmgIB.js → setup-otr5LUWS.js} +1 -1
  41. package/static/dashboard/assets/{sign-in-BmweKwDv.js → sign-in-BRpUPHbi.js} +1 -1
  42. package/static/dashboard/assets/{sign-up-C06mQl-c.js → sign-up-sC_IfvbO.js} +1 -1
  43. package/static/dashboard/assets/sites-D52Ciw1e.js +1 -0
  44. package/static/dashboard/assets/studio-0_bXXp2K.js +1 -0
  45. package/static/dashboard/assets/{studio-BHpeuJSq.js → studio-B02T4EY4.js} +1 -1
  46. package/static/dashboard/assets/studio.index-gCE2490t.js +1 -0
  47. package/static/dashboard/assets/studio.integrations-BrvDZjmR.js +1 -0
  48. package/static/dashboard/assets/{studio.members-CEKrbJHp.js → studio.members-CWZNCLCY.js} +2 -2
  49. package/static/dashboard/assets/{studio.plan-CkOzUaJM.js → studio.plan-Bwz6dizT.js} +1 -1
  50. package/static/dashboard/assets/{sun-DXwtJyi5.js → sun-CgLdWf2g.js} +1 -1
  51. package/static/dashboard/assets/{switch-cgJL6ATv.js → switch-BZw_bqWh.js} +1 -1
  52. package/static/dashboard/assets/{table-B8VTYpZO.js → table-t_7248Aq.js} +1 -1
  53. package/static/dashboard/assets/{useAriaLabelledBy-BT5NtL2E.js → useAriaLabelledBy-BSClfAH5.js} +1 -1
  54. package/static/dashboard/assets/{useBaseQuery-DaFWLbWu.js → useBaseQuery-BzwsA17g.js} +1 -1
  55. package/static/dashboard/assets/useQuery-dbNRhTlt.js +1 -0
  56. package/static/dashboard/assets/useRender-BJVEua-j.js +1 -0
  57. package/static/dashboard/assets/{useValueChanged-cwqHWzY1.js → useValueChanged-CEh0b15T.js} +1 -1
  58. package/static/dashboard/assets/{users-CGY0g3mg.js → users-DLfPGZtA.js} +1 -1
  59. package/static/dashboard/assets/{welcome-CNtwDQMd.js → welcome-qvhXOg78.js} +3 -3
  60. package/static/dashboard/assets/{widget-signin-BOUMPGXt.js → widget-signin-CB_pBDz0.js} +1 -1
  61. package/static/dashboard/assets/{you-DH4QMiND.js → you-0VVZ27jc.js} +1 -1
  62. package/static/dashboard/assets/{zod-DfHlfdUJ.js → zod-DrXRVGy0.js} +1 -1
  63. package/static/dashboard/index.html +1 -1
  64. package/static/widget/build.json +2 -2
  65. package/static/widget/snag.js +1 -1
  66. package/static/widget/snag.runtime.js +1 -1
  67. package/static/dashboard/assets/activity-CzEy_J8-.js +0 -1
  68. package/static/dashboard/assets/invite-9eotNL9V.js +0 -1
  69. package/static/dashboard/assets/reset-8K76tpdp.js +0 -1
  70. package/static/dashboard/assets/s._site-egkPDOj9.js +0 -1
  71. package/static/dashboard/assets/sites-CkGgns1o.js +0 -1
  72. package/static/dashboard/assets/studio-CG1QMBSK.js +0 -1
  73. package/static/dashboard/assets/studio.index-BOkmM7I5.js +0 -1
  74. package/static/dashboard/assets/studio.integrations-BBik3DdK.js +0 -1
  75. package/static/dashboard/assets/useQuery-D-9vXtOo.js +0 -1
  76. package/static/dashboard/assets/useRender-BBzDGtxq.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
2
  import { randomUUID, randomBytes, createHash, timingSafeEqual } from "node:crypto";
3
3
  import { ensureStudioReviewers } from "../studioReviewers.js";
4
- import { hashPassword, setSessionCookies, verifyPassword } from "./owner.js";
4
+ import { csrfOk, hashPassword, setSessionCookies, verifyPassword } from "./owner.js";
5
5
  import { LimitReached, planLimitReached, usage } from "../plan.js";
6
6
  import { openSession, SESSION_S } from "../orgs.js";
7
7
  import { inOrg, maintenance } from "../db/scope.js";
@@ -59,6 +59,8 @@ const SENTENCE = {
59
59
  function refuse(c, why, r) {
60
60
  return fail(c, why === "invite_not_found" ? 404 : 410, why, SENTENCE[why](r));
61
61
  }
62
+ /** One sentence for both places that say it; an account may have no password, so signing in is named first. */
63
+ const accountExists = (email, studio) => `There is already an account for ${email} on this instance. Sign in to it and open this link again, or enter its password, to join ${studio || "the studio"} with it.`;
62
64
  /** Raised inside the accept transaction; everything before it rolls back with it. */
63
65
  class Refused extends Error {
64
66
  status;
@@ -258,7 +260,7 @@ export function inviteRoutes(deps) {
258
260
  to: row.email,
259
261
  subject: `${who} invited you to ${studio}`,
260
262
  text: `${who} has invited you to join ${studio} as ${withArticle(row.role)}.\n\n` +
261
- `Open this link to choose your password and sign in:\n${url}\n\n` +
263
+ `Open this link to join:\n${url}\n\n` +
262
264
  `It works once and expires on ${row.expires_at.toISOString().slice(0, 10)}. ` +
263
265
  `If you were not expecting it, you can ignore this email.\n`,
264
266
  });
@@ -337,11 +339,15 @@ export function inviteRoutes(deps) {
337
339
  return fail(c, 409, "already_a_member", `${email} is already in ${inv.org_name || "this studio"}. Sign in instead.`, { field: "email" });
338
340
  }
339
341
  let passwordHash = null;
342
+ let signedInAsIt = false;
340
343
  if (existing) {
341
- // An account on this instance already: the invite adds a studio to it,
342
- // and its own password is what proves the holder is its owner.
343
- if (!verifyPassword(password, existing.password_hash)) {
344
- return fail(c, 409, "account_exists", `There is already an account for ${email} on this instance. Enter its password to join ${inv.org_name || "the studio"} with it.`, { field: "password" });
344
+ // An account on this instance already: the invite adds a studio to it.
345
+ // Being signed in as it proves the holder is its owner, and so does its
346
+ // password. A session for ANOTHER account proves nothing about this one.
347
+ const owner = c.get("owner");
348
+ signedInAsIt = !!owner && owner.userId === existing.id && csrfOk(c);
349
+ if (!signedInAsIt && !verifyPassword(password, existing.password_hash)) {
350
+ return fail(c, 409, "account_exists", accountExists(email, inv.org_name), { field: "password" });
345
351
  }
346
352
  }
347
353
  else {
@@ -401,6 +407,12 @@ export function inviteRoutes(deps) {
401
407
  // Signed in exactly as `/auth/login` signs in: a user_sessions row is
402
408
  // the authority, the raw token goes into the cookie once.
403
409
  const session = await openSession(tx, { orgId: inv.org_id, userId, userAgent: c.req.header("User-Agent") ?? "" });
410
+ // The session that proved it is the one this browser's cookie is about
411
+ // to be replaced over: ended, as `/auth/switch` ends the one it leaves,
412
+ // so signing out later leaves nothing of this person's behind.
413
+ const was = c.get("owner");
414
+ if (signedInAsIt && was)
415
+ await tx `UPDATE user_sessions SET revoked_at = now() WHERE id = ${was.sessionId} AND revoked_at IS NULL`;
404
416
  return { userId, userName: existing?.name ?? name, session };
405
417
  });
406
418
  }
@@ -416,7 +428,7 @@ export function inviteRoutes(deps) {
416
428
  // slower request would have got had it arrived a moment later.
417
429
  return pg.constraint_name === "memberships_pkey"
418
430
  ? fail(c, 409, "already_a_member", `${email} is already in ${inv.org_name || "this studio"}. Sign in instead.`, { field: "email" })
419
- : fail(c, 409, "account_exists", `There is already an account for ${email} on this instance. Enter its password to join with it.`, { field: "password" });
431
+ : fail(c, 409, "account_exists", accountExists(email, inv.org_name), { field: "password" });
420
432
  }
421
433
  throw e;
422
434
  }
@@ -1 +1 @@
1
- {"version":3,"file":"invites.js","sourceRoot":"","sources":["../../src/routes/invites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAgB,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAqC,MAAM,YAAY,CAAC;AAChH,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,KAAK,EAAqB,MAAM,YAAY,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAqB,MAAM,kBAAkB,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AA4E7C,4JAA4J;AAC5J,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AACjC,MAAM,MA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CAAC;gBACzB,iEAAiE;gBACjE,mEAAmE;gBACnE,+DAA+D;gBAC/D,OAAO,EAAE,CAAC,eAAe,KAAK,kBAAkB;oBAC9C,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,KAAK,kBAAkB,GAAG,CAAC,QAAQ,IAAI,aAAa,oBAAoB,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;oBACnI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,gBAAgB,EAAE,aAAa,CAAC,KAAK,EAAE,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;YAChG,CAAC;YACD,MAAM,CAAC,CAAC;QACV,CAAC;QACD,iBAAiB,CAAC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAClF,OAAO,CAAC,CAAC,IAAI,CACX;YACE,GAAG,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,QAAQ,EAAE;YAC/C,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,QAAQ,EAAE;YACnC,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,IAAI;SAC5B,EACD,GAAG,CACJ,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snagset/server",
3
- "version": "0.1.41",
3
+ "version": "0.1.42",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "The Snagset server: API, dashboard and widget in one package. Node and Postgres, or Vercel.",
@@ -1 +1 @@
1
- import{aG as g,r as l,aa as h,E as R,a9 as d,k as C}from"./index-p-qD6BlY.js";import{a as x}from"./CompositeList-CDAPQTbv.js";function I(s={}){const{highlightItemOnHover:m,highlightedIndex:c,onHighlightedIndexChange:p}=g(),{ref:r,index:t}=x(s),o=c===t,i=l.useRef(null),n=h(r,i);return{compositeProps:{tabIndex:o?0:-1,onFocus(){p(t)},onMouseMove(){const e=i.current;if(!m||!e)return;const a=e.hasAttribute("disabled")||e.ariaDisabled==="true";!o&&!a&&e.focus()}},compositeRef:n,index:t}}function M(s){const{render:m,className:c,style:p,state:r=R,props:t=d,refs:o=d,metadata:i,stateAttributesMapping:n,tag:u="div",...e}=s,{compositeProps:a,compositeRef:f}=I({metadata:i});return C(u,s,{state:r,ref:[f,...o],props:[a,...t,e],stateAttributesMapping:n})}export{M as C};
1
+ import{aG as g,r as l,aa as h,E as R,a9 as d,k as C}from"./index-DGJgBiEe.js";import{a as x}from"./CompositeList-Cty0rzq_.js";function I(s={}){const{highlightItemOnHover:m,highlightedIndex:c,onHighlightedIndexChange:p}=g(),{ref:r,index:t}=x(s),o=c===t,i=l.useRef(null),n=h(r,i);return{compositeProps:{tabIndex:o?0:-1,onFocus(){p(t)},onMouseMove(){const e=i.current;if(!m||!e)return;const a=e.hasAttribute("disabled")||e.ariaDisabled==="true";!o&&!a&&e.focus()}},compositeRef:n,index:t}}function M(s){const{render:m,className:c,style:p,state:r=R,props:t=d,refs:o=d,metadata:i,stateAttributesMapping:n,tag:u="div",...e}=s,{compositeProps:a,compositeRef:f}=I({metadata:i});return C(u,s,{state:r,ref:[f,...o],props:[a,...t,e],stateAttributesMapping:n})}export{M as C};
@@ -1 +1 @@
1
- import{r as c,e as L,f as g,a8 as S,j}from"./index-p-qD6BlY.js";const k=c.createContext(void 0);function F(){return c.useContext(k)?.direction??"ltr"}const y=c.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function T(){return c.useContext(y)}function G(u={}){const{guess:o,label:e,metadata:s,textRef:p,index:t}=u,{register:i,unregister:a,subscribeMapChange:m,nextIndexRef:R}=T(),f=c.useRef(-1),[v,b]=c.useState(t==null&&o?()=>{if(f.current===-1){const l=R.current;R.current+=1,f.current=l}return f.current}:-1),I=t??v,h=c.useRef(null),E=c.useCallback(l=>{const C=h.current;C&&a(C),h.current=l,l&&i(l,{metadata:s??null,index:t??null,label:e,textRef:p})},[t,i,a,s,e,p]);return L(()=>{if(t==null)return m(l=>{const C=h.current?l.get(h.current)?.index:null;C!=null&&b(C)})},[t,m]),{ref:E,index:I}}function V(u){const{children:o,elementsRef:e,labelsRef:s,onMapChange:p}=u,t=g(p),[,i]=c.useState(!1),a=S(U).current,m=S(A).current,R=c.useRef(0),f=c.useRef(!0),v=c.useRef([]),b=c.useRef(null),I=g(()=>{f.current||(f.current=!0,i(n=>!n))}),h=g((n,d)=>{m.set(n,d),I()}),E=g(n=>{m.delete(n),I()}),l=g(n=>{const d=new Map;return e.current.length=0,s&&(s.current.length=0),n.forEach(r=>{d.set(r.element,{...r.registration.metadata??{},index:r.index}),e.current[r.index]=r.element,s&&(s.current[r.index]=r.registration.label!==void 0?r.registration.label:r.registration.textRef?.current?.textContent??r.element.textContent)}),R.current=e.current.length,d});function C(n){if(b.current?.disconnect(),b.current=null,typeof MutationObserver!="function"||n.length<2)return;const d=new MutationObserver(x=>{if(!z(x))return;let M=null;for(const w of n)if(w.isConnected){if(M&&D(M,w)>0){d.disconnect(),I();return}M=w}});b.current=d;const r=new Set;for(let x=1;x<n.length;x+=1){const M=_(n[x-1],n[x]);M&&r.add(M)}r.forEach(x=>d.observe(x,{childList:!0}))}const N=g(()=>{const[n,d]=W(m),r=l(n);C(d),v.current=n,f.current=!1,a.forEach(x=>x(r)),t(r)});L(()=>(f.current||l(v.current),()=>{e.current=[],s&&(s.current=[])}),[e,s,l]),L(()=>{f.current&&N()}),L(()=>()=>{b.current?.disconnect(),f.current=!0},[]);const O=g(n=>(a.add(n),()=>{a.delete(n)})),P=c.useMemo(()=>({register:h,unregister:E,subscribeMapChange:O,nextIndexRef:R}),[h,E,O,R]);return j.jsx(y.Provider,{value:P,children:o})}function A(){return new Map}function U(){return new Set}function W(u){const o=new Set,e=[],s=[];u.forEach((t,i)=>{if(!i.isConnected)return;const a=t.index,m={index:a??-1,element:i,registration:t};a===null?s.push(m):a>=0&&(o.add(a),e.push(m))});let p=0;return s.sort((t,i)=>D(t.element,i.element)),s.forEach(t=>{for(;o.has(p);)p+=1;t.index=p,e.push(t),p+=1}),o.size>0&&e.sort((t,i)=>t.index-i.index),[e,s.map(t=>t.element)]}function _(u,o){let e=u.parentElement;for(;e&&!e.contains(o);)e=e.parentElement;return e}function z(u){for(const o of u)for(let e=0;e<o.removedNodes.length;e+=1)if(o.removedNodes[e].isConnected)return!0;return!1}function D(u,o){return u.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}export{V as C,G as a,F as u};
1
+ import{r as c,e as L,f as g,a8 as S,j}from"./index-DGJgBiEe.js";const k=c.createContext(void 0);function F(){return c.useContext(k)?.direction??"ltr"}const y=c.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function T(){return c.useContext(y)}function G(u={}){const{guess:o,label:e,metadata:s,textRef:p,index:t}=u,{register:i,unregister:a,subscribeMapChange:m,nextIndexRef:R}=T(),f=c.useRef(-1),[v,b]=c.useState(t==null&&o?()=>{if(f.current===-1){const l=R.current;R.current+=1,f.current=l}return f.current}:-1),I=t??v,h=c.useRef(null),E=c.useCallback(l=>{const C=h.current;C&&a(C),h.current=l,l&&i(l,{metadata:s??null,index:t??null,label:e,textRef:p})},[t,i,a,s,e,p]);return L(()=>{if(t==null)return m(l=>{const C=h.current?l.get(h.current)?.index:null;C!=null&&b(C)})},[t,m]),{ref:E,index:I}}function V(u){const{children:o,elementsRef:e,labelsRef:s,onMapChange:p}=u,t=g(p),[,i]=c.useState(!1),a=S(U).current,m=S(A).current,R=c.useRef(0),f=c.useRef(!0),v=c.useRef([]),b=c.useRef(null),I=g(()=>{f.current||(f.current=!0,i(n=>!n))}),h=g((n,d)=>{m.set(n,d),I()}),E=g(n=>{m.delete(n),I()}),l=g(n=>{const d=new Map;return e.current.length=0,s&&(s.current.length=0),n.forEach(r=>{d.set(r.element,{...r.registration.metadata??{},index:r.index}),e.current[r.index]=r.element,s&&(s.current[r.index]=r.registration.label!==void 0?r.registration.label:r.registration.textRef?.current?.textContent??r.element.textContent)}),R.current=e.current.length,d});function C(n){if(b.current?.disconnect(),b.current=null,typeof MutationObserver!="function"||n.length<2)return;const d=new MutationObserver(x=>{if(!z(x))return;let M=null;for(const w of n)if(w.isConnected){if(M&&D(M,w)>0){d.disconnect(),I();return}M=w}});b.current=d;const r=new Set;for(let x=1;x<n.length;x+=1){const M=_(n[x-1],n[x]);M&&r.add(M)}r.forEach(x=>d.observe(x,{childList:!0}))}const N=g(()=>{const[n,d]=W(m),r=l(n);C(d),v.current=n,f.current=!1,a.forEach(x=>x(r)),t(r)});L(()=>(f.current||l(v.current),()=>{e.current=[],s&&(s.current=[])}),[e,s,l]),L(()=>{f.current&&N()}),L(()=>()=>{b.current?.disconnect(),f.current=!0},[]);const O=g(n=>(a.add(n),()=>{a.delete(n)})),P=c.useMemo(()=>({register:h,unregister:E,subscribeMapChange:O,nextIndexRef:R}),[h,E,O,R]);return j.jsx(y.Provider,{value:P,children:o})}function A(){return new Map}function U(){return new Set}function W(u){const o=new Set,e=[],s=[];u.forEach((t,i)=>{if(!i.isConnected)return;const a=t.index,m={index:a??-1,element:i,registration:t};a===null?s.push(m):a>=0&&(o.add(a),e.push(m))});let p=0;return s.sort((t,i)=>D(t.element,i.element)),s.forEach(t=>{for(;o.has(p);)p+=1;t.index=p,e.push(t),p+=1}),o.size>0&&e.sort((t,i)=>t.index-i.index),[e,s.map(t=>t.element)]}function _(u,o){let e=u.parentElement;for(;e&&!e.contains(o);)e=e.parentElement;return e}function z(u){for(const o of u)for(let e=0;e<o.removedNodes.length;e+=1)if(o.removedNodes[e].isConnected)return!0;return!1}function D(u,o){return u.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}export{V as C,G as a,F as u};
@@ -1 +1 @@
1
- import{r as i,j as e,B as x}from"./index-p-qD6BlY.js";import{E as u,G as g,I as C,H as D,J as v,K as b}from"./dialog-D5G50pSW.js";import{L as E,I}from"./label-CuvYMIVd.js";function T({open:t,onOpenChange:o,title:m,description:r,children:h,confirmLabel:j,confirmWord:l,busy:s=!1,onConfirm:p}){const[n,c]=i.useState(""),d=i.useId();i.useEffect(()=>{t&&c("")},[t]);const f=!l||n.trim()===l;return e.jsx(u,{open:t,onOpenChange:a=>{!a&&s||o(a)},children:e.jsx(g,{showCloseButton:!1,children:e.jsxs("form",{className:"flex flex-col gap-4",onSubmit:a=>{a.preventDefault(),f&&!s&&p()},children:[e.jsxs(C,{children:[e.jsx(D,{children:m}),r&&e.jsx(v,{children:r})]}),h,l&&e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs(E,{htmlFor:d,children:["Type ",e.jsx("b",{className:"font-semibold text-foreground",children:l})," to confirm"]}),e.jsx(I,{id:d,value:n,autoComplete:"off",spellCheck:!1,disabled:s,onChange:a=>c(a.target.value)})]}),e.jsxs(b,{children:[e.jsx(x,{type:"button",variant:"outline",disabled:s,onClick:()=>o(!1),children:"Cancel"}),e.jsx(x,{type:"submit",variant:"destructive",loading:s,disabled:!f,children:s?"Working…":j})]})]})})})}export{T as C};
1
+ import{r as i,j as e,B as x}from"./index-DGJgBiEe.js";import{E as u,G as g,I as C,H as D,J as v,K as b}from"./dialog-I_D8p4LG.js";import{L as E,I}from"./label-ClUOe0Qf.js";function T({open:t,onOpenChange:o,title:m,description:r,children:h,confirmLabel:j,confirmWord:l,busy:s=!1,onConfirm:p}){const[n,c]=i.useState(""),d=i.useId();i.useEffect(()=>{t&&c("")},[t]);const f=!l||n.trim()===l;return e.jsx(u,{open:t,onOpenChange:a=>{!a&&s||o(a)},children:e.jsx(g,{showCloseButton:!1,children:e.jsxs("form",{className:"flex flex-col gap-4",onSubmit:a=>{a.preventDefault(),f&&!s&&p()},children:[e.jsxs(C,{children:[e.jsx(D,{children:m}),r&&e.jsx(v,{children:r})]}),h,l&&e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs(E,{htmlFor:d,children:["Type ",e.jsx("b",{className:"font-semibold text-foreground",children:l})," to confirm"]}),e.jsx(I,{id:d,value:n,autoComplete:"off",spellCheck:!1,disabled:s,onChange:a=>c(a.target.value)})]}),e.jsxs(b,{children:[e.jsx(x,{type:"button",variant:"outline",disabled:s,onClick:()=>o(!1),children:"Cancel"}),e.jsx(x,{type:"submit",variant:"destructive",loading:s,disabled:!f,children:s?"Working…":j})]})]})})})}export{T as C};
@@ -1 +1 @@
1
- import{r as n,j as t,B as c}from"./index-p-qD6BlY.js";import{C}from"./check-Gm9Xu4rH.js";import{C as m}from"./copy-Ckk__4oN.js";function l({text:r,label:e="Copy",withText:s=!1,size:a="icon-sm",className:p}){const[o,i]=n.useState(!1);return t.jsxs(c,{type:"button",variant:"outline",size:s?"sm":a,className:p,"aria-label":o?"Copied":e,onClick:()=>{navigator.clipboard?.writeText(r).catch(()=>{}),i(!0),setTimeout(()=>i(!1),1500)},children:[o?t.jsx(C,{}):t.jsx(m,{}),s&&(o?"Copied":e)]})}export{l as C};
1
+ import{r as n,j as t,B as c}from"./index-DGJgBiEe.js";import{C}from"./check-C5gLbOCB.js";import{C as m}from"./copy-2WiQI5_8.js";function l({text:r,label:e="Copy",withText:s=!1,size:a="icon-sm",className:p}){const[o,i]=n.useState(!1);return t.jsxs(c,{type:"button",variant:"outline",size:s?"sm":a,className:p,"aria-label":o?"Copied":e,onClick:()=>{navigator.clipboard?.writeText(r).catch(()=>{}),i(!0),setTimeout(()=>i(!1),1500)},children:[o?t.jsx(C,{}):t.jsx(m,{}),s&&(o?"Copied":e)]})}export{l as C};
@@ -1 +1 @@
1
- import{r as t}from"./index-p-qD6BlY.js";const e=t.createContext({disabled:!1});function r(){return t.useContext(e)}export{r as u};
1
+ import{r as t}from"./index-DGJgBiEe.js";const e=t.createContext({disabled:!1});function r(){return t.useContext(e)}export{r as u};
@@ -1 +1 @@
1
- import{r as o,j as e,B as i,b2 as n}from"./index-p-qD6BlY.js";import{C as c}from"./check-Gm9Xu4rH.js";import{C as l}from"./copy-Ckk__4oN.js";function p(t){return`<script src="${location.origin}/snag.js" ${n("site")}="${t}" defer><\/script>`}function g({uid:t}){const[r,s]=o.useState(!1),a=p(t);return e.jsxs("div",{className:"relative rounded-md border border-border bg-background px-3 py-2.5 pr-11 font-mono text-[12.5px] leading-relaxed",children:[e.jsx("code",{className:"whitespace-pre-wrap break-all",children:a}),e.jsx(i,{variant:"ghost",size:"icon-sm",className:"absolute right-1.5 top-1.5","aria-label":r?"Copied":"Copy the tag",onClick:()=>{navigator.clipboard?.writeText(a),s(!0),setTimeout(()=>s(!1),1500)},children:r?e.jsx(c,{}):e.jsx(l,{})})]})}export{g as I};
1
+ import{r as o,j as e,B as i,b2 as n}from"./index-DGJgBiEe.js";import{C as c}from"./check-C5gLbOCB.js";import{C as l}from"./copy-2WiQI5_8.js";function p(t){return`<script src="${location.origin}/snag.js" ${n("site")}="${t}" defer><\/script>`}function g({uid:t}){const[r,s]=o.useState(!1),a=p(t);return e.jsxs("div",{className:"relative rounded-md border border-border bg-background px-3 py-2.5 pr-11 font-mono text-[12.5px] leading-relaxed",children:[e.jsx("code",{className:"whitespace-pre-wrap break-all",children:a}),e.jsx(i,{variant:"ghost",size:"icon-sm",className:"absolute right-1.5 top-1.5","aria-label":r?"Copied":"Copy the tag",onClick:()=>{navigator.clipboard?.writeText(a),s(!0),setTimeout(()=>s(!1),1500)},children:r?e.jsx(c,{}):e.jsx(l,{})})]})}export{g as I};
@@ -1 +1 @@
1
- import{d as U,r as f,a4 as y,s as v,a5 as j,a1 as S,j as e,B as x,z as w,A as M}from"./index-p-qD6BlY.js";import{u as L}from"./useQuery-D-9vXtOo.js";import{E as B,G as K,I,H as R,J as E,K as P}from"./dialog-D5G50pSW.js";import{L as k,I as C}from"./label-CuvYMIVd.js";import{C as z}from"./ConfirmDialog-D1II2uNE.js";import{a as N}from"./parts-CN1uQywE.js";import{b as A,u as _}from"./labels-DLMjYGNJ.js";function Z({owner:t}){const r=L(w.instance()),l=U(),s=()=>l.invalidateQueries({queryKey:w.instance().queryKey}),[g,m]=f.useState(!1),[b,p]=f.useState(!1),[h,u]=f.useState(null),d=y({mutationFn:v.disconnectStorage,onSuccess:()=>void s(),onError:c=>j.error(S(c))}),n=y({mutationFn:v.disconnectMail,onSuccess:()=>void s(),onError:c=>j.error(S(c))}),i=y({mutationFn:v.testMail,onSuccess:c=>j.success(`Sent to ${c.to}`),onError:c=>j.error(S(c))}),a=r.data?.storage,o=r.data?.mail;return e.jsxs(e.Fragment,{children:[e.jsxs(N,{title:"Storage",description:"The bucket screenshots and files go to. Without one the widget runs in annotation mode.",children:[!r.data&&e.jsx("p",{className:"m-0 text-[13px] text-muted-foreground",children:r.isError?"Could not read it.":"Reading…"}),a&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(D,{tone:a.connected?"ok":a.unreadable?"bad":"off",text:a.connected?`Connected · ${a.bucket} at ${(a.endpoint??"").replace(/^https?:\/\//,"")}${a.connectedAt?` · since ${A(a.connectedAt)}`:""}`:a.unreadable?"A bucket is stored but its keys will not decrypt — the secret key changed. Connect it again.":"Not connected — annotation mode. Comments and anchors work; screenshots are not offered."}),e.jsx(G,{}),a.source==="env"?e.jsx($,{what:"SNAGSET_STORAGE_S3_*"}):t?e.jsxs("div",{className:"flex gap-2",children:[e.jsx(x,{variant:"outline",size:"sm",onClick:()=>m(!0),children:a.connected||a.unreadable?"Replace…":"Connect a bucket…"}),(a.connected||a.unreadable)&&e.jsx(x,{variant:"ghost",size:"sm",onClick:()=>u("storage"),children:"Disconnect"})]}):null]})]}),e.jsx(N,{title:"Mail",description:"How notifications go out. Without a transport they are off, and the instance says so.",children:o&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(D,{tone:o.configured?"ok":o.unreadable?"bad":"off",text:o.configured?`${o.scheme==="resend"?"Resend":`SMTP · ${o.host??""}`} · from ${o.from}${o.updatedAt?` · since ${A(o.updatedAt)}`:""}`:o.unreadable?"A transport is stored but its secret will not decrypt — the secret key changed. Connect it again.":"No transport — notifications are off."}),o.source==="env"?e.jsx($,{what:"SNAGSET_MAIL_URL"}):t?e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(x,{variant:"outline",size:"sm",onClick:()=>p(!0),children:o.configured||o.unreadable?"Replace…":"Connect a transport…"}),o.configured&&e.jsx(x,{variant:"outline",size:"sm",loading:i.isPending,onClick:()=>i.mutate(),children:i.isPending?"Sending…":"Send a test email"}),(o.configured||o.unreadable)&&e.jsx(x,{variant:"ghost",size:"sm",onClick:()=>u("mail"),children:"Disconnect"})]}):(o.configured&&t===!1,null)]})}),e.jsx(O,{open:g,onOpenChange:m,onDone:()=>void s()}),e.jsx(q,{open:b,onOpenChange:p,onDone:()=>void s()}),e.jsx(z,{open:h!==null,onOpenChange:c=>!c&&u(null),title:h==="storage"?"Disconnect the bucket?":"Disconnect the mail transport?",description:h==="storage"?"Screenshots stop being offered. Nothing in the bucket is deleted, and reconnecting the same bucket brings the pictures back.":"Notifications stop going out until a transport is connected again.",confirmLabel:"Disconnect",busy:d.isPending||n.isPending,onConfirm:async()=>{h==="storage"?await d.mutateAsync():await n.mutateAsync(),u(null)}})]})}function T(){const{storage:t}=_().limits;return t.limit===null?null:`${F(t.used)} of ${F(t.limit)} used across the studio's sites.`}function G(){const t=T();return t===null?null:e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground",children:t})}function ee(){const t=T();return t===null?null:e.jsx(N,{title:"Storage",description:"Screenshots and files, against the studio's plan.",children:e.jsx("p",{className:"m-0 text-[13px]",children:t})})}function D({tone:t,text:r}){return e.jsxs("p",{className:"m-0 flex items-center gap-2 text-[13px]",children:[e.jsx("span",{className:`size-2 shrink-0 rounded-full ${t==="ok"?"bg-ok":t==="bad"?"bg-destructive":"bg-line-strong"}`,"aria-hidden":"true"}),e.jsx("span",{children:r})]})}function $({what:t}){return e.jsxs("p",{className:"m-0 text-[12px] text-muted-foreground",children:["Set by the environment (",e.jsx("code",{className:"font-mono",children:t}),"). Change it there; the dashboard shows it and does not offer to edit it."]})}function O({open:t,onOpenChange:r,onDone:l}){const[s,g]=f.useState({endpoint:"",bucket:"",region:"",accessKeyId:"",secretAccessKey:"",publicBaseUrl:""}),[m,b]=f.useState(""),p=y({mutationFn:v.connectStorage}),h=n=>i=>g({...s,[n]:i.target.value}),u=async n=>{n.preventDefault(),b("");try{await p.mutateAsync({endpoint:s.endpoint.trim(),bucket:s.bucket.trim(),accessKeyId:s.accessKeyId.trim(),secretAccessKey:s.secretAccessKey,...s.region.trim()?{region:s.region.trim()}:{},...s.publicBaseUrl.trim()?{publicBaseUrl:s.publicBaseUrl.trim()}:{}}),g({endpoint:"",bucket:"",region:"",accessKeyId:"",secretAccessKey:"",publicBaseUrl:""}),r(!1),l(),j.success("Bucket connected — screenshots are on")}catch(i){b(i instanceof M?i.message:"Could not reach the server.")}},d=(n,i,a,o="text",c)=>e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(k,{htmlFor:`st-${n}`,children:i}),e.jsx(C,{id:`st-${n}`,type:o,placeholder:a,value:s[n],onChange:h(n),autoComplete:"off"}),c&&e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground",children:c})]});return e.jsx(B,{open:t,onOpenChange:r,children:e.jsx(K,{children:e.jsxs("form",{onSubmit:n=>void u(n),className:"flex flex-col gap-4",noValidate:!0,children:[e.jsxs(I,{children:[e.jsx(R,{children:"Connect a bucket"}),e.jsx(E,{children:"Any S3-compatible bucket. It is probed — write, read, delete — before anything is saved, and the keys are stored encrypted with this instance's secret key."})]}),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}),d("endpoint","Endpoint","https://ams3.digitaloceanspaces.com"),d("bucket","Bucket","snagset"),d("region","Region","auto","text","Leave empty for providers that do not use one."),d("accessKeyId","Access key ID",""),d("secretAccessKey","Secret access key","","password"),d("publicBaseUrl","Public base URL","","text","Optional — only if the bucket is served from a CDN address."),e.jsxs(P,{children:[e.jsx(x,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"}),e.jsx(x,{type:"submit",loading:p.isPending,children:p.isPending?"Probing…":"Connect"})]})]})})})}function q({open:t,onOpenChange:r,onDone:l}){const[s,g]=f.useState(""),[m,b]=f.useState(""),[p,h]=f.useState(""),u=y({mutationFn:v.connectMail}),d=async n=>{n.preventDefault(),h("");try{await u.mutateAsync({url:s.trim(),from:m.trim()}),g(""),b(""),r(!1),l(),j.success("Transport connected — send a test email to be sure")}catch(i){h(i instanceof M?i.message:"Could not reach the server.")}};return e.jsx(B,{open:t,onOpenChange:r,children:e.jsx(K,{children:e.jsxs("form",{onSubmit:n=>void d(n),className:"flex flex-col gap-4",noValidate:!0,children:[e.jsxs(I,{children:[e.jsx(R,{children:"Connect a mail transport"}),e.jsx(E,{children:"Resend is the easy one — the provider owns SPF and DKIM. SMTP works with any provider. The URL is stored encrypted with this instance's secret key."})]}),p&&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:p}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(k,{htmlFor:"mail-url",children:"Transport"}),e.jsx(C,{id:"mail-url",type:"password",placeholder:"resend://re_… or smtp://user:pass@host:587",value:s,onChange:n=>g(n.target.value),autoComplete:"off"})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(k,{htmlFor:"mail-from",children:"From"}),e.jsx(C,{id:"mail-from",placeholder:"Snagset <review@kilnwork.studio>",value:m,onChange:n=>b(n.target.value)}),e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground",children:"The address every notification is sent from. Resend needs a verified domain for it."})]}),e.jsxs(P,{children:[e.jsx(x,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"}),e.jsx(x,{type:"submit",loading:u.isPending,disabled:!s.trim()||!m.trim(),children:u.isPending?"Saving…":"Connect"})]})]})})})}function F(t){const r=["B","KB","MB","GB","TB"];let l=t,s=0;for(;l>=1024&&s<r.length-1;)l/=1024,s+=1;return`${s===0?l:l.toFixed(l>=10?0:1)} ${r[s]}`}export{Z as I,ee as S,F as b};
1
+ import{d as U,r as f,a4 as y,s as v,a5 as j,a2 as S,j as e,B as x,A as w,C as M}from"./index-DGJgBiEe.js";import{u as L}from"./useQuery-dbNRhTlt.js";import{E as B,G as K,I,H as R,J as E,K as P}from"./dialog-I_D8p4LG.js";import{L as k,I as C}from"./label-ClUOe0Qf.js";import{C as z}from"./ConfirmDialog-DIwxuqY9.js";import{a as N}from"./parts-CeW0gqpG.js";import{b as A,u as _}from"./labels-ToSuNGQl.js";function Z({owner:t}){const r=L(w.instance()),l=U(),s=()=>l.invalidateQueries({queryKey:w.instance().queryKey}),[g,m]=f.useState(!1),[b,p]=f.useState(!1),[h,u]=f.useState(null),d=y({mutationFn:v.disconnectStorage,onSuccess:()=>void s(),onError:c=>j.error(S(c))}),n=y({mutationFn:v.disconnectMail,onSuccess:()=>void s(),onError:c=>j.error(S(c))}),i=y({mutationFn:v.testMail,onSuccess:c=>j.success(`Sent to ${c.to}`),onError:c=>j.error(S(c))}),a=r.data?.storage,o=r.data?.mail;return e.jsxs(e.Fragment,{children:[e.jsxs(N,{title:"Storage",description:"The bucket screenshots and files go to. Without one the widget runs in annotation mode.",children:[!r.data&&e.jsx("p",{className:"m-0 text-[13px] text-muted-foreground",children:r.isError?"Could not read it.":"Reading…"}),a&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(D,{tone:a.connected?"ok":a.unreadable?"bad":"off",text:a.connected?`Connected · ${a.bucket} at ${(a.endpoint??"").replace(/^https?:\/\//,"")}${a.connectedAt?` · since ${A(a.connectedAt)}`:""}`:a.unreadable?"A bucket is stored but its keys will not decrypt — the secret key changed. Connect it again.":"Not connected — annotation mode. Comments and anchors work; screenshots are not offered."}),e.jsx(G,{}),a.source==="env"?e.jsx($,{what:"SNAGSET_STORAGE_S3_*"}):t?e.jsxs("div",{className:"flex gap-2",children:[e.jsx(x,{variant:"outline",size:"sm",onClick:()=>m(!0),children:a.connected||a.unreadable?"Replace…":"Connect a bucket…"}),(a.connected||a.unreadable)&&e.jsx(x,{variant:"ghost",size:"sm",onClick:()=>u("storage"),children:"Disconnect"})]}):null]})]}),e.jsx(N,{title:"Mail",description:"How notifications go out. Without a transport they are off, and the instance says so.",children:o&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(D,{tone:o.configured?"ok":o.unreadable?"bad":"off",text:o.configured?`${o.scheme==="resend"?"Resend":`SMTP · ${o.host??""}`} · from ${o.from}${o.updatedAt?` · since ${A(o.updatedAt)}`:""}`:o.unreadable?"A transport is stored but its secret will not decrypt — the secret key changed. Connect it again.":"No transport — notifications are off."}),o.source==="env"?e.jsx($,{what:"SNAGSET_MAIL_URL"}):t?e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(x,{variant:"outline",size:"sm",onClick:()=>p(!0),children:o.configured||o.unreadable?"Replace…":"Connect a transport…"}),o.configured&&e.jsx(x,{variant:"outline",size:"sm",loading:i.isPending,onClick:()=>i.mutate(),children:i.isPending?"Sending…":"Send a test email"}),(o.configured||o.unreadable)&&e.jsx(x,{variant:"ghost",size:"sm",onClick:()=>u("mail"),children:"Disconnect"})]}):(o.configured&&t===!1,null)]})}),e.jsx(O,{open:g,onOpenChange:m,onDone:()=>void s()}),e.jsx(q,{open:b,onOpenChange:p,onDone:()=>void s()}),e.jsx(z,{open:h!==null,onOpenChange:c=>!c&&u(null),title:h==="storage"?"Disconnect the bucket?":"Disconnect the mail transport?",description:h==="storage"?"Screenshots stop being offered. Nothing in the bucket is deleted, and reconnecting the same bucket brings the pictures back.":"Notifications stop going out until a transport is connected again.",confirmLabel:"Disconnect",busy:d.isPending||n.isPending,onConfirm:async()=>{h==="storage"?await d.mutateAsync():await n.mutateAsync(),u(null)}})]})}function T(){const{storage:t}=_().limits;return t.limit===null?null:`${F(t.used)} of ${F(t.limit)} used across the studio's sites.`}function G(){const t=T();return t===null?null:e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground",children:t})}function ee(){const t=T();return t===null?null:e.jsx(N,{title:"Storage",description:"Screenshots and files, against the studio's plan.",children:e.jsx("p",{className:"m-0 text-[13px]",children:t})})}function D({tone:t,text:r}){return e.jsxs("p",{className:"m-0 flex items-center gap-2 text-[13px]",children:[e.jsx("span",{className:`size-2 shrink-0 rounded-full ${t==="ok"?"bg-ok":t==="bad"?"bg-destructive":"bg-line-strong"}`,"aria-hidden":"true"}),e.jsx("span",{children:r})]})}function $({what:t}){return e.jsxs("p",{className:"m-0 text-[12px] text-muted-foreground",children:["Set by the environment (",e.jsx("code",{className:"font-mono",children:t}),"). Change it there; the dashboard shows it and does not offer to edit it."]})}function O({open:t,onOpenChange:r,onDone:l}){const[s,g]=f.useState({endpoint:"",bucket:"",region:"",accessKeyId:"",secretAccessKey:"",publicBaseUrl:""}),[m,b]=f.useState(""),p=y({mutationFn:v.connectStorage}),h=n=>i=>g({...s,[n]:i.target.value}),u=async n=>{n.preventDefault(),b("");try{await p.mutateAsync({endpoint:s.endpoint.trim(),bucket:s.bucket.trim(),accessKeyId:s.accessKeyId.trim(),secretAccessKey:s.secretAccessKey,...s.region.trim()?{region:s.region.trim()}:{},...s.publicBaseUrl.trim()?{publicBaseUrl:s.publicBaseUrl.trim()}:{}}),g({endpoint:"",bucket:"",region:"",accessKeyId:"",secretAccessKey:"",publicBaseUrl:""}),r(!1),l(),j.success("Bucket connected — screenshots are on")}catch(i){b(i instanceof M?i.message:"Could not reach the server.")}},d=(n,i,a,o="text",c)=>e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(k,{htmlFor:`st-${n}`,children:i}),e.jsx(C,{id:`st-${n}`,type:o,placeholder:a,value:s[n],onChange:h(n),autoComplete:"off"}),c&&e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground",children:c})]});return e.jsx(B,{open:t,onOpenChange:r,children:e.jsx(K,{children:e.jsxs("form",{onSubmit:n=>void u(n),className:"flex flex-col gap-4",noValidate:!0,children:[e.jsxs(I,{children:[e.jsx(R,{children:"Connect a bucket"}),e.jsx(E,{children:"Any S3-compatible bucket. It is probed — write, read, delete — before anything is saved, and the keys are stored encrypted with this instance's secret key."})]}),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}),d("endpoint","Endpoint","https://ams3.digitaloceanspaces.com"),d("bucket","Bucket","snagset"),d("region","Region","auto","text","Leave empty for providers that do not use one."),d("accessKeyId","Access key ID",""),d("secretAccessKey","Secret access key","","password"),d("publicBaseUrl","Public base URL","","text","Optional — only if the bucket is served from a CDN address."),e.jsxs(P,{children:[e.jsx(x,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"}),e.jsx(x,{type:"submit",loading:p.isPending,children:p.isPending?"Probing…":"Connect"})]})]})})})}function q({open:t,onOpenChange:r,onDone:l}){const[s,g]=f.useState(""),[m,b]=f.useState(""),[p,h]=f.useState(""),u=y({mutationFn:v.connectMail}),d=async n=>{n.preventDefault(),h("");try{await u.mutateAsync({url:s.trim(),from:m.trim()}),g(""),b(""),r(!1),l(),j.success("Transport connected — send a test email to be sure")}catch(i){h(i instanceof M?i.message:"Could not reach the server.")}};return e.jsx(B,{open:t,onOpenChange:r,children:e.jsx(K,{children:e.jsxs("form",{onSubmit:n=>void d(n),className:"flex flex-col gap-4",noValidate:!0,children:[e.jsxs(I,{children:[e.jsx(R,{children:"Connect a mail transport"}),e.jsx(E,{children:"Resend is the easy one — the provider owns SPF and DKIM. SMTP works with any provider. The URL is stored encrypted with this instance's secret key."})]}),p&&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:p}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(k,{htmlFor:"mail-url",children:"Transport"}),e.jsx(C,{id:"mail-url",type:"password",placeholder:"resend://re_… or smtp://user:pass@host:587",value:s,onChange:n=>g(n.target.value),autoComplete:"off"})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(k,{htmlFor:"mail-from",children:"From"}),e.jsx(C,{id:"mail-from",placeholder:"Snagset <review@kilnwork.studio>",value:m,onChange:n=>b(n.target.value)}),e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground",children:"The address every notification is sent from. Resend needs a verified domain for it."})]}),e.jsxs(P,{children:[e.jsx(x,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"}),e.jsx(x,{type:"submit",loading:u.isPending,disabled:!s.trim()||!m.trim(),children:u.isPending?"Saving…":"Connect"})]})]})})})}function F(t){const r=["B","KB","MB","GB","TB"];let l=t,s=0;for(;l>=1024&&s<r.length-1;)l/=1024,s+=1;return`${s===0?l:l.toFixed(l>=10?0:1)} ${r[s]}`}export{Z as I,ee as S,F as b};
@@ -1 +1 @@
1
- import{d as L,r as x,a4 as R,j as e,_ as J,B as N,a5 as A,a1 as D,z as E,s as T,a7 as K,A as Q}from"./index-p-qD6BlY.js";import{u as z}from"./useQuery-D-9vXtOo.js";import{B as M}from"./badge-anHWhPFa.js";import{E as O,G as _,I as F,H as B,J as $,K as I}from"./dialog-D5G50pSW.js";import{L as S,I as G}from"./label-CuvYMIVd.js";import{S as H}from"./switch-cgJL6ATv.js";import{C as W}from"./ConfirmDialog-D1II2uNE.js";import{C}from"./CopyButton-qbA2ZHWn.js";import{a as U}from"./parts-CN1uQywE.js";import{b as Y}from"./labels-DLMjYGNJ.js";function ce({owner:n,instanceOwner:l,sites:g,mine:f=!1}){const c=L(),a=z(E.mcpTokens()),[u,d]=x.useState(!1),[j,o]=x.useState(null),[r,m]=x.useState(null),v=R({mutationFn:t=>T.revokeMcpToken(t),onSuccess:()=>{m(null),c.invalidateQueries({queryKey:["mcp-tokens"]})},onError:t=>A.error(D(t))}),y=a.data?.data??[],w=y.filter(t=>!t.revokedAt),i=a.data?.http??null,k=R({mutationFn:t=>T.setMcpHttp(t),onSuccess:(t,p)=>{c.setQueryData(E.instance().queryKey,t),c.invalidateQueries({queryKey:["mcp-tokens"]}),A.success(p?"Remote transport on — the token dialog shows its config":"Remote transport off — the endpoint answers 404 again")},onError:t=>A.error(D(t))}),b=t=>{const p=new Set(t),s=p.has("comments:write")||p.has("threads:write");return!s&&!p.has("context:read")?"Read-only":s?`Writes: ${[p.has("comments:write")?"reply":"",p.has("threads:write")?"mark ready":""].filter(Boolean).join(", ")}`:"Read-only, with capture context"};return e.jsxs(U,{title:f?"Your agent tokens":"MCP",description:"A coding agent — Claude Code, Cursor, any MCP client — reads the same brief this dashboard copies, maps a comment to the file in its checkout, and can reply or mark a fix ready. It never resolves: whoever reported a snag decides when it is fixed. A token per agent, shown once, revocable here.",children:[a.isPending&&e.jsx(J,{rows:2}),i&&e.jsxs("div",{className:"flex items-center justify-between gap-4 rounded-md border border-border px-3 py-2.5",children:[e.jsxs("div",{children:[e.jsx(S,{htmlFor:"mcp-http-on",className:"text-[13px] font-medium",children:"Remote transport"}),e.jsxs("p",{className:"m-0 mt-0.5 text-[12px] leading-normal text-muted-foreground",children:[i.enabled?e.jsxs(e.Fragment,{children:["On. An agent anywhere talks to this studio at ",e.jsx("code",{className:"font-mono text-[11.5px]",children:i.url})," with a token as a bearer. No source mapping there; a write needs a token minted for it."]}):e.jsxs(e.Fragment,{children:["Off. Agents reach this studio only from a machine with the checkout. On, ",e.jsx("code",{className:"font-mono text-[11.5px]",children:i.url})," serves the same tools to an agent anywhere, with a token as a bearer."]}),i.source==="env"?" Set by the environment (SNAGSET_MCP_HTTP_ENABLED).":""]})]}),e.jsx(H,{id:"mcp-http-on","aria-label":"Remote transport",checked:i.enabled,disabled:!l||i.source==="env"||k.isPending,onCheckedChange:t=>k.mutate(t)})]}),a.isSuccess&&w.length===0&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(M,{variant:"outline",children:"No tokens"}),e.jsx("span",{className:"text-[13px] text-muted-foreground",children:f?"You have no agent tokens yet.":"No agent can read this studio yet."})]}),y.length>0&&e.jsx("ul",{className:"m-0 flex list-none flex-col gap-2 p-0","aria-label":"Agent tokens",children:y.map(t=>e.jsxs("li",{className:`flex flex-wrap items-center gap-x-3 gap-y-1 rounded-md border border-border px-3 py-2.5 text-[13px] ${t.revokedAt?"opacity-60":""}`,children:[e.jsx("span",{className:"font-medium",children:t.name}),e.jsxs("code",{className:"font-mono text-[12.5px] text-muted-foreground",children:[t.prefix,"…"]}),e.jsx(M,{variant:"outline",className:t.revokedAt?"":"border-ok text-ok",children:t.revokedAt?"Revoked":b(t.scopes)}),e.jsxs("span",{className:"text-[12px] text-muted-foreground",children:[t.site?t.site.name:"All sites"," · ",t.lastUsedAt?`last used ${Y(t.lastUsedAt)}`:"never used",t.expiresAt&&!t.revokedAt?` · expires ${new Date(t.expiresAt).toLocaleDateString()}`:"",t.createdBy?` · by ${t.createdBy}`:""]}),t.canRevoke&&e.jsx("span",{className:"ml-auto flex gap-1",children:e.jsx(N,{variant:"ghost",size:"sm",onClick:()=>m(t),children:"Revoke"})})]},t.id))}),n&&e.jsx("div",{children:e.jsx(N,{variant:"outline",size:"sm",onClick:()=>d(!0),children:"New token…"})}),e.jsx(V,{open:u,onOpenChange:d,sites:g,http:a.data?.http??null,onDone:t=>{c.invalidateQueries({queryKey:["mcp-tokens"]}),o(t)}}),e.jsx(X,{state:j,http:a.data?.http??null,onClose:()=>o(null)}),e.jsx(W,{open:r!==null,onOpenChange:t=>!t&&m(null),title:`Revoke “${r?.name??""}”?`,description:e.jsx(e.Fragment,{children:"The agent holding it loses access on its next request. Its past replies stay, under its name. This cannot be undone — mint a new token instead."}),confirmLabel:"Revoke",busy:v.isPending,onConfirm:async()=>{r&&await v.mutateAsync(r.id)}})]})}function V({open:n,onOpenChange:l,sites:g,http:f,onDone:c}){const[a,u]=x.useState(""),[d,j]=x.useState(""),[o,r]=x.useState(["threads:read","source:map"]),[m,v]=x.useState(""),[y,w]=x.useState(!1),[i,k]=x.useState(""),b=R({mutationFn:()=>T.mintMcpToken({name:a.trim(),...d?{site:d}:{},scopes:o,...m?{expiresInDays:Number(m)}:{},...y?{allowRemoteWrites:!0}:{}})}),t=(s,h)=>r(P=>h?[...new Set([...P,s])]:P.filter(q=>q!==s)),p=async s=>{s.preventDefault(),k("");try{const h=await b.mutateAsync();u(""),j(""),r(["threads:read","source:map"]),v(""),w(!1),l(!1),c(h)}catch(h){k(h instanceof Q?h.message:"Could not reach the server.")}};return e.jsx(O,{open:n,onOpenChange:l,children:e.jsx(_,{children:e.jsxs("form",{onSubmit:s=>void p(s),className:"flex flex-col gap-4",noValidate:!0,children:[e.jsxs(F,{children:[e.jsx(B,{children:"New agent token"}),e.jsx($,{children:"Read-only by default, plus mapping a comment to a file in the agent's own checkout. Tick more only for an agent you want writing here — and it still cannot resolve anything."})]}),i&&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:i}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(S,{htmlFor:"mcp-name",children:"Name"}),e.jsx(G,{id:"mcp-name",placeholder:"Claude Code",value:a,onChange:s=>u(s.target.value),autoComplete:"off",maxLength:80}),e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground",children:"What a client sees on the agent's replies, so name the agent, not the person."})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(S,{htmlFor:"mcp-site",children:"Site"}),e.jsxs("select",{id:"mcp-site",value:d,onChange:s=>j(s.target.value),className:"h-8 rounded-md border border-input bg-background px-2.5 text-[13px]",children:[e.jsx("option",{value:"",children:"All sites"}),g.map(s=>e.jsx("option",{value:s.uid,children:s.name},s.uid))]})]}),e.jsxs("fieldset",{className:"m-0 flex flex-col gap-2 border-0 p-0",children:[e.jsx("legend",{className:"mb-1 text-[13px] font-medium",children:"Scopes"}),K.map(s=>e.jsxs("label",{className:"flex cursor-pointer items-start gap-2.5 text-[13px]",children:[e.jsx("input",{type:"checkbox",className:"mt-0.5",checked:o.includes(s.scope),onChange:h=>t(s.scope,h.target.checked)}),e.jsxs("span",{children:[e.jsx("span",{className:"block font-medium",children:s.label}),e.jsx("span",{className:"block text-[12px] text-muted-foreground",children:s.hint})]})]},s.scope))]}),f?.enabled&&(o.includes("comments:write")||o.includes("threads:write"))&&e.jsxs("label",{className:"flex cursor-pointer items-start gap-2.5 text-[13px]",children:[e.jsx("input",{type:"checkbox",className:"mt-0.5",checked:y,onChange:s=>w(s.target.checked)}),e.jsxs("span",{children:[e.jsx("span",{className:"block font-medium",children:"May write over the remote transport"}),e.jsx("span",{className:"block text-[12px] text-muted-foreground",children:"Off by default. Over POST /mcp the agent is not on a machine you can see; a write there is a decision."})]})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(S,{htmlFor:"mcp-expires",children:"Expires"}),e.jsxs("select",{id:"mcp-expires",value:m,onChange:s=>v(s.target.value),className:"h-8 rounded-md border border-input bg-background px-2.5 text-[13px]",children:[e.jsx("option",{value:"",children:"Never"}),e.jsx("option",{value:"30",children:"In 30 days"}),e.jsx("option",{value:"90",children:"In 90 days"}),e.jsx("option",{value:"365",children:"In a year"})]})]}),e.jsxs(I,{children:[e.jsx(N,{type:"button",variant:"outline",onClick:()=>l(!1),children:"Cancel"}),e.jsx(N,{type:"submit",loading:b.isPending,disabled:!a.trim()||o.length===0,children:b.isPending?"Minting…":"Create token"})]})]})})})}function X({state:n,http:l,onClose:g}){const f=typeof location<"u"?location.origin:"",c={SNAGSET_MCP_TOKEN:n?.secret??"",SNAGSET_MCP_HOST:f,...n?.token.site?{SNAGSET_MCP_PROJECT:n.token.site.uid}:{}},a=JSON.stringify({mcpServers:{snagset:{command:"npx",args:["-y","@snagset/mcp"],env:c}}},null,2),u=["claude mcp add snagset",...Object.entries(c).map(([r,m])=>`-e ${r}=${m}`),"--","npx -y @snagset/mcp"].join(" "),d=`Bearer ${n?.secret??""}`,j=["claude mcp add","--transport http","snagset",l?.url??"",`--header "Authorization: ${d}"`].join(" "),o=JSON.stringify({mcpServers:{snagset:{type:"http",url:l?.url??"",headers:{Authorization:d}}}},null,2);return e.jsx(O,{open:n!==null,onOpenChange:r=>!r&&g(),children:e.jsxs(_,{className:"sm:max-w-xl",children:[e.jsxs(F,{children:[e.jsxs(B,{children:["Token for “",n?.token.name??"","”"]}),e.jsx($,{children:"Shown this once — only its hash is stored. Put it in the agent's config, then start the agent from the site's checkout so it can map comments to files."})]}),n&&e.jsxs("div",{className:"flex flex-col gap-4 text-[13px]",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"min-w-0 flex-1 truncate rounded-md bg-muted px-2 py-1.5 font-mono text-[12px]","data-testid":"mcp-token",children:n.secret}),e.jsx(C,{text:n.secret,label:"Copy the token"})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"font-medium",children:"Claude Code"}),e.jsx(C,{text:u,label:"Copy the Claude Code command"})]}),e.jsx("pre",{className:"m-0 whitespace-pre-wrap break-all rounded-md bg-muted px-3 py-2 font-mono text-[12px]",children:u})]}),l?.enabled&&e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"font-medium",children:"Remote — an agent that is not on a machine with the checkout"}),e.jsx(C,{text:o,label:"Copy the remote config"})]}),e.jsx("pre",{className:"m-0 whitespace-pre-wrap break-all rounded-md bg-muted px-3 py-2 font-mono text-[12px]",children:j}),e.jsx("pre",{className:"m-0 overflow-x-auto rounded-md bg-muted px-3 py-2 font-mono text-[12px]",children:o}),e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground",children:"No source mapping there — nothing to search. Writes need the token minted with remote writes allowed."})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"font-medium",children:"Cursor, Claude Desktop, any MCP client"}),e.jsx(C,{text:a,label:"Copy the JSON config"})]}),e.jsx("pre",{className:"m-0 overflow-x-auto rounded-md bg-muted px-3 py-2 font-mono text-[12px]",children:a}),e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground",children:"Cursor reads it from .cursor/mcp.json in the project; Claude Desktop from its claude_desktop_config.json."})]})]}),e.jsx(I,{children:e.jsx(N,{type:"button",onClick:g,children:"Done"})})]})})}export{ce as M};
1
+ import{d as L,r as x,a4 as R,j as e,$ as J,B as N,a5 as A,a2 as D,A as E,s as T,a7 as K,C as Q}from"./index-DGJgBiEe.js";import{u as G}from"./useQuery-dbNRhTlt.js";import{B as M}from"./badge-BVeGUvW4.js";import{E as O,G as F,I as _,H as $,J as B,K as I}from"./dialog-I_D8p4LG.js";import{L as S,I as H}from"./label-ClUOe0Qf.js";import{S as z}from"./switch-BZw_bqWh.js";import{C as W}from"./ConfirmDialog-DIwxuqY9.js";import{C}from"./CopyButton-DDGcA3Xd.js";import{a as U}from"./parts-CeW0gqpG.js";import{b as Y}from"./labels-ToSuNGQl.js";function ce({owner:n,instanceOwner:l,sites:g,mine:f=!1}){const c=L(),a=G(E.mcpTokens()),[u,d]=x.useState(!1),[j,o]=x.useState(null),[r,m]=x.useState(null),v=R({mutationFn:t=>T.revokeMcpToken(t),onSuccess:()=>{m(null),c.invalidateQueries({queryKey:["mcp-tokens"]})},onError:t=>A.error(D(t))}),y=a.data?.data??[],w=y.filter(t=>!t.revokedAt),i=a.data?.http??null,k=R({mutationFn:t=>T.setMcpHttp(t),onSuccess:(t,p)=>{c.setQueryData(E.instance().queryKey,t),c.invalidateQueries({queryKey:["mcp-tokens"]}),A.success(p?"Remote transport on — the token dialog shows its config":"Remote transport off — the endpoint answers 404 again")},onError:t=>A.error(D(t))}),b=t=>{const p=new Set(t),s=p.has("comments:write")||p.has("threads:write");return!s&&!p.has("context:read")?"Read-only":s?`Writes: ${[p.has("comments:write")?"reply":"",p.has("threads:write")?"mark ready":""].filter(Boolean).join(", ")}`:"Read-only, with capture context"};return e.jsxs(U,{title:f?"Your agent tokens":"MCP",description:"A coding agent — Claude Code, Cursor, any MCP client — reads the same brief this dashboard copies, maps a comment to the file in its checkout, and can reply or mark a fix ready. It never resolves: whoever reported a snag decides when it is fixed. A token per agent, shown once, revocable here.",children:[a.isPending&&e.jsx(J,{rows:2}),i&&e.jsxs("div",{className:"flex items-center justify-between gap-4 rounded-md border border-border px-3 py-2.5",children:[e.jsxs("div",{children:[e.jsx(S,{htmlFor:"mcp-http-on",className:"text-[13px] font-medium",children:"Remote transport"}),e.jsxs("p",{className:"m-0 mt-0.5 text-[12px] leading-normal text-muted-foreground",children:[i.enabled?e.jsxs(e.Fragment,{children:["On. An agent anywhere talks to this studio at ",e.jsx("code",{className:"font-mono text-[11.5px]",children:i.url})," with a token as a bearer. No source mapping there; a write needs a token minted for it."]}):e.jsxs(e.Fragment,{children:["Off. Agents reach this studio only from a machine with the checkout. On, ",e.jsx("code",{className:"font-mono text-[11.5px]",children:i.url})," serves the same tools to an agent anywhere, with a token as a bearer."]}),i.source==="env"?" Set by the environment (SNAGSET_MCP_HTTP_ENABLED).":""]})]}),e.jsx(z,{id:"mcp-http-on","aria-label":"Remote transport",checked:i.enabled,disabled:!l||i.source==="env"||k.isPending,onCheckedChange:t=>k.mutate(t)})]}),a.isSuccess&&w.length===0&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(M,{variant:"outline",children:"No tokens"}),e.jsx("span",{className:"text-[13px] text-muted-foreground",children:f?"You have no agent tokens yet.":"No agent can read this studio yet."})]}),y.length>0&&e.jsx("ul",{className:"m-0 flex list-none flex-col gap-2 p-0","aria-label":"Agent tokens",children:y.map(t=>e.jsxs("li",{className:`flex flex-wrap items-center gap-x-3 gap-y-1 rounded-md border border-border px-3 py-2.5 text-[13px] ${t.revokedAt?"opacity-60":""}`,children:[e.jsx("span",{className:"font-medium",children:t.name}),e.jsxs("code",{className:"font-mono text-[12.5px] text-muted-foreground",children:[t.prefix,"…"]}),e.jsx(M,{variant:"outline",className:t.revokedAt?"":"border-ok text-ok",children:t.revokedAt?"Revoked":b(t.scopes)}),e.jsxs("span",{className:"text-[12px] text-muted-foreground",children:[t.site?t.site.name:"All sites"," · ",t.lastUsedAt?`last used ${Y(t.lastUsedAt)}`:"never used",t.expiresAt&&!t.revokedAt?` · expires ${new Date(t.expiresAt).toLocaleDateString()}`:"",t.createdBy?` · by ${t.createdBy}`:""]}),t.canRevoke&&e.jsx("span",{className:"ml-auto flex gap-1",children:e.jsx(N,{variant:"ghost",size:"sm",onClick:()=>m(t),children:"Revoke"})})]},t.id))}),n&&e.jsx("div",{children:e.jsx(N,{variant:"outline",size:"sm",onClick:()=>d(!0),children:"New token…"})}),e.jsx(V,{open:u,onOpenChange:d,sites:g,http:a.data?.http??null,onDone:t=>{c.invalidateQueries({queryKey:["mcp-tokens"]}),o(t)}}),e.jsx(X,{state:j,http:a.data?.http??null,onClose:()=>o(null)}),e.jsx(W,{open:r!==null,onOpenChange:t=>!t&&m(null),title:`Revoke “${r?.name??""}”?`,description:e.jsx(e.Fragment,{children:"The agent holding it loses access on its next request. Its past replies stay, under its name. This cannot be undone — mint a new token instead."}),confirmLabel:"Revoke",busy:v.isPending,onConfirm:async()=>{r&&await v.mutateAsync(r.id)}})]})}function V({open:n,onOpenChange:l,sites:g,http:f,onDone:c}){const[a,u]=x.useState(""),[d,j]=x.useState(""),[o,r]=x.useState(["threads:read","source:map"]),[m,v]=x.useState(""),[y,w]=x.useState(!1),[i,k]=x.useState(""),b=R({mutationFn:()=>T.mintMcpToken({name:a.trim(),...d?{site:d}:{},scopes:o,...m?{expiresInDays:Number(m)}:{},...y?{allowRemoteWrites:!0}:{}})}),t=(s,h)=>r(P=>h?[...new Set([...P,s])]:P.filter(q=>q!==s)),p=async s=>{s.preventDefault(),k("");try{const h=await b.mutateAsync();u(""),j(""),r(["threads:read","source:map"]),v(""),w(!1),l(!1),c(h)}catch(h){k(h instanceof Q?h.message:"Could not reach the server.")}};return e.jsx(O,{open:n,onOpenChange:l,children:e.jsx(F,{children:e.jsxs("form",{onSubmit:s=>void p(s),className:"flex flex-col gap-4",noValidate:!0,children:[e.jsxs(_,{children:[e.jsx($,{children:"New agent token"}),e.jsx(B,{children:"Read-only by default, plus mapping a comment to a file in the agent's own checkout. Tick more only for an agent you want writing here — and it still cannot resolve anything."})]}),i&&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:i}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(S,{htmlFor:"mcp-name",children:"Name"}),e.jsx(H,{id:"mcp-name",placeholder:"Claude Code",value:a,onChange:s=>u(s.target.value),autoComplete:"off",maxLength:80}),e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground",children:"What a client sees on the agent's replies, so name the agent, not the person."})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(S,{htmlFor:"mcp-site",children:"Site"}),e.jsxs("select",{id:"mcp-site",value:d,onChange:s=>j(s.target.value),className:"h-8 rounded-md border border-input bg-background px-2.5 text-[13px]",children:[e.jsx("option",{value:"",children:"All sites"}),g.map(s=>e.jsx("option",{value:s.uid,children:s.name},s.uid))]})]}),e.jsxs("fieldset",{className:"m-0 flex flex-col gap-2 border-0 p-0",children:[e.jsx("legend",{className:"mb-1 text-[13px] font-medium",children:"Scopes"}),K.map(s=>e.jsxs("label",{className:"flex cursor-pointer items-start gap-2.5 text-[13px]",children:[e.jsx("input",{type:"checkbox",className:"mt-0.5",checked:o.includes(s.scope),onChange:h=>t(s.scope,h.target.checked)}),e.jsxs("span",{children:[e.jsx("span",{className:"block font-medium",children:s.label}),e.jsx("span",{className:"block text-[12px] text-muted-foreground",children:s.hint})]})]},s.scope))]}),f?.enabled&&(o.includes("comments:write")||o.includes("threads:write"))&&e.jsxs("label",{className:"flex cursor-pointer items-start gap-2.5 text-[13px]",children:[e.jsx("input",{type:"checkbox",className:"mt-0.5",checked:y,onChange:s=>w(s.target.checked)}),e.jsxs("span",{children:[e.jsx("span",{className:"block font-medium",children:"May write over the remote transport"}),e.jsx("span",{className:"block text-[12px] text-muted-foreground",children:"Off by default. Over POST /mcp the agent is not on a machine you can see; a write there is a decision."})]})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(S,{htmlFor:"mcp-expires",children:"Expires"}),e.jsxs("select",{id:"mcp-expires",value:m,onChange:s=>v(s.target.value),className:"h-8 rounded-md border border-input bg-background px-2.5 text-[13px]",children:[e.jsx("option",{value:"",children:"Never"}),e.jsx("option",{value:"30",children:"In 30 days"}),e.jsx("option",{value:"90",children:"In 90 days"}),e.jsx("option",{value:"365",children:"In a year"})]})]}),e.jsxs(I,{children:[e.jsx(N,{type:"button",variant:"outline",onClick:()=>l(!1),children:"Cancel"}),e.jsx(N,{type:"submit",loading:b.isPending,disabled:!a.trim()||o.length===0,children:b.isPending?"Minting…":"Create token"})]})]})})})}function X({state:n,http:l,onClose:g}){const f=typeof location<"u"?location.origin:"",c={SNAGSET_MCP_TOKEN:n?.secret??"",SNAGSET_MCP_HOST:f,...n?.token.site?{SNAGSET_MCP_PROJECT:n.token.site.uid}:{}},a=JSON.stringify({mcpServers:{snagset:{command:"npx",args:["-y","@snagset/mcp"],env:c}}},null,2),u=["claude mcp add snagset",...Object.entries(c).map(([r,m])=>`-e ${r}=${m}`),"--","npx -y @snagset/mcp"].join(" "),d=`Bearer ${n?.secret??""}`,j=["claude mcp add","--transport http","snagset",l?.url??"",`--header "Authorization: ${d}"`].join(" "),o=JSON.stringify({mcpServers:{snagset:{type:"http",url:l?.url??"",headers:{Authorization:d}}}},null,2);return e.jsx(O,{open:n!==null,onOpenChange:r=>!r&&g(),children:e.jsxs(F,{className:"sm:max-w-xl",children:[e.jsxs(_,{children:[e.jsxs($,{children:["Token for “",n?.token.name??"","”"]}),e.jsx(B,{children:"Shown this once — only its hash is stored. Put it in the agent's config, then start the agent from the site's checkout so it can map comments to files."})]}),n&&e.jsxs("div",{className:"flex flex-col gap-4 text-[13px]",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"min-w-0 flex-1 truncate rounded-md bg-muted px-2 py-1.5 font-mono text-[12px]","data-testid":"mcp-token",children:n.secret}),e.jsx(C,{text:n.secret,label:"Copy the token"})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"font-medium",children:"Claude Code"}),e.jsx(C,{text:u,label:"Copy the Claude Code command"})]}),e.jsx("pre",{className:"m-0 whitespace-pre-wrap break-all rounded-md bg-muted px-3 py-2 font-mono text-[12px]",children:u})]}),l?.enabled&&e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"font-medium",children:"Remote — an agent that is not on a machine with the checkout"}),e.jsx(C,{text:o,label:"Copy the remote config"})]}),e.jsx("pre",{className:"m-0 whitespace-pre-wrap break-all rounded-md bg-muted px-3 py-2 font-mono text-[12px]",children:j}),e.jsx("pre",{className:"m-0 overflow-x-auto rounded-md bg-muted px-3 py-2 font-mono text-[12px]",children:o}),e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground",children:"No source mapping there — nothing to search. Writes need the token minted with remote writes allowed."})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"font-medium",children:"Cursor, Claude Desktop, any MCP client"}),e.jsx(C,{text:a,label:"Copy the JSON config"})]}),e.jsx("pre",{className:"m-0 overflow-x-auto rounded-md bg-muted px-3 py-2 font-mono text-[12px]",children:a}),e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground",children:"Cursor reads it from .cursor/mcp.json in the project; Claude Desktop from its claude_desktop_config.json."})]})]}),e.jsx(I,{children:e.jsx(N,{type:"button",onClick:g,children:"Done"})})]})})}export{ce as M};
@@ -1 +1 @@
1
- import{r,j as e,b1 as o}from"./index-p-qD6BlY.js";function l({saving:s,savedAt:t}){const[i,a]=r.useState(!1);return r.useEffect(()=>{if(!t)return;a(!0);const n=setTimeout(()=>a(!1),1800);return()=>clearTimeout(n)},[t]),s?e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[12.5px] text-muted-foreground","aria-live":"polite",children:[e.jsx(o,{className:"size-3.5 animate-spin","aria-hidden":"true"}),"Saving"]}):e.jsx("span",{className:"text-[12.5px] text-muted-foreground","aria-live":"polite",children:i?"Saved":""})}export{l as S};
1
+ import{r,j as e,b1 as o}from"./index-DGJgBiEe.js";function l({saving:s,savedAt:t}){const[i,a]=r.useState(!1);return r.useEffect(()=>{if(!t)return;a(!0);const n=setTimeout(()=>a(!1),1800);return()=>clearTimeout(n)},[t]),s?e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[12.5px] text-muted-foreground","aria-live":"polite",children:[e.jsx(o,{className:"size-3.5 animate-spin","aria-hidden":"true"}),"Saving"]}):e.jsx("span",{className:"text-[12.5px] text-muted-foreground","aria-live":"polite",children:i?"Saved":""})}export{l as S};
@@ -1 +1 @@
1
- import{j as e,u as n,G as a,B as r}from"./index-p-qD6BlY.js";function i({error:s}){const t=n(),o=s instanceof Error?s.message:"Something went wrong.";return e.jsx(a,{children:e.jsxs("div",{className:"flex flex-col items-start gap-3",children:[e.jsx("h1",{className:"m-0 text-lg font-semibold",children:"Could not load the dashboard"}),e.jsx("p",{className:"m-0 text-muted-foreground",children:o}),e.jsx(r,{variant:"outline",size:"sm",onClick:()=>void t.invalidate(),children:"Try again"})]})})}const m=({error:s})=>e.jsx(i,{error:s});export{m as errorComponent};
1
+ import{j as e,u as n,G as a,B as r}from"./index-DGJgBiEe.js";function i({error:s}){const t=n(),o=s instanceof Error?s.message:"Something went wrong.";return e.jsx(a,{children:e.jsxs("div",{className:"flex flex-col items-start gap-3",children:[e.jsx("h1",{className:"m-0 text-lg font-semibold",children:"Could not load the dashboard"}),e.jsx("p",{className:"m-0 text-muted-foreground",children:o}),e.jsx(r,{variant:"outline",size:"sm",onClick:()=>void t.invalidate(),children:"Try again"})]})})}const m=({error:s})=>e.jsx(i,{error:s});export{m as errorComponent};