@snagset/server 0.1.8 → 0.1.9

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 (59) hide show
  1. package/package.json +1 -1
  2. package/static/dashboard/assets/{CompositeItem-B5AtyrD6.js → CompositeItem-Db_8iHSG.js} +1 -1
  3. package/static/dashboard/assets/{ConfirmDialog-ClUMXHe1.js → ConfirmDialog-eCzw7vjK.js} +1 -1
  4. package/static/dashboard/assets/{CopyButton-DCsj-LZV.js → CopyButton-lcjux1TA.js} +1 -1
  5. package/static/dashboard/assets/{FieldItemContext-DVEWRsEB.js → FieldItemContext-i5zdyQYl.js} +1 -1
  6. package/static/dashboard/assets/{InstallTag-B_qg9P2r.js → InstallTag-Eqs3RM9e.js} +1 -1
  7. package/static/dashboard/assets/{SaveState-B-6cG0nU.js → SaveState-Cf_bnJmg.js} +1 -1
  8. package/static/dashboard/assets/{_app-DQfqCcnn.js → _app-CuKLSKZ2.js} +1 -1
  9. package/static/dashboard/assets/{_app-DKjbkrkj.js → _app-qNVG5lsX.js} +1 -1
  10. package/static/dashboard/assets/{activity-D8OAqMBy.js → activity-CQLBFIV4.js} +1 -1
  11. package/static/dashboard/assets/{arrow-left-D2obUiWw.js → arrow-left-CQUHEFUP.js} +1 -1
  12. package/static/dashboard/assets/{avatar-DlHbKa1H.js → avatar-CWT37Ivf.js} +1 -1
  13. package/static/dashboard/assets/{badge-CQoGgFU8.js → badge-thtKAJ0h.js} +1 -1
  14. package/static/dashboard/assets/{card-YnwmM74t.js → card-CsXE7vKD.js} +1 -1
  15. package/static/dashboard/assets/{check-CLHnIgiu.js → check-Bc_1fmPx.js} +1 -1
  16. package/static/dashboard/assets/{chevron-right-BX_QQNXH.js → chevron-right-neQQkaOt.js} +1 -1
  17. package/static/dashboard/assets/{copy-ZOZ0pLVD.js → copy-O3USBatC.js} +1 -1
  18. package/static/dashboard/assets/{dialog-BO8bYmy1.js → dialog-MC-TOvQV.js} +1 -1
  19. package/static/dashboard/assets/{dropdown-menu-NLHjhAUe.js → dropdown-menu-C2ZhmONu.js} +1 -1
  20. package/static/dashboard/assets/{image-off-Dg9jTwH7.js → image-off-Bu6l8gP5.js} +1 -1
  21. package/static/dashboard/assets/{index-B7_Oj3hr.js → index-C6gyyLd5.js} +3 -3
  22. package/static/dashboard/assets/{label-Dpq7t35_.js → label-BTdAT39L.js} +1 -1
  23. package/static/dashboard/assets/{layout-grid-Bf2WS_DV.js → layout-grid-rYWIGaIJ.js} +1 -1
  24. package/static/dashboard/assets/me-CI9giaT9.js +1 -0
  25. package/static/dashboard/assets/{parts-C1QjM02Y.js → parts-kPNZVO9H.js} +1 -1
  26. package/static/dashboard/assets/{plus-D247LXUb.js → plus-CcJ1Zwa7.js} +1 -1
  27. package/static/dashboard/assets/s._site-D0HRtia-.js +1 -0
  28. package/static/dashboard/assets/{s._site.comments-DEzj9S7b.js → s._site.comments-D3ACsr3a.js} +1 -1
  29. package/static/dashboard/assets/{s._site.reviewers-DZ5GqGMU.js → s._site.reviewers-Djq2t6Dx.js} +1 -1
  30. package/static/dashboard/assets/{s._site.settings-BIjpyBsc.js → s._site.settings-D0b6vJci.js} +1 -1
  31. package/static/dashboard/assets/setup-D748SEIm.js +1 -0
  32. package/static/dashboard/assets/{sign-in-H0jNzIrs.js → sign-in-CKSiZWCo.js} +1 -1
  33. package/static/dashboard/assets/{sign-up-DyiLEKht.js → sign-up-BX9j_Ya2.js} +1 -1
  34. package/static/dashboard/assets/{sites-Dnmo-2Me.js → sites-QwJy87Y8.js} +1 -1
  35. package/static/dashboard/assets/studio-B_ma5JGA.js +1 -0
  36. package/static/dashboard/assets/{studio-enyabWEx.js → studio-HH_J6PPv.js} +1 -1
  37. package/static/dashboard/assets/{studio.index-nkeq6PME.js → studio.index-DrtJF7DT.js} +1 -1
  38. package/static/dashboard/assets/{studio.integrations-BWPo36fJ.js → studio.integrations-Cv34ukzT.js} +1 -1
  39. package/static/dashboard/assets/{studio.members-DXS5CJK_.js → studio.members-DTbKcrEI.js} +1 -1
  40. package/static/dashboard/assets/{sun-BzkBukC4.js → sun-CWPmS6_O.js} +1 -1
  41. package/static/dashboard/assets/{switch-ElcxbE6-.js → switch-CzijGUed.js} +1 -1
  42. package/static/dashboard/assets/{table-DdjoxL3-.js → table-CiZO2uuW.js} +1 -1
  43. package/static/dashboard/assets/{useAriaLabelledBy-BNUj3f_d.js → useAriaLabelledBy-oZFqC809.js} +1 -1
  44. package/static/dashboard/assets/{useBaseQuery-yj7uWlSz.js → useBaseQuery-CHgLQD-M.js} +1 -1
  45. package/static/dashboard/assets/useQuery-C6FyjMS-.js +1 -0
  46. package/static/dashboard/assets/useRender-D5jZ1wns.js +1 -0
  47. package/static/dashboard/assets/{useValueChanged-DQ0Iea1L.js → useValueChanged-Dvr7PvAV.js} +1 -1
  48. package/static/dashboard/assets/{users-DDrXwrCG.js → users-Ci-ogubz.js} +1 -1
  49. package/static/dashboard/assets/welcome-BDWw5Qlv.js +11 -0
  50. package/static/dashboard/assets/{you-CP3bZ82A.js → you-DAUNHAFI.js} +1 -1
  51. package/static/dashboard/assets/{zod-BUdBrC5l.js → zod-CtjFmGX5.js} +1 -1
  52. package/static/dashboard/index.html +1 -1
  53. package/static/dashboard/assets/me-DoCJgtG9.js +0 -1
  54. package/static/dashboard/assets/s._site-BDWAQaIb.js +0 -1
  55. package/static/dashboard/assets/setup-ONHVc5kM.js +0 -1
  56. package/static/dashboard/assets/studio-DxOnhxuB.js +0 -1
  57. package/static/dashboard/assets/useQuery-CBgK187B.js +0 -1
  58. package/static/dashboard/assets/useRender-BHlMpPxr.js +0 -1
  59. package/static/dashboard/assets/welcome-Dg1oA1uA.js +0 -11
@@ -21,7 +21,7 @@
21
21
  </script>
22
22
  <link rel="icon" href="/mark.svg" type="image/svg+xml" />
23
23
  <title>Snagset</title>
24
- <script type="module" crossorigin src="/assets/index-B7_Oj3hr.js"></script>
24
+ <script type="module" crossorigin src="/assets/index-C6gyyLd5.js"></script>
25
25
  <link rel="stylesheet" crossorigin href="/assets/index-BR4Mnw-o.css">
26
26
  </head>
27
27
  <body>
@@ -1 +0,0 @@
1
- import{u as r,Q as u,d as s}from"./useBaseQuery-yj7uWlSz.js";import{y as t}from"./index-B7_Oj3hr.js";function a(e,o){return r({...e,enabled:!0,suspense:!0,throwOnError:s,placeholderData:void 0},u)}function i(){return a(t.me()).data}export{i as u};
@@ -1 +0,0 @@
1
- import{j as t,O as o}from"./index-B7_Oj3hr.js";const n=()=>t.jsx(o,{});export{n as component};
@@ -1 +0,0 @@
1
- import{R as x,o as h,r as g,p as f,x as j,z as N,A as w,j as e,G as y,B as b,C as S,D as r}from"./index-B7_Oj3hr.js";import{u as v,a as A}from"./zod-BUdBrC5l.js";import{L as o,I as i}from"./label-Dpq7t35_.js";const C=S({email:r().trim().email("An email address"),password:r().min(12,"At least 12 characters"),orgName:r().trim().max(120).optional()});function E(){const{claim:c}=x.useSearch(),d=h(),[l,n]=g.useState(""),{register:s,handleSubmit:p,formState:a}=v({resolver:A(C)}),u=p(async t=>{n("");try{await f.setup({token:c??"",orgName:t.orgName||"My studio",projectName:"",email:t.email,password:t.password,address:location.origin}),j("in"),N.clear(),d({to:"/welcome",replace:!0})}catch(m){n(m instanceof w?m.message:"Something went wrong. Try again.")}});return e.jsx(y,{width:400,children:e.jsxs("form",{onSubmit:u,className:"flex flex-col gap-4",noValidate:!0,children:[e.jsxs("div",{children:[e.jsx("h1",{className:"m-0 text-[22px] font-semibold tracking-tight",children:"Set up Snagset"}),e.jsx("p",{className:"m-0 mt-1.5 text-muted-foreground",children:"This instance has not been claimed yet. The account you make here is the only one, until you add another."})]}),l&&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:l}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(o,{htmlFor:"email",children:"Your email"}),e.jsx(i,{id:"email",type:"email",autoComplete:"username","aria-invalid":!!a.errors.email,...s("email")}),a.errors.email&&e.jsx("p",{className:"m-0 text-[12px] text-destructive",children:a.errors.email.message})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(o,{htmlFor:"password",children:"Password"}),e.jsx(i,{id:"password",type:"password",autoComplete:"new-password","aria-invalid":!!a.errors.password,...s("password")}),e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground",children:"At least 12 characters. There is no reset email on a fresh install — keep it."})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs(o,{htmlFor:"orgName",children:["Studio name ",e.jsx("span",{className:"font-normal text-muted-foreground",children:"optional"})]}),e.jsx(i,{id:"orgName",placeholder:"My studio",...s("orgName")})]}),e.jsx(b,{type:"submit",size:"lg",loading:a.isSubmitting,children:a.isSubmitting?"Setting up…":"Create my account"})]})})}export{E as component};
@@ -1 +0,0 @@
1
- import{j as t,O as o}from"./index-B7_Oj3hr.js";const n=()=>t.jsx(o,{});export{n as component};
@@ -1 +0,0 @@
1
- import{u as r,Q as u}from"./useBaseQuery-yj7uWlSz.js";function a(e,s){return r(e,u)}export{a as u};
@@ -1 +0,0 @@
1
- import{i as n}from"./index-B7_Oj3hr.js";function u(e){return n(e.defaultTagName??"div",e,e)}export{u};
@@ -1,11 +0,0 @@
1
- import{c as z,H as Q,o as B,t as K,r as d,j as e,G as L,f as k,B as n,p as w,y as g,A as S}from"./index-B7_Oj3hr.js";import{C as f}from"./card-YnwmM74t.js";import{L as C,I as q}from"./label-Dpq7t35_.js";import{I as P}from"./InstallTag-B_qg9P2r.js";import{C as R}from"./check-CLHnIgiu.js";import{A}from"./arrow-left-D2obUiWw.js";import"./copy-ZOZ0pLVD.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 T=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],j=z("arrow-right",T);/**
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 _=[["path",{d:"M5.8 11.3 2 22l10.7-3.79",key:"gwxi1d"}],["path",{d:"M4 3h.01",key:"1vcuye"}],["path",{d:"M22 8h.01",key:"1mrtc2"}],["path",{d:"M15 2h.01",key:"1cjtqr"}],["path",{d:"M22 20h.01",key:"1mrys2"}],["path",{d:"m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10",key:"hbicv8"}],["path",{d:"m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17",key:"1i94pl"}],["path",{d:"m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7",key:"1cofks"}],["path",{d:"M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z",key:"4kbmks"}]],G=z("party-popper",_),I=["Site","Address","Install"];function J(){const{me:D,site:r}=Q.useRouteContext(),y=B(),l=K(),[a,c]=d.useState(0),[o,M]=d.useState(r.name==="First project"?"":r.name),[m,E]=d.useState(""),[i,x]=d.useState(!1),[h,b]=d.useState(!1),[v,u]=d.useState(""),F=async()=>{x(!0),b(!0),u("");try{await w.deleteSite(r.uid),l.removeQueries({queryKey:["origins",r.uid]}),await l.fetchQuery(g.me()),y({to:"/sites",replace:!0})}catch(t){u(t instanceof S?t.message:"Something went wrong. Try again."),x(!1),b(!1)}},N=async(t,s)=>{x(!0),u("");try{await w.editSite(r.uid,t),t.domain&&l.setQueryData(g.origins(r.uid).queryKey,{domain:t.domain,origins:[]}),await l.invalidateQueries({queryKey:g.me().queryKey}),await l.fetchQuery(g.me()),s()}catch(p){u(p instanceof S?p.message:"Could not reach the server.")}finally{x(!1)}};return e.jsx("div",{className:"relative min-h-dvh bg-background",children:e.jsxs(L,{width:600,children:[e.jsxs("div",{className:"absolute right-6 top-5 text-[12.5px] text-muted-foreground",children:["Signed in as ",D.user.email]}),a<3&&e.jsx("ol",{className:"m-0 mb-6 flex list-none items-center gap-3.5 p-0","aria-label":"Steps",children:I.map((t,s)=>e.jsxs("li",{className:"flex items-center gap-2.5 text-[13.5px] font-medium",children:[e.jsx("span",{className:k("flex size-7 items-center justify-center rounded-full border-[1.5px] text-[12.5px]",s<a&&"border-brand bg-brand text-brand-foreground",s===a&&"border-brand text-brand ring-[3px] ring-brand-soft",s>a&&"border-line-strong text-muted-foreground"),"aria-current":s===a?"step":void 0,children:s<a?e.jsx(R,{className:"size-3.5"}):s+1}),e.jsx("span",{className:s===a?"text-foreground":"text-muted-foreground",children:t}),s<I.length-1&&e.jsx("span",{className:k("h-px w-[90px]",s<a?"bg-brand":"bg-border")})]},t))}),v&&e.jsx("p",{role:"alert",className:"m-0 mb-4 rounded-md border border-destructive/40 bg-warn-soft px-3 py-2 text-[13px] text-destructive",children:v}),a===0&&e.jsx(f,{className:"gap-4 p-7",children:e.jsxs("form",{className:"flex flex-col gap-4",onSubmit:t=>{t.preventDefault(),!(!o.trim()||i)&&N({name:o.trim()},()=>c(1))},children:[e.jsxs("div",{children:[e.jsx("h1",{className:"m-0 text-[21px] font-semibold leading-tight tracking-tight",children:"What is the site called?"}),e.jsx("p",{className:"m-0 mt-2 text-muted-foreground",children:"One client website. You can add more from Sites later."})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(C,{htmlFor:"first-name",children:"Name"}),e.jsx(q,{id:"first-name",placeholder:"Kilnwork",value:o,onChange:t=>M(t.target.value),autoFocus:!0})]}),e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(n,{type:"button",variant:"ghost",loading:h,disabled:i&&!h,onClick:()=>void F(),children:"Skip for now"}),e.jsxs(n,{type:"submit",loading:i&&!h,disabled:!o.trim()||h,children:[i?"Saving…":"Continue",e.jsx(j,{})]})]}),e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground",children:"No site yet? Skip, and add one from Sites when it is ready."})]})}),a===1&&e.jsx(f,{className:"gap-4 p-7",children:e.jsxs("form",{className:"flex flex-col gap-4",onSubmit:t=>{t.preventDefault(),!(!m.trim()||i)&&N({domain:m.trim()},()=>c(2))},children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"m-0 text-[21px] font-semibold leading-tight tracking-tight",children:["Where does ",o||r.name," live?"]}),e.jsx("p",{className:"m-0 mt-2 text-muted-foreground",children:"Its domain. Every subdomain, scheme and port of it may run the widget — staging, previews, and localhost while you build. Exact addresses elsewhere can be added in the site's settings."})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(C,{htmlFor:"first-domain",children:"Domain"}),e.jsx(q,{id:"first-domain",placeholder:"kilnwork.studio",value:m,onChange:t=>E(t.target.value),autoFocus:!0})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsxs(n,{type:"button",variant:"ghost",onClick:()=>c(0),children:[e.jsx(A,{}),"Back"]}),e.jsx("div",{className:"flex-1"}),e.jsxs(n,{type:"submit",loading:i,disabled:!m.trim(),children:[i?"Saving…":"Continue",e.jsx(j,{})]})]})]})}),a===2&&e.jsxs(f,{className:"gap-4 p-7",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"m-0 text-[21px] font-semibold leading-tight tracking-tight",children:"Install the widget"}),e.jsxs("p",{className:"m-0 mt-2 text-muted-foreground",children:["Paste this before ",e.jsx("code",{className:"font-mono",children:"</body>"})," on every page you want reviewed, and deploy."]})]}),e.jsx(P,{uid:r.uid}),e.jsxs("div",{className:"flex items-center",children:[e.jsxs(n,{type:"button",variant:"ghost",onClick:()=>c(1),children:[e.jsx(A,{}),"Back"]}),e.jsx("div",{className:"flex-1"}),e.jsxs(n,{type:"button",onClick:()=>c(3),children:["Done",e.jsx(j,{})]})]})]}),a===3&&e.jsxs(f,{className:"items-center gap-4 p-8 text-center",children:[e.jsx("span",{className:"flex size-11 items-center justify-center rounded-[10px] bg-brand-soft text-brand",children:e.jsx(G,{className:"size-5"})}),e.jsxs("h1",{className:"m-0 text-[21px] font-semibold leading-tight tracking-tight",children:[o||r.name," is set up"]}),e.jsx("p",{className:"m-0 text-muted-foreground",children:"Three things left, in this order."}),e.jsx("ol",{className:"m-0 flex w-full list-none flex-col gap-2 p-0 text-left",children:[["Deploy the site with the tag on every page","Comments start arriving here the moment a page loads it."],["Add a reviewer and send them their link","Your client gets their own link; you can revoke it without touching the site."],["Start the first round","A round is one pass of feedback. Starting the next one closes the last."]].map(([t,s],p)=>e.jsxs("li",{className:"flex gap-3 rounded-md border border-border px-3 py-2.5",children:[e.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center rounded-full border border-line-strong text-[11px] text-muted-foreground",children:p+1}),e.jsxs("span",{children:[e.jsx("span",{className:"block text-[13px] font-medium",children:t}),e.jsx("span",{className:"block text-[12px] text-muted-foreground",children:s})]})]},t))}),e.jsxs(n,{size:"lg",className:"mt-2 w-full",onClick:()=>void y({to:"/s/$site/comments",params:{site:r.uid},replace:!0}),children:["Go to Comments",e.jsx(j,{})]})]})]})})}export{J as component};